@mrfylke/contact-form 0.1.24 → 0.1.26

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 (297) hide show
  1. package/README.md +42 -24
  2. package/lib/ContactFormRoot.d.ts +2 -2
  3. package/lib/ContactFormRoot.d.ts.map +1 -1
  4. package/lib/ContactFormRoot.js +6 -4
  5. package/lib/components/button/link.d.ts +1 -1
  6. package/lib/components/button/link.d.ts.map +1 -1
  7. package/lib/components/button/utils.d.ts +2 -2
  8. package/lib/components/button/utils.d.ts.map +1 -1
  9. package/lib/components/checkbox/checkbox.d.ts +1 -1
  10. package/lib/components/checkbox/checkbox.d.ts.map +1 -1
  11. package/lib/components/error-message/error-message.d.ts +1 -1
  12. package/lib/components/error-message/error-message.d.ts.map +1 -1
  13. package/lib/components/external-link-page.d.ts +1 -1
  14. package/lib/components/external-link-page.d.ts.map +1 -1
  15. package/lib/components/form/date-selector.d.ts +1 -1
  16. package/lib/components/form/date-selector.d.ts.map +1 -1
  17. package/lib/components/form/date-selector.js +2 -2
  18. package/lib/components/form/departure-time-field.d.ts +1 -1
  19. package/lib/components/form/departure-time-field.d.ts.map +1 -1
  20. package/lib/components/form/description-modal.d.ts +1 -1
  21. package/lib/components/form/description-modal.d.ts.map +1 -1
  22. package/lib/components/form/field-wrapper-with-error/index.d.ts +1 -1
  23. package/lib/components/form/field-wrapper-with-error/index.d.ts.map +1 -1
  24. package/lib/components/form/fieldset/index.d.ts +1 -1
  25. package/lib/components/form/fieldset/index.d.ts.map +1 -1
  26. package/lib/components/form/file-input.d.ts +1 -1
  27. package/lib/components/form/file-input.d.ts.map +1 -1
  28. package/lib/components/form/form-component-label/index.d.ts +3 -2
  29. package/lib/components/form/form-component-label/index.d.ts.map +1 -1
  30. package/lib/components/form/form-component-label/index.js +2 -2
  31. package/lib/components/form/input.d.ts +1 -1
  32. package/lib/components/form/input.d.ts.map +1 -1
  33. package/lib/components/form/radio.d.ts +1 -1
  34. package/lib/components/form/radio.d.ts.map +1 -1
  35. package/lib/components/form/searchable-select/searchable-select.d.ts +1 -1
  36. package/lib/components/form/searchable-select/searchable-select.d.ts.map +1 -1
  37. package/lib/components/form/searchable-select/searchable-select.js +1 -1
  38. package/lib/components/form/select.d.ts +1 -1
  39. package/lib/components/form/select.d.ts.map +1 -1
  40. package/lib/components/form/select.js +1 -1
  41. package/lib/components/form/textarea.d.ts +1 -1
  42. package/lib/components/form/textarea.d.ts.map +1 -1
  43. package/lib/components/form/time-selector.d.ts +1 -1
  44. package/lib/components/form/time-selector.d.ts.map +1 -1
  45. package/lib/components/form/time-selector.js +2 -2
  46. package/lib/components/icon/checkbox-icon.d.ts +1 -1
  47. package/lib/components/icon/checkbox-icon.d.ts.map +1 -1
  48. package/lib/components/icon/color-icon.d.ts +1 -1
  49. package/lib/components/icon/color-icon.d.ts.map +1 -1
  50. package/lib/components/icon/generated-icons.d.ts +422 -262
  51. package/lib/components/icon/generated-icons.d.ts.map +1 -1
  52. package/lib/components/icon/generated-icons.js +1931 -1771
  53. package/lib/components/icon/illustration.d.ts +1 -1
  54. package/lib/components/icon/illustration.d.ts.map +1 -1
  55. package/lib/components/icon/image.d.ts +1 -1
  56. package/lib/components/icon/image.d.ts.map +1 -1
  57. package/lib/components/icon/mono-icon.d.ts +1 -1
  58. package/lib/components/icon/mono-icon.d.ts.map +1 -1
  59. package/lib/components/icon/utils.d.ts.map +1 -1
  60. package/lib/components/icon/utils.js +6 -6
  61. package/lib/components/loading/index.d.ts +2 -2
  62. package/lib/components/loading/index.d.ts.map +1 -1
  63. package/lib/components/section-card/section-card.d.ts +1 -1
  64. package/lib/components/section-card/section-card.d.ts.map +1 -1
  65. package/lib/components/typography/index.d.ts +6 -6
  66. package/lib/components/typography/index.d.ts.map +1 -1
  67. package/lib/contact.module.css +0 -9
  68. package/lib/error-content/error-content.d.ts +1 -1
  69. package/lib/error-content/error-content.d.ts.map +1 -1
  70. package/lib/group-travel/index.d.ts +1 -1
  71. package/lib/group-travel/index.d.ts.map +1 -1
  72. package/lib/group-travel/index.js +1 -2
  73. package/lib/index.d.ts +3 -5
  74. package/lib/index.d.ts.map +1 -1
  75. package/lib/index.js +5 -10
  76. package/lib/journey-info/events.d.ts.map +1 -1
  77. package/lib/journey-info/index.d.ts +1 -1
  78. package/lib/journey-info/index.d.ts.map +1 -1
  79. package/lib/journey-info/index.js +10 -8
  80. package/lib/journey-info/journeyInfoStateMachine.d.ts +2 -2
  81. package/lib/journey-info/journeyInfoStateMachine.d.ts.map +1 -1
  82. package/lib/journey-info/journeyInfoStateMachine.js +1 -1
  83. package/lib/layouts/contact-form-container.d.ts +1 -1
  84. package/lib/layouts/contact-form-container.d.ts.map +1 -1
  85. package/lib/layouts/contact-page-layout.d.ts +1 -8
  86. package/lib/layouts/contact-page-layout.d.ts.map +1 -1
  87. package/lib/layouts/contact-page-layout.js +8 -93
  88. package/lib/layouts/contact-pages.d.ts +20 -0
  89. package/lib/layouts/contact-pages.d.ts.map +1 -0
  90. package/lib/layouts/contact-pages.js +124 -0
  91. package/lib/layouts/index.d.ts +2 -1
  92. package/lib/layouts/index.d.ts.map +1 -1
  93. package/lib/layouts/index.js +5 -2
  94. package/lib/lines/use-departures.js +2 -2
  95. package/lib/lines/use-lines.d.ts +2 -2
  96. package/lib/lines/use-lines.js +1 -1
  97. package/lib/lost-property/LostPropertyForm.d.ts +2 -1
  98. package/lib/lost-property/LostPropertyForm.d.ts.map +1 -1
  99. package/lib/lost-property/LostPropertyMachine.d.ts +2 -2
  100. package/lib/lost-property/LostPropertyMachine.d.ts.map +1 -1
  101. package/lib/lost-property/LostPropertyMachine.js +1 -1
  102. package/lib/lost-property/index.d.ts +1 -1
  103. package/lib/lost-property/index.d.ts.map +1 -1
  104. package/lib/lost-property-external/index.d.ts +1 -1
  105. package/lib/lost-property-external/index.d.ts.map +1 -1
  106. package/lib/lost-property-external/index.js +1 -2
  107. package/lib/means-of-transport/events.d.ts.map +1 -1
  108. package/lib/means-of-transport/forms/delayForm.d.ts +1 -1
  109. package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -1
  110. package/lib/means-of-transport/forms/driverForm.d.ts +1 -1
  111. package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -1
  112. package/lib/means-of-transport/forms/injuryForm.d.ts +1 -1
  113. package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
  114. package/lib/means-of-transport/forms/serviceOfferingForm.d.ts +1 -1
  115. package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -1
  116. package/lib/means-of-transport/forms/serviceOfferingForm.js +3 -1
  117. package/lib/means-of-transport/forms/stopForm.d.ts +1 -1
  118. package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -1
  119. package/lib/means-of-transport/forms/transportationForm.d.ts +1 -1
  120. package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -1
  121. package/lib/means-of-transport/index.d.ts +1 -1
  122. package/lib/means-of-transport/index.d.ts.map +1 -1
  123. package/lib/means-of-transport/index.js +8 -2
  124. package/lib/means-of-transport/means-of-transport-form-machine.d.ts +4 -2
  125. package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -1
  126. package/lib/means-of-transport/means-of-transport-form-machine.js +9 -3
  127. package/lib/modules/config/context.d.ts +13 -38
  128. package/lib/modules/config/context.d.ts.map +1 -1
  129. package/lib/modules/config/context.js +16 -52
  130. package/lib/modules/config/default-submit.d.ts +3 -0
  131. package/lib/modules/config/default-submit.d.ts.map +1 -0
  132. package/lib/modules/config/default-submit.js +13 -0
  133. package/lib/modules/config/index.d.ts +1 -0
  134. package/lib/modules/config/index.d.ts.map +1 -1
  135. package/lib/modules/config/index.js +1 -0
  136. package/lib/modules/config/types.d.ts +60 -78
  137. package/lib/modules/config/types.d.ts.map +1 -1
  138. package/lib/modules/org-data/index.d.ts +1 -2
  139. package/lib/modules/org-data/index.d.ts.map +1 -1
  140. package/lib/modules/org-data/index.js +1 -2
  141. package/lib/modules/theme/theme-context.d.ts +1 -1
  142. package/lib/modules/theme/theme-context.d.ts.map +1 -1
  143. package/lib/modules/transport-mode/filter/filter.d.ts +1 -1
  144. package/lib/modules/transport-mode/filter/filter.d.ts.map +1 -1
  145. package/lib/modules/transport-mode/icon/index.d.ts +4 -4
  146. package/lib/modules/transport-mode/icon/index.d.ts.map +1 -1
  147. package/lib/modules/transport-mode/types.d.ts +3 -5
  148. package/lib/modules/transport-mode/types.d.ts.map +1 -1
  149. package/lib/modules/transport-mode/types.js +3 -138
  150. package/lib/modules/transport-mode/utils.d.ts +2 -2
  151. package/lib/modules/transport-mode/utils.d.ts.map +1 -1
  152. package/lib/modules/transport-mode/utils.js +39 -6
  153. package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts +1 -1
  154. package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -1
  155. package/lib/refund/forms/refund-and-travel-guarantee/index.js +1 -1
  156. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts +1 -1
  157. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -1
  158. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +1 -1
  159. package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts +1 -1
  160. package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -1
  161. package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts +2 -2
  162. package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
  163. package/lib/refund/forms/refund-ticket/appTicketRefund.js +18 -2
  164. package/lib/refund/forms/refund-ticket/index.d.ts +1 -1
  165. package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
  166. package/lib/refund/forms/refund-ticket/index.js +1 -1
  167. package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts +1 -1
  168. package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
  169. package/lib/refund/forms/refund-ticket/otherTicketRefund.js +16 -4
  170. package/lib/refund/forms/residualValueOnTravelCard/index.d.ts +1 -1
  171. package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
  172. package/lib/refund/forms/residualValueOnTravelCard/index.js +1 -2
  173. package/lib/refund/index.d.ts +1 -1
  174. package/lib/refund/index.d.ts.map +1 -1
  175. package/lib/refund/index.js +9 -0
  176. package/lib/refund/refundFormMachine.d.ts +10 -2
  177. package/lib/refund/refundFormMachine.d.ts.map +1 -1
  178. package/lib/refund/refundFormMachine.js +23 -2
  179. package/lib/server/departures-route-handler.d.ts +27 -0
  180. package/lib/server/departures-route-handler.d.ts.map +1 -0
  181. package/lib/server/departures-route-handler.js +93 -0
  182. package/lib/server/index.d.ts +2 -0
  183. package/lib/server/index.d.ts.map +1 -1
  184. package/lib/server/index.js +5 -1
  185. package/lib/server/journey-planner/authority.d.ts +2 -2
  186. package/lib/server/journey-planner/authority.js +3 -3
  187. package/lib/server/journey-planner/index.d.ts.map +1 -1
  188. package/lib/server/journey-planner/index.js +8 -9
  189. package/lib/server/journey-planner/journey-gql/lines.generated.d.ts +1 -0
  190. package/lib/server/journey-planner/journey-gql/lines.generated.d.ts.map +1 -1
  191. package/lib/server/journey-planner/journey-gql/lines.generated.js +1 -0
  192. package/lib/server/journey-planner/validators.d.ts +4 -4
  193. package/lib/server/journey-planner/validators.js +3 -3
  194. package/lib/server/lines-route-handler.d.ts +7 -18
  195. package/lib/server/lines-route-handler.d.ts.map +1 -1
  196. package/lib/server/lines-route-handler.js +15 -17
  197. package/lib/server/submit-route-handler.d.ts +20 -0
  198. package/lib/server/submit-route-handler.d.ts.map +1 -0
  199. package/lib/server/submit-route-handler.js +62 -0
  200. package/lib/success-content/success-content.d.ts +1 -1
  201. package/lib/success-content/success-content.d.ts.map +1 -1
  202. package/lib/ticket-control/events.d.ts +1 -1
  203. package/lib/ticket-control/events.d.ts.map +1 -1
  204. package/lib/ticket-control/forms/feeComplaintForm.d.ts +1 -1
  205. package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -1
  206. package/lib/ticket-control/forms/feeComplaintForm.js +5 -1
  207. package/lib/ticket-control/forms/feedbackForm.d.ts +1 -1
  208. package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -1
  209. package/lib/ticket-control/forms/postponePayment.d.ts +1 -1
  210. package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -1
  211. package/lib/ticket-control/forms/postponePayment.js +5 -1
  212. package/lib/ticket-control/index.d.ts +1 -1
  213. package/lib/ticket-control/index.d.ts.map +1 -1
  214. package/lib/ticket-control/index.js +2 -0
  215. package/lib/ticket-control/ticket-control-form-machine.d.ts +8 -4
  216. package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -1
  217. package/lib/ticket-control/ticket-control-form-machine.js +14 -3
  218. package/lib/ticketing/events.d.ts.map +1 -1
  219. package/lib/ticketing/forms/app/appAccountForm.d.ts +1 -1
  220. package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -1
  221. package/lib/ticketing/forms/app/appTicketingForm.d.ts +1 -1
  222. package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -1
  223. package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts +1 -1
  224. package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -1
  225. package/lib/ticketing/forms/app/index.d.ts +1 -1
  226. package/lib/ticketing/forms/app/index.d.ts.map +1 -1
  227. package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts +1 -1
  228. package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -1
  229. package/lib/ticketing/forms/travel-card/index.d.ts +1 -1
  230. package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -1
  231. package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts +1 -1
  232. package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
  233. package/lib/ticketing/forms/travel-card/orderTravelCard.js +1 -1
  234. package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts +1 -1
  235. package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -1
  236. package/lib/ticketing/forms/webshop/index.d.ts +1 -1
  237. package/lib/ticketing/forms/webshop/index.d.ts.map +1 -1
  238. package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts +1 -1
  239. package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -1
  240. package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts +1 -1
  241. package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -1
  242. package/lib/ticketing/index.d.ts +1 -1
  243. package/lib/ticketing/index.d.ts.map +1 -1
  244. package/lib/ticketing/ticketingStateMachine.d.ts +2 -2
  245. package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -1
  246. package/lib/translations/commons.d.ts +1 -0
  247. package/lib/translations/commons.d.ts.map +1 -1
  248. package/lib/translations/commons.js +4 -4
  249. package/lib/translations/index.d.ts +2 -6
  250. package/lib/translations/index.d.ts.map +1 -1
  251. package/lib/translations/index.js +1 -9
  252. package/lib/translations/language-context.d.ts +3 -11
  253. package/lib/translations/language-context.d.ts.map +1 -1
  254. package/lib/translations/language-context.js +1 -31
  255. package/lib/translations/merge-overrides.d.ts +3 -9
  256. package/lib/translations/merge-overrides.d.ts.map +1 -1
  257. package/lib/translations/merge-overrides.js +3 -15
  258. package/lib/translations/pages/contact.d.ts +15 -4
  259. package/lib/translations/pages/contact.d.ts.map +1 -1
  260. package/lib/translations/pages/contact.js +17 -20
  261. package/lib/translations/server/endpoints.d.ts +0 -62
  262. package/lib/translations/server/endpoints.d.ts.map +1 -1
  263. package/lib/translations/server/endpoints.js +1 -139
  264. package/lib/translations/translations-context.d.ts +1 -1
  265. package/lib/translations/translations-context.d.ts.map +1 -1
  266. package/lib/translations/types.d.ts +7 -13
  267. package/lib/translations/types.d.ts.map +1 -1
  268. package/lib/translations/utils.d.ts +0 -7
  269. package/lib/translations/utils.d.ts.map +1 -1
  270. package/lib/translations/utils.js +0 -26
  271. package/lib/types/submit-payloads.d.ts +1 -0
  272. package/lib/types/submit-payloads.d.ts.map +1 -1
  273. package/lib/types.d.ts.map +1 -1
  274. package/lib/validation/validationRules.d.ts.map +1 -1
  275. package/lib/validation/validationRules.js +7 -0
  276. package/package.json +37 -32
  277. package/lib/components/icon/icon-wrapper.d.ts +0 -30
  278. package/lib/components/icon/icon-wrapper.d.ts.map +0 -1
  279. package/lib/components/icon/icon-wrapper.js +0 -39
  280. package/lib/components/icon/mono-icon-new.d.ts +0 -32
  281. package/lib/components/icon/mono-icon-new.d.ts.map +0 -1
  282. package/lib/components/icon/mono-icon-new.js +0 -43
  283. package/lib/translations/common/index.d.ts +0 -3
  284. package/lib/translations/common/index.d.ts.map +0 -1
  285. package/lib/translations/common/index.js +0 -7
  286. package/lib/translations/common/layout.d.ts +0 -8
  287. package/lib/translations/common/layout.d.ts.map +0 -1
  288. package/lib/translations/common/layout.js +0 -39
  289. package/lib/translations/common/titles.d.ts +0 -4
  290. package/lib/translations/common/titles.d.ts.map +0 -1
  291. package/lib/translations/common/titles.js +0 -25
  292. package/lib/translations/json-to-override.d.ts +0 -19
  293. package/lib/translations/json-to-override.d.ts.map +0 -1
  294. package/lib/translations/json-to-override.js +0 -65
  295. package/lib/translations/load-org-translations.d.ts +0 -19
  296. package/lib/translations/load-org-translations.d.ts.map +0 -1
  297. package/lib/translations/load-org-translations.js +0 -23
