@object-ui/plugin-form 17.6.0 → 18.0.0

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 (72) hide show
  1. package/CHANGELOG.md +4991 -0
  2. package/README.md +522 -80
  3. package/dist/DrawerForm.d.ts +42 -3
  4. package/dist/DrawerForm.d.ts.map +1 -1
  5. package/dist/EmbeddableForm.d.ts.map +1 -1
  6. package/dist/FormAnalytics.d.ts.map +1 -1
  7. package/dist/LineItemsPanel.d.ts +6 -3
  8. package/dist/LineItemsPanel.d.ts.map +1 -1
  9. package/dist/MasterDetailForm.d.ts +79 -38
  10. package/dist/MasterDetailForm.d.ts.map +1 -1
  11. package/dist/ModalForm.d.ts +60 -5
  12. package/dist/ModalForm.d.ts.map +1 -1
  13. package/dist/ObjectForm.d.ts.map +1 -1
  14. package/dist/SplitForm.d.ts +49 -3
  15. package/dist/SplitForm.d.ts.map +1 -1
  16. package/dist/TabbedForm.d.ts +75 -5
  17. package/dist/TabbedForm.d.ts.map +1 -1
  18. package/dist/WizardForm.d.ts +145 -38
  19. package/dist/WizardForm.d.ts.map +1 -1
  20. package/dist/autoLayout.d.ts +113 -8
  21. package/dist/autoLayout.d.ts.map +1 -1
  22. package/dist/closedAffordanceNotice.d.ts +14 -0
  23. package/dist/closedAffordanceNotice.d.ts.map +1 -0
  24. package/dist/customFieldsMerge.d.ts +29 -0
  25. package/dist/customFieldsMerge.d.ts.map +1 -0
  26. package/dist/deriveMasterDetail.d.ts +82 -29
  27. package/dist/deriveMasterDetail.d.ts.map +1 -1
  28. package/dist/fieldGroups.d.ts +189 -0
  29. package/dist/fieldGroups.d.ts.map +1 -1
  30. package/dist/fieldWriteGate.d.ts +136 -0
  31. package/dist/fieldWriteGate.d.ts.map +1 -0
  32. package/dist/flatFields.d.ts +11 -2
  33. package/dist/flatFields.d.ts.map +1 -1
  34. package/dist/formChrome.d.ts +55 -0
  35. package/dist/formChrome.d.ts.map +1 -0
  36. package/dist/index.d.ts +149 -26
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +3984 -2332
  39. package/dist/index.umd.cjs +1 -1
  40. package/dist/initialFieldFocus.d.ts +23 -0
  41. package/dist/initialFieldFocus.d.ts.map +1 -0
  42. package/dist/initialRecord.d.ts +72 -0
  43. package/dist/initialRecord.d.ts.map +1 -0
  44. package/dist/loadFailure.d.ts +28 -0
  45. package/dist/loadFailure.d.ts.map +1 -0
  46. package/dist/masterDetailTx.d.ts.map +1 -1
  47. package/dist/occSave.d.ts +6 -1
  48. package/dist/occSave.d.ts.map +1 -1
  49. package/dist/recordInvalidation.d.ts +33 -0
  50. package/dist/recordInvalidation.d.ts.map +1 -0
  51. package/dist/recordReadGate.d.ts +34 -0
  52. package/dist/recordReadGate.d.ts.map +1 -0
  53. package/dist/sanitize.d.ts +272 -5
  54. package/dist/sanitize.d.ts.map +1 -1
  55. package/dist/schemaDefaults.d.ts +104 -9
  56. package/dist/schemaDefaults.d.ts.map +1 -1
  57. package/dist/sectionFields.d.ts +67 -2
  58. package/dist/sectionFields.d.ts.map +1 -1
  59. package/dist/sectionGroups.d.ts +62 -0
  60. package/dist/sectionGroups.d.ts.map +1 -0
  61. package/dist/sectionPredicateDiagnostic.d.ts +38 -0
  62. package/dist/sectionPredicateDiagnostic.d.ts.map +1 -0
  63. package/dist/submitTarget.d.ts +136 -0
  64. package/dist/submitTarget.d.ts.map +1 -0
  65. package/dist/successBehavior.d.ts +44 -25
  66. package/dist/successBehavior.d.ts.map +1 -1
  67. package/dist/thankYouRedirectCountdown.d.ts +1 -1
  68. package/dist/uploadGate.d.ts +35 -0
  69. package/dist/uploadGate.d.ts.map +1 -0
  70. package/dist/writePayload.d.ts +87 -0
  71. package/dist/writePayload.d.ts.map +1 -0
  72. package/package.json +13 -12
