@digigov/form 2.0.0-rc.8 → 2.0.2

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 (819) hide show
  1. package/CHANGELOG.md +113 -3
  2. package/Field/ErrorGroup.d.ts +15 -0
  3. package/Field/ErrorGroup.js +53 -0
  4. package/Field/FieldBase.d.ts +1 -1
  5. package/Field/FieldBase.js +77 -0
  6. package/Field/FieldBaseContainer.d.ts +2 -2
  7. package/Field/FieldBaseContainer.js +43 -0
  8. package/Field/FieldConditional.d.ts +1 -1
  9. package/Field/FieldConditional.js +45 -0
  10. package/Field/index.d.ts +1 -1
  11. package/Field/index.js +70 -68
  12. package/Field/types.d.ts +61 -11
  13. package/Field/utils/evaluateFieldWithConditions.d.ts +2 -0
  14. package/Field/utils/evaluateFieldWithConditions.js +19 -0
  15. package/Field/utils/resolveField.d.ts +3 -0
  16. package/Field/utils/resolveField.js +32 -0
  17. package/Field/utils/useField.d.ts +2 -0
  18. package/Field/utils/useField.js +47 -0
  19. package/FieldArray/BaseFieldArray.d.ts +5 -0
  20. package/FieldArray/BaseFieldArray.js +46 -0
  21. package/FieldArray/FormDialog/ArrayDisplay/ArrayContainerDisplay.d.ts +9 -0
  22. package/FieldArray/FormDialog/ArrayDisplay/ArrayContainerDisplay.js +13 -0
  23. package/FieldArray/FormDialog/ArrayDisplay/ArrayItemDisplay.d.ts +26 -0
  24. package/FieldArray/FormDialog/ArrayDisplay/ArrayItemDisplay.js +134 -0
  25. package/FieldArray/FormDialog/ArrayDisplay/ArrayItemHeader.d.ts +5 -0
  26. package/FieldArray/FormDialog/ArrayDisplay/ArrayItemHeader.js +6 -0
  27. package/FieldArray/FormDialog/ArrayDisplay/index.d.ts +15 -0
  28. package/FieldArray/FormDialog/ArrayDisplay/index.js +32 -0
  29. package/FieldArray/FormDialog/ArrayEditModal.d.ts +24 -0
  30. package/FieldArray/FormDialog/ArrayEditModal.js +138 -0
  31. package/FieldArray/FormDialog/index.d.ts +19 -0
  32. package/FieldArray/FormDialog/index.js +199 -0
  33. package/FieldArray/index.d.ts +11 -2
  34. package/FieldArray/index.js +65 -60
  35. package/FieldObject/index.d.ts +11 -3
  36. package/FieldObject/index.js +53 -52
  37. package/Fieldset/FieldsetWithContext.js +27 -0
  38. package/Fieldset/index.d.ts +2 -2
  39. package/Fieldset/index.js +18 -32
  40. package/Fieldset/types.d.ts +3 -2
  41. package/FormBuilder/index.d.ts +8 -1
  42. package/FormBuilder/index.js +239 -2
  43. package/FormContext.d.ts +3 -2
  44. package/FormContext.js +7 -0
  45. package/MultiplicityField/add-objects.d.ts +3 -2
  46. package/MultiplicityField/add-objects.js +107 -0
  47. package/MultiplicityField/index.d.ts +2 -19
  48. package/MultiplicityField/index.js +84 -111
  49. package/MultiplicityField/types.d.ts +19 -0
  50. package/Questions/Questions.d.ts +1 -1
  51. package/Questions/Questions.js +48 -0
  52. package/Questions/QuestionsContext.d.ts +1 -2
  53. package/Questions/QuestionsContext.js +10 -0
  54. package/Questions/Step/ReviewStep.js +32 -0
  55. package/Questions/Step/Step.d.ts +1 -1
  56. package/Questions/Step/Step.js +39 -0
  57. package/Questions/Step/StepArrayReview.d.ts +1 -1
  58. package/Questions/Step/StepArrayReview.js +35 -0
  59. package/Questions/Step/StepContext.d.ts +1 -2
  60. package/Questions/Step/StepContext.js +28 -0
  61. package/Questions/Step/StepDescription.d.ts +1 -1
  62. package/Questions/Step/StepDescription.js +18 -0
  63. package/Questions/Step/StepForm.d.ts +2 -2
  64. package/Questions/Step/StepForm.js +29 -0
  65. package/Questions/Step/StepQuote.d.ts +1 -1
  66. package/Questions/Step/StepQuote.js +5 -0
  67. package/Questions/Step/StepTitle.d.ts +2 -1
  68. package/Questions/Step/StepTitle.js +25 -0
  69. package/Questions/Step/getAddMoreFields.d.ts +2 -2
  70. package/Questions/Step/getAddMoreFields.js +24 -0
  71. package/Questions/Step/index.d.ts +11 -12
  72. package/Questions/Step/index.js +13 -13
  73. package/Questions/Step/types.d.ts +2 -1
  74. package/Questions/Step/types.js +0 -0
  75. package/Questions/getNextStep.d.ts +1 -1
  76. package/Questions/getNextStep.js +13 -0
  77. package/Questions/index.d.ts +2 -2
  78. package/Questions/index.js +4 -3
  79. package/Questions/types.d.ts +2 -1
  80. package/Questions/types.js +0 -0
  81. package/hooks/useFieldFocusManager.d.ts +25 -0
  82. package/hooks/useFieldFocusManager.js +83 -0
  83. package/hooks/utils.d.ts +18 -0
  84. package/hooks/utils.js +60 -0
  85. package/index.d.ts +5 -2
  86. package/index.js +8 -4
  87. package/inputs/AutoCompleteInput/index.d.ts +4 -4
  88. package/inputs/AutoCompleteInput/index.js +42 -55
  89. package/inputs/Checkboxes/index.d.ts +7 -4
  90. package/inputs/Checkboxes/index.js +50 -91
  91. package/inputs/DateInput/index.d.ts +3 -7
  92. package/inputs/DateInput/index.js +128 -125
  93. package/inputs/DateTimeInput/index.d.ts +10 -0
  94. package/inputs/DateTimeInput/index.js +190 -0
  95. package/inputs/FileInput/index.d.ts +18 -2
  96. package/inputs/FileInput/index.js +59 -56
  97. package/inputs/ImageInput/index.d.ts +10 -2
  98. package/inputs/ImageInput/index.js +94 -74
  99. package/inputs/Input/index.d.ts +5 -2
  100. package/inputs/Input/index.js +67 -67
  101. package/inputs/Label/index.d.ts +2 -4
  102. package/inputs/Label/index.js +13 -21
  103. package/inputs/OtpInput/index.d.ts +1 -5
  104. package/inputs/OtpInput/index.js +122 -139
  105. package/inputs/Radio/index.d.ts +10 -3
  106. package/inputs/Radio/index.js +72 -56
  107. package/inputs/Select/index.d.ts +7 -4
  108. package/inputs/Select/index.js +23 -30
  109. package/inputs/index.d.ts +9 -9
  110. package/inputs/index.js +10 -9
  111. package/inputs/registry.d.ts +5 -0
  112. package/inputs/registry.js +80 -0
  113. package/internal.d.ts +5 -34
  114. package/internal.js +6 -0
  115. package/lazy.d.ts +93 -65
  116. package/lazy.js +163 -0
  117. package/package.json +12 -13
  118. package/registry.d.ts +45 -27
  119. package/registry.js +170 -0
  120. package/src/Field/ErrorGroup.tsx +84 -0
  121. package/src/Field/FieldBase.tsx +43 -25
  122. package/src/Field/FieldBaseContainer.tsx +71 -47
  123. package/src/Field/FieldConditional.tsx +10 -2
  124. package/src/Field/doc.mdx +207 -0
  125. package/src/Field/index.tsx +37 -23
  126. package/src/Field/types.tsx +92 -13
  127. package/src/Field/utils/evaluateFieldWithConditions.ts +33 -0
  128. package/src/Field/utils/resolveField.ts +58 -0
  129. package/src/Field/utils/useField.ts +68 -0
  130. package/src/FieldArray/BaseFieldArray.tsx +97 -0
  131. package/src/FieldArray/FieldArray.stories.js +4 -2
  132. package/src/FieldArray/FormDialog/ArrayDisplay/ArrayContainerDisplay.tsx +45 -0
  133. package/src/FieldArray/FormDialog/ArrayDisplay/ArrayDisplay.stories.js +14 -0
  134. package/src/FieldArray/FormDialog/ArrayDisplay/ArrayItemDisplay.tsx +370 -0
  135. package/src/FieldArray/FormDialog/ArrayDisplay/ArrayItemHeader.tsx +15 -0
  136. package/src/FieldArray/FormDialog/ArrayDisplay/__stories__/Cards.tsx +88 -0
  137. package/src/FieldArray/FormDialog/ArrayDisplay/__stories__/Default.tsx +93 -0
  138. package/src/FieldArray/FormDialog/ArrayDisplay/__stories__/ReadOnly.tsx +79 -0
  139. package/src/FieldArray/FormDialog/ArrayDisplay/__stories__/ReadOnlyCards.tsx +75 -0
  140. package/src/FieldArray/FormDialog/ArrayDisplay/__stories__/Sortable.tsx +93 -0
  141. package/src/FieldArray/FormDialog/ArrayDisplay/__stories__/SortableCards.tsx +88 -0
  142. package/src/FieldArray/FormDialog/ArrayDisplay/index.test.tsx +44 -0
  143. package/src/FieldArray/FormDialog/ArrayDisplay/index.tsx +67 -0
  144. package/src/FieldArray/FormDialog/ArrayEditModal.tsx +241 -0
  145. package/src/FieldArray/FormDialog/index.tsx +302 -0
  146. package/src/FieldArray/__stories__/CardsWithError.tsx +110 -0
  147. package/src/FieldArray/__stories__/Default.tsx +2 -1
  148. package/src/FieldArray/__stories__/TableWithError.tsx +111 -0
  149. package/src/FieldArray/__stories__/WithExactLength.tsx +2 -1
  150. package/src/FieldArray/__stories__/WithModal.tsx +188 -0
  151. package/src/FieldArray/__tests__/fieldset-multiplicity.spec.tsx +271 -0
  152. package/src/FieldArray/__tests__/multiplicity-attachment.spec.tsx +280 -0
  153. package/src/FieldArray/__tests__/multiplicity-optional.spec.tsx +232 -0
  154. package/src/FieldArray/__tests__/multiplicity-required.spec.tsx +170 -0
  155. package/src/FieldArray/__tests__/nested-fieldset-multiplicity.spec.tsx +627 -0
  156. package/src/FieldArray/__tests__/preference-multiple-choice.spec.tsx +222 -0
  157. package/src/FieldArray/index.spec.tsx +355 -0
  158. package/src/FieldArray/index.test.tsx +43 -0
  159. package/src/FieldArray/index.tsx +84 -55
  160. package/src/FieldObject/index.tsx +53 -27
  161. package/src/Fieldset/FieldsetWithContext.tsx +1 -1
  162. package/src/Fieldset/index.tsx +6 -6
  163. package/src/Fieldset/types.tsx +5 -3
  164. package/src/FormBuilder/FormBuilder.stories.js +6 -1
  165. package/src/FormBuilder/__stories__/AutoErrorGrouping.tsx +63 -0
  166. package/src/FormBuilder/__stories__/Default.tsx +1 -1
  167. package/src/FormBuilder/__stories__/ErrorGrouping.tsx +43 -0
  168. package/src/FormBuilder/{FormBuilder.mdx → doc.mdx} +27 -35
  169. package/src/FormBuilder/index.test.tsx +32 -0
  170. package/src/FormBuilder/index.tsx +314 -1
  171. package/src/FormBuilder/interaction.test.tsx +40 -0
  172. package/src/FormBuilder/scenarios.test.tsx +2775 -0
  173. package/src/FormContext.tsx +7 -3
  174. package/src/MultiplicityField/MultiplicityField.stories.js +9 -6
  175. package/src/MultiplicityField/__stories__/Default.tsx +1 -1
  176. package/src/MultiplicityField/__stories__/PreviewDisplay.tsx +2 -4
  177. package/src/MultiplicityField/__stories__/WithExactLength.tsx +2 -2
  178. package/src/MultiplicityField/__stories__/WithMaxLength.tsx +2 -2
  179. package/src/MultiplicityField/__stories__/WithMinAndMaxLength.tsx +2 -2
  180. package/src/MultiplicityField/__stories__/WithMinLength.tsx +2 -2
  181. package/src/MultiplicityField/add-objects.tsx +39 -30
  182. package/{cjs/MultiplicityField/MultiplicityField.mdx → src/MultiplicityField/doc.mdx} +112 -98
  183. package/src/MultiplicityField/index.test.tsx +44 -0
  184. package/src/MultiplicityField/index.tsx +25 -34
  185. package/src/MultiplicityField/types.ts +25 -0
  186. package/src/Questions/Questions.stories.js +4 -1
  187. package/src/Questions/Questions.tsx +6 -6
  188. package/src/Questions/QuestionsContext.tsx +1 -1
  189. package/src/Questions/Step/Step.tsx +1 -1
  190. package/src/Questions/Step/StepArrayReview.tsx +3 -3
  191. package/src/Questions/Step/StepContext.tsx +1 -1
  192. package/src/Questions/Step/StepDescription.tsx +2 -1
  193. package/src/Questions/Step/StepForm.tsx +2 -2
  194. package/src/Questions/Step/StepQuote.tsx +2 -1
  195. package/src/Questions/Step/StepTitle.tsx +6 -3
  196. package/src/Questions/Step/getAddMoreFields.tsx +2 -2
  197. package/src/Questions/Step/index.ts +0 -1
  198. package/src/Questions/Step/types.tsx +2 -1
  199. package/src/Questions/__snapshots__/index.spec.tsx.snap +74 -587
  200. package/src/Questions/__stories__/Default.tsx +1 -1
  201. package/{Questions/index.mdx → src/Questions/doc.mdx} +34 -57
  202. package/src/Questions/getNextStep.tsx +1 -1
  203. package/src/Questions/index.spec.tsx +17 -5
  204. package/src/Questions/index.test.tsx +24 -0
  205. package/src/Questions/types.tsx +2 -1
  206. package/src/create-simple-form.mdx +2 -6
  207. package/src/{index.mdx → doc.mdx} +29 -18
  208. package/src/hooks/__tests__/useFieldFocusManager.spec.tsx +1079 -0
  209. package/src/hooks/__tests__/utils.spec.ts +568 -0
  210. package/src/hooks/useFieldFocusManager.ts +162 -0
  211. package/src/hooks/utils.ts +122 -0
  212. package/src/index.ts +4 -1
  213. package/src/inputs/AutoCompleteInput/AutoComplete.stories.js +5 -2
  214. package/src/inputs/AutoCompleteInput/__stories__/Default.tsx +3 -11
  215. package/src/inputs/AutoCompleteInput/__stories__/Multiple.tsx +2 -9
  216. package/{cjs/inputs/AutoCompleteInput/index.mdx → src/inputs/AutoCompleteInput/doc.mdx} +2 -13
  217. package/src/inputs/AutoCompleteInput/index.test.tsx +28 -0
  218. package/src/inputs/AutoCompleteInput/index.tsx +40 -35
  219. package/src/inputs/Checkboxes/Checkboxes.stories.js +6 -3
  220. package/src/inputs/Checkboxes/__stories__/Conditional.tsx +1 -1
  221. package/src/inputs/Checkboxes/__stories__/Default.tsx +1 -1
  222. package/src/inputs/Checkboxes/__stories__/WithDivider.tsx +1 -1
  223. package/src/inputs/Checkboxes/{index.mdx → doc.mdx} +5 -15
  224. package/src/inputs/Checkboxes/index.test.tsx +32 -0
  225. package/src/inputs/Checkboxes/index.tsx +106 -92
  226. package/src/inputs/DateInput/DateInput.stories.js +8 -1
  227. package/src/inputs/DateInput/__stories__/Default.tsx +17 -16
  228. package/src/inputs/DateInput/__stories__/WithDefaultValue.tsx +26 -0
  229. package/src/inputs/DateInput/__stories__/WithInitialValue.tsx +28 -0
  230. package/src/inputs/DateInput/__stories__/WithWrongDefaultValue.tsx +26 -0
  231. package/src/inputs/DateInput/__stories__/WithWrongInitialValue.tsx +28 -0
  232. package/src/inputs/DateInput/{index.mdx → doc.mdx} +1 -8
  233. package/src/inputs/DateInput/index.test.tsx +40 -0
  234. package/src/inputs/DateInput/index.tsx +77 -27
  235. package/src/inputs/DateTimeInput/DateTimeInput.stories.js +14 -0
  236. package/src/inputs/DateTimeInput/__stories__/Default.tsx +25 -0
  237. package/src/inputs/DateTimeInput/__stories__/WithDefaultValue.tsx +26 -0
  238. package/src/inputs/DateTimeInput/__stories__/WithInitialValue.tsx +28 -0
  239. package/src/inputs/DateTimeInput/__stories__/WithWrongDefaultValue.tsx +26 -0
  240. package/src/inputs/DateTimeInput/__stories__/WithWrongInitialValue.tsx +28 -0
  241. package/src/inputs/DateTimeInput/doc.mdx +16 -0
  242. package/src/inputs/DateTimeInput/index.test.tsx +40 -0
  243. package/src/inputs/DateTimeInput/index.tsx +246 -0
  244. package/src/inputs/FileInput/FileInput.stories.js +5 -1
  245. package/src/inputs/FileInput/__stories__/Default.tsx +1 -1
  246. package/src/inputs/FileInput/__stories__/WithBorderAndLink.tsx +34 -0
  247. package/{inputs/FileInput/index.mdx → src/inputs/FileInput/doc.mdx} +1 -5
  248. package/src/inputs/FileInput/index.test.tsx +28 -0
  249. package/src/inputs/FileInput/index.tsx +102 -43
  250. package/src/inputs/ImageInput/ImageInput.stories.js +7 -3
  251. package/src/inputs/ImageInput/__stories__/Default.tsx +1 -1
  252. package/src/inputs/ImageInput/__stories__/{WithInvalidImageSize.tsx → MaxSize.tsx} +5 -3
  253. package/src/inputs/ImageInput/__stories__/WithInitialValues.tsx +45 -0
  254. package/src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx +3 -1
  255. package/src/inputs/ImageInput/__stories__/logo.d.ts +4 -0
  256. package/src/inputs/ImageInput/__stories__/logo.png +0 -0
  257. package/src/inputs/ImageInput/doc.mdx +23 -0
  258. package/src/inputs/ImageInput/index.test.tsx +36 -0
  259. package/src/inputs/ImageInput/index.tsx +105 -52
  260. package/src/inputs/Input/Input.stories.js +17 -10
  261. package/src/inputs/Input/__stories__/AFM.tsx +1 -1
  262. package/src/inputs/Input/__stories__/AMKA.tsx +23 -0
  263. package/src/inputs/Input/__stories__/Boolean.tsx +1 -1
  264. package/src/inputs/Input/__stories__/Email.tsx +23 -0
  265. package/src/inputs/Input/__stories__/IBAN.tsx +1 -1
  266. package/src/inputs/Input/__stories__/Integer.tsx +1 -1
  267. package/src/inputs/Input/__stories__/LandlineNumber.tsx +3 -2
  268. package/src/inputs/Input/__stories__/MobilePhone.tsx +2 -1
  269. package/src/inputs/Input/__stories__/PhoneNumber.tsx +2 -1
  270. package/src/inputs/Input/__stories__/PostalCode.tsx +2 -1
  271. package/src/inputs/Input/__stories__/Rate.tsx +25 -0
  272. package/src/inputs/Input/__stories__/{Default.tsx → String.tsx} +2 -2
  273. package/src/inputs/Input/__stories__/StringWithTrimValidation.tsx +26 -0
  274. package/src/inputs/Input/__stories__/{TextWithCharacterLimit.tsx → TextWithLimit.tsx} +3 -2
  275. package/src/inputs/Input/doc.mdx +56 -0
  276. package/src/inputs/Input/index.test.tsx +76 -0
  277. package/src/inputs/Input/index.tsx +55 -35
  278. package/src/inputs/Label/Label.stories.js +4 -1
  279. package/src/inputs/Label/__stories__/Default.tsx +4 -2
  280. package/src/inputs/Label/doc.mdx +14 -0
  281. package/src/inputs/Label/index.test.tsx +24 -0
  282. package/src/inputs/Label/index.tsx +4 -11
  283. package/src/inputs/OtpInput/OtpInput.stories.js +4 -1
  284. package/src/inputs/OtpInput/__stories__/Default.tsx +1 -1
  285. package/{cjs/inputs/OtpInput/index.mdx → src/inputs/OtpInput/doc.mdx} +1 -8
  286. package/src/inputs/OtpInput/index.test.tsx +24 -0
  287. package/src/inputs/OtpInput/index.tsx +45 -34
  288. package/src/inputs/Radio/Radio.stories.js +6 -3
  289. package/src/inputs/Radio/__stories__/Conditional.tsx +3 -2
  290. package/src/inputs/Radio/__stories__/Default.tsx +1 -1
  291. package/src/inputs/Radio/__stories__/WithDivider.tsx +1 -1
  292. package/{cjs/inputs/Radio/index.mdx → src/inputs/Radio/doc.mdx} +5 -15
  293. package/src/inputs/Radio/index.test.tsx +32 -0
  294. package/src/inputs/Radio/index.tsx +93 -12
  295. package/src/inputs/Select/Select.stories.js +4 -1
  296. package/src/inputs/Select/__stories__/Default.tsx +1 -1
  297. package/src/inputs/Select/{index.mdx → doc.mdx} +1 -5
  298. package/src/inputs/Select/index.test.tsx +24 -0
  299. package/src/inputs/Select/index.tsx +22 -9
  300. package/src/inputs/registry.ts +86 -0
  301. package/src/installation.mdx +2 -5
  302. package/src/internal.ts +2 -31
  303. package/src/lazy.ts +56 -0
  304. package/src/registry.ts +179 -0
  305. package/src/types.tsx +21 -65
  306. package/src/utils.ts +67 -33
  307. package/src/validators/index.ts +138 -99
  308. package/src/validators/types.ts +1 -1
  309. package/src/validators/utils/amka.ts +39 -0
  310. package/src/validators/utils/date.ts +131 -0
  311. package/src/validators/utils/datetime.ts +222 -0
  312. package/src/validators/utils/email.ts +11 -0
  313. package/src/validators/utils/file.ts +35 -19
  314. package/src/validators/utils/iban.ts +2 -2
  315. package/src/validators/utils/image.ts +2 -2
  316. package/src/validators/utils/index.ts +15 -6
  317. package/src/validators/utils/int.ts +2 -2
  318. package/src/validators/utils/number.ts +2 -2
  319. package/src/validators/utils/otp.ts +2 -2
  320. package/src/validators/utils/phone.ts +65 -74
  321. package/src/validators/utils/postal_code.ts +3 -3
  322. package/src/validators/utils/text_limit.ts +2 -2
  323. package/src/validators/utils/uuid4.ts +2 -1
  324. package/src/validators/validators.spec.ts +6 -40
  325. package/types.d.ts +14 -37
  326. package/types.js +1 -0
  327. package/utils.d.ts +4 -1
  328. package/utils.js +56 -0
  329. package/validators/index.d.ts +6 -6
  330. package/validators/index.js +115 -180
  331. package/validators/types.d.ts +1 -1
  332. package/validators/types.js +0 -0
  333. package/validators/utils/afm.js +19 -0
  334. package/validators/utils/amka.d.ts +6 -0
  335. package/validators/utils/amka.js +27 -0
  336. package/validators/utils/date.d.ts +9 -0
  337. package/validators/utils/date.js +95 -0
  338. package/validators/utils/datetime.d.ts +9 -0
  339. package/validators/utils/datetime.js +121 -0
  340. package/validators/utils/email.d.ts +5 -0
  341. package/validators/utils/email.js +10 -0
  342. package/validators/utils/file.d.ts +2 -2
  343. package/validators/utils/file.js +31 -0
  344. package/validators/utils/iban.d.ts +2 -2
  345. package/validators/utils/iban.js +104 -0
  346. package/validators/utils/image.d.ts +2 -2
  347. package/validators/utils/image.js +65 -0
  348. package/validators/utils/index.d.ts +14 -11
  349. package/validators/utils/index.js +62 -85
  350. package/validators/utils/int.d.ts +1 -1
  351. package/validators/utils/int.js +13 -0
  352. package/validators/utils/number.d.ts +1 -1
  353. package/validators/utils/number.js +12 -0
  354. package/validators/utils/otp.d.ts +2 -2
  355. package/validators/utils/otp.js +21 -0
  356. package/validators/utils/phone.d.ts +3 -3
  357. package/validators/utils/phone.js +198 -0
  358. package/validators/utils/postal_code.d.ts +3 -3
  359. package/validators/utils/postal_code.js +18 -0
  360. package/validators/utils/text_limit.d.ts +2 -2
  361. package/validators/utils/text_limit.js +34 -0
  362. package/validators/utils/uuid4.js +14 -0
  363. package/Field/FieldBase/index.js +0 -82
  364. package/Field/FieldBase/package.json +0 -6
  365. package/Field/FieldBaseContainer/index.js +0 -40
  366. package/Field/FieldBaseContainer/package.json +0 -6
  367. package/Field/FieldConditional/index.js +0 -59
  368. package/Field/FieldConditional/package.json +0 -6
  369. package/Field/index.mdx +0 -6
  370. package/Field/package.json +0 -6
  371. package/Field/types/index.js +0 -1
  372. package/Field/types/package.json +0 -6
  373. package/Field/utils/index.js +0 -153
  374. package/Field/utils/package.json +0 -6
  375. package/Field/utils.d.ts +0 -5
  376. package/FieldArray/FieldArray.stories/index.js +0 -8
  377. package/FieldArray/FieldArray.stories/package.json +0 -6
  378. package/FieldArray/FieldArray.stories.d.ts +0 -9
  379. package/FieldArray/FieldArray.stories.playwright.json +0 -353
  380. package/FieldArray/__stories__/Default/index.js +0 -88
  381. package/FieldArray/__stories__/Default/package.json +0 -6
  382. package/FieldArray/__stories__/Default.d.ts +0 -2
  383. package/FieldArray/__stories__/WithExactLength/index.js +0 -88
  384. package/FieldArray/__stories__/WithExactLength/package.json +0 -6
  385. package/FieldArray/__stories__/WithExactLength.d.ts +0 -2
  386. package/FieldArray/package.json +0 -6
  387. package/FieldObject/package.json +0 -6
  388. package/Fieldset/FieldsetWithContext/index.js +0 -35
  389. package/Fieldset/FieldsetWithContext/package.json +0 -6
  390. package/Fieldset/package.json +0 -6
  391. package/Fieldset/types/index.js +0 -1
  392. package/Fieldset/types/package.json +0 -6
  393. package/Form.stories/index.js +0 -3
  394. package/Form.stories/package.json +0 -6
  395. package/Form.stories.d.ts +0 -4
  396. package/FormBuilder/FormBuilder/index.js +0 -152
  397. package/FormBuilder/FormBuilder/package.json +0 -6
  398. package/FormBuilder/FormBuilder.d.ts +0 -5
  399. package/FormBuilder/FormBuilder.mdx +0 -256
  400. package/FormBuilder/FormBuilder.stories/index.js +0 -7
  401. package/FormBuilder/FormBuilder.stories/package.json +0 -6
  402. package/FormBuilder/FormBuilder.stories.d.ts +0 -8
  403. package/FormBuilder/FormBuilder.stories.playwright.json +0 -52
  404. package/FormBuilder/__stories__/Default/index.js +0 -26
  405. package/FormBuilder/__stories__/Default/package.json +0 -6
  406. package/FormBuilder/__stories__/Default.d.ts +0 -3
  407. package/FormBuilder/package.json +0 -6
  408. package/FormContext/index.js +0 -5
  409. package/FormContext/package.json +0 -6
  410. package/MultiplicityField/MultiplicityField.mdx +0 -590
  411. package/MultiplicityField/MultiplicityField.stories/index.js +0 -12
  412. package/MultiplicityField/MultiplicityField.stories/package.json +0 -6
  413. package/MultiplicityField/MultiplicityField.stories.d.ts +0 -13
  414. package/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
  415. package/MultiplicityField/__stories__/Default/index.js +0 -95
  416. package/MultiplicityField/__stories__/Default/package.json +0 -6
  417. package/MultiplicityField/__stories__/Default.d.ts +0 -2
  418. package/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -78
  419. package/MultiplicityField/__stories__/PreviewDisplay/package.json +0 -6
  420. package/MultiplicityField/__stories__/PreviewDisplay.d.ts +0 -2
  421. package/MultiplicityField/__stories__/WithExactLength/index.js +0 -90
  422. package/MultiplicityField/__stories__/WithExactLength/package.json +0 -6
  423. package/MultiplicityField/__stories__/WithExactLength.d.ts +0 -2
  424. package/MultiplicityField/__stories__/WithMaxLength/index.js +0 -93
  425. package/MultiplicityField/__stories__/WithMaxLength/package.json +0 -6
  426. package/MultiplicityField/__stories__/WithMaxLength.d.ts +0 -2
  427. package/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -94
  428. package/MultiplicityField/__stories__/WithMinAndMaxLength/package.json +0 -6
  429. package/MultiplicityField/__stories__/WithMinAndMaxLength.d.ts +0 -2
  430. package/MultiplicityField/__stories__/WithMinLength/index.js +0 -93
  431. package/MultiplicityField/__stories__/WithMinLength/package.json +0 -6
  432. package/MultiplicityField/__stories__/WithMinLength.d.ts +0 -2
  433. package/MultiplicityField/add-objects/index.js +0 -148
  434. package/MultiplicityField/add-objects/package.json +0 -6
  435. package/MultiplicityField/package.json +0 -6
  436. package/Questions/Questions/index.js +0 -75
  437. package/Questions/Questions/package.json +0 -6
  438. package/Questions/Questions.stories/index.js +0 -7
  439. package/Questions/Questions.stories/package.json +0 -6
  440. package/Questions/Questions.stories.d.ts +0 -8
  441. package/Questions/QuestionsContext/index.js +0 -11
  442. package/Questions/QuestionsContext/package.json +0 -6
  443. package/Questions/Step/ReviewStep/index.js +0 -50
  444. package/Questions/Step/ReviewStep/package.json +0 -6
  445. package/Questions/Step/Step/index.js +0 -62
  446. package/Questions/Step/Step/package.json +0 -6
  447. package/Questions/Step/StepArrayReview/index.js +0 -46
  448. package/Questions/Step/StepArrayReview/package.json +0 -6
  449. package/Questions/Step/StepContext/index.js +0 -27
  450. package/Questions/Step/StepContext/package.json +0 -6
  451. package/Questions/Step/StepDescription/index.js +0 -24
  452. package/Questions/Step/StepDescription/package.json +0 -6
  453. package/Questions/Step/StepForm/index.js +0 -44
  454. package/Questions/Step/StepForm/package.json +0 -6
  455. package/Questions/Step/StepQuote/index.js +0 -10
  456. package/Questions/Step/StepQuote/package.json +0 -6
  457. package/Questions/Step/StepTitle/index.js +0 -41
  458. package/Questions/Step/StepTitle/package.json +0 -6
  459. package/Questions/Step/getAddMoreFields/index.js +0 -21
  460. package/Questions/Step/getAddMoreFields/package.json +0 -6
  461. package/Questions/Step/package.json +0 -6
  462. package/Questions/Step/types/index.js +0 -1
  463. package/Questions/Step/types/package.json +0 -6
  464. package/Questions/__snapshots__/index.spec.tsx.snap +0 -596
  465. package/Questions/__stories__/Default/index.js +0 -102
  466. package/Questions/__stories__/Default/package.json +0 -6
  467. package/Questions/__stories__/Default.d.ts +0 -3
  468. package/Questions/getNextStep/index.js +0 -20
  469. package/Questions/getNextStep/package.json +0 -6
  470. package/Questions/index.spec/index.js +0 -59
  471. package/Questions/index.spec/package.json +0 -6
  472. package/Questions/index.spec.d.ts +0 -1
  473. package/Questions/package.json +0 -6
  474. package/Questions/types/index.js +0 -1
  475. package/Questions/types/package.json +0 -6
  476. package/cjs/Field/FieldBase/index.js +0 -89
  477. package/cjs/Field/FieldBaseContainer/index.js +0 -47
  478. package/cjs/Field/FieldConditional/index.js +0 -66
  479. package/cjs/Field/index.js +0 -80
  480. package/cjs/Field/index.mdx +0 -6
  481. package/cjs/Field/types/index.js +0 -5
  482. package/cjs/Field/utils/index.js +0 -162
  483. package/cjs/FieldArray/FieldArray.stories/index.js +0 -38
  484. package/cjs/FieldArray/FieldArray.stories.playwright.json +0 -353
  485. package/cjs/FieldArray/__stories__/Default/index.js +0 -98
  486. package/cjs/FieldArray/__stories__/WithExactLength/index.js +0 -98
  487. package/cjs/FieldArray/index.js +0 -68
  488. package/cjs/FieldObject/index.js +0 -64
  489. package/cjs/Fieldset/FieldsetWithContext/index.js +0 -45
  490. package/cjs/Fieldset/index.js +0 -44
  491. package/cjs/Fieldset/types/index.js +0 -5
  492. package/cjs/Form.stories/index.js +0 -9
  493. package/cjs/FormBuilder/FormBuilder/index.js +0 -162
  494. package/cjs/FormBuilder/FormBuilder.mdx +0 -256
  495. package/cjs/FormBuilder/FormBuilder.stories/index.js +0 -26
  496. package/cjs/FormBuilder/FormBuilder.stories.playwright.json +0 -52
  497. package/cjs/FormBuilder/__stories__/Default/index.js +0 -36
  498. package/cjs/FormBuilder/index.js +0 -8
  499. package/cjs/FormContext/index.js +0 -11
  500. package/cjs/MultiplicityField/MultiplicityField.stories/index.js +0 -86
  501. package/cjs/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
  502. package/cjs/MultiplicityField/__stories__/Default/index.js +0 -105
  503. package/cjs/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -88
  504. package/cjs/MultiplicityField/__stories__/WithExactLength/index.js +0 -100
  505. package/cjs/MultiplicityField/__stories__/WithMaxLength/index.js +0 -103
  506. package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -104
  507. package/cjs/MultiplicityField/__stories__/WithMinLength/index.js +0 -103
  508. package/cjs/MultiplicityField/add-objects/index.js +0 -155
  509. package/cjs/MultiplicityField/index.js +0 -123
  510. package/cjs/Questions/Questions/index.js +0 -85
  511. package/cjs/Questions/Questions.stories/index.js +0 -26
  512. package/cjs/Questions/QuestionsContext/index.js +0 -17
  513. package/cjs/Questions/Step/ReviewStep/index.js +0 -60
  514. package/cjs/Questions/Step/Step/index.js +0 -72
  515. package/cjs/Questions/Step/StepArrayReview/index.js +0 -56
  516. package/cjs/Questions/Step/StepContext/index.js +0 -33
  517. package/cjs/Questions/Step/StepDescription/index.js +0 -34
  518. package/cjs/Questions/Step/StepForm/index.js +0 -54
  519. package/cjs/Questions/Step/StepQuote/index.js +0 -17
  520. package/cjs/Questions/Step/StepTitle/index.js +0 -51
  521. package/cjs/Questions/Step/getAddMoreFields/index.js +0 -27
  522. package/cjs/Questions/Step/index.js +0 -143
  523. package/cjs/Questions/Step/types/index.js +0 -5
  524. package/cjs/Questions/__snapshots__/index.spec.tsx.snap +0 -596
  525. package/cjs/Questions/__stories__/Default/index.js +0 -113
  526. package/cjs/Questions/getNextStep/index.js +0 -26
  527. package/cjs/Questions/index.js +0 -21
  528. package/cjs/Questions/index.mdx +0 -415
  529. package/cjs/Questions/index.spec/index.js +0 -63
  530. package/cjs/Questions/types/index.js +0 -5
  531. package/cjs/create-simple-form.mdx +0 -539
  532. package/cjs/index.js +0 -22
  533. package/cjs/index.mdx +0 -51
  534. package/cjs/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -38
  535. package/cjs/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -51
  536. package/cjs/inputs/AutoCompleteInput/__stories__/Multiple/index.js +0 -52
  537. package/cjs/inputs/AutoCompleteInput/index.js +0 -66
  538. package/cjs/inputs/Checkboxes/Checkboxes.stories/index.js +0 -50
  539. package/cjs/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
  540. package/cjs/inputs/Checkboxes/__stories__/Conditional/index.js +0 -103
  541. package/cjs/inputs/Checkboxes/__stories__/Default/index.js +0 -50
  542. package/cjs/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -51
  543. package/cjs/inputs/Checkboxes/index.js +0 -101
  544. package/cjs/inputs/Checkboxes/index.mdx +0 -33
  545. package/cjs/inputs/DateInput/DateInput.stories/index.js +0 -26
  546. package/cjs/inputs/DateInput/DateInput.stories.playwright.json +0 -72
  547. package/cjs/inputs/DateInput/__stories__/Default/index.js +0 -33
  548. package/cjs/inputs/DateInput/index.js +0 -141
  549. package/cjs/inputs/DateInput/index.mdx +0 -23
  550. package/cjs/inputs/FileInput/FileInput.stories/index.js +0 -26
  551. package/cjs/inputs/FileInput/FileInput.stories.playwright.json +0 -75
  552. package/cjs/inputs/FileInput/__stories__/Default/index.js +0 -30
  553. package/cjs/inputs/FileInput/index.js +0 -68
  554. package/cjs/inputs/FileInput/index.mdx +0 -19
  555. package/cjs/inputs/ImageInput/ImageInput.stories/index.js +0 -50
  556. package/cjs/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
  557. package/cjs/inputs/ImageInput/__stories__/Default/index.js +0 -38
  558. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -46
  559. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -43
  560. package/cjs/inputs/ImageInput/index.js +0 -86
  561. package/cjs/inputs/ImageInput/index.mdx +0 -19
  562. package/cjs/inputs/Input/Input.stories/index.js +0 -134
  563. package/cjs/inputs/Input/Input.stories.playwright.json +0 -376
  564. package/cjs/inputs/Input/__stories__/AFM/index.js +0 -32
  565. package/cjs/inputs/Input/__stories__/Boolean/index.js +0 -33
  566. package/cjs/inputs/Input/__stories__/Default/index.js +0 -33
  567. package/cjs/inputs/Input/__stories__/IBAN/index.js +0 -33
  568. package/cjs/inputs/Input/__stories__/Integer/index.js +0 -41
  569. package/cjs/inputs/Input/__stories__/LandlineNumber/index.js +0 -36
  570. package/cjs/inputs/Input/__stories__/MobilePhone/index.js +0 -36
  571. package/cjs/inputs/Input/__stories__/PhoneNumber/index.js +0 -35
  572. package/cjs/inputs/Input/__stories__/PostalCode/index.js +0 -35
  573. package/cjs/inputs/Input/__stories__/TextWithCharacterLimit/index.js +0 -39
  574. package/cjs/inputs/Input/index.js +0 -76
  575. package/cjs/inputs/Input/index.mdx +0 -95
  576. package/cjs/inputs/Label/Label.stories/index.js +0 -26
  577. package/cjs/inputs/Label/Label.stories.playwright.json +0 -40
  578. package/cjs/inputs/Label/__stories__/Default/index.js +0 -37
  579. package/cjs/inputs/Label/index.js +0 -29
  580. package/cjs/inputs/OtpInput/OtpInput.stories/index.js +0 -26
  581. package/cjs/inputs/OtpInput/__stories__/Default/index.js +0 -39
  582. package/cjs/inputs/OtpInput/index.js +0 -151
  583. package/cjs/inputs/Radio/Radio.stories/index.js +0 -50
  584. package/cjs/inputs/Radio/Radio.stories.playwright.json +0 -73
  585. package/cjs/inputs/Radio/__stories__/Conditional/index.js +0 -103
  586. package/cjs/inputs/Radio/__stories__/Default/index.js +0 -55
  587. package/cjs/inputs/Radio/__stories__/WithDivider/index.js +0 -56
  588. package/cjs/inputs/Radio/index.js +0 -64
  589. package/cjs/inputs/Select/Select.stories/index.js +0 -26
  590. package/cjs/inputs/Select/Select.stories.playwright.json +0 -22
  591. package/cjs/inputs/Select/__stories__/Default/index.js +0 -61
  592. package/cjs/inputs/Select/index.js +0 -38
  593. package/cjs/inputs/Select/index.mdx +0 -17
  594. package/cjs/inputs/index.js +0 -69
  595. package/cjs/installation.mdx +0 -68
  596. package/cjs/internal/index.js +0 -348
  597. package/cjs/lazy/index.js +0 -517
  598. package/cjs/registry/index.js +0 -147
  599. package/cjs/types/index.js +0 -5
  600. package/cjs/utils/index.js +0 -87
  601. package/cjs/validators/index.js +0 -193
  602. package/cjs/validators/types/index.js +0 -5
  603. package/cjs/validators/utils/afm/index.js +0 -38
  604. package/cjs/validators/utils/file/index.js +0 -43
  605. package/cjs/validators/utils/iban/index.js +0 -123
  606. package/cjs/validators/utils/image/index.js +0 -126
  607. package/cjs/validators/utils/index.js +0 -204
  608. package/cjs/validators/utils/int/index.js +0 -26
  609. package/cjs/validators/utils/number/index.js +0 -22
  610. package/cjs/validators/utils/otp/index.js +0 -32
  611. package/cjs/validators/utils/phone/index.js +0 -143
  612. package/cjs/validators/utils/postal_code/index.js +0 -34
  613. package/cjs/validators/utils/text_limit/index.js +0 -54
  614. package/cjs/validators/utils/uuid4/index.js +0 -25
  615. package/cjs/validators/validators.spec/index.js +0 -87
  616. package/create-simple-form.mdx +0 -539
  617. package/index.mdx +0 -51
  618. package/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -8
  619. package/inputs/AutoCompleteInput/AutoComplete.stories/package.json +0 -6
  620. package/inputs/AutoCompleteInput/AutoComplete.stories.d.ts +0 -9
  621. package/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -44
  622. package/inputs/AutoCompleteInput/__stories__/Default/package.json +0 -6
  623. package/inputs/AutoCompleteInput/__stories__/Default.d.ts +0 -3
  624. package/inputs/AutoCompleteInput/__stories__/Multiple/index.js +0 -45
  625. package/inputs/AutoCompleteInput/__stories__/Multiple/package.json +0 -6
  626. package/inputs/AutoCompleteInput/__stories__/Multiple.d.ts +0 -3
  627. package/inputs/AutoCompleteInput/index.mdx +0 -29
  628. package/inputs/AutoCompleteInput/package.json +0 -6
  629. package/inputs/Checkboxes/Checkboxes.stories/index.js +0 -9
  630. package/inputs/Checkboxes/Checkboxes.stories/package.json +0 -6
  631. package/inputs/Checkboxes/Checkboxes.stories.d.ts +0 -10
  632. package/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
  633. package/inputs/Checkboxes/__stories__/Conditional/index.js +0 -93
  634. package/inputs/Checkboxes/__stories__/Conditional/package.json +0 -6
  635. package/inputs/Checkboxes/__stories__/Conditional.d.ts +0 -3
  636. package/inputs/Checkboxes/__stories__/Default/index.js +0 -40
  637. package/inputs/Checkboxes/__stories__/Default/package.json +0 -6
  638. package/inputs/Checkboxes/__stories__/Default.d.ts +0 -3
  639. package/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -41
  640. package/inputs/Checkboxes/__stories__/WithDivider/package.json +0 -6
  641. package/inputs/Checkboxes/__stories__/WithDivider.d.ts +0 -3
  642. package/inputs/Checkboxes/index.mdx +0 -33
  643. package/inputs/Checkboxes/package.json +0 -6
  644. package/inputs/DateInput/DateInput.stories/index.js +0 -7
  645. package/inputs/DateInput/DateInput.stories/package.json +0 -6
  646. package/inputs/DateInput/DateInput.stories.d.ts +0 -8
  647. package/inputs/DateInput/DateInput.stories.playwright.json +0 -72
  648. package/inputs/DateInput/__stories__/Default/index.js +0 -23
  649. package/inputs/DateInput/__stories__/Default/package.json +0 -6
  650. package/inputs/DateInput/__stories__/Default.d.ts +0 -3
  651. package/inputs/DateInput/index.mdx +0 -23
  652. package/inputs/DateInput/package.json +0 -6
  653. package/inputs/FileInput/FileInput.stories/index.js +0 -7
  654. package/inputs/FileInput/FileInput.stories/package.json +0 -6
  655. package/inputs/FileInput/FileInput.stories.d.ts +0 -8
  656. package/inputs/FileInput/FileInput.stories.playwright.json +0 -75
  657. package/inputs/FileInput/__stories__/Default/index.js +0 -20
  658. package/inputs/FileInput/__stories__/Default/package.json +0 -6
  659. package/inputs/FileInput/__stories__/Default.d.ts +0 -3
  660. package/inputs/FileInput/package.json +0 -6
  661. package/inputs/ImageInput/ImageInput.stories/index.js +0 -9
  662. package/inputs/ImageInput/ImageInput.stories/package.json +0 -6
  663. package/inputs/ImageInput/ImageInput.stories.d.ts +0 -10
  664. package/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
  665. package/inputs/ImageInput/__stories__/Default/index.js +0 -28
  666. package/inputs/ImageInput/__stories__/Default/package.json +0 -6
  667. package/inputs/ImageInput/__stories__/Default.d.ts +0 -3
  668. package/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -36
  669. package/inputs/ImageInput/__stories__/WithInvalidImageDimension/package.json +0 -6
  670. package/inputs/ImageInput/__stories__/WithInvalidImageDimension.d.ts +0 -3
  671. package/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -33
  672. package/inputs/ImageInput/__stories__/WithInvalidImageSize/package.json +0 -6
  673. package/inputs/ImageInput/__stories__/WithInvalidImageSize.d.ts +0 -3
  674. package/inputs/ImageInput/index.mdx +0 -19
  675. package/inputs/ImageInput/package.json +0 -6
  676. package/inputs/Input/Input.stories/index.js +0 -16
  677. package/inputs/Input/Input.stories/package.json +0 -6
  678. package/inputs/Input/Input.stories.d.ts +0 -17
  679. package/inputs/Input/Input.stories.playwright.json +0 -376
  680. package/inputs/Input/__stories__/AFM/index.js +0 -22
  681. package/inputs/Input/__stories__/AFM/package.json +0 -6
  682. package/inputs/Input/__stories__/AFM.d.ts +0 -3
  683. package/inputs/Input/__stories__/Boolean/index.js +0 -23
  684. package/inputs/Input/__stories__/Boolean/package.json +0 -6
  685. package/inputs/Input/__stories__/Boolean.d.ts +0 -3
  686. package/inputs/Input/__stories__/Default/index.js +0 -23
  687. package/inputs/Input/__stories__/Default/package.json +0 -6
  688. package/inputs/Input/__stories__/Default.d.ts +0 -3
  689. package/inputs/Input/__stories__/IBAN/index.js +0 -23
  690. package/inputs/Input/__stories__/IBAN/package.json +0 -6
  691. package/inputs/Input/__stories__/IBAN.d.ts +0 -3
  692. package/inputs/Input/__stories__/Integer/index.js +0 -31
  693. package/inputs/Input/__stories__/Integer/package.json +0 -6
  694. package/inputs/Input/__stories__/Integer.d.ts +0 -3
  695. package/inputs/Input/__stories__/LandlineNumber/index.js +0 -26
  696. package/inputs/Input/__stories__/LandlineNumber/package.json +0 -6
  697. package/inputs/Input/__stories__/LandlineNumber.d.ts +0 -3
  698. package/inputs/Input/__stories__/MobilePhone/index.js +0 -26
  699. package/inputs/Input/__stories__/MobilePhone/package.json +0 -6
  700. package/inputs/Input/__stories__/MobilePhone.d.ts +0 -3
  701. package/inputs/Input/__stories__/PhoneNumber/index.js +0 -25
  702. package/inputs/Input/__stories__/PhoneNumber/package.json +0 -6
  703. package/inputs/Input/__stories__/PhoneNumber.d.ts +0 -3
  704. package/inputs/Input/__stories__/PostalCode/index.js +0 -25
  705. package/inputs/Input/__stories__/PostalCode/package.json +0 -6
  706. package/inputs/Input/__stories__/PostalCode.d.ts +0 -3
  707. package/inputs/Input/__stories__/TextWithCharacterLimit/index.js +0 -29
  708. package/inputs/Input/__stories__/TextWithCharacterLimit/package.json +0 -6
  709. package/inputs/Input/__stories__/TextWithCharacterLimit.d.ts +0 -3
  710. package/inputs/Input/index.mdx +0 -95
  711. package/inputs/Input/package.json +0 -6
  712. package/inputs/Label/Label.stories/index.js +0 -7
  713. package/inputs/Label/Label.stories/package.json +0 -6
  714. package/inputs/Label/Label.stories.d.ts +0 -8
  715. package/inputs/Label/Label.stories.playwright.json +0 -40
  716. package/inputs/Label/__stories__/Default/index.js +0 -27
  717. package/inputs/Label/__stories__/Default/package.json +0 -6
  718. package/inputs/Label/__stories__/Default.d.ts +0 -3
  719. package/inputs/Label/package.json +0 -6
  720. package/inputs/OtpInput/OtpInput.stories/index.js +0 -7
  721. package/inputs/OtpInput/OtpInput.stories/package.json +0 -6
  722. package/inputs/OtpInput/OtpInput.stories.d.ts +0 -8
  723. package/inputs/OtpInput/__stories__/Default/index.js +0 -29
  724. package/inputs/OtpInput/__stories__/Default/package.json +0 -6
  725. package/inputs/OtpInput/__stories__/Default.d.ts +0 -3
  726. package/inputs/OtpInput/index.mdx +0 -23
  727. package/inputs/OtpInput/package.json +0 -6
  728. package/inputs/Radio/Radio.stories/index.js +0 -9
  729. package/inputs/Radio/Radio.stories/package.json +0 -6
  730. package/inputs/Radio/Radio.stories.d.ts +0 -10
  731. package/inputs/Radio/Radio.stories.playwright.json +0 -73
  732. package/inputs/Radio/__stories__/Conditional/index.js +0 -93
  733. package/inputs/Radio/__stories__/Conditional/package.json +0 -6
  734. package/inputs/Radio/__stories__/Conditional.d.ts +0 -3
  735. package/inputs/Radio/__stories__/Default/index.js +0 -45
  736. package/inputs/Radio/__stories__/Default/package.json +0 -6
  737. package/inputs/Radio/__stories__/Default.d.ts +0 -3
  738. package/inputs/Radio/__stories__/WithDivider/index.js +0 -46
  739. package/inputs/Radio/__stories__/WithDivider/package.json +0 -6
  740. package/inputs/Radio/__stories__/WithDivider.d.ts +0 -3
  741. package/inputs/Radio/index.mdx +0 -33
  742. package/inputs/Radio/package.json +0 -6
  743. package/inputs/Select/Select.stories/index.js +0 -7
  744. package/inputs/Select/Select.stories/package.json +0 -6
  745. package/inputs/Select/Select.stories.d.ts +0 -8
  746. package/inputs/Select/Select.stories.playwright.json +0 -22
  747. package/inputs/Select/__stories__/Default/index.js +0 -51
  748. package/inputs/Select/__stories__/Default/package.json +0 -6
  749. package/inputs/Select/__stories__/Default.d.ts +0 -3
  750. package/inputs/Select/index.mdx +0 -17
  751. package/inputs/Select/package.json +0 -6
  752. package/inputs/package.json +0 -6
  753. package/installation.mdx +0 -68
  754. package/internal/index.js +0 -34
  755. package/internal/package.json +0 -6
  756. package/lazy/index.js +0 -395
  757. package/lazy/package.json +0 -6
  758. package/registry/index.js +0 -138
  759. package/registry/package.json +0 -6
  760. package/src/Field/index.mdx +0 -6
  761. package/src/Field/utils.ts +0 -191
  762. package/src/FieldArray/FieldArray.stories.playwright.json +0 -353
  763. package/src/FormBuilder/FormBuilder.stories.playwright.json +0 -52
  764. package/src/FormBuilder/FormBuilder.tsx +0 -166
  765. package/src/MultiplicityField/MultiplicityField.mdx +0 -590
  766. package/src/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
  767. package/src/Questions/index.mdx +0 -415
  768. package/src/inputs/AutoCompleteInput/index.mdx +0 -29
  769. package/src/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
  770. package/src/inputs/DateInput/DateInput.stories.playwright.json +0 -72
  771. package/src/inputs/FileInput/FileInput.stories.playwright.json +0 -75
  772. package/src/inputs/FileInput/index.mdx +0 -19
  773. package/src/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
  774. package/src/inputs/ImageInput/index.mdx +0 -19
  775. package/src/inputs/Input/Input.stories.playwright.json +0 -376
  776. package/src/inputs/Input/index.mdx +0 -95
  777. package/src/inputs/Label/Label.stories.playwright.json +0 -40
  778. package/src/inputs/OtpInput/index.mdx +0 -23
  779. package/src/inputs/Radio/Radio.stories.playwright.json +0 -73
  780. package/src/inputs/Radio/index.mdx +0 -33
  781. package/src/inputs/Select/Select.stories.playwright.json +0 -22
  782. package/src/lazy.js +0 -60
  783. package/src/registry.js +0 -145
  784. package/types/index.js +0 -1
  785. package/types/package.json +0 -6
  786. package/utils/index.js +0 -80
  787. package/utils/package.json +0 -6
  788. package/validators/package.json +0 -6
  789. package/validators/types/index.js +0 -1
  790. package/validators/types/package.json +0 -6
  791. package/validators/utils/afm/index.js +0 -31
  792. package/validators/utils/afm/package.json +0 -6
  793. package/validators/utils/file/index.js +0 -37
  794. package/validators/utils/file/package.json +0 -6
  795. package/validators/utils/iban/index.js +0 -116
  796. package/validators/utils/iban/package.json +0 -6
  797. package/validators/utils/image/index.js +0 -119
  798. package/validators/utils/image/package.json +0 -6
  799. package/validators/utils/int/index.js +0 -19
  800. package/validators/utils/int/package.json +0 -6
  801. package/validators/utils/number/index.js +0 -15
  802. package/validators/utils/number/package.json +0 -6
  803. package/validators/utils/otp/index.js +0 -25
  804. package/validators/utils/otp/package.json +0 -6
  805. package/validators/utils/package.json +0 -6
  806. package/validators/utils/phone/index.js +0 -134
  807. package/validators/utils/phone/package.json +0 -6
  808. package/validators/utils/postal_code/index.js +0 -27
  809. package/validators/utils/postal_code/package.json +0 -6
  810. package/validators/utils/text_limit/index.js +0 -47
  811. package/validators/utils/text_limit/package.json +0 -6
  812. package/validators/utils/uuid4/index.js +0 -18
  813. package/validators/utils/uuid4/package.json +0 -6
  814. package/validators/validators.spec/index.js +0 -85
  815. package/validators/validators.spec/package.json +0 -6
  816. package/validators/validators.spec.d.ts +0 -1
  817. /package/{cjs/inputs/Label/index.mdx → Field/types.js} +0 -0
  818. /package/{inputs/Label/index.mdx → Fieldset/types.js} +0 -0
  819. /package/{src/inputs/Label/index.mdx → MultiplicityField/types.js} +0 -0
