@mrfylke/contact-form 0.1.25 → 0.1.27
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/README.md +41 -13
- package/lib/ContactFormRoot.d.ts.map +1 -1
- package/lib/ContactFormRoot.js +4 -3
- package/lib/components/icon/generated-icons.d.ts +26 -26
- package/lib/components/icon/generated-icons.js +108 -108
- package/lib/contact.module.css +0 -9
- package/lib/group-travel/index.d.ts.map +1 -1
- package/lib/group-travel/index.js +1 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/journey-info/index.d.ts.map +1 -1
- package/lib/journey-info/index.js +10 -8
- package/lib/journey-info/journeyInfoStateMachine.d.ts +2 -2
- package/lib/journey-info/journeyInfoStateMachine.d.ts.map +1 -1
- package/lib/journey-info/journeyInfoStateMachine.js +1 -1
- package/lib/layouts/contact-pages.js +1 -1
- package/lib/lost-property/LostPropertyMachine.d.ts +2 -2
- package/lib/lost-property/LostPropertyMachine.d.ts.map +1 -1
- package/lib/lost-property/LostPropertyMachine.js +1 -1
- package/lib/lost-property-external/index.d.ts.map +1 -1
- package/lib/lost-property-external/index.js +1 -2
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/serviceOfferingForm.js +3 -1
- package/lib/means-of-transport/index.d.ts.map +1 -1
- package/lib/means-of-transport/index.js +8 -2
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +4 -2
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -1
- package/lib/means-of-transport/means-of-transport-form-machine.js +9 -3
- package/lib/modules/config/context.d.ts +8 -1
- package/lib/modules/config/context.d.ts.map +1 -1
- package/lib/modules/config/context.js +7 -1
- package/lib/modules/config/default-submit.d.ts +3 -0
- package/lib/modules/config/default-submit.d.ts.map +1 -0
- package/lib/modules/config/default-submit.js +13 -0
- package/lib/modules/config/index.d.ts +1 -0
- package/lib/modules/config/index.d.ts.map +1 -1
- package/lib/modules/config/index.js +1 -0
- package/lib/modules/config/types.d.ts +52 -25
- package/lib/modules/config/types.d.ts.map +1 -1
- package/lib/modules/org-data/index.d.ts +1 -2
- package/lib/modules/org-data/index.d.ts.map +1 -1
- package/lib/modules/org-data/index.js +1 -2
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/index.js +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +18 -2
- package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/index.js +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +19 -3
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
- package/lib/refund/forms/residualValueOnTravelCard/index.js +1 -2
- package/lib/refund/index.d.ts.map +1 -1
- package/lib/refund/index.js +9 -0
- package/lib/refund/refundFormMachine.d.ts +11 -2
- package/lib/refund/refundFormMachine.d.ts.map +1 -1
- package/lib/refund/refundFormMachine.js +24 -2
- package/lib/server/index.d.ts +1 -0
- package/lib/server/index.d.ts.map +1 -1
- package/lib/server/index.js +3 -1
- package/lib/server/submit-route-handler.d.ts +20 -0
- package/lib/server/submit-route-handler.d.ts.map +1 -0
- package/lib/server/submit-route-handler.js +62 -0
- package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -1
- package/lib/ticket-control/forms/feeComplaintForm.js +2 -2
- package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -1
- package/lib/ticket-control/forms/postponePayment.js +2 -2
- package/lib/ticket-control/index.d.ts.map +1 -1
- package/lib/ticket-control/index.js +2 -0
- package/lib/ticket-control/ticket-control-form-machine.d.ts +5 -2
- package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -1
- package/lib/ticket-control/ticket-control-form-machine.js +14 -4
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +1 -1
- package/lib/ticketing/ticketingStateMachine.d.ts +2 -2
- package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -1
- package/lib/translations/commons.d.ts +1 -0
- package/lib/translations/commons.d.ts.map +1 -1
- package/lib/translations/commons.js +4 -4
- package/lib/translations/index.d.ts +2 -6
- package/lib/translations/index.d.ts.map +1 -1
- package/lib/translations/index.js +1 -9
- package/lib/translations/language-context.d.ts +0 -8
- package/lib/translations/language-context.d.ts.map +1 -1
- package/lib/translations/language-context.js +1 -31
- package/lib/translations/merge-overrides.d.ts +1 -7
- package/lib/translations/merge-overrides.d.ts.map +1 -1
- package/lib/translations/merge-overrides.js +1 -13
- package/lib/translations/pages/contact.d.ts +9 -4
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +10 -5
- package/lib/translations/server/endpoints.d.ts +0 -62
- package/lib/translations/server/endpoints.d.ts.map +1 -1
- package/lib/translations/server/endpoints.js +0 -62
- package/lib/translations/types.d.ts +0 -6
- package/lib/translations/types.d.ts.map +1 -1
- package/lib/types/submit-payloads.d.ts +2 -0
- package/lib/types/submit-payloads.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/translations/common/index.d.ts +0 -3
- package/lib/translations/common/index.d.ts.map +0 -1
- package/lib/translations/common/index.js +0 -7
- package/lib/translations/common/layout.d.ts +0 -8
- package/lib/translations/common/layout.d.ts.map +0 -1
- package/lib/translations/common/layout.js +0 -11
- package/lib/translations/common/titles.d.ts +0 -4
- package/lib/translations/common/titles.d.ts.map +0 -1
- package/lib/translations/common/titles.js +0 -7
- package/lib/translations/json-to-override.d.ts +0 -19
- package/lib/translations/json-to-override.d.ts.map +0 -1
- package/lib/translations/json-to-override.js +0 -65
- package/lib/translations/load-org-translations.d.ts +0 -19
- package/lib/translations/load-org-translations.d.ts.map +0 -1
- package/lib/translations/load-org-translations.js +0 -23
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputErrorMessages } from '../validation';
|
|
2
2
|
import type { TransportModeType } from '../types';
|
|
3
3
|
import type { Line } from '../server/journey-planner/validators';
|
|
4
|
-
import type {
|
|
4
|
+
import type { FormSlug } from '../modules/config/types';
|
|
5
5
|
export type LostPropertyContext = {
|
|
6
6
|
transportMode?: TransportModeType;
|
|
7
7
|
line?: Line;
|
|
@@ -51,7 +51,7 @@ type SubmitInput = {
|
|
|
51
51
|
email?: string;
|
|
52
52
|
phoneNumber?: string;
|
|
53
53
|
};
|
|
54
|
-
export declare function createLostPropertyMachine(onSubmit: (
|
|
54
|
+
export declare function createLostPropertyMachine(onSubmit: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>, paths?: MachinePaths): import("xstate").StateMachine<LostPropertyContext, {
|
|
55
55
|
type: "ON_INPUT_CHANGE";
|
|
56
56
|
inputName: string;
|
|
57
57
|
value: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LostPropertyMachine.d.ts","sourceRoot":"","sources":["../../src/lost-property/LostPropertyMachine.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"LostPropertyMachine.d.ts","sourceRoot":"","sources":["../../src/lost-property/LostPropertyMachine.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CA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C,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,KAAK,WAAW,GAAG;IACjB,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,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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;CACtB,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,CACR,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,OAAO,CAAC,QAAQ,CAAC,EACtB,KAAK,CAAC,EAAE,YAAY;UA3BV,iBAAiB;eAAa,MAAM;WAAS,OAAO;;UACpD,yBAAyB;WAAS,iBAAiB;;UACnD,gBAAgB;WAAS,IAAI,GAAG,SAAS;;UACzC,QAAQ;2BAAyB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4NpD"}
|
|
@@ -129,7 +129,7 @@ function createLostPropertyMachine(onSubmit, paths) {
|
|
|
129
129
|
},
|
|
130
130
|
actors: {
|
|
131
131
|
submit: (0, xstate_1.fromPromise)(async ({ input }) => {
|
|
132
|
-
const response = await onSubmit('
|
|
132
|
+
const response = await onSubmit('lost-property', input);
|
|
133
133
|
if (!response.ok)
|
|
134
134
|
throw new Error('Failed to submit');
|
|
135
135
|
return response.ok;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lost-property-external/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lost-property-external/index.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,+BAA+B,gCAkBtD"}
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = LostPropertyExternalFormContent;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const contact_module_css_1 = __importDefault(require("../contact.module.css"));
|
|
9
8
|
const components_1 = require("../components");
|
|
10
9
|
const link_1 = __importDefault(require("next/link"));
|
|
11
10
|
const translations_1 = require("../translations");
|
|
@@ -13,5 +12,5 @@ const typography_1 = require("../components/typography");
|
|
|
13
12
|
function LostPropertyExternalFormContent() {
|
|
14
13
|
const PageText = (0, translations_1.usePageText)();
|
|
15
14
|
const { t } = (0, translations_1.useTranslation)();
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.lostProperty.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.lostProperty.description.info), ' ', (0, jsx_runtime_1.jsx)(link_1.default, {
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.lostProperty.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.lostProperty.description.info), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: t(PageText.Contact.lostProperty.description.url), target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.lostProperty.description.externalLink) })] }) }));
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceOfferingForm.d.ts","sourceRoot":"","sources":["../../../src/means-of-transport/forms/serviceOfferingForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAIlF,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAcvD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE;QAAE,OAAO,EAAE,4BAA4B,CAAA;KAAE,CAAC;IACjD,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,0BAA0B,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,kBAGjC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"serviceOfferingForm.d.ts","sourceRoot":"","sources":["../../../src/means-of-transport/forms/serviceOfferingForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAIlF,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAcvD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE;QAAE,OAAO,EAAE,4BAA4B,CAAA;KAAE,CAAC;IACjD,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,0BAA0B,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,kBAGjC,wBAAwB,gCAqM1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -21,7 +21,9 @@ const ServiceOfferingForm = ({ state, send, }) => {
|
|
|
21
21
|
type: 'ON_LINE_CHANGE',
|
|
22
22
|
value: value,
|
|
23
23
|
});
|
|
24
|
-
}
|
|
24
|
+
}, isRequired: state.context.enableRequiredLineInServiceOffering, error: state.context?.errorMessages['line']?.[0]
|
|
25
|
+
? t(state.context?.errorMessages['line']?.[0])
|
|
26
|
+
: undefined })] }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.feedback.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "feedback", description: t(PageText.Contact.input.feedback.description), value: state.context.feedback || '', onChange: (e) => send({
|
|
25
27
|
type: 'ON_INPUT_CHANGE',
|
|
26
28
|
inputName: 'feedback',
|
|
27
29
|
value: e.target.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/means-of-transport/index.tsx"],"names":[],"mappings":"AAwBA,QAAA,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/means-of-transport/index.tsx"],"names":[],"mappings":"AAwBA,QAAA,MAAM,uBAAuB,mCA2G5B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -20,7 +20,7 @@ const MeansOfTransportContent = () => {
|
|
|
20
20
|
const PageText = (0, translations_1.usePageText)();
|
|
21
21
|
const { t } = (0, translations_1.useTranslation)();
|
|
22
22
|
const apiConfig = (0, config_1.useApiConfig)();
|
|
23
|
-
const { formSchemaOverrides, layout } = (0, config_1.useContactFormConfig)();
|
|
23
|
+
const { formSchemaOverrides, layout, features } = (0, config_1.useContactFormConfig)();
|
|
24
24
|
const successPath = layout?.successPath ??
|
|
25
25
|
(layout?.basePath ? `${layout.basePath}/success` : '/contact/success');
|
|
26
26
|
const errorPath = layout?.errorPath ??
|
|
@@ -28,7 +28,13 @@ const MeansOfTransportContent = () => {
|
|
|
28
28
|
const machine = (0, react_2.useMemo)(() => (0, means_of_transport_form_machine_1.createMeansOfTransportFormMachine)(apiConfig.onSubmit, {
|
|
29
29
|
successPath,
|
|
30
30
|
errorPath,
|
|
31
|
-
|
|
31
|
+
enableRequiredLineInServiceOffering: features?.enableRequiredLineInServiceOffering === true,
|
|
32
|
+
}), [
|
|
33
|
+
apiConfig.onSubmit,
|
|
34
|
+
successPath,
|
|
35
|
+
errorPath,
|
|
36
|
+
features?.enableRequiredLineInServiceOffering,
|
|
37
|
+
]);
|
|
32
38
|
const [state, send] = (0, react_1.useMachine)(machine);
|
|
33
39
|
const displaySubmitButton = state.context.formType;
|
|
34
40
|
// Filter form types based on overrides
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransportModeType } from '../types';
|
|
2
2
|
import { Line } from '../server/journey-planner/validators';
|
|
3
3
|
import { InputErrorMessages } from '../validation';
|
|
4
|
-
import type {
|
|
4
|
+
import type { FormSlug } from '../modules/config/types';
|
|
5
5
|
export declare enum FormType {
|
|
6
6
|
Driver = "driver",
|
|
7
7
|
Transportation = "transportation",
|
|
@@ -43,6 +43,7 @@ export type MeansOfTransportContextProps = {
|
|
|
43
43
|
lastName?: string;
|
|
44
44
|
email?: string;
|
|
45
45
|
isResponseWanted?: boolean;
|
|
46
|
+
enableRequiredLineInServiceOffering: boolean;
|
|
46
47
|
errorMessages: InputErrorMessages;
|
|
47
48
|
firstErrorMessage?: string;
|
|
48
49
|
hasSubmissionError?: boolean;
|
|
@@ -50,8 +51,9 @@ export type MeansOfTransportContextProps = {
|
|
|
50
51
|
export type MachinePaths = {
|
|
51
52
|
successPath: string;
|
|
52
53
|
errorPath: string;
|
|
54
|
+
enableRequiredLineInServiceOffering?: boolean;
|
|
53
55
|
};
|
|
54
|
-
export declare function createMeansOfTransportFormMachine(onSubmit: (
|
|
56
|
+
export declare function createMeansOfTransportFormMachine(onSubmit: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>, paths?: MachinePaths): import("xstate").StateMachine<MeansOfTransportContextProps, {
|
|
55
57
|
type: "VALIDATE";
|
|
56
58
|
} | {
|
|
57
59
|
type: "ON_INPUT_CHANGE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"means-of-transport-form-machine.d.ts","sourceRoot":"","sources":["../../src/means-of-transport/means-of-transport-form-machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAUzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"means-of-transport-form-machine.d.ts","sourceRoot":"","sources":["../../src/means-of-transport/means-of-transport-form-machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAUzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,KAAK,UAAU;IACf,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,MAAM,WAAW;CAClB;AAED,KAAK,WAAW,GAAG;IACjB,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,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,IAAI,CAAC,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyZd,CAAC"}
|
|
@@ -16,7 +16,7 @@ var FormType;
|
|
|
16
16
|
FormType["Injury"] = "injury";
|
|
17
17
|
})(FormType || (exports.FormType = FormType = {}));
|
|
18
18
|
const setInputsToValidate = (context) => {
|
|
19
|
-
const { formType, transportMode, line, fromStop, toStop, stop, date, plannedDepartureTime, feedback, firstName, lastName, email, isResponseWanted, } = context;
|
|
19
|
+
const { formType, transportMode, line, fromStop, toStop, stop, date, plannedDepartureTime, feedback, firstName, lastName, email, isResponseWanted, enableRequiredLineInServiceOffering, } = context;
|
|
20
20
|
switch (formType) {
|
|
21
21
|
case FormType.Driver:
|
|
22
22
|
return {
|
|
@@ -69,6 +69,7 @@ const setInputsToValidate = (context) => {
|
|
|
69
69
|
transportMode,
|
|
70
70
|
feedback,
|
|
71
71
|
isResponseWanted,
|
|
72
|
+
...(enableRequiredLineInServiceOffering && { line }),
|
|
72
73
|
...(isResponseWanted && { firstName, lastName, email }),
|
|
73
74
|
};
|
|
74
75
|
case FormType.Injury:
|
|
@@ -88,6 +89,7 @@ const setInputsToValidate = (context) => {
|
|
|
88
89
|
function createMeansOfTransportFormMachine(onSubmit, paths) {
|
|
89
90
|
const successPath = paths?.successPath ?? '/contact/success';
|
|
90
91
|
const errorPath = paths?.errorPath ?? '/contact/error';
|
|
92
|
+
const enableRequiredLineInServiceOffering = paths?.enableRequiredLineInServiceOffering === true;
|
|
91
93
|
return (0, xstate_1.setup)({
|
|
92
94
|
types: {
|
|
93
95
|
context: {},
|
|
@@ -172,7 +174,7 @@ function createMeansOfTransportFormMachine(onSubmit, paths) {
|
|
|
172
174
|
...input,
|
|
173
175
|
attachments: base64EncodedAttachments,
|
|
174
176
|
};
|
|
175
|
-
const response = await onSubmit('
|
|
177
|
+
const response = await onSubmit('means-of-transport', state);
|
|
176
178
|
if (!response.ok)
|
|
177
179
|
throw new Error('Failed to call API');
|
|
178
180
|
return response.ok;
|
|
@@ -181,7 +183,11 @@ function createMeansOfTransportFormMachine(onSubmit, paths) {
|
|
|
181
183
|
}).createMachine({
|
|
182
184
|
/** @xstate-layout N4IgpgJg5mDOIC5QAoC2BDAxgCwJYDswBKAOlwgBswBiAZQFUAhAWQEkAVAbQAYBdRUAAcA9rFwAXXMPwCQAD0QBGAGzcSAZgCsATnXLlAJi2rN6gDQgAnkoDsmktxsAObstN7FN5eoC+Pi2hYeISk5FTU7ADyAOLRADIAojz8SCAiYpLSsgoIACyKJNpFxSUlFtYIRvZO6rUqBg3c3Fp+ARg4BMRklDTsAIIAGqzJsukSUjKpOSpqWrr6VSbmVojqueoaBk6K3AbOqjYGyq0ggR0hJJDj+FB0TGxcfKOi41lTiJqaBdyKmoaKTmcTkB2nKtnsjhcblqyk83hOZ2CXSukhudAS7AA+uwAEp9ABytAACpEcVjmJEACJJJ6pMaZSagHJ2NSKXKudnqGw7TSAsGVdTaEhOYpOTQ2ZqmZS5BHtJGkCjCdAQAi3CDSMBkfAAN2EAGtNYjOgqlSqbggCLrMOgGckRnSXgzsh8vg5fv9AcCQfztiRcsVnHpuO4bLKgsaSIrlarqGAAE5x4RxkiCCg2gBmSdQJCNFyjZqgFp1wmttr49qEjomzoQn2+7oMAKB3pWlQM9nF20cn20nj8-hA+GEEDgslzxGeGWr7wQAFplA4mkvl8ubPz52Hzl0wmBJ69GfIPkLcgZtMpudovmze6DW7UbH7FGzT9wnA12TKB+PSCjVXunTO2wPq47anmK3DaGKuT8msBS5M4EFit4Ng2OoBifm04Z5qaf4OlObxMqsmi5H6TjrGRhwoV4wb8r8BgOAh5FNCo56bvKJCwAArpgmBwPAeH7jWQEOIYmhgZoiHEbRzQkKY2jBl83C5GKnihv2QA */
|
|
183
185
|
initial: 'editing',
|
|
184
|
-
context: {
|
|
186
|
+
context: {
|
|
187
|
+
isResponseWanted: undefined,
|
|
188
|
+
enableRequiredLineInServiceOffering,
|
|
189
|
+
errorMessages: {},
|
|
190
|
+
},
|
|
185
191
|
on: {
|
|
186
192
|
ON_INPUT_CHANGE: { actions: 'onInputChange' },
|
|
187
193
|
SELECT_FORM_TYPE: { target: '#formTypeHandler' },
|
|
@@ -18,5 +18,12 @@ export declare function useThemeConfig(): Theme;
|
|
|
18
18
|
/**
|
|
19
19
|
* Hook to access the API configuration.
|
|
20
20
|
*/
|
|
21
|
-
export declare function useApiConfig():
|
|
21
|
+
export declare function useApiConfig(): {
|
|
22
|
+
onSubmit: (slug: import("./types").FormSlug, state: Record<string, unknown>) => Promise<Response>;
|
|
23
|
+
endpoints?: {
|
|
24
|
+
lines?: string;
|
|
25
|
+
departures?: string;
|
|
26
|
+
submit?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
22
29
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/modules/config/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/modules/config/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGxD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mDAEpC,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,iBAAiB,GACxB,iBAAiB,CAKnB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CASxD;AAED;;;GAGG;AACH,wBAAgB,cAAc,UAG7B;AA4BD;;GAEG;AACH,wBAAgB,YAAY;;;aAY6yD,CAAC;kBAA+U,CAAC;cAAoB,CAAC;;EAD9qE"}
|
|
@@ -6,6 +6,7 @@ exports.useContactFormConfig = useContactFormConfig;
|
|
|
6
6
|
exports.useThemeConfig = useThemeConfig;
|
|
7
7
|
exports.useApiConfig = useApiConfig;
|
|
8
8
|
const react_1 = require("react");
|
|
9
|
+
const default_submit_1 = require("./default-submit");
|
|
9
10
|
/**
|
|
10
11
|
* Context for contact form configuration.
|
|
11
12
|
* This allows the entire form to access theme, icons, and other settings.
|
|
@@ -66,5 +67,10 @@ function mergeThemeWithOverrides(base, overrides) {
|
|
|
66
67
|
*/
|
|
67
68
|
function useApiConfig() {
|
|
68
69
|
const { api } = useContactFormConfig();
|
|
69
|
-
|
|
70
|
+
const endpoint = api?.endpoints?.submit;
|
|
71
|
+
const defaultOnSubmit = (0, react_1.useCallback)((slug, state) => (0, default_submit_1.createDefaultOnSubmit)(endpoint)(slug, state), [endpoint]);
|
|
72
|
+
return {
|
|
73
|
+
...api,
|
|
74
|
+
onSubmit: api?.onSubmit ?? defaultOnSubmit,
|
|
75
|
+
};
|
|
70
76
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-submit.d.ts","sourceRoot":"","sources":["../../../src/modules/config/default-submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,wBAAgB,qBAAqB,CACnC,QAAQ,GAAE,MAAgC,IAGxC,MAAM,QAAQ,EACd,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,OAAO,CAAC,QAAQ,CAAC,CAOrB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDefaultOnSubmit = createDefaultOnSubmit;
|
|
4
|
+
const DEFAULT_SUBMIT_ENDPOINT = '/api/contact/submit';
|
|
5
|
+
function createDefaultOnSubmit(endpoint = DEFAULT_SUBMIT_ENDPOINT) {
|
|
6
|
+
return async (slug, state) => {
|
|
7
|
+
return fetch(endpoint, {
|
|
8
|
+
method: 'POST',
|
|
9
|
+
headers: { 'Content-Type': 'application/json' },
|
|
10
|
+
body: JSON.stringify({ ...state, $slug: slug }),
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -12,7 +12,7 @@ export type ContactPage = {
|
|
|
12
12
|
/** Stable page identifier used for `pages.enabledPageIds` / `externalUrlByPageId`. */
|
|
13
13
|
id: PageId;
|
|
14
14
|
title: TranslatedString;
|
|
15
|
-
/** URL segment under the host's basePath, e.g. 'refund' -> `${basePath}/refund`. */
|
|
15
|
+
/** URL segment under the host's basePath, e.g. 'refund' -> `${basePath}/refund`. Also the connector form-type slug the default onSubmit and submit route handler use on the wire. */
|
|
16
16
|
slug: string;
|
|
17
17
|
icon: MonoIcons;
|
|
18
18
|
/** Body component rendered for this page. */
|
|
@@ -149,10 +149,11 @@ export type ThemeColors = {
|
|
|
149
149
|
};
|
|
150
150
|
export type TextColorType = 'light' | 'dark';
|
|
151
151
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
152
|
+
* Slugs of the pages that submit through the shared onSubmit(slug, state)
|
|
153
|
+
* contract. A subset of `PageId`'s slugs — excludes pages that don't submit
|
|
154
|
+
* (e.g. 'group-travel', 'lost-property-external').
|
|
154
155
|
*/
|
|
155
|
-
export type
|
|
156
|
+
export type FormSlug = 'ticket-control' | 'refund' | 'means-of-transport' | 'ticketing' | 'journey-info' | 'lost-property';
|
|
156
157
|
/**
|
|
157
158
|
* API configuration
|
|
158
159
|
*/
|
|
@@ -166,25 +167,18 @@ export type ApiConfig = {
|
|
|
166
167
|
* departures route.
|
|
167
168
|
*/
|
|
168
169
|
departures?: string;
|
|
170
|
+
submit?: string;
|
|
169
171
|
};
|
|
170
172
|
/**
|
|
171
|
-
* Submit callback that receives the
|
|
172
|
-
*
|
|
173
|
+
* Submit callback that receives the form slug and form state.
|
|
174
|
+
* Optional — omit it to use the package's default (POSTs
|
|
175
|
+
* `{ ...state, $slug: slug }` to `endpoints.submit`).
|
|
173
176
|
*
|
|
174
|
-
* @param
|
|
177
|
+
* @param slug - The submitting page's slug, see `FormSlug`
|
|
175
178
|
* @param state - The form data as a record of field values
|
|
176
179
|
* @returns Promise<Response> - The fetch Response from the submission
|
|
177
180
|
*/
|
|
178
|
-
onSubmit
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Organization/branding configuration
|
|
182
|
-
*/
|
|
183
|
-
export type OrgConfig = {
|
|
184
|
-
/** URL for the travel search / journey planner link shown in journey-info form. Default: '/' */
|
|
185
|
-
travelSearchHref?: string;
|
|
186
|
-
/** URL for the contact/opening-hours page linked from the journey-info form. */
|
|
187
|
-
contactHref?: string;
|
|
181
|
+
onSubmit?: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>;
|
|
188
182
|
};
|
|
189
183
|
/** Label type for layout links - compatible with TranslatedString */
|
|
190
184
|
export type LayoutLinkLabel = Record<string, string>;
|
|
@@ -308,9 +302,7 @@ export type ContactFormConfig = {
|
|
|
308
302
|
*/
|
|
309
303
|
themeOverrides?: DeepPartial<Theme>;
|
|
310
304
|
/** API endpoints for form submission */
|
|
311
|
-
api
|
|
312
|
-
/** Organization/branding information */
|
|
313
|
-
org?: OrgConfig;
|
|
305
|
+
api?: ApiConfig;
|
|
314
306
|
/** Feature flags */
|
|
315
307
|
features?: {
|
|
316
308
|
enableFileUploads?: boolean;
|
|
@@ -322,20 +314,23 @@ export type ContactFormConfig = {
|
|
|
322
314
|
includeFerry?: boolean;
|
|
323
315
|
/**
|
|
324
316
|
* Include bank account fields (bankkontonummer / utenlandsk bankkontonummer) in the
|
|
325
|
-
* fee complaint form.
|
|
317
|
+
* fee complaint form.
|
|
318
|
+
* Default: true.
|
|
326
319
|
* When false, bank account fields are hidden and not validated.
|
|
327
320
|
*/
|
|
328
321
|
includeBankAccountFields?: boolean;
|
|
329
322
|
/**
|
|
330
323
|
* Include the ticket type selector (Enkeltbillett/Periodebillett) in the
|
|
331
|
-
* "other ticket refund" form (otherTicketRefund).
|
|
324
|
+
* "other ticket refund" form (otherTicketRefund).
|
|
325
|
+
* Default: true.
|
|
332
326
|
* When false, the ticket type dropdown is hidden and not validated.
|
|
333
327
|
* Set to false for orgs where the "other ticket" is a travel card (e.g. Innlandskort).
|
|
334
328
|
*/
|
|
335
329
|
includeOtherTicketTypeSelector?: boolean;
|
|
336
330
|
/**
|
|
337
331
|
* Include the customer number field in the fee complaint form when
|
|
338
|
-
* "app ticket" storage mode is selected.
|
|
332
|
+
* "app ticket" storage mode is selected.
|
|
333
|
+
* Default: true.
|
|
339
334
|
* When false, only the phone number (appPhoneNumber) is shown and validated —
|
|
340
335
|
* useful for orgs using Entur-appen where customers don't have a customer number.
|
|
341
336
|
*/
|
|
@@ -354,6 +349,37 @@ export type ContactFormConfig = {
|
|
|
354
349
|
* When true, a departure section is shown and validated in those forms.
|
|
355
350
|
*/
|
|
356
351
|
includeRefundDepartureInfo?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Include the customer number and purchase platform fields in the app
|
|
354
|
+
* ticket refund form.
|
|
355
|
+
* Default: false.
|
|
356
|
+
*/
|
|
357
|
+
includeCustomerNumberAndPurchasePlatformInAppTicketRefund?: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Require the line field in the service offering form (means of
|
|
360
|
+
* transport).
|
|
361
|
+
* Default: false.
|
|
362
|
+
* When true, line is validated as required; it is always shown either way.
|
|
363
|
+
*/
|
|
364
|
+
enableRequiredLineInServiceOffering?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Include the order id and amount fields in the other ticket refund
|
|
367
|
+
* form.
|
|
368
|
+
* Default: false.
|
|
369
|
+
*/
|
|
370
|
+
includeOrderIdAndAmountInOtherTicketRefund?: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Include the fee date field in the fee complaint and postpone payment
|
|
373
|
+
* forms.
|
|
374
|
+
* Default: false.
|
|
375
|
+
*/
|
|
376
|
+
includeFeeDateInTicketControl?: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Require the attachments field in the other ticket refund form.
|
|
379
|
+
* Has no effect unless enableFileUploads is also true.
|
|
380
|
+
* Default: false.
|
|
381
|
+
*/
|
|
382
|
+
enableRequiredAttachmentInOtherTicketRefund?: boolean;
|
|
357
383
|
};
|
|
358
384
|
/** Optional host-provided filters for line lookups. */
|
|
359
385
|
lineFilters?: LineFilterConfig;
|
|
@@ -361,9 +387,10 @@ export type ContactFormConfig = {
|
|
|
361
387
|
layout?: LayoutConfig;
|
|
362
388
|
/**
|
|
363
389
|
* Translation overrides for the contact form. Any key left unset falls
|
|
364
|
-
* back to the package's built-in default translations.
|
|
390
|
+
* back to the package's built-in default translations. Omit entirely to
|
|
391
|
+
* use the package's defaults as-is.
|
|
365
392
|
*/
|
|
366
|
-
translations
|
|
393
|
+
translations?: ContactFormTranslationsOverride;
|
|
367
394
|
/**
|
|
368
395
|
* Which contact pages (tabs) are shown and whether they link externally.
|
|
369
396
|
* Host app must provide `enabledPageIds` - no page is shown by default.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/config/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EACV,+BAA+B,EAC/B,gBAA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CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC"}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* const { supportEmail, orgId } = getOrgData();
|
|
6
6
|
*
|
|
7
7
|
* New usage:
|
|
8
|
-
* const
|
|
9
|
-
* const href = org?.contactHref;
|
|
8
|
+
* const config = useContactFormConfig();
|
|
10
9
|
*/
|
|
11
10
|
export * from './compat-layer';
|
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/org-data/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/org-data/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* const { supportEmail, orgId } = getOrgData();
|
|
7
7
|
*
|
|
8
8
|
* New usage:
|
|
9
|
-
* const
|
|
10
|
-
* const href = org?.contactHref;
|
|
9
|
+
* const config = useContactFormConfig();
|
|
11
10
|
*/
|
|
12
11
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
12
|
if (k2 === undefined) k2 = k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-and-travel-guarantee/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAEL,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAUhD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE,SAAS,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,kBAG3C,kCAAkC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-and-travel-guarantee/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAEL,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAUhD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE,SAAS,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,kBAG3C,kCAAkC,gCAiHpC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -23,7 +23,7 @@ const RefundAndTravelGuaranteeForms = ({ state, send, }) => {
|
|
|
23
23
|
const displayRefundCarForm = state.context.isInitialAgreementChecked &&
|
|
24
24
|
state.context.formType === 'refundCar';
|
|
25
25
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.refund.agreement.title), children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.refund.agreement.delayedRefundText) }), (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.refund.agreement.ticketRefundText) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "heading__m", children: t(PageText.Contact.refund.agreement.travelGuaranteeExceptions.label) }), (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: PageText.Contact.refund.agreement.travelGuaranteeExceptions.exceptions.map((exception, index) => ((0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(exception.text) }), exception.examples.length > 0 && ((0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: exception.examples.map((example, exampleIndex) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(example) }) }, exampleIndex))) }))] }, index))) })] }), (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.refund.agreement.travelGuaranteeExceptions
|
|
26
|
-
.exclusion), ' ', (0, jsx_runtime_1.jsx)(link_1.default, {
|
|
26
|
+
.exclusion), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: t(PageText.Contact.refund.agreement.travelGuaranteeExceptions.link
|
|
27
27
|
.href), target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.refund.agreement.travelGuaranteeExceptions.link
|
|
28
28
|
.text) })] }), (0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { label: t(PageText.Contact.ticketControl.feeComplaint.firstAgreement.checkbox), checked: state.context.isInitialAgreementChecked, onChange: () => send({
|
|
29
29
|
type: 'ON_INPUT_CHANGE',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refundCarForm.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-and-travel-guarantee/refundCarForm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAgB7D,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,iBAAiB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"refundCarForm.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-and-travel-guarantee/refundCarForm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAgB7D,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,iBAAiB,kBAAkB,gCAgdhE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -12,7 +12,7 @@ const RefundCarForm = ({ state, send }) => {
|
|
|
12
12
|
const PageText = (0, translations_1.usePageText)();
|
|
13
13
|
const { getLinesByMode, getQuaysByLine } = (0, use_lines_1.useLines)();
|
|
14
14
|
const transportModeOptions = (0, use_lines_1.useTransportModeOptions)();
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.refund.refundCar.aboutTheCarTrip.title), children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.refund.refundCar.info) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "kilometersDriven", label: t(PageText.Contact.input.kilometersDriven.label), type: "text", name: "kilometersDriven", value: state.context.kilometersDriven || '', isRequired: true, errorMessage: state.context?.errorMessages['kilometersDriven']?.[0] || undefined, onChange: (e) => send({
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.refund.refundCar.aboutTheCarTrip.title), children: [t(PageText.Contact.refund.refundCar.info) && ((0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.refund.refundCar.info) })), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "kilometersDriven", label: t(PageText.Contact.input.kilometersDriven.label), type: "text", name: "kilometersDriven", value: state.context.kilometersDriven || '', isRequired: true, errorMessage: state.context?.errorMessages['kilometersDriven']?.[0] || undefined, onChange: (e) => send({
|
|
16
16
|
type: 'ON_INPUT_CHANGE',
|
|
17
17
|
inputName: 'kilometersDriven',
|
|
18
18
|
value: e.target.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appTicketRefund.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/appTicketRefund.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAkBhD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,iBAAiB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"appTicketRefund.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/appTicketRefund.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAkBhD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,iBAAiB,oBAAoB,gCAuHpE,CAAC;AAqQF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,KAAK,EACL,IAAI,GACL,EAAE,oBAAoB,+BAWtB"}
|
|
@@ -10,11 +10,27 @@ const use_lines_1 = require("../../../lines/use-lines");
|
|
|
10
10
|
const AppTicketRefund = ({ state, send }) => {
|
|
11
11
|
const PageText = (0, translations_1.usePageText)();
|
|
12
12
|
const { t } = (0, translations_1.useTranslation)();
|
|
13
|
-
|
|
13
|
+
const { features } = (0, context_1.useContactFormConfig)();
|
|
14
|
+
const includeCustomerNumberAndPurchasePlatform = features?.includeCustomerNumberAndPurchasePlatformInAppTicketRefund;
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.refund.appTicketRefund.label), children: [includeCustomerNumberAndPurchasePlatform && ((0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(PageText.Contact.input.customerNumber.label), type: "text", name: "customerNumber", value: state.context.customerNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
|
|
16
|
+
type: 'ON_INPUT_CHANGE',
|
|
17
|
+
inputName: 'customerNumber',
|
|
18
|
+
value: e.target.value,
|
|
19
|
+
}), modalContent: {
|
|
20
|
+
description: t(PageText.Contact.input.customerNumber.description),
|
|
21
|
+
} })), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "orderId", label: t(PageText.Contact.input.orderId.label(true)), type: "text", name: "orderId", value: state.context.orderId || '', isRequired: true, errorMessage: state.context?.errorMessages['orderId']?.[0], onChange: (e) => send({
|
|
14
22
|
type: 'ON_INPUT_CHANGE',
|
|
15
23
|
inputName: 'orderId',
|
|
16
24
|
value: e.target.value,
|
|
17
|
-
})
|
|
25
|
+
}), modalContent: {
|
|
26
|
+
description: t(PageText.Contact.input.orderId.description),
|
|
27
|
+
bulletPoints: PageText.Contact.input.orderId.descriptionBulletPoints.map((bulletPoint) => t(bulletPoint)),
|
|
28
|
+
} }), includeCustomerNumberAndPurchasePlatform && ((0, jsx_runtime_1.jsx)(components_1.Select, { id: "purchasePlatform", label: t(PageText.Contact.input.purchasePlatform.label), value: state.context.purchasePlatform || '', onChange: (value) => send({
|
|
29
|
+
type: 'ON_PURCHASE_PLATFORM_CHANGE',
|
|
30
|
+
value: value,
|
|
31
|
+
}), isRequired: true, error: state.context?.errorMessages['purchasePlatform']?.[0]
|
|
32
|
+
? t(state.context?.errorMessages['purchasePlatform']?.[0])
|
|
33
|
+
: undefined, valueToId: (val) => val, valueToText: (val) => t(PageText.Contact.input.purchasePlatform.platforms[val]), options: ['enturApp', 'enturWeb', 'framApp', 'framWeb'], placeholder: t(PageText.Contact.input.purchasePlatform.optionLabel) })), (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "refundReason", description: t(PageText.Contact.input.refundReason.question), value: state.context.refundReason || '', isRequired: true, onChange: (e) => send({
|
|
18
34
|
type: 'ON_INPUT_CHANGE',
|
|
19
35
|
inputName: 'refundReason',
|
|
20
36
|
value: e.target.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAUnC,OAAO,EAAE,kBAAkB,EAAoB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAUnC,OAAO,EAAE,kBAAkB,EAAoB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,sBAAsB,gCAkIxE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -26,7 +26,7 @@ const RefundTicketForms = ({ state, send }) => {
|
|
|
26
26
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.refund.initialAgreement
|
|
27
27
|
.ticketRefundAvailability.title), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: PageText.Contact.ticketing.refund.initialAgreement.ticketRefundAvailability.rules.map((rule, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(rule) }) }, index))) }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.refund.initialAgreement
|
|
28
28
|
.refundableTicketTypes.title), children: [(0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: refundableTicketTypes.rules.map((rule, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(rule) }) }, index))) }), (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.ticketing.refund.initialAgreement
|
|
29
|
-
.refundableTicketTypes.info.text), ' ', (0, jsx_runtime_1.jsx)(link_1.default, {
|
|
29
|
+
.refundableTicketTypes.info.text), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: '?type=refundAndTravelGuarantee&agreed=true', target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.ticketing.refund.initialAgreement
|
|
30
30
|
.refundableTicketTypes.info.link) })] }), t(refundableTicketTypes.info.note) && ((0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(refundableTicketTypes.info.note) })), nonRefundableTicketTypes.rules.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "heading__m", children: t(nonRefundableTicketTypes.title) }), (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: nonRefundableTicketTypes.rules.map((rule, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(rule) }) }, index))) })] })), (0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { label: t(PageText.Contact.ticketing.refund.initialAgreement
|
|
31
31
|
.refundableTicketTypes.checkbox), checked: state.context.isInitialAgreementChecked, onChange: () => send({
|
|
32
32
|
type: 'ON_INPUT_CHANGE',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otherTicketRefund.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/otherTicketRefund.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAahD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;
|
|
1
|
+
{"version":3,"file":"otherTicketRefund.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/otherTicketRefund.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAahD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE;QAAE,OAAO,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,gBAAgB,KAAK,IAAI,CAAC;CAChD,CAAC;AA0eF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,sBAAsB,gCAWxE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|