@@ -0,0 +1,23 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * The first control, in document order, that a user can edit in the first
10
+ * field row that has one. `null` while no field row is drawn (the body is
11
+ * loading) or when every field is read-only (a view-mode form).
12
+ */
13
+ export declare function findFirstEditableField(root: ParentNode): HTMLElement | null;
14
+ /**
15
+ * The `onOpenAutoFocus` / `onCloseAutoFocus` pair for a dialog content whose
16
+ * body loads after it opens. Pass both to the dialog content; the observer the
17
+ * open handler may start is stopped on close, on the next open and on unmount.
18
+ */
19
+ export declare function useInitialFieldFocus(): {
20
+ onOpenAutoFocus: (event: Event) => void;
21
+ onCloseAutoFocus: (event: Event) => void;
22
+ };
23
+ //# sourceMappingURL=initialFieldFocus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialFieldFocus.d.ts","sourceRoot":"","sources":["../src/initialFieldFocus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmDH;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAO3E;AAeD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI;IACtC,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC1C,CAmEA"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * The opening record an `object-form`-shaped schema authors through its two
10
+ * seed keys — `initialValues` and its alternate spelling `initialData`
11
+ * (objectui#9760).
12
+ *
13
+ * ## The defect this replaces
14
+ *
15
+ * Every presentation arm used to choose between the two keys as WHOLE OBJECTS:
16
+ *
17
+ * ```ts
18
+ * schema.initialData || schema.initialValues
19
+ * ```
20
+ *
21
+ * `||` tests the object, never its size, and `{}` is truthy. So an author who
22
+ * prefilled three fields through `initialValues` and added a one-member
23
+ * `initialData` lost the other two, and an author whose `initialData` computed
24
+ * to an EMPTY object — the shape a `?? {}` producer hands over when it has
25
+ * nothing to contribute — got a completely blank form where a populated
26
+ * `initialValues` sat right beside it. No warning, no empty state, no
27
+ * diagnostic: the form simply opened blank where it used to open seeded.
28
+ *
29
+ * Nothing declared ever said that. The registration calls `initialData` an
30
+ * "alternate spelling of `initialValues` … read FIRST", which is a statement of
31
+ * PRECEDENCE — the reading a per-member merge implements — and is what an
32
+ * author gets here now.
33
+ *
34
+ * ## Why it is one function rather than a corrected expression per arm
35
+ *
36
+ * The `||` was spelled at every read site of every presentation arm — the set a
37
+ * `git grep` for this module's name now enumerates — and the two spellings
38
+ * around it were not even the same: the create branches passed the chosen
39
+ * object into `seedCreateValues` (which layers the object schema's declared
40
+ * `defaultValue`s underneath it) while the rest installed it directly with a
41
+ * trailing `|| {}`. Two expressions free to drift are how one arm comes to
42
+ * answer "which spelling wins" differently from its neighbour, which is a
43
+ * question no author can even ask of a JSON schema. One function cannot drift.
44
+ *
45
+ * ## The contract
46
+ *
47
+ * `initialData` wins PER MEMBER, `initialValues` supplies every member it says
48
+ * nothing about, and the result is always a fresh plain object — never `null`,
49
+ * never `undefined`, never either authored object by reference. Callers may
50
+ * therefore spread it, hand it to `seedCreateValues` as the caller layer, or
51
+ * install it as form state without a `|| {}` tail.
52
+ *
53
+ * An explicit `null` MEMBER is preserved, on both sides: a caller writing
54
+ * `{ status: null }` is saying "open this control blank", which is a value and
55
+ * not an absence — the same reading `seedCreateValues`' docblock takes of the
56
+ * seed as a whole. Only a missing or nullish KEY contributes nothing.
57
+ */
58
+ /** The two seed keys, as every presentation arm's schema declares them. */
59
+ export interface InitialRecordSchemaLike {
60
+ /** Values to prefill in `create` mode. */
61
+ initialValues?: Record<string, any> | null;
62
+ /** Alternate spelling of `initialValues`, read FIRST — i.e. per member it wins. */
63
+ initialData?: Record<string, any> | null;
64
+ }
65
+ /**
66
+ * The record a form opens with, merged per member with `initialData` on top.
67
+ *
68
+ * Returns a fresh object (never shared with either input, never nullish), so
69
+ * every caller can install or spread it unconditionally.
70
+ */
71
+ export declare function resolveInitialRecord(schema: InitialRecordSchemaLike | null | undefined): Record<string, any>;
72
+ //# sourceMappingURL=initialRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialRecord.d.ts","sourceRoot":"","sources":["../src/initialRecord.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,2EAA2E;AAC3E,MAAM,WAAW,uBAAuB;IACtC,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,uBAAuB,GAAG,IAAI,GAAG,SAAS,GACjD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAErB"}
@@ -0,0 +1,28 @@
1
+ import { Dispatch, MutableRefObject, SetStateAction } from 'react';
2
+ /** The two reads a record form makes before it can draw. */
3
+ export type LoadSource = 'schema' | 'record';
4
+ /** The latest failure of each read, or `null` when its current run has not failed. */
5
+ export type LoadFailures = Readonly<Record<LoadSource, Error | null>>;
6
+ /** Neither read has failed. */
7
+ export declare const NO_LOAD_FAILURES: LoadFailures;
8
+ /** The number of the latest run of each read. Held in a ref: nothing renders from it. */
9
+ export type LoadRunSeq = Record<LoadSource, number>;
10
+ /** One run of one read. Each method is a no-op once a newer run of that read has begun. */
11
+ export interface LoadRun {
12
+ /** This run failed: its read's failure becomes `err`. */
13
+ fail(err: unknown): void;
14
+ /** This run committed what it read: its read's failure, if any, is cleared. */
15
+ commit(): void;
16
+ }
17
+ /**
18
+ * Number a new run of `source` and hand back its two writes. Call it once per
19
+ * run of the fetch effect, synchronously in the effect body, so the number
20
+ * moves when the effect does rather than when a read happens to settle.
21
+ */
22
+ export declare function beginLoadRun(seqRef: MutableRefObject<LoadRunSeq>, setFailures: Dispatch<SetStateAction<LoadFailures>>, source: LoadSource): LoadRun;
23
+ /**
24
+ * The failure the error screen reports, or `null` when the form may draw. The
25
+ * schema's comes first: without it the fields the record fills are unknown.
26
+ */
27
+ export declare function shownLoadFailure(failures: LoadFailures): Error | null;
28
+ //# sourceMappingURL=loadFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadFailure.d.ts","sourceRoot":"","sources":["../src/loadFailure.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAExE,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7C,sFAAsF;AACtF,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;AAEtE,+BAA+B;AAC/B,eAAO,MAAM,gBAAgB,EAAE,YAA6C,CAAC;AAE7E,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAEpD,2FAA2F;AAC3F,MAAM,WAAW,OAAO;IACtB,yDAAyD;IACzD,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,+EAA+E;IAC/E,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,gBAAgB,CAAC,UAAU,CAAC,EACpC,WAAW,EAAE,QAAQ,CAAC,cAAc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AAE,GAC7B,OAAO,CAST;AAED,6DAA6D;AAC7D,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM1E"}
package/dist/occSave.d.ts CHANGED
@@ -17,7 +17,9 @@
17
17
  * forms were the only link in the chain not sending it.
18
18
  *
19
19
  * `useOccSave` centralises the guarded write:
20
- * 1. `update` is issued with `ifMatch` = the `updated_at` the form read.
20
+ * 1. `update` is issued with `ifMatch` = the `updated_at` the form read —
21
+ * or, once this hook has itself saved that record, the version its last
22
+ * successful write returned (objectui#10565; see `versionToSend`).
21
23
  * 2. On `409 CONCURRENT_UPDATE` a dialog offers **Keep editing** (stay in
22
24
  * the form, draft intact) or **Overwrite** (retry re-keyed to the
23
25
  * server's `currentVersion` — "I know it changed, mine wins").
@@ -60,6 +62,9 @@ export interface OccSaveArgs {
60
62
  /**
61
63
  * The record as the form read it (`findOne` result) — supplies the
62
64
  * `updated_at` version token. Optional: without it the write is unguarded.
65
+ * It decides WHETHER the write is guarded; after this hook's own save of
66
+ * the same record it no longer decides WHICH version is sent (see
67
+ * `versionToSend`).
63
68
  */
64
69
  baseRecord?: unknown;
65
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"occSave.d.ts","sourceRoot":"","sources":["../src/occSave.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6B/B;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAGhE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAI/D;AAED,MAAM,MAAM,cAAc;AACxB,+DAA+D;AAC7D;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,GAAG,CAAA;CAAE;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EAAE,OAAO,CAAC;CACtB;AA0ED;;;;;;;GAOG;AACH,wBAAgB,UAAU,IAAI;IAC5B,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5D,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC,CAmIA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export interface RecordInvalidation {
9
+ /**
10
+ * Bumped once per re-read this form decides to run. The record read effect
11
+ * names it in its dependency list; nothing else reads it.
12
+ */
13
+ refetch: number;
14
+ /**
15
+ * The form renderer's `onDirtyChange`. A host with dirty state of its own
16
+ * composes this with it; `false` replays a held re-read.
17
+ */
18
+ onDirtyChange: (dirty: boolean) => void;
19
+ /**
20
+ * This form's edit landed: what it shows is what the server holds. Clears
21
+ * dirty and replays a held re-read once (the write's own bus echo included).
22
+ */
23
+ saved: () => void;
24
+ }
25
+ /**
26
+ * @param objectName the object the form reads
27
+ * @param recordId the record it reads
28
+ * @param readsRecord whether it reads one at all — edit or view mode with a
29
+ * `recordId`, and (for the default arm) no inline field source. When `false`
30
+ * the bus is not subscribed to and `refetch` never moves.
31
+ */
32
+ export declare function useRecordInvalidation(objectName: string | undefined, recordId: string | number | undefined, readsRecord: boolean): RecordInvalidation;
33
+ //# sourceMappingURL=recordInvalidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordInvalidation.d.ts","sourceRoot":"","sources":["../src/recordInvalidation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6CH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACrC,WAAW,EAAE,OAAO,GACnB,kBAAkB,CAuCpB"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * The first-record-read gate, shared by the two overlay containers
10
+ * (`DrawerForm`, objectui#10190; `ModalForm`, objectui#10659).
11
+ *
12
+ * Each container builds its fields and reads its record in two effects, and
13
+ * both key on `objectSchema`. The commit that publishes the schema therefore
14
+ * runs both, fetch first: the fetch effect enters the loading state and fires
15
+ * `findOne`, and a fields effect that ended the loading state unconditionally
16
+ * then won. That painted an empty, EDITABLE form while the read was in flight,
17
+ * and the landing record replaced whatever had been typed. The save that
18
+ * followed compared the record with itself and sent it whole, with its
19
+ * original values.
20
+ *
21
+ * So the fields effect ends the loading state only when this answers `false`.
22
+ * A load the fetch effect started is ended by the fetch effect. The condition
23
+ * mirrors that effect's own branches: create mode, no `recordId`, or no
24
+ * `dataSource` never read a record. `loadedRecordId` is the id of the record
25
+ * the form currently holds, which the fetch effect sets when its read lands,
26
+ * so this covers the FIRST load and a record swap alike.
27
+ */
28
+ export declare function isRecordReadOutstanding(state: {
29
+ mode?: string;
30
+ recordId?: string | number;
31
+ dataSource: unknown;
32
+ loadedRecordId: string | number | undefined;
33
+ }): boolean;
34
+ //# sourceMappingURL=recordReadGate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordReadGate.d.ts","sourceRoot":"","sources":["../src/recordReadGate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC7C,GAAG,OAAO,CAOV"}
@@ -6,18 +6,285 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  /**
9
- * Strip server-managed and computed fields from a form payload before sending
9
+ * The refused-field roster: every field name the SERVER owns on write.
10
+ *
11
+ * ## What it is
12
+ *
13
+ * The framework's `applySystemFields` stamps these columns onto every business
14
+ * object — record identity, audit provenance (`created_*` / `updated_*`), and
15
+ * the reassignable ownership / tenancy FKs (`owner_id`,
16
+ * `owning_business_unit_id`, `organization_id`, `tenant_id`, `company_id`,
17
+ * `space`). They are not author-declared business data, and a form may never
18
+ * echo one back.
19
+ *
20
+ * One of them is also a value a user may set: the record's owner. The spec
21
+ * declares `owner_id` `system` but NOT `readonly`, because ownership is
22
+ * transferable from a form. It stays in this roster — an untouched owner is
23
+ * still never sent, and an auto-laid-out form still never renders it — and an
24
+ * EDIT adds it back only when the user changed it against the record the form
25
+ * read ({@link dirtyEditPayload}, objectui#12205), and a CREATE only when the
26
+ * user picked it against the values the form opened with
27
+ * ({@link createOwnerPayload}, objectui#12359). The rest of the family is
28
+ * not reassignable from a form: the spec declares the business-unit and tenant
29
+ * anchors `readonly`, so they stay refused even when they differ.
30
+ *
31
+ * ## Why one roster, and why it is THIS roster
32
+ *
33
+ * `filterSystemFields` in `autoLayout.ts` reads the same set to decide what an
34
+ * auto-laid-out form RENDERS, in create and edit mode alike. The two readings
35
+ * are deliberately the same object, because the invariant they express is one
36
+ * invariant: **a form never writes a field it refuses to render.** Spelling the
37
+ * refusal separately at each call site is how they drifted — the render side
38
+ * had dropped `owner_id` since it was written, while the write side had not, so
39
+ * an edit form that showed the user two business inputs still sent back every
40
+ * ownership and audit column it had read (objectui#10108).
41
+ *
42
+ * That drift is not a cosmetic one. The platform refuses a write to a
43
+ * system-managed ownership column unless the caller holds the transfer grant
44
+ * (`allowTransfer` / `modifyAllRecords`), and it cannot tell a round-trip of
45
+ * the value it just served from an attempted ownership transfer. So a form
46
+ * echoing an UNCHANGED `owner_id` back is a 403 for every role that does not
47
+ * hold the grant — which, for a line-entry role, is the whole point of the
48
+ * role. The master-detail save sends its operations as one atomic batch, so a
49
+ * single echoed column refuses the entire save.
50
+ *
51
+ * ## What is deliberately NOT here
52
+ *
53
+ * The lifecycle bookkeeping columns (`locked`, `instance_state`, `deleted`,
54
+ * `is_deleted`) are left out. They are plausibly author-writable — a workflow
55
+ * or an admin form that drives record state is writing business meaning, not
56
+ * echoing provenance — and nothing has measured them refusing a write. Adding
57
+ * one here on the strength of the pattern alone would silently drop a value a
58
+ * form was asked to persist, which is the failure direction this module must
59
+ * not take.
60
+ *
61
+ * ⚠️ A name list alone cannot close the class: the NEXT injected column the
62
+ * platform adds will not be in it. {@link sanitizeFormData} therefore branches
63
+ * on the spec `system` flag first whenever a field definition is available —
64
+ * that flag is the registry's own mark on everything it injects, and
65
+ * `isSystemManagedField` in `@object-ui/types` reads the same one. This roster
66
+ * is the fallback for metadata that arrives without the flag.
67
+ */
68
+ export declare const SERVER_OWNED_FIELD_NAMES: ReadonlySet<string>;
69
+ /**
70
+ * Strip server-owned and computed fields from a form payload before sending
10
71
  * it to `dataSource.create()` / `dataSource.update()`.
11
72
  *
12
- * - Drops well-known server-owned keys (id, created_at, organization_id, …).
73
+ * - Drops every name in {@link SERVER_OWNED_FIELD_NAMES}.
74
+ * - When `objectSchema` is provided, drops any field the spec marks
75
+ * `system: true` — the registry's own mark on the columns it injects, so a
76
+ * column added to the platform after this module was written is refused
77
+ * without anyone editing the roster.
13
78
  * - When `objectSchema` is provided, drops fields that are flagged as
14
- * `computed` / `formula` / `readOnly` or whose type is in
15
- * {@link COMPUTED_FIELD_TYPES}.
79
+ * `computed` / `readOnly` or whose type is in {@link COMPUTED_FIELD_TYPES}.
80
+ * A `formula` key is NOT a flag this reads (objectui#11070 round 6): every
81
+ * `type: 'formula'` field is already dropped by its type, and
82
+ * `@objectstack/spec`'s `FieldSchema` refuses `formula` by name on every
83
+ * field type (renaming it to `expression`), so no served definition can use
84
+ * it to mark some other type computed.
16
85
  * - When `objectSchema` is provided, also drops keys that don't appear in
17
86
  * `objectSchema.fields` at all (these are typically server-projected
18
87
  * relationships or flattened lookups like `full_name`).
88
+ * - When `options.canEdit` is provided, drops every field that predicate
89
+ * refuses — the CALLER's field-level security, which no schema can answer.
90
+ *
91
+ * Its output never carries the owner. An edit's changed owner is judged after
92
+ * this, against the record the form read, by {@link dirtyEditPayload}
93
+ * (objectui#12205), and a create's picked owner against the values the form
94
+ * opened with, by {@link createOwnerPayload} (objectui#12359) — the two places
95
+ * that can tell a user's pick from an echo.
96
+ *
97
+ * The two server-owned branches are separate on purpose and neither subsumes
98
+ * the other: the name roster fires with no schema at all (an inline form passes
99
+ * `null`), and the `system` flag fires for a name the roster has never heard
100
+ * of.
101
+ *
102
+ * ## Why field-level security arrives as a PREDICATE, not as more schema
103
+ *
104
+ * The branches above are properties of the OBJECT: the same for every caller,
105
+ * readable off metadata this function is already handed. Field-level security
106
+ * is a property of the CALLER — `score` is writable for one principal and
107
+ * refused for the next, on the identical object — so it cannot be read off
108
+ * `objectSchema` and must not be re-derived here. `fieldWriteGate` in
109
+ * `./fieldWriteGate` adapts the ONE resolver that owns that answer
110
+ * (`checkField` in `@object-ui/permissions`, asked the question the form's
111
+ * mode reads from the affordance-to-grant map — objectui#12082) into this
112
+ * predicate. It arrives here, at the single outbound filter, rather than as a
113
+ * strip loop after each container's call, because every such loop is a copy
114
+ * that can be forgotten — and one of the three containers had forgotten it
115
+ * (`80c54122e`).
19
116
  */
20
117
  export declare function sanitizeFormData(data: Record<string, any>, objectSchema?: {
21
118
  fields?: Record<string, any>;
22
- } | null): Record<string, any>;
119
+ } | null, options?: {
120
+ canEdit?: (fieldName: string) => boolean;
121
+ }): Record<string, any>;
122
+ /**
123
+ * Whether two payload values are the SAME stored value — the one comparison
124
+ * every dirty-field diff in this package uses: the master-detail child rows in
125
+ * `masterDetailTx.ts` (objectui#10108) and the edit form's own record
126
+ * (objectui#10156). ⛔ Do not write a second equality rule beside it; two rules
127
+ * would drift, and the one that drifted towards "equal" would drop edits.
128
+ *
129
+ * ⚠️ The comparison is deliberately asymmetric in its failure direction. Saying
130
+ * "changed" about an equal pair costs one redundant column on the wire; saying
131
+ * "unchanged" about a changed pair DISCARDS the user's edit, silently, with a
132
+ * 200 back. So every case this cannot settle confidently reads as changed.
133
+ *
134
+ * The rule, pair by pair:
135
+ *
136
+ * - The same value (`===`) is equal.
137
+ * - `null` and `undefined` are one blank — the only two blanks a form
138
+ * round-trip actually interchanges. `''` is NOT a blank here: `null` and
139
+ * `''` read as different, and so do `undefined` and `''`.
140
+ * - Numbers never equal strings: `1000` and `'1000'` read as different.
141
+ * - Two `Date`s are equal only when both hold the same finite time. A `Date`
142
+ * and a date STRING read as different, and so do two date strings in
143
+ * different formats (`'2026-01-02'` and `'2026-01-02T00:00:00Z'`).
144
+ * - Two objects or arrays are equal only when they serialize identically. A
145
+ * reordered key or array element reads as changed, which is the safe side.
146
+ * - A lookup's id and its expanded object (`'a1'` and `{ id: 'a1', … }`) read
147
+ * as different: one is a string and the other an object.
148
+ * - Anything else is different, including `NaN` against itself.
149
+ */
150
+ export declare function isSameStoredValue(a: unknown, b: unknown): boolean;
151
+ /**
152
+ * The subset of `next` that differs from the loaded snapshot `prev` — the
153
+ * DIRTY fields, and only those, judged by {@link isSameStoredValue}.
154
+ *
155
+ * An update that carries an unchanged column is not free: the platform refuses
156
+ * a write to a system-managed ownership column unless the caller holds the
157
+ * transfer grant, and it cannot tell a round-trip of the value it just served
158
+ * from an attempted transfer. A master-detail save commits as ONE atomic batch,
159
+ * so one such column on any row refuses every row (objectui#10108).
160
+ * `sanitizeFormData` already refuses the columns the server owns by name;
161
+ * sending only what the user actually changed is the half that does not depend
162
+ * on a roster being complete.
163
+ */
164
+ export declare function changedFields(next: Record<string, any>, prev: Record<string, any>): Record<string, any>;
165
+ /**
166
+ * The record an edit form READ from its data source, tagged with the object
167
+ * and record it was read for (objectui#10156).
168
+ *
169
+ * It is the baseline an edit save diffs against, and it is held by the form
170
+ * component that performed the read — never passed in by a host. A record a
171
+ * caller supplied (`initialData`, inline `customFields`) is a prefill, not the
172
+ * row as stored, so no snapshot is taken for it and its save sends every field.
173
+ */
174
+ export interface LoadedRecordSnapshot {
175
+ objectName: string;
176
+ recordId: string;
177
+ record: Record<string, unknown>;
178
+ }
179
+ /** The three facts of a form schema that decide whether a snapshot applies. */
180
+ export interface EditSaveTarget {
181
+ mode?: string;
182
+ objectName: string;
183
+ recordId?: string | number | null;
184
+ }
185
+ /**
186
+ * Take the snapshot for a record just read with `findOne`, or `null` when the
187
+ * read returned nothing usable.
188
+ */
189
+ export declare function snapshotLoadedRecord(target: EditSaveTarget, data: unknown): LoadedRecordSnapshot | null;
190
+ /**
191
+ * The payload an EDIT save writes: only the fields that differ from the record
192
+ * the form loaded (objectui#10156).
193
+ *
194
+ * `payload` is the output of {@link sanitizeFormData}. Every case that cannot
195
+ * be settled resolves towards SENDING, because a false "clean" drops the user's
196
+ * edit and the server still answers 200:
197
+ *
198
+ * - Not an edit, or no snapshot was read for this object and record (a create,
199
+ * a caller-supplied record, a record swap still in flight) → `payload`
200
+ * unchanged, every field sent.
201
+ * - A snapshot applies → the fields {@link changedFields} reports. Fields the
202
+ * form itself moved after the load — a cascade clear, a clear-on-hide, a
203
+ * value the form computed — differ from the loaded record, so they are sent.
204
+ * - The diff is EMPTY → `payload` unchanged. A save with nothing changed stays
205
+ * the request it has always been: the same write, the same OCC guard and a
206
+ * real server record for `onSuccess`. Emitting no request instead would
207
+ * report success for a save no server saw, and that is the one outcome a
208
+ * wrong baseline must never be able to produce.
209
+ *
210
+ * ## The owner (objectui#12205)
211
+ *
212
+ * `payload` never carries the owner: `sanitizeFormData` drops it, because the
213
+ * platform refuses an echoed owner from every role without the transfer grant
214
+ * and cannot tell an echo from a transfer (objectui#10108). That drop also
215
+ * swallowed a REAL reassignment or clear — the form closed as if it saved and
216
+ * the record kept its owner. This is the one place that can tell the two
217
+ * apart, so `owner` hands it the values the form holds and the strip's own
218
+ * inputs, and the owner is added to the diff when, and only when:
219
+ *
220
+ * - a snapshot applies — with none, nothing proves the owner changed, so it
221
+ * stays off the wire exactly as before;
222
+ * - the form holds a value for it (`undefined` is not a clear; a clear is
223
+ * `null`) and {@link changedFields} reports it against the record read;
224
+ * - everything else `sanitizeFormData` asks still allows it: the caller's
225
+ * field-level security, the object declaring it, and it not being
226
+ * `readonly` or computed.
227
+ *
228
+ * The server stays the authority: a role without the transfer grant is refused
229
+ * with a 403, which the form shows as its error. A caller that passes no
230
+ * `owner` gets the diff it always got.
231
+ */
232
+ export declare function dirtyEditPayload(payload: Record<string, unknown>, snapshot: LoadedRecordSnapshot | null | undefined, target: EditSaveTarget, owner?: EditOwnerSource | null): Record<string, unknown>;
233
+ /**
234
+ * The payload a CREATE save writes: `payload`, plus the owner when the user
235
+ * picked one on this New form (objectui#12359).
236
+ *
237
+ * `payload` is the output of {@link sanitizeFormData}, which never carries the
238
+ * owner. Before this, a New form that rendered Owner let the user pick a user,
239
+ * showed the pick, and then saved the record under the creator with no error.
240
+ *
241
+ * "Picked" means the same thing it means on an edit, judged against the values
242
+ * the form OPENED with instead of a record it read: `seed` is the create
243
+ * form's opening values (`seedCreateValues` — the declared defaults, a
244
+ * `current_user` default resolved to the acting user, and any caller-supplied
245
+ * initial values). So the owner is added when, and only when:
246
+ *
247
+ * - the caller hands a `seed` — with none, nothing proves the user set the
248
+ * owner, so it stays off the wire exactly as before;
249
+ * - the form holds a value for it (`undefined` is not a pick) and
250
+ * {@link changedFields} reports it against `seed`. An owner the form was
251
+ * seeded with and the user left alone — the creator from a `current_user`
252
+ * default, or a caller's prefill — is NOT a pick, and is never sent
253
+ * (objectui#10108);
254
+ * - everything else {@link sanitizeFormData} asks still allows it: the
255
+ * caller's field-level security, the object declaring it, and it not being
256
+ * `readonly` or computed.
257
+ *
258
+ * The client does not guess whether the caller may assign another owner. The
259
+ * server judges it: an insert naming another user is refused without the
260
+ * transfer grant (`allowTransfer` / `modifyAllRecords`), and the form shows
261
+ * that refusal as its error. A caller that passes no `owner` gets `payload`.
262
+ */
263
+ export declare function createOwnerPayload(payload: Record<string, unknown>, seed: Record<string, unknown> | null | undefined, owner?: EditOwnerSource | null): Record<string, unknown>;
264
+ /**
265
+ * What a save hands {@link dirtyEditPayload} (an edit) or
266
+ * {@link createOwnerPayload} (a create) so it can judge the owner.
267
+ */
268
+ export interface EditOwnerSource {
269
+ /** The values the form holds — BEFORE `sanitizeFormData`, which drops the owner. */
270
+ values: Record<string, unknown>;
271
+ /** The definition `payload` was sanitized against (`null` for inline members). */
272
+ objectSchema?: {
273
+ fields?: Record<string, unknown>;
274
+ } | null;
275
+ /** The field-level verdict `payload` was sanitized with. */
276
+ canEdit?: (fieldName: string) => boolean;
277
+ }
278
+ /**
279
+ * The snapshot after an edit save SUCCEEDED: the fields just written, laid over
280
+ * the record as read.
281
+ *
282
+ * A form that stays mounted after a save must not diff its next save against
283
+ * the row as FIRST read. Changing a field and then changing it back to the
284
+ * value first read would compare equal to that stale baseline and be dropped,
285
+ * while the server still holds the first save's value. Advancing the baseline
286
+ * by what the server accepted closes that. A snapshot read for another record
287
+ * is returned untouched.
288
+ */
289
+ export declare function advanceLoadedRecord(snapshot: LoadedRecordSnapshot | null | undefined, target: EditSaveTarget, written: Record<string, unknown>): LoadedRecordSnapshot | null;
23
290
  //# sourceMappingURL=sanitize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../src/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+BH;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,CAAC,MAA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