@nivaro/react 0.3.14 → 0.3.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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +127 -6
- package/dist/index.js +736 -734
- package/dist/shared/components/CollectionBrowserView.js +2316 -2281
- package/dist/shared/components/ItemEditForm.js +3773 -3604
- package/dist/shared/components/RecordGridEditor.js +319 -282
- package/dist/shared/components/RecordReadView.js +202 -200
- package/dist/shared/components/cbv/unknown-fields.js +18 -8
- package/dist/shared/components/import/DocumentAutofillButton.js +148 -142
- package/dist/shared/components/item-edit/CatalogPickerField.js +264 -276
- package/dist/shared/components/item-edit/FieldRenderer.js +136 -133
- package/dist/shared/components/item-edit/FieldRow.js +198 -184
- package/dist/shared/components/item-edit/HeaderTools.js +107 -99
- package/dist/shared/components/item-edit/InlineTableField.js +138 -136
- package/dist/shared/components/item-edit/RecordLiveSync.js +1 -0
- package/dist/shared/components/item-edit/RelationCombobox.js +30 -23
- package/dist/shared/components/item-edit/SummaryPanel.js +334 -294
- package/dist/shared/components/item-edit/column-length.js +12 -0
- package/dist/shared/components/panels/AccessDeniedPanel.js +47 -37
- package/dist/shared/components/panels/ItemLockBanner.js +307 -285
- package/dist/shared/components/panels/PipelinePanel.js +486 -465
- package/dist/shared/components/panels/RevisionsPanel.js +210 -204
- package/dist/shared/components/profile/DelegationCard.js +178 -121
- package/dist/shared/components/profile/PersonActivity.js +152 -139
- package/dist/shared/components/queue/QueueWorklist.js +668 -659
- package/dist/shared/components/queue/transition-note.js +90 -0
- package/dist/shared/components/support/SupportRequestDialog.js +100 -89
- package/dist/shared/components/support/TicketDetailSheet.js +104 -91
- package/dist/shared/lib/autofill-runs.js +33 -26
- package/dist/shared/lib/draft-store.js +40 -24
- package/dist/shared/lib/live-queries.js +10 -9
- package/dist/shared/lib/restore-skipped.js +10 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { noteReplayEvent as _e, createReplayCheckoutState as De } from "../share
|
|
|
9
9
|
import { emitReplayTap as Te, setReplayRecorderMode as N, registerReplayCapture as qe, clipEndOffset as Le, withClipKind as Pe } from "../shared/lib/replay-capture.js";
|
|
10
10
|
import { instrumentConsole as Ne, instrumentRequests as Fe, redactSecrets as Me } from "../shared/lib/replay-context.js";
|
|
11
11
|
import { instrumentSocket as Oe } from "../shared/lib/replay-socket.js";
|
|
12
|
-
const Ue = "nivaro-react@0.3.
|
|
12
|
+
const Ue = "nivaro-react@0.3.16", j = 1e4, We = 150, He = 3e3, Ke = 600, $e = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
13
13
|
function Be(n) {
|
|
14
14
|
return typeof n.url != "string" || typeof fetch != "function" ? null : (f, a) => {
|
|
15
15
|
const u = typeof n.getToken == "function" ? n.getToken() : void 0, d = { "Content-Type": "application/json" };
|
package/dist/index.d.ts
CHANGED
|
@@ -183,7 +183,124 @@ export declare function AiMemorySuggestions({ suggestions, className }: {
|
|
|
183
183
|
className?: string;
|
|
184
184
|
}): JSX.Element | null;
|
|
185
185
|
|
|
186
|
-
declare
|
|
186
|
+
export declare interface AiPlan {
|
|
187
|
+
plan_id: string;
|
|
188
|
+
title: string;
|
|
189
|
+
status: AiPlanStatus;
|
|
190
|
+
steps: AiPlanStep[];
|
|
191
|
+
records_changed: number;
|
|
192
|
+
rechecked_at?: string | null;
|
|
193
|
+
impact?: AiPlanImpact | null;
|
|
194
|
+
schedule?: {
|
|
195
|
+
run_at: string;
|
|
196
|
+
by: string;
|
|
197
|
+
at: string;
|
|
198
|
+
} | null;
|
|
199
|
+
held?: {
|
|
200
|
+
at: string;
|
|
201
|
+
reason: string;
|
|
202
|
+
} | null;
|
|
203
|
+
approved_by?: string | null;
|
|
204
|
+
approved_at?: string | null;
|
|
205
|
+
template?: {
|
|
206
|
+
key: string;
|
|
207
|
+
label: string;
|
|
208
|
+
} | null;
|
|
209
|
+
source?: {
|
|
210
|
+
kind: string;
|
|
211
|
+
label: string;
|
|
212
|
+
} | null;
|
|
213
|
+
flow_id?: string | null;
|
|
214
|
+
made_steps?: string[];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export declare function AiPlanCard({ plan: initial, subscribe, className, beforeSteps, stepExtra, extraActions, runDisabled, onPlan, quiet, stepChanges }: {
|
|
218
|
+
plan: AiPlan;
|
|
219
|
+
/** The host's socket — `ai:plan` events for this person. Optional: the
|
|
220
|
+
* card polls while a plan runs either way. */
|
|
221
|
+
subscribe?: AiPlanSubscribe;
|
|
222
|
+
className?: string;
|
|
223
|
+
/** Rendered between the title and the steps (a review strip, #2863). */
|
|
224
|
+
beforeSteps?: React_2.ReactNode;
|
|
225
|
+
/** Rendered under a step (edit controls, per-step impact). */
|
|
226
|
+
stepExtra?: (step: AiPlanStep, plan: AiPlan) => React_2.ReactNode;
|
|
227
|
+
/** Rendered in the actions row (after the engine's own buttons). */
|
|
228
|
+
extraActions?: (plan: AiPlan) => React_2.ReactNode;
|
|
229
|
+
/** Why approve / run is withheld (a second approval pending) — shown in place of the buttons. */
|
|
230
|
+
runDisabled?: string | null;
|
|
231
|
+
/** Every plan change the card sees (events, polls, actions). */
|
|
232
|
+
onPlan?: (plan: AiPlan) => void;
|
|
233
|
+
/** Neutral surface for hosts where the plan is the whole panel. */
|
|
234
|
+
quiet?: boolean;
|
|
235
|
+
/** Replaces a step's "field → value" lines (a host that knows the old values). */
|
|
236
|
+
stepChanges?: (step: AiPlanStep) => React_2.ReactNode | undefined;
|
|
237
|
+
}): React_2.JSX.Element;
|
|
238
|
+
|
|
239
|
+
declare interface AiPlanImpact {
|
|
240
|
+
records: number;
|
|
241
|
+
summary: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* An Ask AI multi-step plan (#1807) — the numbered steps the model proposed,
|
|
246
|
+
* each with its preview, approved together ("Run all") or one at a time
|
|
247
|
+
* ("Run next step"). While it runs every step's state arrives live over the
|
|
248
|
+
* host's socket (`ai:plan`, #2007) with a running count of records changed;
|
|
249
|
+
* the card also re-reads the plan from the server on mount and every few
|
|
250
|
+
* seconds while it runs, so a missed event never leaves it wrong. A failed
|
|
251
|
+
* plan offers "Re-check and retry" (#1902): the server rebuilds the failed
|
|
252
|
+
* and remaining steps as the person now, the card shows what changed, and
|
|
253
|
+
* the person runs it again from where it stopped. Steps with a condition
|
|
254
|
+
* (#1953) say so, and a skipped step names why.
|
|
255
|
+
*
|
|
256
|
+
* Wave 2: the impact line (#1900) under the title, "What changes" — the
|
|
257
|
+
* per-record change report with an Excel download (#2002), and "Run later"
|
|
258
|
+
* (#1903): approving for a set time; a scheduled plan whose records changed
|
|
259
|
+
* comes back here held, with the reason.
|
|
260
|
+
*/
|
|
261
|
+
declare type AiPlanStatus = 'proposed' | 'scheduled' | 'running' | 'paused' | 'executed' | 'failed' | 'rejected' | 'expired';
|
|
262
|
+
|
|
263
|
+
declare interface AiPlanStep {
|
|
264
|
+
id: string;
|
|
265
|
+
n: number;
|
|
266
|
+
kind: string;
|
|
267
|
+
kind_label: string;
|
|
268
|
+
title: string;
|
|
269
|
+
preview: {
|
|
270
|
+
summary?: string;
|
|
271
|
+
count?: number;
|
|
272
|
+
changes?: Record<string, unknown> | null;
|
|
273
|
+
sample?: Array<{
|
|
274
|
+
id: string;
|
|
275
|
+
label: string;
|
|
276
|
+
}>;
|
|
277
|
+
recipients?: Array<{
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
}>;
|
|
281
|
+
[key: string]: unknown;
|
|
282
|
+
};
|
|
283
|
+
condition: string | null;
|
|
284
|
+
state: AiPlanStepState;
|
|
285
|
+
preview_changed?: boolean;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare interface AiPlanStepState {
|
|
289
|
+
id: string;
|
|
290
|
+
status: 'pending' | 'running' | 'done' | 'failed' | 'skipped' | 'cancelled';
|
|
291
|
+
records_changed: number;
|
|
292
|
+
result?: Record<string, unknown> | null;
|
|
293
|
+
error?: string | null;
|
|
294
|
+
skip_reason?: string | null;
|
|
295
|
+
skipped_records?: Array<{
|
|
296
|
+
id: string;
|
|
297
|
+
label?: string;
|
|
298
|
+
reason: string;
|
|
299
|
+
}>;
|
|
300
|
+
attempts: number;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export declare type AiPlanSubscribe = (event: 'ai:plan', handler: (payload: Record<string, unknown>) => void) => () => void;
|
|
187
304
|
|
|
188
305
|
export declare function AiReviewCard({ templateId }: {
|
|
189
306
|
templateId: string;
|
|
@@ -1638,6 +1755,9 @@ declare interface CloneDialogProps {
|
|
|
1638
1755
|
declare interface CMSField {
|
|
1639
1756
|
field: string;
|
|
1640
1757
|
type: string;
|
|
1758
|
+
/** The column's character limit for text columns (field-config), null for
|
|
1759
|
+
* (max) / non-text. Optional: older servers do not send it. */
|
|
1760
|
+
max_length?: number | null;
|
|
1641
1761
|
interface: string | null;
|
|
1642
1762
|
label: string | null;
|
|
1643
1763
|
required: boolean;
|
|
@@ -4943,6 +5063,9 @@ export declare interface ItemEditFormProps {
|
|
|
4943
5063
|
values: Record<string, unknown>;
|
|
4944
5064
|
links: Record<string, unknown[]>;
|
|
4945
5065
|
rows: Record<string, Array<Record<string, unknown>>>;
|
|
5066
|
+
/** The form the source record opened in — the copy should open in it
|
|
5067
|
+
* too, not the collection's default. */
|
|
5068
|
+
layout_slug?: string | null;
|
|
4946
5069
|
}) => void;
|
|
4947
5070
|
showRevisions?: boolean;
|
|
4948
5071
|
showClone?: boolean;
|
|
@@ -8055,6 +8178,9 @@ declare interface RecordGridEditorConfig {
|
|
|
8055
8178
|
}>;
|
|
8056
8179
|
allow_add?: boolean;
|
|
8057
8180
|
allow_delete?: boolean;
|
|
8181
|
+
/** Amounts may be negative (default: zero or more — a forecast is never
|
|
8182
|
+
* negative, the same rule the forecast worksheet applies). */
|
|
8183
|
+
allow_negative?: boolean;
|
|
8058
8184
|
/** Written on save as the sum of the FIRST month set's values. */
|
|
8059
8185
|
computed_total_field?: string;
|
|
8060
8186
|
/** Custom query run after a successful save — params support '$scope.<f>'. */
|
|
@@ -9413,11 +9539,6 @@ declare interface StaleChunkRecoveryOptions {
|
|
|
9413
9539
|
*/
|
|
9414
9540
|
export declare function startApiVersionWatch(fetchVersion: Fetcher): void;
|
|
9415
9541
|
|
|
9416
|
-
/**
|
|
9417
|
-
* Start watching a run (idempotent — a known id is left alone). Polls until
|
|
9418
|
-
* the proposal lands or fails; the run stays in the store until it is
|
|
9419
|
-
* dismissed or its proposal is consumed by a form.
|
|
9420
|
-
*/
|
|
9421
9542
|
export declare function startAutofillRun(cfg: FetchCfg, run: {
|
|
9422
9543
|
id: string;
|
|
9423
9544
|
collection: string;
|