@dnb/eufemia 10.52.0 → 10.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/cjs/components/number-format/NumberUtils.js.map +1 -1
  3. package/cjs/components/progress-indicator/ProgressIndicator.js +2 -2
  4. package/cjs/components/progress-indicator/ProgressIndicator.js.map +1 -1
  5. package/cjs/components/upload/UploadVerify.js +2 -2
  6. package/cjs/components/upload/UploadVerify.js.map +1 -1
  7. package/cjs/extensions/forms/DataContext/Context.d.ts +1 -0
  8. package/cjs/extensions/forms/DataContext/Context.js.map +1 -1
  9. package/cjs/extensions/forms/DataContext/Provider/Provider.js +3 -4
  10. package/cjs/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  11. package/cjs/extensions/forms/Field/ArraySelection/ArraySelection.d.ts +5 -1
  12. package/cjs/extensions/forms/Field/ArraySelection/ArraySelection.js.map +1 -1
  13. package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumber.d.ts +3 -1
  14. package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js +51 -11
  15. package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js.map +1 -1
  16. package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.d.ts +2 -0
  17. package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.js +25 -0
  18. package/cjs/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.js.map +1 -0
  19. package/cjs/extensions/forms/Field/OrganizationNumber/OrganizationNumberDocs.js +1 -1
  20. package/cjs/extensions/forms/Field/OrganizationNumber/OrganizationNumberDocs.js.map +1 -1
  21. package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.d.ts +10 -2
  22. package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js +61 -17
  23. package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
  24. package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js +5 -0
  25. package/cjs/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js.map +1 -1
  26. package/cjs/extensions/forms/Field/Slider/Slider.js +3 -1
  27. package/cjs/extensions/forms/Field/Slider/Slider.js.map +1 -1
  28. package/cjs/extensions/forms/FieldBlock/FieldBlock.js +21 -3
  29. package/cjs/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
  30. package/cjs/extensions/forms/FieldBlock/FieldBlockDocs.js +2 -2
  31. package/cjs/extensions/forms/FieldBlock/FieldBlockDocs.js.map +1 -1
  32. package/cjs/extensions/forms/FieldBlock/style/dnb-field-block.css +6 -0
  33. package/cjs/extensions/forms/FieldBlock/style/dnb-field-block.min.css +1 -1
  34. package/cjs/extensions/forms/FieldBlock/style/dnb-field-block.scss +6 -0
  35. package/cjs/extensions/forms/Form/SubmitConfirmation/SubmitConfirmation.js +1 -1
  36. package/cjs/extensions/forms/Form/SubmitConfirmation/SubmitConfirmation.js.map +1 -1
  37. package/cjs/extensions/forms/Iterate/Array/Array.js +51 -27
  38. package/cjs/extensions/forms/Iterate/Array/Array.js.map +1 -1
  39. package/cjs/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.js +4 -12
  40. package/cjs/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
  41. package/cjs/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.js +89 -73
  42. package/cjs/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.js.map +1 -1
  43. package/cjs/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.d.ts +12 -12
  44. package/cjs/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.js +24 -24
  45. package/cjs/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.js.map +1 -1
  46. package/cjs/extensions/forms/constants/locales/en-GB.d.ts +2 -1
  47. package/cjs/extensions/forms/constants/locales/en-GB.js +3 -2
  48. package/cjs/extensions/forms/constants/locales/en-GB.js.map +1 -1
  49. package/cjs/extensions/forms/constants/locales/en-US.d.ts +2 -1
  50. package/cjs/extensions/forms/constants/locales/index.d.ts +4 -2
  51. package/cjs/extensions/forms/constants/locales/nb-NO.d.ts +2 -1
  52. package/cjs/extensions/forms/constants/locales/nb-NO.js +3 -2
  53. package/cjs/extensions/forms/constants/locales/nb-NO.js.map +1 -1
  54. package/cjs/extensions/forms/hooks/useFieldProps.d.ts +4 -2
  55. package/cjs/extensions/forms/hooks/useFieldProps.js +40 -8
  56. package/cjs/extensions/forms/hooks/useFieldProps.js.map +1 -1
  57. package/cjs/extensions/forms/hooks/useTranslation.d.ts +4 -1
  58. package/cjs/extensions/forms/hooks/useTranslation.js +6 -3
  59. package/cjs/extensions/forms/hooks/useTranslation.js.map +1 -1
  60. package/cjs/extensions/forms/hooks/useValueProps.d.ts +1 -1
  61. package/cjs/extensions/forms/hooks/useValueProps.js +2 -2
  62. package/cjs/extensions/forms/hooks/useValueProps.js.map +1 -1
  63. package/cjs/extensions/forms/style/dnb-forms.css +6 -0
  64. package/cjs/extensions/forms/style/dnb-forms.min.css +1 -1
  65. package/cjs/extensions/forms/types.d.ts +2 -1
  66. package/cjs/extensions/forms/types.js.map +1 -1
  67. package/cjs/shared/Context.d.ts +4 -4
  68. package/cjs/shared/Context.js.map +1 -1
  69. package/cjs/shared/Eufemia.d.ts +1 -1
  70. package/cjs/shared/Eufemia.js +2 -2
  71. package/cjs/shared/Eufemia.js.map +1 -1
  72. package/cjs/shared/defaults.d.ts +1 -0
  73. package/cjs/shared/defaults.js +3 -1
  74. package/cjs/shared/defaults.js.map +1 -1
  75. package/cjs/shared/useTranslation.d.ts +11 -4
  76. package/cjs/shared/useTranslation.js +68 -22
  77. package/cjs/shared/useTranslation.js.map +1 -1
  78. package/cjs/style/core/scopes.scss +1 -1
  79. package/cjs/style/dnb-ui-basis.css +1 -1
  80. package/cjs/style/dnb-ui-basis.min.css +1 -1
  81. package/cjs/style/dnb-ui-body.css +1 -1
  82. package/cjs/style/dnb-ui-body.min.css +1 -1
  83. package/cjs/style/dnb-ui-components.css +6 -0
  84. package/cjs/style/dnb-ui-components.min.css +1 -1
  85. package/cjs/style/dnb-ui-core.css +1 -1
  86. package/cjs/style/dnb-ui-core.min.css +1 -1
  87. package/cjs/style/dnb-ui-extensions.css +6 -0
  88. package/cjs/style/dnb-ui-extensions.min.css +1 -1
  89. package/cjs/style/dnb-ui-forms.css +6 -0
  90. package/cjs/style/dnb-ui-forms.min.css +1 -1
  91. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +12 -0
  92. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  93. package/cjs/style/themes/theme-eiendom/eiendom-theme-extensions.css +6 -0
  94. package/cjs/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
  95. package/cjs/style/themes/theme-eiendom/eiendom-theme-forms.css +6 -0
  96. package/cjs/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
  97. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +12 -0
  98. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  99. package/cjs/style/themes/theme-sbanken/sbanken-theme-extensions.css +6 -0
  100. package/cjs/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
  101. package/cjs/style/themes/theme-sbanken/sbanken-theme-forms.css +6 -0
  102. package/cjs/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
  103. package/cjs/style/themes/theme-ui/ui-theme-components.css +12 -0
  104. package/cjs/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  105. package/cjs/style/themes/theme-ui/ui-theme-extensions.css +6 -0
  106. package/cjs/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
  107. package/cjs/style/themes/theme-ui/ui-theme-forms.css +6 -0
  108. package/cjs/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
  109. package/components/number-format/NumberUtils.js.map +1 -1
  110. package/components/progress-indicator/ProgressIndicator.js +2 -2
  111. package/components/progress-indicator/ProgressIndicator.js.map +1 -1
  112. package/components/upload/UploadVerify.js +2 -2
  113. package/components/upload/UploadVerify.js.map +1 -1
  114. package/es/components/number-format/NumberUtils.js.map +1 -1
  115. package/es/components/progress-indicator/ProgressIndicator.js +2 -2
  116. package/es/components/progress-indicator/ProgressIndicator.js.map +1 -1
  117. package/es/components/upload/UploadVerify.js +2 -2
  118. package/es/components/upload/UploadVerify.js.map +1 -1
  119. package/es/extensions/forms/DataContext/Context.d.ts +1 -0
  120. package/es/extensions/forms/DataContext/Context.js.map +1 -1
  121. package/es/extensions/forms/DataContext/Provider/Provider.js +3 -4
  122. package/es/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  123. package/es/extensions/forms/Field/ArraySelection/ArraySelection.d.ts +5 -1
  124. package/es/extensions/forms/Field/ArraySelection/ArraySelection.js.map +1 -1
  125. package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumber.d.ts +3 -1
  126. package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js +52 -12
  127. package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js.map +1 -1
  128. package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.d.ts +2 -0
  129. package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.js +18 -0
  130. package/es/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.js.map +1 -0
  131. package/es/extensions/forms/Field/OrganizationNumber/OrganizationNumberDocs.js +1 -1
  132. package/es/extensions/forms/Field/OrganizationNumber/OrganizationNumberDocs.js.map +1 -1
  133. package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.d.ts +10 -2
  134. package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js +59 -17
  135. package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
  136. package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js +5 -0
  137. package/es/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js.map +1 -1
  138. package/es/extensions/forms/Field/Slider/Slider.js +3 -1
  139. package/es/extensions/forms/Field/Slider/Slider.js.map +1 -1
  140. package/es/extensions/forms/FieldBlock/FieldBlock.js +21 -3
  141. package/es/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
  142. package/es/extensions/forms/FieldBlock/FieldBlockDocs.js +2 -2
  143. package/es/extensions/forms/FieldBlock/FieldBlockDocs.js.map +1 -1
  144. package/es/extensions/forms/FieldBlock/style/dnb-field-block.css +6 -0
  145. package/es/extensions/forms/FieldBlock/style/dnb-field-block.min.css +1 -1
  146. package/es/extensions/forms/FieldBlock/style/dnb-field-block.scss +6 -0
  147. package/es/extensions/forms/Form/SubmitConfirmation/SubmitConfirmation.js +1 -1
  148. package/es/extensions/forms/Form/SubmitConfirmation/SubmitConfirmation.js.map +1 -1
  149. package/es/extensions/forms/Iterate/Array/Array.js +52 -28
  150. package/es/extensions/forms/Iterate/Array/Array.js.map +1 -1
  151. package/es/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.js +4 -12
  152. package/es/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
  153. package/es/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.js +89 -70
  154. package/es/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.js.map +1 -1
  155. package/es/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.d.ts +12 -12
  156. package/es/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.js +24 -24
  157. package/es/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.js.map +1 -1
  158. package/es/extensions/forms/constants/locales/en-GB.d.ts +2 -1
  159. package/es/extensions/forms/constants/locales/en-GB.js +3 -2
  160. package/es/extensions/forms/constants/locales/en-GB.js.map +1 -1
  161. package/es/extensions/forms/constants/locales/en-US.d.ts +2 -1
  162. package/es/extensions/forms/constants/locales/index.d.ts +4 -2
  163. package/es/extensions/forms/constants/locales/nb-NO.d.ts +2 -1
  164. package/es/extensions/forms/constants/locales/nb-NO.js +3 -2
  165. package/es/extensions/forms/constants/locales/nb-NO.js.map +1 -1
  166. package/es/extensions/forms/hooks/useFieldProps.d.ts +4 -2
  167. package/es/extensions/forms/hooks/useFieldProps.js +40 -9
  168. package/es/extensions/forms/hooks/useFieldProps.js.map +1 -1
  169. package/es/extensions/forms/hooks/useTranslation.d.ts +4 -1
  170. package/es/extensions/forms/hooks/useTranslation.js +7 -4
  171. package/es/extensions/forms/hooks/useTranslation.js.map +1 -1
  172. package/es/extensions/forms/hooks/useValueProps.d.ts +1 -1
  173. package/es/extensions/forms/hooks/useValueProps.js +2 -2
  174. package/es/extensions/forms/hooks/useValueProps.js.map +1 -1
  175. package/es/extensions/forms/style/dnb-forms.css +6 -0
  176. package/es/extensions/forms/style/dnb-forms.min.css +1 -1
  177. package/es/extensions/forms/types.d.ts +2 -1
  178. package/es/extensions/forms/types.js.map +1 -1
  179. package/es/shared/Context.d.ts +4 -4
  180. package/es/shared/Context.js.map +1 -1
  181. package/es/shared/Eufemia.d.ts +1 -1
  182. package/es/shared/Eufemia.js +2 -2
  183. package/es/shared/Eufemia.js.map +1 -1
  184. package/es/shared/defaults.d.ts +1 -0
  185. package/es/shared/defaults.js +1 -0
  186. package/es/shared/defaults.js.map +1 -1
  187. package/es/shared/useTranslation.d.ts +11 -4
  188. package/es/shared/useTranslation.js +64 -22
  189. package/es/shared/useTranslation.js.map +1 -1
  190. package/es/style/core/scopes.scss +1 -1
  191. package/es/style/dnb-ui-basis.css +1 -1
  192. package/es/style/dnb-ui-basis.min.css +1 -1
  193. package/es/style/dnb-ui-body.css +1 -1
  194. package/es/style/dnb-ui-body.min.css +1 -1
  195. package/es/style/dnb-ui-components.css +6 -0
  196. package/es/style/dnb-ui-components.min.css +1 -1
  197. package/es/style/dnb-ui-core.css +1 -1
  198. package/es/style/dnb-ui-core.min.css +1 -1
  199. package/es/style/dnb-ui-extensions.css +6 -0
  200. package/es/style/dnb-ui-extensions.min.css +1 -1
  201. package/es/style/dnb-ui-forms.css +6 -0
  202. package/es/style/dnb-ui-forms.min.css +1 -1
  203. package/es/style/themes/theme-eiendom/eiendom-theme-components.css +12 -0
  204. package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  205. package/es/style/themes/theme-eiendom/eiendom-theme-extensions.css +6 -0
  206. package/es/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
  207. package/es/style/themes/theme-eiendom/eiendom-theme-forms.css +6 -0
  208. package/es/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
  209. package/es/style/themes/theme-sbanken/sbanken-theme-components.css +12 -0
  210. package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  211. package/es/style/themes/theme-sbanken/sbanken-theme-extensions.css +6 -0
  212. package/es/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
  213. package/es/style/themes/theme-sbanken/sbanken-theme-forms.css +6 -0
  214. package/es/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
  215. package/es/style/themes/theme-ui/ui-theme-components.css +12 -0
  216. package/es/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  217. package/es/style/themes/theme-ui/ui-theme-extensions.css +6 -0
  218. package/es/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
  219. package/es/style/themes/theme-ui/ui-theme-forms.css +6 -0
  220. package/es/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
  221. package/esm/dnb-ui-basis.min.mjs +1 -1
  222. package/esm/dnb-ui-components.min.mjs +1 -1
  223. package/esm/dnb-ui-elements.min.mjs +1 -1
  224. package/esm/dnb-ui-extensions.min.mjs +5 -5
  225. package/esm/dnb-ui-lib.min.mjs +1 -1
  226. package/extensions/forms/DataContext/Context.d.ts +1 -0
  227. package/extensions/forms/DataContext/Context.js.map +1 -1
  228. package/extensions/forms/DataContext/Provider/Provider.js +3 -4
  229. package/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  230. package/extensions/forms/Field/ArraySelection/ArraySelection.d.ts +5 -1
  231. package/extensions/forms/Field/ArraySelection/ArraySelection.js.map +1 -1
  232. package/extensions/forms/Field/BankAccountNumber/BankAccountNumber.d.ts +3 -1
  233. package/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js +52 -12
  234. package/extensions/forms/Field/BankAccountNumber/BankAccountNumber.js.map +1 -1
  235. package/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.d.ts +2 -0
  236. package/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.js +18 -0
  237. package/extensions/forms/Field/BankAccountNumber/BankAccountNumberDocs.js.map +1 -0
  238. package/extensions/forms/Field/OrganizationNumber/OrganizationNumberDocs.js +1 -1
  239. package/extensions/forms/Field/OrganizationNumber/OrganizationNumberDocs.js.map +1 -1
  240. package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.d.ts +10 -2
  241. package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js +59 -17
  242. package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
  243. package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js +5 -0
  244. package/extensions/forms/Field/PostalCodeAndCity/PostalCodeAndCityDocs.js.map +1 -1
  245. package/extensions/forms/Field/Slider/Slider.js +3 -1
  246. package/extensions/forms/Field/Slider/Slider.js.map +1 -1
  247. package/extensions/forms/FieldBlock/FieldBlock.js +21 -3
  248. package/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
  249. package/extensions/forms/FieldBlock/FieldBlockDocs.js +2 -2
  250. package/extensions/forms/FieldBlock/FieldBlockDocs.js.map +1 -1
  251. package/extensions/forms/FieldBlock/style/dnb-field-block.css +6 -0
  252. package/extensions/forms/FieldBlock/style/dnb-field-block.min.css +1 -1
  253. package/extensions/forms/FieldBlock/style/dnb-field-block.scss +6 -0
  254. package/extensions/forms/Form/SubmitConfirmation/SubmitConfirmation.js +1 -1
  255. package/extensions/forms/Form/SubmitConfirmation/SubmitConfirmation.js.map +1 -1
  256. package/extensions/forms/Iterate/Array/Array.js +52 -28
  257. package/extensions/forms/Iterate/Array/Array.js.map +1 -1
  258. package/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.js +4 -12
  259. package/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.js.map +1 -1
  260. package/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.js +89 -73
  261. package/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.js.map +1 -1
  262. package/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.d.ts +12 -12
  263. package/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.js +24 -24
  264. package/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.js.map +1 -1
  265. package/extensions/forms/constants/locales/en-GB.d.ts +2 -1
  266. package/extensions/forms/constants/locales/en-GB.js +3 -2
  267. package/extensions/forms/constants/locales/en-GB.js.map +1 -1
  268. package/extensions/forms/constants/locales/en-US.d.ts +2 -1
  269. package/extensions/forms/constants/locales/index.d.ts +4 -2
  270. package/extensions/forms/constants/locales/nb-NO.d.ts +2 -1
  271. package/extensions/forms/constants/locales/nb-NO.js +3 -2
  272. package/extensions/forms/constants/locales/nb-NO.js.map +1 -1
  273. package/extensions/forms/hooks/useFieldProps.d.ts +4 -2
  274. package/extensions/forms/hooks/useFieldProps.js +41 -9
  275. package/extensions/forms/hooks/useFieldProps.js.map +1 -1
  276. package/extensions/forms/hooks/useTranslation.d.ts +4 -1
  277. package/extensions/forms/hooks/useTranslation.js +7 -4
  278. package/extensions/forms/hooks/useTranslation.js.map +1 -1
  279. package/extensions/forms/hooks/useValueProps.d.ts +1 -1
  280. package/extensions/forms/hooks/useValueProps.js +2 -2
  281. package/extensions/forms/hooks/useValueProps.js.map +1 -1
  282. package/extensions/forms/style/dnb-forms.css +6 -0
  283. package/extensions/forms/style/dnb-forms.min.css +1 -1
  284. package/extensions/forms/types.d.ts +2 -1
  285. package/extensions/forms/types.js.map +1 -1
  286. package/package.json +1 -1
  287. package/shared/Context.d.ts +4 -4
  288. package/shared/Context.js.map +1 -1
  289. package/shared/Eufemia.d.ts +1 -1
  290. package/shared/Eufemia.js +2 -2
  291. package/shared/Eufemia.js.map +1 -1
  292. package/shared/defaults.d.ts +1 -0
  293. package/shared/defaults.js +1 -0
  294. package/shared/defaults.js.map +1 -1
  295. package/shared/useTranslation.d.ts +11 -4
  296. package/shared/useTranslation.js +64 -22
  297. package/shared/useTranslation.js.map +1 -1
  298. package/style/core/scopes.scss +1 -1
  299. package/style/dnb-ui-basis.css +1 -1
  300. package/style/dnb-ui-basis.min.css +1 -1
  301. package/style/dnb-ui-body.css +1 -1
  302. package/style/dnb-ui-body.min.css +1 -1
  303. package/style/dnb-ui-components.css +6 -0
  304. package/style/dnb-ui-components.min.css +1 -1
  305. package/style/dnb-ui-core.css +1 -1
  306. package/style/dnb-ui-core.min.css +1 -1
  307. package/style/dnb-ui-extensions.css +6 -0
  308. package/style/dnb-ui-extensions.min.css +1 -1
  309. package/style/dnb-ui-forms.css +6 -0
  310. package/style/dnb-ui-forms.min.css +1 -1
  311. package/style/themes/theme-eiendom/eiendom-theme-components.css +12 -0
  312. package/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  313. package/style/themes/theme-eiendom/eiendom-theme-extensions.css +6 -0
  314. package/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
  315. package/style/themes/theme-eiendom/eiendom-theme-forms.css +6 -0
  316. package/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
  317. package/style/themes/theme-sbanken/sbanken-theme-components.css +12 -0
  318. package/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  319. package/style/themes/theme-sbanken/sbanken-theme-extensions.css +6 -0
  320. package/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
  321. package/style/themes/theme-sbanken/sbanken-theme-forms.css +6 -0
  322. package/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
  323. package/style/themes/theme-ui/ui-theme-components.css +12 -0
  324. package/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  325. package/style/themes/theme-ui/ui-theme-extensions.css +6 -0
  326. package/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
  327. package/style/themes/theme-ui/ui-theme-forms.css +6 -0
  328. package/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
  329. package/umd/dnb-ui-basis.min.js +1 -1
  330. package/umd/dnb-ui-components.min.js +1 -1
  331. package/umd/dnb-ui-elements.min.js +1 -1
  332. package/umd/dnb-ui-extensions.min.js +5 -5
  333. package/umd/dnb-ui-lib.min.js +1 -1
