@nivaro/react 0.1.47 → 0.1.49

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 (3) hide show
  1. package/dist/index.d.ts +10 -4
  2. package/dist/index.js +3855 -3806
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1008,11 +1008,17 @@ export declare interface ItemEditFormProps {
1008
1008
  * own copy in the page header; headless hosts opt in. */
1009
1009
  showItemActions?: boolean;
1010
1010
  /**
1011
- * When set, a Duplicate button renders on saved records. Receives a prefill
1012
- * object (plain scalar + M2O values; audit/auto-id/computed/alias fields
1013
- * excluded) the host navigates to its new-record route with it.
1011
+ * When set, a Duplicate button renders on saved records. Receives the full
1012
+ * copy payload scalar/M2O values, M2M link id arrays (keyed by staging
1013
+ * key, ready for initialLinks), and O2M child rows (keyed
1014
+ * `<child>.<fk>`, ready for initialRows). The host stores it (sessionStorage
1015
+ * — too big for a URL) and navigates to its new-record route.
1014
1016
  */
1015
- onDuplicate?: (prefill: Record<string, unknown>) => void;
1017
+ onDuplicate?: (payload: {
1018
+ values: Record<string, unknown>;
1019
+ links: Record<string, unknown[]>;
1020
+ rows: Record<string, Array<Record<string, unknown>>>;
1021
+ }) => void;
1016
1022
  showRevisions?: boolean;
1017
1023
  showClone?: boolean;
1018
1024
  showPipeline?: boolean;