@gravitee/gamma-lib-observability 3.1.1-feat-obs-86-datatable-widget.b8d8a35 → 3.1.1-feat-obs-86-datatable-widget.868d62a

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
 
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsTable.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/AnalyticsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAe5D,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAIjC,qEAAqE;AACrE,eAAO,MAAM,cAAc,eAAe,CAAC;AAI3C,wBAAgB,WAAW,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAE3D;AAgED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC5C,8CAA8C;IAC9C,QAAQ,CAAC,cAAc,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;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,SAAS,CAAC;IACxE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,IAAI,EACJ,cAAc,EACd,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAkB,EAClB,WAAe,EACf,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,YAAyC,GAC1C,EAAE,mBAAmB,2CAsMrB"}
@@ -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,20 +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
9
  * Editor for a table's columns.
10
10
  *
11
11
  * A row is deliberately quiet: metric, measure, label, then a read-only
12
- * summary of everything else (share, pin, alert tiers) and two controls that
12
+ * summary of everything else (share, pin, thresholds) and two controls that
13
13
  * need no explaining, an overflow menu and a chevron. Everything the summary
14
14
  * describes is set in the row that opens underneath, with named switches
15
15
  * rather than icons to decode. One row is open at a time.
16
16
  *
17
- * Reordering lives in the menu rather than as arrows on every row: the order
18
- * is the collapse order (the last column is the first to go), which an author
19
- * sets once, not something to nudge in passing.
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.
20
24
  */
21
25
  export declare function TableColumnsEditor({ columns, onChange }: TableColumnsEditorProps): import("react/jsx-runtime").JSX.Element;
22
26
  //# sourceMappingURL=TableColumnsEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumnsEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableColumnsEditor.tsx"],"names":[],"mappings":"AA+BA,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;AAmBD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAS9E;AAeD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAyShF"}
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":"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,2CAqF3E"}
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":"WidgetEditorPanel.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetEditorPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,E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