@object-ui/plugin-form 14.1.0 → 16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # @object-ui/plugin-form
2
2
 
3
+ ## 16.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9d4a429: fix(form+detail): keep single-file children as inline grids; drop non-spec `attachment` handling
8
+
9
+ Two follow-ups to the upload-in-grid work (objectui#2360):
10
+
11
+ - **#2654** — Now that `file`/`image`/`avatar` fields render a compact upload
12
+ cell in the line-item grid, a child object with a _single_ such field no
13
+ longer flips the smart `inlineEdit` default to a per-row form. `resolveInlineMode`
14
+ splits the old `FORM_ONLY_TYPES`: truly form-only types (textarea / richtext /
15
+ html / markdown / json / location / address) still tip to `form` on their own,
16
+ while file-family types only tip when several rich fields pile up
17
+ (`RICH_FIELD_FORM_THRESHOLD`, default 2). An explicit `inlineEdit` always wins.
18
+
19
+ - **#2655** — `attachment` is not a `@objectstack/spec` field type (the spec
20
+ media types are file/image/avatar/video/audio), so the renderer no longer
21
+ models it: removed from `fieldTypeToColumnType`, the inline-mode heuristic, and
22
+ `RelatedList`'s auto-column `SKIP_TYPES`. Contract-first cleanup — the renderer
23
+ stops fossilizing a phantom type (AGENTS.md #0.1).
24
+
25
+ ### Patch Changes
26
+
27
+ - 5534535: feat(grid): built-in row Edit/Delete honor per-record CEL predicates (#2614)
28
+
29
+ The object's `userActions.edit` / `userActions.delete` now also accept an
30
+ object form `{ enabled?, visibleWhen?, disabledWhen? }`. The predicates are
31
+ evaluated per row on the canonical CEL engine (`useRowPredicate`, the same
32
+ machinery custom row actions use): `visibleWhen` false → the built-in
33
+ Edit/Delete item is not rendered for that row (fail-closed); `disabledWhen`
34
+ true → rendered disabled (fail-soft). Wired through ObjectGrid's
35
+ RowActionMenu and the data-table's row overflow menu (the related-list
36
+ path), with the app-shell `crudAffordances` mirror kept in lockstep.
37
+ Omitting the predicates (or using plain booleans) keeps today's behavior
38
+ bit-for-bit; declared predicates evaluate only when a row's menu opens, so
39
+ grid rendering cost is unchanged.
40
+
41
+ - Updated dependencies [d3e19ed]
42
+ - Updated dependencies [59d4fa9]
43
+ - Updated dependencies [4c7c47f]
44
+ - Updated dependencies [210806a]
45
+ - Updated dependencies [b4ef588]
46
+ - Updated dependencies [ca0f5f0]
47
+ - Updated dependencies [5534535]
48
+ - Updated dependencies [9b8f978]
49
+ - Updated dependencies [195a651]
50
+ - Updated dependencies [33b4995]
51
+ - @object-ui/react@16.0.0
52
+ - @object-ui/components@16.0.0
53
+ - @object-ui/types@16.0.0
54
+ - @object-ui/i18n@16.0.0
55
+ - @object-ui/fields@16.0.0
56
+ - @object-ui/core@16.0.0
57
+ - @object-ui/permissions@16.0.0
58
+
59
+ ## 15.0.0
60
+
61
+ ### Patch Changes
62
+
63
+ - @object-ui/types@15.0.0
64
+ - @object-ui/core@15.0.0
65
+ - @object-ui/i18n@15.0.0
66
+ - @object-ui/react@15.0.0
67
+ - @object-ui/components@15.0.0
68
+ - @object-ui/fields@15.0.0
69
+ - @object-ui/permissions@15.0.0
70
+
3
71
  ## 14.1.0
4
72
 
5
73
  ### Minor Changes
@@ -60,12 +60,17 @@ export declare function deriveFormFields(childSchema: ObjectSchemaLike | undefin
60
60
  export type InlineMode = 'grid' | 'form';
61
61
  /** Above this many editable business fields, the grid gets cramped → `form`. */
62
62
  export declare const SMART_FORM_FIELD_THRESHOLD = 8;
63
+ /** When a child has at least this many rich fields (form-only + grid-capable
64
+ * file-family combined), the row is too busy for a grid → `form`. Set to 2 so a
65
+ * single file/image column stays a grid but a pile of them prefers the form. */
66
+ export declare const RICH_FIELD_FORM_THRESHOLD = 2;
63
67
  /**
64
68
  * Resolve the inline-edit form factor for a child collection.
65
69
  * - explicit `'grid'` / `'form'` win;
66
70
  * - otherwise (`true` / undefined) pick by the child's shape: a `form` when it
67
- * has rich/form-only fields or more than {@link SMART_FORM_FIELD_THRESHOLD}
68
- * editable business fields, else a `grid`.
71
+ * has a truly form-only field, several rich fields
72
+ * ({@link RICH_FIELD_FORM_THRESHOLD}), or more than
73
+ * {@link SMART_FORM_FIELD_THRESHOLD} editable business fields; else a `grid`.
69
74
  */
70
75
  export declare function resolveInlineMode(childSchema: ObjectSchemaLike | undefined, inlineEdit: boolean | InlineMode | undefined, opts?: {
71
76
  relationshipField?: string;