@@ -3,5 +3,5 @@ export type IllustrationProps = Omit<React.JSX.IntrinsicElements['img'], 'src'>
3
3
  image: Illustrations;
4
4
  alt: string;
5
5
  };
6
- export declare function Illustration({ image, ...props }: IllustrationProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Illustration({ image, ...props }: IllustrationProps): import("react").JSX.Element;
7
7
  //# sourceMappingURL=illustration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"illustration.d.ts","sourceRoot":"","sources":["../../../src/components/icon/illustration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGzD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAClC,KAAK,CACN,GAAG;IACF,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAgBlE"}
1
+ {"version":3,"file":"illustration.d.ts","sourceRoot":"","sources":["../../../src/components/icon/illustration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGzD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAClC,KAAK,CACN,GAAG;IACF,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAgBlE"}
@@ -2,6 +2,6 @@ import { Images } from './generated-icons';
2
2
  type ColorImageProps = Omit<React.JSX.IntrinsicElements['img'], 'src'> & {
3
3
  image: Images;
4
4
  };
5
- export declare function Image({ image, ...props }: ColorImageProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Image({ image, ...props }: ColorImageProps): import("react").JSX.Element;
6
6
  export {};
7
7
  //# sourceMappingURL=image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/icon/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGlD,KAAK,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IACvE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAkBzD"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/icon/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGlD,KAAK,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IACvE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAkBzD"}
@@ -24,6 +24,6 @@ export type MonoIconProps = Omit<React.JSX.IntrinsicElements['img'], 'src'> & {
24
24
  interactiveColor?: InteractiveColor;
25
25
  interactiveState?: InteractiveState;
26
26
  };
27
- export declare function MonoIcon({ icon, size, overrideMode, interactiveColor, interactiveState, ...props }: MonoIconProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function MonoIcon({ icon, size, overrideMode, interactiveColor, interactiveState, ...props }: MonoIconProps): import("react").JSX.Element;
28
28
  export default MonoIcon;
29
29
  //# sourceMappingURL=mono-icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mono-icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/mono-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAS,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AAIvB,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CA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ACJ,IAAe,EACf,YAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,aAAa,+BAoBf;AAED,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/icon/utils.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAShE,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE/C"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/icon/utils.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAOhE,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE/C"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useSize = useSize;
4
- const SIZE_MAP = {
5
- xSmall: 16,
6
- small: 20,
7
- normal: 24,
8
- large: 32,
9
- };
4
+ // Icon size utilities
5
+ const theme_1 = require("@atb-as/theme");
6
+ // Icon sizes are brand-invariant design tokens (identical across every
7
+ // @atb-as/theme brand variant); AtB is used here only as the source brand.
8
+ const SIZE_MAP = (0, theme_1.createThemesFor)(theme_1.ThemeVariant.AtB)
9
+ .light.icon.size;
10
10
  function useSize(size) {
11
11
  return SIZE_MAP[size] || SIZE_MAP.normal;
12
12
  }
@@ -7,9 +7,9 @@ export type LoadingProps = {
7
7
  text: string;
8
8
  testID?: string;
9
9
  };
10
- export declare function Loading({ text, testID }: LoadingProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function Loading({ text, testID }: LoadingProps): import("react").JSX.Element;
11
11
  export declare function LoadingIcon({ size, a11yText, }: {
12
12
  size?: ColorIconProps['size'];
13
13
  a11yText?: string;
14
- }): import("react/jsx-runtime").JSX.Element;
14
+ }): import("react").JSX.Element;
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/loading/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,2CAkBrD;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,2CAYA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/loading/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,+BAkBrD;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,+BAYA"}
@@ -2,6 +2,6 @@ import { PropsWithChildren } from 'react';
2
2
  export type SectionCardProps = PropsWithChildren<{
3
3
  title: string;
4
4
  }>;
5
- export declare const SectionCard: ({ title, children }: SectionCardProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const SectionCard: ({ title, children }: SectionCardProps) => import("react").JSX.Element;
6
6
  export default SectionCard;
7
7
  //# sourceMappingURL=section-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"section-card.d.ts","sourceRoot":"","sources":["../../../src/components/section-card/section-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,qBAAqB,gBAAgB,4CAOhE,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"section-card.d.ts","sourceRoot":"","sources":["../../../src/components/section-card/section-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,qBAAqB,gBAAgB,gCAOhE,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -7,14 +7,14 @@ type BaseTypographyInternal<E extends React.ElementType = React.ElementType> = R
7
7
  }>;
8
8
  export type BaseTypographyProps<E extends React.ElementType> = BaseTypographyInternal<E> & Omit<React.ComponentProps<E>, keyof BaseTypographyInternal>;
9
9
  declare const __DEFAULT_ELEMENT__ = "span";
10
- export default function BaseTypography<E extends React.ElementType = typeof __DEFAULT_ELEMENT__>({ as, textType, testID, className, children, ...props }: BaseTypographyProps<E>): import("react/jsx-runtime").JSX.Element;
10
+ export default function BaseTypography<E extends React.ElementType = typeof __DEFAULT_ELEMENT__>({ as, textType, testID, className, children, ...props }: BaseTypographyProps<E>): React.JSX.Element;
11
11
  type SupportedTypes = 'div' | 'p' | 'span' | 'h2' | 'h3';
12
12
  export declare const Typo: {
13
- span: (props: BaseTypographyProps<SupportedTypes>) => import("react/jsx-runtime").JSX.Element;
14
- div: (props: BaseTypographyProps<SupportedTypes>) => import("react/jsx-runtime").JSX.Element;
15
- p: (props: BaseTypographyProps<SupportedTypes>) => import("react/jsx-runtime").JSX.Element;
16
- h2: (props: BaseTypographyProps<SupportedTypes>) => import("react/jsx-runtime").JSX.Element;
17
- h3: (props: BaseTypographyProps<SupportedTypes>) => import("react/jsx-runtime").JSX.Element;
13
+ span: (props: BaseTypographyProps<SupportedTypes>) => React.JSX.Element;
14
+ div: (props: BaseTypographyProps<SupportedTypes>) => React.JSX.Element;
15
+ p: (props: BaseTypographyProps<SupportedTypes>) => React.JSX.Element;
16
+ h2: (props: BaseTypographyProps<SupportedTypes>) => React.JSX.Element;
17
+ h3: (props: BaseTypographyProps<SupportedTypes>) => React.JSX.Element;
18
18
  };
19
19
  export { screenReaderPause } from './utils';
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,KAAK,sBAAsB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,IACzE,KAAK,CAAC,iBAAiB,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEL,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IACzD,sBAAsB,CAAC,CAAC,CAAC,GACvB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,sBAAsB,CAAC,CAAC;AAEhE,QAAA,MAAM,mBAAmB,SAAS,CAAC;AAEnC,MAAM,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ACF,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,CAAC,CAAC,qBAYxB;AAED,KAAK,cAAc,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAQzD,eAAO,MAAM,IAAI;kBALiB,mBAAmB,gBAAY;iBAA/B,mBAAmB,gBAAY;eAA/B,mBAAmB,gBAAY;gBAA/B,mBAAmB,gBAAY;gBAA/B,mBAAmB,gBAAY;CAWhE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
@@ -19,15 +19,6 @@
19
19
  padding: token('spacing.xSmall') 0;
20
20
  }
21
21
 
22
- .link {
23
- font-weight: bold;
24
- text-decoration: none;
25
- }
26
-
27
- .link:hover {
28
- text-decoration: underline;
29
- }
30
-
31
22
  .feedback {
32
23
  composes: typo-body__s;
33
24
  padding: token('spacing.small');
@@ -1,2 +1,2 @@
1
- export declare function ErrorContent(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ErrorContent(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=error-content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-content.d.ts","sourceRoot":"","sources":["../../src/error-content/error-content.tsx"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,4CAoB3B"}
1
+ {"version":3,"file":"error-content.d.ts","sourceRoot":"","sources":["../../src/error-content/error-content.tsx"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,gCAoB3B"}
@@ -1,2 +1,2 @@
1
- export default function GroupTravelContent(): import("react/jsx-runtime").JSX.Element;
1
+ export default function GroupTravelContent(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/group-travel/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAmBzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/group-travel/index.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,kBAAkB,gCAkBzC"}
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = GroupTravelContent;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const contact_module_css_1 = __importDefault(require("../contact.module.css"));
9
8
  const components_1 = require("../components");
10
9
  const link_1 = __importDefault(require("next/link"));
11
10
  const translations_1 = require("../translations");
@@ -13,5 +12,5 @@ const typography_1 = require("../components/typography");
13
12
  function GroupTravelContent() {
14
13
  const PageText = (0, translations_1.usePageText)();
15
14
  const { t } = (0, translations_1.useTranslation)();
16
- return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.groupTravel.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.groupTravel.description.info), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { className: contact_module_css_1.default.link, href: t(PageText.Contact.groupTravel.description.url), target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.groupTravel.description.externalLink) })] }) }));
15
+ return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.groupTravel.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.groupTravel.description.info), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: t(PageText.Contact.groupTravel.description.url), target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.groupTravel.description.externalLink) })] }) }));
17
16
  }
