@mrfylke/contact-form 0.1.24 → 0.1.25

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 (242) hide show
  1. package/README.md +1 -11
  2. package/lib/ContactFormRoot.d.ts +2 -2
  3. package/lib/ContactFormRoot.d.ts.map +1 -1
  4. package/lib/ContactFormRoot.js +2 -1
  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/error-content/error-content.d.ts +1 -1
  68. package/lib/error-content/error-content.d.ts.map +1 -1
  69. package/lib/group-travel/index.d.ts +1 -1
  70. package/lib/group-travel/index.d.ts.map +1 -1
  71. package/lib/index.d.ts +3 -5
  72. package/lib/index.d.ts.map +1 -1
  73. package/lib/index.js +4 -10
  74. package/lib/journey-info/events.d.ts.map +1 -1
  75. package/lib/journey-info/index.d.ts +1 -1
  76. package/lib/journey-info/index.d.ts.map +1 -1
  77. package/lib/journey-info/index.js +1 -1
  78. package/lib/layouts/contact-form-container.d.ts +1 -1
  79. package/lib/layouts/contact-form-container.d.ts.map +1 -1
  80. package/lib/layouts/contact-page-layout.d.ts +1 -8
  81. package/lib/layouts/contact-page-layout.d.ts.map +1 -1
  82. package/lib/layouts/contact-page-layout.js +8 -93
  83. package/lib/layouts/contact-pages.d.ts +20 -0
  84. package/lib/layouts/contact-pages.d.ts.map +1 -0
  85. package/lib/layouts/contact-pages.js +124 -0
  86. package/lib/layouts/index.d.ts +2 -1
  87. package/lib/layouts/index.d.ts.map +1 -1
  88. package/lib/layouts/index.js +5 -2
  89. package/lib/lines/use-departures.js +2 -2
  90. package/lib/lines/use-lines.d.ts +2 -2
  91. package/lib/lines/use-lines.js +1 -1
  92. package/lib/lost-property/LostPropertyForm.d.ts +2 -1
  93. package/lib/lost-property/LostPropertyForm.d.ts.map +1 -1
  94. package/lib/lost-property/index.d.ts +1 -1
  95. package/lib/lost-property/index.d.ts.map +1 -1
  96. package/lib/lost-property-external/index.d.ts +1 -1
  97. package/lib/lost-property-external/index.d.ts.map +1 -1
  98. package/lib/means-of-transport/events.d.ts.map +1 -1
  99. package/lib/means-of-transport/forms/delayForm.d.ts +1 -1
  100. package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -1
  101. package/lib/means-of-transport/forms/driverForm.d.ts +1 -1
  102. package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -1
  103. package/lib/means-of-transport/forms/injuryForm.d.ts +1 -1
  104. package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
  105. package/lib/means-of-transport/forms/serviceOfferingForm.d.ts +1 -1
  106. package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -1
  107. package/lib/means-of-transport/forms/stopForm.d.ts +1 -1
  108. package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -1
  109. package/lib/means-of-transport/forms/transportationForm.d.ts +1 -1
  110. package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -1
  111. package/lib/means-of-transport/index.d.ts +1 -1
  112. package/lib/means-of-transport/index.d.ts.map +1 -1
  113. package/lib/modules/config/context.d.ts +5 -37
  114. package/lib/modules/config/context.d.ts.map +1 -1
  115. package/lib/modules/config/context.js +9 -51
  116. package/lib/modules/config/types.d.ts +10 -55
  117. package/lib/modules/config/types.d.ts.map +1 -1
  118. package/lib/modules/org-data/index.d.ts +2 -2
  119. package/lib/modules/org-data/index.js +2 -2
  120. package/lib/modules/theme/theme-context.d.ts +1 -1
  121. package/lib/modules/theme/theme-context.d.ts.map +1 -1
  122. package/lib/modules/transport-mode/filter/filter.d.ts +1 -1
  123. package/lib/modules/transport-mode/filter/filter.d.ts.map +1 -1
  124. package/lib/modules/transport-mode/icon/index.d.ts +4 -4
  125. package/lib/modules/transport-mode/icon/index.d.ts.map +1 -1
  126. package/lib/modules/transport-mode/types.d.ts +3 -5
  127. package/lib/modules/transport-mode/types.d.ts.map +1 -1
  128. package/lib/modules/transport-mode/types.js +3 -138
  129. package/lib/modules/transport-mode/utils.d.ts +2 -2
  130. package/lib/modules/transport-mode/utils.d.ts.map +1 -1
  131. package/lib/modules/transport-mode/utils.js +39 -6
  132. package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts +1 -1
  133. package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -1
  134. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts +1 -1
  135. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -1
  136. package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts +1 -1
  137. package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -1
  138. package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts +2 -2
  139. package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
  140. package/lib/refund/forms/refund-ticket/index.d.ts +1 -1
  141. package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
  142. package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts +1 -1
  143. package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
  144. package/lib/refund/forms/refund-ticket/otherTicketRefund.js +1 -5
  145. package/lib/refund/forms/residualValueOnTravelCard/index.d.ts +1 -1
  146. package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
  147. package/lib/refund/index.d.ts +1 -1
  148. package/lib/refund/index.d.ts.map +1 -1
  149. package/lib/refund/refundFormMachine.js +1 -1
  150. package/lib/server/departures-route-handler.d.ts +27 -0
  151. package/lib/server/departures-route-handler.d.ts.map +1 -0
  152. package/lib/server/departures-route-handler.js +93 -0
  153. package/lib/server/index.d.ts +1 -0
  154. package/lib/server/index.d.ts.map +1 -1
  155. package/lib/server/index.js +3 -1
  156. package/lib/server/journey-planner/authority.d.ts +2 -2
  157. package/lib/server/journey-planner/authority.js +3 -3
  158. package/lib/server/journey-planner/index.d.ts.map +1 -1
  159. package/lib/server/journey-planner/index.js +8 -9
  160. package/lib/server/journey-planner/journey-gql/lines.generated.d.ts +1 -0
  161. package/lib/server/journey-planner/journey-gql/lines.generated.d.ts.map +1 -1
  162. package/lib/server/journey-planner/journey-gql/lines.generated.js +1 -0
  163. package/lib/server/journey-planner/validators.d.ts +4 -4
  164. package/lib/server/journey-planner/validators.js +3 -3
  165. package/lib/server/lines-route-handler.d.ts +7 -18
  166. package/lib/server/lines-route-handler.d.ts.map +1 -1
  167. package/lib/server/lines-route-handler.js +15 -17
  168. package/lib/success-content/success-content.d.ts +1 -1
  169. package/lib/success-content/success-content.d.ts.map +1 -1
  170. package/lib/ticket-control/events.d.ts +1 -1
  171. package/lib/ticket-control/events.d.ts.map +1 -1
  172. package/lib/ticket-control/forms/feeComplaintForm.d.ts +1 -1
  173. package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -1
  174. package/lib/ticket-control/forms/feeComplaintForm.js +5 -1
  175. package/lib/ticket-control/forms/feedbackForm.d.ts +1 -1
  176. package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -1
  177. package/lib/ticket-control/forms/postponePayment.d.ts +1 -1
  178. package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -1
  179. package/lib/ticket-control/forms/postponePayment.js +5 -1
  180. package/lib/ticket-control/index.d.ts +1 -1
  181. package/lib/ticket-control/index.d.ts.map +1 -1
  182. package/lib/ticket-control/ticket-control-form-machine.d.ts +4 -2
  183. package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -1
  184. package/lib/ticket-control/ticket-control-form-machine.js +4 -2
  185. package/lib/ticketing/events.d.ts.map +1 -1
  186. package/lib/ticketing/forms/app/appAccountForm.d.ts +1 -1
  187. package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -1
  188. package/lib/ticketing/forms/app/appTicketingForm.d.ts +1 -1
  189. package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -1
  190. package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts +1 -1
  191. package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -1
  192. package/lib/ticketing/forms/app/index.d.ts +1 -1
  193. package/lib/ticketing/forms/app/index.d.ts.map +1 -1
  194. package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts +1 -1
  195. package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -1
  196. package/lib/ticketing/forms/travel-card/index.d.ts +1 -1
  197. package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -1
  198. package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts +1 -1
  199. package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
  200. package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts +1 -1
  201. package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -1
  202. package/lib/ticketing/forms/webshop/index.d.ts +1 -1
  203. package/lib/ticketing/forms/webshop/index.d.ts.map +1 -1
  204. package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts +1 -1
  205. package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -1
  206. package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts +1 -1
  207. package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -1
  208. package/lib/ticketing/index.d.ts +1 -1
  209. package/lib/ticketing/index.d.ts.map +1 -1
  210. package/lib/translations/common/layout.d.ts.map +1 -1
  211. package/lib/translations/common/layout.js +1 -29
  212. package/lib/translations/common/titles.d.ts.map +1 -1
  213. package/lib/translations/common/titles.js +2 -20
  214. package/lib/translations/json-to-override.d.ts.map +1 -1
  215. package/lib/translations/language-context.d.ts +3 -3
  216. package/lib/translations/language-context.d.ts.map +1 -1
  217. package/lib/translations/merge-overrides.d.ts +3 -3
  218. package/lib/translations/merge-overrides.js +3 -3
  219. package/lib/translations/pages/contact.d.ts +6 -0
  220. package/lib/translations/pages/contact.d.ts.map +1 -1
  221. package/lib/translations/pages/contact.js +7 -15
  222. package/lib/translations/server/endpoints.d.ts.map +1 -1
  223. package/lib/translations/server/endpoints.js +7 -83
  224. package/lib/translations/translations-context.d.ts +1 -1
  225. package/lib/translations/translations-context.d.ts.map +1 -1
  226. package/lib/translations/types.d.ts +7 -7
  227. package/lib/translations/types.d.ts.map +1 -1
  228. package/lib/translations/utils.d.ts +0 -7
  229. package/lib/translations/utils.d.ts.map +1 -1
  230. package/lib/translations/utils.js +0 -26
  231. package/lib/types/submit-payloads.d.ts +1 -0
  232. package/lib/types/submit-payloads.d.ts.map +1 -1
  233. package/lib/types.d.ts.map +1 -1
  234. package/lib/validation/validationRules.d.ts.map +1 -1
  235. package/lib/validation/validationRules.js +7 -0
  236. package/package.json +37 -32
  237. package/lib/components/icon/icon-wrapper.d.ts +0 -30
  238. package/lib/components/icon/icon-wrapper.d.ts.map +0 -1
  239. package/lib/components/icon/icon-wrapper.js +0 -39
  240. package/lib/components/icon/mono-icon-new.d.ts +0 -32
  241. package/lib/components/icon/mono-icon-new.d.ts.map +0 -1
  242. package/lib/components/icon/mono-icon-new.js +0 -43
