@object-ui/plugin-detail 17.3.0 → 17.5.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.
package/README.md CHANGED
@@ -213,6 +213,26 @@ in the opt-in filter box temporarily falls back to the full-fetch client
213
213
  pipeline (the contains-filter sweeps every field, which no generic server
214
214
  filter can express).
215
215
 
216
+ The node's `filter` (spec `RecordRelatedListProps.filter`, "additional filter
217
+ criteria") narrows the list beyond the parent relationship: it is
218
+ **AND-combined** with `{ [relationshipField]: parentId }`, never substituted for
219
+ it, so a related list stays scoped to the record it appears on and an additional
220
+ criterion can only ever narrow that set. Authors write it in the spec's own
221
+ vocabulary (`[{ field, operator, value }]`); a `dataSource` binding's composed
222
+ filter (component AND saved view AND binding) lands on the same key. Both are
223
+ lowered to ObjectQL through the repo's single filter sink, so no second dialect
224
+ appears. On the legacy raw-URL fallback path (no `dataSource` adapter, where the
225
+ query language is `filter[<field>]=<value>` and cannot carry an operator) a
226
+ declared filter is refused with a console explanation rather than dropped —
227
+ answering with more rows than the metadata asked for is the failure this key's
228
+ wiring exists to remove.
229
+
230
+ The **Add** affordance renders only where every link in its chain is available:
231
+ a spec-valid `add.picker.object` *and* a `dataSource`. The picker dialog and the
232
+ add callback both required the adapter already, so without it the button used to
233
+ render and do nothing at all when clicked — visible in hosts that supply no
234
+ `RecordContext` (Studio designer previews, context-free embeds).
235
+
216
236
  The `record:related_list` renderer is automatically gated on the current
217
237
  user's object-level `read` permission for the child object: when the
218
238
  permission system (`@object-ui/permissions`) is loaded and denies read,
@@ -240,17 +260,6 @@ shared draft (`InlineEditProvider` from `@object-ui/react`), committed by
240
260
  gate `InlineEditProvider.canEdit` when the record is approval-locked, so a
241
261
  locked record hides its edit affordances instead of rejecting at Save.
242
262
 
243
- <!-- release-metadata:v3.3.0 -->
244
-
245
- ## Compatibility
246
-
247
- - **React:** 18.x or 19.x
248
- - **Node.js:** ≥ 18
249
- - **TypeScript:** ≥ 5.0 (strict mode)
250
- - **`@objectstack/spec`:** ^3.3.0
251
- - **`@objectstack/client`:** ^3.3.0
252
- - **Tailwind CSS:** ≥ 3.4 (for packages with UI)
253
-
254
263
  ## Links
255
264
 