@@ -1,162 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.calculateField = calculateField;
8
- exports.evaluateFieldWithConditions = evaluateFieldWithConditions;
9
- exports.useField = void 0;
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
- var _react = require("react");
12
- var _FormContext = require("@digigov/form/FormContext");
13
- var _Checkboxes = _interopRequireDefault(require("@digigov/form/inputs/Checkboxes"));
14
- var _DateInput = _interopRequireDefault(require("@digigov/form/inputs/DateInput"));
15
- var _FileInput = _interopRequireDefault(require("@digigov/form/inputs/FileInput"));
16
- var _ImageInput = _interopRequireDefault(require("@digigov/form/inputs/ImageInput"));
17
- var _Input = _interopRequireDefault(require("@digigov/form/inputs/Input"));
18
- var _OtpInput = _interopRequireDefault(require("@digigov/form/inputs/OtpInput"));
19
- var _Radio = _interopRequireDefault(require("@digigov/form/inputs/Radio"));
20
- var _Select = _interopRequireDefault(require("@digigov/form/inputs/Select"));
21
- var _AutoCompleteInput = _interopRequireDefault(require("@digigov/form/inputs/AutoCompleteInput"));
22
- var FIELD_COMPONENTS = {
23
- text: {
24
- component: _Input["default"]
25
- },
26
- string: {
27
- component: _Input["default"]
28
- },
29
- file: {
30
- wrapper: 'fieldset',
31
- component: _FileInput["default"]
32
- },
33
- image: {
34
- wrapper: 'fieldset',
35
- component: _ImageInput["default"]
36
- },
37
- date: {
38
- wrapper: 'fieldset',
39
- controlled: true,
40
- component: _DateInput["default"]
41
- },
42
- otp: {
43
- wrapper: 'fieldset',
44
- controlled: true,
45
- component: _OtpInput["default"]
46
- },
47
- 'choice:multiple': {
48
- wrapper: 'fieldset',
49
- controlled: true,
50
- component: _Checkboxes["default"]
51
- },
52
- 'choice:single': {
53
- wrapper: 'fieldset',
54
- controlled: false,
55
- component: _Radio["default"]
56
- }
57
- };
58
- var ALTERNATIVE_COMPONENTS = {
59
- Select: {
60
- component: _Select["default"],
61
- controlled: false
62
- },
63
- AutoComplete: {
64
- component: _AutoCompleteInput["default"],
65
- controlled: true,
66
- wrapper: 'fieldset'
67
- }
68
- };
69
- function calculateField(children, field, componentRegistry) {
70
- var _field$extra;
71
- var calculatedField = (0, _extends2["default"])({}, field);
72
- var fieldComponentRegistry = (0, _extends2["default"])({}, FIELD_COMPONENTS, componentRegistry);
73
- if (children) {
74
- calculatedField.component = children;
75
- calculatedField.controlled = true;
76
- } else if (typeof field.component === 'function') {
77
- // leave as is
78
- } else if (!field.component && !field.type) {
79
- var _fieldComponentRegist;
80
- calculatedField.component = fieldComponentRegistry.string.component;
81
- calculatedField.controlled = ((_fieldComponentRegist = fieldComponentRegistry.string) === null || _fieldComponentRegist === void 0 ? void 0 : _fieldComponentRegist.controlled) || false;
82
- } else if (typeof (field === null || field === void 0 ? void 0 : (_field$extra = field.extra) === null || _field$extra === void 0 ? void 0 : _field$extra.component) === 'string' && ALTERNATIVE_COMPONENTS[field.extra.component]) {
83
- var _ALTERNATIVE_COMPONEN;
84
- calculatedField.controlled = ((_ALTERNATIVE_COMPONEN = ALTERNATIVE_COMPONENTS[field.extra.component]) === null || _ALTERNATIVE_COMPONEN === void 0 ? void 0 : _ALTERNATIVE_COMPONEN.controlled) || false;
85
- calculatedField.component = ALTERNATIVE_COMPONENTS[field.extra.component].component;
86
- calculatedField.wrapper = ALTERNATIVE_COMPONENTS[field.extra.component].wrapper;
87
- } else if (!field.component && field.type && fieldComponentRegistry[field.type]) {
88
- var _fieldComponentRegist2;
89
- calculatedField.component = fieldComponentRegistry[field.type].component;
90
- calculatedField.wrapper = fieldComponentRegistry[field.type].wrapper;
91
- calculatedField.controlled = ((_fieldComponentRegist2 = fieldComponentRegistry[field.type]) === null || _fieldComponentRegist2 === void 0 ? void 0 : _fieldComponentRegist2.controlled) || false;
92
- } else {
93
- var _fieldComponentRegist3;
94
- calculatedField.component = fieldComponentRegistry.string.component;
95
- calculatedField.controlled = ((_fieldComponentRegist3 = fieldComponentRegistry.string) === null || _fieldComponentRegist3 === void 0 ? void 0 : _fieldComponentRegist3.controlled) || false;
96
- }
97
- return calculatedField;
98
- }
99
- var useField = exports.useField = function useField(name, customField) {
100
- var _useContext = (0, _react.useContext)(_FormContext.FormContext),
101
- fieldsMap = _useContext.fieldsMap,
102
- control = _useContext.control,
103
- register = _useContext.register,
104
- reset = _useContext.reset,
105
- trigger = _useContext.trigger,
106
- clearErrors = _useContext.clearErrors,
107
- errors = _useContext.errors,
108
- registerField = _useContext.registerField,
109
- watch = _useContext.watch,
110
- componentRegistry = _useContext.componentRegistry,
111
- getFieldState = _useContext.getFieldState,
112
- setValue = _useContext.setValue,
113
- getValues = _useContext.getValues,
114
- unregister = _useContext.unregister,
115
- formState = _useContext.formState;
116
- if (!registerField) {
117
- throw new Error("\n You can't use the Field component without wrapping it in FormBuilder.\n https://devs.pages.grnet.gr/digigov/digigov-sdk/sdk-docs/forms/create-simple-form/\n ");
118
- }
119
- (0, _react.useMemo)(function () {
120
- return (customField === null || customField === void 0 ? void 0 : customField.type) && registerField((0, _extends2["default"])({}, customField, {
121
- key: name
122
- }));
123
- }, [customField, name, registerField]);
124
- return {
125
- field: customField || fieldsMap[name],
126
- control: control,
127
- register: register,
128
- reset: reset,
129
- trigger: trigger,
130
- watch: watch,
131
- componentRegistry: componentRegistry,
132
- getFieldState: getFieldState,
133
- setValue: setValue,
134
- clearErrors: clearErrors,
135
- getValues: getValues,
136
- unregister: unregister,
137
- formState: formState,
138
- error: errors[name]
139
- };
140
- };
141
- function evaluateFieldWithConditions(field, variables) {
142
- var newField = (0, _extends2["default"])({}, field);
143
- if (variables) {
144
- for (var key in variables) {
145
- if (field.condition[key] && field.condition[key].is) {
146
- var is = field.condition[key].is;
147
- if (is === variables[key] || Array.isArray(variables[key]) && variables[key].includes(is)) {
148
- var then = field.condition[key].then || {};
149
- for (var attr in then) {
150
- newField[attr] = then[attr];
151
- }
152
- }
153
- } else if (field.condition[key]) {
154
- var otherwise = field.condition[key]["else"] || {};
155
- for (var _attr in otherwise) {
156
- newField[_attr] = otherwise[_attr];
157
- }
158
- }
159
- }
160
- }
161
- return newField;
162
- }
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- var _exportNames = {};
8
- exports["default"] = void 0;
9
- var _FieldArray = _interopRequireDefault(require("@digigov/form/FieldArray"));
10
- var _Default = require("@digigov/form/FieldArray/__stories__/Default");
11
- Object.keys(_Default).forEach(function (key) {
12
- if (key === "default" || key === "__esModule") return;
13
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
14
- if (key in exports && exports[key] === _Default[key]) return;
15
- Object.defineProperty(exports, key, {
16
- enumerable: true,
17
- get: function get() {
18
- return _Default[key];
19
- }
20
- });
21
- });
22
- var _WithExactLength = require("@digigov/form/FieldArray/__stories__/WithExactLength");
23
- Object.keys(_WithExactLength).forEach(function (key) {
24
- if (key === "default" || key === "__esModule") return;
25
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
26
- if (key in exports && exports[key] === _WithExactLength[key]) return;
27
- Object.defineProperty(exports, key, {
28
- enumerable: true,
29
- get: function get() {
30
- return _WithExactLength[key];
31
- }
32
- });
33
- });
34
- var _default = exports["default"] = {
35
- title: 'Digigov Form/FieldArray',
36
- component: _FieldArray["default"],
37
- displayName: 'FieldArray'
38
- };
@@ -1,353 +0,0 @@
1
- {
2
- "version": "4",
3
- "stories": {
4
- "digigov-form-fieldarray--default": {
5
- "actionSets": [
6
- {
7
- "actions": [
8
- {
9
- "name": "click",
10
- "args": {
11
- "selector": "text=Προσθήκη συνυπογράφοντα"
12
- }
13
- },
14
- {
15
- "name": "click",
16
- "args": {
17
- "selector": "text=Συνέχεια"
18
- }
19
- },
20
- {
21
- "name": "waitForSelector",
22
- "args": {
23
- "selector": "text=Το πεδίο πρέπει να έχει τουλάχιστον 2 εγγραφές. Προσθέστε μια ακόμα επιλέγοντας την απάντηση «Ναι» στην επόμενη ερώτηση.",
24
- "options": {
25
- "state": "visible"
26
- }
27
- }
28
- },
29
- {
30
- "name": "click",
31
- "args": {
32
- "selector": "text=Προσθήκη συνυπογράφοντα",
33
- "options": {
34
- "clickCount": 2
35
- }
36
- }
37
- },
38
- {
39
- "name": "click",
40
- "args": {
41
- "selector": "text=Συνέχεια"
42
- }
43
- },
44
- {
45
- "name": "waitForSelector",
46
- "args": {
47
- "selector": "text=Το πεδίο είναι υποχρεωτικό.",
48
- "options": {
49
- "state": "visible"
50
- }
51
- }
52
- },
53
- {
54
- "name": "type",
55
- "args": {
56
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
57
- "text": "2107474274"
58
- }
59
- },
60
- {
61
- "name": "click",
62
- "args": {
63
- "selector": "html>body>div:nth-child(5)>form>button"
64
- }
65
- }
66
- ],
67
- "id": "iMmV-vvS4iNn",
68
- "title": "Add new items to FieldArray"
69
- },
70
- {
71
- "actions": [
72
- {
73
- "name": "click",
74
- "args": {
75
- "selector": "html>body>div:nth-child(5)>form>button"
76
- }
77
- }
78
- ],
79
- "id": "Lhj8o_MByws7",
80
- "title": "Validation errors"
81
- },
82
- {
83
- "actions": [
84
- {
85
- "name": "type",
86
- "args": {
87
- "selector": "html>body",
88
- "text": "hello"
89
- }
90
- },
91
- {
92
- "name": "click",
93
- "args": {
94
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
95
- }
96
- },
97
- {
98
- "name": "type",
99
- "args": {
100
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(1)>label>input",
101
- "text": "150000496"
102
- }
103
- },
104
- {
105
- "name": "type",
106
- "args": {
107
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(2)>label>input",
108
- "text": "Jon"
109
- }
110
- },
111
- {
112
- "name": "type",
113
- "args": {
114
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(3)>label>input",
115
- "text": "Doe"
116
- }
117
- },
118
- {
119
- "name": "click",
120
- "args": {
121
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
122
- }
123
- },
124
- {
125
- "name": "type",
126
- "args": {
127
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(1)>label>input",
128
- "text": "150000496"
129
- }
130
- },
131
- {
132
- "name": "type",
133
- "args": {
134
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(2)>label>input",
135
- "text": "Mar"
136
- }
137
- },
138
- {
139
- "name": "type",
140
- "args": {
141
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(3)>label>input",
142
- "text": "P"
143
- }
144
- },
145
- {
146
- "name": "type",
147
- "args": {
148
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
149
- "text": "6977777777"
150
- }
151
- },
152
- {
153
- "name": "click",
154
- "args": {
155
- "selector": "html>body>div:nth-child(5)>form>button"
156
- }
157
- }
158
- ],
159
- "id": "OCWrR7oFA3YV",
160
- "title": "add 2 items"
161
- },
162
- {
163
- "actions": [
164
- {
165
- "name": "type",
166
- "args": {
167
- "selector": "html>body",
168
- "text": "hello"
169
- }
170
- },
171
- {
172
- "name": "click",
173
- "args": {
174
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
175
- }
176
- },
177
- {
178
- "name": "type",
179
- "args": {
180
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(1)>label>input",
181
- "text": "150000496"
182
- }
183
- },
184
- {
185
- "name": "type",
186
- "args": {
187
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(2)>label>input",
188
- "text": "Jon"
189
- }
190
- },
191
- {
192
- "name": "type",
193
- "args": {
194
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(3)>label>input",
195
- "text": "Doe"
196
- }
197
- },
198
- {
199
- "name": "click",
200
- "args": {
201
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
202
- }
203
- },
204
- {
205
- "name": "type",
206
- "args": {
207
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(1)>label>input",
208
- "text": "150000496"
209
- }
210
- },
211
- {
212
- "name": "type",
213
- "args": {
214
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(2)>label>input",
215
- "text": "Mar"
216
- }
217
- },
218
- {
219
- "name": "type",
220
- "args": {
221
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(3)>label>input",
222
- "text": "P"
223
- }
224
- },
225
- {
226
- "name": "click",
227
- "args": {
228
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(3)>div>fieldset>button"
229
- }
230
- },
231
- {
232
- "name": "type",
233
- "args": {
234
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
235
- "text": "6977777777"
236
- }
237
- },
238
- {
239
- "name": "click",
240
- "args": {
241
- "selector": "html>body>div:nth-child(5)>form>button"
242
- }
243
- }
244
- ],
245
- "id": "8ZxUUjo0Yxnr",
246
- "title": "add 2 items and remove 1"
247
- }
248
- ]
249
- },
250
- "digigov-form-fieldarray--with-exact-length": {
251
- "actionSets": [
252
- {
253
- "actions": [
254
- {
255
- "name": "click",
256
- "args": {
257
- "selector": "html>body>div:nth-child(5)>form>button"
258
- }
259
- },
260
- {
261
- "name": "click",
262
- "args": {
263
- "selector": "html>body>div:nth-child(5)>form>button"
264
- }
265
- }
266
- ],
267
- "id": "WG3dAbfXa-Sn",
268
- "title": "validation errors"
269
- },
270
- {
271
- "actions": [
272
- {
273
- "name": "type",
274
- "args": {
275
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(1)>label>input",
276
- "text": "Hello"
277
- }
278
- },
279
- {
280
- "name": "click",
281
- "args": {
282
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
283
- }
284
- },
285
- {
286
- "name": "type",
287
- "args": {
288
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(1)>label>input",
289
- "text": "150000496"
290
- }
291
- },
292
- {
293
- "name": "type",
294
- "args": {
295
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(2)>label>input",
296
- "text": "Μάρω"
297
- }
298
- },
299
- {
300
- "name": "type",
301
- "args": {
302
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div>div>fieldset>fieldset>div:nth-child(3)>label>input",
303
- "text": "Μενεξέ"
304
- }
305
- },
306
- {
307
- "name": "click",
308
- "args": {
309
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>button"
310
- }
311
- },
312
- {
313
- "name": "type",
314
- "args": {
315
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(1)>label>input",
316
- "text": "150000496"
317
- }
318
- },
319
- {
320
- "name": "type",
321
- "args": {
322
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(2)>label>input",
323
- "text": "Ηλέκτρα"
324
- }
325
- },
326
- {
327
- "name": "type",
328
- "args": {
329
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(2)>fieldset>div:nth-child(4)>div>fieldset>fieldset>div:nth-child(3)>label>input",
330
- "text": "Αποστόλου"
331
- }
332
- },
333
- {
334
- "name": "type",
335
- "args": {
336
- "selector": "html>body>div:nth-child(5)>form>div:nth-child(3)>label>input",
337
- "text": "6977654321"
338
- }
339
- },
340
- {
341
- "name": "click",
342
- "args": {
343
- "selector": "html>body>div:nth-child(5)>form>button"
344
- }
345
- }
346
- ],
347
- "id": "-U0EryxXC-g7",
348
- "title": "add exact length of items"
349
- }
350
- ]
351
- }
352
- }
353
- }
@@ -1,98 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Default = void 0;
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
- var _react = _interopRequireDefault(require("react"));
11
- var _form = _interopRequireWildcard(require("@digigov/form"));
12
- var _Button = require("@digigov/ui/cjs/form/Button");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
- var fields = [{
16
- key: 'string',
17
- type: 'string',
18
- label: {
19
- primary: 'Πεδίο κειμένου',
20
- secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
21
- }
22
- }, {
23
- key: 'multiplicity',
24
- type: 'array',
25
- label: {
26
- primary: 'Συνυπογράφοντες',
27
- secondary: 'Οι συνυπογράφοντες είναι άνθρωποι σαν και εμάς'
28
- },
29
- extra: {
30
- label: {
31
- object: {
32
- title: 'Συνυπογράφοντας',
33
- add: 'Προσθήκη συνυπογράφοντα',
34
- "delete": 'Αφαίρεση συνυπογράφοντος'
35
- },
36
- question: {
37
- title: 'Θέλετε να προσθέσετε επιπλέον συνυπογράφοντες;',
38
- objectLabel: {
39
- primary: 'Προσθήκη νέου συνυπογράφοντα',
40
- secondary: 'Συμπληρώστε τα στοιχεία και μετά πατήστε «Προσθήκη»'
41
- },
42
- yes: 'Ναι',
43
- no: 'Όχι'
44
- }
45
- },
46
- min: 2,
47
- max: 4,
48
- of: {
49
- type: 'object',
50
- extra: {
51
- fields: [{
52
- key: 'afm',
53
- type: 'afm',
54
- required: true,
55
- label: {
56
- primary: 'ΑΦΜ'
57
- }
58
- }, {
59
- key: 'firstName',
60
- required: true,
61
- type: 'string',
62
- label: {
63
- primary: 'Όνομα'
64
- }
65
- }, {
66
- key: 'lastName',
67
- required: true,
68
- type: 'string',
69
- label: {
70
- primary: 'Επώνυμο'
71
- }
72
- }]
73
- }
74
- }
75
- }
76
- }, {
77
- key: 'phonenumber',
78
- type: 'phone_number',
79
- required: true,
80
- label: {
81
- primary: 'Σταθερό τηλέφωνο',
82
- secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου'
83
- }
84
- }];
85
- var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, null, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
86
- var Default = exports.Default = function Default() {
87
- return /*#__PURE__*/_react["default"].createElement(_form["default"], {
88
- onSubmit: function onSubmit(data) {
89
- console.log(data);
90
- }
91
- }, /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
92
- name: "string"
93
- }, fields[0])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
94
- name: "multiplicity"
95
- }, fields[1])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
96
- name: "phonenumber"
97
- }, fields[2])), _ref);
98
- };