@nivaro/react 0.3.10 → 0.3.11
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/hooks/useNivaroForm.js +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +34 -3
- package/dist/shared/components/CollectionBrowserView.js +1546 -1477
- package/dist/shared/components/ItemEditForm.js +4332 -4195
- package/dist/shared/components/PageRenderer.js +512 -465
- package/dist/shared/components/QueryStatStrip.js +74 -70
- package/dist/shared/components/ReportView.js +818 -827
- package/dist/shared/components/SheetHeaderBody.js +16 -14
- package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
- package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
- package/dist/shared/components/item-edit/FieldRow.js +20 -19
- package/dist/shared/components/item-edit/FilePickerField.js +52 -40
- package/dist/shared/components/item-edit/GroupSection.js +221 -221
- package/dist/shared/components/item-edit/InlineGridField.js +41 -41
- package/dist/shared/components/item-edit/InlineTableField.js +2249 -2238
- package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
- package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
- package/dist/shared/components/item-edit/QuickPicker.js +263 -216
- package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
- package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
- package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
- package/dist/shared/components/item-edit/helpers.js +133 -134
- package/dist/shared/components/item-edit/line-qty.js +57 -0
- package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
- package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
- package/dist/shared/components/panels/CommentPanel.js +350 -315
- package/dist/shared/components/panels/ItemLockBanner.js +297 -230
- package/dist/shared/components/panels/PipelinePanel.js +719 -701
- package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
- package/dist/shared/components/queue/QueueWorklist.js +1005 -935
- package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
- package/dist/shared/lib/obligation-banner.js +14 -13
- package/dist/shared/lib/obligation-reason-text.js +13 -0
- package/dist/shared/lib/query-filter-seed.js +34 -11
- package/dist/shared/lib/sanitize-html.js +24 -15
- package/dist/shared/lib/sheet-def.js +38 -22
- package/dist/shared/lib/unique-options.js +10 -0
- package/dist/shared/lib/utils.js +57 -43
- package/dist/shared/lib/validation-rules.js +58 -34
- package/package.json +1 -1
|
@@ -197,7 +197,7 @@ function ke(r, c, l) {
|
|
|
197
197
|
e.required && ye(s) && (t[e.field] == null && (t[e.field] = []), t[e.field].push(`${e.label} is required`));
|
|
198
198
|
for (const i of e.validationRules ?? []) {
|
|
199
199
|
if (i.soft) continue;
|
|
200
|
-
const m = pe(i, s, e.label);
|
|
200
|
+
const m = pe(i, s, e.label, f);
|
|
201
201
|
m && (t[e.field] == null && (t[e.field] = []), t[e.field].push(m));
|
|
202
202
|
}
|
|
203
203
|
const n = F == null ? void 0 : F[e.field];
|
|
@@ -8,7 +8,7 @@ import { normalizeReplaySampling as x, replaySampleDraw as Ie, currentReplayRout
|
|
|
8
8
|
import { emitReplayTap as _e, setReplayRecorderMode as N, registerReplayCapture as De, clipEndOffset as qe, withClipKind as Le } from "../shared/lib/replay-capture.js";
|
|
9
9
|
import { instrumentConsole as Te, instrumentRequests as Pe, redactSecrets as Ne } from "../shared/lib/replay-context.js";
|
|
10
10
|
import { instrumentSocket as Me } from "../shared/lib/replay-socket.js";
|
|
11
|
-
const Oe = "nivaro-react@0.3.
|
|
11
|
+
const Oe = "nivaro-react@0.3.11", j = 1e4, Ue = 150, We = 3e3, Fe = 600, He = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
12
12
|
function Ke(n) {
|
|
13
13
|
return typeof n.url != "string" || typeof fetch != "function" ? null : (f, a) => {
|
|
14
14
|
const u = typeof n.getToken == "function" ? n.getToken() : void 0, d = { "Content-Type": "application/json" };
|
package/dist/index.d.ts
CHANGED
|
@@ -4924,6 +4924,9 @@ export declare interface ItemEditFormProps {
|
|
|
4924
4924
|
/** false = skip the document.title side effect — a workspace-tab host keeps
|
|
4925
4925
|
* several forms mounted and only the ACTIVE one may own the browser tab. */
|
|
4926
4926
|
documentTitle?: boolean;
|
|
4927
|
+
/** false = mounted but not on screen (a background workspace tab): the form
|
|
4928
|
+
* lets its edit lock go after a while and takes it back when shown. */
|
|
4929
|
+
active?: boolean;
|
|
4927
4930
|
/** Hands the host a stable save trigger (workspace "Save all"); called with
|
|
4928
4931
|
* null on unmount. The trigger runs the same handleSave the button does —
|
|
4929
4932
|
* validation and dialogs included. */
|
|
@@ -5563,6 +5566,9 @@ declare interface LockHolder {
|
|
|
5563
5566
|
note?: string | null;
|
|
5564
5567
|
/** Minutes since the holder last did anything (presence), when known. */
|
|
5565
5568
|
idle_minutes?: number | null;
|
|
5569
|
+
/** Whether THIS viewer may force-take the lock (server verdict; absent =
|
|
5570
|
+
* unknown, the button shows and the server's 403 explains). */
|
|
5571
|
+
may_take_over?: boolean;
|
|
5566
5572
|
}
|
|
5567
5573
|
|
|
5568
5574
|
declare interface LockQueueEntry {
|
|
@@ -7255,6 +7261,8 @@ declare interface QuerySheetDef {
|
|
|
7255
7261
|
stats: QueryWidgetStat[];
|
|
7256
7262
|
/** "As of" line under the tiles: label + the latest value of field. */
|
|
7257
7263
|
as_of?: SheetHeaderAsOf;
|
|
7264
|
+
/** What the tiles cover, under them ("Project lifetime"); `{{param}}` tokens. */
|
|
7265
|
+
note?: string;
|
|
7258
7266
|
};
|
|
7259
7267
|
/** Zero-based tab to open first (clamped into range). */
|
|
7260
7268
|
initial_tab?: number;
|
|
@@ -7263,6 +7271,8 @@ declare interface QuerySheetDef {
|
|
|
7263
7271
|
* fields render as fixed context, not pickers. */
|
|
7264
7272
|
tabs?: Array<{
|
|
7265
7273
|
label: string;
|
|
7274
|
+
/** What the tab's view covers, above it ("Spend dated in {{funding_years}}"). */
|
|
7275
|
+
note?: string;
|
|
7266
7276
|
config?: QueryWidgetConfig;
|
|
7267
7277
|
matrix?: {
|
|
7268
7278
|
config: MatrixEditorConfig;
|
|
@@ -7486,8 +7496,13 @@ declare type QueryWidgetFilter = {
|
|
|
7486
7496
|
/** Query-string key that pre-selects this filter when the page URL carries
|
|
7487
7497
|
* it (`?fy=2026`, a comma list for several values, compared on
|
|
7488
7498
|
* value_field). Beats default_values and the user-scope seeding; when the
|
|
7489
|
-
* URL lacks it, those apply as before.
|
|
7499
|
+
* URL lacks it, those apply as before. A change made on the page is
|
|
7500
|
+
* written back to the address (an emptied filter as `?fy=`, "All"), so a
|
|
7501
|
+
* reload or a shared link keeps it. */
|
|
7490
7502
|
url_param?: string;
|
|
7503
|
+
/** One value at a time: picking another replaces it (a per-year query that
|
|
7504
|
+
* would silently sum two years). */
|
|
7505
|
+
single?: boolean;
|
|
7491
7506
|
};
|
|
7492
7507
|
|
|
7493
7508
|
declare interface QueryWidgetStat {
|
|
@@ -7535,6 +7550,12 @@ declare interface QueryWidgetStat {
|
|
|
7535
7550
|
* the table the number covers; when NO row does, the tile shows its
|
|
7536
7551
|
* empty_label instead of a summed zero. */
|
|
7537
7552
|
coverage?: string;
|
|
7553
|
+
/** A context tile that only means something when the main rows carry this
|
|
7554
|
+
* field — e.g. "Fusion figures as of" over rows whose fusion_synced_at is
|
|
7555
|
+
* null: when no row has a value, the tile shows `requires_label` instead
|
|
7556
|
+
* of its own value (an import date over all-empty Fusion columns misleads). */
|
|
7557
|
+
requires_field?: string;
|
|
7558
|
+
requires_label?: string;
|
|
7538
7559
|
}
|
|
7539
7560
|
|
|
7540
7561
|
/** The full query-widget surface (filters, stats, table, row actions, drill
|
|
@@ -8565,7 +8586,8 @@ declare interface ReviewListConfig {
|
|
|
8565
8586
|
empty_color?: string | null;
|
|
8566
8587
|
stamp_user_field?: string | null;
|
|
8567
8588
|
stamp_date_field?: string | null;
|
|
8568
|
-
/** POST this endpoint with {ids, status, note, workflow_id}
|
|
8589
|
+
/** POST this endpoint with {ids, status, note, workflow_id, expected}
|
|
8590
|
+
* (`expected` = each row's status as the list showed it) instead of
|
|
8569
8591
|
* per-row PATCHes — lets a deployment route decisions through an
|
|
8570
8592
|
* endpoint that owns stamping, authorization, notes and notifications
|
|
8571
8593
|
* (e.g. an extension's /decide route). */
|
|
@@ -10321,7 +10343,15 @@ export declare function useIsRecordingSelf(userId: string | number | null | unde
|
|
|
10321
10343
|
|
|
10322
10344
|
export declare function useItemEditAuth(): ItemEditAuthContextValue;
|
|
10323
10345
|
|
|
10324
|
-
export declare function useItemLock(collection: string | undefined, item: string | undefined, enabled: boolean
|
|
10346
|
+
export declare function useItemLock(collection: string | undefined, item: string | undefined, enabled: boolean, opts?: {
|
|
10347
|
+
/** Take the lock on the first real edit (`claim`), not on open — opening
|
|
10348
|
+
* a record only learns whether someone else holds it. A reader who never
|
|
10349
|
+
* edits (an approver re-opening what they sent back) never blocks the
|
|
10350
|
+
* person who has to fix it. */
|
|
10351
|
+
lazy?: boolean;
|
|
10352
|
+
/** False = mounted but not on screen (a background workspace tab). */
|
|
10353
|
+
active?: boolean;
|
|
10354
|
+
}): {
|
|
10325
10355
|
lockHolder: LockHolder | null;
|
|
10326
10356
|
acquired: boolean;
|
|
10327
10357
|
isReadOnly: boolean;
|
|
@@ -10341,6 +10371,7 @@ export declare function useItemLock(collection: string | undefined, item: string
|
|
|
10341
10371
|
releasing: boolean;
|
|
10342
10372
|
released: boolean;
|
|
10343
10373
|
relock: () => Promise<boolean>;
|
|
10374
|
+
claim: () => Promise<void>;
|
|
10344
10375
|
};
|
|
10345
10376
|
|
|
10346
10377
|
/** Resolved item-link helpers honoring the host's itemUrl/openItem overrides. */
|