@gravitee/gamma-lib-observability 3.1.1 → 3.2.0-amp-demo.da2facd

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 (135) hide show
  1. package/INTEGRATION.md +60 -0
  2. package/QUERYING.md +58 -7
  3. package/README.md +1 -0
  4. package/USAGE_GUIDE.md +83 -6
  5. package/dist/dashboards/DashboardView.d.ts +8 -1
  6. package/dist/dashboards/DashboardView.d.ts.map +1 -1
  7. package/dist/dashboards/WidgetGroup.d.ts +7 -1
  8. package/dist/dashboards/WidgetGroup.d.ts.map +1 -1
  9. package/dist/dashboards/WidgetInteractionContext.d.ts +31 -0
  10. package/dist/dashboards/WidgetInteractionContext.d.ts.map +1 -0
  11. package/dist/dashboards/WidgetItem.d.ts +7 -3
  12. package/dist/dashboards/WidgetItem.d.ts.map +1 -1
  13. package/dist/dashboards/analytics-table/AnalyticsTable.d.ts +54 -0
  14. package/dist/dashboards/analytics-table/AnalyticsTable.d.ts.map +1 -0
  15. package/dist/dashboards/analytics-table/analytics-table-model.d.ts +73 -0
  16. package/dist/dashboards/analytics-table/analytics-table-model.d.ts.map +1 -0
  17. package/dist/dashboards/analytics-table/format-table-value.d.ts +31 -0
  18. package/dist/dashboards/analytics-table/format-table-value.d.ts.map +1 -0
  19. package/dist/dashboards/analytics-table/index.d.ts +6 -0
  20. package/dist/dashboards/analytics-table/index.d.ts.map +1 -0
  21. package/dist/dashboards/analytics-table/plan-columns.d.ts +102 -0
  22. package/dist/dashboards/analytics-table/plan-columns.d.ts.map +1 -0
  23. package/dist/dashboards/analytics-table/row-color.d.ts +11 -0
  24. package/dist/dashboards/analytics-table/row-color.d.ts.map +1 -0
  25. package/dist/dashboards/analytics-table/use-analytics-table-query.d.ts +46 -0
  26. package/dist/dashboards/analytics-table/use-analytics-table-query.d.ts.map +1 -0
  27. package/dist/dashboards/editor/TableColumnsEditor.d.ts +26 -0
  28. package/dist/dashboards/editor/TableColumnsEditor.d.ts.map +1 -0
  29. package/dist/dashboards/editor/TableDisplayFields.d.ts +13 -0
  30. package/dist/dashboards/editor/TableDisplayFields.d.ts.map +1 -0
  31. package/dist/dashboards/editor/TableQueryFields.d.ts +15 -0
  32. package/dist/dashboards/editor/TableQueryFields.d.ts.map +1 -0
  33. package/dist/dashboards/editor/VisualizationTypePicker.d.ts.map +1 -1
  34. package/dist/dashboards/editor/WidgetConfigForm.d.ts.map +1 -1
  35. package/dist/dashboards/editor/WidgetEditorPanel.d.ts.map +1 -1
  36. package/dist/dashboards/editor/WidgetPreview.d.ts +5 -0
  37. package/dist/dashboards/editor/WidgetPreview.d.ts.map +1 -1
  38. package/dist/dashboards/editor/convert-widget-type.d.ts +0 -4
  39. package/dist/dashboards/editor/convert-widget-type.d.ts.map +1 -1
  40. package/dist/dashboards/editor/dashboard-editor-state.d.ts +8 -0
  41. package/dist/dashboards/editor/dashboard-editor-state.d.ts.map +1 -1
  42. package/dist/dashboards/editor/facet-display-cols.d.ts +2 -0
  43. package/dist/dashboards/editor/facet-display-cols.d.ts.map +1 -1
  44. package/dist/dashboards/editor/suggest-widget-title.d.ts.map +1 -1
  45. package/dist/dashboards/editor/widget-auto-scope.d.ts.map +1 -1
  46. package/dist/dashboards/index.d.ts +4 -1
  47. package/dist/dashboards/index.d.ts.map +1 -1
  48. package/dist/dashboards/register-default-renderers.d.ts +1 -1
  49. package/dist/dashboards/register-default-renderers.d.ts.map +1 -1
  50. package/dist/dashboards/renderers/TablePresentation.d.ts +20 -0
  51. package/dist/dashboards/renderers/TablePresentation.d.ts.map +1 -0
  52. package/dist/dashboards/renderers/TableWidgetRenderer.d.ts +4 -0
  53. package/dist/dashboards/renderers/TableWidgetRenderer.d.ts.map +1 -0
  54. package/dist/dashboards/renderers/index.d.ts +1 -0
  55. package/dist/dashboards/renderers/index.d.ts.map +1 -1
  56. package/dist/dashboards/widget-data.d.ts +29 -2
  57. package/dist/dashboards/widget-data.d.ts.map +1 -1
  58. package/dist/dashboards/widget-renderer-registry.d.ts +8 -0
  59. package/dist/dashboards/widget-renderer-registry.d.ts.map +1 -1
  60. package/dist/data-sources/http-data-source.d.ts.map +1 -1
  61. package/dist/hooks/query-keys.d.ts +14 -0
  62. package/dist/hooks/query-keys.d.ts.map +1 -1
  63. package/dist/hooks/use-facets-query.d.ts +7 -0
  64. package/dist/hooks/use-facets-query.d.ts.map +1 -1
  65. package/dist/index.d.ts +6 -4
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +6376 -3270
  68. package/dist/lib/use-element-size.d.ts +21 -0
  69. package/dist/lib/use-element-size.d.ts.map +1 -0
  70. package/dist/routing/ObservabilityDashboardPage.d.ts +16 -0
  71. package/dist/routing/ObservabilityDashboardPage.d.ts.map +1 -1
  72. package/dist/routing/ObservabilityRoutes.d.ts.map +1 -1
  73. package/dist/routing/detail-filter.d.ts +9 -4
  74. package/dist/routing/detail-filter.d.ts.map +1 -1
  75. package/dist/shared/ExplorerTable.d.ts +34 -2
  76. package/dist/shared/ExplorerTable.d.ts.map +1 -1
  77. package/dist/styles/observability.css +1 -1
  78. package/dist/targets/EvaluateNowButton.d.ts +19 -0
  79. package/dist/targets/EvaluateNowButton.d.ts.map +1 -0
  80. package/dist/targets/RuleTrend.d.ts +19 -0
  81. package/dist/targets/RuleTrend.d.ts.map +1 -0
  82. package/dist/targets/TargetCard.d.ts +18 -0
  83. package/dist/targets/TargetCard.d.ts.map +1 -0
  84. package/dist/targets/TargetForm.d.ts +19 -0
  85. package/dist/targets/TargetForm.d.ts.map +1 -0
  86. package/dist/targets/TargetHeatmap.d.ts +22 -0
  87. package/dist/targets/TargetHeatmap.d.ts.map +1 -0
  88. package/dist/targets/TargetStatusBadge.d.ts +18 -0
  89. package/dist/targets/TargetStatusBadge.d.ts.map +1 -0
  90. package/dist/targets/TargetsPanel.d.ts +15 -0
  91. package/dist/targets/TargetsPanel.d.ts.map +1 -0
  92. package/dist/targets/api-type-names.d.ts +5 -0
  93. package/dist/targets/api-type-names.d.ts.map +1 -0
  94. package/dist/targets/evaluation-summary.d.ts +34 -0
  95. package/dist/targets/evaluation-summary.d.ts.map +1 -0
  96. package/dist/targets/format.d.ts +26 -0
  97. package/dist/targets/format.d.ts.map +1 -0
  98. package/dist/targets/history-range.d.ts +14 -0
  99. package/dist/targets/history-range.d.ts.map +1 -0
  100. package/dist/targets/http-targets-source.d.ts +10 -0
  101. package/dist/targets/http-targets-source.d.ts.map +1 -0
  102. package/dist/targets/index.d.ts +15 -0
  103. package/dist/targets/index.d.ts.map +1 -0
  104. package/dist/targets/rule-filters.d.ts +7 -0
  105. package/dist/targets/rule-filters.d.ts.map +1 -0
  106. package/dist/targets/targets-provider.d.ts +27 -0
  107. package/dist/targets/targets-provider.d.ts.map +1 -0
  108. package/dist/targets/targets-source.d.ts +51 -0
  109. package/dist/targets/targets-source.d.ts.map +1 -0
  110. package/dist/targets/testing/in-memory-targets-source.d.ts +41 -0
  111. package/dist/targets/testing/in-memory-targets-source.d.ts.map +1 -0
  112. package/dist/targets/types.d.ts +130 -0
  113. package/dist/targets/types.d.ts.map +1 -0
  114. package/dist/targets/use-targets.d.ts +44 -0
  115. package/dist/targets/use-targets.d.ts.map +1 -0
  116. package/dist/{dashboard-access-provider.js → targets-source.js} +28 -1
  117. package/dist/testing/graphene-core-icons-mock.d.ts +8 -0
  118. package/dist/testing/graphene-core-icons-mock.d.ts.map +1 -1
  119. package/dist/testing/graphene-core-mock.d.ts +33 -7
  120. package/dist/testing/graphene-core-mock.d.ts.map +1 -1
  121. package/dist/testing/index.d.ts +10 -0
  122. package/dist/testing/index.d.ts.map +1 -1
  123. package/dist/testing/mock-metrics-data-source.d.ts.map +1 -1
  124. package/dist/testing.js +379 -35
  125. package/dist/types/domain.d.ts +105 -1
  126. package/dist/types/domain.d.ts.map +1 -1
  127. package/dist/types/guards.d.ts +2 -1
  128. package/dist/types/guards.d.ts.map +1 -1
  129. package/dist/types/index.d.ts +2 -2
  130. package/dist/types/index.d.ts.map +1 -1
  131. package/dist/types/responses.d.ts +18 -0
  132. package/dist/types/responses.d.ts.map +1 -1
  133. package/dist/types-entry.d.ts +2 -0
  134. package/dist/types-entry.d.ts.map +1 -1
  135. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ import { TableRowMarker } from '../../types/domain';
