@object-ui/fields 16.1.0 → 17.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 +626 -0
- package/dist/FieldEditWidget.d.ts +9 -2
- package/dist/__tests__/spec-symbol-batch7.test.d.ts +8 -0
- package/dist/__tests__/widget-props-contract.test.d.ts +8 -0
- package/dist/field-type-alias.d.ts +16 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +14 -11
- package/dist/index.js +2426 -2100
- package/dist/widgets/AddressField.d.ts +2 -2
- package/dist/widgets/AutoNumberField.d.ts +2 -2
- package/dist/widgets/AvatarField.d.ts +2 -2
- package/dist/widgets/BooleanField.d.ts +2 -2
- package/dist/widgets/CapabilityMultiSelectField.d.ts +2 -2
- package/dist/widgets/CheckboxesField.d.ts +2 -2
- package/dist/widgets/CodeField.d.ts +2 -2
- package/dist/widgets/ColorField.d.ts +2 -2
- package/dist/widgets/CurrencyField.d.ts +2 -2
- package/dist/widgets/DateField.d.ts +2 -2
- package/dist/widgets/DateTimeField.d.ts +2 -2
- package/dist/widgets/EmailField.d.ts +2 -2
- package/dist/widgets/FileField.d.ts +2 -2
- package/dist/widgets/FilterConditionField.d.ts +34 -2
- package/dist/widgets/FormulaField.d.ts +2 -2
- package/dist/widgets/GeolocationField.d.ts +2 -2
- package/dist/widgets/GridField.d.ts +2 -2
- package/dist/widgets/ImageField.d.ts +2 -2
- package/dist/widgets/ImageLightbox.d.ts +30 -0
- package/dist/widgets/ImageLightbox.test.d.ts +1 -0
- package/dist/widgets/LocationField.d.ts +2 -2
- package/dist/widgets/LookupField.d.ts +2 -2
- package/dist/widgets/LookupField.hydration.test.d.ts +1 -0
- package/dist/widgets/LookupField.idField.test.d.ts +1 -0
- package/dist/widgets/MasterDetailField.d.ts +2 -2
- package/dist/widgets/MultiSelectField.d.ts +2 -2
- package/dist/widgets/NumberField.d.ts +2 -2
- package/dist/widgets/ObjectField.d.ts +2 -2
- package/dist/widgets/ObjectRefField.d.ts +2 -2
- package/dist/widgets/PasswordField.d.ts +2 -2
- package/dist/widgets/PercentField.d.ts +2 -2
- package/dist/widgets/PhoneField.d.ts +2 -2
- package/dist/widgets/QRCodeField.d.ts +2 -2
- package/dist/widgets/RadioField.d.ts +2 -2
- package/dist/widgets/RatingField.d.ts +2 -2
- package/dist/widgets/RecipientPickerField.d.ts +2 -2
- package/dist/widgets/RecipientPickerField.test.d.ts +0 -0
- package/dist/widgets/RichTextField.d.ts +2 -2
- package/dist/widgets/SelectField.d.ts +2 -2
- package/dist/widgets/SignatureField.d.ts +2 -2
- package/dist/widgets/SliderField.d.ts +2 -2
- package/dist/widgets/SummaryField.d.ts +2 -2
- package/dist/widgets/TagsField.d.ts +2 -2
- package/dist/widgets/TextAreaField.d.ts +2 -2
- package/dist/widgets/TextField.d.ts +2 -2
- package/dist/widgets/TimeField.d.ts +2 -2
- package/dist/widgets/UrlField.d.ts +2 -2
- package/dist/widgets/UserField.d.ts +2 -2
- package/dist/widgets/VectorField.d.ts +2 -2
- package/dist/widgets/__tests__/FilterConditionField.matchAll.test.d.ts +8 -0
- package/dist/widgets/__tests__/FilterConditionField.operators.test.d.ts +8 -0
- package/dist/widgets/file-value.d.ts +99 -0
- package/dist/widgets/file-value.test.d.ts +1 -0
- package/dist/widgets/types.d.ts +119 -3
- package/dist/widgets/useFieldTranslation.d.ts +2 -0
- package/package.json +9 -8
- package/src/FieldEditWidget.test.ts +74 -2
- package/src/FieldEditWidget.tsx +50 -8
- package/src/__tests__/spec-symbol-batch7.test.ts +112 -0
- package/src/__tests__/widget-props-contract.test.tsx +129 -0
- package/src/complex-widgets.test.tsx +3 -3
- package/src/datetime-widgets.test.tsx +2 -2
- package/src/field-type-alias.ts +100 -0
- package/src/index.tsx +97 -134
- package/src/widgets/AddressField.tsx +2 -2
- package/src/widgets/AutoNumberField.tsx +2 -2
- package/src/widgets/AvatarField.tsx +2 -2
- package/src/widgets/BooleanField.tsx +2 -2
- package/src/widgets/CapabilityMultiSelectField.tsx +4 -4
- package/src/widgets/CheckboxesField.tsx +12 -9
- package/src/widgets/CodeField.tsx +2 -2
- package/src/widgets/ColorField.tsx +2 -2
- package/src/widgets/CurrencyField.tsx +2 -2
- package/src/widgets/DateField.tsx +2 -2
- package/src/widgets/DateTimeField.tsx +2 -2
- package/src/widgets/EmailField.tsx +2 -2
- package/src/widgets/FileField.tsx +90 -59
- package/src/widgets/FilterConditionField.tsx +112 -12
- package/src/widgets/FormulaField.tsx +2 -2
- package/src/widgets/GeolocationField.tsx +2 -2
- package/src/widgets/GridField.tsx +3 -3
- package/src/widgets/ImageField.tsx +73 -35
- package/src/widgets/ImageLightbox.test.tsx +52 -0
- package/src/widgets/ImageLightbox.tsx +108 -0
- package/src/widgets/LocationField.tsx +2 -2
- package/src/widgets/LookupField.hydration.test.tsx +136 -0
- package/src/widgets/LookupField.idField.test.tsx +61 -0
- package/src/widgets/LookupField.tsx +116 -19
- package/src/widgets/MasterDetailField.tsx +2 -2
- package/src/widgets/MultiSelectField.tsx +10 -7
- package/src/widgets/NumberField.tsx +2 -2
- package/src/widgets/ObjectField.tsx +2 -2
- package/src/widgets/ObjectRefField.tsx +13 -8
- package/src/widgets/PasswordField.tsx +2 -2
- package/src/widgets/PeoplePicker.test.tsx +20 -0
- package/src/widgets/PeoplePicker.tsx +15 -3
- package/src/widgets/PercentField.tsx +2 -2
- package/src/widgets/PhoneField.tsx +2 -2
- package/src/widgets/QRCodeField.tsx +2 -2
- package/src/widgets/RadioField.tsx +10 -7
- package/src/widgets/RatingField.tsx +2 -2
- package/src/widgets/RecipientPickerField.test.tsx +157 -0
- package/src/widgets/RecipientPickerField.tsx +40 -20
- package/src/widgets/RichTextField.tsx +2 -2
- package/src/widgets/SelectField.tsx +5 -5
- package/src/widgets/SignatureField.tsx +2 -2
- package/src/widgets/SliderField.tsx +2 -2
- package/src/widgets/SummaryField.tsx +2 -2
- package/src/widgets/TagsField.tsx +3 -3
- package/src/widgets/TextAreaField.tsx +6 -3
- package/src/widgets/TextField.tsx +2 -2
- package/src/widgets/TimeField.tsx +2 -2
- package/src/widgets/UrlField.tsx +2 -2
- package/src/widgets/UserField.tsx +2 -2
- package/src/widgets/VectorField.tsx +2 -2
- package/src/widgets/__tests__/FilterConditionField.matchAll.test.ts +66 -0
- package/src/widgets/__tests__/FilterConditionField.operators.test.ts +142 -0
- package/src/widgets/file-value.test.ts +230 -0
- package/src/widgets/file-value.ts +246 -0
- package/src/widgets/types.ts +129 -6
- package/src/widgets/useFieldTranslation.ts +30 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Address data structure
|
|
5
5
|
*/
|
|
@@ -14,4 +14,4 @@ export interface AddressValue {
|
|
|
14
14
|
* Address field widget - provides a structured address input
|
|
15
15
|
* Supports street, city, state, zip code, and country
|
|
16
16
|
*/
|
|
17
|
-
export declare function AddressField({ value, onChange, field, readonly, ...props }:
|
|
17
|
+
export declare function AddressField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<AddressValue>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* AutoNumberField - Read-only auto-generated field
|
|
5
5
|
* Values are automatically generated by the system and cannot be edited
|
|
6
6
|
*/
|
|
7
|
-
export declare function AutoNumberField({ value, field, ...props }:
|
|
7
|
+
export declare function AutoNumberField({ value, field, ...props }: FieldWidgetComponentProps<string | number>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Avatar field widget - provides an avatar/profile picture uploader
|
|
5
5
|
* Supports image URLs or file uploads
|
|
6
6
|
*/
|
|
7
|
-
export declare function AvatarField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function AvatarField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* BooleanField - Toggle input supporting switch and checkbox variants
|
|
5
5
|
* Renders as Switch or Checkbox based on field widget configuration
|
|
6
6
|
*/
|
|
7
|
-
export declare function BooleanField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function BooleanField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<boolean>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Parse the stored value into the selected capability-name list. The canonical
|
|
5
5
|
* storage is a JSON-string array; we also tolerate an already-parsed array (in
|
|
@@ -7,5 +7,5 @@ import { FieldWidgetProps } from './types';
|
|
|
7
7
|
* (legacy/hand-authored) so no selection is silently dropped.
|
|
8
8
|
*/
|
|
9
9
|
export declare function parseCapabilityNames(value: unknown): string[];
|
|
10
|
-
export declare function CapabilityMultiSelectField({ value, onChange, readonly, className, ...props }:
|
|
10
|
+
export declare function CapabilityMultiSelectField({ value, onChange, readonly, className, ...props }: FieldWidgetComponentProps<string | string[]>): React.JSX.Element;
|
|
11
11
|
export default CapabilityMultiSelectField;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* CheckboxesField - select zero or more values from a fixed option set, rendered
|
|
5
5
|
* as a list of checkboxes. The stored value is a string[]. Used for the
|
|
@@ -12,4 +12,4 @@ import { FieldWidgetProps } from './types';
|
|
|
12
12
|
* first" hint while a dependency is empty, and selections no longer offered
|
|
13
13
|
* (parent changed / predicate flipped) are pruned from the array.
|
|
14
14
|
*/
|
|
15
|
-
export declare function CheckboxesField({ value, onChange, field, readonly, className, schema, dependentValues, dependsOn: dependsOnProp, emptyHint: _emptyHint, dataSource: _dataSource, ...props }:
|
|
15
|
+
export declare function CheckboxesField({ value, onChange, field, readonly, className, schema, dependentValues, dependsOn: dependsOnProp, emptyHint: _emptyHint, dataSource: _dataSource, ...props }: FieldWidgetComponentProps<string[]>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Code field widget - provides a code editor with syntax highlighting
|
|
5
5
|
* Uses a simple textarea with monospace font
|
|
6
6
|
* For advanced code editing, use the @object-ui/plugin-editor component
|
|
7
7
|
*/
|
|
8
|
-
export declare function CodeField({ value, onChange, field, readonly, ...props }:
|
|
8
|
+
export declare function CodeField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Color field widget - provides a color picker input
|
|
5
5
|
* Supports hex color values (e.g., #ff0000)
|
|
6
6
|
*/
|
|
7
|
-
export declare function ColorField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function ColorField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare function CurrencyField({ value, onChange, field, readonly, errorMessage, className, ...props }:
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
|
+
export declare function CurrencyField({ value, onChange, field, readonly, errorMessage, className, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* DateField - Date picker input widget
|
|
5
5
|
* Uses native date input and displays locale-formatted date in readonly mode
|
|
6
6
|
*/
|
|
7
|
-
export declare function DateField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function DateField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* DateTimeField - Combined date and time picker widget
|
|
5
5
|
* Displays both date and time in locale format when readonly
|
|
6
6
|
*/
|
|
7
|
-
export declare function DateTimeField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function DateTimeField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* EmailField - Email address input with mailto link in readonly mode
|
|
5
5
|
* Renders as a clickable mailto link when readonly, standard email input otherwise
|
|
6
6
|
*/
|
|
7
|
-
export declare function EmailField({ value, onChange, field, readonly, errorMessage, ...props }:
|
|
7
|
+
export declare function EmailField({ value, onChange, field, readonly, errorMessage, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* FileField - File upload widget with drag-and-drop support
|
|
5
5
|
* Supports single and multiple file uploads with configurable accepted file types.
|
|
6
6
|
* L2: File size validation, per-file progress indicators, error messages.
|
|
7
7
|
*/
|
|
8
|
-
export declare function FileField({ value, onChange, field, readonly, onUploadingChange, ...props }:
|
|
8
|
+
export declare function FileField({ value, onChange, field, readonly, onUploadingChange, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* FileCell — compact upload control for a line-item grid cell (objectui#2360).
|
|
11
11
|
*
|
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
|
+
interface BuilderCondition {
|
|
4
|
+
id: string;
|
|
5
|
+
field: string;
|
|
6
|
+
operator: string;
|
|
7
|
+
value: any;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Builder condition → `$`-operator criteria. Exported for tests: this is the
|
|
11
|
+
* chokepoint where a builder token becomes a spec `FieldOperatorsSchema` key,
|
|
12
|
+
* and a wrong spelling here is rejected downstream by `convertFiltersToAST`
|
|
13
|
+
* rather than at authoring time. @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function condToMongo(c: BuilderCondition, typeOf: (f: string) => string | undefined): Record<string, any> | null;
|
|
16
|
+
/**
|
|
17
|
+
* Criteria → builder condition (the reverse of {@link condToMongo}). Returning
|
|
18
|
+
* `null` makes the builder refuse to load the rule ("criteria can't be
|
|
19
|
+
* represented"), so this must keep accepting spellings previously written.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function kvToCondition(field: string, v: any, idx: number): BuilderCondition | null;
|
|
23
|
+
/**
|
|
24
|
+
* Would this criteria select EVERY record of the object?
|
|
25
|
+
*
|
|
26
|
+
* Mirrors the server's `isMatchAllCriteria` (objectstack `plugin-sharing`,
|
|
27
|
+
* #3896) closely enough to warn before the round-trip: blank, `{}`, `[]`, and
|
|
28
|
+
* the vacuous combinators. Deliberately conservative in the same direction —
|
|
29
|
+
* the cost of a false positive is one extra hint, the cost of a false negative
|
|
30
|
+
* is a save that fails with a toast. The server stays authoritative.
|
|
31
|
+
*
|
|
32
|
+
* @internal exported for tests
|
|
33
|
+
*/
|
|
34
|
+
export declare function isMatchAllCriteria(parsed: any): boolean;
|
|
35
|
+
export declare function FilterConditionField({ value, onChange, readonly, className, ...props }: FieldWidgetComponentProps<string | object>): React.JSX.Element;
|
|
4
36
|
export default FilterConditionField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* FormulaField - Read-only computed field
|
|
5
5
|
* Values are computed on the backend and cannot be edited
|
|
6
6
|
*/
|
|
7
|
-
export declare function FormulaField({ value, field, ...props }:
|
|
7
|
+
export declare function FormulaField({ value, field, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Geolocation data structure
|
|
5
5
|
*/
|
|
@@ -12,4 +12,4 @@ export interface GeolocationValue {
|
|
|
12
12
|
* Geolocation field widget - provides a location picker with coordinates
|
|
13
13
|
* Supports manual entry and browser geolocation API
|
|
14
14
|
*/
|
|
15
|
-
export declare function GeolocationField({ value, onChange, field, readonly, ...props }:
|
|
15
|
+
export declare function GeolocationField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<GeolocationValue>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* GridField / LineItemsField — editable child-grid ("line items") widget.
|
|
5
5
|
*
|
|
@@ -104,7 +104,7 @@ export declare function lookupAutofillPatch(columns: GridColumn[], col: GridColu
|
|
|
104
104
|
export declare function computeRow(columns: GridColumn[], row: Row): Row;
|
|
105
105
|
/** Sum a numeric column across rows (ignoring blanks/NaN). */
|
|
106
106
|
export declare function sumColumn(rows: Row[], field: string): number;
|
|
107
|
-
export declare function GridField({ value, onChange, field, readonly, disabled, className, onRowExpand, displayMode, onAdd, ...props }:
|
|
107
|
+
export declare function GridField({ value, onChange, field, readonly, disabled, className, onRowExpand, displayMode, onAdd, ...props }: FieldWidgetComponentProps<Row[]> & {
|
|
108
108
|
/** When provided, each row shows an "expand" button that opens the row in a
|
|
109
109
|
* full form (the host — e.g. MasterDetailForm — renders the drawer/modal and
|
|
110
110
|
* writes the edited values back). Lets a "fat" child be edited in a real form
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* ImageField - Image upload widget with preview thumbnails
|
|
5
5
|
* Supports single and multiple image uploads with drag-and-drop and preview display
|
|
6
6
|
*/
|
|
7
|
-
export declare function ImageField({ value, onChange, field, readonly, onUploadingChange, ...props }:
|
|
7
|
+
export declare function ImageField({ value, onChange, field, readonly, onUploadingChange, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -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
|
+
import * as React from 'react';
|
|
9
|
+
export interface LightboxImage {
|
|
10
|
+
url: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ImageLightboxProps {
|
|
14
|
+
images: LightboxImage[];
|
|
15
|
+
/** Index of the image shown when the lightbox opens. */
|
|
16
|
+
index: number;
|
|
17
|
+
open: boolean;
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
/** Called when the user navigates to another image (prev/next, arrow keys). */
|
|
20
|
+
onIndexChange?: (index: number) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Full-screen image preview with prev/next navigation for a set of images.
|
|
24
|
+
*
|
|
25
|
+
* Controlled: the caller owns `open` and the current `index`. Built on the
|
|
26
|
+
* shared `Dialog`, so backdrop-click and Escape close it for free; this adds
|
|
27
|
+
* left/right arrow-key navigation and a position counter for the multi-image
|
|
28
|
+
* case. A single image simply omits the arrows and counter.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ImageLightbox({ images, index, open, onOpenChange, onIndexChange }: ImageLightboxProps): React.JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* LocationField - Geographic coordinate input for latitude and longitude
|
|
5
5
|
* Stores location as { latitude, longitude } object and displays as comma-separated pair
|
|
6
6
|
*/
|
|
7
|
-
export declare function LocationField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function LocationField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
export interface LookupOption {
|
|
4
4
|
value: string | number;
|
|
5
5
|
label: string;
|
|
@@ -15,4 +15,4 @@ export interface LookupOption {
|
|
|
15
15
|
* from the referenced object using `DataSource.find()`.
|
|
16
16
|
* Falls back to static `options` when no DataSource is available.
|
|
17
17
|
*/
|
|
18
|
-
export declare function LookupField({ value, onChange, field, readonly, ...props }:
|
|
18
|
+
export declare function LookupField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Master-Detail relationship data structure
|
|
5
5
|
*/
|
|
@@ -12,4 +12,4 @@ export interface MasterDetailValue {
|
|
|
12
12
|
* Master-Detail field widget - manages one-to-many relationships
|
|
13
13
|
* Displays related records with add/remove capabilities
|
|
14
14
|
*/
|
|
15
|
-
export declare function MasterDetailField({ value, onChange, field, readonly, className, ...props }:
|
|
15
|
+
export declare function MasterDetailField({ value, onChange, field, readonly, className, ...props }: FieldWidgetComponentProps<MasterDetailValue[]>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* MultiSelectField - select zero or more values from a fixed option set.
|
|
5
5
|
*
|
|
@@ -14,4 +14,4 @@ import { FieldWidgetProps } from './types';
|
|
|
14
14
|
* parent first" hint while a dependency is empty, and selections no longer
|
|
15
15
|
* offered (parent changed / predicate flipped) are dropped from the array.
|
|
16
16
|
*/
|
|
17
|
-
export declare function MultiSelectField({ value, onChange, field, readonly, className, schema, dependentValues, dependsOn: dependsOnProp, emptyHint: _emptyHint, dataSource: _dataSource, ...props }:
|
|
17
|
+
export declare function MultiSelectField({ value, onChange, field, readonly, className, schema, dependentValues, dependsOn: dependsOnProp, emptyHint: _emptyHint, dataSource: _dataSource, ...props }: FieldWidgetComponentProps<string[]>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* NumberField - Numeric input with optional decimal precision
|
|
5
5
|
* Supports min/max/step constraints and configurable decimal precision
|
|
6
6
|
*/
|
|
7
|
-
export declare function NumberField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function NumberField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* ObjectField - JSON object editor
|
|
5
5
|
* Allows editing structured JSON data
|
|
6
6
|
*/
|
|
7
|
-
export declare function ObjectField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function ObjectField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare function ObjectRefField({ value, onChange, readonly, className, ...props }:
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
|
+
export declare function ObjectRefField({ value, onChange, readonly, className, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
4
4
|
export default ObjectRefField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* PasswordField - Secure password input with visibility toggle
|
|
5
5
|
* Includes show/hide toggle button and masks value in readonly mode
|
|
6
6
|
*/
|
|
7
|
-
export declare function PasswordField({ value, onChange, field, readonly, className, ...props }:
|
|
7
|
+
export declare function PasswordField({ value, onChange, field, readonly, className, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* PercentField - Percentage input with configurable decimal precision
|
|
5
5
|
* Stores values as decimals (0-1) and displays as percentages (0-100%)
|
|
6
6
|
* Includes a slider for interactive control.
|
|
7
7
|
*/
|
|
8
|
-
export declare function PercentField({ value, onChange, field, readonly, errorMessage, className, ...props }:
|
|
8
|
+
export declare function PercentField({ value, onChange, field, readonly, errorMessage, className, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* PhoneField - Telephone number input with tel link in readonly mode
|
|
5
5
|
* Renders as a clickable tel link when readonly, standard phone input otherwise
|
|
6
6
|
*/
|
|
7
|
-
export declare function PhoneField({ value, onChange, field, readonly, errorMessage, ...props }:
|
|
7
|
+
export declare function PhoneField({ value, onChange, field, readonly, errorMessage, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* QR Code field widget - generates QR codes from text
|
|
5
5
|
* Uses a simple SVG-based QR code generator
|
|
6
6
|
*/
|
|
7
|
-
export declare function QRCodeField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function QRCodeField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* RadioField - choose exactly one value from a fixed option set, rendered as a
|
|
5
5
|
* radio group. The stored value is the selected option value (string). Used for
|
|
@@ -12,4 +12,4 @@ import { FieldWidgetProps } from './types';
|
|
|
12
12
|
* first" hint while a dependency is empty, and a value no longer offered (parent
|
|
13
13
|
* changed / predicate flipped) is cleared.
|
|
14
14
|
*/
|
|
15
|
-
export declare function RadioField({ value, onChange, field, readonly, className, schema, dependentValues, dependsOn: dependsOnProp, emptyHint: _emptyHint, dataSource: _dataSource, ...props }:
|
|
15
|
+
export declare function RadioField({ value, onChange, field, readonly, className, schema, dependentValues, dependsOn: dependsOnProp, emptyHint: _emptyHint, dataSource: _dataSource, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Rating field widget - provides a star rating input
|
|
5
5
|
* Supports numeric values from 0 to max (default 5)
|
|
6
6
|
*/
|
|
7
|
-
export declare function RatingField({ value, onChange, field, readonly, className, ...props }:
|
|
7
|
+
export declare function RatingField({ value, onChange, field, readonly, className, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare function RecipientPickerField({ value, onChange, readonly, className, ...props }:
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
|
+
export declare function RecipientPickerField({ value, onChange, readonly, className, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
4
4
|
export default RecipientPickerField;
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Rich text field with markdown/HTML support
|
|
5
5
|
* For now, this is a simple textarea. A full implementation would use
|
|
6
6
|
* a rich text editor like TipTap, Lexical, or Slate.
|
|
7
7
|
*/
|
|
8
|
-
export declare function RichTextField({ value, onChange, field, readonly, errorMessage, ...props }:
|
|
8
|
+
export declare function RichTextField({ value, onChange, field, readonly, errorMessage, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* SelectField - dropdown selection widget.
|
|
5
5
|
*
|
|
@@ -15,4 +15,4 @@ import { FieldWidgetProps } from './types';
|
|
|
15
15
|
* the shared {@link useCascadingOptions} hook (#2715), so single and multi stay
|
|
16
16
|
* in lockstep.
|
|
17
17
|
*/
|
|
18
|
-
export declare function SelectField(props:
|
|
18
|
+
export declare function SelectField(props: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Signature field widget - provides a signature pad for capturing signatures
|
|
5
5
|
* Outputs signature as a base64 PNG image
|
|
6
6
|
*/
|
|
7
|
-
export declare function SignatureField({ value, onChange, readonly }:
|
|
7
|
+
export declare function SignatureField({ value, onChange, readonly }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Slider field widget - provides a range slider input
|
|
5
5
|
* Supports numeric values with configurable min, max, and step
|
|
6
6
|
*/
|
|
7
|
-
export declare function SliderField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function SliderField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* SummaryField - Read-only aggregation field
|
|
5
5
|
* Values are aggregated from related records and cannot be edited
|
|
6
6
|
*/
|
|
7
|
-
export declare function SummaryField({ value, field, ...props }:
|
|
7
|
+
export declare function SummaryField({ value, field, ...props }: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* TagsField - free-form list of string tags. Type a value and press Enter (or
|
|
5
5
|
* comma) to add it; click a tag's × to remove it. The stored value is a
|
|
6
6
|
* string[]. Used for the `tags` field type.
|
|
7
7
|
*/
|
|
8
|
-
export declare function TagsField({ value, onChange, field, readonly, className, ...props }:
|
|
8
|
+
export declare function TagsField({ value, onChange, field, readonly, className, ...props }: FieldWidgetComponentProps<string[]>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* TextAreaField - Multi-line text input widget
|
|
5
5
|
* Supports configurable row count and preserves whitespace in readonly mode.
|
|
@@ -9,4 +9,4 @@ import { FieldWidgetProps } from './types';
|
|
|
9
9
|
* a fullscreen edit dialog — much easier on phones than tapping a 4-row
|
|
10
10
|
* textarea trapped between other fields.
|
|
11
11
|
*/
|
|
12
|
-
export declare function TextAreaField({ value, onChange, field, readonly, errorMessage, ...props }:
|
|
12
|
+
export declare function TextAreaField({ value, onChange, field, readonly, errorMessage, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* TextField - Standard single-line or multi-line text input
|
|
5
5
|
* Automatically renders as a textarea when rows are configured in field metadata
|
|
6
6
|
*/
|
|
7
|
-
export declare function TextField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function TextField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* TimeField - Time picker input widget
|
|
5
5
|
* Uses native time input for hour and minute selection
|
|
6
6
|
*/
|
|
7
|
-
export declare function TimeField({ value, onChange, field, readonly, ...props }:
|
|
7
|
+
export declare function TimeField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* UrlField - URL input with clickable link in readonly mode
|
|
5
5
|
* Validates URLs to only render http/https links for security
|
|
6
6
|
*/
|
|
7
|
-
export declare function UrlField({ value, onChange, field, readonly, errorMessage, ...props }:
|
|
7
|
+
export declare function UrlField({ value, onChange, field, readonly, errorMessage, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare function UserField(props:
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
|
+
export declare function UserField(props: FieldWidgetComponentProps<any>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FieldWidgetComponentProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* VectorField - Vector/embedding data display
|
|
5
5
|
* Shows vector embeddings in a read-only format
|
|
6
6
|
*/
|
|
7
|
-
export declare function VectorField({ value, field, ...props }:
|
|
7
|
+
export declare function VectorField({ value, field, ...props }: FieldWidgetComponentProps<number[]>): React.JSX.Element;
|