@gravitee/gamma-lib-observability 3.1.1-feat-obs-86-datatable-widget.f875020 → 3.1.1-feat-obs-86-datatable-widget.f0cae7e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/QUERYING.md CHANGED
@@ -270,8 +270,8 @@ filters and range. A column's id is `metric:measure` unless it declares an `id`;
270
270
  A threshold is an alert tier: `{ color, op, value, basis? }` paints the cell `color` (`red`, `amber`
271
271
  or `green`) when it crosses `value`, `op` being `gte` (at or above) or `lte` (at or below) and `basis`
272
272
  what is compared: the cell's own value (default) or its share of the column total in percent
273
- (`"basis": "share"`, which also triggers the measures request for the total). Several tiers may match
274
- one cell; red wins over amber, amber over green.
273
+ (`"basis": "share"`, which also triggers the measures request for the total). Thresholds are ordered rules: the first one a cell matches decides its colour, so the author's
274
+ order is the priority.
275
275
 
276
276
  ---
277
277
 
@@ -18,11 +18,12 @@ export declare function formatTableValue(value: number, options: FormatTableValu
18
18
  /** Formats a cell of a resolved column, or the placeholder when it has no value. */
19
19
  export declare function formatColumnValue(value: number | undefined, column: ResolvedTableColumn, density: TableDensity): string;
20
20
  /**
21
- * The colour a cell takes, or none. Every tier is evaluated against what it
22
- * asks for: the cell's value, or its share of the column total (a ratio here,
23
- * a percentage in the tier). The most severe matching colour wins, so a value
24
- * past both an amber and a red bound reads red whatever order the author
25
- * listed them in.
21
+ * The colour a cell takes, or none. Thresholds are ordered rules and **the
22
+ * first one that matches wins**, the way conditional formatting works in
23
+ * Datadog, Metabase or a spreadsheet: the author's order is the priority, and
24
+ * a later rule never overrides an earlier one. Each rule is checked against
25
+ * what it asks for: the cell's value, or its share of the column total (a
26
+ * ratio here, a percentage in the rule).
26
27
  */
27
28
  export declare function resolveThresholdColor(value: number | undefined, share: number | undefined, thresholds: readonly TableThreshold[]): TableTierColor | undefined;
28
29
  /** Design-system tokens, so both themes are covered without a theme branch. */
@@ -1 +1 @@
1
- {"version":3,"file":"format-table-value.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/format-table-value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,mFAAmF;AACnF,eAAO,MAAM,YAAY,WAAM,CAAC;AAuBhC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAkBxF;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,YAAY,GACpB,MAAM,CAOR;AAKD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,cAAc,GAAG,SAAS,CAY5B;AAED,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAI/D,CAAC"}
1
+ {"version":3,"file":"format-table-value.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/format-table-value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,mFAAmF;AACnF,eAAO,MAAM,YAAY,WAAM,CAAC;AAuBhC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAkBxF;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,YAAY,GACpB,MAAM,CAOR;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,cAAc,GAAG,SAAS,CAU5B;AAED,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAI/D,CAAC"}
@@ -3,19 +3,24 @@ export interface TableColumnsEditorProps {
3
3
  readonly columns: readonly TableColumn[];
4
4
  readonly onChange: (columns: TableColumn[]) => void;
5
5
  }
6
- /** The chip's text: the sign, the bound, and what it is a bound on. */
6
+ /** The pill's text: the sign, the bound, and what it is a bound on. */
7
7
  export declare function describeTier(tier: TableThreshold, column: TableColumn): string;
8
8
  /**
9
- * Editor for a table's columns: what each one measures, how it reads, when it
10
- * colours, and whether it survives a narrow widget.
9
+ * Editor for a table's columns.
11
10
  *
12
- * Alerts are tiers, each a colour and a bound, shown as chips on the row so a
13
- * column's alerts are readable without opening anything. Opening a chip edits
14
- * that one tier in a single line under the row; opening another closes it.
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.
15
16
  *
16
- * Reordering is up/down buttons rather than drag-and-drop, and not only to
17
- * avoid a dependency: the order is the collapse order, the last column is the
18
- * first to go, so it is a value the author sets deliberately.
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.
19
24
  */
20
25
  export declare function TableColumnsEditor({ columns, onChange }: TableColumnsEditorProps): import("react/jsx-runtime").JSX.Element;
21
26
  //# sourceMappingURL=TableColumnsEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumnsEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableColumnsEditor.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,WAAW,EAAqB,cAAc,EAAkB,MAAM,oBAAoB,CAAC;AA8BzG,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;AAgBD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAS9E;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAiShF"}
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 +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;;;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