@mrfylke/contact-form 0.1.3
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.
- package/lib/ContactFormRoot.d.ts +37 -0
- package/lib/ContactFormRoot.d.ts.map +1 -0
- package/lib/ContactFormRoot.js +53 -0
- package/lib/commoneEvents.d.ts +16 -0
- package/lib/commoneEvents.d.ts.map +1 -0
- package/lib/commoneEvents.js +4 -0
- package/lib/components/button/button.d.ts +17 -0
- package/lib/components/button/button.d.ts.map +1 -0
- package/lib/components/button/button.js +15 -0
- package/lib/components/button/button.module.css +399 -0
- package/lib/components/button/index.d.ts +5 -0
- package/lib/components/button/index.d.ts.map +1 -0
- package/lib/components/button/index.js +10 -0
- package/lib/components/button/link.d.ts +27 -0
- package/lib/components/button/link.d.ts.map +1 -0
- package/lib/components/button/link.js +19 -0
- package/lib/components/button/utils.d.ts +69 -0
- package/lib/components/button/utils.d.ts.map +1 -0
- package/lib/components/button/utils.js +33 -0
- package/lib/components/checkbox/checkbox.d.ts +13 -0
- package/lib/components/checkbox/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox/checkbox.js +23 -0
- package/lib/components/checkbox/checkbox.module.css +96 -0
- package/lib/components/checkbox/index.d.ts +3 -0
- package/lib/components/checkbox/index.d.ts.map +1 -0
- package/lib/components/checkbox/index.js +8 -0
- package/lib/components/error-message/error-message.d.ts +6 -0
- package/lib/components/error-message/error-message.d.ts.map +1 -0
- package/lib/components/error-message/error-message.js +13 -0
- package/lib/components/error-message/error-message.module.css +6 -0
- package/lib/components/error-message/index.d.ts +3 -0
- package/lib/components/error-message/index.d.ts.map +1 -0
- package/lib/components/error-message/index.js +8 -0
- package/lib/components/external-link-page.d.ts +14 -0
- package/lib/components/external-link-page.d.ts.map +1 -0
- package/lib/components/external-link-page.js +27 -0
- package/lib/components/external-link-page.module.css +29 -0
- package/lib/components/form/date-selector.d.ts +11 -0
- package/lib/components/form/date-selector.d.ts.map +1 -0
- package/lib/components/form/date-selector.js +21 -0
- package/lib/components/form/description-modal.d.ts +13 -0
- package/lib/components/form/description-modal.d.ts.map +1 -0
- package/lib/components/form/description-modal.js +43 -0
- package/lib/components/form/field-wrapper-with-error/index.d.ts +8 -0
- package/lib/components/form/field-wrapper-with-error/index.d.ts.map +1 -0
- package/lib/components/form/field-wrapper-with-error/index.js +12 -0
- package/lib/components/form/fieldset/fieldset.module.css +26 -0
- package/lib/components/form/fieldset/index.d.ts +8 -0
- package/lib/components/form/fieldset/index.d.ts.map +1 -0
- package/lib/components/form/fieldset/index.js +17 -0
- package/lib/components/form/file-input.d.ts +10 -0
- package/lib/components/form/file-input.d.ts.map +1 -0
- package/lib/components/form/file-input.js +68 -0
- package/lib/components/form/form-component-label/form-component-label.module.css +10 -0
- package/lib/components/form/form-component-label/index.d.ts +9 -0
- package/lib/components/form/form-component-label/index.d.ts.map +1 -0
- package/lib/components/form/form-component-label/index.js +18 -0
- package/lib/components/form/form.module.css +573 -0
- package/lib/components/form/index.d.ts +11 -0
- package/lib/components/form/index.d.ts.map +1 -0
- package/lib/components/form/index.js +28 -0
- package/lib/components/form/input.d.ts +17 -0
- package/lib/components/form/input.d.ts.map +1 -0
- package/lib/components/form/input.js +42 -0
- package/lib/components/form/radio.d.ts +7 -0
- package/lib/components/form/radio.d.ts.map +1 -0
- package/lib/components/form/radio.js +14 -0
- package/lib/components/form/searchable-select/index.d.ts +3 -0
- package/lib/components/form/searchable-select/index.d.ts.map +1 -0
- package/lib/components/form/searchable-select/index.js +11 -0
- package/lib/components/form/searchable-select/searchable-select.d.ts +18 -0
- package/lib/components/form/searchable-select/searchable-select.d.ts.map +1 -0
- package/lib/components/form/searchable-select/searchable-select.js +55 -0
- package/lib/components/form/searchable-select/utils.d.ts +5 -0
- package/lib/components/form/searchable-select/utils.d.ts.map +1 -0
- package/lib/components/form/searchable-select/utils.js +19 -0
- package/lib/components/form/select.d.ts +15 -0
- package/lib/components/form/select.d.ts.map +1 -0
- package/lib/components/form/select.js +22 -0
- package/lib/components/form/textarea.d.ts +11 -0
- package/lib/components/form/textarea.d.ts.map +1 -0
- package/lib/components/form/textarea.js +17 -0
- package/lib/components/form/time-selector.d.ts +11 -0
- package/lib/components/form/time-selector.d.ts.map +1 -0
- package/lib/components/form/time-selector.js +22 -0
- package/lib/components/icon/checkbox-icon.d.ts +14 -0
- package/lib/components/icon/checkbox-icon.d.ts.map +1 -0
- package/lib/components/icon/checkbox-icon.js +18 -0
- package/lib/components/icon/color-icon.d.ts +17 -0
- package/lib/components/icon/color-icon.d.ts.map +1 -0
- package/lib/components/icon/color-icon.js +27 -0
- package/lib/components/icon/generated-icons.d.ts +1797 -0
- package/lib/components/icon/generated-icons.d.ts.map +1 -0
- package/lib/components/icon/generated-icons.js +1782 -0
- package/lib/components/icon/icon-wrapper.d.ts +30 -0
- package/lib/components/icon/icon-wrapper.d.ts.map +1 -0
- package/lib/components/icon/icon-wrapper.js +39 -0
- package/lib/components/icon/illustration.d.ts +7 -0
- package/lib/components/icon/illustration.d.ts.map +1 -0
- package/lib/components/icon/illustration.js +25 -0
- package/lib/components/icon/image.d.ts +7 -0
- package/lib/components/icon/image.d.ts.map +1 -0
- package/lib/components/icon/image.js +26 -0
- package/lib/components/icon/index.d.ts +6 -0
- package/lib/components/icon/index.d.ts.map +1 -0
- package/lib/components/icon/index.js +20 -0
- package/lib/components/icon/mono-icon-new.d.ts +32 -0
- package/lib/components/icon/mono-icon-new.d.ts.map +1 -0
- package/lib/components/icon/mono-icon-new.js +43 -0
- package/lib/components/icon/mono-icon.d.ts +29 -0
- package/lib/components/icon/mono-icon.d.ts.map +1 -0
- package/lib/components/icon/mono-icon.js +39 -0
- package/lib/components/icon/utils.d.ts +3 -0
- package/lib/components/icon/utils.d.ts.map +1 -0
- package/lib/components/icon/utils.js +12 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +18 -0
- package/lib/components/loading/index.d.ts +15 -0
- package/lib/components/loading/index.d.ts.map +1 -0
- package/lib/components/loading/index.js +19 -0
- package/lib/components/loading/loading.module.css +17 -0
- package/lib/components/section-card/index.d.ts +2 -0
- package/lib/components/section-card/index.d.ts.map +1 -0
- package/lib/components/section-card/index.js +8 -0
- package/lib/components/section-card/section-card.d.ts +7 -0
- package/lib/components/section-card/section-card.d.ts.map +1 -0
- package/lib/components/section-card/section-card.js +14 -0
- package/lib/components/section-card/section-card.module.css +15 -0
- package/lib/components/typography/index.d.ts +19 -0
- package/lib/components/typography/index.d.ts.map +1 -0
- package/lib/components/typography/index.js +27 -0
- package/lib/components/typography/utils.d.ts +2 -0
- package/lib/components/typography/utils.d.ts.map +1 -0
- package/lib/components/typography/utils.js +4 -0
- package/lib/contact.module.css +76 -0
- package/lib/error-content/error-content.d.ts +2 -0
- package/lib/error-content/error-content.d.ts.map +1 -0
- package/lib/error-content/error-content.js +19 -0
- package/lib/error-content/error-content.module.css +11 -0
- package/lib/group-travel/index.d.ts +2 -0
- package/lib/group-travel/index.d.ts.map +1 -0
- package/lib/group-travel/index.js +15 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +73 -0
- package/lib/journey-info/events.d.ts +14 -0
- package/lib/journey-info/events.d.ts.map +1 -0
- package/lib/journey-info/events.js +5 -0
- package/lib/journey-info/index.d.ts +2 -0
- package/lib/journey-info/index.d.ts.map +1 -0
- package/lib/journey-info/index.js +66 -0
- package/lib/journey-info/journeyInfoStateMachine.d.ts +179 -0
- package/lib/journey-info/journeyInfoStateMachine.d.ts.map +1 -0
- package/lib/journey-info/journeyInfoStateMachine.js +160 -0
- package/lib/layouts/contact-form-container.d.ts +10 -0
- package/lib/layouts/contact-form-container.d.ts.map +1 -0
- package/lib/layouts/contact-form-container.js +12 -0
- package/lib/layouts/contact-form-footer.d.ts +5 -0
- package/lib/layouts/contact-form-footer.d.ts.map +1 -0
- package/lib/layouts/contact-form-footer.js +59 -0
- package/lib/layouts/contact-form-header.d.ts +9 -0
- package/lib/layouts/contact-form-header.d.ts.map +1 -0
- package/lib/layouts/contact-form-header.js +45 -0
- package/lib/layouts/contact-page-layout.d.ts +24 -0
- package/lib/layouts/contact-page-layout.d.ts.map +1 -0
- package/lib/layouts/contact-page-layout.js +104 -0
- package/lib/layouts/container.module.css +15 -0
- package/lib/layouts/footer.module.css +109 -0
- package/lib/layouts/header.module.css +39 -0
- package/lib/layouts/index.d.ts +3 -0
- package/lib/layouts/index.d.ts.map +1 -0
- package/lib/layouts/index.js +11 -0
- package/lib/layouts/layout.module.css +80 -0
- package/lib/lines/use-lines.d.ts +25 -0
- package/lib/lines/use-lines.d.ts.map +1 -0
- package/lib/lines/use-lines.js +77 -0
- package/lib/lost-property/index.d.ts +2 -0
- package/lib/lost-property/index.d.ts.map +1 -0
- package/lib/lost-property/index.js +11 -0
- package/lib/means-of-transport/events.d.ts +17 -0
- package/lib/means-of-transport/events.d.ts.map +1 -0
- package/lib/means-of-transport/events.js +5 -0
- package/lib/means-of-transport/forms/delayForm.d.ts +11 -0
- package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/delayForm.js +88 -0
- package/lib/means-of-transport/forms/driverForm.d.ts +11 -0
- package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/driverForm.js +88 -0
- package/lib/means-of-transport/forms/index.d.ts +7 -0
- package/lib/means-of-transport/forms/index.d.ts.map +1 -0
- package/lib/means-of-transport/forms/index.js +18 -0
- package/lib/means-of-transport/forms/injuryForm.d.ts +11 -0
- package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/injuryForm.js +88 -0
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts +11 -0
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/serviceOfferingForm.js +64 -0
- package/lib/means-of-transport/forms/stopForm.d.ts +11 -0
- package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/stopForm.js +76 -0
- package/lib/means-of-transport/forms/transportationForm.d.ts +11 -0
- package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/transportationForm.js +88 -0
- package/lib/means-of-transport/index.d.ts +3 -0
- package/lib/means-of-transport/index.d.ts.map +1 -0
- package/lib/means-of-transport/index.js +47 -0
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +291 -0
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -0
- package/lib/means-of-transport/means-of-transport-form-machine.js +287 -0
- package/lib/modules/api-browser/index.d.ts +8 -0
- package/lib/modules/api-browser/index.d.ts.map +1 -0
- package/lib/modules/api-browser/index.js +54 -0
- package/lib/modules/api-server/external-client.d.ts +22 -0
- package/lib/modules/api-server/external-client.d.ts.map +1 -0
- package/lib/modules/api-server/external-client.js +86 -0
- package/lib/modules/api-server/index.d.ts +9 -0
- package/lib/modules/api-server/index.d.ts.map +1 -0
- package/lib/modules/api-server/index.js +24 -0
- package/lib/modules/api-server/requesters/graphql-requester.d.ts +6 -0
- package/lib/modules/api-server/requesters/graphql-requester.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/graphql-requester.js +63 -0
- package/lib/modules/api-server/requesters/http-requester.d.ts +3 -0
- package/lib/modules/api-server/requesters/http-requester.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/http-requester.js +110 -0
- package/lib/modules/api-server/requesters/types.d.ts +37 -0
- package/lib/modules/api-server/requesters/types.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/types.js +34 -0
- package/lib/modules/api-server/requesters/utils.d.ts +17 -0
- package/lib/modules/api-server/requesters/utils.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/utils.js +75 -0
- package/lib/modules/config/context.d.ts +54 -0
- package/lib/modules/config/context.d.ts.map +1 -0
- package/lib/modules/config/context.js +112 -0
- package/lib/modules/config/index.d.ts +4 -0
- package/lib/modules/config/index.d.ts.map +1 -0
- package/lib/modules/config/index.js +19 -0
- package/lib/modules/config/theme-adapter.d.ts +20 -0
- package/lib/modules/config/theme-adapter.d.ts.map +1 -0
- package/lib/modules/config/theme-adapter.js +56 -0
- package/lib/modules/config/types.d.ts +348 -0
- package/lib/modules/config/types.d.ts.map +1 -0
- package/lib/modules/config/types.js +6 -0
- package/lib/modules/cookies/constants.d.ts +4 -0
- package/lib/modules/cookies/constants.d.ts.map +1 -0
- package/lib/modules/cookies/constants.js +6 -0
- package/lib/modules/cookies/cookies-context.d.ts +17 -0
- package/lib/modules/cookies/cookies-context.d.ts.map +1 -0
- package/lib/modules/cookies/cookies-context.js +61 -0
- package/lib/modules/cookies/index.d.ts +15 -0
- package/lib/modules/cookies/index.d.ts.map +1 -0
- package/lib/modules/cookies/index.js +22 -0
- package/lib/modules/firebase/analytics.d.ts +3 -0
- package/lib/modules/firebase/analytics.d.ts.map +1 -0
- package/lib/modules/firebase/analytics.js +40 -0
- package/lib/modules/firebase/firebase.d.ts +4 -0
- package/lib/modules/firebase/firebase.d.ts.map +1 -0
- package/lib/modules/firebase/firebase.js +19 -0
- package/lib/modules/firebase/index.d.ts +5 -0
- package/lib/modules/firebase/index.d.ts.map +1 -0
- package/lib/modules/firebase/index.js +25 -0
- package/lib/modules/firebase/preassigned-fare-products.d.ts +8 -0
- package/lib/modules/firebase/preassigned-fare-products.d.ts.map +1 -0
- package/lib/modules/firebase/preassigned-fare-products.js +35 -0
- package/lib/modules/firebase/tariff-zones.d.ts +17 -0
- package/lib/modules/firebase/tariff-zones.d.ts.map +1 -0
- package/lib/modules/firebase/tariff-zones.js +32 -0
- package/lib/modules/firebase/transport-mode-filter.d.ts +27 -0
- package/lib/modules/firebase/transport-mode-filter.d.ts.map +1 -0
- package/lib/modules/firebase/transport-mode-filter.js +27 -0
- package/lib/modules/firebase/types.d.ts +19 -0
- package/lib/modules/firebase/types.d.ts.map +1 -0
- package/lib/modules/firebase/types.js +15 -0
- package/lib/modules/graphql-types/index.d.ts +1998 -0
- package/lib/modules/graphql-types/index.d.ts.map +1 -0
- package/lib/modules/graphql-types/index.js +442 -0
- package/lib/modules/graphql-types/journeyplanner-types_v3.generated.d.ts +2419 -0
- package/lib/modules/graphql-types/journeyplanner-types_v3.generated.d.ts.map +1 -0
- package/lib/modules/graphql-types/journeyplanner-types_v3.generated.js +524 -0
- package/lib/modules/logging/index.d.ts +6 -0
- package/lib/modules/logging/index.d.ts.map +1 -0
- package/lib/modules/logging/index.js +13 -0
- package/lib/modules/logging/log-api-response.d.ts +15 -0
- package/lib/modules/logging/log-api-response.d.ts.map +1 -0
- package/lib/modules/logging/log-api-response.js +52 -0
- package/lib/modules/logging/log-page-access.d.ts +20 -0
- package/lib/modules/logging/log-page-access.d.ts.map +1 -0
- package/lib/modules/logging/log-page-access.js +60 -0
- package/lib/modules/logging/logger.d.ts +3 -0
- package/lib/modules/logging/logger.d.ts.map +1 -0
- package/lib/modules/logging/logger.js +32 -0
- package/lib/modules/logging/timer.d.ts +6 -0
- package/lib/modules/logging/timer.d.ts.map +1 -0
- package/lib/modules/logging/timer.js +13 -0
- package/lib/modules/logging/with-access-logging.d.ts +5 -0
- package/lib/modules/logging/with-access-logging.d.ts.map +1 -0
- package/lib/modules/logging/with-access-logging.js +20 -0
- package/lib/modules/org-data/compat-layer.d.ts +8 -0
- package/lib/modules/org-data/compat-layer.d.ts.map +1 -0
- package/lib/modules/org-data/compat-layer.js +8 -0
- package/lib/modules/org-data/index.d.ts +12 -0
- package/lib/modules/org-data/index.d.ts.map +1 -0
- package/lib/modules/org-data/index.js +27 -0
- package/lib/modules/theme/index.d.ts +3 -0
- package/lib/modules/theme/index.d.ts.map +1 -0
- package/lib/modules/theme/index.js +9 -0
- package/lib/modules/theme/theme-context.d.ts +43 -0
- package/lib/modules/theme/theme-context.d.ts.map +1 -0
- package/lib/modules/theme/theme-context.js +73 -0
- package/lib/modules/transport-mode/filter/filter.d.ts +9 -0
- package/lib/modules/transport-mode/filter/filter.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/filter.js +64 -0
- package/lib/modules/transport-mode/filter/filter.module.css +98 -0
- package/lib/modules/transport-mode/filter/index.d.ts +3 -0
- package/lib/modules/transport-mode/filter/index.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/index.js +11 -0
- package/lib/modules/transport-mode/filter/types.d.ts +2 -0
- package/lib/modules/transport-mode/filter/types.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/types.js +2 -0
- package/lib/modules/transport-mode/filter/utils.d.ts +9 -0
- package/lib/modules/transport-mode/filter/utils.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/utils.js +21 -0
- package/lib/modules/transport-mode/icon/icon.module.css +33 -0
- package/lib/modules/transport-mode/icon/index.d.ts +29 -0
- package/lib/modules/transport-mode/icon/index.d.ts.map +1 -0
- package/lib/modules/transport-mode/icon/index.js +116 -0
- package/lib/modules/transport-mode/icon/transport-icon-new.d.ts +28 -0
- package/lib/modules/transport-mode/icon/transport-icon-new.d.ts.map +1 -0
- package/lib/modules/transport-mode/icon/transport-icon-new.js +114 -0
- package/lib/modules/transport-mode/index.d.ts +5 -0
- package/lib/modules/transport-mode/index.d.ts.map +1 -0
- package/lib/modules/transport-mode/index.js +29 -0
- package/lib/modules/transport-mode/types.d.ts +10 -0
- package/lib/modules/transport-mode/types.d.ts.map +1 -0
- package/lib/modules/transport-mode/types.js +141 -0
- package/lib/modules/transport-mode/utils.d.ts +9 -0
- package/lib/modules/transport-mode/utils.d.ts.map +1 -0
- package/lib/modules/transport-mode/utils.js +53 -0
- package/lib/refund/events.d.ts +32 -0
- package/lib/refund/events.d.ts.map +1 -0
- package/lib/refund/events.js +5 -0
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts +10 -0
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -0
- package/lib/refund/forms/refund-and-travel-guarantee/index.js +37 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts +11 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +133 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts +11 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.js +133 -0
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts +12 -0
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -0
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +82 -0
- package/lib/refund/forms/refund-ticket/index.d.ts +10 -0
- package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -0
- package/lib/refund/forms/refund-ticket/index.js +38 -0
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts +11 -0
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -0
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +109 -0
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts +2 -0
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -0
- package/lib/refund/forms/residualValueOnTravelCard/index.js +19 -0
- package/lib/refund/index.d.ts +3 -0
- package/lib/refund/index.d.ts.map +1 -0
- package/lib/refund/index.js +50 -0
- package/lib/refund/refundFormMachine.d.ts +406 -0
- package/lib/refund/refundFormMachine.d.ts.map +1 -0
- package/lib/refund/refundFormMachine.js +404 -0
- package/lib/server/contact/index.d.ts +11 -0
- package/lib/server/contact/index.d.ts.map +1 -0
- package/lib/server/contact/index.js +47 -0
- package/lib/server/index.d.ts +9 -0
- package/lib/server/index.d.ts.map +1 -0
- package/lib/server/index.js +14 -0
- package/lib/server/journey-planner/authority.d.ts +26 -0
- package/lib/server/journey-planner/authority.d.ts.map +1 -0
- package/lib/server/journey-planner/authority.js +48 -0
- package/lib/server/journey-planner/entur-client.d.ts +7 -0
- package/lib/server/journey-planner/entur-client.d.ts.map +1 -0
- package/lib/server/journey-planner/entur-client.js +46 -0
- package/lib/server/journey-planner/index.d.ts +11 -0
- package/lib/server/journey-planner/index.d.ts.map +1 -0
- package/lib/server/journey-planner/index.js +63 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.d.ts +25 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.d.ts.map +1 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.js +30 -0
- package/lib/server/journey-planner/validators.d.ts +25 -0
- package/lib/server/journey-planner/validators.d.ts.map +1 -0
- package/lib/server/journey-planner/validators.js +17 -0
- package/lib/server/types.d.ts +5 -0
- package/lib/server/types.d.ts.map +1 -0
- package/lib/server/types.js +2 -0
- package/lib/success-content/success-content.d.ts +2 -0
- package/lib/success-content/success-content.d.ts.map +1 -0
- package/lib/success-content/success-content.js +19 -0
- package/lib/success-content/success-content.module.css +11 -0
- package/lib/ticket-control/events.d.ts +16 -0
- package/lib/ticket-control/events.d.ts.map +1 -0
- package/lib/ticket-control/events.js +5 -0
- package/lib/ticket-control/forms/feeComplaintForm.d.ts +11 -0
- package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -0
- package/lib/ticket-control/forms/feeComplaintForm.js +130 -0
- package/lib/ticket-control/forms/feedbackForm.d.ts +11 -0
- package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -0
- package/lib/ticket-control/forms/feedbackForm.js +75 -0
- package/lib/ticket-control/forms/postponePayment.d.ts +11 -0
- package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -0
- package/lib/ticket-control/forms/postponePayment.js +37 -0
- package/lib/ticket-control/index.d.ts +3 -0
- package/lib/ticket-control/index.d.ts.map +1 -0
- package/lib/ticket-control/index.js +53 -0
- package/lib/ticket-control/ticket-control-form-machine.d.ts +277 -0
- package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -0
- package/lib/ticket-control/ticket-control-form-machine.js +262 -0
- package/lib/ticketing/events.d.ts +28 -0
- package/lib/ticketing/events.d.ts.map +1 -0
- package/lib/ticketing/events.js +5 -0
- package/lib/ticketing/forms/app/appAccountForm.d.ts +11 -0
- package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -0
- package/lib/ticketing/forms/app/appAccountForm.js +51 -0
- package/lib/ticketing/forms/app/appTicketingForm.d.ts +11 -0
- package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -0
- package/lib/ticketing/forms/app/appTicketingForm.js +59 -0
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts +11 -0
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -0
- package/lib/ticketing/forms/app/appTravelSuggestionForm.js +41 -0
- package/lib/ticketing/forms/app/index.d.ts +10 -0
- package/lib/ticketing/forms/app/index.d.ts.map +1 -0
- package/lib/ticketing/forms/app/index.js +23 -0
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts +11 -0
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -0
- package/lib/ticketing/forms/priceAndTicketTypesForm.js +41 -0
- package/lib/ticketing/forms/travel-card/index.d.ts +10 -0
- package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -0
- package/lib/ticketing/forms/travel-card/index.js +24 -0
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts +3 -0
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -0
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +21 -0
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts +11 -0
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -0
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.js +52 -0
- package/lib/ticketing/forms/webshop/index.d.ts +10 -0
- package/lib/ticketing/forms/webshop/index.d.ts.map +1 -0
- package/lib/ticketing/forms/webshop/index.js +22 -0
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts +11 -0
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -0
- package/lib/ticketing/forms/webshop/webshopAccountForm.js +51 -0
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts +11 -0
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -0
- package/lib/ticketing/forms/webshop/webshopTicketingForm.js +58 -0
- package/lib/ticketing/index.d.ts +3 -0
- package/lib/ticketing/index.d.ts.map +1 -0
- package/lib/ticketing/index.js +52 -0
- package/lib/ticketing/ticketingStateMachine.d.ts +438 -0
- package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -0
- package/lib/ticketing/ticketingStateMachine.js +435 -0
- package/lib/translations/__tests__/utils.test.d.ts +2 -0
- package/lib/translations/__tests__/utils.test.d.ts.map +1 -0
- package/lib/translations/__tests__/utils.test.js +35 -0
- package/lib/translations/common/index.d.ts +3 -0
- package/lib/translations/common/index.d.ts.map +1 -0
- package/lib/translations/common/index.js +7 -0
- package/lib/translations/common/layout.d.ts +8 -0
- package/lib/translations/common/layout.d.ts.map +1 -0
- package/lib/translations/common/layout.js +39 -0
- package/lib/translations/common/titles.d.ts +4 -0
- package/lib/translations/common/titles.d.ts.map +1 -0
- package/lib/translations/common/titles.js +25 -0
- package/lib/translations/commons.d.ts +21 -0
- package/lib/translations/commons.d.ts.map +1 -0
- package/lib/translations/commons.js +39 -0
- package/lib/translations/components/clear-button.d.ts +4 -0
- package/lib/translations/components/clear-button.d.ts.map +1 -0
- package/lib/translations/components/clear-button.js +7 -0
- package/lib/translations/components/departure-date-selector.d.ts +8 -0
- package/lib/translations/components/departure-date-selector.d.ts.map +1 -0
- package/lib/translations/components/departure-date-selector.js +11 -0
- package/lib/translations/components/departure-time.d.ts +8 -0
- package/lib/translations/components/departure-time.d.ts.map +1 -0
- package/lib/translations/components/departure-time.js +11 -0
- package/lib/translations/components/empty-search.d.ts +18 -0
- package/lib/translations/components/empty-search.d.ts.map +1 -0
- package/lib/translations/components/empty-search.js +21 -0
- package/lib/translations/components/geolocation-button.d.ts +10 -0
- package/lib/translations/components/geolocation-button.d.ts.map +1 -0
- package/lib/translations/components/geolocation-button.js +13 -0
- package/lib/translations/components/index.d.ts +14 -0
- package/lib/translations/components/index.d.ts.map +1 -0
- package/lib/translations/components/index.js +29 -0
- package/lib/translations/components/loading.d.ts +4 -0
- package/lib/translations/components/loading.d.ts.map +1 -0
- package/lib/translations/components/loading.js +7 -0
- package/lib/translations/components/map.d.ts +19 -0
- package/lib/translations/components/map.d.ts.map +1 -0
- package/lib/translations/components/map.js +22 -0
- package/lib/translations/components/search.d.ts +9 -0
- package/lib/translations/components/search.d.ts.map +1 -0
- package/lib/translations/components/search.js +12 -0
- package/lib/translations/components/swap-button.d.ts +4 -0
- package/lib/translations/components/swap-button.d.ts.map +1 -0
- package/lib/translations/components/swap-button.js +7 -0
- package/lib/translations/components/tab-link.d.ts +5 -0
- package/lib/translations/components/tab-link.d.ts.map +1 -0
- package/lib/translations/components/tab-link.js +8 -0
- package/lib/translations/components/transport-mode-filter.d.ts +6 -0
- package/lib/translations/components/transport-mode-filter.d.ts.map +1 -0
- package/lib/translations/components/transport-mode-filter.js +9 -0
- package/lib/translations/components/transport-mode.d.ts +3 -0
- package/lib/translations/components/transport-mode.d.ts.map +1 -0
- package/lib/translations/components/transport-mode.js +28 -0
- package/lib/translations/components/venue-icon.d.ts +9 -0
- package/lib/translations/components/venue-icon.d.ts.map +1 -0
- package/lib/translations/components/venue-icon.js +12 -0
- package/lib/translations/dictionary.d.ts +33 -0
- package/lib/translations/dictionary.d.ts.map +1 -0
- package/lib/translations/dictionary.js +59 -0
- package/lib/translations/index.d.ts +16 -0
- package/lib/translations/index.d.ts.map +1 -0
- package/lib/translations/index.js +65 -0
- package/lib/translations/json-to-override.d.ts +19 -0
- package/lib/translations/json-to-override.d.ts.map +1 -0
- package/lib/translations/json-to-override.js +61 -0
- package/lib/translations/language-context.d.ts +37 -0
- package/lib/translations/language-context.d.ts.map +1 -0
- package/lib/translations/language-context.js +98 -0
- package/lib/translations/load-org-translations.d.ts +19 -0
- package/lib/translations/load-org-translations.d.ts.map +1 -0
- package/lib/translations/load-org-translations.js +23 -0
- package/lib/translations/merge-overrides.d.ts +28 -0
- package/lib/translations/merge-overrides.d.ts.map +1 -0
- package/lib/translations/merge-overrides.js +126 -0
- package/lib/translations/modules/index.d.ts +4 -0
- package/lib/translations/modules/index.d.ts.map +1 -0
- package/lib/translations/modules/index.js +9 -0
- package/lib/translations/modules/layout.d.ts +73 -0
- package/lib/translations/modules/layout.d.ts.map +1 -0
- package/lib/translations/modules/layout.js +106 -0
- package/lib/translations/modules/search-time.d.ts +8 -0
- package/lib/translations/modules/search-time.d.ts.map +1 -0
- package/lib/translations/modules/search-time.js +11 -0
- package/lib/translations/modules/situation.d.ts +8 -0
- package/lib/translations/modules/situation.d.ts.map +1 -0
- package/lib/translations/modules/situation.js +11 -0
- package/lib/translations/pages/assistant.d.ts +2 -0
- package/lib/translations/pages/assistant.d.ts.map +1 -0
- package/lib/translations/pages/assistant.js +303 -0
- package/lib/translations/pages/contact.d.ts +589 -0
- package/lib/translations/pages/contact.d.ts.map +1 -0
- package/lib/translations/pages/contact.js +679 -0
- package/lib/translations/pages/departures.d.ts +64 -0
- package/lib/translations/pages/departures.d.ts.map +1 -0
- package/lib/translations/pages/departures.js +75 -0
- package/lib/translations/pages/error.d.ts +8 -0
- package/lib/translations/pages/error.d.ts.map +1 -0
- package/lib/translations/pages/error.js +11 -0
- package/lib/translations/pages/index.d.ts +4 -0
- package/lib/translations/pages/index.d.ts.map +1 -0
- package/lib/translations/pages/index.js +9 -0
- package/lib/translations/server/endpoints.d.ts +67 -0
- package/lib/translations/server/endpoints.d.ts.map +1 -0
- package/lib/translations/server/endpoints.js +146 -0
- package/lib/translations/server/index.d.ts +2 -0
- package/lib/translations/server/index.d.ts.map +1 -0
- package/lib/translations/server/index.js +5 -0
- package/lib/translations/translations-context.d.ts +10 -0
- package/lib/translations/translations-context.d.ts.map +1 -0
- package/lib/translations/translations-context.js +20 -0
- package/lib/translations/types.d.ts +41 -0
- package/lib/translations/types.d.ts.map +1 -0
- package/lib/translations/types.js +24 -0
- package/lib/translations/utils.d.ts +16 -0
- package/lib/translations/utils.d.ts.map +1 -0
- package/lib/translations/utils.js +56 -0
- package/lib/types/submit-payloads.d.ts +119 -0
- package/lib/types/submit-payloads.d.ts.map +1 -0
- package/lib/types/submit-payloads.js +7 -0
- package/lib/types.d.ts +20 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +12 -0
- package/lib/utils/color.d.ts +2 -0
- package/lib/utils/color.d.ts.map +1 -0
- package/lib/utils/color.js +50 -0
- package/lib/utils/css.d.ts +3 -0
- package/lib/utils/css.d.ts.map +1 -0
- package/lib/utils/css.js +15 -0
- package/lib/utils/date.d.ts +4 -0
- package/lib/utils/date.d.ts.map +1 -0
- package/lib/utils/date.js +21 -0
- package/lib/utils/enum-from-string.d.ts +4 -0
- package/lib/utils/enum-from-string.d.ts.map +1 -0
- package/lib/utils/enum-from-string.js +9 -0
- package/lib/utils/env.d.ts +10 -0
- package/lib/utils/env.d.ts.map +1 -0
- package/lib/utils/env.js +49 -0
- package/lib/utils/only-uniques.d.ts +3 -0
- package/lib/utils/only-uniques.d.ts.map +1 -0
- package/lib/utils/only-uniques.js +7 -0
- package/lib/utils/org-theme-definitions.d.ts +5 -0
- package/lib/utils/org-theme-definitions.d.ts.map +1 -0
- package/lib/utils/org-theme-definitions.js +13 -0
- package/lib/utils/presence.d.ts +2 -0
- package/lib/utils/presence.d.ts.map +1 -0
- package/lib/utils/presence.js +5 -0
- package/lib/utils/reference-data.d.ts +15 -0
- package/lib/utils/reference-data.d.ts.map +1 -0
- package/lib/utils/reference-data.js +15 -0
- package/lib/utils/use-client-width.d.ts +2 -0
- package/lib/utils/use-client-width.d.ts.map +1 -0
- package/lib/utils/use-client-width.js +18 -0
- package/lib/utils/use-debounce.d.ts +3 -0
- package/lib/utils/use-debounce.d.ts.map +1 -0
- package/lib/utils/use-debounce.js +14 -0
- package/lib/utils/use-interval.d.ts +2 -0
- package/lib/utils/use-interval.d.ts.map +1 -0
- package/lib/utils/use-interval.js +22 -0
- package/lib/utils/use-localstorage.d.ts +2 -0
- package/lib/utils/use-localstorage.d.ts.map +1 -0
- package/lib/utils/use-localstorage.js +40 -0
- package/lib/utils/use-now.d.ts +2 -0
- package/lib/utils/use-now.d.ts.map +1 -0
- package/lib/utils/use-now.js +13 -0
- package/lib/utils/user-media-query.d.ts +2 -0
- package/lib/utils/user-media-query.d.ts.map +1 -0
- package/lib/utils/user-media-query.js +36 -0
- package/lib/utils.d.ts +19 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +126 -0
- package/lib/validation/commonInputValidator.d.ts +7 -0
- package/lib/validation/commonInputValidator.d.ts.map +1 -0
- package/lib/validation/commonInputValidator.js +28 -0
- package/lib/validation/index.d.ts +2 -0
- package/lib/validation/index.d.ts.map +1 -0
- package/lib/validation/index.js +8 -0
- package/lib/validation/validationRules.d.ts +11 -0
- package/lib/validation/validationRules.d.ts.map +1 -0
- package/lib/validation/validationRules.js +372 -0
- package/package.json +99 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.journeyInfoStateMachine = void 0;
|
|
4
|
+
exports.createJourneyInfoStateMachine = createJourneyInfoStateMachine;
|
|
5
|
+
const xstate_1 = require("xstate");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const validation_1 = require("../validation");
|
|
8
|
+
const events_1 = require("./events");
|
|
9
|
+
const setInputsToValidate = (context) => {
|
|
10
|
+
const { firstName, lastName, email, question } = context;
|
|
11
|
+
return {
|
|
12
|
+
question,
|
|
13
|
+
firstName,
|
|
14
|
+
lastName,
|
|
15
|
+
email,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
function createJourneyInfoStateMachine(onSubmit, paths) {
|
|
19
|
+
const successPath = paths?.successPath ?? '/contact/success';
|
|
20
|
+
const errorPath = paths?.errorPath ?? '/contact/error';
|
|
21
|
+
return (0, xstate_1.setup)({
|
|
22
|
+
types: {
|
|
23
|
+
context: {},
|
|
24
|
+
events: events_1.journeyInfoFormEvents,
|
|
25
|
+
},
|
|
26
|
+
guards: {
|
|
27
|
+
isFormValid: ({ context }) => {
|
|
28
|
+
const inputsToValidate = setInputsToValidate(context);
|
|
29
|
+
const errors = (0, validation_1.commonInputValidator)(inputsToValidate);
|
|
30
|
+
return Object.keys(errors).length === 0;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
actions: {
|
|
34
|
+
navigateToErrorPage: () => {
|
|
35
|
+
window.location.href = errorPath;
|
|
36
|
+
},
|
|
37
|
+
navigateToSuccessPage: () => {
|
|
38
|
+
window.location.href = successPath;
|
|
39
|
+
},
|
|
40
|
+
clearValidationErrors: (0, xstate_1.assign)({ errorMessages: {} }),
|
|
41
|
+
setValidationErrors: (0, xstate_1.assign)(({ context, event }) => {
|
|
42
|
+
if (event.type === 'SUBMIT') {
|
|
43
|
+
const inputsToValidate = setInputsToValidate(context);
|
|
44
|
+
const errors = (0, validation_1.commonInputValidator)(inputsToValidate);
|
|
45
|
+
return {
|
|
46
|
+
firstIncorrectErrorMessage: (0, utils_1.findFirstErrorMessage)(event.orderedFormFieldNames, errors),
|
|
47
|
+
errorMessages: { ...errors },
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return context;
|
|
51
|
+
}),
|
|
52
|
+
scrollToFirstErrorMessage: (0, xstate_1.assign)(({ context }) => {
|
|
53
|
+
(0, utils_1.scrollToFirstErrorMessage)(context.firstIncorrectErrorMessage);
|
|
54
|
+
return context;
|
|
55
|
+
}),
|
|
56
|
+
setSubmissionError: (0, xstate_1.assign)({
|
|
57
|
+
hasSubmissionError: () => true,
|
|
58
|
+
}),
|
|
59
|
+
clearSubmissionError: (0, xstate_1.assign)({
|
|
60
|
+
hasSubmissionError: () => undefined,
|
|
61
|
+
}),
|
|
62
|
+
onInputChange: (0, xstate_1.assign)(({ context, event }) => {
|
|
63
|
+
if (event.type === 'ON_INPUT_CHANGE') {
|
|
64
|
+
const { inputName, value } = event;
|
|
65
|
+
context.errorMessages[inputName] = [];
|
|
66
|
+
return {
|
|
67
|
+
...context,
|
|
68
|
+
[inputName]: value,
|
|
69
|
+
hasSubmissionError: undefined,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return context;
|
|
73
|
+
}),
|
|
74
|
+
},
|
|
75
|
+
actors: {
|
|
76
|
+
submit: (0, xstate_1.fromPromise)(async ({ input }) => {
|
|
77
|
+
const base64EncodedAttachments = await (0, utils_1.convertFilesToBase64)(input.attachments || []);
|
|
78
|
+
const state = {
|
|
79
|
+
...input,
|
|
80
|
+
attachments: base64EncodedAttachments,
|
|
81
|
+
};
|
|
82
|
+
const response = await onSubmit('journeyInfo', state);
|
|
83
|
+
if (!response.ok)
|
|
84
|
+
throw new Error('Failed to call API');
|
|
85
|
+
return response.ok;
|
|
86
|
+
}),
|
|
87
|
+
},
|
|
88
|
+
}).createMachine({
|
|
89
|
+
id: 'journeyInfoStateMachine',
|
|
90
|
+
initial: 'editing',
|
|
91
|
+
context: {
|
|
92
|
+
errorMessages: {},
|
|
93
|
+
},
|
|
94
|
+
on: {
|
|
95
|
+
ON_INPUT_CHANGE: {
|
|
96
|
+
actions: 'onInputChange',
|
|
97
|
+
},
|
|
98
|
+
SUBMIT: { target: '#validating' },
|
|
99
|
+
},
|
|
100
|
+
states: {
|
|
101
|
+
editing: {
|
|
102
|
+
initial: 'selectJourneyInfoForm',
|
|
103
|
+
states: {
|
|
104
|
+
selectJourneyInfoForm: {},
|
|
105
|
+
journeyInfo: {
|
|
106
|
+
id: 'journeyInfo',
|
|
107
|
+
exit: 'clearValidationErrors',
|
|
108
|
+
},
|
|
109
|
+
history: {
|
|
110
|
+
type: 'history',
|
|
111
|
+
history: 'deep',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
validating: {
|
|
116
|
+
id: 'validating',
|
|
117
|
+
always: [
|
|
118
|
+
{
|
|
119
|
+
guard: 'isFormValid',
|
|
120
|
+
target: '#submitting',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
actions: ['setValidationErrors', 'scrollToFirstErrorMessage'],
|
|
124
|
+
target: 'editing.history',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
submitting: {
|
|
129
|
+
id: 'submitting',
|
|
130
|
+
invoke: {
|
|
131
|
+
src: 'submit',
|
|
132
|
+
input: ({ context }) => ({
|
|
133
|
+
attachments: context.attachments,
|
|
134
|
+
firstName: context.firstName,
|
|
135
|
+
lastName: context.lastName,
|
|
136
|
+
email: context.email,
|
|
137
|
+
question: context.question,
|
|
138
|
+
}),
|
|
139
|
+
onDone: {
|
|
140
|
+
target: 'success',
|
|
141
|
+
},
|
|
142
|
+
onError: {
|
|
143
|
+
target: 'editing.history',
|
|
144
|
+
actions: 'setSubmissionError',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
success: {
|
|
149
|
+
entry: 'navigateToSuccessPage',
|
|
150
|
+
type: 'final',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
exports.journeyInfoStateMachine = createJourneyInfoStateMachine(async (data) => {
|
|
156
|
+
return fetch('/api/contact/journey-info', {
|
|
157
|
+
method: 'POST',
|
|
158
|
+
body: JSON.stringify(data),
|
|
159
|
+
});
|
|
160
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type ContactFormContainerProps = {
|
|
3
|
+
/** Header component - host app must provide this */
|
|
4
|
+
header: ReactNode;
|
|
5
|
+
/** Footer component - host app must provide this */
|
|
6
|
+
footer: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function ContactFormContainer({ header, footer, children, }: ContactFormContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=contact-form-container.d.ts.map
|
|
@@ -0,0 +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;IACpC,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC;IAClB,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACjC,MAAM,EACN,MAAM,EACN,QAAQ,GACX,EAAE,yBAAyB,2CAS3B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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.ContactFormContainer = ContactFormContainer;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const container_module_css_1 = __importDefault(require("./container.module.css"));
|
|
9
|
+
function ContactFormContainer({ header, footer, children, }) {
|
|
10
|
+
// Header and footer are required - host app must provide them
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: container_module_css_1.default.wrapper, children: [header, (0, jsx_runtime_1.jsx)("main", { className: container_module_css_1.default.main, children: children }), footer] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form-footer.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-form-footer.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,sBAAsB,GAAG;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAUF,wBAAgB,iBAAiB,CAAC,EAAE,eAAuB,EAAE,EAAE,sBAAsB,2CA8LpF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.ContactFormFooter = ContactFormFooter;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const translations_1 = require("../translations");
|
|
10
|
+
const language_context_1 = require("../translations/language-context");
|
|
11
|
+
const theme_1 = require("../modules/theme");
|
|
12
|
+
const config_1 = require("../modules/config");
|
|
13
|
+
const footer_module_css_1 = __importDefault(require("./footer.module.css"));
|
|
14
|
+
function getAccentColor(theme) {
|
|
15
|
+
const accent = theme?.color?.background?.accent;
|
|
16
|
+
const accent4 = accent?.[4];
|
|
17
|
+
if (accent4?.foreground?.primary)
|
|
18
|
+
return accent4.foreground.primary;
|
|
19
|
+
const neutral = theme?.color?.background?.neutral;
|
|
20
|
+
return neutral?.[0]?.foreground?.primary ?? 'inherit';
|
|
21
|
+
}
|
|
22
|
+
function ContactFormFooter({ withoutSettings = false }) {
|
|
23
|
+
const { t, language } = (0, translations_1.useTranslation)();
|
|
24
|
+
const { isDarkMode, toggleDarkmode, theme, isThemeForced } = (0, theme_1.useTheme)();
|
|
25
|
+
const { org, layout } = (0, config_1.useContactFormConfig)();
|
|
26
|
+
const { setLanguage } = (0, language_context_1.useLanguageSettings)();
|
|
27
|
+
const footerUrls = layout?.footerUrls;
|
|
28
|
+
const footerLinksOverride = layout?.footerLinksOverride;
|
|
29
|
+
const buttonStyle = { color: getAccentColor(theme), borderColor: getAccentColor(theme) };
|
|
30
|
+
const basePath = layout?.basePath ?? '/contact';
|
|
31
|
+
const supportHref = footerUrls?.help ?? basePath;
|
|
32
|
+
// Group override links by section if section is provided
|
|
33
|
+
const groupedOverrideLinks = footerLinksOverride ? footerLinksOverride.reduce((acc, link) => {
|
|
34
|
+
const section = link.section || 'default';
|
|
35
|
+
if (!acc[section])
|
|
36
|
+
acc[section] = [];
|
|
37
|
+
acc[section].push(link);
|
|
38
|
+
return acc;
|
|
39
|
+
}, {}) : null;
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)("footer", { className: footer_module_css_1.default.footer, children: (0, jsx_runtime_1.jsxs)("div", { className: footer_module_css_1.default.footer__content, children: [(0, jsx_runtime_1.jsxs)("div", { className: footer_module_css_1.default.footer__top, children: [footerLinksOverride ? (
|
|
41
|
+
// Render override links, grouped by section
|
|
42
|
+
Object.entries(groupedOverrideLinks).map(([sectionKey, links]) => ((0, jsx_runtime_1.jsxs)("section", { className: footer_module_css_1.default.footer__section, children: [sectionKey !== 'default' && ((0, jsx_runtime_1.jsx)("h3", { className: footer_module_css_1.default.footer__title, children: sectionKey })), (0, jsx_runtime_1.jsx)("ul", { className: footer_module_css_1.default.footer__linkList, children: links.map((link, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", { href: link.href, target: "_blank", rel: "noreferrer", children: t(link.label) }) }, index))) })] }, sectionKey)))) : (
|
|
43
|
+
// Standard behavior: fixed sections
|
|
44
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("section", { className: footer_module_css_1.default.footer__section, children: [(0, jsx_runtime_1.jsx)("h3", { className: footer_module_css_1.default.footer__title, children: t(translations_1.ModuleText.Layout.base.footer.sections.general.header) }), (0, jsx_runtime_1.jsx)("ul", { className: footer_module_css_1.default.footer__linkList, children: footerUrls?.tickets && ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", { href: footerUrls.tickets, target: "_blank", rel: "noreferrer", children: t(translations_1.ModuleText.Layout.base.footer.sections.general.ticketPricesPageLink) }) })) })] }), (0, jsx_runtime_1.jsxs)("section", { className: footer_module_css_1.default.footer__section, children: [(0, jsx_runtime_1.jsx)("h3", { className: footer_module_css_1.default.footer__title, children: t(translations_1.ModuleText.Layout.base.footer.sections.contact.header) }), (0, jsx_runtime_1.jsx)("ul", { className: footer_module_css_1.default.footer__linkList, children: (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", { href: supportHref, children: t(translations_1.ModuleText.Layout.base.footer.sections.general.supportPageLink) }) }) })] })] })), !withoutSettings && ((0, jsx_runtime_1.jsxs)("section", { className: footer_module_css_1.default.footer__section, children: [(0, jsx_runtime_1.jsx)("h3", { className: footer_module_css_1.default.footer__title, children: t(!isThemeForced
|
|
45
|
+
? translations_1.ModuleText.Layout.base.footer.sections.settings.header
|
|
46
|
+
: translations_1.ModuleText.Layout.base.footer.sections.settings.forcedThemeHeader) }), (0, jsx_runtime_1.jsxs)("ul", { className: footer_module_css_1.default.footer__linkList, children: [language !== translations_1.Language.Norwegian && ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("button", { className: footer_module_css_1.default.buttonLink, onClick: () => setLanguage(translations_1.Language.Norwegian), style: buttonStyle, children: t(translations_1.ModuleText.Layout.base.footer.sections.settings.setLanguage.norsk) }) })), language !== translations_1.Language.English && ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("button", { className: footer_module_css_1.default.buttonLink, onClick: () => setLanguage(translations_1.Language.English), style: buttonStyle, children: t(translations_1.ModuleText.Layout.base.footer.sections.settings.setLanguage.english) }) })), language !== translations_1.Language.Nynorsk && ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("button", { className: footer_module_css_1.default.buttonLink, onClick: () => setLanguage(translations_1.Language.Nynorsk), style: buttonStyle, children: t(translations_1.ModuleText.Layout.base.footer.sections.settings.setLanguage.nynorsk) }) })), !isThemeForced && ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("button", { className: footer_module_css_1.default.buttonLink, style: buttonStyle, onClick: () => toggleDarkmode(!isDarkMode), children: isDarkMode
|
|
47
|
+
? t(translations_1.ModuleText.Layout.base.footer.sections.settings.toggleLightMode)
|
|
48
|
+
: t(translations_1.ModuleText.Layout.base.footer.sections.settings.toggleDarkMode) }) }))] }), (0, jsx_runtime_1.jsx)("p", { className: footer_module_css_1.default.footer__cookieWarning, children: t(!isThemeForced
|
|
49
|
+
? translations_1.ModuleText.Layout.base.footer.sections.settings.cookiesWarning
|
|
50
|
+
: translations_1.ModuleText.Layout.base.footer.sections.settings.languageCookiesWarning) })] }))] }), (0, jsx_runtime_1.jsx)("hr", {}), (0, jsx_runtime_1.jsxs)("section", { className: footer_module_css_1.default.footer__bottomLinks, children: [footerLinksOverride ? (
|
|
51
|
+
// When override is set, bottom links come from override (filter by section if needed)
|
|
52
|
+
// For now, render all override links that don't have a section or have section='bottom'
|
|
53
|
+
(() => {
|
|
54
|
+
const bottomLinks = footerLinksOverride.filter(link => !link.section || link.section === 'bottom');
|
|
55
|
+
return bottomLinks.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: footer_module_css_1.default.footer__bottomLinks__mid, children: bottomLinks.map((link, index) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: "\u2022" }), (0, jsx_runtime_1.jsx)("a", { href: link.href, target: "_blank", rel: "noreferrer", children: t(link.label) })] }, index))) }));
|
|
56
|
+
})()) : (
|
|
57
|
+
// Standard behavior: privacy and accessibility from footerUrls
|
|
58
|
+
(footerUrls?.privacy || footerUrls?.accessibility) && ((0, jsx_runtime_1.jsxs)("div", { className: footer_module_css_1.default.footer__bottomLinks__mid, children: [footerUrls?.privacy && ((0, jsx_runtime_1.jsx)("a", { href: footerUrls.privacy, target: "_blank", rel: "noreferrer", children: t(translations_1.ModuleText.Layout.base.footer.bottomLinks.privacy) })), footerUrls?.privacy && footerUrls?.accessibility && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: "\u2022" })), footerUrls?.accessibility && ((0, jsx_runtime_1.jsx)("a", { href: footerUrls.accessibility, target: "_blank", rel: "noreferrer", children: t(translations_1.ModuleText.Layout.base.footer.bottomLinks.accessibilityStatement) }))] }))), org.logo && ((0, jsx_runtime_1.jsx)("img", { className: footer_module_css_1.default.footer__orgLogo, src: org.logo.accentBar ?? org.logo.srcDark ?? org.logo.src, alt: org.logo.alt }))] })] }) }));
|
|
59
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ContactFormHeaderProps = {
|
|
2
|
+
/** Override home page URL for the "Go to X" button. Uses layout.footerUrls.homePage when not set. */
|
|
3
|
+
homeUrl?: {
|
|
4
|
+
href: string;
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare function ContactFormHeader({ homeUrl }: ContactFormHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=contact-form-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form-header.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-form-header.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,sBAAsB,GAAG;IACjC,qGAAqG;IACrG,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C,CAAC;AAoBF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,sBAAsB,2CA6DpE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.ContactFormHeader = ContactFormHeader;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const link_1 = __importDefault(require("next/link"));
|
|
9
|
+
const translations_1 = require("../translations");
|
|
10
|
+
const config_1 = require("../modules/config");
|
|
11
|
+
const theme_1 = require("../modules/theme");
|
|
12
|
+
const button_1 = require("../components/button");
|
|
13
|
+
const translations_2 = require("../translations");
|
|
14
|
+
const header_module_css_1 = __importDefault(require("./header.module.css"));
|
|
15
|
+
function getAccentContrastColor(theme) {
|
|
16
|
+
const accent = theme?.color?.background?.accent;
|
|
17
|
+
const accent4 = accent?.[4];
|
|
18
|
+
if (accent4 && typeof accent4 === 'object' && 'foreground' in accent4) {
|
|
19
|
+
const fg = accent4.foreground?.primary;
|
|
20
|
+
if (fg) {
|
|
21
|
+
return {
|
|
22
|
+
background: accent4.background ?? 'transparent',
|
|
23
|
+
foreground: { primary: fg, secondary: fg, disabled: fg },
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
background: 'transparent',
|
|
29
|
+
foreground: { primary: 'currentColor', secondary: 'currentColor', disabled: 'currentColor' },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function ContactFormHeader({ homeUrl }) {
|
|
33
|
+
const { t } = (0, translations_1.useTranslation)();
|
|
34
|
+
const { org, layout } = (0, config_1.useContactFormConfig)();
|
|
35
|
+
const { theme } = (0, theme_1.useTheme)();
|
|
36
|
+
const accentColor = getAccentContrastColor(theme);
|
|
37
|
+
// Use override links if provided, otherwise fall back to standard behavior
|
|
38
|
+
const headerLinks = layout?.headerLinksOverride;
|
|
39
|
+
const standardHome = homeUrl ?? layout?.footerUrls?.homePage;
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)("header", { className: header_module_css_1.default.pageHeader, children: (0, jsx_runtime_1.jsxs)("div", { className: header_module_css_1.default.pageHeader__content, children: [(0, jsx_runtime_1.jsx)("h1", { className: header_module_css_1.default.pageHeader__logo, children: (0, jsx_runtime_1.jsx)(link_1.default, { href: layout?.basePath ?? '/contact', className: header_module_css_1.default.pageHeader__logoLink, "data-testid": "homeButton", children: org.logo ? ((0, jsx_runtime_1.jsx)("img", { className: header_module_css_1.default.pageHeader__logoImg, src: org.logo.accentBar ?? org.logo.srcDark ?? org.logo.src, alt: org.logo.alt })) : ((0, jsx_runtime_1.jsx)("span", { children: org.name })) }) }), headerLinks ? (
|
|
41
|
+
// Render override links
|
|
42
|
+
headerLinks.map((link, index) => ((0, jsx_runtime_1.jsx)(button_1.ButtonLink, { href: link.href, title: t(link.label), mode: "secondary", backgroundColor: accentColor, radiusSize: "circular", size: "pill", aProps: { target: '_blank', rel: 'noreferrer' } }, index)))) : (
|
|
43
|
+
// Standard behavior: single optional home link
|
|
44
|
+
standardHome && ((0, jsx_runtime_1.jsx)(button_1.ButtonLink, { href: standardHome.href, title: t(translations_2.CommonText.Layout.homeLink(standardHome.name)), mode: "secondary", backgroundColor: accentColor, radiusSize: "circular", size: "pill", aProps: { target: '_blank', rel: 'noreferrer' } })))] }) }));
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { TranslatedString } from "../translations";
|
|
3
|
+
import { MonoIcons } from "../components/icon";
|
|
4
|
+
export type ContactPage = {
|
|
5
|
+
title: TranslatedString;
|
|
6
|
+
href: string;
|
|
7
|
+
icon: MonoIcons;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Standard contact pages (tabs) as defined in the package.
|
|
11
|
+
* This is the default list used when no overrides are provided.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getStandardContactPages: () => ContactPage[];
|
|
14
|
+
export declare const contactPages: ContactPage[];
|
|
15
|
+
export type ContactPageLayoutProps = PropsWithChildren<{
|
|
16
|
+
title: string;
|
|
17
|
+
backLink?: {
|
|
18
|
+
href: string;
|
|
19
|
+
label: TranslatedString | Record<string, string>;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
declare function ContactPageLayout({ children, backLink }: ContactPageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default ContactPageLayout;
|
|
24
|
+
//# sourceMappingURL=contact-page-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-page-layout.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-page-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAItE,OAAO,EAAW,gBAAgB,EAAiB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAW,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAMvD,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,gBAAgB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,WAAW,EAoCrD,CAAC;AAGF,eAAO,MAAM,YAAY,eAA4B,CAAC;AAetD,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACjF,CAAC,CAAC;AAEH,iBAAS,iBAAiB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CAiFxE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.contactPages = exports.getStandardContactPages = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const layout_module_css_1 = __importDefault(require("./layout.module.css"));
|
|
10
|
+
const navigation_1 = require("next/navigation");
|
|
11
|
+
const link_1 = __importDefault(require("next/link"));
|
|
12
|
+
const translations_1 = require("../translations");
|
|
13
|
+
const icon_1 = require("../components/icon");
|
|
14
|
+
const button_1 = require("../components/button");
|
|
15
|
+
const typography_1 = require("../components/typography");
|
|
16
|
+
const css_1 = require("../utils/css");
|
|
17
|
+
const config_1 = require("../modules/config");
|
|
18
|
+
/**
|
|
19
|
+
* Standard contact pages (tabs) as defined in the package.
|
|
20
|
+
* This is the default list used when no overrides are provided.
|
|
21
|
+
*/
|
|
22
|
+
const getStandardContactPages = () => [
|
|
23
|
+
{
|
|
24
|
+
title: translations_1.PageText.Contact.ticketControl.title,
|
|
25
|
+
href: '/contact/ticket-control',
|
|
26
|
+
icon: 'ticketing/TicketInvalid',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: translations_1.PageText.Contact.refund.title,
|
|
30
|
+
href: '/contact/refund',
|
|
31
|
+
icon: 'transportation-entur/Taxi',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: translations_1.PageText.Contact.modeOfTransport.title,
|
|
35
|
+
href: '/contact/means-of-transport',
|
|
36
|
+
icon: 'transportation/BusFill',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: translations_1.PageText.Contact.ticketing.title,
|
|
40
|
+
href: '/contact/ticketing',
|
|
41
|
+
icon: 'devices/Phone',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: translations_1.PageText.Contact.lostProperty.title,
|
|
45
|
+
href: '/contact/lost-property',
|
|
46
|
+
icon: 'actions/Support',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: translations_1.PageText.Contact.groupTravel.title,
|
|
50
|
+
href: '/contact/group-travel',
|
|
51
|
+
icon: 'ticketing/TicketMultiple',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: translations_1.PageText.Contact.journeyInfo.title,
|
|
55
|
+
href: '/contact/journey-info',
|
|
56
|
+
icon: 'actions/Feedback',
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
exports.getStandardContactPages = getStandardContactPages;
|
|
60
|
+
// Keep contactPages export for backward compatibility
|
|
61
|
+
exports.contactPages = (0, exports.getStandardContactPages)();
|
|
62
|
+
const pagesWithoutPrivacyAndTerms = [
|
|
63
|
+
'/contact/lost-property',
|
|
64
|
+
'/contact/group-travel',
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* Extract page ID from href (e.g., '/contact/lost-property' -> 'lost-property')
|
|
68
|
+
*/
|
|
69
|
+
function getPageIdFromHref(href) {
|
|
70
|
+
const parts = href.split('/');
|
|
71
|
+
return parts[parts.length - 1] || '';
|
|
72
|
+
}
|
|
73
|
+
function ContactPageLayout({ children, backLink }) {
|
|
74
|
+
const { t } = (0, translations_1.useTranslation)();
|
|
75
|
+
const pathname = (0, navigation_1.usePathname)();
|
|
76
|
+
const { pagesOverrides } = (0, config_1.useContactFormConfig)();
|
|
77
|
+
const [selectedContactPage, setSelectedContactPage] = (0, react_1.useState)(undefined);
|
|
78
|
+
// Resolve visible pages: standard list minus hidden pages
|
|
79
|
+
const visiblePages = (0, react_1.useMemo)(() => {
|
|
80
|
+
const standard = (0, exports.getStandardContactPages)();
|
|
81
|
+
const hidePageIds = pagesOverrides?.hidePageIds || [];
|
|
82
|
+
return standard.filter((page) => {
|
|
83
|
+
const pageId = getPageIdFromHref(page.href);
|
|
84
|
+
return !hidePageIds.includes(pageId);
|
|
85
|
+
});
|
|
86
|
+
}, [pagesOverrides]);
|
|
87
|
+
(0, react_1.useEffect)(() => {
|
|
88
|
+
const activePage = visiblePages.find((contactPage) => pathname.includes(contactPage.href));
|
|
89
|
+
setSelectedContactPage(activePage);
|
|
90
|
+
}, [pathname, visiblePages]);
|
|
91
|
+
const displayPrivacyAndTerms = (contactPage) => {
|
|
92
|
+
if (!contactPage)
|
|
93
|
+
return false;
|
|
94
|
+
return !pagesWithoutPrivacyAndTerms.includes(contactPage.href);
|
|
95
|
+
};
|
|
96
|
+
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(translations_1.PageText.Contact.contactPageLayout.title) }), (0, jsx_runtime_1.jsx)("nav", { className: layout_module_css_1.default.contact_page_navigator__container, children: visiblePages.map((contactPage, index) => {
|
|
97
|
+
const isActive = pathname.includes(contactPage.href);
|
|
98
|
+
return ((0, jsx_runtime_1.jsxs)(link_1.default, { shallow: true, href: contactPage.href, className: (0, css_1.andIf)({
|
|
99
|
+
[layout_module_css_1.default.contact_page_navigator__link]: true,
|
|
100
|
+
[layout_module_css_1.default.contact_page_navigator__activePage]: isActive,
|
|
101
|
+
}), children: [(0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { size: "large", icon: contactPage.icon }), (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(contactPage.title) })] }, index));
|
|
102
|
+
}) })] })] }), children, displayPrivacyAndTerms(selectedContactPage) && ((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(translations_1.PageText.Contact.contactPageLayout.privacyAndTerms) }) }))] }));
|
|
103
|
+
}
|
|
104
|
+
exports.default = ContactPageLayout;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.main {
|
|
9
|
+
flex: 1;
|
|
10
|
+
min-width: 100%;
|
|
11
|
+
max-width: var(--maxPageWidth, 976px);
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
padding-bottom: 10rem;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
.footer {
|
|
2
|
+
background-color: token('color.background.accent.4.background');
|
|
3
|
+
color: token('color.background.accent.4.foreground.primary');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.footer__content {
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
padding: token('spacing.large');
|
|
9
|
+
max-width: var(--maxPageWidth, 976px);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.footer__top {
|
|
14
|
+
display: grid;
|
|
15
|
+
gap: token('spacing.xLarge');
|
|
16
|
+
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.footer__content hr {
|
|
20
|
+
border: 0;
|
|
21
|
+
border-bottom: token('border.width.slim') solid token('color.background.accent.4.foreground.primary');
|
|
22
|
+
margin: token('spacing.xLarge') 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.footer__title {
|
|
26
|
+
margin-bottom: token('spacing.small');
|
|
27
|
+
font-size: 1rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.footer__section {
|
|
32
|
+
padding: token('spacing.medium') 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.footer__linkList {
|
|
36
|
+
list-style-type: none;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.footer__linkList li {
|
|
42
|
+
margin-bottom: token('spacing.small');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.footer a {
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.footer a,
|
|
50
|
+
.footer a:visited {
|
|
51
|
+
transition: opacity 100ms ease-in;
|
|
52
|
+
color: token('color.background.accent.4.foreground.primary');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.footer a:hover {
|
|
56
|
+
opacity: 0.75;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.footer__bottomLinks {
|
|
60
|
+
width: 100%;
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: token('spacing.medium');
|
|
65
|
+
flex-wrap: wrap;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.footer__bottomLinks > div:only-child {
|
|
69
|
+
margin: 0 auto;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.footer__bottomLinks__mid {
|
|
73
|
+
text-align: center;
|
|
74
|
+
display: flex;
|
|
75
|
+
gap: token('spacing.medium');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.footer__cookieWarning {
|
|
79
|
+
margin-top: token('spacing.medium');
|
|
80
|
+
font-size: 0.875rem;
|
|
81
|
+
color: token('color.background.accent.4.foreground.primary');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.buttonLink {
|
|
85
|
+
color: token('color.background.accent.4.foreground.primary');
|
|
86
|
+
font-size: 1rem;
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
border: 0;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
transition: opacity 100ms ease-in;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.buttonLink:hover {
|
|
94
|
+
opacity: 0.75;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.footer__orgLogo {
|
|
98
|
+
height: 2.5rem;
|
|
99
|
+
width: auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (max-width: 650px) {
|
|
103
|
+
.footer__bottomLinks {
|
|
104
|
+
justify-content: center;
|
|
105
|
+
align-items: center;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: token('spacing.xLarge');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.pageHeader {
|
|
2
|
+
background-color: token('color.background.accent.4.background');
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pageHeader__content {
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: var(--maxPageWidth, 976px);
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding: token('spacing.medium');
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pageHeader__logo {
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pageHeader__logoLink {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: token('spacing.medium');
|
|
24
|
+
padding: token('spacing.medium');
|
|
25
|
+
padding-left: 0;
|
|
26
|
+
color: token('color.background.accent.4.foreground.primary');
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
transition: opacity 200ms ease-in-out;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pageHeader__logoLink:hover,
|
|
32
|
+
.pageHeader__logoLink:active {
|
|
33
|
+
opacity: 0.8;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pageHeader__logoImg {
|
|
37
|
+
height: 2rem;
|
|
38
|
+
width: auto;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,IAAI,iBAAiB,EAC5B,KAAK,sBAAsB,EAC3B,uBAAuB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,oBAAoB,EACpB,KAAK,yBAAyB,GACjC,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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.ContactFormContainer = exports.getStandardContactPages = exports.ContactPageLayout = void 0;
|
|
7
|
+
var contact_page_layout_1 = require("./contact-page-layout");
|
|
8
|
+
Object.defineProperty(exports, "ContactPageLayout", { enumerable: true, get: function () { return __importDefault(contact_page_layout_1).default; } });
|
|
9
|
+
Object.defineProperty(exports, "getStandardContactPages", { enumerable: true, get: function () { return contact_page_layout_1.getStandardContactPages; } });
|
|
10
|
+
var contact_form_container_1 = require("./contact-form-container");
|
|
11
|
+
Object.defineProperty(exports, "ContactFormContainer", { enumerable: true, get: function () { return contact_form_container_1.ContactFormContainer; } });
|