@@ -6,19 +6,11 @@ import StringValue from '../String';
6
6
  import useTranslation from '../../hooks/useTranslation';
7
7
  import { useValueProps } from '../../hooks';
8
8
  function PostalCodeAndCity(props) {
9
- var _props$value, _props$label;
9
+ var _useValueProps$value, _useValueProps$value2, _props$value, _props$label;
10
10
  const translations = useTranslation().PostalCodeAndCity;
11
- const city = (props === null || props === void 0 ? void 0 : props.city) || {};
12
- const postalCode = (props === null || props === void 0 ? void 0 : props.postalCode) || {};
13
- const cityProps = useValueProps(city);
14
- if (cityProps.value) {
15
- city.value = cityProps.value;
16
- }
17
- const postalCodeProps = useValueProps(postalCode);
18
- if (postalCodeProps.value) {
19
- postalCode.value = postalCodeProps.value;
20
- }
21
- const value = (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : (postalCode || city ? [postalCode === null || postalCode === void 0 ? void 0 : postalCode.value, city === null || city === void 0 ? void 0 : city.value].filter(Boolean).join(' ') : undefined) || undefined;
11
+ const cityValue = (_useValueProps$value = useValueProps((props === null || props === void 0 ? void 0 : props.city) || {}).value) !== null && _useValueProps$value !== void 0 ? _useValueProps$value : props.value;
12
+ const postalCodeValue = (_useValueProps$value2 = useValueProps((props === null || props === void 0 ? void 0 : props.postalCode) || {}).value) !== null && _useValueProps$value2 !== void 0 ? _useValueProps$value2 : props.value;
13
+ const value = (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : (postalCodeValue || cityValue ? [postalCodeValue, cityValue].filter(Boolean).join(' ') : undefined) || undefined;
22
14
  const label = (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : props.inline ? undefined : translations.label;
23
15
  const stringValueProps = _objectSpread(_objectSpread({}, props), {}, {
24
16
  value,
@@ -1 +1 @@
1
- {"version":3,"file":"PostalCodeAndCity.js","names":["React","StringValue","useTranslation","useValueProps","PostalCodeAndCity","props","_props$value","_props$label","translations","city","postalCode","cityProps","value","postalCodeProps","filter","Boolean","join","undefined","label","inline","stringValueProps","_objectSpread","createElement","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.tsx"],"sourcesContent":["import React from 'react'\nimport StringValue, { Props as StringValueProps } from '../String'\nimport useTranslation from '../../hooks/useTranslation'\nimport { useValueProps } from '../../hooks'\n\nexport type Props = StringValueProps &\n Partial<Record<'postalCode' | 'city', StringValueProps>>\n\nfunction PostalCodeAndCity(props: Props) {\n const translations = useTranslation().PostalCodeAndCity\n\n const city = props?.city || {}\n const postalCode = props?.postalCode || {}\n\n const cityProps = useValueProps(city)\n if (cityProps.value) {\n city.value = cityProps.value\n }\n\n const postalCodeProps = useValueProps(postalCode)\n if (postalCodeProps.value) {\n postalCode.value = postalCodeProps.value\n }\n\n const value =\n props.value ??\n ((postalCode || city\n ? [postalCode?.value, city?.value].filter(Boolean).join(' ')\n : undefined) ||\n undefined)\n const label =\n props.label ?? (props.inline ? undefined : translations.label)\n\n const stringValueProps: Props = {\n ...props,\n value,\n label,\n }\n\n return <StringValue {...stringValueProps} />\n}\n\nPostalCodeAndCity._supportsSpacingProps = true\nexport default PostalCodeAndCity\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,O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KACxBhB,KAAK;IACRO,KAAK;IACLM;EAAK,EACN;EAED,OAAOlB,KAAA,CAAAsB,aAAA,CAACrB,WAAW,EAAKmB,gBAAmB,CAAC;AAC9C;AAEAhB,iBAAiB,CAACmB,qBAAqB,GAAG,IAAI;AAC9C,eAAenB,iBAAiB"}
1
+ {"version":3,"file":"PostalCodeAndCity.js","names":["React","StringValue","useTranslation","useValueProps","PostalCodeAndCity","props","_useValueProps$value","_useValueProps$value2","_props$value","_props$label","translations","cityValue","city","value","postalCodeValue","postalCode","filter","Boolean","join","undefined","label","inline","stringValueProps","_objectSpread","createElement","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Value/PostalCodeAndCity/PostalCodeAndCity.tsx"],"sourcesContent":["import React from 'react'\nimport StringValue, { Props as StringValueProps } from '../String'\nimport useTranslation from '../../hooks/useTranslation'\nimport { useValueProps } from '../../hooks'\n\nexport type Props = StringValueProps &\n Partial<Record<'postalCode' | 'city', StringValueProps>>\n\nfunction PostalCodeAndCity(props: Props) {\n const translations = useTranslation().PostalCodeAndCity\n\n const cityValue = useValueProps(props?.city || {}).value ?? props.value\n const postalCodeValue =\n useValueProps(props?.postalCode || {}).value ?? props.value\n\n const value =\n props.value ??\n ((postalCodeValue || cityValue\n ? [postalCodeValue, cityValue].filter(Boolean).join(' ')\n : undefined) ||\n undefined)\n\n const label =\n props.label ?? (props.inline ? undefined : translations.label)\n\n const stringValueProps: Props = {\n ...props,\n value,\n label,\n }\n\n return <StringValue {...stringValueProps} />\n}\n\nPostalCodeAndCity._supportsSpacingProps = true\nexport default PostalCodeAndCity\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAqC,WAAW;AAClE,OAAOC,cAAc,MAAM,4BAA4B;AACvD,SAASC,aAAa,QAAQ,aAAa;AAK3C,SAASC,iBAAiBA,CAACC,KAAY,EAAE;EAAA,IAAAC,oBAAA,EAAAC,qBAAA,EAAAC,YAAA,EAAAC,YAAA;EACvC,MAAMC,YAAY,GAAGR,cAAc,CAAC,CAAC,CAACE,iBAAiB;EAEvD,MAAMO,SAAS,IAAAL,oBAAA,GAAGH,aAAa,CAAC,CAAAE,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEO,IAAI,KAAI,CAAC,CAAC,CAAC,CAACC,KAAK,cAAAP,oBAAA,cAAAA,oBAAA,GAAID,KAAK,CAACQ,KAAK;EACvE,MAAMC,eAAe,IAAAP,qBAAA,GACnBJ,aAAa,CAAC,CAAAE,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEU,UAAU,KAAI,CAAC,CAAC,CAAC,CAACF,KAAK,cAAAN,qBAAA,cAAAA,qBAAA,GAAIF,KAAK,CAACQ,KAAK;EAE7D,MAAMA,KAAK,IAAAL,YAAA,GACTH,KAAK,CAACQ,KAAK,cAAAL,YAAA,cAAAA,YAAA,GACV,CAACM,eAAe,IAAIH,SAAS,GAC1B,CAACG,eAAe,EAAEH,SAAS,CAAC,CAACK,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,GACtDC,SAAS,KACXA,SAAU;EAEd,MAAMC,KAAK,IAAAX,YAAA,GACTJ,KAAK,CAACe,KAAK,cAAAX,YAAA,cAAAA,YAAA,GAAKJ,KAAK,CAACgB,MAAM,GAAGF,SAAS,GAAGT,YAAY,CAACU,KAAM;EAEhE,MAAME,gBAAuB,GAAAC,aAAA,CAAAA,aAAA,KACxBlB,KAAK;IACRQ,KAAK;IACLO;EAAK,EACN;EAED,OAAOpB,KAAA,CAAAwB,aAAA,CAACvB,WAAW,EAAKqB,gBAAmB,CAAC;AAC9C;AAEAlB,iBAAiB,CAACqB,qBAAqB,GAAG,IAAI;AAC9C,eAAerB,iBAAiB"}
@@ -21,7 +21,8 @@ export default function ChildrenWithAge(_ref) {
21
21
  required: true
22
22
  }, restProps), mode === 'summary' ? React.createElement(SummaryContainer, {
23
23
  toWizardStep: toWizardStep,
24
- spacingProps: spacingProps
24
+ spacingProps: spacingProps,
25
+ enableAdditionalQuestions: enableAdditionalQuestions
25
26
  }) : React.createElement(EditContainer, {
26
27
  enableAdditionalQuestions: enableAdditionalQuestions,
27
28
  spacingProps: spacingProps
@@ -33,57 +34,44 @@ function EditContainer(_ref2) {
33
34
  enableAdditionalQuestions
34
35
  } = _ref2;
35
36
  const tr = Form.useTranslation();
37
+ const {
38
+ getValue
39
+ } = Form.useData();
40
+ const hasChildren = getValue('/hasChildren') === true;
36
41
  return React.createElement(Card, _extends({
37
42
  stack: true
38
43
  }, spacingProps), React.createElement(Lead, null, tr.ChildrenWithAge.hasChildren.title), React.createElement(Field.Boolean, {
39
44
  path: "/hasChildren",
40
45
  label: tr.ChildrenWithAge.hasChildren.fieldLabel,
41
46
  variant: "buttons",
42
- defaultValue: false,
43
47
  errorMessages: {
44
48
  required: tr.ChildrenWithAge.hasChildren.required
45
49
  }
46
50
  }), React.createElement(Form.Visibility, {
47
51
  pathTrue: "/hasChildren",
48
52
  animate: true
49
- }, (enableAdditionalQuestions === null || enableAdditionalQuestions === void 0 ? void 0 : enableAdditionalQuestions.includes('joint-responsibility')) && React.createElement(Field.Boolean, {
50
- path: "/hasJointResponsibility",
51
- label: tr.ChildrenWithAge.hasJointResponsibility.fieldLabel,
52
- variant: "buttons",
53
- defaultValue: false,
54
- errorMessages: {
55
- required: tr.ChildrenWithAge.hasChildren.required
56
- }
57
- }), (enableAdditionalQuestions === null || enableAdditionalQuestions === void 0 ? void 0 : enableAdditionalQuestions.includes('daycare')) && React.createElement(Field.Boolean, {
58
- path: "/usesDaycare",
59
- label: tr.ChildrenWithAge.usesDaycare.fieldLabel,
60
- variant: "buttons",
61
- defaultValue: false,
62
- errorMessages: {
63
- required: tr.ChildrenWithAge.usesDaycare.required
64
- }
65
- }), React.createElement(Field.Number, {
53
+ }, React.createElement(Field.Number, {
66
54
  path: "/countChildren",
67
55
  label: tr.ChildrenWithAge.countChildren.fieldLabel,
68
56
  errorMessages: {
69
- minimum: tr.ChildrenWithAge.countChildren.required
57
+ minimum: tr.ChildrenWithAge.countChildren.required,
58
+ required: tr.ChildrenWithAge.countChildren.required
70
59
  },
71
- width: "small",
72
60
  defaultValue: 1,
61
+ width: "small",
62
+ showStepControls: true,
73
63
  minimum: 1,
74
64
  maximum: 20,
75
- showStepControls: true,
76
- decimalLimit: 0
65
+ decimalLimit: 0,
66
+ allowNegative: false
77
67
  }), React.createElement(Iterate.Array, {
78
68
  path: "/children",
79
69
  countPath: "/countChildren",
80
- countPathTransform: transformAgeItem,
81
- countPathLimit: 20
82
- }, React.createElement(Field.Composition, {
83
- label: tr.ChildrenWithAge.childrenAge.fieldLabel,
84
- align: "center"
70
+ countPathLimit: 20,
71
+ animate: true
85
72
  }, React.createElement(Field.Number, {
86
73
  itemPath: "/age",
74
+ label: tr.ChildrenWithAge.childrenAge.fieldLabel,
87
75
  errorMessages: {
88
76
  required: tr.ChildrenWithAge.childrenAge.required
89
77
  },
@@ -91,18 +79,57 @@ function EditContainer(_ref2) {
91
79
  width: "small",
92
80
  minimum: 0,
93
81
  maximum: 17,
94
- decimalLimit: 0
95
- }), React.createElement(Form.Visibility, {
96
- pathTrue: "/hasJointResponsibility"
82
+ decimalLimit: 0,
83
+ allowNegative: false
84
+ }))), (enableAdditionalQuestions === null || enableAdditionalQuestions === void 0 ? void 0 : enableAdditionalQuestions.includes('daycare')) && React.createElement(Form.Visibility, {
85
+ pathTrue: "/hasChildren",
86
+ animate: true
97
87
  }, React.createElement(Field.Boolean, {
98
- itemPath: "/jointResponsibility",
99
- label: tr.ChildrenWithAge.confirmJointResponsibility.fieldLabel
100
- })), React.createElement(Form.Visibility, {
101
- pathTrue: "/usesDaycare"
88
+ path: "/usesDaycare",
89
+ label: tr.ChildrenWithAge.usesDaycare.fieldLabel,
90
+ variant: "buttons",
91
+ errorMessages: {
92
+ required: tr.ChildrenWithAge.usesDaycare.required
93
+ },
94
+ help: {
95
+ title: tr.ChildrenWithAge.usesDaycare.fieldLabel,
96
+ content: tr.renderMessage(tr.ChildrenWithAge.usesDaycare.helpText)
97
+ }
98
+ })), (enableAdditionalQuestions === null || enableAdditionalQuestions === void 0 ? void 0 : enableAdditionalQuestions.includes('daycare')) && hasChildren && React.createElement(Form.Visibility, {
99
+ pathTrue: "/usesDaycare",
100
+ animate: true
101
+ }, React.createElement(Field.Currency, {
102
+ path: "/daycareExpenses",
103
+ label: tr.ChildrenWithAge.dayCareExpenses.fieldLabel,
104
+ errorMessages: {
105
+ required: tr.ChildrenWithAge.dayCareExpenses.required
106
+ },
107
+ minimum: 1,
108
+ decimalLimit: 0,
109
+ allowNegative: false
110
+ })), (enableAdditionalQuestions === null || enableAdditionalQuestions === void 0 ? void 0 : enableAdditionalQuestions.includes('joint-responsibility')) && React.createElement(Form.Visibility, {
111
+ pathTrue: "/hasChildren",
112
+ animate: true
102
113
  }, React.createElement(Field.Boolean, {
103
- itemPath: "/hasDaycare",
104
- label: tr.ChildrenWithAge.hasDaycare.fieldLabel
105
- }))))));
114
+ path: "/hasJointResponsibility",
115
+ label: tr.ChildrenWithAge.hasJointResponsibility.fieldLabel,
116
+ variant: "buttons",
117
+ errorMessages: {
118
+ required: tr.ChildrenWithAge.hasJointResponsibility.required
119
+ }
120
+ })), (enableAdditionalQuestions === null || enableAdditionalQuestions === void 0 ? void 0 : enableAdditionalQuestions.includes('joint-responsibility')) && hasChildren && React.createElement(Form.Visibility, {
121
+ pathTrue: "/hasJointResponsibility",
122
+ animate: true
123
+ }, React.createElement(Field.Currency, {
124
+ path: "/jointResponsibilityExpenses",
125
+ label: tr.ChildrenWithAge.jointResponsibilityExpenses.fieldLabel,
126
+ errorMessages: {
127
+ required: tr.ChildrenWithAge.jointResponsibilityExpenses.required
128
+ },
129
+ minimum: 1,
130
+ decimalLimit: 0,
131
+ allowNegative: false
132
+ })));
106
133
  }
107
134
  function SummaryContainer(_ref3) {
108
135
  let {
@@ -110,10 +137,6 @@ function SummaryContainer(_ref3) {
110
137
  toWizardStep
111
138
  } = _ref3;
112
139
  const tr = Form.useTranslation();
113
- const {
114
- getValue
115
- } = Form.useData();
116
- const hasNoChildren = getValue('/hasChildren') === false;
117
140
  return React.createElement(Card, _extends({
118
141
  stack: true
119
142
  }, spacingProps), React.createElement(Lead, null, tr.ChildrenWithAge.hasChildren.title), React.createElement(Value.SummaryList, null, React.createElement(Value.Boolean, {
@@ -124,47 +147,40 @@ function SummaryContainer(_ref3) {
124
147
  }, React.createElement(Value.Number, {
125
148
  path: "/countChildren",
126
149
  label: tr.ChildrenWithAge.countChildren.fieldLabel,
127
- defaultValue: 0,
128
150
  suffix: tr.ChildrenWithAge.countChildren.suffix,
129
- maximum: 20,
130
- transformIn: value => hasNoChildren ? 0 : value
131
- })), React.createElement(Iterate.Array, {
132
- path: "/children",
133
- limit: hasNoChildren ? 0 : undefined
134
- }, React.createElement(Value.Composition, {
135
- label: tr.ChildrenWithAge.childrenAge.fieldLabel,
136
- gap: false
151
+ maximum: 20
152
+ }), React.createElement(Iterate.Array, {
153
+ path: "/children"
137
154
  }, React.createElement(Value.Number, {
138
155
  itemPath: "/age",
156
+ label: tr.ChildrenWithAge.childrenAge.fieldLabel,
139
157
  suffix: tr.ChildrenWithAge.childrenAge.suffix,
140
158
  defaultValue: "\u2013"
141
- }), React.createElement(Form.Visibility, {
142
- pathTrue: "/hasJointResponsibility"
143
- }, ', ', React.createElement(Value.Boolean, {
144
- inline: true,
145
- itemPath: "/jointResponsibility",
146
- trueText: tr.ChildrenWithAge.jointResponsibilityTrue,
147
- falseText: tr.ChildrenWithAge.jointResponsibilityFalse,
148
- defaultValue: false
149
159
  })), React.createElement(Form.Visibility, {
160
+ pathDefined: "/usesDaycare"
161
+ }, React.createElement(Value.Boolean, {
162
+ label: tr.ChildrenWithAge.usesDaycare.fieldLabel,
163
+ path: "/usesDaycare"
164
+ }), React.createElement(Form.Visibility, {
150
165
  pathTrue: "/usesDaycare"
151
- }, ', ', React.createElement(Value.Boolean, {
152
- inline: true,
153
- itemPath: "/hasDaycare",
154
- trueText: tr.ChildrenWithAge.daycareTrue,
155
- falseText: tr.ChildrenWithAge.daycareFalse,
156
- defaultValue: false
166
+ }, React.createElement(Value.Currency, {
167
+ label: tr.ChildrenWithAge.dayCareExpenses.fieldLabel,
168
+ path: "/daycareExpenses",
169
+ decimals: "0"
170
+ }))), React.createElement(Form.Visibility, {
171
+ pathDefined: "/hasJointResponsibility"
172
+ }, React.createElement(Value.Boolean, {
173
+ path: "/hasJointResponsibility",
174
+ label: tr.ChildrenWithAge.hasJointResponsibility.fieldLabel
175
+ }), React.createElement(Form.Visibility, {
176
+ pathTrue: "/hasJointResponsibility"
177
+ }, React.createElement(Value.Currency, {
178
+ label: tr.ChildrenWithAge.jointResponsibilityExpenses.fieldLabel,
179
+ path: "/jointResponsibilityExpenses",
180
+ decimals: "0"
157
181
  }))))), typeof toWizardStep === 'number' ? React.createElement(Wizard.EditButton, {
158
182
  toStep: toWizardStep
159
183
  }) : null);
160
184
  }
161
- const transformAgeItem = _ref4 => {
162
- let {
163
- value
164
- } = _ref4;
165
- return Object.prototype.hasOwnProperty.call(value || {}, 'age') ? value : {
166
- age: undefined
167
- };
168
- };
169
185
  ChildrenWithAge._supportsSpacingProps = true;
170
186
  //# sourceMappingURL=ChildrenWithAge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChildrenWithAge.js","names":["React","Field","Form","Iterate","Value","Wizard","Card","Lead","translations","omitSpacingProps","pickSpacingProps","ChildrenWithAge","_ref","mode","enableAdditionalQuestions","toWizardStep","props","_objectWithoutProperties","_excluded","spacingProps","restProps","createElement","Section","_extends","required","SummaryContainer","EditContainer","_ref2","tr","useTranslation","stack","hasChildren","title","Boolean","path","label","fieldLabel","variant","defaultValue","errorMessages","Visibility","pathTrue","animate","includes","hasJointResponsibility","usesDaycare","Number","countChildren","minimum","width","maximum","showStepControls","decimalLimit","Array","countPath","countPathTransform","transformAgeItem","countPathLimit","Composition","childrenAge","align","itemPath","placeholder","confirmJointResponsibility","hasDaycare","_ref3","getValue","useData","hasNoChildren","SummaryList","suffix","transformIn","value","limit","undefined","gap","inline","trueText","jointResponsibilityTrue","falseText","jointResponsibilityFalse","daycareTrue","daycareFalse","EditButton","toStep","_ref4","Object","prototype","hasOwnProperty","call","age","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.tsx"],"sourcesContent":["import React from 'react'\nimport { Field, Form, Iterate, Value, Wizard } from '../..'\nimport { Card } from '../../../../components'\nimport { Lead } from '../../../../elements'\nimport { Translation, translations } from './ChildrenWithAgeTranslations'\nimport type { SectionProps } from '../../Form/Section'\nimport {\n omitSpacingProps,\n pickSpacingProps,\n} from '../../../../components/flex/utils'\nimport { SpacingProps } from '../../../../shared/types'\n\ntype Mode = 'edit' | 'summary'\ntype Variant = Array<'joint-responsibility' | 'daycare'>\n\nexport type Props = SectionProps & {\n mode?: Mode\n enableAdditionalQuestions?: Variant\n toWizardStep?: number\n} & SpacingProps\n\nexport default function ChildrenWithAge({\n mode,\n enableAdditionalQuestions,\n toWizardStep,\n ...props\n}: Props) {\n const spacingProps = pickSpacingProps<Props>(props)\n const restProps = omitSpacingProps(props)\n return (\n <Form.Section translations={translations} required {...restProps}>\n {mode === 'summary' ? (\n <SummaryContainer\n toWizardStep={toWizardStep}\n spacingProps={spacingProps}\n />\n ) : (\n <EditContainer\n enableAdditionalQuestions={enableAdditionalQuestions}\n spacingProps={spacingProps}\n />\n )}\n </Form.Section>\n )\n}\n\nfunction EditContainer({\n spacingProps,\n enableAdditionalQuestions,\n}: Props & {\n spacingProps?: SpacingProps\n}) {\n const tr = Form.useTranslation<Translation>()\n\n return (\n <Card stack {...spacingProps}>\n <Lead>{tr.ChildrenWithAge.hasChildren.title}</Lead>\n\n <Field.Boolean\n path=\"/hasChildren\"\n label={tr.ChildrenWithAge.hasChildren.fieldLabel}\n variant=\"buttons\"\n defaultValue={false}\n errorMessages={{\n required: tr.ChildrenWithAge.hasChildren.required,\n }}\n />\n\n <Form.Visibility pathTrue=\"/hasChildren\" animate>\n {enableAdditionalQuestions?.includes('joint-responsibility') && (\n <Field.Boolean\n path=\"/hasJointResponsibility\"\n label={tr.ChildrenWithAge.hasJointResponsibility.fieldLabel}\n variant=\"buttons\"\n defaultValue={false}\n errorMessages={{\n required: tr.ChildrenWithAge.hasChildren.required,\n }}\n />\n )}\n\n {enableAdditionalQuestions?.includes('daycare') && (\n <Field.Boolean\n path=\"/usesDaycare\"\n label={tr.ChildrenWithAge.usesDaycare.fieldLabel}\n variant=\"buttons\"\n defaultValue={false}\n errorMessages={{\n required: tr.ChildrenWithAge.usesDaycare.required,\n }}\n />\n )}\n\n <Field.Number\n path=\"/countChildren\"\n label={tr.ChildrenWithAge.countChildren.fieldLabel}\n errorMessages={{\n minimum: tr.ChildrenWithAge.countChildren.required,\n }}\n width=\"small\"\n defaultValue={1}\n minimum={1}\n maximum={20}\n showStepControls\n decimalLimit={0}\n />\n\n <Iterate.Array\n path=\"/children\"\n countPath=\"/countChildren\"\n countPathTransform={transformAgeItem}\n countPathLimit={20}\n >\n <Field.Composition\n label={tr.ChildrenWithAge.childrenAge.fieldLabel}\n align=\"center\"\n >\n <Field.Number\n itemPath=\"/age\"\n errorMessages={{\n required: tr.ChildrenWithAge.childrenAge.required,\n }}\n placeholder=\"0\"\n width=\"small\"\n minimum={0}\n maximum={17}\n decimalLimit={0}\n />\n\n <Form.Visibility pathTrue=\"/hasJointResponsibility\">\n <Field.Boolean\n itemPath=\"/jointResponsibility\"\n label={\n tr.ChildrenWithAge.confirmJointResponsibility.fieldLabel\n }\n />\n </Form.Visibility>\n\n <Form.Visibility pathTrue=\"/usesDaycare\">\n <Field.Boolean\n itemPath=\"/hasDaycare\"\n label={tr.ChildrenWithAge.hasDaycare.fieldLabel}\n />\n </Form.Visibility>\n </Field.Composition>\n </Iterate.Array>\n </Form.Visibility>\n </Card>\n )\n}\n\nfunction SummaryContainer({\n spacingProps,\n toWizardStep,\n}: Props & {\n spacingProps?: SpacingProps\n}) {\n const tr = Form.useTranslation<Translation>()\n\n const { getValue } = Form.useData()\n const hasNoChildren = getValue('/hasChildren') === false\n\n return (\n <Card stack {...spacingProps}>\n {<Lead>{tr.ChildrenWithAge.hasChildren.title}</Lead>}\n\n <Value.SummaryList>\n <Value.Boolean\n path=\"/hasChildren\"\n label={tr.ChildrenWithAge.hasChildren.fieldLabel}\n />\n <Form.Visibility pathTrue=\"/hasChildren\">\n <Value.Number\n path=\"/countChildren\"\n label={tr.ChildrenWithAge.countChildren.fieldLabel}\n defaultValue={0}\n suffix={tr.ChildrenWithAge.countChildren.suffix}\n maximum={20}\n transformIn={(value) => (hasNoChildren ? 0 : value)}\n />\n </Form.Visibility>\n <Iterate.Array\n path=\"/children\"\n limit={hasNoChildren ? 0 : undefined}\n >\n <Value.Composition\n label={tr.ChildrenWithAge.childrenAge.fieldLabel}\n gap={false}\n >\n <Value.Number\n itemPath=\"/age\"\n suffix={tr.ChildrenWithAge.childrenAge.suffix}\n defaultValue=\"–\"\n />\n\n <Form.Visibility pathTrue=\"/hasJointResponsibility\">\n {', '}\n <Value.Boolean\n inline\n itemPath=\"/jointResponsibility\"\n trueText={tr.ChildrenWithAge.jointResponsibilityTrue}\n falseText={tr.ChildrenWithAge.jointResponsibilityFalse}\n defaultValue={false}\n />\n </Form.Visibility>\n\n <Form.Visibility pathTrue=\"/usesDaycare\">\n {', '}\n <Value.Boolean\n inline\n itemPath=\"/hasDaycare\"\n trueText={tr.ChildrenWithAge.daycareTrue}\n falseText={tr.ChildrenWithAge.daycareFalse}\n defaultValue={false}\n />\n </Form.Visibility>\n </Value.Composition>\n </Iterate.Array>\n </Value.SummaryList>\n\n {typeof toWizardStep === 'number' ? (\n <Wizard.EditButton toStep={toWizardStep} />\n ) : null}\n </Card>\n )\n}\n\nconst transformAgeItem = ({ value }) =>\n Object.prototype.hasOwnProperty.call(value || {}, 'age')\n ? value\n : { age: undefined }\n\nChildrenWithAge._supportsSpacingProps = true\n"],"mappings":";;;AAAA,OAAOA,KAA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B,QAAQ,EAAEjD,EAAE,CAACjB,eAAe,CAACsE,WAAY;IACzCF,SAAS,EAAEnD,EAAE,CAACjB,eAAe,CAACuE,YAAa;IAC3C5C,YAAY,EAAE;EAAM,CACrB,CACc,CACA,CACN,CACE,CAAC,EAEnB,OAAOvB,YAAY,KAAK,QAAQ,GAC/Bf,KAAA,CAAAqB,aAAA,CAAChB,MAAM,CAAC8E,UAAU;IAACC,MAAM,EAAErE;EAAa,CAAE,CAAC,GACzC,IACA,CAAC;AAEX;AAEA,MAAMyC,gBAAgB,GAAG6B,KAAA;EAAA,IAAC;IAAEb;EAAM,CAAC,GAAAa,KAAA;EAAA,OACjCC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACjB,KAAK,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,GACpDA,KAAK,GACL;IAAEkB,GAAG,EAAEhB;EAAU,CAAC;AAAA;AAExB/D,eAAe,CAACgF,qBAAqB,GAAG,IAAI"}
1
+ {"version":3,"file":"ChildrenWithAge.js","names":["React","Field","Form","Iterate","Value","Wizard","Card","Lead","translations","omitSpacingProps","pickSpacingProps","ChildrenWithAge","_ref","mode","enableAdditionalQuestions","toWizardStep","props","_objectWithoutProperties","_excluded","spacingProps","restProps","createElement","Section","_extends","required","SummaryContainer","EditContainer","_ref2","tr","useTranslation","getValue","useData","hasChildren","stack","title","Boolean","path","label","fieldLabel","variant","errorMessages","Visibility","pathTrue","animate","Number","countChildren","minimum","defaultValue","width","showStepControls","maximum","decimalLimit","allowNegative","Array","countPath","countPathLimit","itemPath","childrenAge","placeholder","includes","usesDaycare","help","content","renderMessage","helpText","Currency","dayCareExpenses","hasJointResponsibility","jointResponsibilityExpenses","_ref3","SummaryList","suffix","pathDefined","decimals","EditButton","toStep","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAge.tsx"],"sourcesContent":["import React from 'react'\nimport { Field, Form, Iterate, Value, Wizard } from '../..'\nimport { Card } from '../../../../components'\nimport { Lead } from '../../../../elements'\nimport { Translation, translations } from './ChildrenWithAgeTranslations'\nimport type { SectionProps } from '../../Form/Section'\nimport {\n omitSpacingProps,\n pickSpacingProps,\n} from '../../../../components/flex/utils'\nimport { SpacingProps } from '../../../../shared/types'\n\ntype Mode = 'edit' | 'summary'\ntype Variant = Array<'joint-responsibility' | 'daycare'>\n\nexport type Props = SectionProps & {\n mode?: Mode\n enableAdditionalQuestions?: Variant\n toWizardStep?: number\n} & SpacingProps\n\nexport default function ChildrenWithAge({\n mode,\n enableAdditionalQuestions,\n toWizardStep,\n ...props\n}: Props) {\n const spacingProps = pickSpacingProps<Props>(props)\n const restProps = omitSpacingProps(props)\n return (\n <Form.Section translations={translations} required {...restProps}>\n {mode === 'summary' ? (\n <SummaryContainer\n toWizardStep={toWizardStep}\n spacingProps={spacingProps}\n enableAdditionalQuestions={enableAdditionalQuestions}\n />\n ) : (\n <EditContainer\n enableAdditionalQuestions={enableAdditionalQuestions}\n spacingProps={spacingProps}\n />\n )}\n </Form.Section>\n )\n}\n\nfunction EditContainer({\n spacingProps,\n enableAdditionalQuestions,\n}: Props & {\n spacingProps?: SpacingProps\n}) {\n const tr = Form.useTranslation<Translation>()\n\n const { getValue } = Form.useData()\n const hasChildren = getValue('/hasChildren') === true\n\n return (\n <Card stack {...spacingProps}>\n <Lead>{tr.ChildrenWithAge.hasChildren.title}</Lead>\n\n <Field.Boolean\n path=\"/hasChildren\"\n label={tr.ChildrenWithAge.hasChildren.fieldLabel}\n variant=\"buttons\"\n errorMessages={{\n required: tr.ChildrenWithAge.hasChildren.required,\n }}\n />\n\n <Form.Visibility pathTrue=\"/hasChildren\" animate>\n <Field.Number\n path=\"/countChildren\"\n label={tr.ChildrenWithAge.countChildren.fieldLabel}\n errorMessages={{\n minimum: tr.ChildrenWithAge.countChildren.required,\n required: tr.ChildrenWithAge.countChildren.required,\n }}\n defaultValue={1}\n width=\"small\"\n showStepControls\n minimum={1}\n maximum={20}\n decimalLimit={0}\n allowNegative={false}\n />\n\n <Iterate.Array\n path=\"/children\"\n countPath=\"/countChildren\"\n countPathLimit={20}\n animate\n >\n <Field.Number\n itemPath=\"/age\"\n label={tr.ChildrenWithAge.childrenAge.fieldLabel}\n errorMessages={{\n required: tr.ChildrenWithAge.childrenAge.required,\n }}\n placeholder=\"0\"\n width=\"small\"\n minimum={0}\n maximum={17}\n decimalLimit={0}\n allowNegative={false}\n />\n </Iterate.Array>\n </Form.Visibility>\n\n {enableAdditionalQuestions?.includes('daycare') && (\n <Form.Visibility pathTrue=\"/hasChildren\" animate>\n <Field.Boolean\n path=\"/usesDaycare\"\n label={tr.ChildrenWithAge.usesDaycare.fieldLabel}\n variant=\"buttons\"\n errorMessages={{\n required: tr.ChildrenWithAge.usesDaycare.required,\n }}\n help={{\n title: tr.ChildrenWithAge.usesDaycare.fieldLabel,\n content: tr.renderMessage(\n tr.ChildrenWithAge.usesDaycare.helpText\n ),\n }}\n />\n </Form.Visibility>\n )}\n\n {enableAdditionalQuestions?.includes('daycare') && hasChildren && (\n <Form.Visibility pathTrue=\"/usesDaycare\" animate>\n <Field.Currency\n path=\"/daycareExpenses\"\n label={tr.ChildrenWithAge.dayCareExpenses.fieldLabel}\n errorMessages={{\n required: tr.ChildrenWithAge.dayCareExpenses.required,\n }}\n minimum={1}\n decimalLimit={0}\n allowNegative={false}\n />\n </Form.Visibility>\n )}\n\n {enableAdditionalQuestions?.includes('joint-responsibility') && (\n <Form.Visibility pathTrue=\"/hasChildren\" animate>\n <Field.Boolean\n path=\"/hasJointResponsibility\"\n label={tr.ChildrenWithAge.hasJointResponsibility.fieldLabel}\n variant=\"buttons\"\n errorMessages={{\n required: tr.ChildrenWithAge.hasJointResponsibility.required,\n }}\n />\n </Form.Visibility>\n )}\n\n {enableAdditionalQuestions?.includes('joint-responsibility') &&\n hasChildren && (\n <Form.Visibility pathTrue=\"/hasJointResponsibility\" animate>\n <Field.Currency\n path=\"/jointResponsibilityExpenses\"\n label={\n tr.ChildrenWithAge.jointResponsibilityExpenses.fieldLabel\n }\n errorMessages={{\n required:\n tr.ChildrenWithAge.jointResponsibilityExpenses.required,\n }}\n minimum={1}\n decimalLimit={0}\n allowNegative={false}\n />\n </Form.Visibility>\n )}\n </Card>\n )\n}\n\nfunction SummaryContainer({\n spacingProps,\n toWizardStep,\n}: Props & {\n spacingProps?: SpacingProps\n}) {\n const tr = Form.useTranslation<Translation>()\n\n return (\n <Card stack {...spacingProps}>\n {<Lead>{tr.ChildrenWithAge.hasChildren.title}</Lead>}\n\n <Value.SummaryList>\n <Value.Boolean\n path=\"/hasChildren\"\n label={tr.ChildrenWithAge.hasChildren.fieldLabel}\n />\n <Form.Visibility pathTrue=\"/hasChildren\">\n <Value.Number\n path=\"/countChildren\"\n label={tr.ChildrenWithAge.countChildren.fieldLabel}\n suffix={tr.ChildrenWithAge.countChildren.suffix}\n maximum={20}\n />\n <Iterate.Array path=\"/children\">\n <Value.Number\n itemPath=\"/age\"\n label={tr.ChildrenWithAge.childrenAge.fieldLabel}\n suffix={tr.ChildrenWithAge.childrenAge.suffix}\n defaultValue=\"–\"\n />\n </Iterate.Array>\n <Form.Visibility pathDefined=\"/usesDaycare\">\n <Value.Boolean\n label={tr.ChildrenWithAge.usesDaycare.fieldLabel}\n path=\"/usesDaycare\"\n />\n <Form.Visibility pathTrue=\"/usesDaycare\">\n <Value.Currency\n label={tr.ChildrenWithAge.dayCareExpenses.fieldLabel}\n path=\"/daycareExpenses\"\n decimals=\"0\"\n />\n </Form.Visibility>\n </Form.Visibility>\n\n <Form.Visibility pathDefined=\"/hasJointResponsibility\">\n <Value.Boolean\n path=\"/hasJointResponsibility\"\n label={tr.ChildrenWithAge.hasJointResponsibility.fieldLabel}\n />\n <Form.Visibility pathTrue=\"/hasJointResponsibility\">\n <Value.Currency\n label={\n tr.ChildrenWithAge.jointResponsibilityExpenses.fieldLabel\n }\n path=\"/jointResponsibilityExpenses\"\n decimals=\"0\"\n />\n </Form.Visibility>\n </Form.Visibility>\n </Form.Visibility>\n </Value.SummaryList>\n\n {typeof toWizardStep === 'number' ? (\n <Wizard.EditButton toStep={toWizardStep} />\n ) : null}\n </Card>\n )\n}\n\nChildrenWithAge._supportsSpacingProps = true\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,QAAQ,OAAO;AAC3D,SAASC,IAAI,QAAQ,wBAAwB;AAC7C,SAASC,IAAI,QAAQ,sBAAsB;AAC3C,SAAsBC,YAAY,QAAQ,+BAA+B;AAEzE,SACEC,gBAAgB,EAChBC,gBAAgB,QACX,mCAAmC;AAY1C,eAAe,SAASC,eAAeA,CAAAC,IAAA,EAK7B;EAAA,IAL8B;MACtCC,IAAI;MACJC,yBAAyB;MACzBC;IAEK,CAAC,GAAAH,IAAA;IADHI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAER,MAAMC,YAAY,GAAGT,gBAAgB,CAAQM,KAAK,CAAC;EACnD,MAAMI,SAAS,GAAGX,gBAAgB,CAACO,KAAK,CAAC;EACzC,OACEhB,KAAA,CAAAqB,aAAA,CAACnB,IAAI,CAACoB,OAAO,EAAAC,QAAA;IAACf,YAAY,EAAEA,YAAa;IAACgB,QAAQ;EAAA,GAAKJ,SAAS,GAC7DP,IAAI,KAAK,SAAS,GACjBb,KAAA,CAAAqB,aAAA,CAACI,gBAAgB;IACfV,YAAY,EAAEA,YAAa;IAC3BI,YAAY,EAAEA,YAAa;IAC3BL,yBAAyB,EAAEA;EAA0B,CACtD,CAAC,GAEFd,KAAA,CAAAqB,aAAA,CAACK,aAAa;IACZZ,yBAAyB,EAAEA,yBAA0B;IACrDK,YAAY,EAAEA;EAAa,CAC5B,CAES,CAAC;AAEnB;AAEA,SAASO,aAAaA,CAAAC,KAAA,EAKnB;EAAA,IALoB;IACrBR,YAAY;IACZL;EAGF,CAAC,GAAAa,KAAA;EACC,MAAM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CAAAqB,aAAA,CAACjB,KAAK,CAAC6D,QAAQ;IACb5B,KAAK,EACHT,EAAE,CAACjB,eAAe,CAACyD,2BAA2B,CAAC9B,UAChD;IACDF,IAAI,EAAC,8BAA8B;IACnCqC,QAAQ,EAAC;EAAG,CACb,CACc,CACF,CACF,CACA,CAAC,EAEnB,OAAO1D,YAAY,KAAK,QAAQ,GAC/Bf,KAAA,CAAAqB,aAAA,CAAChB,MAAM,CAACqE,UAAU;IAACC,MAAM,EAAE5D;EAAa,CAAE,CAAC,GACzC,IACA,CAAC;AAEX;AAEAJ,eAAe,CAACiE,qBAAqB,GAAG,IAAI"}
@@ -18,21 +18,21 @@ export declare const translations: {
18
18
  };
19
19
  hasJointResponsibility: {
20
20
  fieldLabel: string;
21
+ required: string;
21
22
  };
22
- confirmJointResponsibility: {
23
+ jointResponsibilityExpenses: {
23
24
  fieldLabel: string;
25
+ required: string;
24
26
  };
25
27
  usesDaycare: {
26
28
  fieldLabel: string;
27
29
  required: string;
30
+ helpText: string;
28
31
  };
29
- hasDaycare: {
32
+ dayCareExpenses: {
30
33
  fieldLabel: string;
34
+ required: string;
31
35
  };
32
- jointResponsibilityTrue: string;
33
- jointResponsibilityFalse: string;
34
- daycareTrue: string;
35
- daycareFalse: string;
36
36
  };
37
37
  };
38
38
  'en-GB': {
@@ -54,21 +54,21 @@ export declare const translations: {
54
54
  };
55
55
  hasJointResponsibility: {
56
56
  fieldLabel: string;
57
+ required: string;
57
58
  };
58
- confirmJointResponsibility: {
59
+ jointResponsibilityExpenses: {
59
60
  fieldLabel: string;
61
+ required: string;
60
62
  };
61
63
  usesDaycare: {
62
64
  fieldLabel: string;
63
65
  required: string;
66
+ helpText: string;
64
67
  };
65
- hasDaycare: {
68
+ dayCareExpenses: {
66
69
  fieldLabel: string;
70
+ required: string;
67
71
  };
68
- jointResponsibilityTrue: string;
69
- jointResponsibilityFalse: string;
70
- daycareTrue: string;
71
- daycareFalse: string;
72
72
  };
73
73
  };
74
74
  };
@@ -15,22 +15,22 @@ const nbNO = {
15
15
  suffix: 'år'
16
16
  },
17
17
  hasJointResponsibility: {
18
- fieldLabel: 'Har du delt omsorg for noen av barna?'
18
+ fieldLabel: 'Betaler du/dere barnebidrag?',
19
+ required: 'Du må angi om du/dere betaler barnebidrag.'
19
20
  },
20
- confirmJointResponsibility: {
21
- fieldLabel: 'Delt omsorg'
21
+ jointResponsibilityExpenses: {
22
+ fieldLabel: 'Oppgi barnebidrag per måned',
23
+ required: 'Du må oppgi barnebidrag per måned.'
22
24
  },
23
25
  usesDaycare: {
24
- fieldLabel: 'Har du/dere SFO/AKS for noen av barna?',
25
- required: 'Du må angi om du har SFO/AKS for noen av barna.'
26
+ fieldLabel: 'Har du/dere utgifter til SFO/AKS?',
27
+ required: 'Du må angi om du/dere har utgifter til SFO/AKS.',
28
+ helpText: 'Oppgi totalt beløp per måned som du betaler til Skolefritidsordningen (SFO) eller Aktivitetsskolen (AKS).{br}{br}Barnehageutgifter skal ikke tas med her.'
26
29
  },
27
- hasDaycare: {
28
- fieldLabel: 'Er SFO/AKS'
29
- },
30
- jointResponsibilityTrue: 'delt omsorg',
31
- jointResponsibilityFalse: 'ikke delt omsorg',
32
- daycareTrue: 'SFO/AKS',
33
- daycareFalse: 'uten SFO/AKS'
30
+ dayCareExpenses: {
31
+ fieldLabel: 'Oppgi utgifter til SFO/AKS per måned',
32
+ required: 'Du må oppgi dine utgifter til SFO/AKS per måned.'
33
+ }
34
34
  };
35
35
  const enGB = {
36
36
  hasChildren: {
@@ -49,22 +49,22 @@ const enGB = {
49
49
  suffix: 'years old'
50
50
  },
51
51
  hasJointResponsibility: {
52
- fieldLabel: 'Do you have joint parental responsibility for any of the children?'
52
+ fieldLabel: 'Do you pay child support?',
53
+ required: 'You must state whether you pay child support.'
53
54
  },
54
- confirmJointResponsibility: {
55
- fieldLabel: 'Joint parental responsibility'
55
+ jointResponsibilityExpenses: {
56
+ fieldLabel: 'Enter child support per month',
57
+ required: 'You must enter child support per month.'
56
58
  },
57
59
  usesDaycare: {
58
- fieldLabel: 'Do you have SFO/AKS for any of the children?',
59
- required: 'You must state whether you have SFO/AKS for any of the children.'
60
+ fieldLabel: 'Do you have expenses for SFO/AKS?',
61
+ required: 'You must state whether you have any expenses for SFO/AKS.',
62
+ helpText: 'State the total amount per month that you pay to Skolefritidsordningen (SFO) or Aktivitetsskolen (AKS).{br}{br}Kindergarten expenses are not to be included here.'
60
63
  },
61
- hasDaycare: {
62
- fieldLabel: 'Has SFO/AKS'
63
- },
64
- jointResponsibilityTrue: 'joint parental responsibility',
65
- jointResponsibilityFalse: 'not joint parental responsibility',
66
- daycareTrue: 'SFO/AKS',
67
- daycareFalse: 'without SFO/AKS'
64
+ dayCareExpenses: {
65
+ fieldLabel: 'Enter expenses for SFO/AKS per month',
66
+ required: 'You must enter your expenses for SFO/AKS per month.'
67
+ }
68
68
  };
69
69
  export const translations = {
70
70
  'nb-NO': {
@@ -1 +1 @@
1
- {"version":3,"file":"ChildrenWithAgeTranslations.js","names":["nbNO","hasChildren","title","fieldLabel","required","countChildren","suffix","childrenAge","hasJointResponsibility","confirmJointResponsibility","usesDaycare","hasDaycare","jointResponsibilityTrue","jointResponsibilityFalse","daycareTrue","daycareFalse","enGB","translations","ChildrenWithAge"],"sources":["../../../../../../src/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.ts"],"sourcesContent":["const nbNO = {\n hasChildren: {\n title: 'Antall barn',\n fieldLabel: 'Har du/dere barn under 18 år?',\n required: 'Du må angi om du har barn under 18 år eller ikke.',\n },\n countChildren: {\n fieldLabel: 'Antall barn under 18 år',\n required: 'Du må skrive inn antall barn.',\n suffix: 'barn',\n },\n childrenAge: {\n fieldLabel: 'Alder på barn nr. {itemNo}',\n required: 'Du må skrive inn alder på barnet.',\n suffix: 'år',\n },\n hasJointResponsibility: {\n fieldLabel: 'Har du delt omsorg for noen av barna?',\n },\n confirmJointResponsibility: {\n fieldLabel: 'Delt omsorg',\n },\n usesDaycare: {\n fieldLabel: 'Har du/dere SFO/AKS for noen av barna?',\n required: 'Du må angi om du har SFO/AKS for noen av barna.',\n },\n hasDaycare: {\n fieldLabel: 'Er SFO/AKS',\n },\n jointResponsibilityTrue: 'delt omsorg',\n jointResponsibilityFalse: 'ikke delt omsorg',\n daycareTrue: 'SFO/AKS',\n daycareFalse: 'uten SFO/AKS',\n}\n\nconst enGB = {\n hasChildren: {\n title: 'Number of children',\n fieldLabel: 'Do you have children under the age of 18?',\n required: 'You must state whether you have children under 18 or not.',\n },\n countChildren: {\n fieldLabel: 'Number of children under the age of 18',\n required: 'You must enter the number of children.',\n suffix: 'children',\n },\n childrenAge: {\n fieldLabel: 'Age of child no. {itemNo}',\n required: 'You must enter the age of the child.',\n suffix: 'years old',\n },\n hasJointResponsibility: {\n fieldLabel:\n 'Do you have joint parental responsibility for any of the children?',\n },\n confirmJointResponsibility: {\n fieldLabel: 'Joint parental responsibility',\n },\n usesDaycare: {\n fieldLabel: 'Do you have SFO/AKS for any of the children?',\n required:\n 'You must state whether you have SFO/AKS for any of the children.',\n },\n hasDaycare: {\n fieldLabel: 'Has SFO/AKS',\n },\n jointResponsibilityTrue: 'joint parental responsibility',\n jointResponsibilityFalse: 'not joint parental responsibility',\n daycareTrue: 'SFO/AKS',\n daycareFalse: 'without SFO/AKS',\n} satisfies typeof nbNO\n\nexport const translations = {\n 'nb-NO': { ChildrenWithAge: nbNO },\n 'en-GB': { ChildrenWithAge: enGB },\n}\n\nexport type Translation = (typeof translations)[keyof typeof translations]\n"],"mappings":"AAAA,MAAMA,IAAI,GAAG;EACXC,WAAW,EAAE;IACXC,KAAK,EAAE,aAAa;IACpBC,UAAU,EAAE,+BAA+B;IAC3CC,QAAQ,EAAE;EACZ,CAAC;EACDC,aAAa,EAAE;IACbF,UAAU,EAAE,yBAAyB;IACrCC,QAAQ,EAAE,+BAA+B;IACzCE,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXJ,UAAU,EAAE,4BAA4B;IACxCC,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file":"ChildrenWithAgeTranslations.js","names":["nbNO","hasChildren","title","fieldLabel","required","countChildren","suffix","childrenAge","hasJointResponsibility","jointResponsibilityExpenses","usesDaycare","helpText","dayCareExpenses","enGB","translations","ChildrenWithAge"],"sources":["../../../../../../src/extensions/forms/blocks/ChildrenWithAge/ChildrenWithAgeTranslations.ts"],"sourcesContent":["const nbNO = {\n hasChildren: {\n title: 'Antall barn',\n fieldLabel: 'Har du/dere barn under 18 år?',\n required: 'Du må angi om du har barn under 18 år eller ikke.',\n },\n countChildren: {\n fieldLabel: 'Antall barn under 18 år',\n required: 'Du må skrive inn antall barn.',\n suffix: 'barn',\n },\n childrenAge: {\n fieldLabel: 'Alder på barn nr. {itemNo}',\n required: 'Du må skrive inn alder på barnet.',\n suffix: 'år',\n },\n hasJointResponsibility: {\n fieldLabel: 'Betaler du/dere barnebidrag?',\n required: 'Du angi om du/dere betaler barnebidrag.',\n },\n jointResponsibilityExpenses: {\n fieldLabel: 'Oppgi barnebidrag per måned',\n required: 'Du må oppgi barnebidrag per måned.',\n },\n usesDaycare: {\n fieldLabel: 'Har du/dere utgifter til SFO/AKS?',\n required: 'Du må angi om du/dere har utgifter til SFO/AKS.',\n helpText:\n 'Oppgi totalt beløp per måned som du betaler til Skolefritidsordningen (SFO) eller Aktivitetsskolen (AKS).{br}{br}Barnehageutgifter skal ikke tas med her.',\n },\n dayCareExpenses: {\n fieldLabel: 'Oppgi utgifter til SFO/AKS per måned',\n required: 'Du oppgi dine utgifter til SFO/AKS per måned.',\n },\n}\n\nconst enGB = {\n hasChildren: {\n title: 'Number of children',\n fieldLabel: 'Do you have children under the age of 18?',\n required: 'You must state whether you have children under 18 or not.',\n },\n countChildren: {\n fieldLabel: 'Number of children under the age of 18',\n required: 'You must enter the number of children.',\n suffix: 'children',\n },\n childrenAge: {\n fieldLabel: 'Age of child no. {itemNo}',\n required: 'You must enter the age of the child.',\n suffix: 'years old',\n },\n hasJointResponsibility: {\n fieldLabel: 'Do you pay child support?',\n required: 'You must state whether you pay child support.',\n },\n jointResponsibilityExpenses: {\n fieldLabel: 'Enter child support per month',\n required: 'You must enter child support per month.',\n },\n usesDaycare: {\n fieldLabel: 'Do you have expenses for SFO/AKS?',\n required: 'You must state whether you have any expenses for SFO/AKS.',\n helpText:\n 'State the total amount per month that you pay to Skolefritidsordningen (SFO) or Aktivitetsskolen (AKS).{br}{br}Kindergarten expenses are not to be included here.',\n },\n dayCareExpenses: {\n fieldLabel: 'Enter expenses for SFO/AKS per month',\n required: 'You must enter your expenses for SFO/AKS per month.',\n },\n} satisfies typeof nbNO\n\nexport const translations = {\n 'nb-NO': { ChildrenWithAge: nbNO },\n 'en-GB': { ChildrenWithAge: enGB },\n}\n\nexport type Translation = (typeof translations)[keyof typeof translations]\n"],"mappings":"AAAA,MAAMA,IAAI,GAAG;EACXC,WAAW,EAAE;IACXC,KAAK,EAAE,aAAa;IACpBC,UAAU,EAAE,+BAA+B;IAC3CC,QAAQ,EAAE;EACZ,CAAC;EACDC,aAAa,EAAE;IACbF,UAAU,EAAE,yBAAyB;IACrCC,QAAQ,EAAE,+BAA+B;IACzCE,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXJ,UAAU,EAAE,4BAA4B;IACxCC,QAAQ,EAAE,mCAAmC;IAC7CE,MAAM,EAAE;EACV,CAAC;EACDE,sBAAsB,EAAE;IACtBL,UAAU,EAAE,8BAA8B;IAC1CC,QAAQ,EAAE;EACZ,CAAC;EACDK,2BAA2B,EAAE;IAC3BN,UAAU,EAAE,6BAA6B;IACzCC,QAAQ,EAAE;EACZ,CAAC;EACDM,WAAW,EAAE;IACXP,UAAU,EAAE,mCAAmC;IAC/CC,QAAQ,EAAE,iDAAiD;IAC3DO,QAAQ,EACN;EACJ,CAAC;EACDC,eAAe,EAAE;IACfT,UAAU,EAAE,sCAAsC;IAClDC,QAAQ,EAAE;EACZ;AACF,CAAC;AAED,MAAMS,IAAI,GAAG;EACXZ,WAAW,EAAE;IACXC,KAAK,EAAE,oBAAoB;IAC3BC,UAAU,EAAE,2CAA2C;IACvDC,QAAQ,EAAE;EACZ,CAAC;EACDC,aAAa,EAAE;IACbF,UAAU,EAAE,wCAAwC;IACpDC,QAAQ,EAAE,wCAAwC;IAClDE,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXJ,UAAU,EAAE,2BAA2B;IACvCC,QAAQ,EAAE,sCAAsC;IAChDE,MAAM,EAAE;EACV,CAAC;EACDE,sBAAsB,EAAE;IACtBL,UAAU,EAAE,2BAA2B;IACvCC,QAAQ,EAAE;EACZ,CAAC;EACDK,2BAA2B,EAAE;IAC3BN,UAAU,EAAE,+BAA+B;IAC3CC,QAAQ,EAAE;EACZ,CAAC;EACDM,WAAW,EAAE;IACXP,UAAU,EAAE,mCAAmC;IAC/CC,QAAQ,EAAE,2DAA2D;IACrEO,QAAQ,EACN;EACJ,CAAC;EACDC,eAAe,EAAE;IACfT,UAAU,EAAE,sCAAsC;IAClDC,QAAQ,EAAE;EACZ;AACF,CAAuB;AAEvB,OAAO,MAAMU,YAAY,GAAG;EAC1B,OAAO,EAAE;IAAEC,eAAe,EAAEf;EAAK,CAAC;EAClC,OAAO,EAAE;IAAEe,eAAe,EAAEF;EAAK;AACnC,CAAC"}
@@ -125,7 +125,8 @@ declare const _default: {
125
125
  BankAccountNumber: {
126
126
  label: string;
127
127
  errorRequired: string;
128
- errorPattern: string;
128
+ errorBankAccountNumber: string;
129
+ errorBankAccountNumberLength: string;
129
130
  };
130
131
  PhoneNumber: {
131
132
  label: string;
@@ -115,8 +115,9 @@ export default {
115
115
  },
116
116
  BankAccountNumber: {
117
117
  label: 'Bank account',
118
- errorRequired: 'Enter a valid account number. Account number is mandatory to fill out.',
119
- errorPattern: 'Invalid bank account number.'
118
+ errorRequired: 'You must enter an account number.',
119
+ errorBankAccountNumber: 'Invalid account number.',
120
+ errorBankAccountNumberLength: 'Invalid account number. Enter a valid organisation number with 11 digits.'
120
121
  },
121
122
  PhoneNumber: {
122
123
  label: 'Mobile number',
@@ -1 +1 @@
1
- {"version":3,"file":"en-GB.js","names":["Field","errorSummaryTitle","stateSummary","errorSummary","errorRequired","errorPattern","optionalLabelSuffix","SubmitButton","text","sendText","Isolation","commitButtonText","Step","summaryTitle","WizardEditButton","WizardPreviousButton","WizardNextButton","RemoveButton","SectionViewContainer","editButton","SectionEditContainer","doneButton","cancelButton","errorInSection","IterateViewContainer","removeButton","IterateEditContainer","errorInContainer","IteratePushContainer","createButton","itemsLimitReached","StringField","errorMinLength","errorMaxLength","NumberField","errorMinimum","errorMaximum","errorExclusiveMinimum","errorExclusiveMaximum","errorMultipleOf","BooleanField","yes","no","ToggleField","Date","label","Expiry","Email","FirstName","LastName","CompanyName","NationalIdentityNumber","errorFnr","errorFnrLength","errorDnr","errorDnrLength","errorMinimumAgeValidator","errorMinimumAgeValidatorLength","OrganizationNumber","errorOrgNo","errorOrgNoLength","BankAccountNumber","PhoneNumber","countryCodeLabel","warningRequired","PostalCodeAndCity","PostalCode","City","SelectCountry","placeholder","Password","ariaLabelShow","ariaLabelHide","Upload","errorInvalidFiles"],"sources":["../../../../../../src/extensions/forms/constants/locales/en-GB.ts"],"sourcesContent":["import nb from './nb-NO'\nexport default {\n 'en-GB': {\n /**\n * General\n */\n Field: {\n errorSummaryTitle: 'Please correct the following errors',\n stateSummary: 'Summary:',\n errorSummary: 'Please correct the following errors:',\n errorRequired: 'This field is required.',\n errorPattern: 'The value is invalid.',\n optionalLabelSuffix: '(optional)',\n },\n SubmitButton: {\n text: 'Send',\n sendText: 'Send',\n },\n Isolation: {\n commitButtonText: 'Add',\n },\n Step: {\n summaryTitle: 'Summary',\n },\n WizardEditButton: {\n text: 'Edit',\n },\n WizardPreviousButton: {\n text: 'Back',\n },\n WizardNextButton: {\n text: 'Next',\n },\n RemoveButton: {\n text: 'Remove',\n },\n SectionViewContainer: {\n editButton: 'Edit',\n },\n SectionEditContainer: {\n doneButton: 'Done',\n cancelButton: 'Cancel',\n errorInSection: 'Please correct the errors above.',\n },\n IterateViewContainer: {\n removeButton: 'Remove',\n editButton: 'Edit',\n },\n IterateEditContainer: {\n removeButton: 'Remove',\n doneButton: 'Done',\n cancelButton: 'Cancel',\n errorInContainer: 'Please correct the errors above.',\n },\n IteratePushContainer: {\n createButton: 'Add',\n itemsLimitReached: 'You have reached the limit of: {limit}',\n },\n\n /**\n * Base fields\n */\n StringField: {\n errorMinLength:\n 'The value can not be shorter than {minLength} characters.',\n errorMaxLength:\n 'The value can not be longer than {maxLength} characters.',\n },\n NumberField: {\n errorMinimum: 'The value must be at least {minimum}.',\n errorMaximum: 'The value must be a maximum of {maximum}.',\n errorExclusiveMinimum:\n 'The value must be greater than {exclusiveMinimum}.',\n errorExclusiveMaximum:\n 'The value must be less than {exclusiveMaximum}.',\n errorMultipleOf: 'The value must be a multiple of {multipleOf}.',\n },\n BooleanField: {\n yes: 'Yes',\n no: 'No',\n },\n ToggleField: {\n yes: 'Yes',\n no: 'No',\n },\n\n /**\n * Feature fields\n */\n Date: {\n label: 'Date',\n errorRequired: 'You must provide a valid date.',\n },\n Expiry: {\n label: 'Expiry date',\n },\n Email: {\n label: 'Email address',\n errorRequired: 'You must enter a Email address.',\n errorPattern: 'Invalid Email address. Enter a valid Email address.',\n },\n FirstName: {\n label: 'Given name',\n errorRequired: 'You must enter a given name (first name).',\n errorPattern:\n 'Enter a given name (first name) using only letters and characters such as hyphens and spaces.',\n },\n LastName: {\n label: 'Surname',\n errorRequired: 'You must enter a surname (last name).',\n errorPattern:\n 'Enter a surname (last name) using only letters and characters such as hyphens and spaces.',\n },\n CompanyName: {\n label: 'Company name',\n errorRequired: 'You must enter a company name.',\n },\n NationalIdentityNumber: {\n label: 'National identity number (11 digits)',\n errorRequired: 'You must enter a national identity number.',\n errorFnr: 'Invalid national identity number.',\n errorFnrLength:\n 'Invalid national identity number. Enter a valid national identity number with 11 digits.',\n errorDnr: 'Invalid D number.',\n errorDnrLength:\n 'Invalid D number. Enter a valid d-number with 11 digits.',\n errorMinimumAgeValidator: 'Must be at least {age} years of age.',\n errorMinimumAgeValidatorLength:\n 'Invalid birth of date. Enter a valid birth of date (incl. century digit) with 7 digits.',\n },\n OrganizationNumber: {\n label: 'Organisation number',\n errorRequired: 'You must enter an organisation number.',\n errorOrgNo: 'Invalid organisation number.',\n errorOrgNoLength:\n 'Invalid organisation number. Enter a valid organisation number with 9 digits.',\n },\n BankAccountNumber: {\n label: 'Bank account',\n errorRequired:\n 'Enter a valid account number. Account number is mandatory to fill out.',\n errorPattern: 'Invalid bank account number.',\n },\n PhoneNumber: {\n label: 'Mobile number',\n countryCodeLabel: 'Country code',\n errorRequired:\n 'Mobile number must be filled in. If you don’t have a mobile number, you can enter another phone number.',\n warningRequired:\n 'You have not entered a mobile number. You can still use this number if it is correct.',\n },\n PostalCodeAndCity: {\n label: 'Postcode and city',\n },\n PostalCode: {\n label: 'Postc.',\n errorRequired: 'You must enter a postcode.',\n errorPattern: 'This is not a valid postcode (four-digits).',\n },\n City: {\n label: 'City',\n errorRequired: 'You must enter a city name.',\n errorPattern:\n 'City names can only contain letters and valid characters such as hyphens and spaces.',\n },\n SelectCountry: {\n label: 'Country',\n placeholder: 'Select country',\n errorRequired: 'You must select a country from the list.',\n },\n Password: {\n label: 'Password',\n ariaLabelShow: 'Show password',\n ariaLabelHide: 'Hide password',\n },\n Upload: {\n errorRequired: 'You must upload a file.',\n errorInvalidFiles: 'Remove all files that have errors.',\n },\n } satisfies (typeof nb)['nb-NO'],\n}\n"],"mappings":"AACA,eAAe;EACb,OAAO,EAAE;IAIPA,KAAK,EAAE;MACLC,iBAAiB,EAAE,qCAAqC;MACxDC,YAAY,EAAE,UAAU;MACxBC,YAAY,EAAE,sCAAsC;MACpDC,aAAa,EAAE,yBAAyB;MACxCC,YAAY,EAAE,uBAAuB;MACrCC,mBAAmB,EAAE;IACvB,CAAC;IACDC,YAAY,EAAE;MACZC,IAAI,EAAE,MAAM;MACZC,QAAQ,EAAE;IACZ,CAAC;IACDC,SAAS,E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AAM;MACbzC,aAAa,EAAE,6BAA6B;MAC5CC,YAAY,EACV;IACJ,CAAC;IACD+D,aAAa,EAAE;MACbvB,KAAK,EAAE,SAAS;MAChBwB,WAAW,EAAE,gBAAgB;MAC7BjE,aAAa,EAAE;IACjB,CAAC;IACDkE,QAAQ,EAAE;MACRzB,KAAK,EAAE,UAAU;MACjB0B,aAAa,EAAE,eAAe;MAC9BC,aAAa,EAAE;IACjB,CAAC;IACDC,MAAM,EAAE;MACNrE,aAAa,EAAE,yBAAyB;MACxCsE,iBAAiB,EAAE;IACrB;EACF;AACF,CAAC"}
1
+ {"version":3,"file":"en-GB.js","names":["Field","errorSummaryTitle","stateSummary","errorSummary","errorRequired","errorPattern","optionalLabelSuffix","SubmitButton","text","sendText","Isolation","commitButtonText","Step","summaryTitle","WizardEditButton","WizardPreviousButton","WizardNextButton","RemoveButton","SectionViewContainer","editButton","SectionEditContainer","doneButton","cancelButton","errorInSection","IterateViewContainer","removeButton","IterateEditContainer","errorInContainer","IteratePushContainer","createButton","itemsLimitReached","StringField","errorMinLength","errorMaxLength","NumberField","errorMinimum","errorMaximum","errorExclusiveMinimum","errorExclusiveMaximum","errorMultipleOf","BooleanField","yes","no","ToggleField","Date","label","Expiry","Email","FirstName","LastName","CompanyName","NationalIdentityNumber","errorFnr","errorFnrLength","errorDnr","errorDnrLength","errorMinimumAgeValidator","errorMinimumAgeValidatorLength","OrganizationNumber","errorOrgNo","errorOrgNoLength","BankAccountNumber","errorBankAccountNumber","errorBankAccountNumberLength","PhoneNumber","countryCodeLabel","warningRequired","PostalCodeAndCity","PostalCode","City","SelectCountry","placeholder","Password","ariaLabelShow","ariaLabelHide","Upload","errorInvalidFiles"],"sources":["../../../../../../src/extensions/forms/constants/locales/en-GB.ts"],"sourcesContent":["import nb from './nb-NO'\nexport default {\n 'en-GB': {\n /**\n * General\n */\n Field: {\n errorSummaryTitle: 'Please correct the following errors',\n stateSummary: 'Summary:',\n errorSummary: 'Please correct the following errors:',\n errorRequired: 'This field is required.',\n errorPattern: 'The value is invalid.',\n optionalLabelSuffix: '(optional)',\n },\n SubmitButton: {\n text: 'Send',\n sendText: 'Send',\n },\n Isolation: {\n commitButtonText: 'Add',\n },\n Step: {\n summaryTitle: 'Summary',\n },\n WizardEditButton: {\n text: 'Edit',\n },\n WizardPreviousButton: {\n text: 'Back',\n },\n WizardNextButton: {\n text: 'Next',\n },\n RemoveButton: {\n text: 'Remove',\n },\n SectionViewContainer: {\n editButton: 'Edit',\n },\n SectionEditContainer: {\n doneButton: 'Done',\n cancelButton: 'Cancel',\n errorInSection: 'Please correct the errors above.',\n },\n IterateViewContainer: {\n removeButton: 'Remove',\n editButton: 'Edit',\n },\n IterateEditContainer: {\n removeButton: 'Remove',\n doneButton: 'Done',\n cancelButton: 'Cancel',\n errorInContainer: 'Please correct the errors above.',\n },\n IteratePushContainer: {\n createButton: 'Add',\n itemsLimitReached: 'You have reached the limit of: {limit}',\n },\n\n /**\n * Base fields\n */\n StringField: {\n errorMinLength:\n 'The value can not be shorter than {minLength} characters.',\n errorMaxLength:\n 'The value can not be longer than {maxLength} characters.',\n },\n NumberField: {\n errorMinimum: 'The value must be at least {minimum}.',\n errorMaximum: 'The value must be a maximum of {maximum}.',\n errorExclusiveMinimum:\n 'The value must be greater than {exclusiveMinimum}.',\n errorExclusiveMaximum:\n 'The value must be less than {exclusiveMaximum}.',\n errorMultipleOf: 'The value must be a multiple of {multipleOf}.',\n },\n BooleanField: {\n yes: 'Yes',\n no: 'No',\n },\n ToggleField: {\n yes: 'Yes',\n no: 'No',\n },\n\n /**\n * Feature fields\n */\n Date: {\n label: 'Date',\n errorRequired: 'You must provide a valid date.',\n },\n Expiry: {\n label: 'Expiry date',\n },\n Email: {\n label: 'Email address',\n errorRequired: 'You must enter a Email address.',\n errorPattern: 'Invalid Email address. Enter a valid Email address.',\n },\n FirstName: {\n label: 'Given name',\n errorRequired: 'You must enter a given name (first name).',\n errorPattern:\n 'Enter a given name (first name) using only letters and characters such as hyphens and spaces.',\n },\n LastName: {\n label: 'Surname',\n errorRequired: 'You must enter a surname (last name).',\n errorPattern:\n 'Enter a surname (last name) using only letters and characters such as hyphens and spaces.',\n },\n CompanyName: {\n label: 'Company name',\n errorRequired: 'You must enter a company name.',\n },\n NationalIdentityNumber: {\n label: 'National identity number (11 digits)',\n errorRequired: 'You must enter a national identity number.',\n errorFnr: 'Invalid national identity number.',\n errorFnrLength:\n 'Invalid national identity number. Enter a valid national identity number with 11 digits.',\n errorDnr: 'Invalid D number.',\n errorDnrLength:\n 'Invalid D number. Enter a valid d-number with 11 digits.',\n errorMinimumAgeValidator: 'Must be at least {age} years of age.',\n errorMinimumAgeValidatorLength:\n 'Invalid birth of date. Enter a valid birth of date (incl. century digit) with 7 digits.',\n },\n OrganizationNumber: {\n label: 'Organisation number',\n errorRequired: 'You must enter an organisation number.',\n errorOrgNo: 'Invalid organisation number.',\n errorOrgNoLength:\n 'Invalid organisation number. Enter a valid organisation number with 9 digits.',\n },\n BankAccountNumber: {\n label: 'Bank account',\n errorRequired: 'You must enter an account number.',\n errorBankAccountNumber: 'Invalid account number.',\n errorBankAccountNumberLength:\n 'Invalid account number. Enter a valid organisation number with 11 digits.',\n },\n PhoneNumber: {\n label: 'Mobile number',\n countryCodeLabel: 'Country code',\n errorRequired:\n 'Mobile number must be filled in. If you don’t have a mobile number, you can enter another phone number.',\n warningRequired:\n 'You have not entered a mobile number. You can still use this number if it is correct.',\n },\n PostalCodeAndCity: {\n label: 'Postcode and city',\n },\n PostalCode: {\n label: 'Postc.',\n errorRequired: 'You must enter a postcode.',\n errorPattern: 'This is not a valid postcode (four-digits).',\n },\n City: {\n label: 'City',\n errorRequired: 'You must enter a city name.',\n errorPattern:\n 'City names can only contain letters and valid characters such as hyphens and spaces.',\n },\n SelectCountry: {\n label: 'Country',\n placeholder: 'Select country',\n errorRequired: 'You must select a country from the list.',\n },\n Password: {\n label: 'Password',\n ariaLabelShow: 'Show password',\n ariaLabelHide: 'Hide password',\n },\n Upload: {\n errorRequired: 'You must upload a file.',\n errorInvalidFiles: 'Remove all files that have errors.',\n },\n } satisfies (typeof nb)['nb-NO'],\n}\n"],"mappings":"AACA,eAAe;EACb,OAAO,EAAE;IAIPA,KAAK,EAAE;MACLC,iBAAiB,EAAE,qCAAqC;MACxDC,YAAY,EAAE,UAAU;MACxBC,YAAY,EAAE,sCAAsC;MACpDC,aAAa,EAAE,yBAAyB;MACxCC,YAAY,EAAE,uBAAuB;MACrCC,mBAAmB,EAAE;IACvB,CAAC;IACDC,YAAY,EAAE;MACZC,IAAI,EAAE,MAAM;MACZC,QAAQ,EAAE;IACZ,CAAC;IACDC,SAAS,EAAE;MACTC,gBAAgB,EAAE;IACpB,CAAC;IACDC,IAAI,EAAE;MACJC,YAAY,EAAE;IAChB,CAAC;IACDC,gBAAgB,EAAE;MAChBN,IAAI,EAAE;IACR,CAAC;IACDO,oBAAoB,EAAE;MACpBP,IAAI,EAAE;IACR,CAAC;IACDQ,gBAAgB,EAAE;MAChBR,IAAI,EAAE;IACR,CAAC;IACDS,YAAY,EAAE;MACZT,IAAI,EAAE;IACR,CAAC;IACDU,oBAAoB,EAAE;MACpBC,UAAU,EAAE;IACd,CAAC;IACDC,oBAAoB,EAAE;MACpBC,UAAU,EAAE,MAAM;MAClBC,YAAY,EAAE,QAAQ;MACtBC,cAAc,EAAE;IAClB,CAAC;IACDC,oBAAoB,EAAE;MACpBC,YAAY,EAAE,QAAQ;MACtBN,UAAU,EAAE;IACd,CAAC;IACDO,oBAAoB,EAAE;MACpBD,YAAY,EAAE,QAAQ;MACtBJ,UAAU,EAAE,MAAM;MAClBC,YAAY,EAAE,QAAQ;MACtBK,gBAAgB,EAAE;IACpB,CAAC;IACDC,oBAAoB,EAAE;MACpBC,YAAY,EAAE,KAAK;MACnBC,iBAAiB,EAAE;IACrB,CAAC;IAKDC,WAAW,EAAE;MACXC,cAAc,EACZ,2DAA2D;MAC7DC,cAAc,EACZ;IACJ,CAAC;IACDC,WAAW,EAAE;M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K,EAAE,cAAc;MACrBzC,aAAa,EAAE,mCAAmC;MAClD0D,sBAAsB,EAAE,yBAAyB;MACjDC,4BAA4B,EAC1B;IACJ,CAAC;IACDC,WAAW,EAAE;MACXnB,KAAK,EAAE,eAAe;MACtBoB,gBAAgB,EAAE,cAAc;MAChC7D,aAAa,EACX,yGAAyG;MAC3G8D,eAAe,EACb;IACJ,CAAC;IACDC,iBAAiB,EAAE;MACjBtB,KAAK,EAAE;IACT,CAAC;IACDuB,UAAU,EAAE;MACVvB,KAAK,EAAE,QAAQ;MACfzC,aAAa,EAAE,4BAA4B;MAC3CC,YAAY,EAAE;IAChB,CAAC;IACDgE,IAAI,EAAE;MACJxB,KAAK,EAAE,MAAM;MACbzC,aAAa,EAAE,6BAA6B;MAC5CC,YAAY,EACV;IACJ,CAAC;IACDiE,aAAa,EAAE;MACbzB,KAAK,EAAE,SAAS;MAChB0B,WAAW,EAAE,gBAAgB;MAC7BnE,aAAa,EAAE;IACjB,CAAC;IACDoE,QAAQ,EAAE;MACR3B,KAAK,EAAE,UAAU;MACjB4B,aAAa,EAAE,eAAe;MAC9BC,aAAa,EAAE;IACjB,CAAC;IACDC,MAAM,EAAE;MACNvE,aAAa,EAAE,yBAAyB;MACxCwE,iBAAiB,EAAE;IACrB;EACF;AACF,CAAC"}
@@ -116,7 +116,8 @@ declare const _default: {
116
116
  BankAccountNumber: {
117
117
  label: string;
118
118
  errorRequired: string;
119
- errorPattern: string;
119
+ errorBankAccountNumber: string;
120
+ errorBankAccountNumberLength: string;
120
121
  };
121
122
  PhoneNumber: {
122
123
  label: string;
@@ -116,7 +116,8 @@ declare const locales: {
116
116
  BankAccountNumber: {
117
117
  label: string;
118
118
  errorRequired: string;
119
- errorPattern: string;
119
+ errorBankAccountNumber: string;
120
+ errorBankAccountNumberLength: string;
120
121
  };
121
122
  PhoneNumber: {
122
123
  label: string;
@@ -269,7 +270,8 @@ declare const locales: {
269
270
  BankAccountNumber: {
270
271
  label: string;
271
272
  errorRequired: string;
272
- errorPattern: string;
273
+ errorBankAccountNumber: string;
274
+ errorBankAccountNumberLength: string;
273
275
  };
274
276
  PhoneNumber: {
275
277
  label: string;