@object-ui/plugin-detail 17.5.0 → 17.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,480 @@
1
1
  # @object-ui/plugin-detail
2
2
 
3
+ ## 17.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 279fb13: `ComponentInput.type` can declare a UNION, so a block stops warning about legal
8
+ writes its own description recommends
9
+
10
+ A registration's `type` was one coarse control kind, while a good number of spec
11
+ keys accept more than one shape. A declaration therefore had to pick an arm, and
12
+ the repo's own manifest gate then reported `type-mismatch` on the other arm's
13
+ legal values. Four of the five measured cases were the loud shape: the input's
14
+ `description` teaches the author to write an inline translation map
15
+ (`{ en, "zh-CN", … }`) while the same input's `type: 'string'` made
16
+ `sdui-parser`'s `checkType` warn about exactly that map — one platform authority
17
+ contradicting itself on the write it had just recommended. Because these land at
18
+ warning severity the page still compiled and rendered; the cost is that noise on
19
+ correct authoring trains authors, AI authors included, to dismiss the
20
+ `unknown-prop` and `type-mismatch` reports that are real.
21
+
22
+ `type` now accepts an ARRAY of coarse kinds as well as a single one (maintainer
23
+ ruling on objectui#3832, direction (a)), and a value passes the coarse check when
24
+ ANY declared arm accepts it. Both declaration sites in `@object-ui/types` move
25
+ together with the registry's own copy in `@object-ui/core`, and
26
+ `ComponentInputSchema` enforces the same widening — a non-empty array of
27
+ DISTINCT kinds, so an empty arm list or a repeated arm is refused at authoring
28
+ time rather than normalized behind the author's back.
29
+
30
+ Five declarations now spell their real contract, and the `type-mismatch` warning
31
+ on each of these legal writes is gone:
32
+
33
+ - `page:header.title`, `page:header.subtitle`, `page:card.title` —
34
+ string **or** inline translation map (the spec's union, measured against
35
+ `ComponentPropsMap` at the pinned rc.6; the renderers resolve both through
36
+ `pickLocalized`);
37
+ - `record:alert.title`, `record:alert.body` — the same two shapes, justified
38
+ against the RENDERER since the pinned spec carries no `record:alert` props
39
+ schema;
40
+ - `element:text_input.defaultValue` — `string | number`, the spec's union,
41
+ which had been narrowed to `'string'` with the number arm named only in prose.
42
+
43
+ **Backward compatible, and measured as such.** The single-kind form stays valid
44
+ and is still the canonical spelling for a one-arm key: it validates identically
45
+ (the diagnostics for one arm, `invalid-enum` and its `error` severity included,
46
+ are byte-identical), and `manifestFromConfigs` collapses a one-element array back
47
+ to the bare string, so every entry already in a published `sdui.manifest.json`
48
+ serializes unchanged and arrays appear only where a union was really declared.
49
+ The JSX authoring surface follows in the same step — `generateDts` emits a
50
+ TypeScript union for a union input, so the `.d.ts` an author type-checks against
51
+ accepts exactly what the gate accepts.
52
+
53
+ A union widens what is legal; it does not switch the check off. A value matching
54
+ NO declared arm is still reported, a multi-arm mismatch reports at its strictest
55
+ arm's severity (`error` when an `enum` arm is present, so an enum's closed list
56
+ does not become dismissible by having a second arm added next to it), and arms
57
+ are meant to match the contract rather than relax the gate:
58
+ `element:text_input.defaultValue` deliberately gains no `object` arm because the
59
+ spec rejects a map there, and `element:record_picker.emptyText` keeps its single
60
+ `'string'` arm because that renderer drops the map form (objectui#4163) — an arm
61
+ the renderer never honours would advertise a shape that cannot reach the screen.
62
+ - 8b9dc62: `element:text.content` and `element:button.label` declare the inline translation
63
+ map they already accept
64
+
65
+ Two more instances of the contradiction objectui#3832 fixed the mechanism for,
66
+ measured after that ruling had fixed its scope at five specimens and filed
67
+ separately as objectui#4970. Both inputs' own `description` tells the author to
68
+ write an inline translation map (`{ en, "zh-CN", … }`), both renderers resolve one
69
+ through `pickLocalized`, and both spec props schemas accept one — while the
70
+ declaration said `type: 'string'`, so the manifest gate reported
71
+ `type-mismatch` on the exact shape the block had recommended. Both blocks are in
72
+ `PUBLIC_BLOCKS`, so this reached authors through `sdui.manifest.json` and
73
+ `sdui-intrinsics.d.ts` as well as the save gate.
74
+
75
+ Each declaration is now `type: ['string', 'object']`, the union form
76
+ objectui#3832 introduced, and the arms are the ones the contract accepts —
77
+ re-measured on the `@objectstack/spec` 17.0.0 GA pin rather than carried over
78
+ from the issue, which was written at the 17.0.0-rc.6 pin:
79
+ `ComponentPropsMap['element:text'].content` and
80
+ `ComponentPropsMap['element:button'].label` are both
81
+ `string | Record< string, string >`, and both refuse a number, a boolean and an
82
+ array. Those three refusals are the controls in the acceptance test, which is
83
+ what keeps a widening distinguishable from a silenced check.
84
+
85
+ Nothing else about the two blocks moves. A plain-string `content` / `label`
86
+ validates exactly as before, values matching neither arm are still reported, and
87
+ no other manifest entry changes shape — the public manifest now carries seven
88
+ array-valued input types, the five from objectui#3832 plus these two, with the
89
+ remaining 57 public blocks serializing byte for byte as they did.
90
+
91
+ `record:alert`'s renderer-local prop type is corrected in the same pass
92
+ (`plugin-detail`): its `title` / `body` were still typed `string` while the same
93
+ file resolves both through `pickLocalized` and the block's published `inputs`
94
+ have declared `['string', 'object']` since objectui#3832, so the two slots were
95
+ narrower than both the renderer and the block's own published surface. The type
96
+ is not exported, so no consumer was misled and no published surface changes. The
97
+ CTA's `action.label` one level down is left alone on purpose (objectui#4998):
98
+ `action` is published as a bare `object` whose member shape lives in prose, so
99
+ there are no declared arms for it to be aligned against yet.
100
+ - 98eab36: Publish the five `@objectstack/spec` 17.0.0 keys the renderers already honoured, so
101
+ authors can discover them
102
+
103
+ `page:header.maxVisible`, `page:header.mobileMaxVisible`, `page:tabs.alwaysShowStrip`,
104
+ `record:details.inlineEdit` and `record:details.showHeader` are declared by the spec and
105
+ read by the renderers today, and none of them was in its block's published `inputs`. That
106
+ is the direction nothing reports: `gen-manifest.ts` left all five out of
107
+ `sdui.manifest.json` and `sdui-intrinsics.d.ts`, so they were in no designer panel and no
108
+ generated type; `sdui-parser`'s prop walk reported `unknown-prop` on an author who wrote
109
+ one anyway; and the renderer honoured it regardless. Measured on the console's own
110
+ manifest before this change, all five drew
111
+
112
+ ```
113
+ unknown-prop: page:header has no prop "maxVisible"
114
+ unknown-prop: page:header has no prop "mobileMaxVisible"
115
+ unknown-prop: page:tabs has no prop "alwaysShowStrip"
116
+ unknown-prop: record:details has no prop "inlineEdit"
117
+ unknown-prop: record:details has no prop "showHeader"
118
+ ```
119
+
120
+ and now draw nothing. Same defect as `record:details.hideFields` in objectui#3808 and
121
+ `readonly` in objectui#3407; it could not land until the GA pin moved (objectui#4636),
122
+ because the pre-GA pin declared none of the five and publishing them would have failed the
123
+ repo-wide parity gate's forward direction.
124
+
125
+ Each entry carries a description, because for these keys the discoverability IS the fix.
126
+ Two are worth reading before use:
127
+
128
+ - `maxVisible` / `mobileMaxVisible` are positive integers — the contract rejects `0` and
129
+ fractional values — and they do not govern every action: an action declaring
130
+ `record_more` without `record_header`, and any action with `component: 'action:menu'`,
131
+ is routed to the overflow menu regardless of the budget.
132
+ - `inlineEdit` is an opt-OUT only. The value is combined with the object's own resolved
133
+ editability (ADR-0103) and with the server's effective API operation set, so `false`
134
+ always wins while `true` cannot open editing the platform refuses.
135
+
136
+ **`page:tabs` also gains a read.** `alwaysShowStrip` was honoured only as
137
+ `schema.properties.alwaysShowStrip`, while `inputs` publishes TOP-LEVEL keys — the shape
138
+ the manifest whitelists, the generated types declare and the JSX-page compiler validates.
139
+ Measured on a one-tab schema: the wrapped form showed the strip, the flat form did not, so
140
+ publishing the key alone would have advertised a write the renderer throws away. The
141
+ canonical top-level arm is read first now, with the `properties` arm kept for paths that
142
+ reach the renderer without `SchemaRenderer`'s hoist — the same dual read `maxVisible` has
143
+ always had. This can only ever ADD a strip to a one-tab page; multi-tab pages are
144
+ unaffected, and `false` and non-boolean values both read as "not set".
145
+
146
+ The five GA-pending entries that held this card's place in
147
+ `registry-inputs-spec-parity.test.ts` are deleted, which is what the gate's own
148
+ `carries no stale unpublished-key exemption` check demands once the keys are published.
149
+
150
+ ### Patch Changes
151
+
152
+ - 7c297e3: Retire `permission_change`, `export`, and `restore` from the audit-log action filter (`AuditLogPage`'s `ACTION_OPTIONS`) and badge maps (`AuditLogPage` and `HistoryTimeline`'s `ACTION_VARIANT`). These three values never had a writer anywhere on the platform, so the filter always returned zero rows for them and the badges never rendered — a visible product defect (audit surface should be narrow-but-honest, not broad-but-lying). `import`, `login`, and `config_change` are kept: `import` has a real writer (`plugin-auth`'s `admin-import-users.ts`) and is still declared by the server enum and filtered by the `config_changes` list view; `login`/`config_change` gained real writers in objectstack#8144/#8145.
153
+ - c1ef923: Grid and related-list column headers no longer offer a sort on a `formula` column.
154
+
155
+ A `formula` value is computed on read: no driver materialises a column for it, so
156
+ a server `$orderby` naming one has nothing to order by. That sort never worked.
157
+ Until objectstack#6994 the platform did not say so — the response carried the very
158
+ values it had been asked to order by, out of order, under a `200`, with ascending
159
+ and descending byte-identical on a real SQL driver — and it now answers
160
+ `400 INVALID_SORT`. So the header was wrong before the platform's refusal and is
161
+ wrong after it, for the same reason: it offers a sort that cannot be performed.
162
+
163
+ `ObjectGrid` withheld the affordance only from reference-bearing columns
164
+ (objectui#3096). Unmaterialized types are a SECOND reason a server sort is
165
+ impossible, not a different mechanism, so it now reads both — and so do the two
166
+ sort entry points of a related list (the embedded table's headers and the
167
+ sort-button row a `data-list` card keeps), which each derived that rule
168
+ separately.
169
+
170
+ Client-side sorting is deliberately unchanged. There the rows are all in the
171
+ browser and the formula value is the one the server hydrated on read, so ordering
172
+ by what the cell shows is honest — the same split the relational carve-out makes.
173
+ A sort DECLARED in view metadata is also unchanged: it still goes out and is still
174
+ refused by name, because silently dropping an author's declaration would hide the
175
+ authoring error instead of surfacing it (the toolbar's sort picker keeps such a
176
+ field listed for exactly that reason — it is the only way to remove it).
177
+
178
+ The membership — `formula` alone — moved out of a private set in `ListView` into
179
+ `@object-ui/core` (`UNMATERIALIZED_FIELD_TYPES` / `isUnmaterializedFieldType`),
180
+ bound to `@objectstack/spec`'s own storage predicate so the renderer cannot drift
181
+ from what the drivers actually store. It is deliberately narrower than the spec's
182
+ write contract `COMPUTED_VALUE_TYPES`: a `summary` and an `autonumber` each get a
183
+ real maintained column and sort correctly, and withholding their headers would
184
+ have broken two affordances that work.
185
+ - 5607092: objectui#4029 — the repo root now lints `no-console` (`error`, allowing
186
+ `warn`/`error`) so a stray module- or function-scope `console.log`/`info`/
187
+ `debug` fails CI instead of shipping silently (as `console.log('Registering
188
+ object-map...')` did in #7139, caught only by hand). Landing the rule meant
189
+ individually judging every real hit outside the tooling exemptions
190
+ (`scripts/**`, `**/examples/**`, test files, `packages/cli/src/**`,
191
+ `packages/create-plugin/src/**`) — this changeset covers the published
192
+ packages whose call sites changed:
193
+
194
+ - `@object-ui/app-shell`: `ObjectDataPage`'s dropped-URL-filter message is a
195
+ real diagnostic (data silently discarded), so it moves from `console.debug`
196
+ to `console.warn` to match the house convention.
197
+ - `@object-ui/plugin-detail`: `DetailView`'s Web Share API failure now reports
198
+ via `console.error` (it is a real failure, not debug noise); a redundant
199
+ "Link copied to clipboard" success log is removed.
200
+ - `@object-ui/fields`: `MasterDetailField`'s `handleView` stub no longer logs
201
+ the item it does nothing with.
202
+ - `@object-ui/runner`: `App`'s loader-selection debug prints, `LayoutRenderer`'s
203
+ unused click-handler stub log, and `MockDataSource`'s per-call narration
204
+ (`find`/`create`/`getObjectSchema`) are removed — none diagnosed a problem,
205
+ they only echoed the happy path.
206
+ - `object-ui` (VS Code extension): the "extension is now active!" activation
207
+ log is removed.
208
+
209
+ No behavior changes beyond console output. `@object-ui/core` and
210
+ `@object-ui/data-objectstack` also touch `no-console`-adjacent lines
211
+ (`debugLog`/`debugTime`/`debugTimeEnd`, `createQuietHttpLogger`) but only to
212
+ add `eslint-disable-next-line` documentation — those ARE the repo's
213
+ deliberate debug/logger infrastructure, not leaked residue, so their own
214
+ changeset carries empty frontmatter.
215
+ - 598c89a: The retired `owner` field-type spelling stops being blessed by the published contract, and inline edit refuses it the way the record form already does.
216
+
217
+ objectui#4814 retired `owner` as a field type (ruling A′): it was a synonym for
218
+ `user` with zero behavioral delta — both resolved to the same person-picker
219
+ widget — and it was never a member of `@objectstack/spec`'s closed `FieldType`,
220
+ so no object schema could ever declare it. `@object-ui/fields` now answers the
221
+ spelling with a visible tombstone refusal plus a console prescription. That PR
222
+ shrank the three public DOC unions; their CODE twins were left behind, so this
223
+ package spent the interval telling an author "legal" for a word the renderer
224
+ refuses.
225
+
226
+ **`@object-ui/types` — the three published twins shrink (objectui#4914 items 1-3).**
227
+ `ReportFieldSchema.type` (`zod/reports.zod.ts`) is a RUNTIME validator, so the
228
+ contradiction was executable, not merely advisory: a report document authored
229
+ with `type: 'owner'` validated green and then rendered a refusal. It now fails
230
+ validation, with the issue on the `type` path. Its TS twin `ReportField['type']`
231
+ and `UserFieldMetadata['type']` drop the member in the same batch, so published
232
+ `.d.ts` autocomplete stops offering it. This is an accept-set SHRINK on a
233
+ published validator and a narrowing of two published unions — patch-level
234
+ because the spelling it removes has had no working renderer since #4814, but
235
+ callers still passing `type: 'owner'` will now see a type error and a failed
236
+ parse. The record-owner idiom survives verbatim as
237
+ `{ type: 'user', name: 'owner' }`: the field NAME carries the ownership meaning,
238
+ the type carries the widget.
239
+
240
+ **`@object-ui/plugin-detail` — inline edit joins the tombstone (objectui#4914 item 5).**
241
+ `InlineFieldInput` routes by a STORED field's actual type, so a record whose
242
+ field is still typed `owner` was getting a working person picker inline while
243
+ the record form showed the refusal — two edit surfaces disagreeing about one
244
+ field, which is worse than either uniform outcome. A retired spelling now
245
+ renders the same `RetiredFieldTombstone` the form does, reported once per
246
+ spelling rather than once per row. The table is read live from
247
+ `@object-ui/fields`, so a future retirement is covered the day it lands.
248
+
249
+ Measured while implementing, and the reason the refusal is the load-bearing
250
+ half: simply deleting `owner` from the inline routing table would have changed
251
+ nothing an author could see. `hasFieldEditWidget('owner')` is still true — the
252
+ fields package maps `owner: UserField` in `EDIT_WIDGETS` — so the type would
253
+ have reached the same picker down the delegation road instead of the routing
254
+ road. That residual face is outside this change's scope and is filed separately.
255
+ - 7dd93c0: `record:quick_actions` reads the toolbar's accessible name under the spelling the ARIA contract accepts, and stops advertising an action fallback it never had.
256
+
257
+ Two producer-side defects in the same component (objectui#4663), found while
258
+ objectstack#8744 measured this renderer's read points.
259
+
260
+ **The `aria` read point was dead in both directions.** The toolbar read
261
+ `schema.aria?.label` and nothing else — the ONE spelling `@objectstack/spec`'s
262
+ `AriaPropsSchema` refuses. On that closed shape `label` is an ALIAS ENTRY: a
263
+ rename prescription pointing at `ariaLabel`, there to produce a better rejection
264
+ message, never accepted (measured: `safeParse({ label })` returns
265
+ `unrecognized_keys` naming `label`, while `safeParse({ ariaLabel })` passes). So
266
+ a spec-valid `aria: { ariaLabel: 'Account actions' }` reached the renderer and
267
+ was read by nothing — the built-in "Quick actions" default won every time — and
268
+ the spelling that did work was one no author can write without the contract
269
+ rejecting the document. `SchemaRenderer`'s generic ARIA channel was no escape
270
+ hatch either: it reads the FLAT `schema.ariaLabel` and injects `aria-label` as a
271
+ component prop, which this renderer drops along with every other non-designer
272
+ prop.
273
+
274
+ The read is now `(aria.ariaLabel ?? aria.label) || 'Quick actions'`. The legacy
275
+ leg is back-compat only, for documents stored before the contract closed;
276
+ canonical wins when both are present. Both halves follow how the repo already
277
+ handles this key: `normalizeListViewSchema`'s aria fold copies the legacy key
278
+ across only when the canonical one is `undefined` (so a declared `ariaLabel: ''`
279
+ shadows a stale `label`), and `ListView`'s own read point treats an empty string
280
+ as no accessible name at all — which here resolves to the built-in default,
281
+ since `role="toolbar"` needs a name.
282
+
283
+ **The `actionNames` description promised a fallback that exists on no path.** It
284
+ read "(else every action declared for the object at this location)". Measured:
285
+ with no `actionNames` and no host-supplied `actions`, `namesToResolve` is empty,
286
+ `needsLookup` is false, the object metadata is never queried, and the bar renders
287
+ its dashed placeholder. The registry `inputs` are published — they are serialized
288
+ into `sdui.manifest.json` and the JSX authoring types, and Studio teaches authors
289
+ from them — so the promise reached tooling; objectstack#8744's dispatch prompt
290
+ quoted it verbatim as a declared input. Per the triage ruling the sentence is
291
+ what changes: implementing the fallback would be a behaviour expansion and needs
292
+ its own card. No runtime behaviour changes with it, and a regression test now
293
+ drives a LOADED metadata provider to prove the object's declared actions really
294
+ are not pulled in (with a control proving the same wiring delivers them the
295
+ moment a name asks).
296
+ - 229b17e: 修复相关列表(`RelatedList`)以 spec 规范拼写 `field` 声明的对象列只出表头、单元格全空的问题(objectui#5022)。
297
+
298
+ `RelatedList` 的所有身份读点都经由 `columnIdentity` 规范优先解析,因此
299
+ `{ field: 'status', label: 'Status' }` 能通过 FLS 过滤、外键过滤、空列裁剪与排序判定;而它喂给的
300
+ `data-table` 只按 `col.accessorKey || col.name` 归一化访问键,从不读 `field`,于是每个单元格取的是
301
+ `row[undefined]`,渲染成空值占位符 —— 与 objectui#3951 同形,只差一种拼写。
302
+
303
+ 现在 `normalizeColumn` 在把对象列交给表格前,把解析出的身份写回 `accessorKey`:
304
+ 词表解析留在 `RelatedList` 一侧,不并入表格适配器(`column-identity.ts` 有意画下的
305
+ `TABLE_ADAPTER_COLUMN_KEY` 边界)。作者已显式声明的 `accessorKey` 不被覆盖,原有拼写一并保留,
306
+ 无法解析出身份的条目原样返回。legacy `name` 拼写、字符串列与显式 `accessorKey` 列行为不变。
307
+
308
+ 同一处身份现在同时供给单元格取数与表头排序 —— 此前 `field` 列的表头排序派发的是
309
+ `undefined` 字段(被 `RelatedList` 丢弃),该列在取数与排序两个方向上同时失效。
310
+ - dfc6975: Related-list "+ New" now honours `userActions.create` predicates, and the grid
311
+ toolbar's inline-edit affordance is gated on `update` permission (objectui#4646,
312
+ objectui#4647).
313
+
314
+ Two declared-but-unenforced gaps on the same toolbar surface.
315
+
316
+ **#4646 — `createPredicates` had a producer and no consumer.**
317
+ `@objectstack/spec@17.0.0` widened `userActions.create` to
318
+ `z.union([z.boolean(), RowCrudActionOverrideSchema])`, so `resolveCrudAffordances`
319
+ emits `createPredicates` — and nothing in objectui read them, against roughly
320
+ fifteen consumption sites apiece for `editPredicates` / `deletePredicates`. The
321
+ symptom: a parent record entering a frozen state correctly greyed its children's
322
+ row Edit/Delete while the related list's "+ New" stayed fully live, so the user
323
+ filled in the whole child form to earn a server 409. The related-list toolbar now
324
+ evaluates `visibleWhen` / `disabledWhen` **once against the host parent record**,
325
+ per the spec docblock's binding for this key, on top of the existing
326
+ `o.create ∧ can(child, 'create')` check. `visibleWhen` hides "+ New" and fails
327
+ CLOSED; `disabledWhen` greys it and fails SOFT — the same evaluator, fail
328
+ directions and hidden-vs-disabled split the record header already uses for
329
+ edit/delete (objectui#4419 / PR #4515). A bare-boolean `userActions.create` is
330
+ untouched: with no predicates there is nothing to evaluate.
331
+
332
+ **#4647 — the inline-edit toggle was the one ungated affordance on its toolbar.**
333
+ It rendered on "grid view ∧ the host wired `onInlineEditChange` ∧ not the compact
334
+ toolbar", and every host wires that callback unconditionally. New and Import are
335
+ hidden for an account without the grant and the bulk-delete entry on the same
336
+ toolbar ANDs `can(obj, 'delete')`, but a read-only principal could flip inline
337
+ edit, modify cells and press "Save all" to earn a server 403. It is now gated on
338
+ the object's resolved edit affordance ∧ `can(object, 'update')`, mirroring that
339
+ bulk-delete gate. The gate is applied at all three sites that carry this
340
+ affordance — the wide toolbar's toggle, the compact toolbar's settings-popover
341
+ entry (which previously had no gate at all, not even the callback), and the
342
+ `editable` mode handed to the grid, so a stored view carrying `inlineEdit: true`
343
+ can no longer drop a read-only principal into editable cells with no toggle to
344
+ press.
345
+
346
+ `ListViewSchema.userActions.editInline` is also consumed now: an explicit `false`
347
+ withholds the affordance wholesale, which authors previously could not do.
348
+
349
+ **Behaviour change for read-only users, stated plainly.** Where the UI used to
350
+ offer inline editing and let the server refuse it, it now declines to offer the
351
+ entry point at all. No data access changes — the server gate was and remains the
352
+ enforcement boundary; this only stops the UI walking users into round-trips
353
+ guaranteed to fail. Accounts *with* the grant see no change, and hosts with no
354
+ `PermissionProvider` mounted (standalone embeds, the Studio designer) keep
355
+ today's behaviour, since `can()` answers `true` there by design.
356
+
357
+ One deliberate non-change: the absent case of `userActions.editInline` defers to
358
+ the host's existing `inlineEdit` channel rather than enforcing the spec's
359
+ `.default(false)`. Enforcing that default would remove the toggle from every
360
+ stored console list view in one release, since nothing folds a legacy key into
361
+ `editInline` and no existing view declares it. This follows the rule the
362
+ surrounding toolbar-flag block already states for itself — defaults chosen to
363
+ match what the flags have always done. `InterfaceListPage`, the key's other
364
+ consumer, reads the absent case as OFF, because the ADR-0047 interface page has
365
+ no such host channel to defer to.
366
+ - Updated dependencies [88085e3]
367
+ - Updated dependencies [69251bf]
368
+ - Updated dependencies [57e668f]
369
+ - Updated dependencies [516663d]
370
+ - Updated dependencies [41ac1b7]
371
+ - Updated dependencies [1eaf0a1]
372
+ - Updated dependencies [a09bc33]
373
+ - Updated dependencies [460c4d0]
374
+ - Updated dependencies [0ae27f7]
375
+ - Updated dependencies [2533ec5]
376
+ - Updated dependencies [78c0f9a]
377
+ - Updated dependencies [bbe8b86]
378
+ - Updated dependencies [8477be5]
379
+ - Updated dependencies [279fb13]
380
+ - Updated dependencies [2e82ab2]
381
+ - Updated dependencies [ad07b65]
382
+ - Updated dependencies [41f498b]
383
+ - Updated dependencies [ef0d150]
384
+ - Updated dependencies [f34226e]
385
+ - Updated dependencies [564b605]
386
+ - Updated dependencies [e1d4251]
387
+ - Updated dependencies [40d3a33]
388
+ - Updated dependencies [8b9dc62]
389
+ - Updated dependencies [1184192]
390
+ - Updated dependencies [a2a9747]
391
+ - Updated dependencies [65e88e6]
392
+ - Updated dependencies [a1609a6]
393
+ - Updated dependencies [53f23bc]
394
+ - Updated dependencies [c4533dc]
395
+ - Updated dependencies [be60815]
396
+ - Updated dependencies [37f6844]
397
+ - Updated dependencies [93de4f6]
398
+ - Updated dependencies [2b50261]
399
+ - Updated dependencies [384f30d]
400
+ - Updated dependencies [ac600e5]
401
+ - Updated dependencies [97fba31]
402
+ - Updated dependencies [232f61a]
403
+ - Updated dependencies [d374caf]
404
+ - Updated dependencies [5673576]
405
+ - Updated dependencies [c1ef923]
406
+ - Updated dependencies [911ceaa]
407
+ - Updated dependencies [98eab36]
408
+ - Updated dependencies [af5e292]
409
+ - Updated dependencies [3fbbea1]
410
+ - Updated dependencies [0bffb18]
411
+ - Updated dependencies [800f455]
412
+ - Updated dependencies [5458414]
413
+ - Updated dependencies [3241559]
414
+ - Updated dependencies [7f96b10]
415
+ - Updated dependencies [167ec42]
416
+ - Updated dependencies [616a2a5]
417
+ - Updated dependencies [6c68b13]
418
+ - Updated dependencies [0046d8f]
419
+ - Updated dependencies [f1d4748]
420
+ - Updated dependencies [bea374e]
421
+ - Updated dependencies [b1119ec]
422
+ - Updated dependencies [5607092]
423
+ - Updated dependencies [9f23d2b]
424
+ - Updated dependencies [578e025]
425
+ - Updated dependencies [af025ee]
426
+ - Updated dependencies [d109a4d]
427
+ - Updated dependencies [598c89a]
428
+ - Updated dependencies [4a0bd17]
429
+ - Updated dependencies [b8b9af4]
430
+ - Updated dependencies [d8b9259]
431
+ - Updated dependencies [31676be]
432
+ - Updated dependencies [8c0d52e]
433
+ - Updated dependencies [aff10e2]
434
+ - Updated dependencies [70a774b]
435
+ - Updated dependencies [9ce096f]
436
+ - Updated dependencies [e05db88]
437
+ - Updated dependencies [7458a41]
438
+ - Updated dependencies [ad13d63]
439
+ - Updated dependencies [5ffcc14]
440
+ - Updated dependencies [d971e51]
441
+ - Updated dependencies [97abb24]
442
+ - Updated dependencies [deb157a]
443
+ - Updated dependencies [9c60144]
444
+ - Updated dependencies [e7747f1]
445
+ - Updated dependencies [d2ce342]
446
+ - Updated dependencies [9695da7]
447
+ - Updated dependencies [ac2f332]
448
+ - Updated dependencies [a777058]
449
+ - Updated dependencies [75444e3]
450
+ - Updated dependencies [58b8346]
451
+ - Updated dependencies [2d0bd16]
452
+ - Updated dependencies [a9e17b4]
453
+ - Updated dependencies [b8ce7dc]
454
+ - Updated dependencies [dad51e5]
455
+ - Updated dependencies [1c9c342]
456
+ - Updated dependencies [787c738]
457
+ - Updated dependencies [8396656]
458
+ - Updated dependencies [dbbd38a]
459
+ - Updated dependencies [61556dc]
460
+ - Updated dependencies [8871c14]
461
+ - Updated dependencies [93fe362]
462
+ - Updated dependencies [dfc6975]
463
+ - Updated dependencies [3cf4de0]
464
+ - Updated dependencies [c9dc811]
465
+ - Updated dependencies [144ef9b]
466
+ - Updated dependencies [138ab04]
467
+ - Updated dependencies [a0b9e91]
468
+ - Updated dependencies [99bd015]
469
+ - Updated dependencies [21e4585]
470
+ - @object-ui/types@17.6.0
471
+ - @object-ui/fields@17.6.0
472
+ - @object-ui/i18n@17.6.0
473
+ - @object-ui/react@17.6.0
474
+ - @object-ui/components@17.6.0
475
+ - @object-ui/core@17.6.0
476
+ - @object-ui/permissions@17.6.0
477
+
3
478
  ## 17.5.0
4
479
 
5
480
  ### Patch Changes
package/README.md CHANGED
@@ -22,6 +22,36 @@ pnpm add @object-ui/plugin-detail
22
22
 
23
23
  ## Usage
24
24
 
25
+ ### Two ways to reach a data source
26
+
27
+ `detail-view` needs a data source to load a record, and there are two ways to
28
+ give it one. They are equivalent, and an explicit prop wins when both are
29
+ present:
30
+
31
+ ```tsx
32
+ import { SchemaRenderer, SchemaRendererProvider } from '@object-ui/react';
33
+
34
+ // 1. Injected by an ancestor — the pattern the rest of the family uses, and the
35
+ // one to reach for when a page renders several data-bound blocks.
36
+ <SchemaRendererProvider dataSource={dataSource}>
37
+ <SchemaRenderer schema={{ type: 'detail-view', objectName: 'account', resourceId: '42' }} />
38
+ </SchemaRendererProvider>
39
+
40
+ // 2. Handed to one placement — what `<DetailView dataSource={…} />` has always
41
+ // taken, and what the examples below use.
42
+ <DetailView schema={{ type: 'detail-view', objectName: 'account', resourceId: '42' }} dataSource={dataSource} />
43
+ ```
44
+
45
+ Route 1 is new as of objectui#5378: this block used to read the adapter from its
46
+ prop ONLY, while its siblings `object-grid` and `object-form` read it from
47
+ context only, so a page could satisfy one of them or the other and never both.
48
+ Nothing that worked before changed — route 2 is unaffected — and a block that
49
+ resolves neither now renders a **No data source resolved** panel naming itself
50
+ and the object it was about to read, instead of an empty shell.
51
+
52
+ Note the record id is `resourceId` here. `object-form`'s is `recordId`; the two
53
+ blocks do not share that key.
54
+
25
55
  ### Basic Example
26
56
 
27
57
  ```tsx
@@ -202,12 +232,17 @@ reads the collection size from `QueryResult.total` (falling back to a
202
232
  `hasMore` estimate), so large child tables never ship wholesale to the
203
233
  browser. A user column sort becomes a server `$orderby` (ordering stays
204
234
  global across pages), and the node's `sort` prop seeds the initial order.
205
- Because that `$orderby` names a flat field, a **relational column**
206
- (`lookup` / `master_detail` / `user` / `tree`) would order the collection by the
207
- stored foreign-key id while its cells show related-record names — so on the
208
- windowed path those columns offer no sort button at all. In client mode the
209
- sort key is the label this list already resolved for the cell, so the button
210
- stays and orders by that name.
235
+ Because that `$orderby` names a flat field, two kinds of column cannot survive
236
+ the trip. A **relational column** (`lookup` / `master_detail` / `user` / `tree`)
237
+ would order the collection by the stored foreign-key id while its cells show
238
+ related-record names (`objectui#3096`); a **`formula` column** has no
239
+ materialized column to order by at all — silently unordered rows under a `200`
240
+ before `objectstack#6994`, a `400 INVALID_SORT` after it (`objectui#3950`). So on
241
+ the windowed path neither offers a sort affordance, at either of this card's two
242
+ sort entry points: the embedded table's column headers, and the button row a
243
+ `list` card keeps because it has no headers. In client mode the sort key is the
244
+ value the cell shows — the label this list already resolved, the formula result
245
+ the server hydrated — so the affordance stays and orders by that.
211
246
  Passing `data` directly keeps the historical client-side slicing, and typing
212
247
  in the opt-in filter box temporarily falls back to the full-fetch client
213
248
  pipeline (the contains-filter sweeps every field, which no generic server
@@ -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;AA2BnH;;;;;;;;;;;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,C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M,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,CAmQ5D,CAAC"}
@@ -23,6 +23,17 @@ export interface RelatedListProps {
23
23
  objectName?: string;
24
24
  /** Callback when "New" button is clicked */
25
25
  onNew?: () => void;
26
+ /**
27
+ * [#4646] Render "New" GREYED rather than clickable. Supplied by the host
28
+ * alongside `onNew` when the create affordance exists for this list but its
29
+ * `userActions.create.disabledWhen` predicate answers true for the record in
30
+ * scope (the parent record, on a record page's related list).
31
+ *
32
+ * Deliberately distinct from omitting `onNew` — which HIDES the button. Same
33
+ * hidden-vs-disabled split the row Edit/Delete predicates have had since
34
+ * objectui#2614.
35
+ */
36
+ newDisabled?: boolean;
26
37
  /** Callback when "View All" button is clicked */
27
38
  onViewAll?: () => void;
28
39
  /** Callback when a row Edit action is clicked */
@@ -1 +1 @@
1
- {"version":3,"file":"RelatedList.d.ts","sourceRoot":"","sources":["../src/RelatedList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,OAAO,EAAkD,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAY5G,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EASL,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAKzB,MAAM,WAAW,gBAAgB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