@micromerce/formbuilder-react 1.0.926 → 1.0.928

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.
@@ -11,5 +11,5 @@ export interface IProps {
11
11
  tooltip?: string;
12
12
  helper?: string;
13
13
  }
14
- declare const AddressGroup: ({ ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const AddressGroup: ({ id, control, objectPathId, groupIsRequired, isInRequiredGroup, isInGroup, controlProps, tooltip, helper, }: IProps) => import("react/jsx-runtime").JSX.Element;
15
15
  export default AddressGroup;
@@ -0,0 +1,3 @@
1
+ import { SelectFormControlOption } from "../../../../types";
2
+ declare const States: Record<string, SelectFormControlOption[]>;
3
+ export default States;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Where each address field sits, per country. Kept out of the component so it can be reasoned about
3
+ * and tested without rendering anything.
4
+ *
5
+ * A row is written the way css grid-template-areas reads: a name repeated across columns spans
6
+ * them, so "streetName streetName houseNumber" is the street over two columns and the number in the
7
+ * third. Every family lists every standard field — a layout rearranges, it never drops one.
8
+ */
9
+ export declare const STANDARD_CONTROLS: readonly ["additionalLine", "streetName", "houseNumber", "postalCode", "locality", "state", "country"];
10
+ export declare const LAYOUTS: Record<string, string[]>;
11
+ /**
12
+ * Country to layout family. Anything unmapped falls back to `default`, so an unknown country still
13
+ * renders a complete, readable address — it just does not get the local convention.
14
+ *
15
+ * NOT modelled: the largest-to-smallest order of Japanese, Chinese and Korean addresses. Those fall
16
+ * back to `default` on purpose rather than being approximated wrongly.
17
+ */
18
+ export declare const COUNTRY_LAYOUT: Record<string, keyof typeof LAYOUTS>;
19
+ export declare const getLayout: (countryCode?: string) => string[];
20
+ /**
21
+ * The rows to render, in order. Standard fields follow the country layout — that is the point of
22
+ * having one per country. Every other field is positioned by the order it was declared in, so
23
+ * whatever a solution adds lands where it put it relative to the standard fields.
24
+ */
25
+ export declare const buildRows: (layout: string[], declared: string[]) => string[];
26
+ /** The rows as a css value; a cell whose field is not declared becomes an empty cell. */
27
+ export declare const toGridTemplateAreas: (rows: string[], declared: string[]) => string;