@nivaro/react 0.3.99 → 0.3.101

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.
Files changed (60) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useFormSchema.js +82 -85
  3. package/dist/hooks/useSessionRecorder.js +206 -175
  4. package/dist/index.d.ts +84 -16
  5. package/dist/index.js +627 -622
  6. package/dist/lib/commands.js +15 -11
  7. package/dist/shared/components/ActivityEntry.js +5 -5
  8. package/dist/shared/components/CollectionBrowserView.js +516 -503
  9. package/dist/shared/components/ItemEditForm.js +3471 -3465
  10. package/dist/shared/components/JobsTray.js +76 -61
  11. package/dist/shared/components/MyWorkView.js +133 -126
  12. package/dist/shared/components/NotificationBell.js +322 -289
  13. package/dist/shared/components/RecordCompare.js +38 -40
  14. package/dist/shared/components/RecordReadView.js +119 -119
  15. package/dist/shared/components/TipLayer.js +56 -41
  16. package/dist/shared/components/cbv/FoundElsewhere.js +61 -0
  17. package/dist/shared/components/integrations/console/SignalCard.js +40 -40
  18. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +95 -73
  19. package/dist/shared/components/integrations/console/drill/status.js +23 -18
  20. package/dist/shared/components/item-edit/InlineGridField.js +45 -45
  21. package/dist/shared/components/item-edit/InlineTableField.js +750 -749
  22. package/dist/shared/components/item-edit/QuickPickerDialog.js +44 -44
  23. package/dist/shared/components/item-edit/RawEditSheet.js +122 -114
  24. package/dist/shared/components/item-edit/RecordInsights.js +86 -86
  25. package/dist/shared/components/item-edit/RelationCombobox.js +454 -378
  26. package/dist/shared/components/item-edit/SummaryPanel.js +56 -48
  27. package/dist/shared/components/item-edit/header-path-preview.js +46 -34
  28. package/dist/shared/components/item-edit/related-missing.js +75 -19
  29. package/dist/shared/components/notifications/DeliveryChips.js +1 -2
  30. package/dist/shared/components/notifications/NotificationCenterView.js +249 -226
  31. package/dist/shared/components/panels/AccessDeniedPanel.js +31 -28
  32. package/dist/shared/components/panels/BackgroundMove.js +242 -0
  33. package/dist/shared/components/panels/MoveAdvisory.js +204 -0
  34. package/dist/shared/components/panels/PipelinePanel.js +1459 -1220
  35. package/dist/shared/components/panels/RecordIntegrityBanner.js +113 -112
  36. package/dist/shared/components/profile/ActivityFeedCard.js +322 -0
  37. package/dist/shared/components/profile/DayTimeline.js +145 -140
  38. package/dist/shared/components/profile/PersonAccess.js +679 -383
  39. package/dist/shared/components/profile/PersonActivity.js +404 -427
  40. package/dist/shared/components/profile/PersonDidPanel.js +248 -134
  41. package/dist/shared/components/profile/PersonProfile.js +33 -32
  42. package/dist/shared/components/profile/journey-view.js +166 -0
  43. package/dist/shared/lib/activity-sentence.js +319 -236
  44. package/dist/shared/lib/commands.js +18 -14
  45. package/dist/shared/lib/error-hints.js +1 -1
  46. package/dist/shared/lib/job-failure-text.js +12 -0
  47. package/dist/shared/lib/jobs-tray.js +60 -41
  48. package/dist/shared/lib/move-failure.js +19 -0
  49. package/dist/shared/lib/obligation-banner.js +22 -21
  50. package/dist/shared/lib/partner-failure.js +83 -0
  51. package/dist/shared/lib/prefetch.js +73 -73
  52. package/dist/shared/lib/replay-checkout.js +18 -13
  53. package/dist/shared/lib/replay-context.js +90 -77
  54. package/dist/shared/lib/replay-idle.js +21 -0
  55. package/dist/shared/lib/replay-socket.js +21 -17
  56. package/dist/shared/lib/rum.js +56 -51
  57. package/dist/shared/lib/safe-error.js +17 -13
  58. package/dist/shared/lib/stale-chunk.js +69 -26
  59. package/dist/shared/lib/system-collections.js +20 -0
  60. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -267,6 +267,24 @@ declare interface ActivityGroup<T extends ActivityEntryInput = ActivityEntryInpu
267
267
  by: 'group_key' | 'time' | null;
268
268
  }
269
269
 
270
+ /**
271
+ * A link (junction) row in words: "Added Division Zone 2 to Workflow CM26-79704". The
272
+ * values come from the row as it was stored (the live row, else its newest revision
273
+ * snapshot), each name read as the reader (null = unknown or not theirs to see).
274
+ */
275
+ declare interface ActivityJunctionLabel {
276
+ /** The collection the link hangs off ("workflows"). */
277
+ parent_collection: string;
278
+ /** The parent record; null = not known (no row, no snapshot). Its label is in `records`. */
279
+ parent_id?: string | null;
280
+ /** One link's noun, singular ("Division", "file"). */
281
+ noun: string;
282
+ /** The linked record's name; null = unknown or not the reader's to see. */
283
+ value?: string | null;
284
+ /** The link is a file on the record. */
285
+ file?: boolean;
286
+ }
287
+
270
288
  /** What POST /api/activity/labels answers (plus the reader's time zone, if any). */
