@object-ui/components 7.0.0 → 7.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 +13 -0
- package/dist/index.js +3119 -3005
- package/dist/index.umd.cjs +6 -6
- package/dist/renderers/basic/elements.d.ts +3 -3
- package/dist/renderers/basic/record-picker.d.ts +28 -0
- package/package.json +5 -5
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* - element:divider (no-props separator)
|
|
16
16
|
* - ElementButtonProps -> element:button
|
|
17
17
|
*
|
|
18
|
-
* Heavier interactive elements (element:filter, element:form
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Heavier interactive elements (element:filter, element:form) live in their
|
|
19
|
+
* owning plugins and are left to those packages. element:record_picker — which
|
|
20
|
+
* writes its selection into a page variable — ships alongside in `./record-picker`.
|
|
21
21
|
*
|
|
22
22
|
* All props are read off `schema.properties` per the spec's
|
|
23
23
|
* `UIComponent.properties` convention; `schema.props` is also accepted
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
* element:record_picker — an interactive element that lets the user pick one
|
|
9
|
+
* record of an object and writes the selection into a page variable.
|
|
10
|
+
*
|
|
11
|
+
* Data binding follows the spec's ElementDataSource (`schema.dataSource`):
|
|
12
|
+
* { object, filter?, sort?, limit? }
|
|
13
|
+
* with `properties.object` accepted as a fallback. Display config is read off
|
|
14
|
+
* `schema.properties`:
|
|
15
|
+
* { labelField='name', valueField='id', label?, placeholder?, emptyText? }
|
|
16
|
+
*
|
|
17
|
+
* The selection is written through `usePageVariableBinding(schema.id)`: the
|
|
18
|
+
* page variable whose `source` equals this picker's id receives the selected
|
|
19
|
+
* record's `valueField` (default the record id). With no bound variable the
|
|
20
|
+
* picker is uncontrolled (still usable, just inert) so it never throws outside
|
|
21
|
+
* a Page. The written value drives any predicate referencing `page.<var>`
|
|
22
|
+
* (e.g. another component's `visible` / `visibility`).
|
|
23
|
+
*/
|
|
24
|
+
import * as React from 'react';
|
|
25
|
+
declare function ElementRecordPickerRenderer({ schema }: {
|
|
26
|
+
schema: any;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
export { ElementRecordPickerRenderer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Standard UI component library for Object UI, built with Shadcn UI + Tailwind CSS",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"tailwind-merge": "^3.6.0",
|
|
70
70
|
"tailwindcss-animate": "^1.0.7",
|
|
71
71
|
"vaul": "^1.1.2",
|
|
72
|
-
"@object-ui/core": "7.
|
|
73
|
-
"@object-ui/i18n": "7.
|
|
74
|
-
"@object-ui/react": "7.
|
|
75
|
-
"@object-ui/types": "7.
|
|
72
|
+
"@object-ui/core": "7.1.0",
|
|
73
|
+
"@object-ui/i18n": "7.1.0",
|
|
74
|
+
"@object-ui/react": "7.1.0",
|
|
75
|
+
"@object-ui/types": "7.1.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": "^18.0.0 || ^19.0.0",
|