@nivaro/react 0.1.232 → 0.1.234
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/full.css +1 -1
- package/dist/index.d.ts +54 -4
- package/dist/index.js +24859 -23880
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2317,10 +2317,13 @@ export declare function matchScopeDimension(scopes: UserScopesInfo | null, probe
|
|
|
2317
2317
|
collection?: string;
|
|
2318
2318
|
}): UserScopesInfo['dimensions'][number] | null;
|
|
2319
2319
|
|
|
2320
|
-
export declare function MatrixEditor({ config, initialScope }: {
|
|
2320
|
+
export declare function MatrixEditor({ config, initialScope, lockScope }: {
|
|
2321
2321
|
config: MatrixEditorConfig;
|
|
2322
2322
|
/** Pre-seed scope pickers (drill-down hosts scope the matrix to a record). */
|
|
2323
2323
|
initialScope?: Record<string, unknown>;
|
|
2324
|
+
/** Scope fields supplied by initialScope render as fixed context, not pickers
|
|
2325
|
+
* (a sheet already scoped to one project). */
|
|
2326
|
+
lockScope?: boolean;
|
|
2324
2327
|
}): JSX.Element;
|
|
2325
2328
|
|
|
2326
2329
|
declare interface MatrixEditorConfig {
|
|
@@ -2404,6 +2407,23 @@ declare interface MatrixEditorConfig {
|
|
|
2404
2407
|
label?: string;
|
|
2405
2408
|
format?: 'currency' | 'number';
|
|
2406
2409
|
}>;
|
|
2410
|
+
/** Computed columns over the row: `{{__current__}}` (saved value),
|
|
2411
|
+
* `{{__new__}}` (live value incl. the edit) and any metric field —
|
|
2412
|
+
* e.g. Remaining = `{{__new__}} - {{current_spend}} - {{committed_costs}}`.
|
|
2413
|
+
* Aggregated levels sum the inputs first, then apply the formula. */
|
|
2414
|
+
derived?: Array<{
|
|
2415
|
+
label: string;
|
|
2416
|
+
formula: string;
|
|
2417
|
+
format?: 'currency' | 'number';
|
|
2418
|
+
}>;
|
|
2419
|
+
/** Metric rows that match no rendered cell still count: shown read-only as
|
|
2420
|
+
* an "Other …" row per group (options outside the project's list) and an
|
|
2421
|
+
* "Other …" group (groups outside the project's list), so the totals
|
|
2422
|
+
* reconcile with the project-level figures. */
|
|
2423
|
+
unmatched?: {
|
|
2424
|
+
option_label?: string;
|
|
2425
|
+
group_label?: string;
|
|
2426
|
+
} | false;
|
|
2407
2427
|
};
|
|
2408
2428
|
}
|
|
2409
2429
|
|
|
@@ -2938,9 +2958,16 @@ declare interface QuerySheetDef {
|
|
|
2938
2958
|
title?: string;
|
|
2939
2959
|
width?: number | string;
|
|
2940
2960
|
config?: QueryWidgetConfig;
|
|
2961
|
+
/** A tab is a nested query view OR a MatrixEditor (`matrix`): its scope is
|
|
2962
|
+
* seeded from the clicked row — `scope: {project: '$row.id'}` — and those
|
|
2963
|
+
* fields render as fixed context, not pickers. */
|
|
2941
2964
|
tabs?: Array<{
|
|
2942
2965
|
label: string;
|
|
2943
|
-
config
|
|
2966
|
+
config?: QueryWidgetConfig;
|
|
2967
|
+
matrix?: {
|
|
2968
|
+
config: MatrixEditorConfig;
|
|
2969
|
+
scope: Record<string, string>;
|
|
2970
|
+
};
|
|
2944
2971
|
}>;
|
|
2945
2972
|
}
|
|
2946
2973
|
|
|
@@ -2989,9 +3016,14 @@ declare interface QueryTableColumn {
|
|
|
2989
3016
|
* alternating groups get a faint band so wide grids stay scannable. */
|
|
2990
3017
|
group?: string;
|
|
2991
3018
|
/** Cell text color (any CSS color) — EFP forecast/actual column tinting.
|
|
2992
|
-
* color_dark overrides in dark mode (defaults to color).
|
|
3019
|
+
* color_dark overrides in dark mode (defaults to color). Either may be a
|
|
3020
|
+
* role name — accent | ink | muted | positive | negative | warning | info —
|
|
3021
|
+
* instead of a hex; roles follow the host theme (see COLOR_ROLES). */
|
|
2993
3022
|
color?: string;
|
|
2994
3023
|
color_dark?: string;
|
|
3024
|
+
/** Colour (role or hex) used instead of `color` when the cell's value is
|
|
3025
|
+
* negative — a Remaining Budget column reads green until it goes red. */
|
|
3026
|
+
color_negative?: string;
|
|
2995
3027
|
/** Second field rendered as a stacked line under the main value in the SAME
|
|
2996
3028
|
* cell (EFP month cells: Fcst over Act — halves the column count). Toggles
|
|
2997
3029
|
* hide individual lines; the column collapses when both lines hide. */
|
|
@@ -3166,7 +3198,8 @@ declare interface QueryWidgetStat {
|
|
|
3166
3198
|
* render with a leading '+'. */
|
|
3167
3199
|
field_subtract?: string;
|
|
3168
3200
|
/** EFP stat-card accent: colored top border + value (accent_dark in dark
|
|
3169
|
-
* mode; accent_negative when a delta goes negative).
|
|
3201
|
+
* mode; accent_negative when a delta goes negative). Each may be a role name
|
|
3202
|
+
* — accent | positive | negative | info … — see QueryTable COLOR_ROLES. */
|
|
3170
3203
|
accent?: string;
|
|
3171
3204
|
accent_dark?: string;
|
|
3172
3205
|
accent_negative?: string;
|
|
@@ -3382,6 +3415,11 @@ export declare interface ReadViewLayout {
|
|
|
3382
3415
|
layout: {
|
|
3383
3416
|
id: number;
|
|
3384
3417
|
name: string;
|
|
3418
|
+
/** Identity band rendered above the cards (first entry = the title). */
|
|
3419
|
+
header_fields?: string[] | null;
|
|
3420
|
+
/** Collapse empty values instead of rendering "—" walls. */
|
|
3421
|
+
hide_empty?: boolean | number | null;
|
|
3422
|
+
sheet_width?: number | null;
|
|
3385
3423
|
};
|
|
3386
3424
|
groups: LayoutGroup[];
|
|
3387
3425
|
assignments: LayoutAssignment[];
|
|
@@ -3431,6 +3469,14 @@ export declare function RecordGridEditor({ config }: {
|
|
|
3431
3469
|
declare interface RecordGridEditorConfig {
|
|
3432
3470
|
collection: string;
|
|
3433
3471
|
title?: string;
|
|
3472
|
+
/**
|
|
3473
|
+
* BROWSE-THEN-EDIT: the key columns become header pickers. Until every key
|
|
3474
|
+
* is chosen the grid shows read-only totals rolled up by the unpicked keys
|
|
3475
|
+
* (click a rollup to drill into it); once all keys are chosen the matching
|
|
3476
|
+
* row(s) edit inline and a missing row can be created. Month values render
|
|
3477
|
+
* formatted (thousands separators) until focused.
|
|
3478
|
+
*/
|
|
3479
|
+
browse?: boolean;
|
|
3434
3480
|
/** Scope pickers: every field must be chosen before rows load; values filter
|
|
3435
3481
|
* loaded rows and seed created rows. `filter` supports '$scope.<field>'
|
|
3436
3482
|
* tokens off the other scope values. */
|
|
@@ -3676,6 +3722,10 @@ declare interface ReviewListColumnSpec {
|
|
|
3676
3722
|
}
|
|
3677
3723
|
|
|
3678
3724
|
declare interface ReviewListConfig {
|
|
3725
|
+
/** Sibling mode — see the server config: rows share the host's value. */
|
|
3726
|
+
sibling_field?: string | null;
|
|
3727
|
+
/** POST {ids} → {rows: {[id]: ReviewListEnrichRow}} — verdict chips + per-row act permission. */
|
|
3728
|
+
enrich_endpoint?: string | null;
|
|
3679
3729
|
host_collection: string;
|
|
3680
3730
|
collection: string;
|
|
3681
3731
|
path: Array<{
|