package/lib/index.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- export { ContactFormConfigProvider, useContactFormConfig, useThemeConfig, useIconConfig, useOrgConfig, useApiConfig, buildEnabledPageIds, } from './modules/config';
1
+ export { useContactFormConfig, useThemeConfig, useApiConfig, buildEnabledPageIds, createDefaultOnSubmit, } from './modules/config';
2
2
  export type { TicketControlSubmitPayload, RefundSubmitPayload, MeansOfTransportSubmitPayload, TicketingSubmitPayload, JourneyInfoSubmitPayload, LostPropertySubmitPayload, } from './types/submit-payloads';
3
3
  export type { TransportModeType, ReasonForTransportFailure, TicketType, PurchasePlatformType, } from './types';
4
4
  export { TicketTypeId } from './types';
5
- export type { ContactFormConfig, IconComponent, IconName, IconSet, Theme, ThemeColors, ContrastColor, TransportColors, InteractiveColor, StatusColors, TypographyConfig, ApiConfig, OrgConfig, LayoutConfig, LayoutLinkLabel, PagesConfig, FormSchemaOverrides, FormSchemaName, ContactPage, PageId, ExtraPageId, ExtraContactPage, EnabledPageIdsList, } from './modules/config';
5
+ export type { ContactFormConfig, Theme, ThemeColors, ContrastColor, TransportColors, InteractiveColor, StatusColors, ApiConfig, LayoutConfig, LayoutLinkLabel, PagesConfig, FormSchemaOverrides, FormSlug, ContactPage, PageId, ExtraPageId, ExtraContactPage, EnabledPageIdsList, } from './modules/config';
6
6
  export { ThemeProvider, useTheme, useHtmlDarkMode } from './modules/theme';
