@digigov/form 0.13.2 → 1.0.0-079f34f3d

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.
Files changed (303) hide show
  1. package/Field/FieldBase.js +2 -2
  2. package/Field/FieldBaseContainer.js +8 -8
  3. package/Field/FieldConditional.js +2 -2
  4. package/Field/utils.js +6 -6
  5. package/FieldArray/__stories__/Default.js +2 -2
  6. package/FieldArray/__stories__/WithExactLength.js +2 -2
  7. package/FieldArray/index.js +3 -3
  8. package/FieldObject/index.d.ts +1 -1
  9. package/FieldObject/index.js +5 -5
  10. package/Fieldset/FieldsetWithContext.js +4 -4
  11. package/Fieldset/index.d.ts +1 -1
  12. package/Fieldset/index.js +2 -2
  13. package/Fieldset/types.d.ts +2 -2
  14. package/FormBuilder/FormBuilder.js +5 -5
  15. package/FormBuilder/FormBuilder.mdx +29 -44
  16. package/FormBuilder/__stories__/Default.js +2 -2
  17. package/MultiplicityField/MultiplicityField.mdx +277 -267
  18. package/MultiplicityField/__stories__/Default.js +2 -2
  19. package/MultiplicityField/__stories__/PreviewDisplay.js +9 -9
  20. package/MultiplicityField/__stories__/WithExactLength.js +2 -2
  21. package/MultiplicityField/__stories__/WithMaxLength.js +2 -2
  22. package/MultiplicityField/__stories__/WithMinAndMaxLength.js +2 -2
  23. package/MultiplicityField/__stories__/WithMinLength.js +2 -2
  24. package/MultiplicityField/add-objects.js +6 -6
  25. package/MultiplicityField/index.d.ts +2 -2
  26. package/MultiplicityField/index.js +7 -7
  27. package/Questions/Questions.js +2 -2
  28. package/Questions/Step/ReviewStep.js +8 -8
  29. package/Questions/Step/Step.js +2 -2
  30. package/Questions/Step/StepArrayReview.js +11 -11
  31. package/Questions/Step/StepDescription.js +2 -2
  32. package/Questions/Step/StepForm.d.ts +1 -1
  33. package/Questions/Step/StepForm.js +6 -6
  34. package/Questions/Step/StepTitle.d.ts +2 -2
  35. package/Questions/Step/StepTitle.js +11 -5
  36. package/Questions/Step/getAddMoreFields.d.ts +1 -1
  37. package/Questions/__snapshots__/index.spec.tsx.snap +72 -359
  38. package/Questions/__stories__/Default.js +7 -7
  39. package/Questions/index.mdx +45 -48
  40. package/Questions/index.spec.js +2 -2
  41. package/create-simple-form.mdx +258 -237
  42. package/es/Field/FieldBase.js +1 -1
  43. package/es/Field/FieldBaseContainer.js +6 -6
  44. package/es/Field/FieldConditional.js +1 -1
  45. package/es/Field/utils.js +5 -5
  46. package/es/FieldArray/__stories__/Default.js +1 -1
  47. package/es/FieldArray/__stories__/WithExactLength.js +1 -1
  48. package/es/FieldArray/index.js +2 -2
  49. package/es/FieldObject/index.js +3 -3
  50. package/es/Fieldset/FieldsetWithContext.js +2 -2
  51. package/es/Fieldset/index.js +1 -1
  52. package/es/FormBuilder/FormBuilder.js +3 -3
  53. package/es/FormBuilder/FormBuilder.mdx +29 -44
  54. package/es/FormBuilder/__stories__/Default.js +1 -1
  55. package/es/MultiplicityField/MultiplicityField.mdx +277 -267
  56. package/es/MultiplicityField/__stories__/Default.js +1 -1
  57. package/es/MultiplicityField/__stories__/PreviewDisplay.js +8 -8
  58. package/es/MultiplicityField/__stories__/WithExactLength.js +1 -1
  59. package/es/MultiplicityField/__stories__/WithMaxLength.js +1 -1
  60. package/es/MultiplicityField/__stories__/WithMinAndMaxLength.js +1 -1
  61. package/es/MultiplicityField/__stories__/WithMinLength.js +1 -1
  62. package/es/MultiplicityField/add-objects.js +3 -3
  63. package/es/MultiplicityField/index.js +5 -5
  64. package/es/Questions/Questions.js +1 -1
  65. package/es/Questions/Step/ReviewStep.js +5 -5
  66. package/es/Questions/Step/Step.js +1 -1
  67. package/es/Questions/Step/StepArrayReview.js +7 -7
  68. package/es/Questions/Step/StepDescription.js +1 -1
  69. package/es/Questions/Step/StepForm.js +5 -5
  70. package/es/Questions/Step/StepTitle.js +9 -5
  71. package/es/Questions/__snapshots__/index.spec.tsx.snap +72 -359
  72. package/es/Questions/__stories__/Default.js +5 -5
  73. package/es/Questions/index.mdx +45 -48
  74. package/es/Questions/index.spec.js +1 -1
  75. package/es/create-simple-form.mdx +258 -237
  76. package/es/index.mdx +13 -6
  77. package/es/inputs/AutoComplete/__stories__/Default.js +3 -3
  78. package/es/inputs/AutoComplete/index.js +1 -1
  79. package/es/inputs/Checkboxes/__stories__/Conditional.js +1 -1
  80. package/es/inputs/Checkboxes/__stories__/Default.js +1 -1
  81. package/es/inputs/Checkboxes/__stories__/WithDivider.js +2 -2
  82. package/es/inputs/Checkboxes/index.js +3 -3
  83. package/es/inputs/DateInput/__stories__/Default.js +1 -1
  84. package/es/inputs/DateInput/index.js +1 -1
  85. package/es/inputs/FileInput/__stories__/Default.js +1 -1
  86. package/es/inputs/FileInput/index.js +6 -6
  87. package/es/inputs/Input/__stories__/AFM.js +1 -1
  88. package/es/inputs/Input/__stories__/Boolean.js +1 -1
  89. package/es/inputs/Input/__stories__/Default.js +1 -1
  90. package/es/inputs/Input/__stories__/IBAN.js +1 -1
  91. package/es/inputs/Input/__stories__/Integer.js +1 -1
  92. package/es/inputs/Input/__stories__/MobilePhone.js +1 -1
  93. package/es/inputs/Input/__stories__/PhoneNumber.js +1 -1
  94. package/es/inputs/Input/__stories__/PostalCode.js +1 -1
  95. package/es/inputs/Input/__stories__/TextWithCharacterLimit.js +1 -1
  96. package/es/inputs/Input/index.js +1 -1
  97. package/es/inputs/Label/__stories__/Default.js +1 -1
  98. package/es/inputs/Label/index.js +3 -3
  99. package/es/inputs/OtpInput/__stories__/Default.js +1 -1
  100. package/es/inputs/OtpInput/index.js +5 -5
  101. package/es/inputs/Radio/__stories__/Conditional.js +1 -1
  102. package/es/inputs/Radio/__stories__/Default.js +1 -1
  103. package/es/inputs/Radio/__stories__/WithDivider.js +2 -2
  104. package/es/inputs/Radio/index.js +4 -4
  105. package/es/inputs/Select/__stories__/Default.js +1 -1
  106. package/es/installation.mdx +12 -16
  107. package/es/utils.js +1 -1
  108. package/es/validators/index.js +2 -2
  109. package/esm/Field/FieldBase.js +1 -1
  110. package/esm/Field/FieldBaseContainer.js +6 -6
  111. package/esm/Field/FieldConditional.js +1 -1
  112. package/esm/Field/utils.js +5 -5
  113. package/esm/FieldArray/__stories__/Default.js +1 -1
  114. package/esm/FieldArray/__stories__/WithExactLength.js +1 -1
  115. package/esm/FieldArray/index.js +2 -2
  116. package/esm/FieldObject/index.js +3 -3
  117. package/esm/Fieldset/FieldsetWithContext.js +2 -2
  118. package/esm/Fieldset/index.js +1 -1
  119. package/esm/FormBuilder/FormBuilder.js +3 -3
  120. package/esm/FormBuilder/FormBuilder.mdx +29 -44
  121. package/esm/FormBuilder/__stories__/Default.js +1 -1
  122. package/esm/MultiplicityField/MultiplicityField.mdx +277 -267
  123. package/esm/MultiplicityField/__stories__/Default.js +1 -1
  124. package/esm/MultiplicityField/__stories__/PreviewDisplay.js +8 -8
  125. package/esm/MultiplicityField/__stories__/WithExactLength.js +1 -1
  126. package/esm/MultiplicityField/__stories__/WithMaxLength.js +1 -1
  127. package/esm/MultiplicityField/__stories__/WithMinAndMaxLength.js +1 -1
  128. package/esm/MultiplicityField/__stories__/WithMinLength.js +1 -1
  129. package/esm/MultiplicityField/add-objects.js +3 -3
  130. package/esm/MultiplicityField/index.js +5 -5
  131. package/esm/Questions/Questions.js +1 -1
  132. package/esm/Questions/Step/ReviewStep.js +5 -5
  133. package/esm/Questions/Step/Step.js +1 -1
  134. package/esm/Questions/Step/StepArrayReview.js +7 -7
  135. package/esm/Questions/Step/StepDescription.js +1 -1
  136. package/esm/Questions/Step/StepForm.js +5 -5
  137. package/esm/Questions/Step/StepTitle.js +9 -5
  138. package/esm/Questions/__snapshots__/index.spec.tsx.snap +72 -359
  139. package/esm/Questions/__stories__/Default.js +5 -5
  140. package/esm/Questions/index.mdx +45 -48
  141. package/esm/Questions/index.spec.js +1 -1
  142. package/esm/create-simple-form.mdx +258 -237
  143. package/esm/index.js +1 -1
  144. package/esm/index.mdx +13 -6
  145. package/esm/inputs/AutoComplete/__stories__/Default.js +3 -3
  146. package/esm/inputs/AutoComplete/index.js +1 -1
  147. package/esm/inputs/Checkboxes/__stories__/Conditional.js +1 -1
  148. package/esm/inputs/Checkboxes/__stories__/Default.js +1 -1
  149. package/esm/inputs/Checkboxes/__stories__/WithDivider.js +2 -2
  150. package/esm/inputs/Checkboxes/index.js +3 -3
  151. package/esm/inputs/DateInput/__stories__/Default.js +1 -1
  152. package/esm/inputs/DateInput/index.js +1 -1
  153. package/esm/inputs/FileInput/__stories__/Default.js +1 -1
  154. package/esm/inputs/FileInput/index.js +6 -6
  155. package/esm/inputs/Input/__stories__/AFM.js +1 -1
  156. package/esm/inputs/Input/__stories__/Boolean.js +1 -1
  157. package/esm/inputs/Input/__stories__/Default.js +1 -1
  158. package/esm/inputs/Input/__stories__/IBAN.js +1 -1
  159. package/esm/inputs/Input/__stories__/Integer.js +1 -1
  160. package/esm/inputs/Input/__stories__/MobilePhone.js +1 -1
  161. package/esm/inputs/Input/__stories__/PhoneNumber.js +1 -1
  162. package/esm/inputs/Input/__stories__/PostalCode.js +1 -1
  163. package/esm/inputs/Input/__stories__/TextWithCharacterLimit.js +1 -1
  164. package/esm/inputs/Input/index.js +1 -1
  165. package/esm/inputs/Label/__stories__/Default.js +1 -1
  166. package/esm/inputs/Label/index.js +3 -3
  167. package/esm/inputs/OtpInput/__stories__/Default.js +1 -1
  168. package/esm/inputs/OtpInput/index.js +5 -5
  169. package/esm/inputs/Radio/__stories__/Conditional.js +1 -1
  170. package/esm/inputs/Radio/__stories__/Default.js +1 -1
  171. package/esm/inputs/Radio/__stories__/WithDivider.js +2 -2
  172. package/esm/inputs/Radio/index.js +4 -4
  173. package/esm/inputs/Select/__stories__/Default.js +1 -1
  174. package/esm/installation.mdx +12 -16
  175. package/esm/utils.js +1 -1
  176. package/esm/validators/index.js +2 -2
  177. package/index.mdx +13 -6
  178. package/inputs/AutoComplete/__stories__/Default.js +4 -4
  179. package/inputs/AutoComplete/index.d.ts +2 -2
  180. package/inputs/AutoComplete/index.js +2 -2
  181. package/inputs/Checkboxes/__stories__/Conditional.js +2 -2
  182. package/inputs/Checkboxes/__stories__/Default.js +2 -2
  183. package/inputs/Checkboxes/__stories__/WithDivider.js +3 -3
  184. package/inputs/Checkboxes/index.d.ts +1 -1
  185. package/inputs/Checkboxes/index.js +4 -4
  186. package/inputs/DateInput/__stories__/Default.js +2 -2
  187. package/inputs/DateInput/index.js +2 -2
  188. package/inputs/FileInput/__stories__/Default.js +2 -2
  189. package/inputs/FileInput/index.js +6 -6
  190. package/inputs/Input/__stories__/AFM.js +2 -2
  191. package/inputs/Input/__stories__/Boolean.js +2 -2
  192. package/inputs/Input/__stories__/Default.js +2 -2
  193. package/inputs/Input/__stories__/IBAN.js +2 -2
  194. package/inputs/Input/__stories__/Integer.js +2 -2
  195. package/inputs/Input/__stories__/MobilePhone.js +2 -2
  196. package/inputs/Input/__stories__/PhoneNumber.js +2 -2
  197. package/inputs/Input/__stories__/PostalCode.js +2 -2
  198. package/inputs/Input/__stories__/TextWithCharacterLimit.js +2 -2
  199. package/inputs/Input/index.js +1 -1
  200. package/inputs/Label/__stories__/Default.js +2 -2
  201. package/inputs/Label/index.js +4 -4
  202. package/inputs/OtpInput/__stories__/Default.js +2 -2
  203. package/inputs/OtpInput/index.js +5 -5
  204. package/inputs/Radio/__stories__/Conditional.js +2 -2
  205. package/inputs/Radio/__stories__/Default.js +2 -2
  206. package/inputs/Radio/__stories__/WithDivider.js +3 -3
  207. package/inputs/Radio/index.d.ts +1 -1
  208. package/inputs/Radio/index.js +7 -7
  209. package/inputs/Select/__stories__/Default.js +2 -2
  210. package/inputs/Select/index.d.ts +1 -1
  211. package/installation.mdx +12 -16
  212. package/package.json +5 -5
  213. package/src/Field/FieldBase.tsx +1 -1
  214. package/src/Field/FieldBaseContainer.tsx +7 -7
  215. package/src/Field/FieldConditional.tsx +1 -1
  216. package/src/Field/index.tsx +1 -1
  217. package/src/Field/utils.ts +7 -7
  218. package/src/FieldArray/FieldArray.stories.js +1 -1
  219. package/src/FieldArray/__stories__/Default.tsx +1 -1
  220. package/src/FieldArray/__stories__/WithExactLength.tsx +1 -1
  221. package/src/FieldArray/index.tsx +3 -3
  222. package/src/FieldObject/index.tsx +6 -6
  223. package/src/Fieldset/FieldsetWithContext.tsx +3 -3
  224. package/src/Fieldset/index.tsx +5 -5
  225. package/src/Fieldset/types.tsx +3 -3
  226. package/src/FormBuilder/FormBuilder.mdx +29 -44
  227. package/src/FormBuilder/FormBuilder.stories.js +1 -1
  228. package/src/FormBuilder/FormBuilder.tsx +4 -4
  229. package/src/FormBuilder/__stories__/Default.tsx +1 -1
  230. package/src/MultiplicityField/MultiplicityField.mdx +277 -267
  231. package/src/MultiplicityField/MultiplicityField.stories.js +1 -1
  232. package/src/MultiplicityField/__stories__/Default.tsx +1 -1
  233. package/src/MultiplicityField/__stories__/PreviewDisplay.tsx +18 -18
  234. package/src/MultiplicityField/__stories__/WithExactLength.tsx +1 -1
  235. package/src/MultiplicityField/__stories__/WithMaxLength.tsx +1 -1
  236. package/src/MultiplicityField/__stories__/WithMinAndMaxLength.tsx +1 -1
  237. package/src/MultiplicityField/__stories__/WithMinLength.tsx +1 -1
  238. package/src/MultiplicityField/add-objects.tsx +3 -3
  239. package/src/MultiplicityField/index.tsx +9 -9
  240. package/src/Questions/Questions.stories.js +1 -1
  241. package/src/Questions/Questions.tsx +2 -2
  242. package/src/Questions/Step/ReviewStep.tsx +6 -6
  243. package/src/Questions/Step/Step.tsx +1 -1
  244. package/src/Questions/Step/StepArrayReview.tsx +11 -11
  245. package/src/Questions/Step/StepDescription.tsx +1 -1
  246. package/src/Questions/Step/StepForm.tsx +6 -6
  247. package/src/Questions/Step/StepTitle.tsx +19 -17
  248. package/src/Questions/Step/getAddMoreFields.tsx +1 -1
  249. package/src/Questions/__snapshots__/index.spec.tsx.snap +72 -359
  250. package/src/Questions/__stories__/Default.tsx +8 -8
  251. package/src/Questions/index.mdx +45 -48
  252. package/src/Questions/index.spec.tsx +1 -1
  253. package/src/create-simple-form.mdx +258 -237
  254. package/src/index.mdx +13 -6
  255. package/src/inputs/AutoComplete/__stories__/Default.tsx +3 -3
  256. package/src/inputs/AutoComplete/index.tsx +4 -4
  257. package/src/inputs/Checkboxes/Checkboxes.stories.js +1 -1
  258. package/src/inputs/Checkboxes/__stories__/Conditional.tsx +2 -2
  259. package/src/inputs/Checkboxes/__stories__/Default.tsx +1 -1
  260. package/src/inputs/Checkboxes/__stories__/WithDivider.tsx +2 -2
  261. package/src/inputs/Checkboxes/index.tsx +4 -4
  262. package/src/inputs/DateInput/DateInput.stories.js +1 -1
  263. package/src/inputs/DateInput/__stories__/Default.tsx +1 -1
  264. package/src/inputs/DateInput/index.tsx +2 -2
  265. package/src/inputs/FileInput/FileInput.stories.js +1 -1
  266. package/src/inputs/FileInput/__stories__/Default.tsx +1 -1
  267. package/src/inputs/FileInput/index.tsx +6 -6
  268. package/src/inputs/Input/__stories__/AFM.tsx +1 -1
  269. package/src/inputs/Input/__stories__/Boolean.tsx +1 -1
  270. package/src/inputs/Input/__stories__/Default.tsx +1 -1
  271. package/src/inputs/Input/__stories__/IBAN.tsx +1 -1
  272. package/src/inputs/Input/__stories__/Integer.tsx +1 -1
  273. package/src/inputs/Input/__stories__/MobilePhone.tsx +1 -1
  274. package/src/inputs/Input/__stories__/PhoneNumber.tsx +1 -1
  275. package/src/inputs/Input/__stories__/PostalCode.tsx +1 -1
  276. package/src/inputs/Input/__stories__/TextWithCharacterLimit.tsx +1 -1
  277. package/src/inputs/Input/index.tsx +3 -3
  278. package/src/inputs/Label/Label.stories.js +1 -1
  279. package/src/inputs/Label/__stories__/Default.tsx +1 -1
  280. package/src/inputs/Label/index.tsx +4 -4
  281. package/src/inputs/OtpInput/__stories__/Default.tsx +1 -1
  282. package/src/inputs/OtpInput/index.tsx +14 -10
  283. package/src/inputs/Radio/Radio.stories.js +1 -2
  284. package/src/inputs/Radio/__stories__/Conditional.tsx +3 -3
  285. package/src/inputs/Radio/__stories__/Default.tsx +1 -1
  286. package/src/inputs/Radio/__stories__/WithDivider.tsx +2 -2
  287. package/src/inputs/Radio/index.tsx +6 -6
  288. package/src/inputs/Select/Select.stories.js +1 -1
  289. package/src/inputs/Select/__stories__/Default.tsx +1 -1
  290. package/src/inputs/Select/index.tsx +2 -2
  291. package/src/installation.mdx +12 -16
  292. package/src/types.tsx +4 -2
  293. package/src/utils.ts +1 -1
  294. package/src/validators/index.ts +10 -10
  295. package/src/validators/utils/file.ts +1 -1
  296. package/src/validators/utils/phone.ts +1 -1
  297. package/src/validators/utils/postal_code.ts +1 -1
  298. package/types.d.ts +4 -2
  299. package/validators/index.d.ts +3 -3
  300. package/validators/index.js +4 -4
  301. package/validators/utils/file.d.ts +1 -1
  302. package/validators/utils/phone.d.ts +1 -1
  303. package/validators/utils/postal_code.d.ts +1 -1
