@object-ui/components 15.0.0 → 16.1.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 +169 -0
- package/dist/custom/shimmer-skeleton.d.ts +1 -2
- package/dist/index.css +1411 -2806
- package/dist/index.js +2484 -2431
- package/dist/index.umd.cjs +3 -3
- package/dist/renderers/complex/data-table.d.ts +26 -0
- package/dist/ui/form.d.ts +1 -1
- package/package.json +41 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,174 @@
|
|
|
1
1
|
# @object-ui/components
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ef14f69: feat(fields): CheckboxesField per-option `visibleWhen` cascading + `dependsOn` gating (completes the option-widget parity set)
|
|
8
|
+
|
|
9
|
+
`checkboxes` was the last static-option widget still rendering `config.options`
|
|
10
|
+
raw — with no per-option `visibleWhen` filtering, `dependsOn` gating, or cascade
|
|
11
|
+
clear. It now matches `MultiSelectField` (its multi-value sibling), completing
|
|
12
|
+
the ADR-0058 parity across `select` / `multiselect` / `radio` / `checkboxes`.
|
|
13
|
+
|
|
14
|
+
- **`@object-ui/fields`**: `CheckboxesField` routes through the shared
|
|
15
|
+
`useCascadingOptions` hook — offered boxes narrow against the live record +
|
|
16
|
+
`current_user`, the control gates behind a "select the parent first" hint
|
|
17
|
+
while a `dependsOn` field is empty, and selections no longer offered are
|
|
18
|
+
pruned per-element from the array. Adds `checkboxes-empty-*` /
|
|
19
|
+
`checkboxes-option-*` testids.
|
|
20
|
+
- **`@object-ui/components`**: adds `checkboxes` to the form renderer's option
|
|
21
|
+
field sets (`CASCADE_OPTION_FIELD_TYPES`, the cross-field cascade-clear
|
|
22
|
+
effect, and the option pre-filter) so a `checkboxes` field is threaded
|
|
23
|
+
`dependentValues` and gated identically to the other option widgets.
|
|
24
|
+
- Tests: `CheckboxesField.cascade.test.tsx` mirrors `MultiSelectField.cascade.test.tsx`.
|
|
25
|
+
|
|
26
|
+
- 69fa5d1: chore(lint): clear the baseline lint errors in components (objectui#2713 Wave 3)
|
|
27
|
+
|
|
28
|
+
Wave 3 of the #2713 lint-gate restoration. `@object-ui/components` was red at
|
|
29
|
+
baseline on `main`; cleared every **error** (no behavior change; warnings out of
|
|
30
|
+
scope):
|
|
31
|
+
|
|
32
|
+
- **`react-hooks/rules-of-hooks`** — `react-page` `ReactKindPage` had a
|
|
33
|
+
capability-gate early return _before_ four hooks (incl. a `useEffect` that
|
|
34
|
+
`import()`s the react runtime). Hoisted the hooks above the gate **and guarded
|
|
35
|
+
the import** (`if (!capabilityEnabled) return` inside the effect) so a disabled
|
|
36
|
+
build still never loads the gated runtime; the disabled notice is returned
|
|
37
|
+
after the hooks. Translation helpers in `empty` / `action-bar` / `action-menu`
|
|
38
|
+
unwrap a try/catch around the provider-safe `useObjectTranslation` (the #2709
|
|
39
|
+
fix).
|
|
40
|
+
- **`react-hooks/static-components`** — dynamic renderer/icon lookups
|
|
41
|
+
(`ComponentRegistry.get`, `resolveIcon`) in `action-bar` / `action-group` ×2 /
|
|
42
|
+
`action-menu`, and the five `__tests__` helpers that render a registry-resolved
|
|
43
|
+
component, are stable references → justified scoped disables.
|
|
44
|
+
- **`react-hooks/purity`** — `ui/sidebar` skeleton width uses `Math.random()`
|
|
45
|
+
once per mount (`useMemo([])`) for a decorative placeholder → justified scoped
|
|
46
|
+
disable.
|
|
47
|
+
- **`@typescript-eslint/no-empty-object-type`** — `ShimmerSkeletonProps` empty
|
|
48
|
+
extend → `type` alias.
|
|
49
|
+
- **`no-useless-assignment`** — `test-utils` `maxDepth` dead initializer → single
|
|
50
|
+
`const`.
|
|
51
|
+
- **`no-require-imports`** — `config-panel-renderer` test uses a top-level
|
|
52
|
+
`import React` instead of an in-test `require`.
|
|
53
|
+
- **stale `eslint-disable`** — removed a `jsx-a11y/alt-text` directive in
|
|
54
|
+
`elements` whose plugin is not loaded in the flat config.
|
|
55
|
+
|
|
56
|
+
- 1629313: feat(fields): RadioField per-option `visibleWhen` cascading + `dependsOn` gating; single-source the option resolver
|
|
57
|
+
|
|
58
|
+
Brings `RadioField` to parity with `SelectField` / `MultiSelectField` for ADR-0058
|
|
59
|
+
cascading & role-gated options, and collapses the three copies of the
|
|
60
|
+
gate-then-filter logic onto one shared resolver.
|
|
61
|
+
|
|
62
|
+
- **`@object-ui/core`**: new pure `resolveCascadingOptions(rawOptions, record, dependsOn, scope)`
|
|
63
|
+
→ `{ options, gated, dependsOnFields }` — the single source of truth for
|
|
64
|
+
`dependsOn` gating + per-option `visibleWhen` filtering.
|
|
65
|
+
- **`@object-ui/fields`**: `RadioField` now narrows its offered radios against
|
|
66
|
+
the live record + `current_user`, gates behind a "select the parent first"
|
|
67
|
+
hint while a `dependsOn` field is empty, and clears a value no longer offered
|
|
68
|
+
(scalar cascade clear). The `useCascadingOptions` hook is refactored to a thin
|
|
69
|
+
React wrapper over `resolveCascadingOptions`.
|
|
70
|
+
- **`@object-ui/components`**: the form renderer's inline option pre-filter and
|
|
71
|
+
cross-field cascade-clear effect now call `resolveCascadingOptions` instead of
|
|
72
|
+
re-deriving gating/filtering, so they can't drift from the widgets (no
|
|
73
|
+
behavior change).
|
|
74
|
+
- Tests: `RadioField.cascade.test.tsx` mirrors the select cascade tests; core
|
|
75
|
+
gains `resolveCascadingOptions` unit coverage.
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [0318118]
|
|
78
|
+
- Updated dependencies [1c8935a]
|
|
79
|
+
- Updated dependencies [af1b0db]
|
|
80
|
+
- Updated dependencies [8b8b744]
|
|
81
|
+
- Updated dependencies [7cf4051]
|
|
82
|
+
- Updated dependencies [803558e]
|
|
83
|
+
- Updated dependencies [2e7d7f0]
|
|
84
|
+
- Updated dependencies [94d4876]
|
|
85
|
+
- Updated dependencies [1100a8b]
|
|
86
|
+
- Updated dependencies [7abe4cd]
|
|
87
|
+
- Updated dependencies [549c67d]
|
|
88
|
+
- Updated dependencies [ebe6494]
|
|
89
|
+
- Updated dependencies [2b17339]
|
|
90
|
+
- Updated dependencies [31b77d4]
|
|
91
|
+
- Updated dependencies [6d4fbe6]
|
|
92
|
+
- Updated dependencies [0a3710b]
|
|
93
|
+
- Updated dependencies [f80aaf2]
|
|
94
|
+
- Updated dependencies [62b9ab5]
|
|
95
|
+
- Updated dependencies [1629313]
|
|
96
|
+
- Updated dependencies [29c6040]
|
|
97
|
+
- Updated dependencies [faebac3]
|
|
98
|
+
- Updated dependencies [2331ac9]
|
|
99
|
+
- Updated dependencies [199fa83]
|
|
100
|
+
- Updated dependencies [eee4ded]
|
|
101
|
+
- @object-ui/i18n@16.1.0
|
|
102
|
+
- @object-ui/core@16.1.0
|
|
103
|
+
- @object-ui/types@16.1.0
|
|
104
|
+
- @object-ui/react@16.1.0
|
|
105
|
+
- @object-ui/react-runtime@16.1.0
|
|
106
|
+
- @object-ui/sdui-parser@16.1.0
|
|
107
|
+
|
|
108
|
+
## 16.0.0
|
|
109
|
+
|
|
110
|
+
### Minor Changes
|
|
111
|
+
|
|
112
|
+
- 5534535: feat(grid): built-in row Edit/Delete honor per-record CEL predicates (#2614)
|
|
113
|
+
|
|
114
|
+
The object's `userActions.edit` / `userActions.delete` now also accept an
|
|
115
|
+
object form `{ enabled?, visibleWhen?, disabledWhen? }`. The predicates are
|
|
116
|
+
evaluated per row on the canonical CEL engine (`useRowPredicate`, the same
|
|
117
|
+
machinery custom row actions use): `visibleWhen` false → the built-in
|
|
118
|
+
Edit/Delete item is not rendered for that row (fail-closed); `disabledWhen`
|
|
119
|
+
true → rendered disabled (fail-soft). Wired through ObjectGrid's
|
|
120
|
+
RowActionMenu and the data-table's row overflow menu (the related-list
|
|
121
|
+
path), with the app-shell `crudAffordances` mirror kept in lockstep.
|
|
122
|
+
Omitting the predicates (or using plain booleans) keeps today's behavior
|
|
123
|
+
bit-for-bit; declared predicates evaluate only when a row's menu opens, so
|
|
124
|
+
grid rendering cost is unchanged.
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- 4c7c47f: fix(form): thread live `dependentValues` to cascading option fields (#2284/#1583)
|
|
129
|
+
|
|
130
|
+
The form renderer only injected the live form record into data-source widgets
|
|
131
|
+
(`lookup`/`master_detail`/… — the `DATA_SOURCE_FIELD_TYPES` set). Registered
|
|
132
|
+
option widgets (`field:select`/`field:radio`/`field:multiselect`) that carry
|
|
133
|
+
per-option `visibleWhen` + `dependsOn` cascading were **excluded**, so
|
|
134
|
+
`stripRegisteredFieldProps` dropped `dependentValues` before it reached
|
|
135
|
+
`SelectField`. With no live record and no `formValues` context fallback, a
|
|
136
|
+
cascading `select` never saw its controlling field: in a create form the
|
|
137
|
+
dependent field stayed permanently gated on the "Select the parent first" hint
|
|
138
|
+
even after the parent was chosen (reproduced on the showcase `showcase_cascade`
|
|
139
|
+
B3 fixture — country → province never unlocked).
|
|
140
|
+
|
|
141
|
+
Option field types now receive `dependentValues` too, so the widget's
|
|
142
|
+
`dependsOn` gate lifts and its `visibleWhen` set re-filters live as the parent
|
|
143
|
+
changes — the same channel the lookup fix (#2215/#2216) already used. Regression
|
|
144
|
+
guard added in `form-dependent-values.test.tsx` (drives the registered
|
|
145
|
+
`field:select` path, not just the builtin `case 'select'` fallback the prior
|
|
146
|
+
cascading-select test covered).
|
|
147
|
+
|
|
148
|
+
- 33b4995: Welcome-page "Create your environment" deep-links straight into the create
|
|
149
|
+
dialog (#844): `action:button` gains a client-side `autoTrigger` flag (runs
|
|
150
|
+
the action once on mount — same execute path as a click, so param dialogs /
|
|
151
|
+
confirms / entitlement gates still apply), and the environments list consumes
|
|
152
|
+
`?runAction=create_environment` to mark its create action once entitlements
|
|
153
|
+
resolve (upgrade-locked orgs get the upgrade prompt instead; the param is
|
|
154
|
+
stripped after consumption so refresh/back don't re-open). Also localizes the
|
|
155
|
+
EnvironmentListToolbar's state-aware label overrides ({en,zh}) — they were
|
|
156
|
+
hard-coded English inside a zh console.
|
|
157
|
+
- Updated dependencies [d3e19ed]
|
|
158
|
+
- Updated dependencies [59d4fa9]
|
|
159
|
+
- Updated dependencies [210806a]
|
|
160
|
+
- Updated dependencies [b4ef588]
|
|
161
|
+
- Updated dependencies [ca0f5f0]
|
|
162
|
+
- Updated dependencies [5534535]
|
|
163
|
+
- Updated dependencies [9b8f978]
|
|
164
|
+
- Updated dependencies [195a651]
|
|
165
|
+
- @object-ui/react@16.0.0
|
|
166
|
+
- @object-ui/types@16.0.0
|
|
167
|
+
- @object-ui/i18n@16.0.0
|
|
168
|
+
- @object-ui/core@16.0.0
|
|
169
|
+
- @object-ui/react-runtime@16.0.0
|
|
170
|
+
- @object-ui/sdui-parser@16.0.0
|
|
171
|
+
|
|
3
172
|
## 15.0.0
|
|
4
173
|
|
|
5
174
|
### Patch Changes
|
|
@@ -27,6 +27,5 @@ import * as React from "react";
|
|
|
27
27
|
* @example
|
|
28
28
|
* <ShimmerSkeleton className="h-4 w-32 rounded-md" />
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
31
|
-
}
|
|
30
|
+
export type ShimmerSkeletonProps = React.HTMLAttributes<HTMLDivElement>;
|
|
32
31
|
export declare function ShimmerSkeleton({ className, ...props }: ShimmerSkeletonProps): React.JSX.Element;
|