@object-ui/plugin-form 6.2.2 → 7.0.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.
@@ -0,0 +1,27 @@
1
+ import { FormField, ObjectFormSection } from '@object-ui/types';
2
+ /** A declared field group on the object metadata. */
3
+ export interface DeclaredFieldGroup {
4
+ key: string;
5
+ label?: string;
6
+ /** Render the group's section header with a collapse toggle. */
7
+ collapsible?: boolean;
8
+ /** Start the (collapsible) group collapsed. */
9
+ collapsed?: boolean;
10
+ }
11
+ /** Read an object's `fieldGroups` into a normalized, well-typed list. */
12
+ export declare function readObjectFieldGroups(input: unknown): DeclaredFieldGroup[];
13
+ /**
14
+ * Derive form sections from an object's declared `fieldGroups` and each
15
+ * rendered field's `group`.
16
+ *
17
+ * Returns `null` when grouping does not apply — no declared groups, or no
18
+ * rendered field opts into a declared group — so callers fall back to a flat
19
+ * form. Sections come back in declared order; fields without a declared group
20
+ * collect into a trailing untitled section (no `name`/`label`) so they render
21
+ * as a plain block rather than a card.
22
+ *
23
+ * Section `fields` are returned as field *names* (strings) so the result plugs
24
+ * straight into ObjectForm's existing section-render path, which resolves names
25
+ * back to generated `FormField`s and applies field-level permissions.
26
+ */
27
+ export declare function deriveFieldGroupSections(fields: FormField[], fieldGroups: unknown): ObjectFormSection[] | null;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,26 @@
1
- export * from './packages/plugin-form/src/index'
2
- export {}
1
+ import { ObjectForm } from './ObjectForm';
2
+ export { ObjectForm };
3
+ export type { ObjectFormProps } from './ObjectForm';
4
+ export { FormSection } from './FormSection';
5
+ export type { FormSectionProps } from './FormSection';
6
+ export { applyAutoLayout, inferColumns, inferModalSize, isWideFieldType, isAutoGeneratedFieldType, applyAutoColSpan, filterCreateModeFields, filterSystemFields, filterAutoGeneratedFields, } from './autoLayout';
7
+ export { TabbedForm } from './TabbedForm';
8
+ export type { TabbedFormProps, TabbedFormSchema, FormSectionConfig } from './TabbedForm';
9
+ export { WizardForm } from './WizardForm';
10
+ export type { WizardFormProps, WizardFormSchema } from './WizardForm';
11
+ export { SplitForm } from './SplitForm';
12
+ export type { SplitFormProps, SplitFormSchema } from './SplitForm';
13
+ export { DrawerForm } from './DrawerForm';
14
+ export type { DrawerFormProps, DrawerFormSchema } from './DrawerForm';
15
+ export { ModalForm } from './ModalForm';
16
+ export type { ModalFormProps, ModalFormSchema } from './ModalForm';
17
+ export { EmbeddableForm } from './EmbeddableForm';
18
+ export type { EmbeddableFormProps, EmbeddableFormConfig, EmbeddableFormTexts } from './EmbeddableForm';
19
+ export { FormAnalytics } from './FormAnalytics';
20
+ export type { FormAnalyticsProps, FormSubmissionMetric } from './FormAnalytics';
21
+ export { MasterDetailForm } from './MasterDetailForm';
22
+ export type { MasterDetailFormProps, MasterDetailFormSchema, MasterDetailDetailConfig, } from './MasterDetailForm';
23
+ export { LineItemsPanel } from './LineItemsPanel';
24
+ export type { LineItemsPanelSchema } from './LineItemsPanel';
25
+ export { deriveDetail, deriveColumns, deriveFormFields, findRelationshipField, resolveInlineMode } from './deriveMasterDetail';
26
+ export type { DerivedDetail, InlineMode } from './deriveMasterDetail';