7
- export { Icon } from './components/icon/icon-wrapper';
8
- export { MonoIcon } from './components/icon/mono-icon-new';
9
7
  export type { MonoIcons } from './components/icon';
10
8
  export { ButtonLink, Button } from './components/button';
11
9
  export type { ButtonLinkProps, ButtonProps } from './components/button';
@@ -20,7 +18,7 @@ export { useLines, useTransportModeOptions } from './lines/use-lines';
20
18
  export { scrollToFirstErrorMessage, findFirstErrorMessage, getLineName, findOrderFormFields, } from './utils';
21
19
  export { commonInputValidator } from './validation';
22
20
  export type { InputErrorMessages } from './validation';
23
- export { ContactPageLayout, getContactPages, ContactFormContainer, type ContactFormContainerProps, } from './layouts';
21
+ export { ContactPageLayout, getContactPages, getPageTitleForPathname, useActiveContactPageTitle, ContactFormContainer, type ContactFormContainerProps, } from './layouts';
24
22
  export { ExternalLinkPage, type ExternalLinkPageProps, } from './components/external-link-page';
25
23
  export { ErrorContent } from './error-content/error-content';
26
24
  export { SuccessContent } from './success-content/success-content';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,iBAAiB,EACjB,yBAAyB,EACzB,UAAU,EACV,oBAAoB,GACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,QAAQ,EACR,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGxE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,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,UAAU,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
