@object-ui/components 11.5.0 → 13.2.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,181 @@
1
1
  # @object-ui/components
2
2
 
3
+ ## 13.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 80901aa: Honor action `visible` (and `enabled`) predicates in three more action renderers.
8
+
9
+ Following the data-table row-action fix, three sibling renderers still rendered schema-defined actions without evaluating their `visible` CEL predicate:
10
+
11
+ - **`action:group` dropdown mode** (`@object-ui/components`) — dropdown items ignored `visible`/`enabled`, while the group's inline mode already honored them.
12
+ - **Related-list `list_toolbar` header actions** (`@object-ui/plugin-detail`) — e.g. an organization's "Invite User" button ignored `visible`, even though the sibling row actions (fed by the same `deriveActions` bridge) already honored it via the data-table's `DataTableRowActionItem`.
13
+ - **Grid bulk-action bar** (`@object-ui/plugin-grid`) — `bulkActionDefs.visible` was ignored entirely; the button is now hidden when the predicate is false (the `BulkActionDef.visible` doc comment is corrected from "disables" to "hides" to match).
14
+
15
+ Each now evaluates `visible` (and, where applicable, `enabled`) via a hook-safe per-item component that mirrors `RowActionMenuItem` / `DataTableRowActionItem`, resolving `features`/`user` from the ambient `ExpressionProvider` scope. Rendering-layer only — no action definitions changed.
16
+
17
+ - e492b9d: Permission sets — pure separation of **design** (Studio) and **assignment**
18
+ (Setup), per ADR-0056 / epic #2398. A `sys_permission_set` used to render its six
19
+ authorization facets in Setup as raw `[Object]` / JSON textareas, and only
20
+ objects+fields were editable in Studio; this reworks both surfaces.
21
+
22
+ **Setup (assign + read-only):**
23
+ - The six facets (`object_permissions`, `field_permissions`, `system_permissions`,
24
+ `row_level_security`, `tab_permissions`, `admin_scope`) now render read-only on
25
+ the `sys_permission_set` record page as a compact summary (counts, or capability
26
+ chips) plus a **“Design in Studio →”** deep-link into the structured editor
27
+ (`/apps/:appName/metadata/permission/:setName`, env scope). No `[Object]`, no
28
+ JSON — in the record view, inline edit, and the create/edit form. Implemented as
29
+ a `permission-facet-link` field widget stamped onto the six fields via the single
30
+ `ObjectStackAdapter.getObjectSchema` choke point and honored by DetailSection +
31
+ the record form.
32
+ - User assignment (add/remove via `sys_user_permission_set`) is surfaced directly
33
+ on the Setup record page.
34
+
35
+ **Studio (design every facet):** the permission matrix editor gains structured
36
+ editors for the facets that were JSON-only —
37
+ - **System Capabilities**: a multi-select over the live `sys_capability` registry
38
+ (scope-grouped, labelled chips).
39
+ - **Row-Level Security**: per-policy rows (object · operation · enabled) with CEL
40
+ USING/CHECK.
41
+ - **Tab Visibility**: per-tab `visible | hidden | default_on | default_off`.
42
+ - **Delegated Admin Scope**: business-unit + subtree, manage-assignments /
43
+ -bindings / author-env-sets toggles, and an assignable-permission-sets allowlist.
44
+ Assignment was moved out of the editor (it is now a Setup act) — the editor is
45
+ purely a design surface.
46
+
47
+ Storage/types are unchanged; editors read/write the draft’s existing parsed
48
+ fields and tolerate legacy JSON strings on load. Note: env-scope metadata saves of
49
+ these facets do not yet project onto the queryable `sys_permission_set` data
50
+ record the Setup summary reads, so a fresh Studio edit isn’t reflected in Setup’s
51
+ read-only view until the projection refreshes — tracked as a framework follow-up
52
+ (enforcement reads the authoritative metadata).
53
+
54
+ - Updated dependencies [53c40c2]
55
+ - @object-ui/i18n@13.2.0
56
+ - @object-ui/react@13.2.0
57
+ - @object-ui/types@13.2.0
58
+ - @object-ui/core@13.2.0
59
+ - @object-ui/react-runtime@13.2.0
60
+ - @object-ui/sdui-parser@13.2.0
61
+
62
+ ## 13.1.0
63
+
64
+ ### Patch Changes
65
+
66
+ - @object-ui/types@13.1.0
67
+ - @object-ui/core@13.1.0
68
+ - @object-ui/i18n@13.1.0
69
+ - @object-ui/react@13.1.0
70
+ - @object-ui/react-runtime@13.1.0
71
+ - @object-ui/sdui-parser@13.1.0
72
+
73
+ ## 13.0.0
74
+
75
+ ### Patch Changes
76
+
77
+ - ac04b76: Data-table row menu: honor each custom row action's `visible` (and `disabled`) predicate.
78
+
79
+ The data-table's inline row overflow menu — used by a record detail page's related list — rendered every custom row action unconditionally, ignoring the action's `visible` CEL. ObjectGrid's row menu already evaluates `visible` per row (`RowActionMenuItem`), so the two row-menu paths disagreed: on an organization's Members tab, `sys_member`'s `transfer_ownership` action (`visible: "record.role != 'owner' && …"`) showed on the owner's own row.
80
+
81
+ Each custom action now renders through a hook-safe `DataTableRowActionItem` that mirrors `RowActionMenuItem`, evaluating `visible`/`disabled` with `useCondition`/`toPredicateInput` against the same per-row context (`{ ...row, record: row }`); `features`/`user` resolve from the ambient `ExpressionProvider` scope, so gating matches the grid. Rendering-layer only — the action definitions are unchanged.
82
+
83
+ - 619097e: Adopt `@objectstack/spec` 13 (ADR-0090 Permission Model v2) across the workspace.
84
+
85
+ Every workspace package now depends on `@objectstack/spec` ^13.0.0 — the v2 major that renames role → position (D3), removes the profile concept (D2), makes OWD default to `private` when unset (D1), and drops the legacy `read`/`read_write`/`full` sharing aliases (D4). UI fallout fixed in the same sweep:
86
+
87
+ - **clientValidation**: the `role` draft-schema loader is now `position` → `PositionSchema` (fixes the `RoleSchema does not exist` build break, #2365); the dead `profile` loader is removed (D2).
88
+ - **Studio previews**: `RolePreview` → `PositionPreview` (flat — positions carry no hierarchy; the old parent-chain breadcrumb and "assign to a Profile" copy are gone). Legacy `role`/`profile` preview keys stay registered for pre-v2 backends.
89
+ - **OWD control** (`ObjectSettingsPanel`): removed the now-dead alias normalization (spec 13 rejects the aliases at authoring time) and the amber "fully public" warning — an unset sharing model now defaults to Private (D1), and the copy says so in both locales.
90
+ - **Fallback schemas / anchors / samples**: `position` replaces the hierarchical `role` fallback schema; `isProfile` dropped from the permission create-anchor and previews samples; permission-set viewer no longer renders a profile badge; console System hub counts `sys_position` instead of the removed `sys_role`.
91
+ - **Studio i18n**: type labels `Role/角色` → `Position/岗位`, `profile` label removed, Access-pillar heading and sharing copy rewritten to the v2 vocabulary.
92
+ - `@object-ui/types` now exports `SubmitBehavior` (was defined but missing from the public surface, breaking `@object-ui/plugin-form`'s re-export under a clean build).
93
+ - **External OWD dial (D11)**: the object Settings sharing card gains an `externalSharingModel` select (portal/partner baseline) with an inline wider-than-internal warning mirroring the publish-time lint.
94
+ - **Permission matrix OWD badges**: every object row now shows its record-level baseline (`OWD Public read`, `Ext Private`, or `OWD Private (default)` for the D1 fail-closed unset case) so grant edits carry their record-reach context.
95
+
96
+ The flow designer's approval assignee `role` kind is intentionally unchanged — spec 13 keeps it as the sole D3 exception (better-auth `sys_member.role` org-membership tier).
97
+
98
+ - Updated dependencies [9e38270]
99
+ - Updated dependencies [619097e]
100
+ - @object-ui/i18n@13.0.0
101
+ - @object-ui/types@13.0.0
102
+ - @object-ui/react@13.0.0
103
+ - @object-ui/core@13.0.0
104
+ - @object-ui/react-runtime@13.0.0
105
+ - @object-ui/sdui-parser@13.0.0
106
+
107
+ ## 12.1.0
108
+
109
+ ### Minor Changes
110
+
111
+ - c31874d: Record-header actions honour `Action.order`, so approval decisions no longer get buried in the `⋯` overflow menu (objectui#2339 / framework#2670).
112
+
113
+ The `action:bar` renderer now stable-sorts its actions by an explicit **`order`** field (lower = higher / more prominent, default `0`) before the inline/overflow split. The sort is stable and treats unset `order` as `0`, so action groups where nobody sets `order` keep their exact registration order — existing toolbars are unaffected. `order` is added to `ActionSchema` in `@object-ui/types`, mirroring `Action.order` in `@objectstack/spec`.
114
+
115
+ `RecordDetailView` now assigns the injected **Approve / Reject** decision buttons a strongly-negative `order` (and gives Approve the highlighted `primary` variant), so on a pending-approval record the approver's decision takes the primary-button slot and app `record_header` actions follow it — instead of the app having to hide its own actions to surface the decision.
116
+
117
+ ### Patch Changes
118
+
119
+ - 6cbccf3: Localize form validation messages, toast client-side validation failures, and make native date/time picker icons legible in dark mode.
120
+
121
+ Record-form validation messages (required, min/max length, min/max value, pattern, email, URL) were hard-coded English even when the field label was localized — e.g. a Chinese "计划开始日期" field showed "计划开始日期 is required". `buildValidationRules` baked English strings, so the form renderer's `t(...)` fallback never applied. It now emits `required: true` and, for the other rules, a `messageKey` + `undefined` message (a field-authored `*_message` still wins and passes through verbatim); the form renderer fills the blanks via i18n (`validation.*` keys already exist in every locale), so messages track the label's language.
122
+
123
+ When client-side validation blocks a submit, the offending field's inline error can sit below the fold in a long modal/drawer form — the user clicks 创建 and sees nothing happen. The form renderer now also fires a `toast.error` naming the fields (`validation.formInvalid`, added to all 10 locales), mirroring the existing server-error toast so the feedback is visible regardless of scroll position.
124
+
125
+ Separately, native controls now declare `color-scheme` (`light` on `:root`, `dark` on `.dark`), so the webkit calendar-picker-indicator and other built-in glyphs render light-on-dark instead of vanishing against the dark input background.
126
+
127
+ - Updated dependencies [6cbccf3]
128
+ - Updated dependencies [e1840bf]
129
+ - Updated dependencies [c31874d]
130
+ - @object-ui/i18n@12.1.0
131
+ - @object-ui/types@12.1.0
132
+ - @object-ui/react@12.1.0
133
+ - @object-ui/core@12.1.0
134
+ - @object-ui/react-runtime@12.1.0
135
+ - @object-ui/sdui-parser@12.1.0
136
+
137
+ ## 12.0.0
138
+
139
+ ### Minor Changes
140
+
141
+ - 226fde9: Cascading & role-gated `select` options (#2284).
142
+
143
+ `select` options now accept a per-option `visibleWhen` CEL predicate — the option
144
+ is offered only when it evaluates TRUE against the live record **plus
145
+ `current_user`** (same engine/env as a field-level `visibleWhen`). Combined with a
146
+ field-level `dependsOn`, this drives dependent selects (country → province → city)
147
+ and role/context gating with no bespoke matrix — the same primitives dependent
148
+ lookups (#2215) already use.
149
+
150
+ - `@object-ui/core` exposes `resolveVisibleOptions` / `isOptionGroupGated` /
151
+ `resolveDependsOnFields` / `isValueStillOffered` (evaluator), reusing the
152
+ canonical `evalFieldPredicate`.
153
+ - The form renderer narrows a dependent select's option list, gates the control
154
+ with a "Select {parent} first" hint while a `dependsOn` field is empty, and
155
+ clears a now-invalid value when the parent changes.
156
+ - The standalone `SelectField` widget applies the same resolution via
157
+ `dependentValues` + the global predicate scope.
158
+
159
+ Client-side hiding is UX, not authorization: gate authorization-sensitive option
160
+ values on the server too. Aligns with `@objectstack/spec` `SelectOption.visibleWhen`.
161
+
162
+ - e4de456: Fix form section grouping inconsistencies found in a UX review of grouped forms:
163
+
164
+ - **Unified section visual language.** `FormSection`'s Card-wrapped path (used by Modal/Split/Tabbed/Wizard forms) previously rendered as a nearly-invisible white-on-white card (same `bg-card` as the page background, distinguished only by a barely-visible shadow) with a duplicated, inconsistent header (different title size, and a collapse chevron positioned differently) versus the flat `SectionDivider` path used by simple/drawer forms. Both now share the same header treatment (`text-sm font-semibold`, inline-left chevron, bottom border), and the Card path gets a soft `bg-muted/40` tint so grouped sections are visually distinguishable without relying on shadow alone.
165
+ - **`readonly` no longer renders as `disabled`.** A field marked `readonly` (statically or via `readonlyWhen`) was being folded into the `disabled` prop before reaching field widgets, so widgets with a dedicated readonly display (e.g. `EmailField`'s mailto link, `TextField`'s plain-text view) never received it — every readonly field just looked permanently disabled. `readonly` is now forwarded as its own prop; generic `input`/`textarea` fields get a distinct readonly style (`bg-muted/40`, no `cursor-not-allowed`) instead of the disabled look.
166
+ - **Section `className`/`gridClassName` now flow through JSON schemas.** `ObjectFormSection` and the per-form-variant section configs (`ModalFormSectionConfig`, `SplitFormSectionConfig`, `FormSectionConfig`, `DrawerFormSectionConfig`) accept `className` (and `gridClassName` where applicable), wired through `ObjectForm`'s form-type dispatch into `FormSection`/`SectionDivider` — closing a gap where section wrappers couldn't be customized from schema despite `FormSection` itself already supporting it.
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [226fde9]
171
+ - Updated dependencies [e4de456]
172
+ - @object-ui/types@12.0.0
173
+ - @object-ui/core@12.0.0
174
+ - @object-ui/react@12.0.0
175
+ - @object-ui/i18n@12.0.0
176
+ - @object-ui/react-runtime@12.0.0
177
+ - @object-ui/sdui-parser@12.0.0
178
+
3
179
  ## 11.5.0
4
180
 
5
181
  ### Minor Changes
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
@@ -1255,6 +1255,9 @@
1255
1255
  .cursor-grab {
1256
1256
  cursor: grab;
1257
1257
  }
1258
+ .cursor-not-allowed {
1259
+ cursor: not-allowed;
1260
+ }
1258
1261
  .cursor-pointer {
1259
1262
  cursor: pointer;
1260
1263
  }
@@ -3675,6 +3678,12 @@
3675
3678
  border-color: var(--color-ring);
3676
3679
  }
3677
3680
  }
3681
+ .focus-visible\:ring-0 {
3682
+ &:focus-visible {
3683
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
3684
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3685
+ }
3686
+ }
3678
3687
  .focus-visible\:ring-1 {
3679
3688
  &:focus-visible {
3680
3689
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -6262,6 +6271,7 @@
6262
6271
  }
6263
6272
  }
6264
6273
  :root {
6274
+ color-scheme: light;
6265
6275
  --background: 0 0% 100%;
6266
6276
  --foreground: 222.2 84% 4.9%;
6267
6277
  --card: 0 0% 100%;
@@ -6320,6 +6330,7 @@
6320
6330
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
6321
6331
  }
6322
6332
  .dark {
6333
+ color-scheme: dark;
6323
6334
  --background: 222.2 84% 4.9%;
6324
6335
  --foreground: 210 40% 98%;
6325
6336
  --card: 222.2 84% 4.9%;