@@ -1,9 +1,15 @@
1
- import * as yup from 'yup';
2
- import { FieldSpec } from '@digigov/form/types';
3
- import { ValidatorSchema } from '@digigov/form/validators/types';
4
1
  import { MutableRefObject, useMemo } from 'react';
5
2
  import dayjs from 'dayjs';
6
3
  import customParseFormat from 'dayjs/plugin/customParseFormat';
4
+ import * as yup from 'yup';
5
+ import { AnyObjectSchema, StringSchema } from 'yup';
6
+ import { RequiredArraySchema } from 'yup/lib/array';
7
+ import Lazy from 'yup/lib/Lazy';
8
+ import { MixedSchema } from 'yup/lib/mixed';
9
+ import { TypeOfShape, AssertsShape } from 'yup/lib/object';
10
+ import { AnyObject } from 'yup/lib/types';
11
+ import { FieldSpec } from '@digigov/form/types';
12
+ import { ValidatorSchema } from '@digigov/form/validators/types';
7
13
  import {
8
14
  getYupObjectShape,
9
15
  AFM_VALIDATOR,
@@ -16,14 +22,8 @@ import {
16
22
  POSTALCODE_VALIDATOR,
17
23
  UUID4_VALIDATOR,
18
24
  } from '@digigov/form/validators/utils';
19
- import { MixedSchema } from 'yup/lib/mixed';
20
- import { RequiredArraySchema } from 'yup/lib/array';
21
- import { AnyObject } from 'yup/lib/types';
22
- import Lazy from 'yup/lib/Lazy';
23
- import { TypeOfShape, AssertsShape } from 'yup/lib/object';
24
- import { AnyObjectSchema, StringSchema } from 'yup';
25
- import { NUMBER_VALIDATOR } from '@digigov/form/validators/utils/number';
26
25
  import { INT_VALIDATOR } from '@digigov/form/validators/utils/int';
26
+ import { NUMBER_VALIDATOR } from '@digigov/form/validators/utils/number';
27
27
  dayjs.extend(customParseFormat);
28
28
 
29
29
  const VALID_DATE_FORMATS = ['DD/MM/YYYY'];
@@ -1,5 +1,5 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
1
  import { FieldSpec } from '@digigov/form/types';
2
+ import { ValidatorSchema } from '@digigov/form/validators/types';
3
3
 
4
4
  const DEFAULT_FILE_MAX_SIZE = 10000000;
5
5
 
@@ -1,6 +1,6 @@
1
1
  import * as gPhoneNumber from 'google-libphonenumber';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
2
  import { FieldSpec } from '@digigov/form/types';
3
+ import { ValidatorSchema } from '@digigov/form/validators/types';
4
4
 
5
5
  export type PhoneNumberType = 'landline' | 'mobile' | null;
6
6
 
@@ -1,5 +1,5 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
1
  import { FieldSpec } from '@digigov/form/types';
2
+ import { ValidatorSchema } from '@digigov/form/validators/types';
3
3
 
4
4
  const CODE_REGEX = /^[12345678][0-9]{4}$/;
5
5
  export function validatePostalCode(
package/types.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { UseFormReturn, UseFormProps } from 'react-hook-form';
3
- import { GridProps } from '@digigov/ui/layouts/Grid';
4
- import { ValidatorSchema } from '@digigov/form/validators/types';
5
3
  import { FieldComponentRegistry } from '@digigov/form/Field/types';
4
+ import { ValidatorSchema } from '@digigov/form/validators/types';
5
+ import { GridProps } from '@digigov/ui/layouts/Grid';
6
6
  export declare type FieldError = {
7
7
  message: string;
8
8
  };
@@ -32,6 +32,8 @@ export interface FieldSpec {
32
32
  layout?: Record<string, GridProps['xs'] | GridProps['sm'] | GridProps['md'] | GridProps['lg'] | GridProps['xl']>;
33
33
  validators?: ValidatorSchema[];
34
34
  wrapper?: 'label' | 'fieldset';
35
+ maxWidth?: string;
36
+ width?: string;
35
37
  }
36
38
  export interface FieldsetSpec {
37
39
  key: string;
@@ -1,8 +1,8 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
1
  import { MutableRefObject } from 'react';
4
- import Lazy from 'yup/lib/Lazy';
5
2
  import { AnyObjectSchema } from 'yup';
3
+ import Lazy from 'yup/lib/Lazy';
4
+ import { FieldSpec } from '@digigov/form/types';
5
+ import { ValidatorSchema } from '@digigov/form/validators/types';
6
6
  export declare const getYUPTypeMap: () => Record<string, any>;
7
7
  export interface MutableRefObjectProps {
8
8
  }
@@ -12,20 +12,20 @@ exports.useValidationSchema = useValidationSchema;
12
12
 
13
13
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
14
14
 
15
- var yup = _interopRequireWildcard(require("yup"));
16
-
17
15
  var _react = require("react");
18
16
 
19
17
  var _dayjs = _interopRequireDefault(require("dayjs"));
20
18
 
21
19
  var _customParseFormat = _interopRequireDefault(require("dayjs/plugin/customParseFormat"));
22
20
 
23
- var _utils = require("@digigov/form/validators/utils");
21
+ var yup = _interopRequireWildcard(require("yup"));
24
22
 
25
- var _number = require("@digigov/form/validators/utils/number");
23
+ var _utils = require("@digigov/form/validators/utils");
26
24
 
27
25
  var _int = require("@digigov/form/validators/utils/int");
28
26
 
27
+ var _number = require("@digigov/form/validators/utils/number");
28
+
29
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
30
 
31
31
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -1,3 +1,3 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
1
  import { FieldSpec } from '@digigov/form/types';
2
+ import { ValidatorSchema } from '@digigov/form/validators/types';
3
3
  export declare const FILE_MAX_SIZE_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,5 +1,5 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
1
  import { FieldSpec } from '@digigov/form/types';
2
+ import { ValidatorSchema } from '@digigov/form/validators/types';
3
3
  export declare type PhoneNumberType = 'landline' | 'mobile' | null;
4
4
  export declare function validatePhoneNumber(phoneNumber: string, countries: string[] | undefined, typeOfPhoneNumber: PhoneNumberType): boolean;
5
5
  export declare function matchTypeOfPhoneNumber(phone: any, type: string, phoneUtil: any): boolean;
@@ -1,4 +1,4 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
1
  import { FieldSpec } from '@digigov/form/types';
2
+ import { ValidatorSchema } from '@digigov/form/validators/types';
3
3
  export declare function validatePostalCode(number: string, countries: Array<string>): boolean;
4
4
  export declare const POSTALCODE_VALIDATOR: (field: FieldSpec) => ValidatorSchema;