@@ -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,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC5E;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,IAAe,EACf,YAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,aAAa,2CAoBf;AAED,eAAe,QAAQ,CAAC"}
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,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC5E;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,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"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,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,CAAC,OAAO,UAAU,cAAc,CACpC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,OAAO,mBAAmB,EACxD,EACA,EAAE,EACF,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"}
@@ -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":"AAMA,MAAM,CAAC,OAAO,UAAU,kBAAkB,gCAmBzC"}
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, } 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, OrgConfig, LayoutConfig, LayoutLinkLabel, PagesConfig, FormSchemaOverrides, FormSchemaName, 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,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M,mBAAmB,CAAC"}
package/lib/index.js CHANGED
@@ -17,15 +17,12 @@ 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.TicketingContent = 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.buildEnabledPageIds = exports.useApiConfig = exports.useThemeConfig = exports.useContactFormConfig = void 0;
21
+ exports.ContactFormRoot = exports.JourneyInfoContent = 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; } });
31
28
  var types_1 = require("./types");
@@ -35,11 +32,6 @@ var theme_1 = require("./modules/theme");
35
32
  Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return theme_1.ThemeProvider; } });
36
33
  Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_1.useTheme; } });
37
34
  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
35
  // Button components
44
36
  var button_1 = require("./components/button");