256
265
  - 📚 [Documentation](https://www.objectui.org/docs/plugins/plugin-detail)
@@ -1 +1 @@
1
- {"version":3,"file":"DetailSection.d.ts","sourceRoot":"","sources":["../src/DetailSection.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAkC,MAAM,kBAAkB,CAAC;AAuBnH;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAmBxF;AAED,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gEAAgE;IAChE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACpD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM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
+ {"version":3,"file":"DetailView.d.ts","sourceRoot":"","sources":["../src/DetailView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0C/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAA4B,MAAM,kBAAkB,CAAC;AAwF/F,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4+ChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderHighlight.d.ts","sourceRoot":"","sources":["../src/HeaderHighlight.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASvD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsN1D,CAAC"}
1
+ {"version":3,"file":"HeaderHighlight.d.ts","sourceRoot":"","sources":["../src/HeaderHighlight.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAavD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8N1D,CAAC"}
@@ -18,6 +18,77 @@ import * as React from 'react';
18
18
  * the package's public name unchanged.
19
19
  */
20
20
  export { TEXTUAL_REF_FALLBACK_TYPES };
21
+ /**
22
+ * Test id on the terminal raw text input at the end of this component.
23
+ *
24
+ * The one editor in here that is lossy by construction — it displays through
25
+ * `coerceToSafeValue` and emits a STRING — so "did this type reach the terminal
26
+ * input?" is the question the drift guard has to answer EXACTLY, in both
27
+ * directions. Sniffing `input[type="text"]` cannot: `TextField`, `ColorField`
28
+ * and `QRCodeField` render one too, so the heuristic reads a benign type's
29
+ * correct fallback and a delegated type's correct widget as the same thing.
30
+ */
31
+ export declare const INLINE_PLAIN_TEXT_INPUT_TESTID = "inline-plain-text-input";
32
+ /**
33
+ * **Class D** — field types whose stored value is ALREADY a string, so the
34
+ * terminal input's stringification is the identity and nothing is lost
35
+ * (objectui#4220). These, and only these, keep that input.
36
+ *
37
+ * Enumerated rather than expressed as "everything the switch didn't match":
38
+ * an open tail is what let `tags`, `checkboxes`, `toggle`, `slider`, `radio`
39
+ * and friends land on a value-destroying editor in silence for six cards
40
+ * running. A new field type is now a RED drift guard until someone decides
41
+ * which of the four buckets it belongs in — see
42
+ * `__tests__/inlineEditTypeCoverage.test.tsx`.
43
+ *
44
+ * `select` is deliberately absent: it has a routed branch (the picklist), and
45
+ * only its degenerate options-less SINGLE-value form reaches the terminal
46
+ * input — see {@link usesInlinePlainTextInput}. `markdown` / `html` /
47
+ * `richtext` are absent because the hosts never open an editor for them at all
48
+ * (they are in the fields package's shared exclusion, consulted since #4228).
49
+ */
50
+ export declare const INLINE_PLAIN_TEXT_FIELD_TYPES: Set<string>;
51
+ /**
52
+ * The type switch's own manifest: every type this component routes to a
53
+ * dedicated editor before the delegation below is reached.
54
+ *
55
+ * Declared next to the switch so the four-way classification is readable in
56
+ * ONE place, and pinned by rendering — the drift guard asserts each member
57
+ * really produces something other than the terminal input, so an entry that
58
+ * outlives its branch fails rather than quietly re-opening the plain-text path
59
+ * (the discipline #4228 established for `DETAIL_ROUTED_INLINE_TYPES`).
60
+ *
61
+ * `select` / `multiselect` are routed only WITH options; the options-less
62
+ * spellings are covered by {@link usesInlinePlainTextInput} (single, a bare
63
+ * string) and by the delegation (multi-value, an array). Both are pinned by
64
+ * name in the guard.
65
+ */
66
+ export declare const INLINE_ROUTED_FIELD_TYPES: Set<string>;
67
+ /**
68
+ * Is this a field type the form actually knows, rather than an unrecognized
69
+ * string?
70
+ *
71
+ * `mapFieldTypeToFormType` FALLS BACK to `field:text` for anything it has no
72
+ * entry for, which makes `hasFieldEditWidget()` answer `true` for every string
73
+ * on earth. Delegating on that answer alone would quietly hand a typo'd or
74
+ * private type (`decimal`, `integer` — deliberately not aliased, see the
75
+ * numeric branch) to `TextField` instead of leaving it on the documented
76
+ * fallback, and would let the drift guard's "delegated" bucket swallow a NEW
77
+ * spec type that nobody has decided about. Both are the recurrence this card
78
+ * exists to stop, so the alias fallback is not treated as a decision.
79
+ */
80
+ export declare function isKnownFieldType(type: string | undefined): boolean;
81
+ /**
82
+ * Does this field edit in the terminal raw text input (class D)?
83
+ *
84
+ * The options-less SINGLE `select` is the one conditional member. Its stored
85
+ * value is a bare string, so the text input is lossless — while the fields
86
+ * package's own widget would render its "no options to offer" state, leaving
87
+ * the user unable to enter anything at all. The `multiple` spelling of the same
88
+ * degenerate field is NOT benign: its value is an array, so it delegates and
89
+ * keeps that array (class A).
90
+ */
91
+ export declare function usesInlinePlainTextInput(field: Record<string, any>): boolean;
21
92
  /**
22
93
  * Extract the id a reference widget expects from a value that may already be
23
94
  * an `$expand`-ed record object (`{ id, name, ... }`), an array of those, or a
@@ -48,11 +119,13 @@ export interface InlineFieldInputProps {
48
119
  * `DetailSection` so any record-level surface — the details body AND the
49
120
  * highlights strip (objectui#2407) — renders an identical editor. Covers every
50
121
  * widget the detail body handles: `SelectField`, `BooleanField`, `LookupField`,
51
- * `UserField`, `CapabilityMultiSelectField` (#2403), the `permission-facet-link`
52
- * read-only facet (#2403), the numeric widgets (`NumberField` /
53
- * `CurrencyField` / `PercentField`, objectui#2572), and the plain date/text
54
- * input (with ISO date coercion + object-value guarding so an unexpanded
55
- * reference never leaks "[object Object]").
122
+ * `UserField`, the `permission-facet-link` read-only facet (#2403), the numeric
123
+ * widgets (`NumberField` / `CurrencyField` / `PercentField`, objectui#2572), the
124
+ * structured composites (`AddressField` / `LocationField` / `GeolocationField`,
125
+ * objectui#4216 — their value is an OBJECT, so the text fallback both displayed
126
+ * and WROTE it wrong), and the plain date/text input (with ISO date coercion +
127
+ * object-value guarding so an unexpanded reference never leaks
128
+ * "[object Object]").
56
129
  *
57
130
  * Editability GATING (computed types, `readonly`, system fields, object
58
131
  * lifecycle) stays with the host — this component only renders the editor once
@@ -1 +1 @@
1
- {"version":3,"file":"InlineFieldInput.d.ts","sourceRoot":"","sources":["../src/InlineFieldInput.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;;;;;;;;GASG;AACH,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQvD;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,iFAAiF;IACjF,KAAK,EAAE,GAAG,CAAC;IACX,oEAAoE;IACpE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+J5D,CAAC"}
1
+ {"version":3,"file":"InlineFieldInput.d.ts","sourceRoot":"","sources":["../src/InlineFieldInput.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;;;;;;;;GASG;AACH,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAEtC;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,4BAA4B,CAAC;AAExE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,6BAA6B,aAMxC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,aAYpC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAK5E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQvD;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,iFAAiF;IACjF,KAAK,EAAE,GAAG,CAAC;IACX,oEAAoE;IACpE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAoO5D,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { RelatedRowActionDef } from '@object-ui/react';
2
2
  import { DataSource } from '@object-ui/types';
3
+ import { ViewFilterRule } from '@objectstack/spec/ui';
4
+ import { FilterNode } from '@object-ui/core';
3
5
  /**
4
6
  * ObjectUI
5
7
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -35,13 +37,18 @@ export interface RelatedListProps {
35
37
  * case), or — when `linkField` is omitted — re-parents the picked child by
36
38
  * setting its `referenceField` to `parentId` (1:m case). Server-side rules on
37
39
  * insert (e.g. the AI-seat cap) surface as an inline error.
40
+ *
41
+ * `picker.filter` restricts which records the dialog offers, and is typed as
42
+ * the spec's own `ViewFilterRule[]` rather than `any` (#3831): it goes to
43
+ * `RecordPickerDialog`'s `baseFilter` VERBATIM, so the authored vocabulary is
44
+ * the one enforced — a looser type here is where a wrong shape would hide.
38
45
  */
39
46
  add?: {
40
47
  picker: {
41
48
  object: string;
42
49
  valueField?: string;
43
50
  labelField?: string;
44
- filter?: any;
51
+ filter?: ViewFilterRule[];
45
52
  };
46
53
  linkField?: string;
47
54
  label?: string;
@@ -89,6 +96,29 @@ export interface RelatedListProps {
89
96
  * @default false
90
97
  */
91
98
  sortable?: boolean;
99
+ /**
100
+ * The list's OWN scope filter — spec `RecordRelatedListProps.filter`
101
+ * ("Additional filter criteria for related records"), which had no read site
102
+ * on this component at all until objectstack#7118: the query was built from
103
+ * `{ [referenceField]: parentId }` alone, so an authored `filter` (and the
104
+ * FILTER half of a `dataSource` binding's saved view) was accepted by every
105
+ * gate and silently dropped — the list answered wider than the metadata asked.
106
+ *
107
+ * ANDed with the parent-relationship condition, never substituted for it:
108
+ * "additional" means it may only narrow this parent's children. That is also
109
+ * why it is not routed through `data-table`'s `lookupFilters` — those render
110
+ * as filter-bar rows the user can edit, which demotes the author's constraint
111
+ * to a suggestion (#3831 argued this for `add.picker.filter`; it holds harder
112
+ * for the list's own scope).
113
+ *
114
+ * Two shapes arrive, both produced by our own layers: the spec vocabulary
115
+ * (`ViewFilterRule[]`) as authored, and an ObjectQL AST node as composed by
116
+ * `ElementDataSourceGate` (which ANDs component/view/binding filters through
117
+ * `mergeFilterNodes` before this component ever sees them). Both are lowered
118
+ * here through that same single sink — the repo's one filter→wire exit — so no
119
+ * second conversion dialect appears.
120
+ */
121
+ filter?: ViewFilterRule[] | FilterNode;
92
122
  /** Enable text filtering */
93
123
  filterable?: boolean;
94
124
  /** Whether the card is collapsible */
@@ -1 +1 @@
1
- {"version":3,"file":"RelatedList.d.ts","sourceRoot":"","sources":["../src/RelatedList.tsx"],"names":[],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oot":"","sources":["../src/autoLayout.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAoCxD;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAmBtF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,eAAe,EAAE,EACzB,OAAO,EAAE,MAAM,GACd,eAAe,EAAE,CAcnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,eAAe,EAAE,EACzB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,cAAc,CAAC,EAAE,MAAM,GACtB;IAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAchD"}
@@ -17,6 +17,22 @@
17
17
  * machine-computed is part of resolving a detail field's shape out of the view
18
18
  * entry plus the object schema, not the private business of any one component.
19
19
  * Re-exported from `InlineFieldInput` under its historical name.
20
+ *
21
+ * **Both spellings of the auto-number type are members** (objectui#4219).
22
+ * `@objectstack/spec` — and the designer, and the importer — spell it
23
+ * `autonumber`; `auto_number` is the widget map's key, and the alias table
24
+ * (`fields/src/field-type-alias.ts`) maps both onto `field:auto_number`. This
25
+ * set is matched by RAW spelling, so carrying one of them is carrying half the
26
+ * type: `plugin-form` lists both in each of its non-input sets, and this is the
27
+ * shape that was missing here. The gap was not academic — the reader that has
28
+ * no host gate in front of it is `InlineFieldInput`'s reference fallback
29
+ * (`!!field.reference_to && !TEXTUAL_REF_FALLBACK_TYPES.has(type)`), on
30
+ * exported public API, so a spec-spelled auto-number carrying a `reference_to`
31
+ * resolved into the RECORD PICKER — a list of records offered as replacements
32
+ * for a machine-generated identity. The editability half of the same report is
33
+ * held by the alias-aware shared exclusion since #4228; the two gates are a
34
+ * union, and matching spellings is what stops that union's survivability from
35
+ * depending on which spelling the metadata happens to use.
20
36
  */
21
37
  export declare const TEXTUAL_REF_FALLBACK_TYPES: Set<string>;
22
38
  /**
@@ -44,6 +60,51 @@ export declare const TEXTUAL_REF_FALLBACK_TYPES: Set<string>;
44
60
  * how a view declares "this column is computed elsewhere".
45
61
  */
46
62
  export declare function isComputedFieldType(viewFieldType: unknown, objectFieldType: unknown): boolean;
63
+ /**
64
+ * Members of the fields package's `INLINE_EXCLUDED_FIELD_TYPES` that the DETAIL
65
+ * editor nevertheless routes to a dedicated widget, and therefore keeps.
66
+ *
67
+ * The shared set is one list carrying several arguments, and only some of them
68
+ * are about the value. The binary/attachment family is excluded there for a
69
+ * GRID-cell reason — its own comment reads "edited from the record form, shown
70
+ * read-only **in the grid**" — because a cell cannot host an upload dropzone.
71
+ * A detail row can, and does: `InlineFieldInput` routes `image`/`avatar`/
72
+ * `signature`/`file` (and the `video`/`audio` spellings of `file`) to the very
73
+ * widgets the record form uses, added deliberately so inline edit could preview,
74
+ * replace and remove files instead of showing a bare storage URL.
75
+ *
76
+ * The credential and container members are excluded for a VALUE reason — masked
77
+ * on read, or object-shaped — and that argument transfers to the detail page
78
+ * verbatim, because the detail fallback is the same plain text input the grid's
79
+ * is. Those stay excluded here.
80
+ *
81
+ * Every entry is pinned twice by `__tests__/inlineCredentialGate.test.tsx`: it
82
+ * must be a real member of the shared set, and `InlineFieldInput` must really
83
+ * render something other than the terminal text input for it. An exemption that
84
+ * outlives its routing therefore fails, rather than silently re-opening the
85
+ * plain-text path this gate exists to close.
86
+ */
87
+ export declare const DETAIL_ROUTED_INLINE_TYPES: Set<string>;
88
+ /**
89
+ * Is this field one the fields package excludes from inline editing, given the
90
+ * type authored on the view entry and the type declared on the object schema?
91
+ *
92
+ * The rule itself is NOT restated here — it is `isInlineExcludedFieldType()`
93
+ * from `@object-ui/fields`, the same alias-aware contract the grid consults
94
+ * (`plugin-grid/src/inline-edit-options.ts`). The detail hosts used to gate on
95
+ * readonly / computed / system only, so `password` and `secret` — masked on
96
+ * read, with no real value to seed an editor from — reached the terminal plain
97
+ * text input, which rendered the mask as if it were the value and wrote it
98
+ * straight back over the credential (objectui#4221). The container family
99
+ * (`object`/`composite`/`record`/`grid`/`repeater`/`vector`) rode the same
100
+ * fallback with an object-shaped value.
101
+ *
102
+ * **Narrow-only, like {@link isComputedFieldType}** — the answer is the UNION of
103
+ * the two types, so an authored display `type` can lock a field but never
104
+ * unlock one (objectui#3355). An `image` authored over an object `secret` stays
105
+ * locked: the exemption is consulted per type, before the union.
106
+ */
107
+ export declare function isInlineExcludedDetailFieldType(viewFieldType: unknown, objectFieldType: unknown): boolean;
47
108
  /**
48
109
  * Object-metadata keys carried onto a detail-view field so the read cell and
49
110
  * the inline editor see the SAME resolved field shape the object form does.
@@ -1 +1 @@
1
- {"version":3,"file":"fieldEnrichment.d.ts","sourceRoot":"","sources":["../src/fieldEnrichment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,aAKrC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,OAAO,EACtB,eAAe,EAAE,OAAO,GACvB,OAAO,CAKT;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,+cA+C/B,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,GACrD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAiBrB"}
1
+ {"version":3,"file":"fieldEnrichment.d.ts","sour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