package/lib/index.js CHANGED
@@ -17,17 +17,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.AppTicketRefundContent = exports.RefundFormEvents = exports.RefundTicketForm = exports.FormType = exports.RefundContent = exports.SuccessContent = exports.ErrorContent = exports.ExternalLinkPage = exports.ContactFormContainer = exports.getContactPages = exports.ContactPageLayout = exports.commonInputValidator = exports.findOrderFormFields = exports.getLineName = exports.findFirstErrorMessage = exports.scrollToFirstErrorMessage = exports.useTransportModeOptions = exports.useLines = exports.Checkbox = exports.DepartureTimeField = exports.TimeSelector = exports.DateSelector = exports.getStopOptions = exports.getLineOptions = exports.SearchableSelect = exports.Textarea = exports.Select = exports.Radio = exports.Input = exports.Fieldset = exports.FileInput = exports.FieldWrapperWithError = exports.SectionCard = exports.ErrorMessage = exports.Typo = exports.Button = exports.ButtonLink = exports.MonoIcon = exports.Icon = exports.useHtmlDarkMode = exports.useTheme = exports.ThemeProvider = exports.TicketTypeId = exports.buildEnabledPageIds = exports.useApiConfig = exports.useOrgConfig = exports.useIconConfig = exports.useThemeConfig = exports.useContactFormConfig = exports.ContactFormConfigProvider = void 0;
21
- exports.ContactFormRoot = exports.JourneyInfoContent = exports.TicketingContent = exports.TicketControlPageContent = exports.MeansOfTransportContent = void 0;
20
+ exports.TicketControlPageContent = exports.MeansOfTransportContent = exports.AppTicketRefundContent = exports.RefundFormEvents = exports.RefundTicketForm = exports.FormType = exports.RefundContent = exports.SuccessContent = exports.ErrorContent = exports.ExternalLinkPage = exports.ContactFormContainer = exports.useActiveContactPageTitle = exports.getPageTitleForPathname = exports.getContactPages = exports.ContactPageLayout = exports.commonInputValidator = exports.findOrderFormFields = exports.getLineName = exports.findFirstErrorMessage = exports.scrollToFirstErrorMessage = exports.useTransportModeOptions = exports.useLines = exports.Checkbox = exports.DepartureTimeField = exports.TimeSelector = exports.DateSelector = exports.getStopOptions = exports.getLineOptions = exports.SearchableSelect = exports.Textarea = exports.Select = exports.Radio = exports.Input = exports.Fieldset = exports.FileInput = exports.FieldWrapperWithError = exports.SectionCard = exports.ErrorMessage = exports.Typo = exports.Button = exports.ButtonLink = exports.useHtmlDarkMode = exports.useTheme = exports.ThemeProvider = exports.TicketTypeId = exports.createDefaultOnSubmit = exports.buildEnabledPageIds = exports.useApiConfig = exports.useThemeConfig = exports.useContactFormConfig = void 0;
21
+ exports.ContactFormRoot = exports.JourneyInfoContent = exports.TicketingContent = void 0;
22
22
  // Configuration system (NEW - required for setup)
23
23
  var config_1 = require("./modules/config");
24
- Object.defineProperty(exports, "ContactFormConfigProvider", { enumerable: true, get: function () { return config_1.ContactFormConfigProvider; } });
25
24
  Object.defineProperty(exports, "useContactFormConfig", { enumerable: true, get: function () { return config_1.useContactFormConfig; } });
26
25
  Object.defineProperty(exports, "useThemeConfig", { enumerable: true, get: function () { return config_1.useThemeConfig; } });
27
- Object.defineProperty(exports, "useIconConfig", { enumerable: true, get: function () { return config_1.useIconConfig; } });
28
- Object.defineProperty(exports, "useOrgConfig", { enumerable: true, get: function () { return config_1.useOrgConfig; } });
29
26
  Object.defineProperty(exports, "useApiConfig", { enumerable: true, get: function () { return config_1.useApiConfig; } });
30
27
  Object.defineProperty(exports, "buildEnabledPageIds", { enumerable: true, get: function () { return config_1.buildEnabledPageIds; } });
28
+ Object.defineProperty(exports, "createDefaultOnSubmit", { enumerable: true, get: function () { return config_1.createDefaultOnSubmit; } });
31
29
  var types_1 = require("./types");
32
30
  Object.defineProperty(exports, "TicketTypeId", { enumerable: true, get: function () { return types_1.TicketTypeId; } });
33
31
  // Theme system (NEW)
@@ -35,11 +33,6 @@ var theme_1 = require("./modules/theme");
35
33
  Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return theme_1.ThemeProvider; } });
