@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
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { FieldMetadata } from '@object-ui/types';
|
|
3
|
-
import {
|
|
3
|
+
import { humanizeLabel, ComponentMeta } from '@object-ui/core';
|
|
4
|
+
import { resolveFieldCurrency } from './currency.js';
|
|
4
5
|
/**
|
|
5
6
|
* Pick the most reasonable display name from an arbitrary record object.
|
|
6
7
|
* Tries common name-like keys in priority order, then falls back to undefined.
|
|
@@ -29,34 +30,52 @@ export interface CellRendererProps {
|
|
|
29
30
|
*/
|
|
30
31
|
export declare function coerceToSafeValue(value: unknown): string | number | boolean | null | undefined;
|
|
31
32
|
export { resolveFieldCurrency };
|
|
32
|
-
export declare function formatCurrency(value: number, currency?: string): string;
|
|
33
|
+
export declare function formatCurrency(value: number, currency?: string, locale?: string): string;
|
|
33
34
|
/**
|
|
34
35
|
* Format currency value in compact form for mobile display.
|
|
35
36
|
* E.g., $150,000 → $150K, $1,200,000 → $1.2M
|
|
36
37
|
* When `currency` is undefined, returns a compact number without symbol.
|
|
37
38
|
*/
|
|
38
|
-
export declare function formatCompactCurrency(value: number, currency?: string): string;
|
|
39
|
+
export declare function formatCompactCurrency(value: number, currency?: string, locale?: string): string;
|
|
39
40
|
/**
|
|
40
41
|
* Format a plain number with thousands separators, no currency symbol.
|
|
41
42
|
* Used as a safe fallback when a currency-typed field has no `currency`
|
|
42
43
|
* configured — we'd rather render `1,234.50` than silently assume USD.
|
|
43
44
|
*/
|
|
44
|
-
export declare function formatNumber(value: number, decimals?: number): string;
|
|
45
|
+
export declare function formatNumber(value: number, decimals?: number, locale?: string): string;
|
|
45
46
|
/**
|
|
46
|
-
* Format percent value
|
|
47
|
+
* Format percent value.
|
|
47
48
|
* Handles both decimal (0.8 = 80%) and whole number (80 = 80%) inputs.
|
|
48
|
-
*/
|
|
49
|
-
export declare function formatPercent(value: number, precision?: number): string;
|
|
50
|
-
/**
|
|
51
|
-
* Humanize a snake_case or kebab-case string into Title Case.
|
|
52
|
-
* Used as fallback label when no explicit option.label exists.
|
|
53
49
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
* `locale` is the third positional parameter, matching {@link formatNumber} and
|
|
51
|
+
* {@link formatCurrency} — the shape the sibling formatters already use.
|
|
52
|
+
* Callers should pass the tag from `useDisplayLocale()`.
|
|
53
|
+
*
|
|
54
|
+
* Before objectui#4553 this function took no locale and never touched `Intl`:
|
|
55
|
+
* its whole body was `${percentDisplayValue(value).toFixed(precision)}%`, so it
|
|
56
|
+
* rendered in NO locale rather than the machine's — an ASCII decimal mark and
|
|
57
|
+
* never a grouping separator, byte-identical on every machine. That made
|
|
58
|
+
* `1235%` the output everywhere, which is wrong in en-US as well as in German,
|
|
59
|
+
* so the grouping and the locale are fixed together: en output MOVES from
|
|
60
|
+
* `1235%` to `1,235%` at four digits and up, and that move is the fix.
|
|
61
|
+
*/
|
|
62
|
+
export declare function formatPercent(value: number, precision?: number, locale?: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* Humanize a snake_case or kebab-case string into Title Case — the fallback
|
|
65
|
+
* label when no explicit `option.label` exists.
|
|
66
|
+
*
|
|
67
|
+
* Defined in `@object-ui/core` (`utils/humanize-label.ts`) and re-exported here
|
|
68
|
+
* because this package is one of its two doorways: `plugin-grid`,
|
|
69
|
+
* `plugin-gantt` and `plugin-detail` read it from `@object-ui/fields`, while
|
|
70
|
+
* `plugin-charts` reads the same function straight from core. Until
|
|
71
|
+
* objectui#5444 this file and `plugin-charts`' `ObjectChart.tsx` each held a
|
|
72
|
+
* byte-identical private copy; core is the shared ancestor both packages
|
|
73
|
+
* already depend on, so the convention has one home and no new dependency edge
|
|
74
|
+
* (objectui#4389: core-canonical logic, plugins consume). The core docstring
|
|
75
|
+
* carries the convention itself, and the reason it stays distinct from
|
|
76
|
+
* `humanizeFieldKey`'s camelCase-splitting KEY convention.
|
|
77
|
+
*/
|
|
78
|
+
export { humanizeLabel };
|
|
60
79
|
/** Options shared by {@link formatDate} / {@link formatRelativeDate}. */
|
|
61
80
|
export interface DateDisplayOptions {
|
|
62
81
|
dueLike?: boolean;
|
|
@@ -81,9 +100,17 @@ export declare function formatRelativeDate(value: string | Date | number, option
|
|
|
81
100
|
*/
|
|
82
101
|
export declare function formatDate(value: string | Date | number, style?: string, options?: DateDisplayOptions): string;
|
|
83
102
|
/**
|
|
84
|
-
* Format datetime value
|
|
103
|
+
* Format datetime value.
|
|
104
|
+
*
|
|
105
|
+
* `options` mirrors {@link formatDate}'s and is optional, so an existing
|
|
106
|
+
* caller that passes nothing keeps the exact runtime-default behavior it had.
|
|
107
|
+
* Before objectui#4272 the parameter did not exist at all, which meant no
|
|
108
|
+
* caller could localize this function however hard it tried — it always handed
|
|
109
|
+
* `Intl` an `undefined` tag, i.e. the MACHINE's locale, which is neither of
|
|
110
|
+
* the repo's two locale channels. Callers should pass the tag from
|
|
111
|
+
* `useDisplayLocale()`.
|
|
85
112
|
*/
|
|
86
|
-
export declare function formatDateTime(value: string | Date | number): string;
|
|
113
|
+
export declare function formatDateTime(value: string | Date | number, options?: DateDisplayOptions): string;
|
|
87
114
|
/**
|
|
88
115
|
* Text field cell renderer
|
|
89
116
|
*/
|
|
@@ -114,6 +141,43 @@ export declare function DateCellRenderer({ value, field }: CellRendererProps): R
|
|
|
114
141
|
* DateTime field cell renderer (Airtable-style with date and time visually separated)
|
|
115
142
|
*/
|
|
116
143
|
export declare function DateTimeCellRenderer({ value }: CellRendererProps): React.ReactElement;
|
|
144
|
+
/** The six pill colors plus the two dot colors derived from one declared hex. */
|
|
145
|
+
export interface HexBadgePalette {
|
|
146
|
+
bg: string;
|
|
147
|
+
fg: string;
|
|
148
|
+
border: string;
|
|
149
|
+
bgDark: string;
|
|
150
|
+
fgDark: string;
|
|
151
|
+
borderDark: string;
|
|
152
|
+
dot: string;
|
|
153
|
+
dotDark: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Derive a full soft-pill palette from an author-declared hex.
|
|
157
|
+
*
|
|
158
|
+
* The declared LIGHTNESS is what separates two same-hue tiers (`#2ecc71` is
|
|
159
|
+
* l=0.49, `#1e8449` is l=0.32 — their hues differ by 0.1°), so it has to
|
|
160
|
+
* survive into the *surface*. A fixed pale tint — the obvious reading of
|
|
161
|
+
* "compute a soft pill from the hex" — does not carry it: measured, that
|
|
162
|
+
* leaves the reported pair ΔE 2.3 apart in Lab, at the ~2.3 just-noticeable
|
|
163
|
+
* threshold, which would close this issue on paper while the user still cannot
|
|
164
|
+
* tell the two badges apart. Letting the tint depth track the declared
|
|
165
|
+
* lightness puts them ΔE 8.0 apart instead.
|
|
166
|
+
*/
|
|
167
|
+
export declare function deriveHexBadgePalette(color: string): HexBadgePalette | undefined;
|
|
168
|
+
/** A className plus the custom properties it reads. */
|
|
169
|
+
export interface HexColorAppearance {
|
|
170
|
+
className: string;
|
|
171
|
+
style: React.CSSProperties;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Soft-pill appearance for an explicitly declared hex, or `undefined` for
|
|
175
|
+
* every other kind of declaration (family name, no colour at all) so the
|
|
176
|
+
* caller falls back to `getBadgeColorClasses`.
|
|
177
|
+
*/
|
|
178
|
+
export declare function getBadgeHexAppearance(color?: string): HexColorAppearance | undefined;
|
|
179
|
+
/** Dot appearance for an explicitly declared hex (see `getBadgeHexAppearance`). */
|
|
180
|
+
export declare function getDotHexAppearance(color?: string): HexColorAppearance | undefined;
|
|
117
181
|
export declare function getBadgeColorClasses(color?: string, val?: unknown): string;
|
|
118
182
|
/**
|
|
119
183
|
* Resolve a semantic color name (e.g. "red", "green") for a value, suitable
|
|
@@ -226,25 +290,47 @@ export declare function JsonCellRenderer({ value }: CellRendererProps): React.Re
|
|
|
226
290
|
*/
|
|
227
291
|
export declare function ColorSwatchCellRenderer({ value }: CellRendererProps): React.ReactElement;
|
|
228
292
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
*
|
|
293
|
+
* The rich-content display pipelines — `markdown` through the GFM renderer,
|
|
294
|
+
* `html`/`richtext` through the sanitizing HTML renderer — live in
|
|
295
|
+
* `./widgets/richTextDisplay.js` rather than here, so `RichTextField` can
|
|
296
|
+
* import them without importing this barrel back (objectui#5498). Re-exported
|
|
297
|
+
* unchanged: they are part of this package's published surface, and
|
|
298
|
+
* `RICH_TEXT_CELL_RENDERERS` below is the one table both the cell resolver and
|
|
299
|
+
* the widget's readonly branch read.
|
|
235
300
|
*/
|
|
236
|
-
export
|
|
301
|
+
export { MarkdownCellRenderer, HtmlCellRenderer } from './widgets/richTextDisplay.js';
|
|
237
302
|
/**
|
|
238
303
|
* Renders a `location`/`geolocation` value as readable coordinates with a pin.
|
|
239
304
|
* Accepts `{ lat, lng }` / `{ latitude, longitude }`, a `"lat,lng"` string,
|
|
240
305
|
* or a `[lat, lng]` array. Falls back to compact JSON for anything else.
|
|
241
306
|
*/
|
|
242
307
|
export declare function LocationCellRenderer({ value }: CellRendererProps): React.ReactElement;
|
|
308
|
+
/**
|
|
309
|
+
* Renders an `address` value as a formatted single-line postal address instead
|
|
310
|
+
* of stringified JSON (objectui#4037).
|
|
311
|
+
*
|
|
312
|
+
* The detail page's display registry mapped `address` to {@link JsonCellRenderer},
|
|
313
|
+
* so a populated address read as `{"street":"中策路 1 号","city":"杭州",…}` on the
|
|
314
|
+
* detail page and in its inline-edit read state — while the very same value
|
|
315
|
+
* rendered correctly in the create/edit dialog, whose input registry has always
|
|
316
|
+
* carried `address`. Read side only: nothing about the input widget changes.
|
|
317
|
+
*
|
|
318
|
+
* Layout is not invented here. It is {@link formatAddress} — the rule
|
|
319
|
+
* `AddressField`'s own readonly branch already applied, over the sub-field set
|
|
320
|
+
* its inputs expose — so a readonly form and a detail page cannot spell one
|
|
321
|
+
* stored address two ways.
|
|
322
|
+
*
|
|
323
|
+
* Anything `formatAddress` cannot recognize falls back to compact JSON rather
|
|
324
|
+
* than rendering blank: an unknown shape stays visible (today's behaviour) and
|
|
325
|
+
* is never silently swallowed by the fix.
|
|
326
|
+
*/
|
|
327
|
+
export declare function AddressCellRenderer({ value }: CellRendererProps): React.ReactElement;
|
|
243
328
|
/**
|
|
244
329
|
* Get the appropriate cell renderer for a field type
|
|
245
330
|
*/
|
|
246
331
|
export declare function getCellRenderer(fieldType: string): React.FC<CellRendererProps>;
|
|
247
|
-
export { mapFieldTypeToFormType } from './field-type-alias';
|
|
332
|
+
export { mapFieldTypeToFormType } from './field-type-alias.js';
|
|
333
|
+
export { RETIRED_FIELD_TYPES, isRetiredFieldType, reportRetiredFieldType, resetRetiredFieldTypeReports, } from './field-type-alias.js';
|
|
248
334
|
/**
|
|
249
335
|
* Formats file size in bytes to human-readable string
|
|
250
336
|
* @param bytes - File size in bytes (must be non-negative)
|
|
@@ -264,6 +350,235 @@ export declare function buildValidationRules(field: any): any;
|
|
|
264
350
|
* @returns Whether the condition is met
|
|
265
351
|
*/
|
|
266
352
|
export declare function evaluateCondition(condition: any, formData: any): boolean;
|
|
353
|
+
declare const fieldWidgetMap: {
|
|
354
|
+
text: () => Promise<{
|
|
355
|
+
default: React.ComponentType<any>;
|
|
356
|
+
} | {
|
|
357
|
+
default: typeof import('./widgets/TextField.js').TextField;
|
|
358
|
+
}>;
|
|
359
|
+
textarea: () => Promise<{
|
|
360
|
+
default: React.ComponentType<any>;
|
|
361
|
+
} | {
|
|
362
|
+
default: typeof import('./widgets/TextAreaField.js').TextAreaField;
|
|
363
|
+
}>;
|
|
364
|
+
number: () => Promise<{
|
|
365
|
+
default: React.ComponentType<any>;
|
|
366
|
+
} | {
|
|
367
|
+
default: typeof import('./widgets/NumberField.js').NumberField;
|
|
368
|
+
}>;
|
|
369
|
+
boolean: () => Promise<{
|
|
370
|
+
default: React.ComponentType<any>;
|
|
371
|
+
} | {
|
|
372
|
+
default: typeof import('./widgets/BooleanField.js').BooleanField;
|
|
373
|
+
}>;
|
|
374
|
+
select: () => Promise<{
|
|
375
|
+
default: React.ComponentType<any>;
|
|
376
|
+
} | {
|
|
377
|
+
default: typeof import('./widgets/SelectField.js').SelectField;
|
|
378
|
+
}>;
|
|
379
|
+
date: () => Promise<{
|
|
380
|
+
default: React.ComponentType<any>;
|
|
381
|
+
} | {
|
|
382
|
+
default: typeof import('./widgets/DateField.js').DateField;
|
|
383
|
+
}>;
|
|
384
|
+
datetime: () => Promise<{
|
|
385
|
+
default: React.ComponentType<any>;
|
|
386
|
+
} | {
|
|
387
|
+
default: typeof import('./widgets/DateTimeField.js').DateTimeField;
|
|
388
|
+
}>;
|
|
389
|
+
time: () => Promise<{
|
|
390
|
+
default: React.ComponentType<any>;
|
|
391
|
+
} | {
|
|
392
|
+
default: typeof import('./widgets/TimeField.js').TimeField;
|
|
393
|
+
}>;
|
|
394
|
+
email: () => Promise<{
|
|
395
|
+
default: React.ComponentType<any>;
|
|
396
|
+
} | {
|
|
397
|
+
default: typeof import('./widgets/EmailField.js').EmailField;
|
|
398
|
+
}>;
|
|
399
|
+
phone: () => Promise<{
|
|
400
|
+
default: React.ComponentType<any>;
|
|
401
|
+
} | {
|
|
402
|
+
default: typeof import('./widgets/PhoneField.js').PhoneField;
|
|
403
|
+
}>;
|
|
404
|
+
url: () => Promise<{
|
|
405
|
+
default: React.ComponentType<any>;
|
|
406
|
+
} | {
|
|
407
|
+
default: typeof import('./widgets/UrlField.js').UrlField;
|
|
408
|
+
}>;
|
|
409
|
+
multiselect: () => Promise<{
|
|
410
|
+
default: React.ComponentType<any>;
|
|
411
|
+
} | {
|
|
412
|
+
default: typeof import('./widgets/MultiSelectField.js').MultiSelectField;
|
|
413
|
+
}>;
|
|
414
|
+
radio: () => Promise<{
|
|
415
|
+
default: React.ComponentType<any>;
|
|
416
|
+
} | {
|
|
417
|
+
default: typeof import('./widgets/RadioField.js').RadioField;
|
|
418
|
+
}>;
|
|
419
|
+
checkboxes: () => Promise<{
|
|
420
|
+
default: React.ComponentType<any>;
|
|
421
|
+
} | {
|
|
422
|
+
default: typeof import('./widgets/CheckboxesField.js').CheckboxesField;
|
|
423
|
+
}>;
|
|
424
|
+
tags: () => Promise<{
|
|
425
|
+
default: React.ComponentType<any>;
|
|
426
|
+
} | {
|
|
427
|
+
default: typeof import('./widgets/TagsField.js').TagsField;
|
|
428
|
+
}>;
|
|
429
|
+
currency: () => Promise<{
|
|
430
|
+
default: React.ComponentType<any>;
|
|
431
|
+
} | {
|
|
432
|
+
default: typeof import('./widgets/CurrencyField.js').CurrencyField;
|
|
433
|
+
}>;
|
|
434
|
+
percent: () => Promise<{
|
|
435
|
+
default: React.ComponentType<any>;
|
|
436
|
+
} | {
|
|
437
|
+
default: typeof import('./widgets/PercentField.js').PercentField;
|
|
438
|
+
}>;
|
|
439
|
+
password: () => Promise<{
|
|
440
|
+
default: React.ComponentType<any>;
|
|
441
|
+
} | {
|
|
442
|
+
default: typeof import('./widgets/PasswordField.js').PasswordField;
|
|
443
|
+
}>;
|
|
444
|
+
markdown: () => Promise<{
|
|
445
|
+
default: React.ComponentType<any>;
|
|
446
|
+
} | {
|
|
447
|
+
default: typeof import('./widgets/RichTextField.js').RichTextField;
|
|
448
|
+
}>;
|
|
449
|
+
html: () => Promise<{
|
|
450
|
+
default: React.ComponentType<any>;
|
|
451
|
+
} | {
|
|
452
|
+
default: typeof import('./widgets/RichTextField.js').RichTextField;
|
|
453
|
+
}>;
|
|
454
|
+
richtext: () => Promise<{
|
|
455
|
+
default: React.ComponentType<any>;
|
|
456
|
+
} | {
|
|
457
|
+
default: typeof import('./widgets/RichTextField.js').RichTextField;
|
|
458
|
+
}>;
|
|
459
|
+
lookup: () => Promise<{
|
|
460
|
+
default: React.ComponentType<any>;
|
|
461
|
+
} | {
|
|
462
|
+
default: typeof import('./widgets/LookupField.js').LookupField;
|
|
463
|
+
}>;
|
|
464
|
+
master_detail: () => Promise<{
|
|
465
|
+
default: React.ComponentType<any>;
|
|
466
|
+
} | {
|
|
467
|
+
default: typeof import('./widgets/LookupField.js').LookupField;
|
|
468
|
+
}>;
|
|
469
|
+
file: () => Promise<{
|
|
470
|
+
default: React.ComponentType<any>;
|
|
471
|
+
} | {
|
|
472
|
+
default: typeof import('./widgets/FileField.js').FileField;
|
|
473
|
+
}>;
|
|
474
|
+
image: () => Promise<{
|
|
475
|
+
default: React.ComponentType<any>;
|
|
476
|
+
} | {
|
|
477
|
+
default: typeof import('./widgets/ImageField.js').ImageField;
|
|
478
|
+
}>;
|
|
479
|
+
location: () => Promise<{
|
|
480
|
+
default: React.ComponentType<any>;
|
|
481
|
+
} | {
|
|
482
|
+
default: typeof import('./widgets/LocationField.js').LocationField;
|
|
483
|
+
}>;
|
|
484
|
+
formula: () => Promise<{
|
|
485
|
+
default: React.ComponentType<any>;
|
|
486
|
+
} | {
|
|
487
|
+
default: typeof import('./widgets/FormulaField.js').FormulaField;
|
|
488
|
+
}>;
|
|
489
|
+
summary: () => Promise<{
|
|
490
|
+
default: React.ComponentType<any>;
|
|
491
|
+
} | {
|
|
492
|
+
default: typeof import('./widgets/SummaryField.js').SummaryField;
|
|
493
|
+
}>;
|
|
494
|
+
auto_number: () => Promise<{
|
|
495
|
+
default: React.ComponentType<any>;
|
|
496
|
+
} | {
|
|
497
|
+
default: typeof import('./widgets/AutoNumberField.js').AutoNumberField;
|
|
498
|
+
}>;
|
|
499
|
+
user: () => Promise<{
|
|
500
|
+
default: React.ComponentType<any>;
|
|
501
|
+
} | {
|
|
502
|
+
default: typeof import('./widgets/UserField.js').UserField;
|
|
503
|
+
}>;
|
|
504
|
+
object: () => Promise<{
|
|
505
|
+
default: React.ComponentType<any>;
|
|
506
|
+
} | {
|
|
507
|
+
default: typeof import('./widgets/ObjectField.js').ObjectField;
|
|
508
|
+
}>;
|
|
509
|
+
vector: () => Promise<{
|
|
510
|
+
default: React.ComponentType<any>;
|
|
511
|
+
} | {
|
|
512
|
+
default: typeof import('./widgets/VectorField.js').VectorField;
|
|
513
|
+
}>;
|
|
514
|
+
grid: () => Promise<{
|
|
515
|
+
default: React.ComponentType<any>;
|
|
516
|
+
} | {
|
|
517
|
+
default: typeof import('./widgets/GridField.js').GridField;
|
|
518
|
+
}>;
|
|
519
|
+
color: () => Promise<{
|
|
520
|
+
default: React.ComponentType<any>;
|
|
521
|
+
} | {
|
|
522
|
+
default: typeof import('./widgets/ColorField.js').ColorField;
|
|
523
|
+
}>;
|
|
524
|
+
slider: () => Promise<{
|
|
525
|
+
default: React.ComponentType<any>;
|
|
526
|
+
} | {
|
|
527
|
+
default: typeof import('./widgets/SliderField.js').SliderField;
|
|
528
|
+
}>;
|
|
529
|
+
rating: () => Promise<{
|
|
530
|
+
default: React.ComponentType<any>;
|
|
531
|
+
} | {
|
|
532
|
+
default: typeof import('./widgets/RatingField.js').RatingField;
|
|
533
|
+
}>;
|
|
534
|
+
code: () => Promise<{
|
|
535
|
+
default: React.ComponentType<any>;
|
|
536
|
+
} | {
|
|
537
|
+
default: typeof import('./widgets/CodeField.js').CodeField;
|
|
538
|
+
}>;
|
|
539
|
+
avatar: () => Promise<{
|
|
540
|
+
default: React.ComponentType<any>;
|
|
541
|
+
} | {
|
|
542
|
+
default: typeof import('./widgets/AvatarField.js').AvatarField;
|
|
543
|
+
}>;
|
|
544
|
+
address: () => Promise<{
|
|
545
|
+
default: React.ComponentType<any>;
|
|
546
|
+
} | {
|
|
547
|
+
default: typeof import('./widgets/AddressField.js').AddressField;
|
|
548
|
+
}>;
|
|
549
|
+
geolocation: () => Promise<{
|
|
550
|
+
default: React.ComponentType<any>;
|
|
551
|
+
} | {
|
|
552
|
+
default: typeof import('./widgets/GeolocationField.js').GeolocationField;
|
|
553
|
+
}>;
|
|
554
|
+
signature: () => Promise<{
|
|
555
|
+
default: React.ComponentType<any>;
|
|
556
|
+
} | {
|
|
557
|
+
default: typeof import('./widgets/SignatureField.js').SignatureField;
|
|
558
|
+
}>;
|
|
559
|
+
qrcode: () => Promise<{
|
|
560
|
+
default: React.ComponentType<any>;
|
|
561
|
+
} | {
|
|
562
|
+
default: typeof import('./widgets/QRCodeField.js').QRCodeField;
|
|
563
|
+
}>;
|
|
564
|
+
'object-ref': () => Promise<{
|
|
565
|
+
default: React.ComponentType<any>;
|
|
566
|
+
} | {
|
|
567
|
+
default: typeof import('./widgets/ObjectRefField.js').ObjectRefField;
|
|
568
|
+
}>;
|
|
569
|
+
'filter-condition': () => Promise<{
|
|
570
|
+
default: React.ComponentType<any>;
|
|
571
|
+
} | {
|
|
572
|
+
default: typeof import('./widgets/FilterConditionField.js').FilterConditionField;
|
|
573
|
+
}>;
|
|
574
|
+
'recipient-picker': () => Promise<{
|
|
575
|
+
default: React.ComponentType<any>;
|
|
576
|
+
} | {
|
|
577
|
+
default: typeof import('./widgets/RecipientPickerField.js').RecipientPickerField;
|
|
578
|
+
}>;
|
|
579
|
+
};
|
|
580
|
+
/** The registered field widget keys, as a literal union (objectui#4857). */
|
|
581
|
+
export type RegisteredFieldWidgetType = keyof typeof fieldWidgetMap;
|
|
267
582
|
/**
|
|
268
583
|
* Every field type the form can render (the canonical list of supported types).
|
|
269
584
|
* Exported so inline editing can be checked against it — a form type must
|
|
@@ -283,6 +598,18 @@ export declare const FORM_FIELD_TYPES: readonly string[];
|
|
|
283
598
|
* support can never drift behind the form surface (ADR-0059).
|
|
284
599
|
*/
|
|
285
600
|
export declare function resolveFormWidgetType(fieldType: string): string;
|
|
601
|
+
/**
|
|
602
|
+
* The widget keys that must be fed the live record (`dependentValues`) so their
|
|
603
|
+
* offered option set can be re-resolved per option `visibleWhen` / `dependsOn`.
|
|
604
|
+
*
|
|
605
|
+
* Defined in `@object-ui/core`, next to `resolveCascadingOptions` — the
|
|
606
|
+
* evaluator that reads the record — and re-exported here because this is the
|
|
607
|
+
* package whose {@link resolveFormWidgetType} produces the keys the set is
|
|
608
|
+
* keyed on: a consumer resolving a widget key finds the allow-table in the
|
|
609
|
+
* same place. One definition, two doorways; never a second copy (objectui#4770,
|
|
610
|
+
* which converged the three private copies that preceded it).
|
|
611
|
+
*/
|
|
612
|
+
export { CASCADE_OPTION_WIDGET_TYPES } from '@object-ui/core';
|
|
286
613
|
/**
|
|
287
614
|
* Lazily-loaded form field widget for a field type. Shares the exact loaders
|
|
288
615
|
* of {@link fieldWidgetMap} (the same components `registerField` registers for
|
|
@@ -292,6 +619,59 @@ export declare function resolveFormWidgetType(fieldType: string): string;
|
|
|
292
619
|
* widget via {@link resolveFormWidgetType}.
|
|
293
620
|
*/
|
|
294
621
|
export declare function getLazyFieldWidget(fieldType: string): React.ComponentType<any>;
|
|
622
|
+
/**
|
|
623
|
+
* The labelling declaration of EVERY registered field widget
|
|
624
|
+
* (`ComponentMeta.labelling` — the closed `'control' | 'group' | 'display'`
|
|
625
|
+
* vocabulary, objectui#3961 extended by objectui#4857). This `Record` is keyed
|
|
626
|
+
* by the widget map's own literal key union, so it is exhaustive BY
|
|
627
|
+
* CONSTRUCTION: registering a widget without deciding how a host's label
|
|
628
|
+
* reaches it is a COMPILE error here, not a silent fall-through to the
|
|
629
|
+
* `'control'` path — the omitted-declaration degradation is exactly the trap
|
|
630
|
+
* the #4857 ruling named, and it is what turned the display-only four into
|
|
631
|
+
* fields with no accessible name.
|
|
632
|
+
*
|
|
633
|
+
* ## `'group'` — a surface no `<label for>` can reach; the WIDGET consumes the IDREF
|
|
634
|
+
*
|
|
635
|
+
* Two shapes, one declaration:
|
|
636
|
+
*
|
|
637
|
+
* - real composites — `address` / `geolocation` render several inputs under one
|
|
638
|
+
* container, `checkboxes` / `radio` / `rating` / `multiselect` a set of
|
|
639
|
+
* choice controls, and `grid` a whole table of cell inputs plus row actions;
|
|
640
|
+
* the host's label names the GROUP, each sub-control keeps its own name (a
|
|
641
|
+
* sub-label, the chip's text content, or a cell's own `aria-label`).
|
|
642
|
+
* - single non-labelable controls — `file`'s one control is a
|
|
643
|
+
* `div[role="button"]` dropzone, `slider`'s is Radix's `span[role="slider"]`
|
|
644
|
+
* thumb (objectui#3318), `signature`'s drawing surface is a `<canvas>`
|
|
645
|
+
* (objectui#3318). A `div`/`span`/`canvas` cannot be `for`-labelled, so the
|
|
646
|
+
* name goes by IDREF to the control (or, for `signature`, its container).
|
|
647
|
+
*
|
|
648
|
+
* Measured, not assumed: every `'group'` entry was verified in a real form —
|
|
649
|
+
* the #3961/#3975 probes for the first seven, the #3318 delivery for
|
|
650
|
+
* `slider`/`signature`, and the #4857 re-measurement for `grid` (bare config:
|
|
651
|
+
* one focusable, the auxiliary "Add line" BUTTON — routing `for` there would
|
|
652
|
+
* have label clicks INSERT A ROW; realistic config: 8 focusables across cell
|
|
653
|
+
* inputs and row actions — a composite, not a single control).
|
|
654
|
+
*
|
|
655
|
+
* ## `'display'` — a pure display in EVERY state; the HOST wraps (objectui#4857)
|
|
656
|
+
*
|
|
657
|
+
* `formula` / `summary` / `auto_number` / `vector` have no editable branch at
|
|
658
|
+
* all: the whole widget is a replacement display with no focusable control, in
|
|
659
|
+
* the editable state as much as the readonly one (on the real object-form path
|
|
660
|
+
* they arrive `disabled`, never `readonly`, so the #4788 readonly gate could
|
|
661
|
+
* not cover them). The form renderer answers the declaration with its own
|
|
662
|
+
* wrapper — id + `aria-labelledby` + `aria-describedby` + `role="group"`, the
|
|
663
|
+
* #4788 container — and the label emits no `for`. The widgets spread nothing,
|
|
664
|
+
* by design; the host is the named surface.
|
|
665
|
+
*
|
|
666
|
+
* ## `'control'` — everything else
|
|
667
|
+
*
|
|
668
|
+
* The host's `<label for>` reaches a real labelable element. At registration
|
|
669
|
+
* this is deliberately spelled as ABSENCE of the meta key (one spelling of the
|
|
670
|
+
* default, objectui#3961), so hosts keep one rule for these and for
|
|
671
|
+
* out-of-registry widgets alike; the entry here is still mandatory, because
|
|
672
|
+
* "defaulted by omission" and "decided to be the default" are different facts.
|
|
673
|
+
*/
|
|
674
|
+
export declare const FIELD_WIDGET_LABELLING: Record<RegisteredFieldWidgetType, NonNullable<ComponentMeta['labelling']>>;
|
|
295
675
|
export declare function registerField(fieldType: string): void;
|
|
296
676
|
/**
|
|
297
677
|
* Register all field types (for backward compatibility)
|
|
@@ -303,63 +683,72 @@ export declare function registerField(fieldType: string): void;
|
|
|
303
683
|
* // Register all fields at once
|
|
304
684
|
* registerAllFields();
|
|
305
685
|
*/
|
|
306
|
-
export declare function registerAllFields(): void;
|
|
307
686
|
/**
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
export
|
|
320
|
-
export
|
|
321
|
-
export * from './widgets/
|
|
322
|
-
export * from './widgets/
|
|
323
|
-
export * from './
|
|
324
|
-
export * from './widgets/
|
|
325
|
-
export * from './widgets/
|
|
326
|
-
export * from './widgets/
|
|
327
|
-
export * from './widgets/
|
|
328
|
-
export * from './widgets/
|
|
329
|
-
export * from './widgets/
|
|
330
|
-
export * from './widgets/
|
|
331
|
-
export * from './widgets/
|
|
332
|
-
export * from './widgets/
|
|
333
|
-
export * from './widgets/
|
|
334
|
-
export * from './widgets/
|
|
335
|
-
export * from './widgets/
|
|
336
|
-
export * from './widgets/
|
|
337
|
-
export * from './widgets/
|
|
338
|
-
export * from './widgets/
|
|
339
|
-
export
|
|
340
|
-
export
|
|
341
|
-
export * from './widgets/
|
|
342
|
-
export * from './widgets/
|
|
343
|
-
export * from './widgets/
|
|
344
|
-
export * from './widgets/
|
|
345
|
-
export * from './widgets/
|
|
346
|
-
export * from './widgets/
|
|
347
|
-
export * from './widgets/
|
|
348
|
-
export
|
|
349
|
-
export
|
|
350
|
-
export * from './widgets/
|
|
351
|
-
export * from './widgets/
|
|
352
|
-
export * from './widgets/
|
|
353
|
-
export * from './widgets/
|
|
354
|
-
export * from './widgets/
|
|
355
|
-
export * from './widgets/
|
|
356
|
-
export * from './widgets/
|
|
357
|
-
export * from './widgets/
|
|
358
|
-
export * from './widgets/
|
|
359
|
-
export * from './widgets/
|
|
360
|
-
export * from './widgets/
|
|
361
|
-
export * from './widgets/
|
|
362
|
-
export * from './widgets/
|
|
363
|
-
export
|
|
364
|
-
export
|
|
365
|
-
export
|
|
687
|
+
* The widget a RETIRED field-type spelling renders (objectui#4814).
|
|
688
|
+
*
|
|
689
|
+
* Shape borrowed from the form renderer's spec-vocabulary boundary (#3090),
|
|
690
|
+
* which is this repo's settled answer to "an authored entry this renderer
|
|
691
|
+
* cannot honour": an inline alert that NAMES the offending entry, plus a
|
|
692
|
+
* `console.error` whose text doubles as the fix instruction. Nothing is thrown
|
|
693
|
+
* — one retired field must not take down the rest of a record form — but
|
|
694
|
+
* nothing is silently substituted either, which is the whole point: the author
|
|
695
|
+
* sees a refusal where they expected an input, not a text box that looks like
|
|
696
|
+
* it worked.
|
|
697
|
+
*/
|
|
698
|
+
export declare const RetiredFieldTombstone: React.FC<Record<string, any>>;
|
|
699
|
+
export declare function registerAllFields(): void;
|
|
700
|
+
export * from './widgets/types.js';
|
|
701
|
+
export * from './widgets/file-value.js';
|
|
702
|
+
export * from './FieldEditWidget.js';
|
|
703
|
+
export * from './widgets/TextField.js';
|
|
704
|
+
export * from './widgets/NumberField.js';
|
|
705
|
+
export * from './widgets/BooleanField.js';
|
|
706
|
+
export * from './widgets/SelectField.js';
|
|
707
|
+
export * from './widgets/DateField.js';
|
|
708
|
+
export * from './widgets/DateTimeField.js';
|
|
709
|
+
export * from './widgets/TimeField.js';
|
|
710
|
+
export * from './widgets/EmailField.js';
|
|
711
|
+
export * from './widgets/PhoneField.js';
|
|
712
|
+
export * from './widgets/UrlField.js';
|
|
713
|
+
export * from './widgets/CurrencyField.js';
|
|
714
|
+
export * from './widgets/PercentField.js';
|
|
715
|
+
export * from './widgets/PasswordField.js';
|
|
716
|
+
export * from './widgets/TextAreaField.js';
|
|
717
|
+
export * from './widgets/RichTextField.js';
|
|
718
|
+
export * from './widgets/LookupField.js';
|
|
719
|
+
export * from './widgets/CapabilityMultiSelectField.js';
|
|
720
|
+
export * from './widgets/ObjectRefField.js';
|
|
721
|
+
export * from './widgets/FilterConditionField.js';
|
|
722
|
+
export * from './widgets/RecipientPickerField.js';
|
|
723
|
+
export * from './widgets/RecordPickerDialog.js';
|
|
724
|
+
export * from './widgets/deriveLookupColumns.js';
|
|
725
|
+
export * from './widgets/FileField.js';
|
|
726
|
+
export * from './widgets/ImageField.js';
|
|
727
|
+
export { ImageCropperDialog } from './widgets/ImageCropperDialog.js';
|
|
728
|
+
export type { ImageCropperDialogProps } from './widgets/ImageCropperDialog.js';
|
|
729
|
+
export * from './widgets/LocationField.js';
|
|
730
|
+
export * from './widgets/FormulaField.js';
|
|
731
|
+
export * from './widgets/SummaryField.js';
|
|
732
|
+
export * from './widgets/AutoNumberField.js';
|
|
733
|
+
export * from './widgets/UserField.js';
|
|
734
|
+
export * from './widgets/ObjectField.js';
|
|
735
|
+
export * from './widgets/VectorField.js';
|
|
736
|
+
export * from './widgets/GridField.js';
|
|
737
|
+
export * from './widgets/ColorField.js';
|
|
738
|
+
export * from './widgets/SliderField.js';
|
|
739
|
+
export * from './widgets/RatingField.js';
|
|
740
|
+
export * from './widgets/CodeField.js';
|
|
741
|
+
export * from './widgets/AvatarField.js';
|
|
742
|
+
export * from './widgets/AddressField.js';
|
|
743
|
+
export * from './widgets/GeolocationField.js';
|
|
744
|
+
export * from './widgets/SignatureField.js';
|
|
745
|
+
export * from './widgets/QRCodeField.js';
|
|
746
|
+
export * from './widgets/MasterDetailField.js';
|
|
747
|
+
export * from './widgets/MultiSelectField.js';
|
|
748
|
+
export * from './widgets/RadioField.js';
|
|
749
|
+
export * from './widgets/CheckboxesField.js';
|
|
750
|
+
export * from './widgets/TagsField.js';
|
|
751
|
+
export { withFieldCarrier } from './withFieldCarrier.js';
|
|
752
|
+
export { toDomProps } from './widgets/toDomProps.js';
|
|
753
|
+
export type { DomProps } from './widgets/toDomProps.js';
|
|
754
|
+
export { toDateInputValue, toDateTimeInputValue, fromDateTimeInputValue, } from './widgets/nativeDateValue.js';
|