@nivaro/react 0.2.15 → 0.2.16

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/dist/index.d.ts CHANGED
@@ -5041,6 +5041,9 @@ declare interface QuerySheetDef {
5041
5041
  }>;
5042
5042
  }
5043
5043
 
5044
+ /** How a stat tile renders its value. Default is currency (the historic shape). */
5045
+ declare type QueryStatFormat = 'currency' | 'number' | 'percent' | 'date' | 'text';
5046
+
5044
5047
  export declare function QueryStatStrip({ stats, rows, effectiveParams, loading }: {
5045
5048
  stats: QueryWidgetStat[];
5046
5049
  rows: Array<Record<string, unknown>>;
@@ -5105,6 +5108,11 @@ declare interface QueryTableColumn {
5105
5108
  sparkline_fields?: string[];
5106
5109
  /** Percent-of-total (#249): append this row's share of the column sum. */
5107
5110
  percent_of_total?: boolean;
5111
+ /** What a cell with NO value shows ('—' by default). '' leaves it blank —
5112
+ * with zero_dash on, a dash then means zero and a blank means no figure. */
5113
+ empty_label?: string;
5114
+ /** Cap a long text column (px); the full text shows on hover. */
5115
+ max_width?: number;
5108
5116
  }
5109
5117
 
5110
5118
  declare interface QueryTableConfig {
@@ -5252,7 +5260,7 @@ declare interface QueryWidgetStat {
5252
5260
  label: string;
5253
5261
  /** Sum this field over the main query's rows. */
5254
5262
  field?: string;
5255
- format?: 'currency' | 'number';
5263
+ format?: QueryStatFormat;
5256
5264
  /** Hover breakdown: each entry summed over the same rows. */
5257
5265
  details?: Array<{
5258
5266
  label: string;
@@ -5277,12 +5285,22 @@ declare interface QueryWidgetStat {
5277
5285
  /** Delta stat: value = sum(field) − sum(field_subtract); positive values
5278
5286
  * render with a leading '+'. */
5279
5287
  field_subtract?: string;
5288
+ /** `{{field}}` arithmetic over the summed fields — a weighted ratio of totals
5289
+ * such as `{{spent}} / {{budget}} * 100`. */
5290
+ formula?: string;
5291
+ /** Shown when the value is null ('—' by default), e.g. 'never imported'. */
5292
+ empty_label?: string;
5280
5293
  /** Stat-card accent: colored top border + value (accent_dark in dark
5281
5294
  * mode; accent_negative when a delta goes negative). Each may be a role name
5282
5295
  * — accent | positive | negative | info … — see QueryTable COLOR_ROLES. */
5283
5296
  accent?: string;
5284
5297
  accent_dark?: string;
5285
5298
  accent_negative?: string;
5299
+ /** What one table row is ('projects'). When set and only some rows carry a
5300
+ * figure for this tile, a quiet "3 of 912 projects" line says how much of
5301
+ * the table the number covers; when NO row does, the tile shows its
5302
+ * empty_label instead of a summed zero. */
5303
+ coverage?: string;
5286
5304
  }
5287
5305
 
5288
5306
  /** The full query-widget surface (filters, stats, table, row actions, drill