@nivaro/react 0.2.14 → 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
@@ -1074,6 +1074,17 @@ declare interface CMSRelation {
1074
1074
  one_allowed_collections?: string | null;
1075
1075
  }
1076
1076
 
1077
+ declare interface CoalescingOptions {
1078
+ /**
1079
+ * #1304: record reads (`GET /items/<c>` and `GET /items/<c>/<id>`) fired in
1080
+ * the same tick ride ONE `POST /items/batch-read`. Off by default — a host
1081
+ * opts in. A read the batch could not answer with 200 (or a batch that fails
1082
+ * as a whole) is re-sent on its own, so callers see exactly the response or
1083
+ * error they would have seen without batching. Writes never batch.
1084
+ */
1085
+ batchReads?: boolean;
1086
+ }
1087
+
1077
1088
  /** @deprecated Column model changed to plain field keys — kept for source
1078
1089
  * compatibility with early adopters; maps `path` to a field key. */
1079
1090
  export declare interface CollectionBrowserColumn {
@@ -3956,9 +3967,14 @@ declare type NivaroFormProps = {
3956
3967
  style?: default_2.CSSProperties;
3957
3968
  };
3958
3969
 
3959
- export declare function NivaroProvider({ client, children }: {
3970
+ export declare function NivaroProvider({ client, children, batchReads }: {
3960
3971
  client: NivaroClient;
3961
3972
  children: React_2.ReactNode;
3973
+ /**
3974
+ * #1304: record reads fired in the same tick share one
3975
+ * `POST /items/batch-read`. Off by default; a host opts in.
3976
+ */
3977
+ batchReads?: boolean;
3962
3978
  }): React_2.JSX.Element;
3963
3979
 
3964
3980
  /**
@@ -4774,7 +4790,7 @@ declare type PipelineBinding = {
4774
4790
  dimensions?: PipelineOwnerDimension[];
4775
4791
  };
4776
4792
 
4777
- export declare type PipelineEditorSection = 'states' | 'transitions' | 'branches' | 'bindings' | 'matrix' | 'simulator' | 'canvas' | 'flow-map' | 'replay' | 'migration' | 'coverage' | 'ai-review' | 'versions';
4793
+ export declare type PipelineEditorSection = 'states' | 'transitions' | 'branches' | 'bindings' | 'matrix' | 'simulator' | 'canvas' | 'flow-map' | 'replay' | 'migration' | 'coverage' | 'lint' | 'skip-report' | 'ai-review' | 'versions' | 'matrix-versions';
4778
4794
 
4779
4795
  export declare function PipelineEditorView({ templateId, onBack, onExport, hidden }: {
4780
4796
  templateId: string;
@@ -5025,6 +5041,9 @@ declare interface QuerySheetDef {
5025
5041
  }>;
5026
5042
  }
5027
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
+
5028
5047
  export declare function QueryStatStrip({ stats, rows, effectiveParams, loading }: {
5029
5048
  stats: QueryWidgetStat[];
5030
5049
  rows: Array<Record<string, unknown>>;
@@ -5089,6 +5108,11 @@ declare interface QueryTableColumn {
5089
5108
  sparkline_fields?: string[];
5090
5109
  /** Percent-of-total (#249): append this row's share of the column sum. */
5091
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;
5092
5116
  }
5093
5117
 
5094
5118
  declare interface QueryTableConfig {
@@ -5236,7 +5260,7 @@ declare interface QueryWidgetStat {
5236
5260
  label: string;
5237
5261
  /** Sum this field over the main query's rows. */
5238
5262
  field?: string;
5239
- format?: 'currency' | 'number';
5263
+ format?: QueryStatFormat;
5240
5264
  /** Hover breakdown: each entry summed over the same rows. */
5241
5265
  details?: Array<{
5242
5266
  label: string;
@@ -5261,12 +5285,22 @@ declare interface QueryWidgetStat {
5261
5285
  /** Delta stat: value = sum(field) − sum(field_subtract); positive values
5262
5286
  * render with a leading '+'. */
5263
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;
5264
5293
  /** Stat-card accent: colored top border + value (accent_dark in dark
5265
5294
  * mode; accent_negative when a delta goes negative). Each may be a role name
5266
5295
  * — accent | positive | negative | info … — see QueryTable COLOR_ROLES. */
5267
5296
  accent?: string;
5268
5297
  accent_dark?: string;
5269
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;
5270
5304
  }
5271
5305
 
5272
5306
  /** The full query-widget surface (filters, stats, table, row actions, drill
@@ -6385,6 +6419,10 @@ declare type SkipLookupFilter = {
6385
6419
 
6386
6420
  declare type SkipOp = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'in' | 'notin';
6387
6421
 
6422
+ export declare function SkipReportCard({ templateId }: {
6423
+ templateId: string;
6424
+ }): JSX.Element;
6425
+
6388
6426
  export declare interface SlaRule {
6389
6427
  id: number;
6390
6428
  workflow_template: string;
@@ -6687,6 +6725,10 @@ export declare function TeamScopeEditor({ teamId, scopes, onSaved }: {
6687
6725
  */
6688
6726
  declare type TeamScopeMap = Record<string, Array<string | number>>;
6689
6727
 
6728
+ export declare function TeamSuggestionsPanel({ onApplied }: {
6729
+ onApplied: (teamId: number) => void;
6730
+ }): JSX.Element;
6731
+
6690
6732
  export declare function TeamsView({ canManage, compact, initialTeamId }: {
6691
6733
  /** Hide mutation controls for non-admin hosts (the server enforces anyway). */
6692
6734
  canManage?: boolean;
@@ -6697,6 +6739,10 @@ export declare function TeamsView({ canManage, compact, initialTeamId }: {
6697
6739
 
6698
6740
  declare type TeamTier = 'suggested' | 'unscoped' | 'out';
6699
6741
 
6742
+ export declare function TemplateLintCard({ templateId }: {
6743
+ templateId: string;
6744
+ }): JSX.Element;
6745
+
6700
6746
  export declare function TextareaField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
6701
6747
 
6702
6748
  export declare function TextField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
@@ -7525,7 +7571,7 @@ declare interface WidgetSlotProps {
7525
7571
  onContentChange?: (hasContent: boolean) => void;
7526
7572
  }
7527
7573
 
7528
- export declare function withGetCoalescing(client: NivaroClient): NivaroClient;
7574
+ export declare function withGetCoalescing(client: NivaroClient, opts?: CoalescingOptions): NivaroClient;
7529
7575
 
7530
7576
  export declare function WorkflowPanel({ collection, item }: {
7531
7577
  collection: string;