@object-ui/react 5.0.0 → 5.0.2
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 +19 -0
- package/dist/context/RecordContext.d.ts +12 -0
- package/dist/context/RecordContext.js +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @object-ui/react
|
|
2
2
|
|
|
3
|
+
## 5.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [cab6a93]
|
|
8
|
+
- @object-ui/i18n@5.0.2
|
|
9
|
+
- @object-ui/types@5.0.2
|
|
10
|
+
- @object-ui/core@5.0.2
|
|
11
|
+
- @object-ui/data-objectstack@5.0.2
|
|
12
|
+
|
|
13
|
+
## 5.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- @object-ui/types@5.0.1
|
|
18
|
+
- @object-ui/core@5.0.1
|
|
19
|
+
- @object-ui/i18n@5.0.1
|
|
20
|
+
- @object-ui/data-objectstack@5.0.1
|
|
21
|
+
|
|
3
22
|
## 5.0.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -51,6 +51,18 @@ export interface RecordContextValue<TData = any, TObjectSchema = any> {
|
|
|
51
51
|
* to opt out entirely (e.g. embedded previews).
|
|
52
52
|
*/
|
|
53
53
|
headerSystemActions?: any[];
|
|
54
|
+
/**
|
|
55
|
+
* Controlled favourite state for the record-header star (rendered by
|
|
56
|
+
* `RecordTitleChip` via `PageHeaderRenderer`). When the host provides
|
|
57
|
+
* this, the chip mirrors it instead of managing its own local state.
|
|
58
|
+
*/
|
|
59
|
+
isFavorite?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Called when the user toggles the record-header favourite star. Hosts
|
|
62
|
+
* persist the change (e.g. through `useFavorites`) and update
|
|
63
|
+
* `isFavorite` accordingly.
|
|
64
|
+
*/
|
|
65
|
+
onToggleFavorite?: () => void;
|
|
54
66
|
/**
|
|
55
67
|
* When true, the record is rendered inside a host overlay (drawer,
|
|
56
68
|
* modal, split-pane preview) rather than as a standalone route. Header
|
|
@@ -101,6 +101,8 @@ export const RecordContextProvider = ({ children, ...value }) => {
|
|
|
101
101
|
value.refresh,
|
|
102
102
|
value.embedded,
|
|
103
103
|
value.headerSystemActions,
|
|
104
|
+
value.isFavorite,
|
|
105
|
+
value.onToggleFavorite,
|
|
104
106
|
]);
|
|
105
107
|
return _jsx(RecordContext.Provider, { value: memo, children: children });
|
|
106
108
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/react",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React bindings and SchemaRenderer component for Object UI",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@objectstack/spec": "^4.0.5",
|
|
28
28
|
"react-hook-form": "^7.76.0",
|
|
29
|
-
"@object-ui/core": "5.0.
|
|
30
|
-
"@object-ui/data-objectstack": "5.0.
|
|
31
|
-
"@object-ui/i18n": "5.0.
|
|
32
|
-
"@object-ui/types": "5.0.
|
|
29
|
+
"@object-ui/core": "5.0.2",
|
|
30
|
+
"@object-ui/data-objectstack": "5.0.2",
|
|
31
|
+
"@object-ui/i18n": "5.0.2",
|
|
32
|
+
"@object-ui/types": "5.0.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0",
|