@object-ui/fields 17.3.0 → 17.6.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 +1655 -0
- package/README.md +1 -12
- package/dist/FieldEditWidget.d.ts +23 -3
- package/dist/currency.d.ts +46 -0
- package/dist/field-type-alias.d.ts +35 -1
- package/dist/index.cjs +4 -4
- package/dist/index.css +651 -0
- package/dist/index.d.ts +474 -85
- package/dist/index.js +5418 -5023
- package/dist/widgets/AddressField.d.ts +4 -12
- package/dist/widgets/AutoNumberField.d.ts +1 -1
- package/dist/widgets/AvatarField.d.ts +1 -1
- package/dist/widgets/BooleanField.d.ts +1 -1
- package/dist/widgets/CapabilityMultiSelectField.d.ts +1 -1
- package/dist/widgets/CheckboxesField.d.ts +1 -1
- package/dist/widgets/CodeField.d.ts +1 -1
- package/dist/widgets/ColorField.d.ts +1 -1
- package/dist/widgets/CurrencyField.d.ts +1 -1
- package/dist/widgets/DateField.d.ts +1 -1
- package/dist/widgets/DateTimeField.d.ts +1 -1
- package/dist/widgets/EmailField.d.ts +1 -1
- package/dist/widgets/FileField.d.ts +18 -2
- package/dist/widgets/FilterConditionField.d.ts +28 -1
- package/dist/widgets/FormulaField.d.ts +1 -1
- package/dist/widgets/FullscreenFieldEditor.d.ts +49 -152
- package/dist/widgets/GeolocationField.d.ts +1 -1
- package/dist/widgets/GridField.d.ts +68 -6
- package/dist/widgets/ImageField.d.ts +1 -1
- package/dist/widgets/LocationField.d.ts +1 -1
- package/dist/widgets/LookupField.d.ts +1 -1
- package/dist/widgets/MasterDetailField.d.ts +1 -1
- package/dist/widgets/MultiSelectField.d.ts +1 -1
- package/dist/widgets/NumberField.d.ts +1 -1
- package/dist/widgets/ObjectField.d.ts +1 -1
- package/dist/widgets/ObjectRefField.d.ts +1 -1
- package/dist/widgets/OptionsEmptyState.d.ts +21 -1
- package/dist/widgets/PasswordField.d.ts +1 -1
- package/dist/widgets/PercentField.d.ts +1 -1
- package/dist/widgets/PhoneField.d.ts +1 -1
- package/dist/widgets/QRCodeField.d.ts +1 -1
- package/dist/widgets/RadioField.d.ts +1 -1
- package/dist/widgets/RatingField.d.ts +1 -1
- package/dist/widgets/RecipientPickerField.d.ts +1 -1
- package/dist/widgets/RecordPickerDialog.d.ts +34 -10
- package/dist/widgets/RichTextField.d.ts +37 -1
- package/dist/widgets/SelectField.d.ts +26 -6
- package/dist/widgets/SignatureField.d.ts +32 -2
- package/dist/widgets/SliderField.d.ts +37 -2
- package/dist/widgets/SummaryField.d.ts +1 -1
- package/dist/widgets/TagsField.d.ts +1 -1
- package/dist/widgets/TextAreaField.d.ts +6 -2
- package/dist/widgets/TextField.d.ts +1 -1
- package/dist/widgets/TimeField.d.ts +1 -1
- package/dist/widgets/UrlField.d.ts +1 -1
- package/dist/widgets/UserField.d.ts +1 -1
- package/dist/widgets/VectorField.d.ts +1 -1
- package/dist/widgets/_cell-renderer-bridge.d.ts +1 -1
- package/dist/widgets/address-format.d.ts +88 -0
- package/dist/widgets/file-size-guard.d.ts +41 -0
- package/dist/widgets/lookupColumnDisplay.d.ts +93 -0
- package/dist/widgets/nativeDateValue.d.ts +37 -0
- package/dist/widgets/richTextDisplay.d.ts +80 -0
- package/dist/widgets/toDomProps.d.ts +30 -10
- package/dist/widgets/toHostGroupProps.d.ts +189 -0
- package/dist/widgets/types.d.ts +8 -3
- package/dist/widgets/useRecordQuery.d.ts +7 -1
- package/package.json +17 -14
- package/dist/FieldEditWidget.test.d.ts +0 -8
- package/dist/__tests__/DateCellRenderer.test.d.ts +0 -0
- package/dist/__tests__/NumberCellRenderer.test.d.ts +0 -0
- package/dist/__tests__/cell-truncation.test.d.ts +0 -0
- package/dist/__tests__/field-carrier-sdui.test.d.ts +0 -0
- package/dist/__tests__/lookupCellDisplayField.test.d.ts +0 -0
- package/dist/__tests__/lookupCellDisplayName.test.d.ts +0 -0
- package/dist/__tests__/lookupCellReferenceKey.test.d.ts +0 -0
- package/dist/__tests__/registry-collision.test.d.ts +0 -0
- package/dist/__tests__/resolveFieldCurrency.test.d.ts +0 -1
- package/dist/__tests__/spec-symbol-batch7.test.d.ts +0 -8
- package/dist/__tests__/validation-feedback.test.d.ts +0 -0
- package/dist/__tests__/widget-aria-invalid-e2e.test.d.ts +0 -0
- package/dist/__tests__/widget-aria-invalid-registry-e2e.test.d.ts +0 -0
- package/dist/__tests__/widget-dom-leak-e2e.test.d.ts +0 -0
- package/dist/__tests__/widget-props-contract.test.d.ts +0 -8
- package/dist/coerce-safe-value.test.d.ts +0 -1
- package/dist/complex-widgets.test.d.ts +0 -1
- package/dist/datetime-widgets.test.d.ts +0 -1
- package/dist/field-type-coverage.test.d.ts +0 -1
- package/dist/standard-widgets.test.d.ts +0 -0
- package/dist/widgets/AddressField.uniqueIds.test.d.ts +0 -0
- package/dist/widgets/CapabilityMultiSelectField.test.d.ts +0 -0
- package/dist/widgets/CharacterCount.d.ts +0 -56
- package/dist/widgets/CheckboxesField.cascade.test.d.ts +0 -0
- package/dist/widgets/GeolocationField.uniqueIds.test.d.ts +0 -0
- package/dist/widgets/GridField.test.d.ts +0 -1
- package/dist/widgets/ImageLightbox.test.d.ts +0 -1
- package/dist/widgets/LookupField.dependsOn.test.d.ts +0 -8
- package/dist/widgets/LookupField.gateHintLabel.test.d.ts +0 -8
- package/dist/widgets/LookupField.hydration.test.d.ts +0 -1
- package/dist/widgets/LookupField.idField.test.d.ts +0 -1
- package/dist/widgets/MultiSelectField.cascade.test.d.ts +0 -0
- package/dist/widgets/OptionsEmptyState.no-provider.test.d.ts +0 -0
- package/dist/widgets/OptionsEmptyState.test.d.ts +0 -0
- package/dist/widgets/PeoplePicker.test.d.ts +0 -8
- package/dist/widgets/PeoplePickerComponents.test.d.ts +0 -8
- package/dist/widgets/RadioField.cascade.test.d.ts +0 -0
- package/dist/widgets/RecipientPickerField.test.d.ts +0 -0
- package/dist/widgets/RecordPickerDialog.filterOptions.test.d.ts +0 -8
- package/dist/widgets/RecordPickerDialog.selectLabel.test.d.ts +0 -8
- package/dist/widgets/SelectField.cascade.test.d.ts +0 -0
- package/dist/widgets/TagsField.placeholder.no-provider.test.d.ts +0 -0
- package/dist/widgets/TagsField.placeholder.test.d.ts +0 -0
- package/dist/widgets/UserFieldPicker.test.d.ts +0 -8
- package/dist/widgets/__tests__/FilterConditionField.matchAll.test.d.ts +0 -8
- package/dist/widgets/__tests__/FilterConditionField.operators.test.d.ts +0 -8
- package/dist/widgets/__tests__/FullscreenFieldEditor.i18n.test.d.ts +0 -0
- package/dist/widgets/__tests__/FullscreenFieldEditor.no-provider.test.d.ts +0 -0
- package/dist/widgets/__tests__/RichTextField.fullscreenDisabled.test.d.ts +0 -0
- package/dist/widgets/__tests__/RichTextField.mobileFullscreen.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.characterCount.announcements.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.characterCount.i18n.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.characterCount.no-provider.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.fullscreenCharacterCount.i18n.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.fullscreenCharacterCount.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.fullscreenDisabled.test.d.ts +0 -0
- package/dist/widgets/__tests__/TextAreaField.mobileFullscreen.test.d.ts +0 -0
- package/dist/widgets/deriveLookupColumns.test.d.ts +0 -1
- package/dist/widgets/file-value.test.d.ts +0 -1
- package/dist/widgets/personDisplay.test.d.ts +0 -8
- package/dist/widgets/recentLookups.test.d.ts +0 -1
- package/dist/widgets/useRecordQuery.test.d.ts +0 -8
- package/dist/widgets/useUploadingSignal.test.d.ts +0 -1
- package/src/FieldEditWidget.test.ts +0 -133
- package/src/FieldEditWidget.tsx +0 -191
- package/src/__tests__/DateCellRenderer.test.tsx +0 -73
- package/src/__tests__/NumberCellRenderer.test.tsx +0 -60
- package/src/__tests__/cell-truncation.test.tsx +0 -96
- package/src/__tests__/field-carrier-sdui.test.tsx +0 -169
- package/src/__tests__/lookupCellDisplayField.test.tsx +0 -107
- package/src/__tests__/lookupCellDisplayName.test.tsx +0 -119
- package/src/__tests__/lookupCellReferenceKey.test.tsx +0 -57
- package/src/__tests__/registry-collision.test.ts +0 -91
- package/src/__tests__/resolveFieldCurrency.test.ts +0 -20
- package/src/__tests__/spec-symbol-batch7.test.ts +0 -126
- package/src/__tests__/validation-feedback.test.tsx +0 -361
- package/src/__tests__/widget-aria-invalid-e2e.test.tsx +0 -265
- package/src/__tests__/widget-aria-invalid-registry-e2e.test.tsx +0 -338
- package/src/__tests__/widget-dom-leak-e2e.test.tsx +0 -598
- package/src/__tests__/widget-props-contract.test.tsx +0 -142
- package/src/coerce-safe-value.test.ts +0 -34
- package/src/complex-widgets.test.tsx +0 -908
- package/src/currency.ts +0 -14
- package/src/datetime-widgets.test.tsx +0 -93
- package/src/field-type-alias.ts +0 -100
- package/src/field-type-coverage.test.ts +0 -67
- package/src/index.tsx +0 -2503
- package/src/standard-widgets.test.tsx +0 -357
- package/src/widgets/AddressField.tsx +0 -132
- package/src/widgets/AddressField.uniqueIds.test.tsx +0 -92
- package/src/widgets/AutoNumberField.tsx +0 -18
- package/src/widgets/AvatarField.tsx +0 -117
- package/src/widgets/BooleanField.tsx +0 -52
- package/src/widgets/CapabilityMultiSelectField.test.tsx +0 -168
- package/src/widgets/CapabilityMultiSelectField.tsx +0 -229
- package/src/widgets/CharacterCount.tsx +0 -263
- package/src/widgets/CheckboxesField.cascade.test.tsx +0 -143
- package/src/widgets/CheckboxesField.tsx +0 -136
- package/src/widgets/CodeField.tsx +0 -41
- package/src/widgets/ColorField.tsx +0 -53
- package/src/widgets/CurrencyField.tsx +0 -95
- package/src/widgets/DateField.tsx +0 -31
- package/src/widgets/DateTimeField.tsx +0 -37
- package/src/widgets/EmailField.tsx +0 -37
- package/src/widgets/FileField.tsx +0 -494
- package/src/widgets/FilterConditionField.tsx +0 -454
- package/src/widgets/FormulaField.tsx +0 -33
- package/src/widgets/FullscreenFieldEditor.tsx +0 -271
- package/src/widgets/GeolocationField.tsx +0 -167
- package/src/widgets/GeolocationField.uniqueIds.test.tsx +0 -88
- package/src/widgets/GridField.test.tsx +0 -406
- package/src/widgets/GridField.tsx +0 -966
- package/src/widgets/ImageCropperDialog.tsx +0 -245
- package/src/widgets/ImageField.tsx +0 -255
- package/src/widgets/ImageLightbox.test.tsx +0 -52
- package/src/widgets/ImageLightbox.tsx +0 -108
- package/src/widgets/LocationField.tsx +0 -57
- package/src/widgets/LookupField.dependsOn.test.tsx +0 -233
- package/src/widgets/LookupField.gateHintLabel.test.tsx +0 -135
- package/src/widgets/LookupField.hydration.test.tsx +0 -136
- package/src/widgets/LookupField.idField.test.tsx +0 -61
- package/src/widgets/LookupField.tsx +0 -1291
- package/src/widgets/MarkdownContent.tsx +0 -19
- package/src/widgets/MasterDetailField.tsx +0 -131
- package/src/widgets/MultiSelectField.cascade.test.tsx +0 -143
- package/src/widgets/MultiSelectField.tsx +0 -142
- package/src/widgets/NumberField.tsx +0 -49
- package/src/widgets/ObjectField.tsx +0 -94
- package/src/widgets/ObjectRefField.tsx +0 -121
- package/src/widgets/OptionsEmptyState.no-provider.test.tsx +0 -88
- package/src/widgets/OptionsEmptyState.test.tsx +0 -169
- package/src/widgets/OptionsEmptyState.tsx +0 -83
- package/src/widgets/PasswordField.tsx +0 -49
- package/src/widgets/PeoplePicker.test.tsx +0 -360
- package/src/widgets/PeoplePicker.tsx +0 -579
- package/src/widgets/PeoplePickerComponents.test.tsx +0 -104
- package/src/widgets/PercentField.tsx +0 -95
- package/src/widgets/PersonRow.tsx +0 -117
- package/src/widgets/PhoneField.tsx +0 -37
- package/src/widgets/QRCodeField.tsx +0 -103
- package/src/widgets/RadioField.cascade.test.tsx +0 -141
- package/src/widgets/RadioField.tsx +0 -111
- package/src/widgets/RatingField.tsx +0 -81
- package/src/widgets/RecipientPickerField.test.tsx +0 -157
- package/src/widgets/RecipientPickerField.tsx +0 -188
- package/src/widgets/RecordPickerDialog.filterOptions.test.tsx +0 -611
- package/src/widgets/RecordPickerDialog.selectLabel.test.tsx +0 -112
- package/src/widgets/RecordPickerDialog.tsx +0 -1316
- package/src/widgets/RichTextField.tsx +0 -176
- package/src/widgets/SelectField.cascade.test.tsx +0 -138
- package/src/widgets/SelectField.tsx +0 -162
- package/src/widgets/SelectionTray.tsx +0 -110
- package/src/widgets/SignatureField.tsx +0 -140
- package/src/widgets/SliderField.tsx +0 -39
- package/src/widgets/SummaryField.tsx +0 -31
- package/src/widgets/TagsField.placeholder.no-provider.test.tsx +0 -68
- package/src/widgets/TagsField.placeholder.test.tsx +0 -95
- package/src/widgets/TagsField.tsx +0 -88
- package/src/widgets/TextAreaField.tsx +0 -213
- package/src/widgets/TextField.tsx +0 -45
- package/src/widgets/TimeField.tsx +0 -31
- package/src/widgets/UrlField.tsx +0 -46
- package/src/widgets/UserField.tsx +0 -58
- package/src/widgets/UserFieldPicker.test.tsx +0 -78
- package/src/widgets/VectorField.tsx +0 -29
- package/src/widgets/__tests__/FilterConditionField.matchAll.test.ts +0 -66
- package/src/widgets/__tests__/FilterConditionField.operators.test.ts +0 -142
- package/src/widgets/__tests__/FullscreenFieldEditor.i18n.test.tsx +0 -248
- package/src/widgets/__tests__/FullscreenFieldEditor.no-provider.test.tsx +0 -116
- package/src/widgets/__tests__/RichTextField.fullscreenDisabled.test.tsx +0 -244
- package/src/widgets/__tests__/RichTextField.mobileFullscreen.test.tsx +0 -195
- package/src/widgets/__tests__/TextAreaField.characterCount.announcements.test.tsx +0 -417
- package/src/widgets/__tests__/TextAreaField.characterCount.i18n.test.tsx +0 -287
- package/src/widgets/__tests__/TextAreaField.characterCount.no-provider.test.tsx +0 -160
- package/src/widgets/__tests__/TextAreaField.fullscreenCharacterCount.i18n.test.tsx +0 -161
- package/src/widgets/__tests__/TextAreaField.fullscreenCharacterCount.test.tsx +0 -346
- package/src/widgets/__tests__/TextAreaField.fullscreenDisabled.test.tsx +0 -246
- package/src/widgets/__tests__/TextAreaField.mobileFullscreen.test.tsx +0 -175
- package/src/widgets/_cell-renderer-bridge.ts +0 -19
- package/src/widgets/deriveLookupColumns.test.ts +0 -112
- package/src/widgets/deriveLookupColumns.ts +0 -108
- package/src/widgets/file-value.test.ts +0 -230
- package/src/widgets/file-value.ts +0 -246
- package/src/widgets/openNativePicker.ts +0 -18
- package/src/widgets/personDisplay.test.ts +0 -113
- package/src/widgets/personDisplay.ts +0 -92
- package/src/widgets/recentLookups.test.ts +0 -45
- package/src/widgets/recentLookups.ts +0 -47
- package/src/widgets/toDomProps.ts +0 -175
- package/src/widgets/types.ts +0 -242
- package/src/widgets/useCascadingOptions.ts +0 -46
- package/src/widgets/useFieldTranslation.ts +0 -150
- package/src/widgets/useRecordQuery.test.ts +0 -174
- package/src/widgets/useRecordQuery.ts +0 -264
- package/src/widgets/useUploadingSignal.test.tsx +0 -62
- package/src/widgets/useUploadingSignal.ts +0 -20
- package/src/withFieldCarrier.tsx +0 -75
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export interface AddressValue {
|
|
7
|
-
street?: string;
|
|
8
|
-
city?: string;
|
|
9
|
-
state?: string;
|
|
10
|
-
zipCode?: string;
|
|
11
|
-
country?: string;
|
|
12
|
-
}
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
|
+
import { AddressValue } from './address-format.js';
|
|
4
|
+
export type { AddressValue } from './address-format.js';
|
|
13
5
|
/**
|
|
14
6
|
* Address field widget - provides a structured address input
|
|
15
|
-
* Supports street, city, state,
|
|
7
|
+
* Supports street, city, state, postal code, and country
|
|
16
8
|
*/
|
|
17
9
|
export declare function AddressField({ value, onChange, field, readonly, error, ...props }: FieldWidgetComponentProps<AddressValue>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* AutoNumberField - Read-only auto-generated field
|
|
5
5
|
* Values are automatically generated by the system and cannot be edited
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Avatar field widget - provides an avatar/profile picture uploader
|
|
5
5
|
* Supports image URLs or file uploads
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* BooleanField - Toggle input supporting switch and checkbox variants
|
|
5
5
|
* Renders as Switch or Checkbox based on field widget configuration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Code field widget - provides a code editor with syntax highlighting
|
|
5
5
|
* Uses a simple textarea with monospace font
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
export declare function CurrencyField({ value, onChange, field, readonly, error, className, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* DateField - Date picker input widget
|
|
5
5
|
* Uses native date input and displays locale-formatted date in readonly mode
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* DateTimeField - Combined date and time picker widget
|
|
5
5
|
* Displays both date and time in locale format when readonly
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
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.
|
|
@@ -15,7 +15,7 @@ export declare function FileField({ value, onChange, field, readonly, onUploadin
|
|
|
15
15
|
* drag-and-drop zone — a grid cell has no room for one; the per-row expand
|
|
16
16
|
* form still offers the full-size FileField.
|
|
17
17
|
*/
|
|
18
|
-
export declare function FileCell({ value, onChange, disabled, multiple, accept, maxSize, 'aria-label': ariaLabel, 'data-cell': dataCell, }: {
|
|
18
|
+
export declare function FileCell({ value, onChange, disabled, multiple, accept, maxSize, error, 'aria-label': ariaLabel, 'data-cell': dataCell, }: {
|
|
19
19
|
value: any;
|
|
20
20
|
onChange: (value: any) => void;
|
|
21
21
|
disabled?: boolean;
|
|
@@ -24,6 +24,22 @@ export declare function FileCell({ value, onChange, disabled, multiple, accept,
|
|
|
24
24
|
accept?: string;
|
|
25
25
|
/** Max file size in bytes (oversize picks are rejected with an inline error). */
|
|
26
26
|
maxSize?: number;
|
|
27
|
+
/**
|
|
28
|
+
* The active validation message for this cell, named as
|
|
29
|
+
* `@objectstack/spec/ui`'s `FieldWidgetPropsSchema` names it — the same
|
|
30
|
+
* published slot `FieldWidgetComponentProps` declares and `LookupField` /
|
|
31
|
+
* `FileField` above already consume (objectui#5431, completing #3318's
|
|
32
|
+
* per-cell delivery). NOT the per-pick upload `errors` this component
|
|
33
|
+
* computes itself — this is the HOST's verdict on the cell's value.
|
|
34
|
+
*
|
|
35
|
+
* **Producer**: `GridField`, for a required-but-empty `file` cell.
|
|
36
|
+
* **Consumer**: drives `aria-invalid` on the picker button — the focusable
|
|
37
|
+
* control assistive tech reads a control state from (objectui#5223; a mark
|
|
38
|
+
* on the non-focusable wrapper is exactly what the registry sweep forbids).
|
|
39
|
+
* The message TEXT stays with the cell's `title` in `GridField`; rendering
|
|
40
|
+
* it here would double-display it.
|
|
41
|
+
*/
|
|
42
|
+
error?: string;
|
|
27
43
|
'aria-label'?: string;
|
|
28
44
|
/** Focus-grid coordinate (see GridField keyboard navigation). */
|
|
29
45
|
'data-cell'?: string;
|
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
interface BuilderCondition {
|
|
4
4
|
id: string;
|
|
5
5
|
field: string;
|
|
6
6
|
operator: string;
|
|
7
7
|
value: any;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Opt-in FilterBuilder operators this widget offers (objectui#4023,
|
|
11
|
+
* objectui#4736).
|
|
12
|
+
*
|
|
13
|
+
* The shared dropdown withholds these because two of its three consumers
|
|
14
|
+
* persist into dialects that cannot carry them (see `OPT_IN_OPERATORS` in
|
|
15
|
+
* `@object-ui/components`'s `filter-builder.tsx`). THIS widget can: its value
|
|
16
|
+
* is a MongoDB-style `FieldOperatorsSchema` criteria that the server's engine
|
|
17
|
+
* evaluates directly — never lowered through the array/triplet AST and never
|
|
18
|
+
* folded into a `ViewFilterRule` — so the spec's `FILTER_OPERATORS` is the only
|
|
19
|
+
* vocabulary it has to satisfy.
|
|
20
|
+
*
|
|
21
|
+
* - `containsCaseInsensitive` authors `$icontains`, executable on every
|
|
22
|
+
* driver and evaluation face the platform ships (objectstack#5702 +
|
|
23
|
+
* objectstack#6520).
|
|
24
|
+
* - `exists` / `notExists` author `$exists`, which `condToMongo` has emitted
|
|
25
|
+
* and `kvToCondition` has read back since objectui#2942. Naming them here
|
|
26
|
+
* is what KEEPS them reachable now that the shared dropdown no longer
|
|
27
|
+
* offers them to the list and view surfaces, whose dialects have no
|
|
28
|
+
* existence operator at all (objectui#4736).
|
|
29
|
+
*
|
|
30
|
+
* Module scope, not an inline literal: a fresh array each render would reset
|
|
31
|
+
* `FilterBuilder`'s memo inputs on every keystroke.
|
|
32
|
+
*
|
|
33
|
+
* @internal exported for tests
|
|
34
|
+
*/
|
|
35
|
+
export declare const FILTER_CONDITION_EXTRA_OPERATORS: readonly string[];
|
|
9
36
|
/**
|
|
10
37
|
* Builder condition → `$`-operator criteria. Exported for tests: this is the
|
|
11
38
|
* chokepoint where a builder token becomes a spec `FieldOperatorsSchema` key,
|
|
@@ -1,155 +1,52 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { FullscreenEditorProps } from '@object-ui/components';
|
|
2
3
|
/**
|
|
3
|
-
* The fullscreen-edit affordance shared by every long-text widget
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* ##
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* `disabled`
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* - the toggle STAYS but is `disabled` — `disabled` means "not interactive,
|
|
50
|
-
* muted", not "shown plainly", which is `readonly`'s job (and `readonly`
|
|
51
|
-
* never reaches this component at all — see below);
|
|
52
|
-
* - `openFullscreen` refuses independently of the attribute, since a
|
|
53
|
-
* programmatic dispatch and a lost `pointer-events` rule both get past it;
|
|
54
|
-
* - the dialog locks on its OWN — `disabled` is not merely a static flag, it is
|
|
55
|
-
* also the form's `isSubmitting`, which flips to true while the dialog may
|
|
56
|
-
* already be open. At that moment the toggle is no longer the gate. So the
|
|
57
|
-
* editor is told (third `children` argument) and "Done" is disabled;
|
|
58
|
-
* - and `onCommit` is gated, because that is the single point where a value can
|
|
59
|
-
* leave this component for host state. Nothing native guards it: it is a
|
|
60
|
-
* click handler on a different control reading React state.
|
|
61
|
-
*
|
|
62
|
-
* "Cancel" and `Esc` stay live in every state — a dialog that goes disabled
|
|
63
|
-
* mid-edit must still be closable, or a submit in flight traps the user in it.
|
|
64
|
-
*
|
|
65
|
-
* ## Why there is no `readonly` prop
|
|
66
|
-
*
|
|
67
|
-
* Both hosts early-return a read-only DISPLAY before they compute the affordance
|
|
68
|
-
* (`TextAreaField.tsx`, `RichTextField.tsx`), so this component is never
|
|
69
|
-
* rendered for a read-only field and a `readonly` prop here would be declared
|
|
70
|
-
* with no producer — the shape this package keeps deleting (objectui#3232/#3233).
|
|
71
|
-
* A future host that renders an editor for read-only fields must add the prop
|
|
72
|
-
* AND the producer together; do not add it "for symmetry" beforehand.
|
|
73
|
-
*
|
|
74
|
-
* ## `testIdPrefix`
|
|
75
|
-
*
|
|
76
|
-
* Each host passes its own (`textarea`, `richtext`), yielding the same
|
|
77
|
-
* convention with a per-widget namespace: `<prefix>-fullscreen-toggle` /
|
|
78
|
-
* `-dialog` / `-save`. One form can contain both a textarea and a markdown
|
|
79
|
-
* field, so a single shared id would make a test unable to say which widget it
|
|
80
|
-
* had found. The editor's own test id belongs to `children` for the same
|
|
81
|
-
* reason.
|
|
82
|
-
*
|
|
83
|
-
* ## Copy (objectui#3404)
|
|
84
|
-
*
|
|
85
|
-
* Every string here goes through `useFieldTranslation()` and consumes the
|
|
86
|
-
* EXISTING `form.fullscreen.*` / `common.cancel` keys — the same ones the
|
|
87
|
-
* built-in branch consumes since objectui#3272. Nothing was missing from the
|
|
88
|
-
* ten locale packs; this path simply never read them, so a zh session opened a
|
|
89
|
-
* dialog reading `Cancel` / `Done` while a long-text field rendered by the
|
|
90
|
-
* built-in branch **in the same form** read 「取消 / 完成」.
|
|
91
|
-
*
|
|
92
|
-
* Sharing the keys rather than minting `fields.fullscreen.*` twins is the
|
|
93
|
-
* point: one form-level setting (`mobile.fullscreenLongText`) projects onto
|
|
94
|
-
* both render paths, so two copies of this copy could only drift.
|
|
95
|
-
*
|
|
96
|
-
* `useFieldTranslation` (not bare `useObjectTranslation`) because this widget
|
|
97
|
-
* is rendered without an `I18nProvider` by standalone/embedded hosts and by
|
|
98
|
-
* every bare-render test in this package. Measured before the change: with no
|
|
99
|
-
* provider mounted `useObjectTranslation().t('common.cancel')` returns
|
|
100
|
-
* `"common.cancel"` — the raw key — and the `{{label}}` interpolation collapses
|
|
101
|
-
* entirely. The safe hook's English defaults are byte-identical to the literals
|
|
102
|
-
* they replaced, so the provider-less rendering is unchanged.
|
|
103
|
-
*
|
|
104
|
-
* Focus management, `Esc`, the overlay and the close button are Radix's, via
|
|
105
|
-
* the repo's `Dialog` (`@object-ui/components`) — deliberately not re-answered
|
|
106
|
-
* here.
|
|
4
|
+
* The fullscreen-edit affordance shared by every long-text widget in this
|
|
5
|
+
* package (`field:textarea` → `TextAreaField`, `field:markdown` / `field:html`
|
|
6
|
+
* → `RichTextField`).
|
|
7
|
+
*
|
|
8
|
+
* ## This is now a thin wrapper (objectui#3398)
|
|
9
|
+
*
|
|
10
|
+
* The affordance, the dialog, the draft/commit state machine and the
|
|
11
|
+
* `readOnly` / `disabled` semantics all live in `FullscreenEditor`
|
|
12
|
+
* (`@object-ui/components`). They used to live here AND, separately, in the
|
|
13
|
+
* form renderer's built-in `textarea` branch — one form-level promise
|
|
14
|
+
* (`ObjectFormSchema.mobile.fullscreenLongText`, projected onto every long-text
|
|
15
|
+
* field as `mobile_fullscreen`) answered twice, on the two render paths.
|
|
16
|
+
*
|
|
17
|
+
* Two copies of a state machine drift, and these did: objectui#3400 measured a
|
|
18
|
+
* read-only field editable through the built-in branch's dialog, objectui#3402
|
|
19
|
+
* measured the same hole for `disabled` here, and #3393 (label in the dialog
|
|
20
|
+
* title) and #3272 (i18n) each landed on one side before the other. The
|
|
21
|
+
* maintainer's ruling of 2026-08-10 was one implementation hoisted to the
|
|
22
|
+
* dependency-legal side — and the measured import graph allows exactly that
|
|
23
|
+
* direction: this package depends on `@object-ui/components`, which declares no
|
|
24
|
+
* dependency on `@object-ui/fields` in `dependencies` or `peerDependencies`.
|
|
25
|
+
*
|
|
26
|
+
* ## Why the wrapper survives the merge rather than being deleted
|
|
27
|
+
*
|
|
28
|
+
* It carries the one thing that is genuinely about THIS package: `readOnly` is
|
|
29
|
+
* not part of the contract here. Both hosts early-return a read-only DISPLAY
|
|
30
|
+
* before they compute the affordance (`TextAreaField.tsx`, `RichTextField.tsx`),
|
|
31
|
+
* so a `readOnly` reaching this component would be a prop with no producer on
|
|
32
|
+
* this path — the shape this package keeps deleting (objectui#3232/#3233). The
|
|
33
|
+
* `Omit` below is that statement in the type system, and it is why the hoist did
|
|
34
|
+
* not simply re-export the primitive. A future host that renders an editor for
|
|
35
|
+
* read-only fields must widen this type AND pass the prop together; the
|
|
36
|
+
* primitive already answers it (no affordance at all).
|
|
37
|
+
*
|
|
38
|
+
* Everything else — `value` / `onCommit` / `label` / `testIdPrefix` /
|
|
39
|
+
* `disabled` / `error` / `children` / `footer` — passes straight through, so the
|
|
40
|
+
* hosts and their pins are unchanged. `error` is REQUIRED by the primitive
|
|
41
|
+
* (objectui#4824) and stays required here: both hosts already destructure it off
|
|
42
|
+
* the widget props contract (objectui#3222), and it is what the primitive turns
|
|
43
|
+
* into the dialog control's `aria-invalid` / `aria-errormessage` and into the
|
|
44
|
+
* dialog-local message node. A host that omits it gets a dialog announcing
|
|
45
|
+
* `aria-invalid="false"` for an invalid field, which is the defect #4824
|
|
46
|
+
* measured — so the type system asks for it rather than trusting the next
|
|
47
|
+
* author to remember. `testIdPrefix` still namespaces this package's ids
|
|
48
|
+
* (`textarea-`, `richtext-`), distinct from the built-in branch's
|
|
49
|
+
* `form-textarea-`, so a test can still say which render path it found.
|
|
107
50
|
*/
|
|
108
|
-
export
|
|
109
|
-
|
|
110
|
-
* The committed value. Seeds the draft each time the dialog opens — read at
|
|
111
|
-
* open time, not held, so a value that changes underneath while the dialog is
|
|
112
|
-
* closed is picked up on the next open.
|
|
113
|
-
*/
|
|
114
|
-
value: string;
|
|
115
|
-
/** Called once with the draft when the user confirms. */
|
|
116
|
-
onCommit: (next: string) => void;
|
|
117
|
-
/** Field label — the dialog title and part of the toggle's accessible name. */
|
|
118
|
-
label?: string;
|
|
119
|
-
/** Namespace for this widget's fullscreen test ids. See above. */
|
|
120
|
-
testIdPrefix: string;
|
|
121
|
-
/**
|
|
122
|
-
* The host field is not interactive (objectui#3402). Disables the toggle, the
|
|
123
|
-
* "Done" button and the write-back, and is handed to `children` so the host's
|
|
124
|
-
* own editor renders disabled too. See the `disabled` section above for why
|
|
125
|
-
* each of those is a separate line rather than belt-and-braces.
|
|
126
|
-
*
|
|
127
|
-
* **Producer**: the widget's `disabled` prop, which the form renderer computes
|
|
128
|
-
* as `disabled || fieldDisabled || isSubmitting || optionGroupGated` and
|
|
129
|
-
* forwards to registered widgets (`stripRegisteredFieldProps` does not strip
|
|
130
|
-
* it).
|
|
131
|
-
*/
|
|
132
|
-
disabled?: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* The editor itself, rendered inside the dialog body against the draft. The
|
|
135
|
-
* host passes the SAME editor it renders inline, so "fullscreen" is a size
|
|
136
|
-
* change rather than a second, poorer editing surface.
|
|
137
|
-
*
|
|
138
|
-
* The third argument is this component's `disabled`, and the host is expected
|
|
139
|
-
* to put it on the control it renders: only the host knows which element its
|
|
140
|
-
* editor's disabled state belongs on. Ignoring it is not a write-back hole —
|
|
141
|
-
* `onCommit` is gated here regardless — but it does leave a control that looks
|
|
142
|
-
* editable while the field is not, so both in-repo hosts apply it and their
|
|
143
|
-
* tests pin it.
|
|
144
|
-
*/
|
|
145
|
-
children: (draft: string, setDraft: (next: string) => void, disabled: boolean) => React.ReactNode;
|
|
146
|
-
/** Optional footer status for the draft (e.g. a character counter). */
|
|
147
|
-
footer?: (draft: string) => React.ReactNode;
|
|
148
|
-
/**
|
|
149
|
-
* Extra classes for the toggle button. It is absolutely positioned by
|
|
150
|
-
* default and expects a `relative` ancestor; a host whose layout has a
|
|
151
|
-
* better home for it can re-place it here.
|
|
152
|
-
*/
|
|
153
|
-
toggleClassName?: string;
|
|
154
|
-
}
|
|
155
|
-
export declare function FullscreenFieldEditor({ value, onCommit, label, testIdPrefix, disabled, children, footer, toggleClassName, }: FullscreenFieldEditorProps): React.JSX.Element;
|
|
51
|
+
export type FullscreenFieldEditorProps = Omit<FullscreenEditorProps, 'readOnly'>;
|
|
52
|
+
export declare function FullscreenFieldEditor(props: FullscreenFieldEditorProps): React.JSX.Element;
|
|
@@ -1,8 +1,45 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* GridField / LineItemsField — editable child-grid ("line items") widget.
|
|
5
5
|
*
|
|
6
|
+
* ## Where the host's label and help text land, and why (objectui#4857)
|
|
7
|
+
*
|
|
8
|
+
* This widget forwarded nothing a host handed it, so the field's visible label
|
|
9
|
+
* pointed `for` at an id no element carried and the help text had zero
|
|
10
|
+
* consumers. Measured on `origin/main` at `e71c854ce`, a real form, editable
|
|
11
|
+
* state, `description` set:
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* bare (no columns) for=DANGLING hostIdEl=NONE consumers=0 focusables=[button]
|
|
15
|
+
* columns + one row for=DANGLING hostIdEl=NONE consumers=0 focusables=[drag,
|
|
16
|
+
* input(Item), input(Qty), button(Duplicate row),
|
|
17
|
+
* button(Remove row), input(Item), input(Qty), button(Add)]
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* The bare row's single focusable is the auxiliary "Add line" BUTTON — labelable,
|
|
21
|
+
* but routing the host id (and so the label's `for`) onto it would make the
|
|
22
|
+
* field's label NAME the add-row action and make a click on the label insert a
|
|
23
|
+
* row. Every realistic config is a composite: many cell inputs, each with its
|
|
24
|
+
* own `aria-label`, under one container. So this widget declares
|
|
25
|
+
* `labelling: 'group'` (see `FIELD_WIDGET_LABELLING` in `../index`) — the
|
|
26
|
+
* objectui#3961 composite shape, like `address` — and the CONTAINER consumes the
|
|
27
|
+
* host's keys:
|
|
28
|
+
*
|
|
29
|
+
* - editable / list mode: the root div takes the DOM pass-through minus `name`
|
|
30
|
+
* (DOM-legal on form controls only — the objectui#3291 leak) and minus
|
|
31
|
+
* `aria-invalid` (control-channel state; this grid reports validity per CELL,
|
|
32
|
+
* with its own inline marks), answering `role="group"` only when a host
|
|
33
|
+
* actually named it — `CheckboxesField`'s split, key for key.
|
|
34
|
+
*
|
|
35
|
+
* That strip STANDS (objectui#3318 upheld it rather than overturning it):
|
|
36
|
+
* the container is not a control, so the host's state is not re-routed onto
|
|
37
|
+
* it. What #3318 added is the other half the strip implied but nobody had
|
|
38
|
+
* built — the host's failure now DRIVES the per-cell channel this comment
|
|
39
|
+
* already claimed as the reporting path. See `hostFailedEmpty`.
|
|
40
|
+
* - readonly: the table replaces the inputs entirely, so that surface takes the
|
|
41
|
+
* name AND the description via `toHostGroupProps` — `'instead-of-the-inputs'`.
|
|
42
|
+
*
|
|
6
43
|
* A controlled component: `value` is an array of row objects, `onChange`
|
|
7
44
|
* receives the next array. It renders one editable cell per configured
|
|
8
45
|
* column, supports add / delete row, and shows a running total of a numeric
|
|
@@ -10,16 +47,41 @@ import { FieldWidgetComponentProps } from './types';
|
|
|
10
47
|
* engine behind the master-detail subform (see ADR-0001).
|
|
11
48
|
*
|
|
12
49
|
* Column config (a subset of `GridColumnDefinition`):
|
|
13
|
-
* {
|
|
14
|
-
* type ∈ 'text' | 'number' | 'currency' | 'date' | '
|
|
50
|
+
* { name, label?, type?, options?, width?, required?, prefix?, step? }
|
|
51
|
+
* type ∈ 'text' | 'number' | 'currency' | 'date' | 'datetime' | 'time'
|
|
52
|
+
* | 'select' | 'lookup' | 'file'
|
|
15
53
|
*
|
|
16
54
|
* Field-level config (from `GridFieldMetadata`):
|
|
17
55
|
* columns, min_rows, max_rows, allow_add, allow_delete, total_field
|
|
18
56
|
*/
|
|
19
57
|
export interface GridColumn {
|
|
20
|
-
|
|
58
|
+
/**
|
|
59
|
+
* The column's field name — the key it reads and writes on each row object.
|
|
60
|
+
*
|
|
61
|
+
* Spelled `name`, exactly as the declared `GridColumnDefinition`
|
|
62
|
+
* (`@object-ui/types`) and the grid docs page say (objectui#3951). This
|
|
63
|
+
* widget used to read a divergent `field` key, so metadata authored against
|
|
64
|
+
* the published type rendered every cell empty plus a React key warning.
|
|
65
|
+
* There is deliberately no tolerant alias bridging the retired spelling to
|
|
66
|
+
* this one: a single spelling, enforced at the producer — AGENTS.md #0.1.
|
|
67
|
+
*
|
|
68
|
+
* (Wording note: do not restate that rule as an alternation expression over
|
|
69
|
+
* the two key names. `column-identity.ratchet.test.ts` (objectui#3104) scans
|
|
70
|
+
* these files line by line and cannot tell prose from code, so spelling the
|
|
71
|
+
* shape out here registers as a new dual read and fails the gate.)
|
|
72
|
+
*/
|
|
73
|
+
name: string;
|
|
21
74
|
label?: string;
|
|
22
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Cell control + read/write adapter for the column.
|
|
77
|
+
*
|
|
78
|
+
* `date` / `datetime` / `time` are three DISTINCT controls, not one
|
|
79
|
+
* (objectui#3569). Collapsing `datetime` onto the `date` control did not
|
|
80
|
+
* merely under-render it — `<input type="date">` hands back a bare
|
|
81
|
+
* `YYYY-MM-DD` on change, so touching the day of a `datetime` cell silently
|
|
82
|
+
* DELETED its time component from the record.
|
|
83
|
+
*/
|
|
84
|
+
type?: 'text' | 'number' | 'currency' | 'date' | 'datetime' | 'time' | 'select' | 'lookup' | 'file';
|
|
23
85
|
options?: Array<{
|
|
24
86
|
label: string;
|
|
25
87
|
value: string;
|
|
@@ -104,7 +166,7 @@ export declare function lookupAutofillPatch(columns: GridColumn[], col: GridColu
|
|
|
104
166
|
export declare function computeRow(columns: GridColumn[], row: Row): Row;
|
|
105
167
|
/** Sum a numeric column across rows (ignoring blanks/NaN). */
|
|
106
168
|
export declare function sumColumn(rows: Row[], field: string): number;
|
|
107
|
-
export declare function GridField({ value, onChange, field, readonly, disabled, className, onRowExpand, displayMode, onAdd, ...props }: FieldWidgetComponentProps<Row[]> & {
|
|
169
|
+
export declare function GridField({ value, onChange, field, readonly, disabled, className, error, onRowExpand, displayMode, onAdd, ...props }: FieldWidgetComponentProps<Row[]> & {
|
|
108
170
|
/** When provided, each row shows an "expand" button that opens the row in a
|
|
109
171
|
* full form (the host — e.g. MasterDetailForm — renders the drawer/modal and
|
|
110
172
|
* writes the edited values back). Lets a "fat" child be edited in a real form
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* NumberField - Numeric input with optional decimal precision
|
|
5
5
|
* Supports min/max/step constraints and configurable decimal precision
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
export declare function ObjectRefField({ value, onChange, readonly, className, error, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
4
4
|
export default ObjectRefField;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { HostGroupProps } from './toHostGroupProps.js';
|
|
2
3
|
/**
|
|
3
4
|
* The "this option list cannot be filled" state shared by every fixed-option
|
|
4
5
|
* widget (`SelectField` single, `MultiSelectField`, `RadioField`,
|
|
@@ -41,5 +42,24 @@ export interface OptionsEmptyStateProps {
|
|
|
41
42
|
testId?: string;
|
|
42
43
|
/** Widget-specific sizing (the dropdown is a fixed `h-9`, lists grow). */
|
|
43
44
|
className?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The host label's IDREF plumbing, when this box is the whole rendered surface
|
|
47
|
+
* of a group-labelled field (objectui#3990) — a `checkboxes` / `radio` /
|
|
48
|
+
* `multiselect` whose option list came back empty renders NOTHING but this
|
|
49
|
+
* box, so the visible label named zero elements until it landed here. Its
|
|
50
|
+
* help text described zero elements for the same reason, which is why the
|
|
51
|
+
* callers ask `toHostGroupProps` for the `'instead-of-the-inputs'` surface:
|
|
52
|
+
* there is no option control in this state to announce the description on
|
|
53
|
+
* (objectui#4005).
|
|
54
|
+
*
|
|
55
|
+
* A closed type rather than an open props tail: only `id`, `aria-labelledby`,
|
|
56
|
+
* `aria-describedby` and the `role` that makes them meaningful may reach this
|
|
57
|
+
* element, and reopening a spread is what objectui#3291 exists to prevent —
|
|
58
|
+
* `aria-invalid` / `aria-required` are control-channel state and stay off this
|
|
59
|
+
* surface. Absent for the single `SelectField` — it is not group-labelled, its
|
|
60
|
+
* label still uses a plain `for`, and it must keep emitting no such
|
|
61
|
+
* attributes.
|
|
62
|
+
*/
|
|
63
|
+
hostGroupProps?: HostGroupProps;
|
|
44
64
|
}
|
|
45
|
-
export declare function OptionsEmptyState({ emptyHint, gated, dependsOnFields, testId, className, }: OptionsEmptyStateProps): React.JSX.Element;
|
|
65
|
+
export declare function OptionsEmptyState({ emptyHint, gated, dependsOnFields, testId, className, hostGroupProps, }: OptionsEmptyStateProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* PasswordField - Secure password input with visibility toggle
|
|
5
5
|
* Includes show/hide toggle button and masks value in readonly mode
|