36
34
  Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_1.useTheme; } });
37
35
  Object.defineProperty(exports, "useHtmlDarkMode", { enumerable: true, get: function () { return theme_1.useHtmlDarkMode; } });
38
- // Icon system (NEW)
39
- var icon_wrapper_1 = require("./components/icon/icon-wrapper");
40
- Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return icon_wrapper_1.Icon; } });
41
- var mono_icon_new_1 = require("./components/icon/mono-icon-new");
42
- Object.defineProperty(exports, "MonoIcon", { enumerable: true, get: function () { return mono_icon_new_1.MonoIcon; } });
43
36
  // Button components
44
37
  var button_1 = require("./components/button");
45
38
  Object.defineProperty(exports, "ButtonLink", { enumerable: true, get: function () { return button_1.ButtonLink; } });
@@ -82,6 +75,8 @@ Object.defineProperty(exports, "commonInputValidator", { enumerable: true, get:
82
75
  var layouts_1 = require("./layouts");
83
76
  Object.defineProperty(exports, "ContactPageLayout", { enumerable: true, get: function () { return layouts_1.ContactPageLayout; } });
84
77
  Object.defineProperty(exports, "getContactPages", { enumerable: true, get: function () { return layouts_1.getContactPages; } });
78
+ Object.defineProperty(exports, "getPageTitleForPathname", { enumerable: true, get: function () { return layouts_1.getPageTitleForPathname; } });
79
+ Object.defineProperty(exports, "useActiveContactPageTitle", { enumerable: true, get: function () { return layouts_1.useActiveContactPageTitle; } });
85
80
  Object.defineProperty(exports, "ContactFormContainer", { enumerable: true, get: function () { return layouts_1.ContactFormContainer; } });
86
81
  var external_link_page_1 = require("./components/external-link-page");
87
82
  Object.defineProperty(exports, "ExternalLinkPage", { enumerable: true, get: function () { return external_link_page_1.ExternalLinkPage; } });
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/journey-info/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,KAAK,6BAA6B,GAC9B;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB,GACD;IACE,IAAI,EAAE,cAAc,CAAC;CACtB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC;AAEN,eAAO,MAAM,qBAAqB,EAC9B,OAAO,YAAY,GACnB,6BAA6B,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/journey-info/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,KAAK,6BAA6B,GAC9B;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB,GACD;IACE,IAAI,EAAE,cAAc,CAAC;CACtB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC;AAEN,eAAO,MAAM,qBAAqB,EAChC,OAAO,YAAY,GAAG,6BAA6B,CAAC"}
@@ -1,2 +1,2 @@
1
- export default function JourneyInfoContent(): import("react/jsx-runtime").JSX.Element;
1
+ export default function JourneyInfoContent(): import("react").JSX.Element;
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/journey-info/index.tsx"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAkLzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/journey-info/index.tsx"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,kBAAkB,gCAiLzC"}
@@ -20,7 +20,7 @@ function JourneyInfoContent() {
20
20
  const PageText = (0, translations_1.usePageText)();
21
21
  const { t } = (0, translations_1.useTranslation)();
22
22
  const apiConfig = (0, config_1.useApiConfig)();
23
- const { layout, org } = (0, config_1.useContactFormConfig)();
23
+ const { layout } = (0, config_1.useContactFormConfig)();
24
24
  const successPath = layout?.successPath ??
25
25
  (layout?.basePath ? `${layout.basePath}/success` : '/contact/success');
26
26
  const errorPath = layout?.errorPath ??
@@ -34,14 +34,16 @@ function JourneyInfoContent() {
34
34
  e.preventDefault();
35
35
  send({ type: 'SUBMIT', orderedFormFieldNames: (0, utils_1.findOrderFormFields)(e) });
36
36
  };
37
- return ((0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, className: contact_module_css_1.default.form, children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.journeyInfo.input.question.title), isRequired: true, children: [(0, jsx_runtime_1.jsxs)("div", { className: contact_module_css_1.default.extraInfo, children: [(0, jsx_runtime_1.jsx)("p", { children: t(PageText.Contact.journeyInfo.info.useTravelSearch) }), (0, jsx_runtime_1.jsx)("div", { className: contact_module_css_1.default.extraInfo__buttonContainer, children: (0, jsx_runtime_1.jsx)(button_1.ButtonLink, { href: org.travelSearchHref ?? '/', mode: "interactive_0", title: t(PageText.Contact.journeyInfo.info.useTravelSearchLink), icon: {
37
+ return ((0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, className: contact_module_css_1.default.form, children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.journeyInfo.input.question.title), isRequired: true, children: [(0, jsx_runtime_1.jsxs)("div", { className: contact_module_css_1.default.extraInfo, children: [(0, jsx_runtime_1.jsx)("p", { children: t(PageText.Contact.journeyInfo.info.useTravelSearch) }), (0, jsx_runtime_1.jsx)("div", { className: contact_module_css_1.default.extraInfo__buttonContainer, children: (0, jsx_runtime_1.jsx)(button_1.ButtonLink, { href: t(PageText.Contact.journeyInfo.info.travelSearchLink.href), mode: "interactive_0", title: t(PageText.Contact.journeyInfo.info.travelSearchLink.text), icon: {
38
38
  right: ((0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowRight", overrideMode: "dark" })),
39
- }, aProps: { target: '_blank', rel: 'noreferrer' } }) }), org.contactHref &&
40
- (() => {
41
- const prefix = t(PageText.Contact.journeyInfo.info.contactInfoPrefix);
42
- const linkText = t(PageText.Contact.journeyInfo.info.contactLinkText);
43
- return ((0, jsx_runtime_1.jsxs)("p", { children: [prefix && `${prefix} `, (0, jsx_runtime_1.jsx)("a", { href: org.contactHref, target: "_blank", rel: "noreferrer", className: contact_module_css_1.default.link, children: linkText }), "."] }));
44
- })()] }), (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.journeyInfo.input.question.info), value: state.context.question || '', onChange: (e) => send({
39
+ }, aProps: { target: '_blank', rel: 'noreferrer' } }) }), (() => {
40
+ const contactHref = t(PageText.Contact.journeyInfo.info.contactLink.href);
41
+ if (!contactHref)
42
+ return null;
43
+ const prefix = t(PageText.Contact.journeyInfo.info.contactLink.prefix);
44
+ const linkText = t(PageText.Contact.journeyInfo.info.contactLink.text);
45
+ return ((0, jsx_runtime_1.jsxs)("p", { children: [prefix && `${prefix} `, (0, jsx_runtime_1.jsx)("a", { href: contactHref, target: "_blank", rel: "noreferrer", children: linkText }), "."] }));
46
+ })()] }), (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.journeyInfo.input.question.info), value: state.context.question || '', onChange: (e) => send({
45
47
  type: 'ON_INPUT_CHANGE',
46
48
  inputName: 'question',
47
49
  value: e.target.value,
@@ -1,5 +1,5 @@
1
1
  import { InputErrorMessages } from '../validation';
2
- import type { FormSchemaName } from '../modules/config/types';
2
+ import type { FormSlug } from '../modules/config/types';
3
3
  type SubmitInput = {
4
4
  attachments?: File[];
5
5
  firstName?: string;
@@ -21,7 +21,7 @@ export type MachinePaths = {
21
21
  successPath: string;
22
22
  errorPath: string;
23
23
  };
24
- export declare function createJourneyInfoStateMachine(onSubmit: (schemaName: FormSchemaName, state: Record<string, unknown>) => Promise<Response>, paths?: MachinePaths): import("xstate").StateMachine<JourneyInfoContextType, {
24
+ export declare function createJourneyInfoStateMachine(onSubmit: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>, paths?: MachinePaths): import("xstate").StateMachine<JourneyInfoContextType, {
25
25
  type: "VALIDATE";
26
26
  } | {
27
27
  type: "ON_INPUT_CHANGE";
@@ -1 +1 @@
1
- {"version":3,"file":"journeyInfoStateMachine.d.ts","sourceRoot":"","sources":["../../src/journey-info/journeyInfoStateMachine.ts"],"names":[],"mappings":"AAMA,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM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CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAaF,MAAM,MAAM,YAAY,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,CACR,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,OAAO,CAAC,QAAQ,CAAC,EACtB,KAAK,CAAC,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0JrB;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC"}
@@ -79,7 +79,7 @@ function createJourneyInfoStateMachine(onSubmit, paths) {
79
79
  ...input,
80
80
  attachments: base64EncodedAttachments,
81
81
  };
82
- const response = await onSubmit('journeyInfo', state);
82
+ const response = await onSubmit('journey-info', state);
83
83
  if (!response.ok)
84
84
  throw new Error('Failed to call API');
85
85
  return response.ok;
@@ -6,5 +6,5 @@ export type ContactFormContainerProps = {
6
6
  footer: ReactNode;
7
7
  children: ReactNode;
8
8
  };
9
- export declare function ContactFormContainer({ header, footer, children, }: ContactFormContainerProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ContactFormContainer({ header, footer, children, }: ContactFormContainerProps): import("react").JSX.Element;
10
10
  //# sourceMappingURL=contact-form-container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contact-form-container.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-form-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,yBAAyB,GAAG;IACtC,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC;IAClB,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,QAAQ,GACT,EAAE,yBAAyB,2CAS3B"}
1
+ {"version":3,"file":"contact-form-container.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-form-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,yBAAyB,GAAG;IACtC,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC;IAClB,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,QAAQ,GACT,EAAE,yBAAyB,+BAS3B"}
@@ -1,9 +1,2 @@
1
- import { PageText as StaticPageText } from '../translations';
2
- import type { ContactPage } from '../modules/config';
3
- /**
4
- * All contact pages (tabs) the package can render, each paired with the form
5
- * component it renders. Hosts opt into the ones they want via `pages.enabledPageIds`.
6
- */
7
- export declare const getContactPages: (PageText?: typeof StaticPageText) => ContactPage[];
8
- export default function ContactPageLayout(): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
1
+ export default function ContactPageLayout(): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element;
9
2
  //# sourceMappingURL=contact-page-layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contact-page-layout.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-page-layout.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,IAAI,cAAc,EAI3B,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUrD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAU,OAAO,cAA+B,KAC/C,WAAW,EAyDb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,yVA+ExC"}
1
+ {"version":3,"file":"contact-page-layout.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-page-layout.tsx"],"names":[],"mappings":"AAkBA,MAAM,CAAC,OAAO,UAAU,iBAAiB,6UA6ExC"}
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getContactPages = void 0;
7
6
  exports.default = ContactPageLayout;
8
7
  const jsx_runtime_1 = require("react/jsx-runtime");
9
8
  const layout_module_css_1 = __importDefault(require("./layout.module.css"));
@@ -18,83 +17,13 @@ const error_content_1 = require("../error-content/error-content");
18
17
  const success_content_1 = require("../success-content/success-content");
19
18
  const css_1 = require("../utils/css");
20
19
  const config_1 = require("../modules/config");
21
- const ticket_control_1 = __importDefault(require("../ticket-control"));
22
- const refund_1 = __importDefault(require("../refund"));
23
- const means_of_transport_1 = __importDefault(require("../means-of-transport"));
24
- const ticketing_1 = __importDefault(require("../ticketing"));
25
- const lost_property_1 = __importDefault(require("../lost-property"));
26
- const lost_property_external_1 = __importDefault(require("../lost-property-external"));
27
- const group_travel_1 = __importDefault(require("../group-travel"));
28
- const journey_info_1 = __importDefault(require("../journey-info"));
29
- /**
30
- * All contact pages (tabs) the package can render, each paired with the form
31
- * component it renders. Hosts opt into the ones they want via `pages.enabledPageIds`.
32
- */
33
- const getContactPages = (PageText = translations_1.PageText) => [
34
- {
35
- id: 'ticket-control',
36
- title: PageText.Contact.ticketControl.title,
37
- slug: 'ticket-control',
38
- icon: 'ticketing/TicketInvalid',
39
- Component: ticket_control_1.default,
40
- },
41
- {
42
- id: 'refund',
43
- title: PageText.Contact.refund.title,
44
- slug: 'refund',
45
- icon: 'transportation-entur/Taxi',
46
- Component: refund_1.default,
47
- },
48
- {
49
- id: 'means-of-transport',
50
- title: PageText.Contact.modeOfTransport.title,
51
- slug: 'means-of-transport',
52
- icon: 'transportation/BusFill',
53
- Component: means_of_transport_1.default,
54
- },
55
- {
56
- id: 'ticketing',
57
- title: PageText.Contact.ticketing.title,
58
- slug: 'ticketing',
59
- icon: 'devices/Phone',
60
- Component: ticketing_1.default,
61
- },
62
- {
63
- id: 'lost-property',
64
- title: PageText.Contact.lostProperty.title,
65
- slug: 'lost-property',
66
- icon: 'actions/Support',
67
- Component: lost_property_1.default,
68
- },
69
- {
70
- id: 'lost-property-external',
71
- title: PageText.Contact.lostProperty.title,
72
- slug: 'lost-property',
73
- icon: 'actions/Support',
74
- Component: lost_property_external_1.default,
75
- },
76
- {
77
- id: 'group-travel',
78
- title: PageText.Contact.groupTravel.title,
79
- slug: 'group-travel',
80
- icon: 'ticketing/TicketMultiple',
81
- Component: group_travel_1.default,
82
- },
83
- {
84
- id: 'journey-info',
85
- title: PageText.Contact.journeyInfo.title,
86
- slug: 'journey-info',
87
- icon: 'actions/Feedback',
88
- Component: journey_info_1.default,
89
- },
90
- ];
91
- exports.getContactPages = getContactPages;
20
+ const contact_pages_1 = require("./contact-pages");
92
21
  function ContactPageLayout() {
93
22
  const pageText = (0, translations_1.usePageText)();
94
23
  const { t } = (0, translations_1.useTranslation)();
95
24
  const pathname = (0, navigation_1.usePathname)();
96
25
  const { pages, layout } = (0, config_1.useContactFormConfig)();
97
- const visiblePages = useVisiblePages();
26
+ const visiblePages = (0, contact_pages_1.useVisiblePages)();
98
27
  const basePath = layout?.basePath ?? '/contact';
99
28
  const successPath = layout?.successPath ?? `${basePath}/success`;
100
29
  const errorPath = layout?.errorPath ?? `${basePath}/error`;
@@ -104,31 +33,17 @@ function ContactPageLayout() {
104
33
  if (pathname === errorPath) {
105
34
  return layout?.errorContent ?? (0, jsx_runtime_1.jsx)(error_content_1.ErrorContent, {});
106
35
  }
107
- const matchedPage = visiblePages.find((page) => pathname.includes(`${basePath}/${page.slug}`));
108
- const externalUrl = matchedPage
109
- ? pages.externalUrlByPageId?.[matchedPage.id]
36
+ const activePage = (0, contact_pages_1.findMatchedPage)(pathname, basePath, visiblePages);
37
+ const externalUrl = activePage
38
+ ? pages.externalUrlByPageId?.[activePage.id]
110
39
  : undefined;
111
- const MatchedComponent = matchedPage?.Component;
112
- const body = externalUrl ? ((0, jsx_runtime_1.jsx)(external_link_page_1.ExternalLinkPage, { url: externalUrl })) : MatchedComponent ? ((0, jsx_runtime_1.jsx)(MatchedComponent, {})) : null;
40
+ const ActiveComponent = activePage?.Component;
41
+ const body = externalUrl ? ((0, jsx_runtime_1.jsx)(external_link_page_1.ExternalLinkPage, { url: externalUrl })) : ActiveComponent ? ((0, jsx_runtime_1.jsx)(ActiveComponent, {})) : null;
113
42
  const backLink = layout?.backLinkDefault ?? {
114
43
  href: '/',
115
44
  label: pageText.Contact.contactPageLayout.homeLink,
116
45
  };
117
- return ((0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout, children: [(0, jsx_runtime_1.jsxs)("div", { children: [backLink && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.homeLink__container, children: (0, jsx_runtime_1.jsx)(button_1.ButtonLink, { mode: "transparent", href: backLink.href, title: t(backLink.label), icon: { left: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowLeft" }) } }) })), (0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout__container, children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.h2, { textType: "heading__2xl", children: t(pageText.Contact.contactPageLayout.title) }), (0, jsx_runtime_1.jsx)("nav", { className: layout_module_css_1.default.contact_page_navigator__container, children: visiblePages.map((contactPage) => ((0, jsx_runtime_1.jsx)(ContactPageNavLink, { icon: contactPage.icon, title: contactPage.title, href: `${basePath}/${contactPage.slug}`, isActive: pathname.includes(`${basePath}/${contactPage.slug}`), externalUrl: pages.externalUrlByPageId?.[contactPage.id] }, contactPage.id))) })] })] }), body, displayPrivacyAndTerms(matchedPage) && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.privacyAndTerms, children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__s__strong", children: t(pageText.Contact.contactPageLayout.privacyAndTerms) }) }))] }));
118
- }
119
- const pagesWithoutPrivacyAndTerms = ['group-travel'];
120
- const displayPrivacyAndTerms = (contactPage) => {
121
- if (!contactPage)
122
- return false;
123
- return !pagesWithoutPrivacyAndTerms.includes(contactPage.slug);
124
- };
125
- function useVisiblePages() {
126
- const pageText = (0, translations_1.usePageText)();
127
- const { pages } = (0, config_1.useContactFormConfig)();
128
- const allPages = [...(0, exports.getContactPages)(pageText), ...(pages.extraPages ?? [])];
129
- return pages.enabledPageIds
130
- .map((id) => allPages.find((page) => page.id === id))
131
- .filter((page) => page !== undefined);
46
+ return ((0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout, children: [(0, jsx_runtime_1.jsxs)("div", { children: [backLink && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.homeLink__container, children: (0, jsx_runtime_1.jsx)(button_1.ButtonLink, { mode: "transparent", href: backLink.href, title: t(backLink.label), icon: { left: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowLeft" }) } }) })), (0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout__container, children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.h2, { textType: "heading__2xl", children: t(pageText.Contact.contactPageLayout.title) }), (0, jsx_runtime_1.jsx)("nav", { className: layout_module_css_1.default.contact_page_navigator__container, children: visiblePages.map((contactPage) => ((0, jsx_runtime_1.jsx)(ContactPageNavLink, { icon: contactPage.icon, title: contactPage.title, href: `${basePath}/${contactPage.slug}`, isActive: pathname.includes(`${basePath}/${contactPage.slug}`), externalUrl: pages.externalUrlByPageId?.[contactPage.id] }, contactPage.id))) })] })] }), body, (0, contact_pages_1.displayPrivacyAndTerms)(activePage) && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.privacyAndTerms, children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__s__strong", children: t(pageText.Contact.contactPageLayout.privacyAndTerms) }) }))] }));
132
47
  }
133
48
  function ContactPageNavLink({ icon, title, href, isActive, externalUrl, }) {
134
49
  const { t } = (0, translations_1.useTranslation)();
@@ -0,0 +1,20 @@
1
+ import { PageText as StaticPageText, TranslatedString } from '../translations';
2
+ import type { ContactFormConfig, ContactPage } from '../modules/config';
3
+ /**
4
+ * All contact pages (tabs) the package can render, each paired with the form
5
+ * component it renders. Hosts opt into the ones they want via `pages.enabledPageIds`.
6
+ */
7
+ export declare const getContactPages: (PageText?: typeof StaticPageText) => ContactPage[];
8
+ export declare function useVisiblePages(): ContactPage[];
9
+ export declare function getVisiblePages(pages: ContactFormConfig['pages'], pageText: typeof StaticPageText): ContactPage[];
10
+ export declare function findMatchedPage(pathname: string, basePath: string, visiblePages: ContactPage[]): ContactPage | undefined;
11
+ export declare function getPageTitleForPathname(pathname: string, config: ContactFormConfig): TranslatedString | undefined;
12
+ /**
13
+ * Title of the currently active contact page, reactive to client-side
14
+ * navigation (including the shallow routing `ContactPageNavLink` uses).
15
+ * Safe to call above `ContactFormRoot`, since it only depends on Next's
16
+ * router, not the package's translation/config context.
17
+ */
18
+ export declare function useActiveContactPageTitle(config: ContactFormConfig): TranslatedString | undefined;
19
+ export declare const displayPrivacyAndTerms: (contactPage?: ContactPage) => boolean;
20
+ //# sourceMappingURL=contact-pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-pages.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-pages.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,gBAAgB,EAGjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUxE;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAU,OAAO,cAA+B,KAC/C,WAAW,EAyDb,CAAC;AAEF,wBAAgB,eAAe,IAAI,WAAW,EAAE,CAI/C;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACjC,QAAQ,EAAE,OAAO,cAAc,GAC9B,WAAW,EAAE,CAMf;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,WAAW,EAAE,GAC1B,WAAW,GAAG,SAAS,CAIzB;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,GACxB,gBAAgB,GAAG,SAAS,CAO9B;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,iBAAiB,GACxB,gBAAgB,GAAG,SAAS,CAG9B;AAID,eAAO,MAAM,sBAAsB,GAAI,cAAc,WAAW,YAG/D,CAAC"}