45
37
  Object.defineProperty(exports, "ButtonLink", { enumerable: true, get: function () { return button_1.ButtonLink; } });
@@ -82,6 +74,8 @@ Object.defineProperty(exports, "commonInputValidator", { enumerable: true, get:
82
74
  var layouts_1 = require("./layouts");
83
75
  Object.defineProperty(exports, "ContactPageLayout", { enumerable: true, get: function () { return layouts_1.ContactPageLayout; } });
84
76
  Object.defineProperty(exports, "getContactPages", { enumerable: true, get: function () { return layouts_1.getContactPages; } });
77
+ Object.defineProperty(exports, "getPageTitleForPathname", { enumerable: true, get: function () { return layouts_1.getPageTitleForPathname; } });
78
+ Object.defineProperty(exports, "useActiveContactPageTitle", { enumerable: true, get: function () { return layouts_1.useActiveContactPageTitle; } });
85
79
  Object.defineProperty(exports, "ContactFormContainer", { enumerable: true, get: function () { return layouts_1.ContactFormContainer; } });
86
80
  var external_link_page_1 = require("./components/external-link-page");
87
81
  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,gCAkLzC"}
@@ -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, org = {} } = (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 ??
@@ -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"}
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.displayPrivacyAndTerms = exports.getContactPages = void 0;
7
+ exports.useVisiblePages = useVisiblePages;
8
+ exports.getVisiblePages = getVisiblePages;
9
+ exports.findMatchedPage = findMatchedPage;
10
+ exports.getPageTitleForPathname = getPageTitleForPathname;
11
+ exports.useActiveContactPageTitle = useActiveContactPageTitle;
12
+ const navigation_1 = require("next/navigation");
13
+ const translations_1 = require("../translations");
14
+ const config_1 = require("../modules/config");
15
+ const ticket_control_1 = __importDefault(require("../ticket-control"));
16
+ const refund_1 = __importDefault(require("../refund"));
17
+ const means_of_transport_1 = __importDefault(require("../means-of-transport"));
18
+ const ticketing_1 = __importDefault(require("../ticketing"));
19
+ const lost_property_1 = __importDefault(require("../lost-property"));
20
+ const lost_property_external_1 = __importDefault(require("../lost-property-external"));
21
+ const group_travel_1 = __importDefault(require("../group-travel"));
22
+ const journey_info_1 = __importDefault(require("../journey-info"));
23
+ /**
24
+ * All contact pages (tabs) the package can render, each paired with the form
25
+ * component it renders. Hosts opt into the ones they want via `pages.enabledPageIds`.
26
+ */
27
+ const getContactPages = (PageText = translations_1.PageText) => [
28
+ {
29
+ id: 'ticket-control',
30
+ title: PageText.Contact.ticketControl.title,
31
+ slug: 'ticket-control',
32
+ icon: 'ticketing/TicketInvalid',
33
+ Component: ticket_control_1.default,
34
+ },
35
+ {
36
+ id: 'refund',
37
+ title: PageText.Contact.refund.title,
38
+ slug: 'refund',
39
+ icon: 'transportation-entur/Taxi',
40
+ Component: refund_1.default,
41
+ },
42
+ {
43
+ id: 'means-of-transport',
44
+ title: PageText.Contact.modeOfTransport.title,
45
+ slug: 'means-of-transport',
46
+ icon: 'transportation/BusFill',
47
+ Component: means_of_transport_1.default,
48
+ },
49
+ {
50
+ id: 'ticketing',
51
+ title: PageText.Contact.ticketing.title,
52
+ slug: 'ticketing',
53
+ icon: 'devices/Phone',
54
+ Component: ticketing_1.default,
55
+ },
56
+ {
57
+ id: 'lost-property',
58
+ title: PageText.Contact.lostProperty.title,
59
+ slug: 'lost-property',
60
+ icon: 'actions/Support',
61
+ Component: lost_property_1.default,
62
+ },
63
+ {
64
+ id: 'lost-property-external',
65
+ title: PageText.Contact.lostProperty.title,
66
+ slug: 'lost-property',
67
+ icon: 'actions/Support',
68
+ Component: lost_property_external_1.default,
69
+ },
70
+ {
71
+ id: 'group-travel',
72
+ title: PageText.Contact.groupTravel.title,
73
+ slug: 'group-travel',
74
+ icon: 'ticketing/TicketMultiple',
75
+ Component: group_travel_1.default,
76
+ },
77
+ {
78
+ id: 'journey-info',
79
+ title: PageText.Contact.journeyInfo.title,
80
+ slug: 'journey-info',
81
+ icon: 'actions/Feedback',
82
+ Component: journey_info_1.default,
83
+ },
84
+ ];
85
+ exports.getContactPages = getContactPages;
86
+ function useVisiblePages() {
87
+ const pageText = (0, translations_1.usePageText)();
88
+ const { pages } = (0, config_1.useContactFormConfig)();
89
+ return getVisiblePages(pages, pageText);
90
+ }
91
+ function getVisiblePages(pages, pageText) {
92
+ const allPages = [...(0, exports.getContactPages)(pageText), ...(pages.extraPages ?? [])];
93
+ return pages.enabledPageIds
94
+ .map((id) => allPages.find((page) => page.id === id))
95
+ .filter((page) => page !== undefined);
96
+ }
97
+ function findMatchedPage(pathname, basePath, visiblePages) {
98
+ return visiblePages.find((page) => pathname.includes(`${basePath}/${page.slug}`));
99
+ }
100
+ function getPageTitleForPathname(pathname, config) {
101
+ const basePath = config.layout?.basePath ?? '/contact';
102
+ const { PageText: mergedPageText } = (0, translations_1.mergeTranslationOverrides)({
103
+ pages: config.translations.pages,
104
+ });
105
+ const visiblePages = getVisiblePages(config.pages, mergedPageText);
106
+ return findMatchedPage(pathname, basePath, visiblePages)?.title;
107
+ }
108
+ /**
109
+ * Title of the currently active contact page, reactive to client-side
110
+ * navigation (including the shallow routing `ContactPageNavLink` uses).
111
+ * Safe to call above `ContactFormRoot`, since it only depends on Next's
112
+ * router, not the package's translation/config context.
113
+ */
114
+ function useActiveContactPageTitle(config) {
115
+ const pathname = (0, navigation_1.usePathname)();
116
+ return getPageTitleForPathname(pathname, config);
117
+ }
118
+ const pagesWithoutPrivacyAndTerms = ['group-travel'];
119
+ const displayPrivacyAndTerms = (contactPage) => {
120
+ if (!contactPage)
121
+ return false;
122
+ return !pagesWithoutPrivacyAndTerms.includes(contactPage.slug);
123
+ };
124
+ exports.displayPrivacyAndTerms = displayPrivacyAndTerms;
@@ -1,3 +1,4 @@
1
- export { default as ContactPageLayout, getContactPages, } from './contact-page-layout';
1
+ export { default as ContactPageLayout } from './contact-page-layout';
2
+ export { getContactPages, getPageTitleForPathname, useActiveContactPageTitle, } from './contact-pages';
2
3
  export { ContactFormContainer, type ContactFormContainerProps, } from './contact-form-container';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC"}