@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,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared payload types for contact form submissions.
|
|
3
|
+
* API providers can use these types to understand the structure of incoming data.
|
|
4
|
+
* Attachments are base64-encoded strings when sent to the API.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Payload for ticket control form submissions (fee complaint, feedback, postpone payment).
|
|
8
|
+
*/
|
|
9
|
+
export interface TicketControlSubmitPayload {
|
|
10
|
+
feeNumber?: string;
|
|
11
|
+
appPhoneNumber?: string;
|
|
12
|
+
customerNumber?: string;
|
|
13
|
+
travelCardNumber?: string;
|
|
14
|
+
firstName?: string;
|
|
15
|
+
lastName?: string;
|
|
16
|
+
address?: string;
|
|
17
|
+
postalCode?: string;
|
|
18
|
+
city?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
phoneNumber?: string;
|
|
21
|
+
bankAccountNumber?: string;
|
|
22
|
+
IBAN?: string;
|
|
23
|
+
SWIFT?: string;
|
|
24
|
+
feedback?: string;
|
|
25
|
+
transportMode?: string;
|
|
26
|
+
lineName?: string;
|
|
27
|
+
fromStop?: string;
|
|
28
|
+
toStop?: string;
|
|
29
|
+
dateOfTicketControl?: string;
|
|
30
|
+
timeOfTicketControl?: string;
|
|
31
|
+
invoiceNumber?: string;
|
|
32
|
+
/** Base64-encoded attachments */
|
|
33
|
+
attachments?: string[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Payload for refund form submissions.
|
|
37
|
+
*/
|
|
38
|
+
export interface RefundSubmitPayload {
|
|
39
|
+
transportMode?: string;
|
|
40
|
+
line?: string;
|
|
41
|
+
fromStop?: string;
|
|
42
|
+
toStop?: string;
|
|
43
|
+
date?: string;
|
|
44
|
+
plannedDepartureTime?: string;
|
|
45
|
+
kilometersDriven?: string;
|
|
46
|
+
fromAddress?: string;
|
|
47
|
+
toAddress?: string;
|
|
48
|
+
reasonForTransportFailure?: string;
|
|
49
|
+
additionalInfo?: string;
|
|
50
|
+
firstName?: string;
|
|
51
|
+
lastName?: string;
|
|
52
|
+
address?: string;
|
|
53
|
+
postalCode?: string;
|
|
54
|
+
city?: string;
|
|
55
|
+
email?: string;
|
|
56
|
+
phoneNumber?: string;
|
|
57
|
+
bankAccountNumber?: string;
|
|
58
|
+
IBAN?: string;
|
|
59
|
+
SWIFT?: string;
|
|
60
|
+
amount?: string;
|
|
61
|
+
customerNumber?: string;
|
|
62
|
+
orderId?: string;
|
|
63
|
+
ticketType?: string;
|
|
64
|
+
travelCardNumber?: string;
|
|
65
|
+
refundReason?: string;
|
|
66
|
+
purchasePlatform?: string;
|
|
67
|
+
/** Base64-encoded attachments */
|
|
68
|
+
attachments?: string[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Payload for means of transport form submissions (driver, transportation, delay, etc.).
|
|
72
|
+
*/
|
|
73
|
+
export interface MeansOfTransportSubmitPayload {
|
|
74
|
+
formType?: string;
|
|
75
|
+
transportMode?: string;
|
|
76
|
+
line?: string;
|
|
77
|
+
fromStop?: string;
|
|
78
|
+
toStop?: string;
|
|
79
|
+
stop?: string;
|
|
80
|
+
date?: string;
|
|
81
|
+
departureTime?: string;
|
|
82
|
+
feedback?: string;
|
|
83
|
+
firstName?: string;
|
|
84
|
+
lastName?: string;
|
|
85
|
+
email?: string;
|
|
86
|
+
isResponseWanted?: boolean;
|
|
87
|
+
/** Base64-encoded attachments */
|
|
88
|
+
attachments?: string[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Payload for ticketing form submissions.
|
|
92
|
+
*/
|
|
93
|
+
export interface TicketingSubmitPayload {
|
|
94
|
+
formType?: string;
|
|
95
|
+
firstName?: string;
|
|
96
|
+
lastName?: string;
|
|
97
|
+
email?: string;
|
|
98
|
+
phoneNumber?: string;
|
|
99
|
+
address?: string;
|
|
100
|
+
question?: string;
|
|
101
|
+
orderId?: string;
|
|
102
|
+
customerNumber?: string;
|
|
103
|
+
travelCardNumber?: string;
|
|
104
|
+
ticketType?: object;
|
|
105
|
+
/** Base64-encoded attachments */
|
|
106
|
+
attachments?: string[];
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Payload for journey info form submissions.
|
|
110
|
+
*/
|
|
111
|
+
export interface JourneyInfoSubmitPayload {
|
|
112
|
+
firstName?: string;
|
|
113
|
+
lastName?: string;
|
|
114
|
+
email?: string;
|
|
115
|
+
question?: string;
|
|
116
|
+
/** Base64-encoded attachments */
|
|
117
|
+
attachments?: string[];
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=submit-payloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-payloads.d.ts","sourceRoot":"","sources":["../../src/types/submit-payloads.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared payload types for contact form submissions.
|
|
4
|
+
* API providers can use these types to understand the structure of incoming data.
|
|
5
|
+
* Attachments are base64-encoded strings when sent to the API.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TranslatedString } from "./translations";
|
|
2
|
+
export type TransportModeType = 'bus' | 'expressboat' | 'ferry';
|
|
3
|
+
export type ReasonForTransportFailure = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: TranslatedString;
|
|
6
|
+
};
|
|
7
|
+
export declare enum TicketTypeId {
|
|
8
|
+
SingleTicket = "singleTicket",
|
|
9
|
+
PeriodTicket = "periodTicket",
|
|
10
|
+
FramYoung = "framYoung",
|
|
11
|
+
FramStudent = "framStudent",
|
|
12
|
+
FramAdult = "framAdult",
|
|
13
|
+
FramSenior = "framSenior"
|
|
14
|
+
}
|
|
15
|
+
export type TicketType = {
|
|
16
|
+
id: TicketTypeId;
|
|
17
|
+
name: TranslatedString;
|
|
18
|
+
};
|
|
19
|
+
export type PurchasePlatformType = 'framApp' | 'enturApp' | 'framWeb' | 'enturWeb';
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,aAAa,GAAG,OAAO,CAAC;AAChE,MAAM,MAAM,yBAAyB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE/E,oBAAY,YAAY;IACpB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,UAAU,eAAe;CAC5B;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AACF,MAAM,MAAM,oBAAoB,GAC1B,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,CAAC"}
|
package/lib/types.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketTypeId = void 0;
|
|
4
|
+
var TicketTypeId;
|
|
5
|
+
(function (TicketTypeId) {
|
|
6
|
+
TicketTypeId["SingleTicket"] = "singleTicket";
|
|
7
|
+
TicketTypeId["PeriodTicket"] = "periodTicket";
|
|
8
|
+
TicketTypeId["FramYoung"] = "framYoung";
|
|
9
|
+
TicketTypeId["FramStudent"] = "framStudent";
|
|
10
|
+
TicketTypeId["FramAdult"] = "framAdult";
|
|
11
|
+
TicketTypeId["FramSenior"] = "framSenior";
|
|
12
|
+
})(TicketTypeId || (exports.TicketTypeId = TicketTypeId = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/utils/color.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAWtE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colorToOverrideMode = colorToOverrideMode;
|
|
4
|
+
function colorToOverrideMode(hexColor) {
|
|
5
|
+
if (typeof hexColor !== 'string') {
|
|
6
|
+
return 'light';
|
|
7
|
+
}
|
|
8
|
+
const colorValues = hexColorToRgb(hexColor) ?? { r: 0, g: 0, b: 0 };
|
|
9
|
+
const luminence = relativeLuminance(colorValues);
|
|
10
|
+
if (luminence <= 0.5) {
|
|
11
|
+
return 'light';
|
|
12
|
+
}
|
|
13
|
+
return 'dark';
|
|
14
|
+
}
|
|
15
|
+
function hexColorToRgb(hexColor) {
|
|
16
|
+
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
17
|
+
hexColor = hexColor.replace(shorthandRegex, function (m, r, g, b) {
|
|
18
|
+
return r + r + g + g + b + b;
|
|
19
|
+
});
|
|
20
|
+
let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hexColor);
|
|
21
|
+
return result
|
|
22
|
+
? {
|
|
23
|
+
r: parseInt(result[1], 16),
|
|
24
|
+
g: parseInt(result[2], 16),
|
|
25
|
+
b: parseInt(result[3], 16),
|
|
26
|
+
}
|
|
27
|
+
: null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* Based on the work of Ates Goral (https://stackoverflow.com/users/23501/ates-goral), 2022-10-31,
|
|
32
|
+
* https://stackoverflow.com/a/52879332
|
|
33
|
+
*/
|
|
34
|
+
function relativeLuminance(rgb) {
|
|
35
|
+
const rsrgb = rgb.r / 255;
|
|
36
|
+
const gsrgb = rgb.g / 255;
|
|
37
|
+
const bsrgb = rgb.b / 255;
|
|
38
|
+
const rc = 0.2126;
|
|
39
|
+
const gc = 0.7152;
|
|
40
|
+
const bc = 0.0722;
|
|
41
|
+
// low-gamma adjust coefficient
|
|
42
|
+
const lowc = 1 / 12.92;
|
|
43
|
+
const r = rsrgb <= 0.03928 ? rsrgb * lowc : adjustGamma(rsrgb);
|
|
44
|
+
const g = gsrgb <= 0.03928 ? gsrgb * lowc : adjustGamma(gsrgb);
|
|
45
|
+
const b = bsrgb <= 0.03928 ? bsrgb * lowc : adjustGamma(bsrgb);
|
|
46
|
+
return r * rc + g * gc + b * bc;
|
|
47
|
+
}
|
|
48
|
+
function adjustGamma(num) {
|
|
49
|
+
return Math.pow((num + 0.055) / 1.055, 2.4);
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/utils/css.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,CAEtE;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAO9D"}
|
package/lib/utils/css.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.and = and;
|
|
4
|
+
exports.andIf = andIf;
|
|
5
|
+
function and(...classes) {
|
|
6
|
+
return classes.filter(Boolean).join(' ');
|
|
7
|
+
}
|
|
8
|
+
function andIf(classes) {
|
|
9
|
+
return Object.entries(classes).reduce(function (acc, item) {
|
|
10
|
+
if (!item[1]) {
|
|
11
|
+
return acc;
|
|
12
|
+
}
|
|
13
|
+
return acc + ' ' + item[0];
|
|
14
|
+
}, '');
|
|
15
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function secondsToMinutes(seconds: number): string;
|
|
2
|
+
export declare function isDaylightSavingTime(date: Date): boolean;
|
|
3
|
+
export declare function getLastSundayOfMonthAndSetTime(year: number, month: number, hour: number): Date;
|
|
4
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AACA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAKxD;AAED,wBAAgB,8BAA8B,CAC1C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,QAOf"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.secondsToMinutes = secondsToMinutes;
|
|
4
|
+
exports.isDaylightSavingTime = isDaylightSavingTime;
|
|
5
|
+
exports.getLastSundayOfMonthAndSetTime = getLastSundayOfMonthAndSetTime;
|
|
6
|
+
// Translates seconds to minutes without postfix. Returns minimum 1
|
|
7
|
+
function secondsToMinutes(seconds) {
|
|
8
|
+
return Math.max(Math.round(seconds / 60), 1).toString();
|
|
9
|
+
}
|
|
10
|
+
function isDaylightSavingTime(date) {
|
|
11
|
+
const dstStart = getLastSundayOfMonthAndSetTime(date.getFullYear(), 2, 2); // Last Sunday of March at 02:00
|
|
12
|
+
const dstEnd = getLastSundayOfMonthAndSetTime(date.getFullYear(), 9, 3); // Last Sunday of October at 03:00
|
|
13
|
+
return date >= dstStart && date < dstEnd;
|
|
14
|
+
}
|
|
15
|
+
function getLastSundayOfMonthAndSetTime(year, month, hour) {
|
|
16
|
+
let daysInMonth = new Date(year, month + 1, 0).getDate();
|
|
17
|
+
const date = new Date(year, month, daysInMonth);
|
|
18
|
+
date.setDate(date.getDate() - ((date.getDay() + 7) % 7)); // Last sunday in month
|
|
19
|
+
date.setHours(hour); // Set time.
|
|
20
|
+
return date;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum-from-string.d.ts","sourceRoot":"","sources":["../../src/utils/enum-from-string.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,CAAC,EAC9B,YAAY;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAA;CAAE,EAC9B,QAAQ,MAAM,KACb,CAAC,GAAG,SAKQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enumFromString = void 0;
|
|
4
|
+
const enumFromString = (enumObject, value) => value
|
|
5
|
+
? Object.values(enumObject).includes(value)
|
|
6
|
+
? value
|
|
7
|
+
: undefined
|
|
8
|
+
: undefined;
|
|
9
|
+
exports.enumFromString = enumFromString;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import 'dotenv/config';
|
|
2
|
+
export declare function getEnv(): "prod" | "dev";
|
|
3
|
+
/**
|
|
4
|
+
* Return a URL to the given service. `serviceKey` should be uppercased.
|
|
5
|
+
* These values are only available at runtime, not at build time
|
|
6
|
+
*/
|
|
7
|
+
export declare const getServiceUrl: (prefix: string, serviceKey: string, required?: boolean) => string;
|
|
8
|
+
export declare const BFFURL: string;
|
|
9
|
+
export declare const SALESURL: string;
|
|
10
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAQvB,wBAAgB,MAAM,mBAErB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GACtB,QAAQ,MAAM,EACd,YAAY,MAAM,EAClB,WAAU,OAAe,KAC1B,MAoBF,CAAC;AAkBF,eAAO,MAAM,MAAM,EAAE,MAAwD,CAAC;AAC9E,eAAO,MAAM,QAAQ,EAAE,MACgC,CAAC"}
|
package/lib/utils/env.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SALESURL = exports.BFFURL = exports.getServiceUrl = void 0;
|
|
4
|
+
exports.getEnv = getEnv;
|
|
5
|
+
require("dotenv/config");
|
|
6
|
+
/**
|
|
7
|
+
* The base URL for the API, used in development mode. Use `getServiceUrl` to
|
|
8
|
+
* connect directly to service in production.
|
|
9
|
+
*/
|
|
10
|
+
const API_BASE_URL = process.env.API_BASE_URL;
|
|
11
|
+
function getEnv() {
|
|
12
|
+
return process.env['NODE_ENV'] === 'production' ? 'prod' : 'dev';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Return a URL to the given service. `serviceKey` should be uppercased.
|
|
16
|
+
* These values are only available at runtime, not at build time
|
|
17
|
+
*/
|
|
18
|
+
const getServiceUrl = (prefix, serviceKey, required = false) => {
|
|
19
|
+
if (getEnv() === 'dev')
|
|
20
|
+
return API_BASE_URL ?? '';
|
|
21
|
+
// Don't use internal services in Vercel for preview branches
|
|
22
|
+
if (process.env.VERCEL === '1')
|
|
23
|
+
return API_BASE_URL ?? '';
|
|
24
|
+
const host = getServiceHost(serviceKey);
|
|
25
|
+
const port = getServicePort(serviceKey);
|
|
26
|
+
if (host === '' || port === '') {
|
|
27
|
+
if (required) {
|
|
28
|
+
console.error(`failed to read environment variables for required service: ${serviceKey}`);
|
|
29
|
+
process.exit(-1);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return `${prefix}${host}:${port}`;
|
|
36
|
+
};
|
|
37
|
+
exports.getServiceUrl = getServiceUrl;
|
|
38
|
+
const getServiceHost = (serviceKey) => {
|
|
39
|
+
return (process.env[`${serviceKey}_SERVICE_SERVICE_HOST`] ||
|
|
40
|
+
process.env[`${serviceKey}_SERVICE_HOST`] ||
|
|
41
|
+
'');
|
|
42
|
+
};
|
|
43
|
+
const getServicePort = (serviceKey) => {
|
|
44
|
+
return (process.env[`${serviceKey}_SERVICE_SERVICE_PORT`] ||
|
|
45
|
+
process.env[`${serviceKey}_SERVICE_PORT`] ||
|
|
46
|
+
'');
|
|
47
|
+
};
|
|
48
|
+
exports.BFFURL = (0, exports.getServiceUrl)('http://', 'BFF', false) + '/bff';
|
|
49
|
+
exports.SALESURL = (0, exports.getServiceUrl)('http://', 'SALES', false) + '/sales';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"only-uniques.d.ts","sourceRoot":"","sources":["../../src/utils/only-uniques.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM,EAAE,MAAM,CAAC,EAAE,YAClC,CAAC;AAEhC,eAAO,MAAM,uBAAuB,GACjC,CAAC,EAAE,OAAO,MAAM,CAAC,MACjB,SAAS,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,YAC2B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.onlyUniquesBasedOnField = exports.onlyUniques = void 0;
|
|
4
|
+
const onlyUniques = (value, index, self) => self.indexOf(value) === index;
|
|
5
|
+
exports.onlyUniques = onlyUniques;
|
|
6
|
+
const onlyUniquesBasedOnField = (field) => (element, index, array) => array.findIndex((el) => el[field] === element[field]) === index;
|
|
7
|
+
exports.onlyUniquesBasedOnField = onlyUniquesBasedOnField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-theme-definitions.d.ts","sourceRoot":"","sources":["../../src/utils/org-theme-definitions.ts"],"names":[],"mappings":"AAIA,wBAAgB,sBAAsB;;;EAYrC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useOrgThemeDefinitions = useOrgThemeDefinitions;
|
|
4
|
+
const theme_1 = require("@contact/modules/theme");
|
|
5
|
+
const config_1 = require("@contact/modules/config");
|
|
6
|
+
function useOrgThemeDefinitions() {
|
|
7
|
+
const [isDarkMode] = (0, theme_1.useDarkMode)();
|
|
8
|
+
const org = (0, config_1.useOrgConfig)();
|
|
9
|
+
const fylkeskommuneLogo = isDarkMode && org.logo?.srcDark ? org.logo.srcDark : org.logo?.src;
|
|
10
|
+
// Default to following dark mode
|
|
11
|
+
const overrideMonoIconMode = isDarkMode ? 'dark' : 'light';
|
|
12
|
+
return { fylkeskommuneLogo, overrideMonoIconMode };
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/utils/presence.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CACrB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Language } from '@contact/translations';
|
|
2
|
+
import { LanguageAndTextType } from '@contact/translations/types';
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper for getting the name of a NeTeX entity in the given language.
|
|
5
|
+
*
|
|
6
|
+
* The name should always be present, however we fall back to "Unknown" so we
|
|
7
|
+
* don't get any unexpected errors in the code. If we actually end up getting
|
|
8
|
+
* "Unknown" somewhere in the app it should be fixed by updating the reference
|
|
9
|
+
* data source.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getReferenceDataName: <T extends {
|
|
12
|
+
name: LanguageAndTextType;
|
|
13
|
+
alternativeNames?: LanguageAndTextType[];
|
|
14
|
+
}>({ name, alternativeNames }: T, language: Language) => string;
|
|
15
|
+
//# sourceMappingURL=reference-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-data.d.ts","sourceRoot":"","sources":["../../src/utils/reference-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,CAAC,SAAS;IACR,IAAI,EAAE,mBAAmB,CAAC;IAC1B,gBAAgB,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC1C,EAED,4BAA4B,CAAC,EAC7B,UAAU,QAAQ,KACjB,MAEQ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReferenceDataName = void 0;
|
|
4
|
+
const translations_1 = require("@contact/translations");
|
|
5
|
+
/**
|
|
6
|
+
* Wrapper for getting the name of a NeTeX entity in the given language.
|
|
7
|
+
*
|
|
8
|
+
* The name should always be present, however we fall back to "Unknown" so we
|
|
9
|
+
* don't get any unexpected errors in the code. If we actually end up getting
|
|
10
|
+
* "Unknown" somewhere in the app it should be fixed by updating the reference
|
|
11
|
+
* data source.
|
|
12
|
+
*/
|
|
13
|
+
const getReferenceDataName = ({ name, alternativeNames }, language) => (0, translations_1.getTextForLanguage)([name, ...(alternativeNames || [])], language) ||
|
|
14
|
+
'Unknown';
|
|
15
|
+
exports.getReferenceDataName = getReferenceDataName;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-client-width.d.ts","sourceRoot":"","sources":["../../src/utils/use-client-width.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,4DAWnD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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.useClientWidth = useClientWidth;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const resize_observer_1 = __importDefault(require("@react-hook/resize-observer"));
|
|
9
|
+
function useClientWidth() {
|
|
10
|
+
const ref = (0, react_1.useRef)(null);
|
|
11
|
+
const [width, setWidth] = (0, react_1.useState)(0);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
if (ref.current)
|
|
14
|
+
setWidth(ref.current.clientWidth);
|
|
15
|
+
}, [ref]);
|
|
16
|
+
(0, resize_observer_1.default)(ref, (entry) => setWidth(entry.target.clientWidth));
|
|
17
|
+
return [width, ref];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-debounce.d.ts","sourceRoot":"","sources":["../../src/utils/use-debounce.ts"],"names":[],"mappings":"AAEA,iBAAS,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAYnD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_1 = require("react");
|
|
4
|
+
function useDebounce(value, delay) {
|
|
5
|
+
const [debouncedValue, setDebouncedValue] = (0, react_1.useState)(value);
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
const timer = setTimeout(() => setDebouncedValue(value), delay || 500);
|
|
8
|
+
return () => {
|
|
9
|
+
clearTimeout(timer);
|
|
10
|
+
};
|
|
11
|
+
}, [value, delay]);
|
|
12
|
+
return debouncedValue;
|
|
13
|
+
}
|
|
14
|
+
exports.default = useDebounce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-interval.d.ts","sourceRoot":"","sources":["../../src/utils/use-interval.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM,EACpB,IAAI,GAAE,KAAK,CAAC,cAAmB,EAC/B,QAAQ,GAAE,OAAe,QAqB1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = useInterval;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useInterval(callback, milliseconds, deps = [], disabled = false) {
|
|
6
|
+
const savedCallback = (0, react_1.useRef)(() => { });
|
|
7
|
+
// Remember the latest callback.
|
|
8
|
+
(0, react_1.useEffect)(() => {
|
|
9
|
+
savedCallback.current = callback;
|
|
10
|
+
}, [callback]);
|
|
11
|
+
// Set up the interval.
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
function tick() {
|
|
14
|
+
savedCallback.current();
|
|
15
|
+
}
|
|
16
|
+
if (milliseconds !== null && !disabled) {
|
|
17
|
+
let id = setInterval(tick, milliseconds);
|
|
18
|
+
return () => clearInterval(id);
|
|
19
|
+
}
|
|
20
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
|
+
}, [milliseconds, disabled, ...deps]);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-localstorage.d.ts","sourceRoot":"","sources":["../../src/utils/use-localstorage.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,EACrC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GAChB,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAqCzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = useLocalStorage;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useLocalStorage(key, initialValue) {
|
|
6
|
+
const [storedValue, setStoredValue] = (0, react_1.useState)(() => {
|
|
7
|
+
if (typeof window === 'undefined') {
|
|
8
|
+
return initialValue;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
// Get from local storage by key
|
|
12
|
+
const item = window.localStorage.getItem(key);
|
|
13
|
+
// Parse stored json or if none return initialValue
|
|
14
|
+
return item ? JSON.parse(item) : initialValue;
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// If error also return initialValue
|
|
18
|
+
console.log(error);
|
|
19
|
+
return initialValue;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
// Return a wrapped version of useState's setter function that ...
|
|
23
|
+
// ... persists the new value to localStorage.
|
|
24
|
+
const setValue = (0, react_1.useCallback)((value) => {
|
|
25
|
+
try {
|
|
26
|
+
// Allow value to be a function so we have same API as useState
|
|
27
|
+
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
28
|
+
// Save state
|
|
29
|
+
setStoredValue(valueToStore);
|
|
30
|
+
// Save to local storage
|
|
31
|
+
if (typeof window !== 'undefined') {
|
|
32
|
+
window.localStorage.setItem(key, JSON.stringify(valueToStore));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.log(error);
|
|
37
|
+
}
|
|
38
|
+
}, [key, storedValue]);
|
|
39
|
+
return [storedValue, setValue];
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-now.d.ts","sourceRoot":"","sources":["../../src/utils/use-now.ts"],"names":[],"mappings":"AAGA,wBAAgB,MAAM,CAAC,oBAAoB,GAAE,MAAa,GAAG,MAAM,CAIlE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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.useNow = useNow;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const use_interval_1 = __importDefault(require("@contact/utils/use-interval"));
|
|
9
|
+
function useNow(intervalMilliseconds = 2500) {
|
|
10
|
+
const [now, setNow] = (0, react_1.useState)(Date.now());
|
|
11
|
+
(0, use_interval_1.default)(() => setNow(Date.now()), intervalMilliseconds);
|
|
12
|
+
return now;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-media-query.d.ts","sourceRoot":"","sources":["../../src/utils/user-media-query.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAAU,EAAE,MAAM,WAkBvD"}
|