@object-ui/fields 17.5.0 → 17.7.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 +6150 -0
- package/README.md +108 -8
- package/dist/FieldEditWidget.d.ts +70 -8
- package/dist/coerceToSafeValue.d.ts +54 -0
- package/dist/currency.d.ts +1 -1
- package/dist/field-type-alias.d.ts +16 -0
- package/dist/index.cjs +5 -5
- package/dist/index.css +53 -11
- package/dist/index.d.ts +653 -128
- package/dist/index.js +4275 -3171
- package/dist/widgets/AddressField.d.ts +3 -3
- package/dist/widgets/AutoNumberField.d.ts +1 -1
- package/dist/widgets/AvatarField.d.ts +20 -4
- package/dist/widgets/BooleanField.d.ts +2 -2
- 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 +2 -2
- package/dist/widgets/DateTimeField.d.ts +2 -2
- package/dist/widgets/EmailField.d.ts +1 -1
- package/dist/widgets/FileField.d.ts +18 -2
- package/dist/widgets/FilterConditionField.d.ts +43 -2
- package/dist/widgets/FormulaField.d.ts +1 -1
- package/dist/widgets/FullscreenFieldEditor.d.ts +9 -2
- package/dist/widgets/GeolocationField.d.ts +10 -4
- package/dist/widgets/GridField.d.ts +102 -86
- package/dist/widgets/ImageField.d.ts +1 -1
- package/dist/widgets/LocationField.d.ts +31 -4
- package/dist/widgets/LookupField.d.ts +9 -1
- package/dist/widgets/MasterDetailField.d.ts +1 -1
- package/dist/widgets/MultiSelectField.d.ts +1 -1
- package/dist/widgets/NumberField.d.ts +2 -2
- package/dist/widgets/ObjectField.d.ts +10 -3
- package/dist/widgets/ObjectRefField.d.ts +1 -1
- package/dist/widgets/OptionsEmptyState.d.ts +38 -8
- package/dist/widgets/PasswordField.d.ts +15 -1
- package/dist/widgets/PeoplePicker.d.ts +17 -2
- package/dist/widgets/PercentField.d.ts +3 -2
- package/dist/widgets/PersonRow.d.ts +13 -2
- 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 +44 -1
- package/dist/widgets/RecordPickerDialog.d.ts +33 -16
- package/dist/widgets/RichTextField.d.ts +37 -1
- package/dist/widgets/SelectField.d.ts +1 -1
- package/dist/widgets/SelectionTray.d.ts +13 -2
- 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 +2 -2
- package/dist/widgets/TimeField.d.ts +2 -2
- 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 +27 -7
- package/dist/widgets/file-affordance.d.ts +33 -0
- package/dist/widgets/file-size-guard.d.ts +5 -23
- package/dist/widgets/file-value.d.ts +38 -9
- package/dist/widgets/lookupColumnDisplay.d.ts +110 -0
- package/dist/widgets/nativeDateValue.d.ts +9 -27
- package/dist/widgets/number-format.d.ts +137 -0
- package/dist/widgets/numberBadInput.d.ts +135 -0
- package/dist/widgets/personDisplay.d.ts +22 -4
- package/dist/widgets/richTextDisplay.d.ts +116 -0
- package/dist/widgets/toDomProps.d.ts +10 -1
- package/dist/widgets/toHostGroupProps.d.ts +172 -21
- package/dist/widgets/toHostProps.d.ts +105 -0
- package/dist/widgets/types.d.ts +19 -6
- package/dist/widgets/upload-error-message.d.ts +6 -0
- package/dist/widgets/uploadingScope.d.ts +142 -0
- package/dist/widgets/useCascadingOptions.d.ts +3 -2
- package/dist/widgets/useRecordQuery.d.ts +4 -2
- package/dist/widgets/useUploadingSignal.d.ts +8 -0
- package/package.json +11 -13
- package/dist/widgets/CharacterCount.d.ts +0 -56
- package/src/FieldEditWidget.test.ts +0 -133
- package/src/FieldEditWidget.tsx +0 -207
- package/src/__tests__/AddressCellRenderer.test.tsx +0 -166
- package/src/__tests__/CurrencyField.minorUnits.test.tsx +0 -191
- package/src/__tests__/CurrencyField.symbol.test.tsx +0 -198
- package/src/__tests__/DateCellRenderer.test.tsx +0 -82
- package/src/__tests__/NumberCellRenderer.grouping.test.tsx +0 -146
- package/src/__tests__/NumberCellRenderer.test.tsx +0 -60
- package/src/__tests__/PercentCellRenderer.locale.test.tsx +0 -152
- package/src/__tests__/PercentCellRenderer.test.tsx +0 -115
- package/src/__tests__/boolean-label-association-e2e.test.tsx +0 -298
- package/src/__tests__/capability-multiselect-retired.test.ts +0 -109
- package/src/__tests__/cell-truncation.test.tsx +0 -96
- package/src/__tests__/composite-group-label-e2e.test.tsx +0 -436
- package/src/__tests__/composite-group-label-readonly-e2e.test.tsx +0 -403
- package/src/__tests__/date-formatter-residue-4272.test.ts +0 -120
- package/src/__tests__/date-locale-channel.test.tsx +0 -305
- package/src/__tests__/field-carrier-sdui.test.tsx +0 -169
- package/src/__tests__/formatCurrency.centsDigit.test.tsx +0 -158
- package/src/__tests__/formatCurrency.minorUnits.test.tsx +0 -221
- package/src/__tests__/group-labelling-declaration.test.ts +0 -148
- package/src/__tests__/lookupCellDisplayField.test.tsx +0 -107
- package/src/__tests__/lookupCellDisplayName.test.tsx +0 -119
- package/src/__tests__/lookupCellRecordLink.test.tsx +0 -171
- package/src/__tests__/lookupCellReferenceKey.test.tsx +0 -57
- package/src/__tests__/percent-cell-vs-measure-4576.test.ts +0 -115
- package/src/__tests__/percent-formatter-locale-4553.test.ts +0 -147
- package/src/__tests__/percent-tie-halfup-4590.test.ts +0 -224
- package/src/__tests__/registry-collision.test.ts +0 -91
- package/src/__tests__/resolveFieldCurrency.test.ts +0 -20
- package/src/__tests__/select-label-association-e2e.test.tsx +0 -199
- 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 -357
- 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 -924
- package/src/currency.ts +0 -144
- package/src/datetime-widgets.test.tsx +0 -185
- package/src/field-type-alias.multiple.test.ts +0 -81
- package/src/field-type-alias.ts +0 -156
- package/src/field-type-coverage.test.ts +0 -67
- package/src/index.css +0 -44
- package/src/index.tsx +0 -2745
- package/src/standard-widgets.test.tsx +0 -364
- package/src/widgets/AddressField.postalCode.test.tsx +0 -257
- package/src/widgets/AddressField.tsx +0 -182
- package/src/widgets/AddressField.uniqueIds.test.tsx +0 -93
- package/src/widgets/AutoNumberField.tsx +0 -18
- package/src/widgets/AvatarField.tsx +0 -117
- package/src/widgets/BooleanField.tsx +0 -86
- package/src/widgets/CapabilityMultiSelectField.test.tsx +0 -168
- package/src/widgets/CapabilityMultiSelectField.tsx +0 -241
- package/src/widgets/CharacterCount.tsx +0 -263
- package/src/widgets/CheckboxesField.cascade.test.tsx +0 -143
- package/src/widgets/CheckboxesField.tsx +0 -169
- package/src/widgets/CodeField.tsx +0 -41
- package/src/widgets/ColorField.tsx +0 -53
- package/src/widgets/CurrencyField.tsx +0 -135
- package/src/widgets/DateField.tsx +0 -40
- package/src/widgets/DateTimeField.tsx +0 -46
- package/src/widgets/EmailField.tsx +0 -37
- package/src/widgets/FileField.tsx +0 -512
- package/src/widgets/FilterConditionField.tsx +0 -454
- package/src/widgets/FormulaField.tsx +0 -38
- package/src/widgets/FullscreenFieldEditor.tsx +0 -60
- package/src/widgets/GeolocationField.tsx +0 -193
- package/src/widgets/GeolocationField.uniqueIds.test.tsx +0 -88
- package/src/widgets/GridField.test.tsx +0 -632
- package/src/widgets/GridField.tsx +0 -1070
- package/src/widgets/ImageCropperDialog.tsx +0 -245
- package/src/widgets/ImageField.maxSize.test.tsx +0 -154
- package/src/widgets/ImageField.tsx +0 -305
- 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 -1295
- 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 -196
- 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 -99
- 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 -143
- package/src/widgets/RatingField.tsx +0 -94
- package/src/widgets/RecipientPickerField.test.tsx +0 -157
- package/src/widgets/RecipientPickerField.tsx +0 -188
- package/src/widgets/RecordPickerDialog.baseFilterShapes.test.tsx +0 -191
- package/src/widgets/RecordPickerDialog.dateLocale.test.tsx +0 -124
- package/src/widgets/RecordPickerDialog.filterOptions.test.tsx +0 -611
- package/src/widgets/RecordPickerDialog.selectLabel.test.tsx +0 -112
- package/src/widgets/RecordPickerDialog.tsx +0 -1365
- package/src/widgets/RichTextField.tsx +0 -176
- package/src/widgets/SelectField.cascade.test.tsx +0 -138
- package/src/widgets/SelectField.tsx +0 -193
- 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 -59
- 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 -166
- 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/address-format.ts +0 -120
- package/src/widgets/deriveLookupColumns.test.ts +0 -112
- package/src/widgets/deriveLookupColumns.ts +0 -108
- package/src/widgets/file-size-guard.ts +0 -55
- package/src/widgets/file-value.test.ts +0 -230
- package/src/widgets/file-value.ts +0 -246
- package/src/widgets/nativeDateValue.test.ts +0 -115
- package/src/widgets/nativeDateValue.ts +0 -112
- package/src/widgets/openNativePicker.ts +0 -18
- package/src/widgets/optionWidgets.gatedOptions.test.tsx +0 -267
- package/src/widgets/optionWidgets.unconfiguredOptions.test.tsx +0 -150
- 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 -204
- package/src/widgets/toHostGroupProps.ts +0 -102
- package/src/widgets/types.ts +0 -242
- package/src/widgets/useCascadingOptions.ts +0 -46
- package/src/widgets/useFieldTranslation.ts +0 -132
- package/src/widgets/useRecordQuery.test.ts +0 -174
- package/src/widgets/useRecordQuery.ts +0 -291
- package/src/widgets/useUploadingSignal.test.tsx +0 -62
- package/src/widgets/useUploadingSignal.ts +0 -20
- package/src/withFieldCarrier.tsx +0 -75
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { HostGroupProps } from './toHostGroupProps';
|
|
2
|
+
import { HostControlProps, HostGroupProps } from './toHostGroupProps.js';
|
|
3
3
|
/**
|
|
4
4
|
* The "this option list cannot be filled" state shared by every fixed-option
|
|
5
5
|
* widget (`SelectField` single, `MultiSelectField`, `RadioField`,
|
|
@@ -46,14 +46,44 @@ export interface OptionsEmptyStateProps {
|
|
|
46
46
|
* The host label's IDREF plumbing, when this box is the whole rendered surface
|
|
47
47
|
* of a group-labelled field (objectui#3990) — a `checkboxes` / `radio` /
|
|
48
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.
|
|
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).
|
|
50
54
|
*
|
|
51
|
-
* A closed
|
|
52
|
-
* `aria-
|
|
53
|
-
* element, and reopening a spread is what objectui#3291 exists to prevent
|
|
54
|
-
*
|
|
55
|
-
*
|
|
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`, which is not group-labelled
|
|
60
|
+
* and fills {@link OptionsEmptyStateProps.hostControlProps} instead.
|
|
56
61
|
*/
|
|
57
62
|
hostGroupProps?: HostGroupProps;
|
|
63
|
+
/**
|
|
64
|
+
* The host label's PLAIN-`for` plumbing, for the one caller that is NOT
|
|
65
|
+
* group-labelled — the single `SelectField` (objectui#8803).
|
|
66
|
+
*
|
|
67
|
+
* Supplying this switches the rendered element from a `div` to an `<output>`,
|
|
68
|
+
* and that is the entire repair. `select` declares `labelling: 'control'`,
|
|
69
|
+
* which the registry defines as "the component's outermost rendered element
|
|
70
|
+
* is a LABELABLE HTML element" — true of the Radix
|
|
71
|
+
* `button[role="combobox"]` it renders with options, and FALSE of the `div`
|
|
72
|
+
* this box used to be. So the host's `for` pointed at an id no element
|
|
73
|
+
* carried, and `HTMLLabelElement.control` was null. Landing the id on the
|
|
74
|
+
* `div` instead was measured and rejected: `for` may only reference a
|
|
75
|
+
* labelable element, so it stayed null and the label stayed unusable.
|
|
76
|
+
*
|
|
77
|
+
* `<output>` is labelable, and its implicit `status` role claims no
|
|
78
|
+
* interactivity — it is the result of a computation, which is what this box
|
|
79
|
+
* reports. Declaring `select` as `'group'` was the alternative and it
|
|
80
|
+
* measurably moved the LIVE path: a select WITH options lost the working
|
|
81
|
+
* `<label for>` to its combobox (objectui#3306).
|
|
82
|
+
*
|
|
83
|
+
* Mutually exclusive with `hostGroupProps` — one host, one naming channel
|
|
84
|
+
* (objectui#3978). A caller that supplies neither renders the box with no
|
|
85
|
+
* host plumbing at all, which is what standalone rendering has always done.
|
|
86
|
+
*/
|
|
87
|
+
hostControlProps?: HostControlProps;
|
|
58
88
|
}
|
|
59
|
-
export declare function OptionsEmptyState({ emptyHint, gated, dependsOnFields, testId, className, hostGroupProps, }: OptionsEmptyStateProps): React.JSX.Element;
|
|
89
|
+
export declare function OptionsEmptyState({ emptyHint, gated, dependsOnFields, testId, className, hostGroupProps, hostControlProps, }: OptionsEmptyStateProps): React.JSX.Element;
|
|
@@ -1,7 +1,21 @@
|
|
|
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
|
|
6
|
+
*
|
|
7
|
+
* Readonly draws the mask for a credential that is SET, and the shared
|
|
8
|
+
* `EmptyValue` affordance for one that is NOT (objectui#10639). The platform's
|
|
9
|
+
* read contract is presence-preserving: `@objectstack/spec`'s `SECRET_MASK`
|
|
10
|
+
* docblock says an unset credential "reads back `null` instead, never this
|
|
11
|
+
* mask", which is what lets a reader tell "configured" from "not configured".
|
|
12
|
+
*
|
|
13
|
+
* "Empty" is the password CELL's predicate (`MaskedCellRenderer` in this
|
|
14
|
+
* package's barrel, objectui#8678), called on the same two helpers, so `{}`
|
|
15
|
+
* and a whitespace-only string stay values and keep the mask. The helpers are
|
|
16
|
+
* imported from their own modules, never from the barrel, which lazy-loads
|
|
17
|
+
* this widget. ⛔ The value is never printed, and a set value keeps exactly
|
|
18
|
+
* the mask it drew before. `__tests__/PasswordField.readonlyEmpty-10639`
|
|
19
|
+
* pins the widget's "empty" to the cell's.
|
|
6
20
|
*/
|
|
7
21
|
export declare function PasswordField({ value, onChange, field, readonly, className, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -27,12 +27,27 @@ export interface PeoplePickerProps {
|
|
|
27
27
|
dataSource: DataSource;
|
|
28
28
|
/** Object to query — `sys_user` for user fields. */
|
|
29
29
|
objectName: string;
|
|
30
|
+
/**
|
|
31
|
+
* The person's name field (default `name`), read first of the name ladder
|
|
32
|
+
* (then `name`, `username`, `label`). Once the permission policy has loaded,
|
|
33
|
+
* a rung the user may not read on `objectName` is skipped.
|
|
34
|
+
*/
|
|
30
35
|
displayField?: string;
|
|
31
36
|
idField?: string;
|
|
32
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Dotted field paths for the row subtitle, e.g. `['primary_business_unit_id.name','email']`.
|
|
39
|
+
* Once the permission policy has loaded, a path whose field on `objectName`
|
|
40
|
+
* the user may not read is not drawn.
|
|
41
|
+
*/
|
|
33
42
|
subtitleFields?: string[];
|
|
43
|
+
/** Avatar image field; not drawn once the loaded policy denies it on `objectName`. */
|
|
34
44
|
avatarField?: string;
|
|
35
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Related entities to expand (e.g. `['primary_business_unit_id']` for the
|
|
47
|
+
* department name). Once the permission policy has loaded, a relation the
|
|
48
|
+
* user may not read on `objectName` is left out, as it is from the list
|
|
49
|
+
* derived from `subtitleFields` when this is not passed.
|
|
50
|
+
*/
|
|
36
51
|
expand?: string[];
|
|
37
52
|
/** Narrow the server searchable set (ADR-0061). */
|
|
38
53
|
searchFields?: string[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* PercentField - Percentage input
|
|
4
|
+
* PercentField - Percentage input whose decimal places follow the field's
|
|
5
|
+
* `scale` as the protocol resolves it (see the read below)
|
|
5
6
|
* Stores values as decimals (0-1) and displays as percentages (0-100%)
|
|
6
7
|
* Includes a slider for interactive control.
|
|
7
8
|
*/
|
|
@@ -10,8 +10,19 @@ import { default as React } from 'react';
|
|
|
10
10
|
export interface PersonRowProps {
|
|
11
11
|
record: any;
|
|
12
12
|
displayField?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The fields the name is read from, in order; defaults to the ladder of
|
|
15
|
+
* `displayField` (`getPersonNameFields`). PeoplePicker passes the fields of
|
|
16
|
+
* that ladder the loaded policy lets the viewer read (objectui#10535).
|
|
17
|
+
*/
|
|
18
|
+
nameFields?: string[];
|
|
13
19
|
subtitleFields?: string[];
|
|
14
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Avatar image field (default `image`). `null` draws no image, only the
|
|
22
|
+
* initials: what PeoplePicker passes when field-level security withholds the
|
|
23
|
+
* field (objectui#10433).
|
|
24
|
+
*/
|
|
25
|
+
avatarField?: string | null;
|
|
15
26
|
selected?: boolean;
|
|
16
27
|
/** Keyboard cursor is on this row — highlight + scroll into view. */
|
|
17
28
|
active?: boolean;
|
|
@@ -20,4 +31,4 @@ export interface PersonRowProps {
|
|
|
20
31
|
onSelect?: (record: any) => void;
|
|
21
32
|
className?: string;
|
|
22
33
|
}
|
|
23
|
-
export declare function PersonRow({ record, displayField, subtitleFields, avatarField, selected, active, highlightQuery, onSelect, className, }: PersonRowProps): React.JSX.Element;
|
|
34
|
+
export declare function PersonRow({ record, displayField, nameFields, subtitleFields, avatarField, selected, active, highlightQuery, onSelect, className, }: PersonRowProps): 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
|
* PhoneField - Telephone number input with tel link in readonly mode
|
|
5
5
|
* Renders as a clickable tel link when readonly, standard phone 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
|
* RadioField - choose exactly one value from a fixed option set, rendered as a
|
|
5
5
|
* radio group. The stored value is the selected option value (string). Used for
|
|
@@ -1,4 +1,47 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
|
+
/** A user-valued column offered by the `field` recipient mode. */
|
|
4
|
+
interface UserFieldDef {
|
|
5
|
+
/** The machine name — this is what gets stored in `recipient_id`. */
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Does this declared field hold USERS?
|
|
11
|
+
*
|
|
12
|
+
* ⭐ This predicate is the picker's half of a two-sided agreement with the
|
|
13
|
+
* sharing evaluator, which asks the same question of the same two spellings:
|
|
14
|
+
* the `user` type (whose target is fixed to `sys_user` by the type itself —
|
|
15
|
+
* `Field.user()` takes no target), and a `lookup` / `master_detail` whose
|
|
16
|
+
* `reference` is `sys_user`.
|
|
17
|
+
*
|
|
18
|
+
* ⛔ The two must not drift apart. The evaluator treats a column that is not
|
|
19
|
+
* user-typed as "grants nobody" and warns once per rule, so a picker that
|
|
20
|
+
* OFFERED a wider set would let an admin save a rule that looks configured and
|
|
21
|
+
* authorises nobody — worse than the hand-typed name this mode replaces,
|
|
22
|
+
* because it has a credible appearance.
|
|
23
|
+
*
|
|
24
|
+
* `reference` is the only spelling the protocol declares (objectui#6837):
|
|
25
|
+
* `FieldSchema` refuses `reference_to` by name, and the evaluator reads
|
|
26
|
+
* `reference` as well.
|
|
27
|
+
*
|
|
28
|
+
* @internal exported for tests
|
|
29
|
+
*/
|
|
30
|
+
export declare function fieldHoldsUsers(def: unknown): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The user-valued columns of an object schema, in declaration order.
|
|
33
|
+
*
|
|
34
|
+
* Accepts both shapes an object schema spells `fields` in — a name-keyed map
|
|
35
|
+
* and an array of definitions carrying their own `name`.
|
|
36
|
+
*
|
|
37
|
+
* ⛔ `hidden` is deliberately NOT filtered here, unlike the filter builder's
|
|
38
|
+
* own field derivation: the evaluator honours a hidden user column exactly
|
|
39
|
+
* like a visible one, and withholding it would break the agreement above in
|
|
40
|
+
* the other direction — an authorable, working configuration the picker
|
|
41
|
+
* refuses to offer.
|
|
42
|
+
*
|
|
43
|
+
* @internal exported for tests
|
|
44
|
+
*/
|
|
45
|
+
export declare function deriveUserFields(schema: any): UserFieldDef[];
|
|
3
46
|
export declare function RecipientPickerField({ value, onChange, readonly, className, error, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
4
47
|
export default RecipientPickerField;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DataSource, LookupColumnDef, LookupFilterDef } from '@object-ui/types';
|
|
3
|
+
import { LookupCellRendererResolver } from './lookupColumnDisplay.js';
|
|
3
4
|
/**
|
|
4
5
|
* Cell renderer function signature — matches getCellRenderer from @object-ui/fields.
|
|
5
6
|
* Accepts a field type and returns a React component that renders a formatted cell.
|
|
6
7
|
*/
|
|
7
|
-
export type CellRendererResolver =
|
|
8
|
-
value: any;
|
|
9
|
-
field: any;
|
|
10
|
-
}>;
|
|
8
|
+
export type CellRendererResolver = LookupCellRendererResolver;
|
|
11
9
|
/**
|
|
12
10
|
* Filter column definition used by the inline filter bar.
|
|
13
11
|
* A subset of LookupColumnDef enriched with filter-specific metadata.
|
|
@@ -43,7 +41,12 @@ export interface RecordPickerFilterBarProps {
|
|
|
43
41
|
* Allows plugging in ObjectGrid or any compatible table component.
|
|
44
42
|
*/
|
|
45
43
|
export interface RecordPickerGridSlotProps {
|
|
46
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Resolved column definitions, less the ones field-level security denies
|
|
46
|
+
* once the permission policy has loaded, the display column included — the
|
|
47
|
+
* columns the built-in table draws (objectui#10373). When none survives,
|
|
48
|
+
* this is the id column alone.
|
|
49
|
+
*/
|
|
47
50
|
columns: LookupColumnDef[];
|
|
48
51
|
/** Current page of records */
|
|
49
52
|
records: any[];
|
|
@@ -95,16 +98,30 @@ export interface RecordPickerDialogProps {
|
|
|
95
98
|
objectName: string;
|
|
96
99
|
/** Columns to display. Defaults to [displayField, descriptionField]. */
|
|
97
100
|
columns?: Array<string | LookupColumnDef>;
|
|
98
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* The display field as the lookup DECLARES it. The display column is keyed on
|
|
103
|
+
* it, or on `'name'` when it is omitted. With `objectSchema` given, a declared
|
|
104
|
+
* value is also the first rung of the column's title (the resolver's
|
|
105
|
+
* `titleField`); the `'name'` default never is, because it is a guess and a
|
|
106
|
+
* guess never outranks the referenced object's own declarations. So pass
|
|
107
|
+
* `undefined` when the field declares none, never a pre-filled `'name'`.
|
|
108
|
+
*/
|
|
99
109
|
displayField?: string;
|
|
100
110
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
111
|
+
* The referenced object's schema (objectui#10486). When given, the display
|
|
112
|
+
* column renders each record's title through `@object-ui/core`'s
|
|
113
|
+
* `getRecordDisplayName`, the call LookupField's dropdown option label and
|
|
114
|
+
* the read cell make: the declared `displayField`, then the object's
|
|
115
|
+
* `nameField`, then its deprecated `titleFormat` template, then type-aware
|
|
116
|
+
* derivation (ADR-0079). The title reads the row with its relations
|
|
117
|
+
* collapsed to ids and the fields the loaded policy denies removed, exactly
|
|
118
|
+
* as the dropdown's option label does.
|
|
119
|
+
*
|
|
120
|
+
* Replaces the retired `titleFormat` prop: a bare template cut out of the
|
|
121
|
+
* schema ranked above the `nameField` beside it, so the picker and the
|
|
122
|
+
* dropdown labelled one record two ways.
|
|
106
123
|
*/
|
|
107
|
-
|
|
124
|
+
objectSchema?: Record<string, unknown> | null;
|
|
108
125
|
/** Record id field (default: 'id') */
|
|
109
126
|
idField?: string;
|
|
110
127
|
/** Page size (default: 10) */
|
|
@@ -121,7 +138,7 @@ export interface RecordPickerDialogProps {
|
|
|
121
138
|
onSelectRecords?: (records: any[]) => void;
|
|
122
139
|
/**
|
|
123
140
|
* Base filters applied to every query.
|
|
124
|
-
* Converted from LookupFieldMetadata.
|
|
141
|
+
* Converted from LookupFieldMetadata.lookupFilters.
|
|
125
142
|
* Restricts which records are selectable (e.g. only active records).
|
|
126
143
|
*/
|
|
127
144
|
lookupFilters?: LookupFilterDef[];
|
|
@@ -147,7 +164,7 @@ export interface RecordPickerDialogProps {
|
|
|
147
164
|
* (`before`, `after`, `is_empty`, `is_not_empty`) the record form has no
|
|
148
165
|
* `$op` for. No second operator vocabulary is introduced here: two already
|
|
149
166
|
* exist (the spec's `AST_OPERATOR_MAP`, data-objectstack's
|
|
150
|
-
* `FILTER_OPERATOR_ALIASES`) and #3948 is what a third costs.
|
|
167
|
+
* `FILTER_OPERATOR_ALIASES`) and objectstack-ai/objectstack#3948 is what a third costs.
|
|
151
168
|
*
|
|
152
169
|
* The discriminator is exact rather than heuristic — every AST node is an
|
|
153
170
|
* ARRAY and a rule is a plain OBJECT, the same predicate `toFilterNode` uses.
|
|
@@ -170,7 +187,7 @@ export interface RecordPickerDialogProps {
|
|
|
170
187
|
* The referenced object's schema `fields` map (field name → field
|
|
171
188
|
* definition). When provided, cell renderers receive the FULL field
|
|
172
189
|
* metadata — `options`, `currency`, `scale`, `precision`, `format`,
|
|
173
|
-
* `
|
|
190
|
+
* `reference`, … — exactly like the list view enriches its columns from
|
|
174
191
|
* the object schema. Without it a `select` column falls back to
|
|
175
192
|
* title-casing the raw stored value instead of resolving the option label
|
|
176
193
|
* (#3333: `manufacturing` rendered as "Manufacturing" instead of the
|
|
@@ -227,4 +244,4 @@ export interface RecordPickerDialogProps {
|
|
|
227
244
|
* states, and single/multi-select. Responsive: mobile-friendly width
|
|
228
245
|
* via Tailwind breakpoints.
|
|
229
246
|
*/
|
|
230
|
-
export declare function RecordPickerDialog({ open, onOpenChange, title, multiple, dataSource, objectName, columns: columnsProp, displayField,
|
|
247
|
+
export declare function RecordPickerDialog({ open, onOpenChange, title, multiple, dataSource, objectName, columns: columnsProp, displayField: declaredDisplayField, objectSchema, idField, pageSize, value, onSelect, onSelectRecords, lookupFilters, baseFilter, cellRenderer, fieldsMeta, filterColumns, renderFilterBar, renderGrid, }: RecordPickerDialogProps): 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
|
* Rich text field with markdown/HTML support
|
|
5
5
|
* For now, this is a simple textarea. A full implementation would use
|
|
@@ -22,5 +22,41 @@ import { FieldWidgetComponentProps } from './types';
|
|
|
22
22
|
* tolerant fallback in one of them. The affordance and dialog themselves come
|
|
23
23
|
* from the shared `FullscreenFieldEditor`, so one form-level setting keeps
|
|
24
24
|
* producing one behaviour across both widgets.
|
|
25
|
+
*
|
|
26
|
+
* ## Readonly display (`4bb940b6e`)
|
|
27
|
+
*
|
|
28
|
+
* The readonly early return used to render `{value}` as a React TEXT CHILD,
|
|
29
|
+
* so a readonly field of any of the three types showed the user the markup
|
|
30
|
+
* SOURCE of their own content — a `markdown` field's asterisks and hashes, a
|
|
31
|
+
* `richtext` field's tags. The `prose` classes on that wrapper were the tell:
|
|
32
|
+
* they exist to style RENDERED rich content and there was none to style. Every
|
|
33
|
+
* other read surface — grid, kanban card, gallery, related list, dashboard
|
|
34
|
+
* record panel, record detail read mode — dispatches through `getCellRenderer`
|
|
35
|
+
* and renders the same stored bytes FORMATTED, so one field disagreed with
|
|
36
|
+
* itself depending on which surface it was read on, and this branch was the
|
|
37
|
+
* one disagreeing with the platform.
|
|
38
|
+
*
|
|
39
|
+
* It now renders through {@link richTextCellRenderer} — literally the same
|
|
40
|
+
* components `getCellRenderer` resolves, one table shared by both (see
|
|
41
|
+
* `./richTextDisplay.tsx`), so the html/richtext path carries that renderer's
|
|
42
|
+
* `sanitizeHtml` trust boundary rather than a second hand-rolled escape, and a
|
|
43
|
+
* future change to either pipeline moves both surfaces at once.
|
|
44
|
+
*
|
|
45
|
+
* ## Host plumbing (objectui#4810)
|
|
46
|
+
*
|
|
47
|
+
* The editable branch had no `toDomProps` at all, so everything
|
|
48
|
+
* `<FormControl>`'s Radix `Slot` hands down — the field's `id`, the
|
|
49
|
+
* `aria-describedby` naming its `<FormDescription>` and `<FormMessage>` —
|
|
50
|
+
* arrived as props and landed on no element. Measured on a real form: the
|
|
51
|
+
* visible label's `for` pointed at an id nothing carried (`for=DANGLING`) and
|
|
52
|
+
* the rendered description had zero consumers, for all three registry keys
|
|
53
|
+
* (`markdown` / `html` / `richtext`) since they are this one widget.
|
|
54
|
+
*
|
|
55
|
+
* The fix is objectui#3318's standing recipe — `toDomProps(props)` spread onto
|
|
56
|
+
* the REAL focusable control, which here is the `<Textarea>` inside
|
|
57
|
+
* `RichTextEditorSurface`, never the wrapper `<div>`s (a non-focusable wrapper
|
|
58
|
+
* carrying the id would satisfy `document.getElementById` and still leave the
|
|
59
|
+
* label inert). Only the inline surface receives it; see `domProps` there for
|
|
60
|
+
* why the dialog's copy must not.
|
|
25
61
|
*/
|
|
26
62
|
export declare function RichTextField({ value, onChange, field, readonly, error, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -12,7 +12,18 @@ export interface SelectionTrayProps {
|
|
|
12
12
|
/** Remove a selected record by its id. */
|
|
13
13
|
onRemove: (id: any) => void;
|
|
14
14
|
displayField?: string;
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The fields each chip's name is read from, in order; defaults to the ladder
|
|
17
|
+
* of `displayField` (`getPersonNameFields`). PeoplePicker passes the fields
|
|
18
|
+
* of that ladder the loaded policy lets the viewer read (objectui#10535).
|
|
19
|
+
*/
|
|
20
|
+
nameFields?: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Avatar image field (default `image`). `null` draws no image, only the
|
|
23
|
+
* initials: what PeoplePicker passes when field-level security withholds the
|
|
24
|
+
* field (objectui#10433).
|
|
25
|
+
*/
|
|
26
|
+
avatarField?: string | null;
|
|
16
27
|
idField?: string;
|
|
17
28
|
/** Header label, e.g. "Selected (3)" — omit to hide the header. */
|
|
18
29
|
label?: string;
|
|
@@ -24,4 +35,4 @@ export interface SelectionTrayProps {
|
|
|
24
35
|
emptyText?: string;
|
|
25
36
|
className?: string;
|
|
26
37
|
}
|
|
27
|
-
export declare function SelectionTray({ records, onRemove, displayField, avatarField, idField, label, onClear, clearLabel, emptyText, className, }: SelectionTrayProps): React.JSX.Element;
|
|
38
|
+
export declare function SelectionTray({ records, onRemove, displayField, nameFields, avatarField, idField, label, onClear, clearLabel, emptyText, className, }: SelectionTrayProps): React.JSX.Element;
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Signature field widget - provides a signature pad for capturing signatures
|
|
5
5
|
* Outputs signature as a base64 PNG image
|
|
6
|
+
*
|
|
7
|
+
* ## Naming, and the half that is deliberately absent (objectui#3318)
|
|
8
|
+
*
|
|
9
|
+
* This widget forwarded nothing a host handed it — every branch below wrote its
|
|
10
|
+
* attributes by hand — so its visible label pointed `for` at an id no element
|
|
11
|
+
* in the row carried, and the rendered help text had zero consumers. Measured
|
|
12
|
+
* on `origin/main`, a real form, this field required and freshly failed:
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* signature labelFor=…-form-item -> DANGLING descConsumers=0 ids=[]
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* The name and the description arrive here, on the container, through
|
|
19
|
+
* {@link toHostGroupProps} — the objectui#3961 route for a widget whose surface
|
|
20
|
+
* no `<label for>` can reach (`<canvas>` is not a labelable element), and which
|
|
21
|
+
* therefore declares `labelling: 'group'` in `FIELD_WIDGET_LABELLING`.
|
|
22
|
+
* `'instead-of-the-inputs'` because this field renders no input of its own for
|
|
23
|
+
* the description to land on: the Clear button is auxiliary — it acts on the
|
|
24
|
+
* value, it is not the value's control — the same reading that put
|
|
25
|
+
* `geolocation`'s focusable "View on map" link on that side of the split.
|
|
26
|
+
*
|
|
27
|
+
* `aria-invalid` and `aria-required` are NOT here, and their absence is a
|
|
28
|
+
* verdict rather than an omission. The drawing surface has no keyboard path at
|
|
29
|
+
* all (measured: this row offers zero focusable elements while empty — the only
|
|
30
|
+
* candidate, Clear, is `disabled` until something has been drawn), so there is
|
|
31
|
+
* no element assistive technology would read a control state from. Marking the
|
|
32
|
+
* container instead would announce a state with no control behind it — the
|
|
33
|
+
* non-focusable-wrapper move objectui#3291 and #3318 both draw the line
|
|
34
|
+
* against. The type is recorded in that sweep's NOT_APPLICABLE ledger with a
|
|
35
|
+
* guard that turns red the day a real control appears here.
|
|
6
36
|
*/
|
|
7
|
-
export declare function SignatureField({ value, onChange, readonly }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
37
|
+
export declare function SignatureField({ value, onChange, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Slider field widget - provides a range slider input
|
|
5
5
|
* Supports numeric values with configurable min, max, and step
|
|
6
|
+
*
|
|
7
|
+
* ## Where the host's facts go, and why (objectui#3318)
|
|
8
|
+
*
|
|
9
|
+
* This widget used to read exactly two keys off its props (`disabled`,
|
|
10
|
+
* `className`) and forward nothing else, so everything `<FormControl>`'s Slot
|
|
11
|
+
* delivered was dropped on the floor. Measured on `origin/main`, a real form
|
|
12
|
+
* with a required slider that had just failed validation:
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* ariaInvalidTrue=[] labelFor=…-form-item -> DANGLING
|
|
16
|
+
* descConsumers=0 ids=[] <- no element of the row carried an id at all
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Three channels, one cause. The DOM pass-through now goes to the THUMB — the
|
|
20
|
+
* `span[role="slider"]` a keyboard user lands on, which is where ARIA state
|
|
21
|
+
* belongs — through the `thumbProps` the primitive grew for this
|
|
22
|
+
* (`lib/slider-thumb.ts`; the shadcn `ui/slider.tsx` renders its thumb
|
|
23
|
+
* internally and exports only `Slider`, so it cannot be addressed from here
|
|
24
|
+
* the way objectui#3306 addressed `SelectTrigger`).
|
|
25
|
+
*
|
|
26
|
+
* The split of which keys stay on Root is `SelectField`'s, key for key:
|
|
27
|
+
*
|
|
28
|
+
* - `name`: Root owns the hidden input that takes part in form submission; on
|
|
29
|
+
* a `span` it is not even DOM-legal, and is exactly the leak objectui#3291
|
|
30
|
+
* sweeps for.
|
|
31
|
+
* - `disabled`: Root is the single authority (it disables the thumb and the
|
|
32
|
+
* hidden input together); forwarding the raw prop to the thumb as well would
|
|
33
|
+
* give the state a second, OR-merged author.
|
|
34
|
+
*
|
|
35
|
+
* The visible label reaches the thumb by IDREF, not by `for`: a
|
|
36
|
+
* `span[role="slider"]` is not one of HTML's labelable elements, so this widget
|
|
37
|
+
* is declared `labelling: 'group'` for the same reason `file` is — see
|
|
38
|
+
* `FIELD_WIDGET_LABELLING` in `../index` and objectui#3961. No extra
|
|
39
|
+
* `role="group"` wrapper: there is one control here, and `slider` is a role
|
|
40
|
+
* that carries a name perfectly well on its own.
|
|
6
41
|
*/
|
|
7
|
-
export declare function SliderField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<number>): React.JSX.Element;
|
|
42
|
+
export declare function SliderField({ value, onChange, field, readonly, error, ...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
|
* SummaryField - Read-only aggregation field
|
|
5
5
|
* Values are aggregated from related records 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
|
* TagsField - free-form list of string tags. Type a value and press Enter (or
|
|
5
5
|
* comma) to add it; click a tag's × to remove it. The stored value is a
|
|
@@ -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
|
* TextAreaField - Multi-line text input widget
|
|
5
5
|
* Supports configurable row count and preserves whitespace in readonly mode.
|
|
@@ -35,7 +35,11 @@ import { FieldWidgetComponentProps } from './types';
|
|
|
35
35
|
* ## The character counter (objectui#3408, shared across surfaces in #3417)
|
|
36
36
|
*
|
|
37
37
|
* Both editing surfaces below — the inline `<Textarea>` and the fullscreen
|
|
38
|
-
* dialog's — render the SAME `CharacterCount
|
|
38
|
+
* dialog's — render the SAME `CharacterCount`. It lives in
|
|
39
|
+
* `@object-ui/components` since objectui#3439, hoisted there so the form
|
|
40
|
+
* renderer's built-in `textarea` branch renders that very component too rather
|
|
41
|
+
* than growing a third copy; this widget's use of it is unchanged. It owns the
|
|
42
|
+
* three-node
|
|
39
43
|
* GOV.UK shape (decorative digits / accessible description / gated status
|
|
40
44
|
* region) and the debounce and threshold behind it. Until #3417 the fullscreen
|
|
41
45
|
* footer had its own hand-written copy that was digits and nothing else, which
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* TextField - Standard single-line or multi-line text input
|
|
5
5
|
* Automatically renders as a textarea when rows are configured in field metadata
|
|
6
6
|
*/
|
|
7
|
-
export declare function TextField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
7
|
+
export declare function TextField({ value, onChange, field, readonly, error, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FieldWidgetComponentProps } from './types';
|
|
2
|
+
import { FieldWidgetComponentProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* TimeField - Time picker input widget
|
|
5
5
|
* Uses native time input for hour and minute selection
|
|
6
6
|
*/
|
|
7
|
-
export declare function TimeField({ value, onChange, field, readonly, ...props }: FieldWidgetComponentProps<string>): React.JSX.Element;
|
|
7
|
+
export declare function TimeField({ value, onChange, field, readonly, error, ...props }: FieldWidgetComponentProps<string>): 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
|
* UrlField - URL input with clickable link in readonly mode
|
|
5
5
|
* Validates URLs to only render http/https links for security
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CellRendererResolver } from './RecordPickerDialog';
|
|
1
|
+
import { CellRendererResolver } from './RecordPickerDialog.js';
|
|
2
2
|
export declare function setCellRendererResolver(resolver: CellRendererResolver): void;
|
|
3
3
|
export declare function getCellRendererResolver(): CellRendererResolver | undefined;
|