@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.
- package/CHANGELOG.md +323 -0
- package/dist/{packages/plugin-form/src/DrawerForm.d.ts → DrawerForm.d.ts} +14 -1
- package/dist/{packages/plugin-form/src/EmbeddableForm.d.ts → EmbeddableForm.d.ts} +1 -1
- package/dist/LineItemsPanel.d.ts +20 -0
- package/dist/MasterDetailForm.d.ts +67 -0
- package/dist/{packages/plugin-form/src/ModalForm.d.ts → ModalForm.d.ts} +17 -1
- package/dist/{packages/plugin-form/src/ObjectForm.d.ts → ObjectForm.d.ts} +1 -1
- package/dist/{packages/plugin-form/src/SplitForm.d.ts → SplitForm.d.ts} +1 -1
- package/dist/{packages/plugin-form/src/TabbedForm.d.ts → TabbedForm.d.ts} +1 -1
- package/dist/{packages/plugin-form/src/WizardForm.d.ts → WizardForm.d.ts} +13 -1
- package/dist/{packages/plugin-form/src/autoLayout.d.ts → autoLayout.d.ts} +1 -1
- package/dist/deriveMasterDetail.d.ts +86 -0
- package/dist/fieldGroups.d.ts +27 -0
- package/dist/index.d.ts +26 -2
- package/dist/index.js +1964 -875
- package/dist/index.umd.cjs +1 -1
- package/dist/masterDetailTx.d.ts +80 -0
- package/dist/sectionFields.d.ts +22 -0
- package/dist/successBehavior.d.ts +21 -0
- package/package.json +11 -11
- package/dist/packages/plugin-form/src/index.d.ts +0 -20
- /package/dist/{packages/plugin-form/src/FormAnalytics.d.ts → FormAnalytics.d.ts} +0 -0
- /package/dist/{packages/plugin-form/src/FormSection.d.ts → FormSection.d.ts} +0 -0
- /package/dist/{packages/plugin-form/src/sanitize.d.ts → sanitize.d.ts} +0 -0
|
@@ -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
|
-
|
|
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';
|