@object-ui/components 7.0.0 → 7.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.
@@ -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
- * element:record_picker) live in their owning plugins and are left to
20
- * those packages.
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 };
@@ -0,0 +1,30 @@
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:text_input — a single-line free-text input that writes the typed
9
+ * value into a page variable. The data-entry complement to
10
+ * element:record_picker (which picks an existing record): together they let a
11
+ * pure-SDUI page COLLECT input, which a submit button then posts via the action
12
+ * runtime's `{{page.<var>}}` bridge (useConsoleActionRuntime).
13
+ *
14
+ * Config is read off `schema.properties` (`schema.props` tolerated as a legacy
15
+ * alias):
16
+ * { inputType='text', label?, placeholder?, defaultValue?, required?,
17
+ * disabled?, description? }
18
+ *
19
+ * The value is written through `usePageVariableBinding(schema.id)`: the page
20
+ * variable whose `source` equals this input's id receives every keystroke. With
21
+ * no bound variable the input is uncontrolled (still usable, just not wired) so
22
+ * it never throws outside a Page — mirroring element:record_picker. An
23
+ * `inputType='number'` coerces the written value to a Number (empty → '') so
24
+ * `page.<var>` and any numeric submit param stay typed.
25
+ */
26
+ import * as React from 'react';
27
+ declare function ElementTextInputRenderer({ schema }: {
28
+ schema: any;
29
+ }): React.JSX.Element;
30
+ export { ElementTextInputRenderer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/components",
3
- "version": "7.0.0",
3
+ "version": "7.2.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.0.0",
73
- "@object-ui/i18n": "7.0.0",
74
- "@object-ui/react": "7.0.0",
75
- "@object-ui/types": "7.0.0"
72
+ "@object-ui/core": "7.2.0",
73
+ "@object-ui/i18n": "7.2.0",
74
+ "@object-ui/react": "7.2.0",
75
+ "@object-ui/types": "7.2.0"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": "^18.0.0 || ^19.0.0",