@object-ui/components 11.3.0 → 11.4.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 +111 -0
- package/dist/custom/mobile-dialog-content.d.ts +20 -0
- package/dist/index.js +3275 -3211
- package/dist/index.umd.cjs +6 -6
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,116 @@
|
|
|
1
1
|
# @object-ui/components
|
|
2
2
|
|
|
3
|
+
## 11.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1948c5b: fix(plugin-grid): keep the grid's row selection in sync when a bulk-action dialog closes
|
|
8
|
+
|
|
9
|
+
Closing a bulk-action result dialog (e.g. 派工 / 下推) on **Done** cleared
|
|
10
|
+
ObjectGrid's `selectedRows` — which drives the selection toolbar — but never
|
|
11
|
+
touched the DataTable's internal checkbox state. Two visible problems:
|
|
12
|
+
|
|
13
|
+
- **Desync on success.** The toolbar disappeared while every row stayed visibly
|
|
14
|
+
ticked, because the checkboxes are table-internal state the grid couldn't
|
|
15
|
+
reach.
|
|
16
|
+
|
|
17
|
+
- **Lost selection on total failure.** When the run failed for _every_ row
|
|
18
|
+
(0 succeeded — a precondition error, say), the toolbar still vanished,
|
|
19
|
+
stranding the user with no way to retry the exact rows they'd picked.
|
|
20
|
+
|
|
21
|
+
The dialog-close handler now gates the reset on `result.succeeded > 0`: a total
|
|
22
|
+
failure keeps both the selection _and_ the toolbar (and skips the phantom
|
|
23
|
+
refetch) so the user can fix the cause and retry. When it does reset, a new
|
|
24
|
+
`selectionResetKey` prop on DataTable clears the internal checkbox selection in
|
|
25
|
+
lockstep with the toolbar, so the two never drift apart.
|
|
26
|
+
|
|
27
|
+
- bce581a: Fix dependent (cascading) lookups: unlock on parent selection and enforce the
|
|
28
|
+
cascade filter on every candidate surface (#2215).
|
|
29
|
+
|
|
30
|
+
Two breaks made `depends_on` unusable end to end:
|
|
31
|
+
|
|
32
|
+
- **The gate never unlocked in create mode.** `LookupField` resolved dependent
|
|
33
|
+
values from `ctx.formValues` — a member `SchemaRendererContext` never had —
|
|
34
|
+
and nothing injected the `dependentValues` prop, so with a fresh record
|
|
35
|
+
(`ctx.data = {}`) the child lookup stayed disabled no matter what the user
|
|
36
|
+
picked in the parent field. The form renderer now injects its live form
|
|
37
|
+
values (the same reactive snapshot that drives field rules) as
|
|
38
|
+
`dependentValues` for data-source fields.
|
|
39
|
+
- **The Level-2 table picker bypassed the cascade.** The `depends_on` chain
|
|
40
|
+
only reached the quick-select popover filter; `RecordPickerDialog` (and the
|
|
41
|
+
search-first `PeoplePicker`) received just `lookup_filters`, listing the full
|
|
42
|
+
unfiltered record set. Both pickers now take a `baseFilter` — a hard
|
|
43
|
+
`$filter` constraint merged after `lookupFilters` and user filter-bar input,
|
|
44
|
+
so it can never be widened back out — and `LookupField` passes the dependent
|
|
45
|
+
chain there, shares the same filter with the popover query, and disables the
|
|
46
|
+
browse-all button while dependencies are missing.
|
|
47
|
+
|
|
48
|
+
- c38d107: Fix view-level `FormField.visibleOn` (CEL) never taking effect (#2212).
|
|
49
|
+
|
|
50
|
+
The spec ships `visibleOn` as an Expression object `{ dialect: 'cel', source }`
|
|
51
|
+
(what the `P` template emits) or a bare string, but the whole chain dropped it:
|
|
52
|
+
|
|
53
|
+
- `sectionFields.ts` / `ObjectForm.tsx` only accepted the bare-string shape and
|
|
54
|
+
attached a dead `visible()` closure no renderer ever called — the Expression
|
|
55
|
+
object shape was silently discarded.
|
|
56
|
+
- The form renderer destructured `visibleOn` out of the field config and never
|
|
57
|
+
evaluated it.
|
|
58
|
+
- `RecordFormPage` dropped a `simple` form view's `sections` entirely, so
|
|
59
|
+
page-mode create/edit fell back to the raw schema (every field, no authored
|
|
60
|
+
selection/grouping) while the modal path honored the same view.
|
|
61
|
+
- `ObjectForm`'s grouped-sections path matched section fields by name only,
|
|
62
|
+
dropping per-field `visibleOn` overrides.
|
|
63
|
+
|
|
64
|
+
`visibleOn` now flows through normalization verbatim (both wire shapes) and is
|
|
65
|
+
evaluated reactively by the form renderer with the canonical expression engine
|
|
66
|
+
(`evalFieldPredicate` — same engine, record scope, and fail-open semantics as
|
|
67
|
+
field-level `visibleWhen`; both predicates must allow a field for it to show).
|
|
68
|
+
Sectioned/flat normalization also copies field-level `visibleWhen` /
|
|
69
|
+
`readonlyWhen` / `requiredWhen` rules it previously lost.
|
|
70
|
+
|
|
71
|
+
- 7782698: fix(components): page:header record title honours `nameField` via the unified ADR-0079 resolver
|
|
72
|
+
|
|
73
|
+
The default console record detail page renders the synthesized `page:header`
|
|
74
|
+
(`buildDefaultPageSchema`, renderViaSchema default-on), whose record-chip title
|
|
75
|
+
chain probed `objSchema.primaryField` (not a spec property — always undefined),
|
|
76
|
+
`titleFormat`, then hardcoded `name`/`full_name`/`title`/`subject`/
|
|
77
|
+
`display_name`/`label` record keys. It never consulted the object's declared
|
|
78
|
+
`nameField`/`displayNameField`, so an object titled by e.g. `subject` rendered
|
|
79
|
+
`<ObjectLabel> <id-prefix>` as its H1 instead of the record's real name.
|
|
80
|
+
|
|
81
|
+
`PageHeaderRenderer` now resolves through `getRecordDisplayName(objSchema, data,
|
|
82
|
+
{ deriveFromRecordKeys: false })` after the author overrides and before the
|
|
83
|
+
legacy probes — mirroring `DetailView.resolveDisplayTitle` so both headers
|
|
84
|
+
agree. `RecordDetailView`'s `primaryField` derivation and
|
|
85
|
+
`buildDefaultPageSchema`'s highlight-strip dedup also honour
|
|
86
|
+
`nameField`/`displayNameField`.
|
|
87
|
+
|
|
88
|
+
- e84d64d: Block record-scoped toolbar actions launched with zero rows selected (#2210).
|
|
89
|
+
|
|
90
|
+
A flow/script action that also mounts on list rows (`locations` includes
|
|
91
|
+
`list_item`) has no record to run on when triggered from the list toolbar with
|
|
92
|
+
nothing selected — pre-fix the wizard opened anyway, collected input, and died
|
|
93
|
+
at its first record-bound node ("Update requires an ID or options.multi=true").
|
|
94
|
+
The console runtime now blocks up front with "select a row first", mirroring
|
|
95
|
+
the existing multi-selection guard. Pure object-level toolbar actions
|
|
96
|
+
(`locations: ['list_toolbar']` only) keep triggering without a record.
|
|
97
|
+
|
|
98
|
+
The action renderers (button/icon/menu/group) now forward the `locations`
|
|
99
|
+
declaration to the ActionRunner — previously it was dropped by their
|
|
100
|
+
allow-list payloads, so the runtime could not tell the two shapes apart.
|
|
101
|
+
|
|
102
|
+
- Updated dependencies [8bf6295]
|
|
103
|
+
- Updated dependencies [1948c5b]
|
|
104
|
+
- Updated dependencies [9cd9be1]
|
|
105
|
+
- Updated dependencies [c38d107]
|
|
106
|
+
- Updated dependencies [790558b]
|
|
107
|
+
- @object-ui/types@11.4.0
|
|
108
|
+
- @object-ui/i18n@11.4.0
|
|
109
|
+
- @object-ui/core@11.4.0
|
|
110
|
+
- @object-ui/react@11.4.0
|
|
111
|
+
- @object-ui/react-runtime@11.4.0
|
|
112
|
+
- @object-ui/sdui-parser@11.4.0
|
|
113
|
+
|
|
3
114
|
## 11.3.0
|
|
4
115
|
|
|
5
116
|
### Minor Changes
|
|
@@ -24,4 +24,24 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
|
24
24
|
* interaction with the dialog's own dropdown — it must not close the dialog.
|
|
25
25
|
*/
|
|
26
26
|
export declare function isInsidePopperLayer(target: Element | null | undefined): boolean;
|
|
27
|
+
type InteractOutsideHandler = NonNullable<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>['onInteractOutside']>;
|
|
28
|
+
/**
|
|
29
|
+
* Popper-aware interact-outside guard for Radix Dialog/Sheet content.
|
|
30
|
+
*
|
|
31
|
+
* Covers a second dismissal path `isInsidePopperLayer` alone cannot: with a
|
|
32
|
+
* dropdown OPEN, one outside click must only close the dropdown — but
|
|
33
|
+
* radix-dialog@1.1.17 defers its outside-pointerdown verdict to the `click`
|
|
34
|
+
* phase (`deferPointerDownOutside`), while radix-select@2.3.1 dismisses and
|
|
35
|
+
* unregisters on `pointerdown`. By the deferred verdict the dialog has become
|
|
36
|
+
* the top layer, so it treats the dropdown-closing click as its own outside
|
|
37
|
+
* click and dismisses too (#2156).
|
|
38
|
+
*
|
|
39
|
+
* The guard snapshots "was a popper flyout open?" on every `pointerdown`
|
|
40
|
+
* (document capture phase — runs before Radix's bubble-phase dismissal
|
|
41
|
+
* unmounts the flyout) and swallows the pointer-initiated interact-outside
|
|
42
|
+
* that follows. Focus-driven interact-outside (Tab out) is untouched, as is a
|
|
43
|
+
* plain backdrop click with no flyout open.
|
|
44
|
+
*/
|
|
45
|
+
export declare function usePopperAwareInteractOutside(onInteractOutside?: InteractOutsideHandler): InteractOutsideHandler;
|
|
27
46
|
export declare const MobileDialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
export {};
|