@micromerce/formbuilder-react 1.0.1013 → 1.0.1015

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.
@@ -8,7 +8,11 @@ import { Country } from "react-phone-number-input/max";
8
8
  export declare const browserCountry: (languages?: readonly string[]) => Country | undefined;
9
9
  /** `custom-attributes.phoneCountry` when the numbering plans know it ("de" counts as DE), else undefined. */
10
10
  export declare const knownCountry: (code: unknown) => Country | undefined;
11
- /** A stored value as E.164, read with `country` when it has no country code; undefined when it is no phone number. */
11
+ /**
12
+ * A stored value as E.164, read with `country` when it has no country code; undefined unless that gives a
13
+ * valid number. Only a valid reading may be written back: "030 12345678" read in the US (an English
14
+ * browser) parses to +103012345678, which no country assigns — rewriting it would lose the number.
15
+ */
12
16
  export declare const toE164: (value: string, country?: Country) => string | undefined;
13
17
  /** The country a stored number belongs to. */
14
18
  export declare const countryOf: (value: string) => Country | undefined;
@@ -5,7 +5,7 @@ export declare const isCheckedSubtype: (customAttributes: unknown) => boolean;
5
5
  /**
6
6
  * An input with a checked `custom-attributes.subtype` (register: utils/subtypes, COP-4585) — iban, bic,
7
7
  * leitweg-id, creditor-id. The behaviour belongs to the field, wherever it stands:
8
- * - monospaced, read character by character, as wide as its code;
8
+ * - monospaced, read character by character, as wide as every other input (the row);
9
9
  * - an empty field shows an example, unless the form sets a placeholder;
10
10
  * - leaving the field stores the value normalized (the subtype's `normalize`); a valid value may read
11
11
  * differently while not being edited (an IBAN in groups of four) — only the shown copy, the form
@@ -15,7 +15,9 @@ export declare const isCheckedSubtype: (customAttributes: unknown) => boolean;
15
15
  * A failing value is not this control's business: the submit goes to the server, which refuses it and
16
16
  * sends the reason, localized, back to the field (like every other field error). The editor never
17
17
  * blocks a submit, so it can never be stricter than the server. The input keeps its `type` and gets
18
- * the subtype's `pattern` (README, "HTML compatibility").
18
+ * no `pattern` here: FormBuilder runs checkValidity() before every submit, so a pattern would make the
19
+ * editor block values the server accepts. The pattern is for the server-rendered HTML form (README,
20
+ * "HTML compatibility").
19
21
  */
20
22
  declare const SubtypeInput: (props: InputProps) => React.JSX.Element;
21
23
  export default SubtypeInput;