271
289
  export declare interface ActivityLabels {
272
290
  /** Person id (any case) → display name. */
@@ -284,6 +302,8 @@ export declare interface ActivityLabels {
284
302
  links?: Record<string, string>;
285
303
  /** IANA zone dates in values render in; unset = the runtime's own zone. */
286
304
  timeZone?: string | null;
305
+ /** `junction:id` → what a link row links, as the reader may see it. */
306
+ junctions?: Record<string, ActivityJunctionLabel>;
287
307
  }
288
308
 
289
309
  /** One child-row change as the server summarised it for this reader — labels, never ids. */
@@ -4205,10 +4225,13 @@ declare interface GridSumCapConfig {
4205
4225
  * Folds consecutive entries of one burst into one group. Entries sharing a
4206
4226
  * group_key always fold; entries without one fold when the same actor did the
4207
4227
  * same action on the same collection, each within `windowMs` of the previous
4208
- * (rows from before migration 516). Order is kept; singles are groups of one.
4228
+ * (rows from before migration 516). With `labels`, the link rows one write made on one
4229
+ * record (removed Division, added Division, …) fold too, whatever their action. Order is
4230
+ * kept; singles are groups of one.
4209
4231
  */
4210
4232
  export declare function groupActivity<T extends ActivityEntryInput>(entries: T[], opts?: {
4211
4233
  windowMs?: number;
4234
+ labels?: ActivityLabels | null;
4212
4235
  }): ActivityGroup<T>[];
4213
4236
 
4214
4237
  /**
@@ -4230,6 +4253,22 @@ export declare function guardErrorToasts(target?: {
4230
4253
  */
4231
4254
  export declare function guardIdentityCall<T>(call: () => Promise<T>, blocked: () => T | Promise<T>): Promise<T>;
4232
4255
 
4256
+ /**
4257
+ * Wrap the loader of a lazily shown screen (`React.lazy(guardLazyImport(load, Notice))`).
4258
+ *
4259
+ * A chunk that cannot be fetched, or that loads without the screen it should export, means
4260
+ * this tab runs a build the server no longer serves. The tab reloads once and the screen
4261
+ * stays in its loading state meanwhile. When no reload can happen (it was just tried, the
4262
+ * tab holds unsaved work, or the reload did not go through) the loader resolves with
4263
+ * `fallback`, the host's notice, so the rest of the page stays as it is. Any other error is
4264
+ * the screen's own and is rethrown.
4265
+ */
4266
+ export declare function guardLazyImport<T>(load: () => Promise<{
4267
+ default: T;
4268
+ }>, fallback: T, opts?: StaleChunkRecoveryOptions): () => Promise<{
4269
+ default: T;
4270
+ }>;
4271
+
4233
4272
  declare type GuardRule = {
4234
4273
  field: string;
4235
4274
  op: string;
@@ -5768,21 +5807,13 @@ export declare function isSignedOut(): boolean;
5768
5807
  */
5769
5808
  export declare function isSignedOutError(err: unknown, identity?: boolean): boolean;
5770
5809
 
5771
- /**
5772
- * Stale code chunks after a deploy. Screens load lazily by hashed file names, and a new
5773
- * release no longer serves the previous build's files — so a tab opened before the deploy
5774
- * failed to open any screen it had not visited yet ("Failed to fetch dynamically imported
5775
- * module") until someone reloaded. During a rolling deploy one replica briefly serves the new
5776
- * build while another still serves the old one, which makes it likelier.
5777
- *
5778
- * `installStaleChunkRecovery()` reloads the tab onto the current build when a chunk fails to
5779
- * load. A second failure within the window means a reload does not help (the server really
5780
- * is missing the file, or the network is down): it stops reloading and calls `onGiveUp`, so
5781
- * the host can say so instead of looping.
5782
- */
5783
5810
  /** Whether an error (or a rejection reason) is a code chunk that could not be loaded. */
5784
5811
  export declare function isStaleChunkError(reason: unknown): boolean;
5785
5812
 
5813
+ /** This package's record form has the `moreMenuExportItems` slot (a host's exports sit
5814
+ * beside Export PDF). Read by hosts that run against older packages too. */
5815
+ export declare const ITEM_EDIT_EXPORT_MENU_SLOT = true;
5816
+
5786
5817
  export declare function ItemActionButtons({ collection, itemId }: {
5787
5818
  collection: string;
5788
5819
  itemId: string;
@@ -5828,6 +5859,10 @@ export declare interface ItemEditFormProps {
5828
5859
  /** Extra rows for the record's More menu, above Delete (e.g. a host's Edit layout).
5829
5860
  * Rows that open something outside the menu set `data-nvr-menu-close`. */
5830
5861
  moreMenuItems?: ReactNode;
5862
+ /** A host's own exports of this record (e.g. its lines as Excel): drawn right after the
5863
+ * record's Export PDF rows, so every export sits together. Hosts that must also work with
5864
+ * an older package check ITEM_EDIT_EXPORT_MENU_SLOT and fall back to moreMenuItems. */
5865
+ moreMenuExportItems?: ReactNode;
5831
5866
  /** Which view the record shows (Summary or Edit) and the collection's Summary layout id
5832
5867
  * (null = none; Summary then renders the edit layout read-only). Hosts use it so their
5833
5868
  * Edit layout opens the layout the person is looking at. */
@@ -6886,6 +6921,14 @@ export declare type MoneyParse = {
6886
6921
  error: string;
6887
6922
  };
6888
6923
 
6924
+ /**
6925
+ * A host's own reading of a stored refusal it knows (EFP: a warehouse's "InstallAddressLocationCode
6926
+ * field is required" → "The install location has no Oracle location code…"): what the row
6927
+ * shows instead of the other system's words, whole, one line per "\n". Null = not one it
6928
+ * knows; the row reads it as usual. The text as stored stays under "Details for support".
6929
+ */
6930
+ export declare const MoveProblemWordsContext: Context<((reason: string) => string | null) | null>;
6931
+
6889
6932
  /** A music bed under the whole video, looped and lowered under narration.
6890
6933
  * `track` is a library key or an uploaded music file's id. */
6891
6934
  declare interface MusicBed {
@@ -10172,7 +10215,16 @@ export declare interface RowViewers {
10172
10215
  count: number;
10173
10216
  }
10174
10217
 
10175
- /** Route-change timing: from the navigation to a settled double-rAF frame. */
10218
+ /**
10219
+ * Route-change timing: from the navigation to a settled double-rAF frame.
10220
+ *
10221
+ * Only while the tab is on screen. A hidden tab paints no frames, so the two
10222
+ * frames arrive when the person first looks at it and the figure would be how
10223
+ * long the tab sat in the background, not how long the page took: a replay
10224
+ * opened in a background tab once logged 243 s for a page whose requests had
10225
+ * all answered within 100 ms. A change that starts hidden, or is hidden before
10226
+ * the second frame, reports nothing.
10227
+ */
10176
10228
  export declare function rumRouteChange(pathname: string): void;
10177
10229
 
10178
10230
  /**
@@ -10865,13 +10917,25 @@ declare interface SpriteSheet {
10865
10917
  declare interface StaleChunkRecoveryOptions {
10866
10918
  /** Called instead of a second reload inside the window. */
10867
10919
  onGiveUp?: () => void;
10920
+ /** Called instead of a reload while the tab holds unsaved work (the labels say what).
10921
+ * A host without one gets `onGiveUp`. */
10922
+ onHeld?: (labels: string[]) => void;
10868
10923
  /** Test seams. */
10869
10924
  storage?: Pick<Storage, 'getItem' | 'setItem'> | null;
10870
10925
  reload?: () => void;
10871
10926
  now?: () => number;
10872
10927
  target?: Pick<Window, 'addEventListener' | 'removeEventListener'>;
10928
+ /** What a reload would lose, by label; the unsaved-work registry when not given. */
10929
+ unsaved?: () => string[];
10873
10930
  }
10874
10931
 
10932
+ /**
10933
+ * Whether this tab was reloaded for a stale chunk within the last minute: the reload the
10934
+ * recovery will not repeat. The host's "updated, reload" notice then says the reload did not
10935
+ * bring the new version yet, instead of offering the same reload as if it were new.
10936
+ */
10937
+ export declare function staleChunkReloadJustTried(opts?: Pick<StaleChunkRecoveryOptions, 'storage' | 'now'>): boolean;
10938
+
10875
10939
  /**
10876
10940
  * Idempotent; safe from an effect that runs more than once, and safe to call
10877
10941
  * from several components — only the first call arms the timer.
@@ -10962,9 +11026,13 @@ export declare function SubmissionRow({ sub, onRetry, retrying, onShowPath, init
10962
11026
  initialOpen?: boolean;
10963
11027
  }): JSX.Element;
10964
11028
 
10965
- /** A submission / attempt status, as a small tinted chip. */
10966
- export declare function SubmissionStatusPill({ status }: {
11029
+ /**
11030
+ * A submission / attempt status, as a small tinted chip. `stale` = a `sending` send past its
11031
+ * time, named "no answer" as on every other screen.
11032
+ */
11033
+ export declare function SubmissionStatusPill({ status, stale }: {
10967
11034
  status: string;
11035
+ stale?: boolean;
10968
11036
  }): JSX.Element;
10969
11037
 
10970
11038
  export declare function subscribeClientChaos(cb: () => void): () => void;