@object-ui/fields 11.3.0 → 11.5.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 +155 -0
- package/dist/FieldEditWidget.d.ts +8 -0
- package/dist/FieldEditWidget.test.d.ts +8 -0
- package/dist/__tests__/DateCellRenderer.test.d.ts +0 -0
- package/dist/__tests__/NumberCellRenderer.test.d.ts +0 -0
- package/dist/__tests__/lookupCellReferenceKey.test.d.ts +0 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +17 -2
- package/dist/index.js +2015 -1346
- package/dist/widgets/LookupField.dependsOn.test.d.ts +8 -0
- package/dist/widgets/PeoplePicker.d.ts +63 -0
- package/dist/widgets/PeoplePicker.test.d.ts +8 -0
- package/dist/widgets/PeoplePickerComponents.test.d.ts +8 -0
- package/dist/widgets/PersonRow.d.ts +23 -0
- package/dist/widgets/RecordPickerDialog.d.ts +9 -1
- package/dist/widgets/SelectionTray.d.ts +27 -0
- package/dist/widgets/UserField.d.ts +0 -13
- package/dist/widgets/UserFieldPicker.test.d.ts +8 -0
- package/dist/widgets/deriveLookupColumns.d.ts +12 -4
- package/dist/widgets/personDisplay.d.ts +37 -0
- package/dist/widgets/personDisplay.test.d.ts +8 -0
- package/dist/widgets/useRecordQuery.d.ts +87 -0
- package/dist/widgets/useRecordQuery.test.d.ts +8 -0
- package/package.json +7 -7
- package/src/FieldEditWidget.test.ts +61 -0
- package/src/FieldEditWidget.tsx +56 -1
- package/src/__tests__/DateCellRenderer.test.tsx +50 -0
- package/src/__tests__/NumberCellRenderer.test.tsx +60 -0
- package/src/__tests__/lookupCellReferenceKey.test.tsx +57 -0
- package/src/complex-widgets.test.tsx +241 -0
- package/src/index.tsx +61 -18
- package/src/widgets/GridField.test.tsx +14 -0
- package/src/widgets/GridField.tsx +7 -8
- package/src/widgets/LookupField.dependsOn.test.tsx +233 -0
- package/src/widgets/LookupField.tsx +365 -190
- package/src/widgets/NumberField.tsx +4 -2
- package/src/widgets/PeoplePicker.test.tsx +334 -0
- package/src/widgets/PeoplePicker.tsx +552 -0
- package/src/widgets/PeoplePickerComponents.test.tsx +104 -0
- package/src/widgets/PersonRow.tsx +117 -0
- package/src/widgets/RecordPickerDialog.tsx +58 -129
- package/src/widgets/SelectionTray.tsx +110 -0
- package/src/widgets/UserField.tsx +20 -1
- package/src/widgets/UserFieldPicker.test.tsx +78 -0
- package/src/widgets/deriveLookupColumns.test.ts +25 -0
- package/src/widgets/deriveLookupColumns.ts +24 -10
- package/src/widgets/personDisplay.test.ts +113 -0
- package/src/widgets/personDisplay.ts +92 -0
- package/src/widgets/useRecordQuery.test.ts +174 -0
- package/src/widgets/useRecordQuery.ts +264 -0
package/dist/index.d.ts
CHANGED
|
@@ -54,12 +54,20 @@ export declare function formatPercent(value: number, precision?: number): string
|
|
|
54
54
|
export declare function humanizeLabel(value: string): string;
|
|
55
55
|
/**
|
|
56
56
|
* Format date as relative time (e.g., "2 days ago", "Today", "Overdue 3d")
|
|
57
|
+
*
|
|
58
|
+
* `dueLike` gates the "Overdue" wording — a past `start_date`/`created_at`
|
|
59
|
+
* isn't overdue, only a past due/deadline-semantic field is. Non-due-like
|
|
60
|
+
* past dates render as "Nd ago" instead.
|
|
57
61
|
*/
|
|
58
|
-
export declare function formatRelativeDate(value: string | Date | number
|
|
62
|
+
export declare function formatRelativeDate(value: string | Date | number, options?: {
|
|
63
|
+
dueLike?: boolean;
|
|
64
|
+
}): string;
|
|
59
65
|
/**
|
|
60
66
|
* Format date value
|
|
61
67
|
*/
|
|
62
|
-
export declare function formatDate(value: string | Date | number, style?: string
|
|
68
|
+
export declare function formatDate(value: string | Date | number, style?: string, options?: {
|
|
69
|
+
dueLike?: boolean;
|
|
70
|
+
}): string;
|
|
63
71
|
/**
|
|
64
72
|
* Format datetime value
|
|
65
73
|
*/
|
|
@@ -237,6 +245,13 @@ export declare function buildValidationRules(field: any): any;
|
|
|
237
245
|
* @returns Whether the condition is met
|
|
238
246
|
*/
|
|
239
247
|
export declare function evaluateCondition(condition: any, formData: any): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Every field type the form can render (the canonical list of supported types).
|
|
250
|
+
* Exported so inline editing can be checked against it — a form type must
|
|
251
|
+
* either have an inline editor or be explicitly excluded, see
|
|
252
|
+
* `INLINE_EXCLUDED_FIELD_TYPES` and its drift-guard test.
|
|
253
|
+
*/
|
|
254
|
+
export declare const FORM_FIELD_TYPES: readonly string[];
|
|
240
255
|
export declare function registerField(fieldType: string): void;
|
|
241
256
|
/**
|
|
242
257
|
* Register all field types (for backward compatibility)
|