2
+ import { ResolvedTableColumn } from './analytics-table-model';
3
+ /**
4
+ * Intrinsic minimum widths, in pixels, for each kind of cell. They are what the
5
+ * content needs to stay readable, not a share of the widget: an API name needs
6
+ * room for more than an ellipsis, and a number needs room for its unit.
7
+ */
8
+ export declare const LABEL_COLUMN_MIN_WIDTH = 140;
9
+ export declare const VALUE_COLUMN_MIN_WIDTH = 88;
10
+ /** A value column drawing a share bar next to its number. */
11
+ export declare const SHARE_COLUMN_MIN_WIDTH = 120;
12
+ export declare const ROW_MENU_WIDTH = 28;
13
+ /** Room the row marker takes in front of the label, gap included. */
14
+ export declare const ROW_MARKER_WIDTH: Readonly<Record<TableRowMarker, number>>;
15
+ /**
16
+ * Below either of these nothing legible fits at all, so the widget says so
17
+ * instead of drawing a table nobody can read — the same call `MetricGroup`
18
+ * makes with its own emergency threshold.
19
+ */
20
+ export declare const EMERGENCY_WIDTH = 180;
21
+ export declare const EMERGENCY_HEIGHT = 90;
22
+ export declare const TABLE_ROW_HEIGHT = 36;
23
+ export declare const TABLE_HEADER_HEIGHT = 40;
24
+ export declare const TABLE_PAGINATION_HEIGHT = 36;
25
+ export type TableDensity = 'comfortable' | 'compact';
26
+ /**
27
+ * - `table` — the visualization the author asked for, possibly with columns
28
+ * collapsed away.
29
+ * - `top-list` — not even one value column fits next to the labels, so the
30
+ * widget falls back to the ranked-list presentation on the sort column.
31
+ * - `emergency` — too small for either.
32
+ */
33
+ export type TableLayoutMode = 'table' | 'top-list' | 'emergency';
34
+ export interface ColumnPlan {
35
+ readonly mode: TableLayoutMode;
36
+ readonly density: TableDensity;
37
+ /** Column ids to render, in author order. */
38
+ readonly visible: readonly string[];
39
+ /** Column ids collapsed away, in author order. */
40
+ readonly hidden: readonly string[];
41
+ /**
42
+ * Pixels left to the label column once the visible value columns and the
43
+ * row menu have taken theirs, marker included. The table caps the labels at
44
+ * this so a long value truncates instead of widening its column: table
45
+ * layout gives a cell what its text asks for, and one long label would push
46
+ * the last value column out of the widget. Zero outside `table` mode.
47
+ */
48
+ readonly labelWidth: number;
49
+ }
50
+ export interface PlanColumnsOptions {
51
+ readonly width: number;
52
+ readonly height: number;
53
+ readonly columns: readonly ResolvedTableColumn[];
54
+ /** The column ordering the rows. Never collapsed while a table is rendered. */
55
+ readonly sortColumnId: string | undefined;
56
+ /** Reserves room for the per-row actions button. @default false */
57
+ readonly hasRowMenu?: boolean;
58
+ /** Header of the label column, so a long dimension name is budgeted for. */
59
+ readonly labelHeader?: string;
60
+ readonly rowMarker?: TableRowMarker;
61
+ }
62
+ /**
63
+ * Room a header needs to stay on one line. An estimate, not a measurement:
64
+ * the plan runs before anything is laid out, and a per-character average is
65
+ * within a few pixels of the truth for the labels a catalog produces. Without
66
+ * it a column budgeted at its numeric minimum would be handed a header wider
67
+ * than that, and the table layout would take the missing pixels from a
68
+ * neighbour — folding "300 req 99%" onto two lines while the plan swears
69
+ * everything fits.
70
+ */
71
+ export declare function estimateHeaderWidth(label: string): number;
72
+ /**
73
+ * Decides which columns fit the measured width, and how tightly they draw.
74
+ *
75
+ * Pure, and separate from the component, because it is the whole of the
76
+ * degradation contract: hide in reverse author order, keep the label, the sort
77
+ * column and the pinned ones, fall back to a top list rather than clip. A
78
+ * pinned column is dropped only when the alternative is losing the table
79
+ * altogether — pinning asks for priority, and priority cannot conjure pixels.
80
+ */
81
+ export declare function planColumns({ width, height, columns, sortColumnId, hasRowMenu, labelHeader, rowMarker, }: PlanColumnsOptions): ColumnPlan;
82
+ export interface PageSizePlan {
83
+ readonly rowsPerPage: number;
84
+ readonly paginated: boolean;
85
+ }
86
+ /**
87
+ * Rows per page derived from the height that is actually available, capped by
88
+ * the author's `pageSize`.
89
+ *
90
+ * Derived rather than fixed because the widget must never clip: a table asked
91
+ * for ten rows in a box that holds four has to show four and page, not four and
92
+ * a half. The author's number is therefore a ceiling — it can ask for fewer
93
+ * rows than fit, never for more.
94
+ *
95
+ * Two passes, because the pagination bar only exists if there is something to
96
+ * page through, and it costs a row's worth of height when it does.
97
+ */
98
+ export declare function resolveRowsPerPage(height: number, totalRows: number, options?: {
99
+ readonly showTotals?: boolean;
100
+ readonly pageSize?: number;
101
+ }): PageSizePlan;
102
+ //# sourceMappingURL=plan-columns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-columns.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/plan-columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAA6B,CAAC;AAEpG;;;;GAIG;AACH,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;AAEjE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE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C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1E,YAAY,CASd"}
@@ -0,0 +1,11 @@
1
+ import { AnalyticsTableRow } from './analytics-table-model';
2
+ /** CSS colour for a row's swatch, or `undefined` to let the index palette decide. */
3
+ export type RowColorResolver = (row: AnalyticsTableRow) => string | undefined;
4
+ /**
5
+ * Rows of a status dimension keep their semantic colours (2XX green, 5XX red),
6
+ * the same `status-palette` every other widget applies to that dimension, so a
7
+ * table and a bar chart of the same values never disagree. Any other dimension
8
+ * gets no resolver: its rows follow the index palette, like the top list.
9
+ */
10
+ export declare function rowColorResolver(dimension: string | undefined): RowColorResolver | undefined;
11
+ //# sourceMappingURL=row-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-color.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/row-color.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;AAE9E;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAG5F"}
@@ -0,0 +1,46 @@
1
+ import { FilterCondition, NumericRange, TableSort, TimeRange } from '../../types/domain';
2
+ import { FacetMetricRequest } from '../../types/requests';
3
+ import { AnalyticsTableRow, ResolvedTableColumn } from './analytics-table-model';
4
+ /**
5
+ * Groups the columns by metric, de-duplicating measures, and attaches the sort
6
+ * directive to **exactly one** metric: the one owning the sort column.
7
+ *
8
+ * That single-carrier rule is the contract shared with the backend's bucket
9
+ * alignment work — the metric carrying `sorts` is the governing order once the
10
+ * aggregations are merged server-side. Putting `sorts` on two metrics would
11
+ * make "which order governs" ambiguous, so the request never does, and this
12
+ * side needs no change when the backend catches up.
13
+ */
14
+ export declare function buildTableMetrics(columns: readonly ResolvedTableColumn[], sort: TableSort | undefined): FacetMetricRequest[];
15
+ export interface UseAnalyticsTableQueryParams {
16
+ readonly by: readonly string[];
17
+ readonly columns: readonly ResolvedTableColumn[];
18
+ readonly sort: TableSort | undefined;
19
+ readonly timeRange: TimeRange;
20
+ readonly filters?: FilterCondition[];
21
+ readonly limit?: number;
22
+ readonly ranges?: readonly NumericRange[];
23
+ /**
24
+ * Fires the extra measures request. Wanted by the totals row *and* by any
25
+ * share column, which needs a denominator that is not just the visible rows.
26
+ */
27
+ readonly withTotals?: boolean;
28
+ readonly enabled?: boolean;
29
+ }
30
+ export interface AnalyticsTableQueryResult {
31
+ readonly rows: readonly AnalyticsTableRow[];
32
+ readonly partialRows: number;
33
+ readonly totals: Readonly<Record<string, number>> | undefined;
34
+ readonly isLoading: boolean;
35
+ readonly isError: boolean;
36
+ }
37
+ /**
38
+ * One facets request for the whole table, however many columns it has, plus one
39
+ * measures request when totals or a share column need a denominator.
40
+ *
41
+ * A single-column table produces exactly the request a top list on the same
42
+ * query produces, down to the cache key, so the two share a cache entry. A
43
+ * multi-metric table cannot: the key hashes the whole metric list.
44
+ */
45
+ export declare function useAnalyticsTableQuery({ by, columns, sort, timeRange, filters, limit, ranges, withTotals, enabled, }: UseAnalyticsTableQueryParams): AnalyticsTableQueryResult;
46
+ //# sourceMappingURL=use-analytics-table-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-analytics-table-query.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/use-analytics-table-query.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAmB,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE5G;;;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old } from '../../types/domain';
2
+ export interface TableColumnsEditorProps {
3
+ readonly columns: readonly TableColumn[];
4
+ readonly onChange: (columns: TableColumn[]) => void;
5
+ }
6
+ /** 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
+ /**
9
+ * Editor for a table's columns.
10
+ *
11
+ * A row is deliberately quiet: metric, measure, label, then a read-only
12
+ * summary of everything else (share, pin, thresholds) and two controls that
13
+ * need no explaining, an overflow menu and a chevron. Everything the summary
14
+ * describes is set in the row that opens underneath, with named switches
15
+ * rather than icons to decode. One row is open at a time.
16
+ *
17
+ * Thresholds are ordered rules and the first match wins, so their order is
18
+ * part of what the author sets: the open threshold can be moved earlier or
19
+ * later, and the pills read left to right in that priority.
20
+ *
21
+ * Reordering columns lives in the menu rather than as arrows on every row:
22
+ * the column order is the collapse order (the last column is the first to
23
+ * go), which an author sets once, not something to nudge in passing.
24
+ */
25
+ export declare function TableColumnsEditor({ columns, onChange }: TableColumnsEditorProps): import("react/jsx-runtime").JSX.Element;
26
+ //# sourceMappingURL=TableColumnsEditor.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,13 @@
1
+ import { TableWidget, Widget } from '../../types/domain';
2
+ export interface TableDisplayFieldsProps {
3
+ readonly widget: TableWidget;
4
+ readonly onChange: (widget: Widget) => void;
5
+ }
6
+ /**
7
+ * The presentation choices a table leaves to the author. Everything else,
8
+ * which columns fit, how many rows a page holds, whether numbers compact, is
9
+ * decided from the widget's measured size, because the author cannot know it
10
+ * from here and a fixed answer would clip.
11
+ */
12
+ export declare function TableDisplayFields({ widget, onChange }: TableDisplayFieldsProps): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=TableDisplayFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableDisplayFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableDisplayFields.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK9E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAUD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CA8C/E"}
@@ -0,0 +1,15 @@
1
+ import { TableWidget, Widget } from '../../types/domain';
2
+ export interface TableQueryFieldsProps {
3
+ readonly widget: TableWidget;
4
+ readonly onChange: (widget: Widget) => void;
5
+ }
6
+ /**
7
+ * What the table lists and how it is ordered, then the columns themselves.
8
+ *
9
+ * Group-by, row cap and sort sit above the column list because they decide
10
+ * *which* rows come back; the columns decide what is shown about them. The sort
11
+ * also decides which metric carries the ordering in the request, which is why
12
+ * it belongs to the query and not to Display.
13
+ */
14
+ export declare function TableQueryFields({ widget, onChange }: TableQueryFieldsProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=TableQueryFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableQueryFields.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAA0B,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAUtF,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,2CAmF3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualizationTypePicker.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/VisualizationTypePicker.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAkBrD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC/C;AAED,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,4BAA4B,2CA8BxF"}
1
+ {"version":3,"file":"VisualizationTypePicker.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/VisualizationTypePicker.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAmBrD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC/C;AAED,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,4BAA4B,2CAmCxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetConfigForm.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetConfigForm.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAuD,MAAM,EAAc,MAAM,oBAAoB,CAAC;AAelH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAYD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAqE3E"}
1
+ {"version":3,"file":"WidgetConfigForm.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetConfigForm.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAKV,MAAM,EAEP,MAAM,oBAAoB,CAAC;AAiB5B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAYD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAqE3E"}
@@ -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,QAA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;;;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"}
@@ -9,6 +9,11 @@ export interface WidgetPreviewProps {
9
9
  * Live preview of the widget under edition. The configuration is debounced so
10
10
  * typing does not fire an analytics query per keystroke; widget-level filters
11
11
  * are merged by the renderer itself (widget wins over dashboard filters).
12
+ *
13
+ * The preview takes the panel's full width, the way Grafana's and Datadog's
14
+ * editors do, rather than reproducing the widget's grid width: the author is
15
+ * checking the data and the configuration here, and the dashboard is where
16
+ * the final size is judged. Only the height follows the configured rows.
12
17
  */
13
18
  export declare function WidgetPreview({ widget, timeRange, dashboardFilters }: WidgetPreviewProps): import("react/jsx-runtime").JSX.Element;
14
19
  //# sourceMappingURL=WidgetPreview.d.ts.map
@@ -1 +1 @@
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;AA4B7E,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;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,2CAmBxF"}
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,2CAqBxF"}
@@ -1,7 +1,3 @@
1
1
  import { Widget, WidgetType } from '../../types/domain';
2
- /**
3
- * Converts a widget to another visualization type, preserving identity,
4
- * layout, title, description, filters and, when expressible, the query.
5
- */
6
2
  export declare function convertWidgetType(widget: Widget, type: WidgetType): Widget;
7
3
  //# 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,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA4B7D;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAkE1E"}
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;AAkDxF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CA6E1E"}
@@ -89,6 +89,14 @@ export declare const DEFAULT_FACET_BUCKETS = 5;
89
89
  * one rule per chart to learn.
90
90
  */
91
91
  export declare const MAX_FACET_BUCKETS = 10;
92
+ /**
93
+ * Rows a fresh table asks for, and the ceiling the editor enforces. A table is
94
+ * the one visualization where a long list stays readable — it pages instead of
95
+ * cramming — so it is deliberately far above {@link MAX_FACET_BUCKETS}, which
96
+ * guards charts that would turn into noise.
97
+ */
98
+ export declare const DEFAULT_TABLE_ROWS = 20;
99
+ export declare const MAX_TABLE_ROWS = 100;
92
100
  export declare function nextWidgetPosition(widgets: readonly Widget[]): number;
93
101
  /**
94
102
  * Builds a blank widget of the requested type, positioned below the current
@@ -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;AAGlH;;;;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,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,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,qBAAqB,IAAI,CAAC;AACvC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,cAAc,MAAM,CAAC;AAiBlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAErE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAmEpG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAIvD;AAED,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,IAAiB,GAAG,SAAS,CAUtE"}
@@ -4,4 +4,6 @@
4
4
  * full literal class string so Tailwind's static scan emits it.
5
5
  */
6
6
  export declare const PAIR_COLS = "grid grid-cols-2";
7
+ /** Three equal columns, for the table's display row. */
8
+ export declare const TRIO_COLS = "grid grid-cols-3";
7
9
  //# sourceMappingURL=facet-display-cols.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facet-display-cols.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/facet-display-cols.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,SAAS,qBAAqB,CAAC"}
1
+ {"version":3,"file":"facet-display-cols.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/facet-display-cols.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,wDAAwD;AACxD,eAAO,MAAM,SAAS,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"suggest-widget-title.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/suggest-widget-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAoBzD"}
1
+ {"version":3,"file":"suggest-widget-title.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/suggest-widget-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA2BzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"widget-auto-scope.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/widget-auto-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAyBjD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpE"}
1
+ {"version":3,"file":"widget-auto-scope.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/widget-auto-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA2BjD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpE"}
@@ -4,13 +4,16 @@ export { DashboardView, type DashboardViewProps } from './DashboardView';
4
4
  export { WidgetGroup, type WidgetGroupAlign, type WidgetGroupProps } from './WidgetGroup';
5
5
  export { useWidgetGroupContext, type WidgetGroupContextValue } from './WidgetGroupContext';
6
6
  export { WidgetItem, type WidgetItemProps } from './WidgetItem';
7
- export type { BarWidgetData, BreakdownWidgetData, CartesianWidgetData, DoughnutCenterStat, DoughnutWidgetData, MetricGroupCategory, MetricGroupEntry, MetricGroupItem, MetricGroupWidgetData, MetricWidgetData, WidgetData, } from './widget-data';
7
+ export { WidgetInteractionProvider, useWidgetInteractionContext, type WidgetInteraction, type WidgetInteractionContextValue, type WidgetInteractionHandler, type WidgetInteractionKind, } from './WidgetInteractionContext';
8
+ export type { BarWidgetData, BreakdownWidgetData, CartesianWidgetData, DoughnutCenterStat, DoughnutWidgetData, MetricGroupCategory, MetricGroupEntry, MetricGroupItem, MetricGroupWidgetData, MetricWidgetData, TableWidgetData, WidgetData, } from './widget-data';
8
9
  export { BarPresentation, type BarPresentationProps } from './renderers/BarPresentation';
9
10
  export { BreakdownPresentation, type BreakdownPresentationProps } from './renderers/BreakdownPresentation';
10
11
  export { CartesianPresentation, type CartesianPresentationProps } from './renderers/CartesianPresentation';
11
12
  export { DoughnutPresentation, type DoughnutPresentationProps } from './renderers/DoughnutPresentation';
12
13
  export { MetricGroupPresentation, type MetricGroupPresentationProps } from './renderers/MetricGroupPresentation';
13
14
  export { MetricPresentation, type MetricPresentationProps } from './renderers/MetricPresentation';
15
+ export { TablePresentation, type TablePresentationProps } from './renderers/TablePresentation';
16
+ export { AnalyticsTable, buildTableMetrics, formatTableValue, planColumns, resolveRowsPerPage, resolveTableColumns, resolveTableSort, tableColumnId, useAnalyticsTableQuery, type AnalyticsTableProps, type AnalyticsTableQueryResult, type AnalyticsTableRow, type ColumnPlan, type PageSizePlan, type ResolvedTableColumn, type TableDensity, type TableLayoutMode, type UseAnalyticsTableQueryParams, } from './analytics-table';
14
17
  export { mergeFilters } from './merge-filters';
15
18
  export { useMergedWidgetFilters } from './use-merged-widget-filters';
16
19
  export { registerDefaultRenderers } from './register-default-renderers';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,YAAY,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAi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C;AACxE,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EACL,KAAK,aAAa,EAClB,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAG5E,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,GACrC,MAAM,aAAa,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Registers the 6 built-in widget renderers.
2
+ * Registers the 7 built-in widget renderers.
3
3
  * Safe to call multiple times — subsequent calls are no-ops.
4
4
  */
5
5
  export declare function registerDefaultRenderers(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"register-default-renderers.d.ts","sourceRoot":"","sources":["../../src/dashboards/register-default-renderers.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAU/C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C"}
1
+ {"version":3,"file":"register-default-renderers.d.ts","sourceRoot":"","sources":["../../src/dashboards/register-default-renderers.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAW/C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C"}
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { TableSort } from '../../types/domain';
3
+ import { AnalyticsTableRow } from '../analytics-table/analytics-table-model';
4
+ import { TableWidgetData } from '../widget-data';
5
+ export interface TablePresentationProps extends Omit<TableWidgetData, 'type'> {
6
+ /** Makes the sort controlled. Without it the table sorts its own rows. */
7
+ readonly onSortChange?: (sort: TableSort) => void;
8
+ readonly onRowSelect?: (row: AnalyticsTableRow) => void;
9
+ readonly renderRowMenuItems?: (row: AnalyticsTableRow) => ReactNode;
10
+ }
11
+ /**
12
+ * Presentation layer of the table widget: the table, plus the ranked list it
13
+ * degrades into when the widget is too narrow for a single value column.
14
+ *
15
+ * The fallback reuses the top-list presentation rather than re-drawing bars
16
+ * here, so the two visualizations cannot drift apart — a table squeezed down to
17
+ * one column really is a top list, and looks like one.
18
+ */
19
+ export declare function TablePresentation({ columns, rows, dimensionLabel, dimension, state, sort, onSortChange, totals, showTotals, partialRows, pageSize, rowMarker, onRowSelect, renderRowMenuItems, }: TablePresentationProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=TablePresentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TablePresentation.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/TablePresentation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,0CAA0C,CAAC;AAGvG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC;IAC3E,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,SAAS,CAAC;CACrE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,IAAI,EACJ,cAAc,EACd,SAAS,EACT,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,kBAAkB,GACnB,EAAE,sBAAsB,2CAkCxB"}
@@ -0,0 +1,4 @@
1
+ import { TableWidget } from '../../types/domain';
2
+ import { WidgetRendererProps } from '../widget-renderer-registry';
3
+ export declare function TableWidgetRenderer({ widget, timeRange, filters, onInteract }: WidgetRendererProps<TableWidget>): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=TableWidgetRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/TableWidgetRenderer.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAOjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAYvE,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,mBAAmB,CAAC,WAAW,CAAC,2CAkG/G"}
@@ -3,5 +3,6 @@ export { CartesianWidgetRenderer } from './CartesianWidgetRenderer';
3
3
  export { DoughnutWidgetRenderer } from './DoughnutWidgetRenderer';
4
4
  export { MetricGroupWidgetRenderer } from './MetricGroupWidgetRenderer';
5
5
  export { MetricWidgetRenderer } from './MetricWidgetRenderer';
6
+ export { TableWidgetRenderer } from './TableWidgetRenderer';
6
7
  export { UnknownWidgetFallback } from './UnknownWidgetFallback';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { BreakdownItem, BreakdownTooltipItem, CartesianDataPoint, ChartConfig, ChartState, DoughnutChartProps, MetricTrend } from '@gravitee/graphene-charts';
2
2
  import { ReactNode } from 'react';
3
- import { BarChartLayout, BreakdownRatioMode, BreakdownVariant, MetricTrendSentiment, SeriesDefinition } from '../types/domain';
3
+ import { BarChartLayout, BreakdownRatioMode, BreakdownVariant, MetricTrendSentiment, SeriesDefinition, TableRowMarker, TableSort } from '../types/domain';
4
+ import { AnalyticsTableRow, ResolvedTableColumn } from './analytics-table/analytics-table-model';
4
5
  /**
5
6
  * Value + caption graphene renders inside a doughnut hole. Derived from the
6
7
  * chart props because `graphene-charts@3.7.0` does not re-export the type from
@@ -148,9 +149,35 @@ export interface BreakdownWidgetData {
148
149
  /** Label for the tooltip total row. @default "Total" */
149
150
  readonly tooltipTotalLabel?: string;
150
151
  }
152
+ /**
153
+ * Pre-computed presentation data for a `table` widget.
154
+ *
155
+ * Columns arrive resolved rather than as the author wrote them: the label and
156
+ * unit of a column come from the metric catalog, and a caller driving the
157
+ * presentation by hand has to be able to say what a column reads without
158
+ * carrying the catalog with it.
159
+ */
160
+ export interface TableWidgetData {
161
+ readonly type: 'table';
162
+ readonly columns: readonly ResolvedTableColumn[];
163
+ readonly rows: readonly AnalyticsTableRow[];
164
+ /** Header of the label column, e.g. `API`. */
165
+ readonly dimensionLabel: string;
166
+ /** Field the rows are values of, e.g. `HTTP_STATUS_CODE_GROUP`; drives semantic row colours. */
167
+ readonly dimension?: string;
168
+ readonly state: ChartState;
169
+ readonly sort?: TableSort;
170
+ /** Overall metric totals, keyed by column id. Also the share denominator. */
171
+ readonly totals?: Readonly<Record<string, number>>;
172
+ readonly showTotals?: boolean;
173
+ /** How many rows the response could not fill completely. */
174
+ readonly partialRows?: number;
175
+ readonly pageSize?: number;
176
+ readonly rowMarker?: TableRowMarker;
177
+ }
151
178
  /**
152
179
  * Discriminated union of all widget data types.
153
180
  * The `type` field matches the corresponding `Widget['type']`.
154
181
  */
155
- export type WidgetData = MetricWidgetData | MetricGroupWidgetData | CartesianWidgetData | BarWidgetData | DoughnutWidgetData | BreakdownWidgetData;
182
+ export type WidgetData = MetricWidgetData | MetricGroupWidgetData | CartesianWidgetData | BarWidgetData | DoughnutWidgetData | BreakdownWidgetData | TableWidgetData;
156
183
  //# sourceMappingURL=widget-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-data.d.ts","sourceRoot":"","sources":["../../src/dashboards/widget-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;I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AmB,GACnB,eAAe,CAAC"}
@@ -1,9 +1,17 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { FilterCondition, TimeRange, Widget, WidgetType } from '../types/domain';
3
+ import { WidgetInteractionHandler } from './WidgetInteractionContext';
3
4
  export interface WidgetRendererProps<W extends Widget = Widget> {
4
5
  readonly widget: W;
5
6
  readonly timeRange: TimeRange;
6
7
  readonly filters: readonly FilterCondition[];
8
+ /**
9
+ * Sends a value the reader acted on back to the page, which turns it into a
10
+ * dashboard filter or a navigation. Absent when nothing upstream is listening
11
+ * — a widget must then render without the affordance rather than with a dead
12
+ * one, which is why it is a prop and not a no-op default.
13
+ */
14
+ readonly onInteract?: WidgetInteractionHandler;
7
15
  }
8
16
  export type WidgetRenderer<W extends Widget = Widget> = ComponentType<WidgetRendererProps<W>>;
9
17
  export declare function registerWidgetRenderer<W extends Widget>(type: W['type'], renderer: WidgetRenderer<W>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"widget-renderer-registry.d.ts","sourceRoot":"","sources":["../../src/dashboards/widget-renderer-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEtF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC5D,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACnB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;CAC9C;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAI9F,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAE3G;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,SAAS,CAE9E;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
1
+ {"version":3,"file":"widget-renderer-registry.d.ts","sourceRoot":"","sources":["../../src/dashboards/widget-renderer-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC5D,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACnB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,wBAAwB,CAAC;CAChD;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAI9F,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAE3G;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,SAAS,CAE9E;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"http-data-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-data-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAY9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAuB/D,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACrE;AAsJD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,iBAAiB,CAuDxG"}
1
+ {"version":3,"file":"http-data-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-data-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAY9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAqC/D,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACrE;AAyKD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,iBAAiB,CAuDxG"}
@@ -60,5 +60,19 @@ export declare const observabilityQueryKeys: {
60
60
  readonly customDashboards: () => readonly ["observability", "custom-dashboards"];
61
61
  readonly customDashboard: (id: string) => readonly ["observability", "custom-dashboards", string];
62
62
  readonly filterLabels: (key: string) => readonly ["observability", "filterLabels", string];
63
+ readonly targets: (reference: string) => readonly ["observability", "targets", {
64
+ readonly reference: string;
65
+ }];
66
+ readonly targetHistoryAll: readonly ["observability", "targetHistory"];
67
+ readonly targetHistory: (targetId: string, perPage: number) => readonly ["observability", "targetHistory", {
68
+ readonly targetId: string;
69
+ readonly perPage: number;
70
+ }];
71
+ readonly targetsLatestAll: readonly ["observability", "targetsLatest"];
72
+ readonly targetsLatest: (references: readonly string[]) => readonly ["observability", "targetsLatest", {
73
+ readonly references: string[];
74
+ }];
75
+ readonly targetMetricSpecs: (apiName: string) => readonly ["observability", "targetMetricSpecs", string];
76
+ readonly targetFilterSpecs: (metricName: string) => readonly ["observability", "targetFilterSpecs", string];
63
77
  };
64
78
  //# sourceMappingURL=query-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../src/hooks/query-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAmB3E,eAAO,MAAM,sBAAsB;;mCAItB,SAAS,kBAAkB,EAAE,aAC3B,SAAS,YACV,MAAM,YACN,eAAe,EAAE,OACtB,SAAS,MAAM,EAAE,UACd,MAAM,WACL,SAAS,YAAY,EAAE;;;;;;;;;0BAS5B,SAAS,MAAM,EAAE,aACV,SAAS,YACV,eAAe,EAAE,YACjB;QACR,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;QACxC,MAAM,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;;;;;;;;;iCAgBiB,SAAS,aAAa,EAAE,aAAa,SAAS,YAAY,eAAe,EAAE;;;;;+BAO7E,SAAS,YAAY,eAAe,EAAE;;;;6BAGxC,MAAM,SAAS,MAAM;+BAEnB,MAAM,SAAS,MAAM;6BAEvB,MAAM,aAAa,SAAS,YAAY,eAAe,EAAE;;;;;kCAGpD,MAAM,WAAW,MAAM;;;;;4CAIb,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