@mrfylke/contact-form 0.1.32 → 0.1.33
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/components/form/file-input.js +1 -1
- package/lib/components/form/textarea.d.ts +3 -2
- package/lib/components/form/textarea.d.ts.map +1 -1
- package/lib/components/form/textarea.js +6 -4
- package/lib/components/icon/generated-icons.js +8 -8
- package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/injuryForm.js +1 -1
- package/lib/modules/config/types.d.ts +20 -4
- package/lib/modules/config/types.d.ts.map +1 -1
- package/lib/refund/events.d.ts +1 -1
- package/lib/refund/events.d.ts.map +1 -1
- 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-ticket/appTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +16 -13
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +12 -3
- package/lib/refund/index.d.ts.map +1 -1
- package/lib/refund/index.js +6 -4
- package/lib/refund/refundFormMachine.d.ts +13 -8
- package/lib/refund/refundFormMachine.d.ts.map +1 -1
- package/lib/refund/refundFormMachine.js +29 -9
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appTravelSuggestionForm.js +5 -1
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -1
- package/lib/ticketing/forms/priceAndTicketTypesForm.js +5 -1
- package/lib/ticketing/index.d.ts.map +1 -1
- package/lib/ticketing/index.js +8 -2
- package/lib/ticketing/ticketingStateMachine.d.ts +2 -0
- package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -1
- package/lib/ticketing/ticketingStateMachine.js +4 -1
- package/lib/translations/language-context.d.ts +2 -2
- package/lib/translations/language-context.d.ts.map +1 -1
- package/lib/translations/pages/contact.d.ts +15 -9
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +17 -8
- package/lib/translations/types.d.ts +10 -5
- package/lib/translations/types.d.ts.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/validation/validationRules.d.ts.map +1 -1
- package/lib/validation/validationRules.js +2 -1
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ function FileInput({ id, onChange, iconLabel, label, isRequired = false, name, e
|
|
|
57
57
|
onChange([...files, ...filteredFiles]);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)("div", { onDragOver: handleDragOver, onDrop: handleDrop, className: form_module_css_1.default.file_input__container, children: [(0, jsx_runtime_1.jsx)("input", { id: `file_input__${id}`, type: "file", onChange: handleFileChange, name: name, className: form_module_css_1.default.input__file, multiple: true, accept: "image/*,.pdf,.doc,docx,.txt", "aria-invalid": !!errorMessage, "aria-describedby": errorMessage ? `error-file_input__${id}` : undefined }), label && ((0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, htmlFor:
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)("div", { onDragOver: handleDragOver, onDrop: handleDrop, className: form_module_css_1.default.file_input__container, children: [(0, jsx_runtime_1.jsx)("input", { id: `file_input__${id}`, type: "file", onChange: handleFileChange, name: name, className: form_module_css_1.default.input__file, multiple: true, accept: "image/*,.pdf,.doc,docx,.txt", "aria-invalid": !!errorMessage, "aria-describedby": errorMessage ? `error-file_input__${id}` : undefined }), label && ((0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, htmlFor: `file_input__${id}`, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)("label", { htmlFor: `file_input__${id}`, className: form_module_css_1.default.label__file, tabIndex: 0, onKeyDown: (e) => {
|
|
61
61
|
if (e.key === ' ' || e.key === 'Enter') {
|
|
62
62
|
e.preventDefault();
|
|
63
63
|
e.target.click();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FileInputProps } from './file-input';
|
|
2
|
-
export type
|
|
2
|
+
export type TextareaProps = {
|
|
3
|
+
label?: string;
|
|
3
4
|
description?: string;
|
|
4
5
|
value: string;
|
|
5
6
|
error?: string;
|
|
@@ -7,5 +8,5 @@ export type CheckboxProps = {
|
|
|
7
8
|
fileInputProps?: FileInputProps;
|
|
8
9
|
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
10
|
} & React.JSX.IntrinsicElements['textarea'];
|
|
10
|
-
export default function Textarea({ id, description, onChange, error, isRequired, value, fileInputProps, }:
|
|
11
|
+
export default function Textarea({ id, label, description, onChange, error, isRequired, value, fileInputProps, }: TextareaProps): import("react").JSX.Element;
|
|
11
12
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/form/textarea.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/form/textarea.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAMzD,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACnE,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,EAAE,EACF,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,EACL,UAAkB,EAClB,KAAK,EACL,cAAc,GACf,EAAE,aAAa,+BAgCf"}
|
|
@@ -7,11 +7,13 @@ exports.default = Textarea;
|
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const form_module_css_1 = __importDefault(require("./form.module.css"));
|
|
9
9
|
const file_input_1 = __importDefault(require("./file-input"));
|
|
10
|
+
const form_component_label_1 = __importDefault(require("./form-component-label"));
|
|
10
11
|
const typography_1 = require("../typography");
|
|
11
12
|
const css_1 = require("../../utils/css");
|
|
12
13
|
const error_message_1 = require("../error-message");
|
|
13
|
-
function Textarea({ id, description, onChange, error, isRequired = false, value, fileInputProps, }) {
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.textarea_container, children: [description && ((0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "
|
|
15
|
-
[
|
|
16
|
-
|
|
14
|
+
function Textarea({ id, label, description, onChange, error, isRequired = false, value, fileInputProps, }) {
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.textarea_container, children: [label && ((0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, htmlFor: `textarea__${id}`, isRequired: isRequired })), description && ((0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__s", id: `description-textarea__${id}`, children: description })), (0, jsx_runtime_1.jsx)("textarea", { id: `textarea__${id}`, className: form_module_css_1.default.textarea, value: value, onChange: onChange, "aria-invalid": !!error, "aria-describedby": (0, css_1.andIf)({
|
|
16
|
+
[`description-textarea__${id}`]: !!description,
|
|
17
|
+
[`error-textarea__${id}`]: !!error,
|
|
18
|
+
}) || undefined }), fileInputProps && (0, jsx_runtime_1.jsx)(file_input_1.default, { ...fileInputProps }), error && (0, jsx_runtime_1.jsx)(error_message_1.ErrorMessage, { message: error, id: `error-textarea__${id}` })] }));
|
|
17
19
|
}
|
|
@@ -1793,32 +1793,32 @@ exports.icons = {
|
|
|
1793
1793
|
"id": "favicon"
|
|
1794
1794
|
},
|
|
1795
1795
|
"status/Check": {
|
|
1796
|
-
"relative": "colors/icons/status/
|
|
1797
|
-
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/
|
|
1796
|
+
"relative": "colors/icons/status/light/Check.svg",
|
|
1797
|
+
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/light/Check.svg",
|
|
1798
1798
|
"assetType": "colors",
|
|
1799
1799
|
"colorType": "icons",
|
|
1800
1800
|
"darkable": true,
|
|
1801
1801
|
"id": "status/Check"
|
|
1802
1802
|
},
|
|
1803
1803
|
"status/Error": {
|
|
1804
|
-
"relative": "colors/icons/status/
|
|
1805
|
-
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/
|
|
1804
|
+
"relative": "colors/icons/status/light/Error.svg",
|
|
1805
|
+
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/light/Error.svg",
|
|
1806
1806
|
"assetType": "colors",
|
|
1807
1807
|
"colorType": "icons",
|
|
1808
1808
|
"darkable": true,
|
|
1809
1809
|
"id": "status/Error"
|
|
1810
1810
|
},
|
|
1811
1811
|
"status/Info": {
|
|
1812
|
-
"relative": "colors/icons/status/
|
|
1813
|
-
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/
|
|
1812
|
+
"relative": "colors/icons/status/light/Info.svg",
|
|
1813
|
+
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/light/Info.svg",
|
|
1814
1814
|
"assetType": "colors",
|
|
1815
1815
|
"colorType": "icons",
|
|
1816
1816
|
"darkable": true,
|
|
1817
1817
|
"id": "status/Info"
|
|
1818
1818
|
},
|
|
1819
1819
|
"status/Warning": {
|
|
1820
|
-
"relative": "colors/icons/status/
|
|
1821
|
-
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/
|
|
1820
|
+
"relative": "colors/icons/status/light/Warning.svg",
|
|
1821
|
+
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/icons/status/light/Warning.svg",
|
|
1822
1822
|
"assetType": "colors",
|
|
1823
1823
|
"colorType": "icons",
|
|
1824
1824
|
"darkable": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injuryForm.d.ts","sourceRoot":"","sources":["../../../src/means-of-transport/forms/injuryForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAIlF,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAiBvD,KAAK,eAAe,GAAG;IACrB,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,UAAU,GAAI,iBAAiB,eAAe,
|
|
1
|
+
{"version":3,"file":"injuryForm.d.ts","sourceRoot":"","sources":["../../../src/means-of-transport/forms/injuryForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAIlF,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAiBvD,KAAK,eAAe,GAAG;IACrB,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,UAAU,GAAI,iBAAiB,eAAe,gCAmR1D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -53,7 +53,7 @@ const InjuryForm = ({ state, send }) => {
|
|
|
53
53
|
inputName: 'tripId',
|
|
54
54
|
value: tripId,
|
|
55
55
|
});
|
|
56
|
-
}, isRequired: true, errorMessage: state.context?.errorMessages['plannedDepartureTime']?.[0] })] }), (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.
|
|
56
|
+
}, isRequired: true, errorMessage: state.context?.errorMessages['plannedDepartureTime']?.[0] })] }), (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.modeOfTransport.injury.feedbackDescription), value: state.context.feedback || '', onChange: (e) => send({
|
|
57
57
|
type: 'ON_INPUT_CHANGE',
|
|
58
58
|
inputName: 'feedback',
|
|
59
59
|
value: e.target.value,
|
|
@@ -306,7 +306,6 @@ export type ContactFormConfig = {
|
|
|
306
306
|
api?: ApiConfig;
|
|
307
307
|
/** Feature flags */
|
|
308
308
|
features?: {
|
|
309
|
-
enableFileUploads?: boolean;
|
|
310
309
|
/**
|
|
311
310
|
* Include bank account fields (bankkontonummer / utenlandsk bankkontonummer) in the
|
|
312
311
|
* fee complaint form.
|
|
@@ -365,6 +364,12 @@ export type ContactFormConfig = {
|
|
|
365
364
|
* Default: true.
|
|
366
365
|
*/
|
|
367
366
|
includeAmountInRefundTaxi?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Include a required phone number field in the "Priser og billettyper"
|
|
369
|
+
* (priceAndTicketTypes) and app "Reiseforslag" (appTravelSuggestion) forms.
|
|
370
|
+
* Default: false.
|
|
371
|
+
*/
|
|
372
|
+
includePhoneNumberInPriceAndTravelSuggestion?: boolean;
|
|
368
373
|
/**
|
|
369
374
|
* Include the fee date field in the fee complaint and postpone payment
|
|
370
375
|
* forms.
|
|
@@ -372,11 +377,22 @@ export type ContactFormConfig = {
|
|
|
372
377
|
*/
|
|
373
378
|
includeFeeDateInTicketControl?: boolean;
|
|
374
379
|
/**
|
|
375
|
-
*
|
|
376
|
-
*
|
|
380
|
+
* Show the receipt attachment field in the other ticket refund form.
|
|
381
|
+
* Default: true.
|
|
382
|
+
*/
|
|
383
|
+
enableReceiptAttachmentInOtherTicketRefund?: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Require the receipt attachment field in the other ticket refund form.
|
|
386
|
+
* Has no effect if enableReceiptAttachmentInOtherTicketRefund is false.
|
|
387
|
+
* Default: false.
|
|
388
|
+
*/
|
|
389
|
+
enableRequiredReceiptAttachmentInOtherTicketRefund?: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* Show a required identification attachment field in the other ticket
|
|
392
|
+
* refund form.
|
|
377
393
|
* Default: false.
|
|
378
394
|
*/
|
|
379
|
-
|
|
395
|
+
enableIdentificationAttachmentInOtherTicketRefund?: boolean;
|
|
380
396
|
/**
|
|
381
397
|
* Allow IBAN/SWIFT in the travel guarantee forms.
|
|
382
398
|
* Default: true.
|
|
@@ -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,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,E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CAAgC,CAAC,EAAE,OAAO,CAAC;QAC3C;;;WAGG;QACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC;;;;WAIG;QACH,4CAA4C,CAAC,EAAE,OAAO,CAAC;QACvD;;;;WAIG;QACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;QACxC;;;WAGG;QACH,0CAA0C,CAAC,EAAE,OAAO,CAAC;QACrD;;;;WAIG;QACH,kDAAkD,CAAC,EAAE,OAAO,CAAC;QAC7D;;;;WAIG;QACH,iDAAiD,CAAC,EAAE,OAAO,CAAC;QAC5D;;;;WAIG;QACH,+CAA+C,CAAC,EAAE,OAAO,CAAC;KAC3D,CAAC;IAEF;;;;OAIG;IACH,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAErC,uDAAuD;IACvD,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAE/B,gFAAgF;IAChF,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,+BAA+B,CAAC;IAE/C;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAC;IAEnB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,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"}
|
package/lib/refund/events.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { PurchasePlatformType, ReasonForTransportFailure, TicketType, TransportM
|
|
|
3
3
|
import { Line } from '..';
|
|
4
4
|
type RefundSpecificFormEvents = {
|
|
5
5
|
type: 'ON_INPUT_CHANGE';
|
|
6
|
-
inputName: 'formType' | 'kilometersDriven' | 'fromAddress' | 'toAddress' | 'amount' | 'reasonForTransportFailure' | 'orderId' | 'customerNumber' | 'ticketType' | 'travelCardNumber' | 'refundReason' | 'firstName' | 'lastName' | 'address' | 'postalCode' | 'city' | 'email' | 'phoneNumber' | 'bankAccountNumber' | 'IBAN' | 'SWIFT' | 'fromStop' | 'toStop' | 'date' | 'plannedDepartureTime' | 'tripId' | 'feedback' | 'attachments' | 'receiptAttachments' | 'feedbackAttachments' | 'isInitialAgreementChecked' | 'hasInternationalBankAccount' | 'showInputTravelCardNumber' | 'bankCardDetails';
|
|
6
|
+
inputName: 'formType' | 'kilometersDriven' | 'fromAddress' | 'toAddress' | 'amount' | 'reasonForTransportFailure' | 'orderId' | 'customerNumber' | 'ticketType' | 'travelCardNumber' | 'refundReason' | 'firstName' | 'lastName' | 'address' | 'postalCode' | 'city' | 'email' | 'phoneNumber' | 'bankAccountNumber' | 'IBAN' | 'SWIFT' | 'fromStop' | 'toStop' | 'date' | 'plannedDepartureTime' | 'tripId' | 'feedback' | 'attachments' | 'receiptAttachments' | 'identificationAttachments' | 'feedbackAttachments' | 'isInitialAgreementChecked' | 'hasInternationalBankAccount' | 'showInputTravelCardNumber' | 'bankCardDetails';
|
|
7
7
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line['quays'][0] | File[] | undefined;
|
|
8
8
|
} | {
|
|
9
9
|
type: 'SELECT_FORM_CATEGORY';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/refund/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,UAAU,EACV,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B,KAAK,wBAAwB,GACzB;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EACL,UAAU,GACV,kBAAkB,GAClB,aAAa,GACb,WAAW,GACX,QAAQ,GACR,2BAA2B,GAC3B,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,cAAc,GACd,WAAW,GACX,UAAU,GACV,SAAS,GACT,YAAY,GACZ,MAAM,GACN,OAAO,GACP,aAAa,GACb,mBAAmB,GACnB,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,MAAM,GACN,sBAAsB,GACtB,QAAQ,GACR,UAAU,GACV,aAAa,GACb,oBAAoB,GACpB,qBAAqB,GACrB,2BAA2B,GAC3B,6BAA6B,GAC7B,2BAA2B,GAC3B,iBAAiB,CAAC;IACtB,KAAK,EACD,MAAM,GACN,OAAO,GACP,yBAAyB,GACzB,UAAU,GACV,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAChB,IAAI,EAAE,GACN,SAAS,CAAC;CACf,GACD;IACE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,2BAA2B,CAAC;IAClC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,GACD;IACE,IAAI,EAAE,yCAAyC,CAAC;IAChD,wBAAwB,EAAE,wBAAwB,CAAC;CACpD,GACD;IACE,IAAI,EAAE,yBAAyB,CAAC;IAChC,KAAK,EAAE,iBAAiB,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACzC,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC;AAEN,eAAO,MAAM,gBAAgB,EAAS,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/refund/events.ts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IACvB,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACzC,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC;AAEN,eAAO,MAAM,gBAAgB,EAAS,wBAAwB,CAAC"}
|
|
@@ -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;AAWhD,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;AAWhD,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,gCAuHpC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -27,7 +27,7 @@ const RefundAndTravelGuaranteeForms = ({ state, send, }) => {
|
|
|
27
27
|
state.context.formType === 'refundTaxi';
|
|
28
28
|
const displayRefundCarForm = state.context.isInitialAgreementChecked &&
|
|
29
29
|
state.context.formType === 'refundCar';
|
|
30
|
-
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) }), tRich(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:
|
|
30
|
+
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) }), tRich(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: tRich(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
|
|
31
31
|
.exclusion), travelGuaranteeLinkHref && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: travelGuaranteeLinkHref, target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.refund.agreement.travelGuaranteeExceptions
|
|
32
32
|
.link.text) })] }))] }), (0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { label: t(PageText.Contact.ticketControl.feeComplaint.firstAgreement.checkbox), checked: state.context.isInitialAgreementChecked, onChange: () => send({
|
|
33
33
|
type: 'ON_INPUT_CHANGE',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appTicketRefund.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/appTicketRefund.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"appTicketRefund.d.ts","sourceRoot":"","sources":["../../../../src/refund/forms/refund-ticket/appTicketRefund.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,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,gCAqIpE,CAAC;AAqQF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,KAAK,EACL,IAAI,GACL,EAAE,oBAAoB,+BAWtB"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AppTicketRefund = void 0;
|
|
4
4
|
exports.default = AppTicketRefundContent;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const refundFormMachine_1 = require("../../refundFormMachine");
|
|
6
7
|
const components_1 = require("../../../components");
|
|
7
8
|
const translations_1 = require("../../../translations");
|
|
8
9
|
const context_1 = require("../../../modules/config/context");
|
|
@@ -12,30 +13,32 @@ const AppTicketRefund = ({ state, send }) => {
|
|
|
12
13
|
const { t } = (0, translations_1.useTranslation)();
|
|
13
14
|
const { features, formSchemaOverrides } = (0, context_1.useContactFormConfig)();
|
|
14
15
|
const includeCustomerNumberAndPurchasePlatform = features?.includeCustomerNumberAndPurchasePlatformInAppTicketRefund;
|
|
15
|
-
|
|
16
|
+
const areOrderIdAndCustomerNumberRelevant = (0, refundFormMachine_1.hasOrderIdAndCustomerNumber)(state.context.purchasePlatform);
|
|
17
|
+
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.Select, { id: "purchasePlatform", label: t(PageText.Contact.input.purchasePlatform.label), value: state.context.purchasePlatform || '', onChange: (value) => send({
|
|
18
|
+
type: 'ON_PURCHASE_PLATFORM_CHANGE',
|
|
19
|
+
value: value,
|
|
20
|
+
}), isRequired: true, error: state.context?.errorMessages['purchasePlatform']?.[0]
|
|
21
|
+
? t(state.context?.errorMessages['purchasePlatform']?.[0])
|
|
22
|
+
: undefined, valueToId: (val) => val, valueToText: (val) => t(PageText.Contact.input.purchasePlatform.platforms[val]), options: formSchemaOverrides?.refund?.enabledPurchasePlatforms ?? [
|
|
23
|
+
'enturApp',
|
|
24
|
+
'enturWeb',
|
|
25
|
+
'framApp',
|
|
26
|
+
'framWeb',
|
|
27
|
+
], placeholder: t(PageText.Contact.input.purchasePlatform.optionLabel) })), areOrderIdAndCustomerNumberRelevant &&
|
|
28
|
+
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
29
|
type: 'ON_INPUT_CHANGE',
|
|
17
30
|
inputName: 'customerNumber',
|
|
18
31
|
value: e.target.value,
|
|
19
32
|
}), modalContent: {
|
|
20
33
|
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({
|
|
34
|
+
} })), areOrderIdAndCustomerNumberRelevant && ((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({
|
|
22
35
|
type: 'ON_INPUT_CHANGE',
|
|
23
36
|
inputName: 'orderId',
|
|
24
37
|
value: e.target.value,
|
|
25
38
|
}), modalContent: {
|
|
26
39
|
description: t(PageText.Contact.input.orderId.description),
|
|
27
40
|
bulletPoints: PageText.Contact.input.orderId.descriptionBulletPoints.map((bulletPoint) => t(bulletPoint)),
|
|
28
|
-
} }),
|
|
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: formSchemaOverrides?.refund?.enabledPurchasePlatforms ?? [
|
|
34
|
-
'enturApp',
|
|
35
|
-
'enturWeb',
|
|
36
|
-
'framApp',
|
|
37
|
-
'framWeb',
|
|
38
|
-
], 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({
|
|
41
|
+
} })), (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "refundReason", label: t(PageText.Contact.input.refundReason.question), description: t(PageText.Contact.input.refundReason.description), value: state.context.refundReason || '', isRequired: true, onChange: (e) => send({
|
|
39
42
|
type: 'ON_INPUT_CHANGE',
|
|
40
43
|
inputName: 'refundReason',
|
|
41
44
|
value: e.target.value,
|
|
@@ -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;AAigBF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,sBAAsB,gCAWxE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -42,13 +42,13 @@ const RefundSection = ({ state, send }) => {
|
|
|
42
42
|
type: 'ON_INPUT_CHANGE',
|
|
43
43
|
inputName: 'amount',
|
|
44
44
|
value: e.target.value,
|
|
45
|
-
}) })), (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "refundReason",
|
|
45
|
+
}) })), (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "refundReason", label: t(PageText.Contact.input.refundReason.question), value: state.context.refundReason || '', isRequired: true, onChange: (e) => send({
|
|
46
46
|
type: 'ON_INPUT_CHANGE',
|
|
47
47
|
inputName: 'refundReason',
|
|
48
48
|
value: e.target.value,
|
|
49
49
|
}), error: state.context.errorMessages['refundReason']?.[0]
|
|
50
50
|
? t(state.context.errorMessages['refundReason']?.[0])
|
|
51
|
-
: undefined }), features?.
|
|
51
|
+
: undefined }), features?.enableReceiptAttachmentInOtherTicketRefund !== false && ((0, jsx_runtime_1.jsx)(components_1.FileInput, { id: "attachments", label: t(PageText.Contact.refund.otherTicketRefund.receipt.info), iconLabel: t(PageText.Contact.input.feedback.attachment.receipt), name: "attachments", isRequired: features?.enableRequiredReceiptAttachmentInOtherTicketRefund, onChange: (files) => {
|
|
52
52
|
send({
|
|
53
53
|
type: 'ON_INPUT_CHANGE',
|
|
54
54
|
inputName: 'attachments',
|
|
@@ -61,6 +61,7 @@ const RefundSection = ({ state, send }) => {
|
|
|
61
61
|
const AboutYouSection = ({ state, send }) => {
|
|
62
62
|
const PageText = (0, translations_1.usePageText)();
|
|
63
63
|
const { t } = (0, translations_1.useTranslation)();
|
|
64
|
+
const { features } = (0, context_1.useContactFormConfig)();
|
|
64
65
|
return ((0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
|
|
65
66
|
type: 'ON_INPUT_CHANGE',
|
|
66
67
|
inputName: 'firstName',
|
|
@@ -105,7 +106,15 @@ const AboutYouSection = ({ state, send }) => {
|
|
|
105
106
|
type: 'ON_INPUT_CHANGE',
|
|
106
107
|
inputName: 'SWIFT',
|
|
107
108
|
value: e.target.value,
|
|
108
|
-
}) })] }))
|
|
109
|
+
}) })] })), features?.enableIdentificationAttachmentInOtherTicketRefund && ((0, jsx_runtime_1.jsx)(components_1.FileInput, { id: "identificationAttachments", label: t(PageText.Contact.input.identificationAttachments.label), iconLabel: t(PageText.Contact.input.feedback.attachment.generic), name: "identificationAttachments", isRequired: true, onChange: (files) => {
|
|
110
|
+
send({
|
|
111
|
+
type: 'ON_INPUT_CHANGE',
|
|
112
|
+
inputName: 'identificationAttachments',
|
|
113
|
+
value: files,
|
|
114
|
+
});
|
|
115
|
+
}, errorMessage: state.context?.errorMessages['identificationAttachments']?.[0]
|
|
116
|
+
? t(state.context?.errorMessages['identificationAttachments']?.[0])
|
|
117
|
+
: undefined }))] }));
|
|
109
118
|
};
|
|
110
119
|
const DepartureSection = ({ state, send }) => {
|
|
111
120
|
const PageText = (0, translations_1.usePageText)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/refund/index.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/refund/index.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,aAAa,mCAqJlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/lib/refund/index.js
CHANGED
|
@@ -38,8 +38,9 @@ const RefundContent = () => {
|
|
|
38
38
|
includeOrderIdInOtherTicketRefund: features?.includeOrderIdInOtherTicketRefund === true,
|
|
39
39
|
includeAmountInOtherTicketRefund: features?.includeAmountInOtherTicketRefund === true,
|
|
40
40
|
includeAmountInRefundTaxi: features?.includeAmountInRefundTaxi !== false,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
enableReceiptAttachmentInOtherTicketRefund: features?.enableReceiptAttachmentInOtherTicketRefund !== false,
|
|
42
|
+
enableRequiredReceiptAttachmentInOtherTicketRefund: features?.enableRequiredReceiptAttachmentInOtherTicketRefund === true,
|
|
43
|
+
enableIdentificationAttachmentInOtherTicketRefund: features?.enableIdentificationAttachmentInOtherTicketRefund === true,
|
|
43
44
|
}), [
|
|
44
45
|
apiConfig.onSubmit,
|
|
45
46
|
successPath,
|
|
@@ -50,8 +51,9 @@ const RefundContent = () => {
|
|
|
50
51
|
features?.includeOrderIdInOtherTicketRefund,
|
|
51
52
|
features?.includeAmountInOtherTicketRefund,
|
|
52
53
|
features?.includeAmountInRefundTaxi,
|
|
53
|
-
features?.
|
|
54
|
-
features?.
|
|
54
|
+
features?.enableReceiptAttachmentInOtherTicketRefund,
|
|
55
|
+
features?.enableRequiredReceiptAttachmentInOtherTicketRefund,
|
|
56
|
+
features?.enableIdentificationAttachmentInOtherTicketRefund,
|
|
55
57
|
]);
|
|
56
58
|
const [state, send] = (0, react_1.useMachine)(machine);
|
|
57
59
|
const displaySubmitButton = state.context.formType &&
|
|
@@ -41,6 +41,7 @@ type SubmitInput = {
|
|
|
41
41
|
feedback?: string;
|
|
42
42
|
attachments?: File[];
|
|
43
43
|
receiptAttachments?: File[];
|
|
44
|
+
identificationAttachments?: File[];
|
|
44
45
|
feedbackAttachments?: File[];
|
|
45
46
|
transportMode?: string;
|
|
46
47
|
line?: string;
|
|
@@ -77,6 +78,7 @@ export type RefundContextProps = {
|
|
|
77
78
|
feedback?: string;
|
|
78
79
|
attachments?: File[];
|
|
79
80
|
receiptAttachments?: File[];
|
|
81
|
+
identificationAttachments?: File[];
|
|
80
82
|
feedbackAttachments?: File[];
|
|
81
83
|
transportMode?: TransportModeType | undefined;
|
|
82
84
|
line?: Line | undefined;
|
|
@@ -105,12 +107,14 @@ export type RefundContextProps = {
|
|
|
105
107
|
includeOrderIdInOtherTicketRefund: boolean;
|
|
106
108
|
includeAmountInOtherTicketRefund: boolean;
|
|
107
109
|
includeAmountInRefundTaxi: boolean;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
enableReceiptAttachmentInOtherTicketRefund: boolean;
|
|
111
|
+
enableRequiredReceiptAttachmentInOtherTicketRefund: boolean;
|
|
112
|
+
enableIdentificationAttachmentInOtherTicketRefund: boolean;
|
|
110
113
|
errorMessages: InputErrorMessages;
|
|
111
114
|
firstIncorrectErrorMessage?: string;
|
|
112
115
|
hasSubmissionError?: boolean;
|
|
113
116
|
};
|
|
117
|
+
export declare const hasOrderIdAndCustomerNumber: (purchasePlatform?: PurchasePlatformType) => purchasePlatform is "framApp" | "enturApp" | "framWeb" | "enturWeb" | undefined;
|
|
114
118
|
export type MachinePaths = {
|
|
115
119
|
successPath: string;
|
|
116
120
|
errorPath: string;
|
|
@@ -120,12 +124,13 @@ export type MachinePaths = {
|
|
|
120
124
|
includeOrderIdInOtherTicketRefund?: boolean;
|
|
121
125
|
includeAmountInOtherTicketRefund?: boolean;
|
|
122
126
|
includeAmountInRefundTaxi?: boolean;
|
|
123
|
-
|
|
124
|
-
|
|
127
|
+
enableReceiptAttachmentInOtherTicketRefund?: boolean;
|
|
128
|
+
enableRequiredReceiptAttachmentInOtherTicketRefund?: boolean;
|
|
129
|
+
enableIdentificationAttachmentInOtherTicketRefund?: boolean;
|
|
125
130
|
};
|
|
126
131
|
export declare function createRefundStateMachine(onSubmit: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>, paths?: Partial<MachinePaths>): import("xstate").StateMachine<RefundContextProps, {
|
|
127
132
|
type: "ON_INPUT_CHANGE";
|
|
128
|
-
inputName: "formType" | "kilometersDriven" | "fromAddress" | "toAddress" | "amount" | "reasonForTransportFailure" | "orderId" | "customerNumber" | "ticketType" | "travelCardNumber" | "refundReason" | "firstName" | "lastName" | "address" | "postalCode" | "city" | "email" | "phoneNumber" | "bankAccountNumber" | "IBAN" | "SWIFT" | "fromStop" | "toStop" | "date" | "plannedDepartureTime" | "tripId" | "feedback" | "attachments" | "receiptAttachments" | "feedbackAttachments" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber" | "bankCardDetails";
|
|
133
|
+
inputName: "formType" | "kilometersDriven" | "fromAddress" | "toAddress" | "amount" | "reasonForTransportFailure" | "orderId" | "customerNumber" | "ticketType" | "travelCardNumber" | "refundReason" | "firstName" | "lastName" | "address" | "postalCode" | "city" | "email" | "phoneNumber" | "bankAccountNumber" | "IBAN" | "SWIFT" | "fromStop" | "toStop" | "date" | "plannedDepartureTime" | "tripId" | "feedback" | "attachments" | "receiptAttachments" | "identificationAttachments" | "feedbackAttachments" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber" | "bankCardDetails";
|
|
129
134
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line["quays"][0] | File[] | undefined;
|
|
130
135
|
} | {
|
|
131
136
|
type: "SELECT_FORM_CATEGORY";
|
|
@@ -222,7 +227,7 @@ export declare function createRefundStateMachine(onSubmit: (slug: FormSlug, stat
|
|
|
222
227
|
params: unknown;
|
|
223
228
|
}, never, "success" | "validating" | "submitting" | "formCategoryHandler" | "refundTicketFormHandler" | "refundAndTravelGuaranteeFormHandler" | {
|
|
224
229
|
editing: "ticketBoughtOnBus" | "residualValueOnTravelCard" | "selectFormCategory" | {
|
|
225
|
-
refundOfTicket: "
|
|
230
|
+
refundOfTicket: "otherTicketRefund" | "appTicketRefund" | "selectRefundOfTicketForm";
|
|
226
231
|
} | {
|
|
227
232
|
refundAndTravelGuarantee: "refundTaxi" | "refundCar" | "selectRefundAndTravelGuaranteeForm";
|
|
228
233
|
};
|
|
@@ -285,7 +290,7 @@ export declare function createRefundStateMachine(onSubmit: (slug: FormSlug, stat
|
|
|
285
290
|
}>;
|
|
286
291
|
export declare const refundStateMachine: import("xstate").StateMachine<RefundContextProps, {
|
|
287
292
|
type: "ON_INPUT_CHANGE";
|
|
288
|
-
inputName: "formType" | "kilometersDriven" | "fromAddress" | "toAddress" | "amount" | "reasonForTransportFailure" | "orderId" | "customerNumber" | "ticketType" | "travelCardNumber" | "refundReason" | "firstName" | "lastName" | "address" | "postalCode" | "city" | "email" | "phoneNumber" | "bankAccountNumber" | "IBAN" | "SWIFT" | "fromStop" | "toStop" | "date" | "plannedDepartureTime" | "tripId" | "feedback" | "attachments" | "receiptAttachments" | "feedbackAttachments" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber" | "bankCardDetails";
|
|
293
|
+
inputName: "formType" | "kilometersDriven" | "fromAddress" | "toAddress" | "amount" | "reasonForTransportFailure" | "orderId" | "customerNumber" | "ticketType" | "travelCardNumber" | "refundReason" | "firstName" | "lastName" | "address" | "postalCode" | "city" | "email" | "phoneNumber" | "bankAccountNumber" | "IBAN" | "SWIFT" | "fromStop" | "toStop" | "date" | "plannedDepartureTime" | "tripId" | "feedback" | "attachments" | "receiptAttachments" | "identificationAttachments" | "feedbackAttachments" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber" | "bankCardDetails";
|
|
289
294
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line["quays"][0] | File[] | undefined;
|
|
290
295
|
} | {
|
|
291
296
|
type: "SELECT_FORM_CATEGORY";
|
|
@@ -382,7 +387,7 @@ export declare const refundStateMachine: import("xstate").StateMachine<RefundCon
|
|
|
382
387
|
params: unknown;
|
|
383
388
|
}, never, "success" | "validating" | "submitting" | "formCategoryHandler" | "refundTicketFormHandler" | "refundAndTravelGuaranteeFormHandler" | {
|
|
384
389
|
editing: "ticketBoughtOnBus" | "residualValueOnTravelCard" | "selectFormCategory" | {
|
|
385
|
-
refundOfTicket: "
|
|
390
|
+
refundOfTicket: "otherTicketRefund" | "appTicketRefund" | "selectRefundOfTicketForm";
|
|
386
391
|
} | {
|
|
387
392
|
refundAndTravelGuarantee: "refundTaxi" | "refundCar" | "selectRefundAndTravelGuaranteeForm";
|
|
388
393
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refundFormMachine.d.ts","sourceRoot":"","sources":["../../src/refund/refundFormMachine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,UAAU,EAEX,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAWzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,oBAAY,YAAY;IACtB,cAAc,mBAAmB;IACjC,wBAAwB,6BAA6B;IACrD,yBAAyB,8BAA8B;IACvD,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,gBAAgB;IAC1B,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,wBAAwB;IAClC,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,yBAAyB,8BAA8B;IACvD,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;CAC5C;AAED,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,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AC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,yBAAyB,EAAE,OAAO,CAAC;IACnC,2BAA2B,EAAE,OAAO,CAAC;IACrC,8BAA8B,EAAE,OAAO,CAAC;IACxC,0BAA0B,EAAE,OAAO,CAAC;IACpC,yDAAyD,EAAE,OAAO,CAAC;IACnE,iCAAiC,EAAE,OAAO,CAAC;IAC3C,gCAAgC,EAAE,OAAO,CAAC;IAC1C,yBAAyB,EAAE,OAAO,CAAC;IACnC,
|
|
1
|
+
{"version":3,"file":"refundFormMachine.d.ts","sourceRoot":"","sources":["../../src/refund/refundFormMachine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,UAAU,EAEX,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAWzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,oBAAY,YAAY;IACtB,cAAc,mBAAmB;IACjC,wBAAwB,6BAA6B;IACrD,yBAAyB,8BAA8B;IACvD,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,gBAAgB;IAC1B,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,wBAAwB;IAClC,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,yBAAyB,8BAA8B;IACvD,i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AO,CAAC;IAC5C,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,0CAA0C,CAAC,EAAE,OAAO,CAAC;IACrD,kDAAkD,CAAC,EAAE,OAAO,CAAC;IAC7D,iDAAiD,CAAC,EAAE,OAAO,CAAC;CAC7D,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,CACR,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,OAAO,CAAC,QAAQ,CAAC,EACtB,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;;;uEA9UX,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkvBhC;AAED,eAAO,MAAM,kBAAkB;;;uEApvBX,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2vBhC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.refundStateMachine = exports.FormType = exports.RefundAndTravelGuarantee = exports.RefundTicketForm = exports.FormCategory = void 0;
|
|
3
|
+
exports.refundStateMachine = exports.hasOrderIdAndCustomerNumber = exports.FormType = exports.RefundAndTravelGuarantee = exports.RefundTicketForm = exports.FormCategory = void 0;
|
|
4
4
|
exports.createRefundStateMachine = createRefundStateMachine;
|
|
5
5
|
const types_1 = require("../types");
|
|
6
6
|
const xstate_1 = require("xstate");
|
|
@@ -46,8 +46,10 @@ const setInitialAgreementAndFormType = (context, isChecked) => {
|
|
|
46
46
|
errorMessages: {},
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
const hasOrderIdAndCustomerNumber = (purchasePlatform) => purchasePlatform !== 'sms';
|
|
50
|
+
exports.hasOrderIdAndCustomerNumber = hasOrderIdAndCustomerNumber;
|
|
49
51
|
const setInputToValidate = (context) => {
|
|
50
|
-
const { formType, firstName, lastName, email, phoneNumber, address, postalCode, city, hasInternationalBankAccount, bankAccountNumber, IBAN, SWIFT, transportMode, line, fromStop, toStop, date, kilometersDriven, fromAddress, toAddress, plannedDepartureTime, reasonForTransportFailure, amount, attachments, receiptAttachments, orderId, ticketType, refundReason, includeOtherTicketTypeSelector, includeRefundDepartureInfo, includeCustomerNumberAndPurchasePlatformInAppTicketRefund, customerNumber, purchasePlatform, includeOrderIdInOtherTicketRefund, includeAmountInOtherTicketRefund, includeAmountInRefundTaxi,
|
|
52
|
+
const { formType, firstName, lastName, email, phoneNumber, address, postalCode, city, hasInternationalBankAccount, bankAccountNumber, IBAN, SWIFT, transportMode, line, fromStop, toStop, date, kilometersDriven, fromAddress, toAddress, plannedDepartureTime, reasonForTransportFailure, amount, attachments, receiptAttachments, orderId, ticketType, refundReason, includeOtherTicketTypeSelector, includeRefundDepartureInfo, includeCustomerNumberAndPurchasePlatformInAppTicketRefund, customerNumber, purchasePlatform, includeOrderIdInOtherTicketRefund, includeAmountInOtherTicketRefund, includeAmountInRefundTaxi, enableReceiptAttachmentInOtherTicketRefund, enableRequiredReceiptAttachmentInOtherTicketRefund, identificationAttachments, enableIdentificationAttachmentInOtherTicketRefund, } = context;
|
|
51
53
|
const commonFields = {
|
|
52
54
|
formType,
|
|
53
55
|
transportMode,
|
|
@@ -78,7 +80,9 @@ const setInputToValidate = (context) => {
|
|
|
78
80
|
case FormType.AppTicketRefund:
|
|
79
81
|
return {
|
|
80
82
|
formType,
|
|
81
|
-
|
|
83
|
+
...((0, exports.hasOrderIdAndCustomerNumber)(purchasePlatform)
|
|
84
|
+
? { referenceNumber: orderId }
|
|
85
|
+
: {}),
|
|
82
86
|
refundReason,
|
|
83
87
|
firstName,
|
|
84
88
|
lastName,
|
|
@@ -88,7 +92,12 @@ const setInputToValidate = (context) => {
|
|
|
88
92
|
email,
|
|
89
93
|
phoneNumber,
|
|
90
94
|
...(includeCustomerNumberAndPurchasePlatformInAppTicketRefund
|
|
91
|
-
? {
|
|
95
|
+
? {
|
|
96
|
+
...((0, exports.hasOrderIdAndCustomerNumber)(purchasePlatform)
|
|
97
|
+
? { customerNumber }
|
|
98
|
+
: {}),
|
|
99
|
+
purchasePlatform,
|
|
100
|
+
}
|
|
92
101
|
: {}),
|
|
93
102
|
...(includeRefundDepartureInfo
|
|
94
103
|
? {
|
|
@@ -119,9 +128,13 @@ const setInputToValidate = (context) => {
|
|
|
119
128
|
context.ticketType?.id === types_1.TicketTypeId.PeriodTicket
|
|
120
129
|
? { travelCardNumber: context.travelCardNumber }
|
|
121
130
|
: {}),
|
|
122
|
-
...(
|
|
131
|
+
...(enableReceiptAttachmentInOtherTicketRefund &&
|
|
132
|
+
enableRequiredReceiptAttachmentInOtherTicketRefund
|
|
123
133
|
? { attachments }
|
|
124
134
|
: {}),
|
|
135
|
+
...(enableIdentificationAttachmentInOtherTicketRefund
|
|
136
|
+
? { identificationAttachments }
|
|
137
|
+
: {}),
|
|
125
138
|
...(hasInternationalBankAccount
|
|
126
139
|
? { IBAN, SWIFT }
|
|
127
140
|
: { bankAccountNumber }),
|
|
@@ -191,8 +204,9 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
191
204
|
const includeOrderIdInOtherTicketRefund = paths?.includeOrderIdInOtherTicketRefund === true;
|
|
192
205
|
const includeAmountInOtherTicketRefund = paths?.includeAmountInOtherTicketRefund === true;
|
|
193
206
|
const includeAmountInRefundTaxi = paths?.includeAmountInRefundTaxi !== false;
|
|
194
|
-
const
|
|
195
|
-
const
|
|
207
|
+
const enableReceiptAttachmentInOtherTicketRefund = paths?.enableReceiptAttachmentInOtherTicketRefund !== false;
|
|
208
|
+
const enableRequiredReceiptAttachmentInOtherTicketRefund = paths?.enableRequiredReceiptAttachmentInOtherTicketRefund === true;
|
|
209
|
+
const enableIdentificationAttachmentInOtherTicketRefund = paths?.enableIdentificationAttachmentInOtherTicketRefund === true;
|
|
196
210
|
return (0, xstate_1.setup)({
|
|
197
211
|
types: { context: {}, events: events_1.RefundFormEvents },
|
|
198
212
|
guards: {
|
|
@@ -315,6 +329,10 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
315
329
|
return {
|
|
316
330
|
...context,
|
|
317
331
|
purchasePlatform: event.value,
|
|
332
|
+
// Drop values from fields that are now hidden.
|
|
333
|
+
...((0, exports.hasOrderIdAndCustomerNumber)(event.value)
|
|
334
|
+
? {}
|
|
335
|
+
: { customerNumber: undefined, orderId: undefined }),
|
|
318
336
|
errorMessages: { ...context.errorMessages },
|
|
319
337
|
};
|
|
320
338
|
return context;
|
|
@@ -345,8 +363,9 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
345
363
|
includeOrderIdInOtherTicketRefund,
|
|
346
364
|
includeAmountInOtherTicketRefund,
|
|
347
365
|
includeAmountInRefundTaxi,
|
|
348
|
-
|
|
349
|
-
|
|
366
|
+
enableReceiptAttachmentInOtherTicketRefund,
|
|
367
|
+
enableRequiredReceiptAttachmentInOtherTicketRefund,
|
|
368
|
+
enableIdentificationAttachmentInOtherTicketRefund,
|
|
350
369
|
errorMessages: {},
|
|
351
370
|
},
|
|
352
371
|
on: {
|
|
@@ -498,6 +517,7 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
498
517
|
additionalInfo: context?.feedback,
|
|
499
518
|
attachments: [
|
|
500
519
|
...(context.receiptAttachments ?? []),
|
|
520
|
+
...(context.identificationAttachments ?? []),
|
|
501
521
|
...(context.feedbackAttachments ?? []),
|
|
502
522
|
...(context.attachments ?? []),
|
|
503
523
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appTravelSuggestionForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/appTravelSuggestionForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"appTravelSuggestionForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/appTravelSuggestionForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,gCA+G9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -36,7 +36,11 @@ const AppTravelSuggestionForm = ({ state, send, }) => {
|
|
|
36
36
|
type: 'ON_INPUT_CHANGE',
|
|
37
37
|
inputName: 'email',
|
|
38
38
|
value: e.target.value,
|
|
39
|
-
}) })
|
|
39
|
+
}) }), state.context.includePhoneNumberInPriceAndTravelSuggestion && ((0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
|
|
40
|
+
type: 'ON_INPUT_CHANGE',
|
|
41
|
+
inputName: 'phoneNumber',
|
|
42
|
+
value: e.target.value,
|
|
43
|
+
}) }))] })] }));
|
|
40
44
|
};
|
|
41
45
|
exports.AppTravelSuggestionForm = AppTravelSuggestionForm;
|
|
42
46
|
exports.default = exports.AppTravelSuggestionForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAndTicketTypesForm.d.ts","sourceRoot":"","sources":["../../../src/ticketing/forms/priceAndTicketTypesForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"priceAndTicketTypesForm.d.ts","sourceRoot":"","sources":["../../../src/ticketing/forms/priceAndTicketTypesForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,gCA+G9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -36,7 +36,11 @@ const PriceAndTicketTypesForm = ({ state, send, }) => {
|
|
|
36
36
|
type: 'ON_INPUT_CHANGE',
|
|
37
37
|
inputName: 'email',
|
|
38
38
|
value: e.target.value,
|
|
39
|
-
}) })
|
|
39
|
+
}) }), state.context.includePhoneNumberInPriceAndTravelSuggestion && ((0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
|
|
40
|
+
type: 'ON_INPUT_CHANGE',
|
|
41
|
+
inputName: 'phoneNumber',
|
|
42
|
+
value: e.target.value,
|
|
43
|
+
}) }))] })] }));
|
|
40
44
|
};
|
|
41
45
|
exports.PriceAndTicketTypesForm = PriceAndTicketTypesForm;
|
|
42
46
|
exports.default = exports.PriceAndTicketTypesForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ticketing/index.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ticketing/index.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,gBAAgB,mCAoIrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/lib/ticketing/index.js
CHANGED
|
@@ -23,7 +23,7 @@ const TicketingContent = () => {
|
|
|
23
23
|
const PageText = (0, translations_1.usePageText)();
|
|
24
24
|
const { t } = (0, translations_1.useTranslation)();
|
|
25
25
|
const apiConfig = (0, config_1.useApiConfig)();
|
|
26
|
-
const { formSchemaOverrides, layout } = (0, config_1.useContactFormConfig)();
|
|
26
|
+
const { formSchemaOverrides, layout, features } = (0, config_1.useContactFormConfig)();
|
|
27
27
|
const successPath = layout?.successPath ??
|
|
28
28
|
(layout?.basePath ? `${layout.basePath}/success` : '/contact/success');
|
|
29
29
|
const errorPath = layout?.errorPath ??
|
|
@@ -31,7 +31,13 @@ const TicketingContent = () => {
|
|
|
31
31
|
const machine = (0, react_2.useMemo)(() => (0, ticketingStateMachine_1.createTicketingStateMachine)(apiConfig.onSubmit, {
|
|
32
32
|
successPath,
|
|
33
33
|
errorPath,
|
|
34
|
-
|
|
34
|
+
includePhoneNumberInPriceAndTravelSuggestion: features?.includePhoneNumberInPriceAndTravelSuggestion === true,
|
|
35
|
+
}), [
|
|
36
|
+
apiConfig.onSubmit,
|
|
37
|
+
successPath,
|
|
38
|
+
errorPath,
|
|
39
|
+
features?.includePhoneNumberInPriceAndTravelSuggestion,
|
|
40
|
+
]);
|
|
35
41
|
const [state, send] = (0, react_1.useMachine)(machine);
|
|
36
42
|
const displaySubmitButton = state.context.formType && state.context.formType !== 'orderTravelCard';
|
|
37
43
|
// Filter form categories based on overrides
|
|
@@ -60,6 +60,7 @@ export type TicketingContextType = {
|
|
|
60
60
|
hasInternationalBankAccount: boolean;
|
|
61
61
|
isInitialAgreementChecked: boolean;
|
|
62
62
|
showInputTravelCardNumber: boolean;
|
|
63
|
+
includePhoneNumberInPriceAndTravelSuggestion: boolean;
|
|
63
64
|
errorMessages: InputErrorMessages;
|
|
64
65
|
firstIncorrectErrorMessage?: string;
|
|
65
66
|
hasSubmissionError?: boolean;
|
|
@@ -67,6 +68,7 @@ export type TicketingContextType = {
|
|
|
67
68
|
export type MachinePaths = {
|
|
68
69
|
successPath: string;
|
|
69
70
|
errorPath: string;
|
|
71
|
+
includePhoneNumberInPriceAndTravelSuggestion?: boolean;
|
|
70
72
|
};
|
|
71
73
|
export declare function createTicketingStateMachine(onSubmit: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>, paths?: MachinePaths): import("xstate").StateMachine<TicketingContextType, {
|
|
72
74
|
type: "VALIDATE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticketingStateMachine.d.ts","sourceRoot":"","sources":["../../src/tic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OAAO,CAAC;IACnC,yBAAyB,EAAE,OAAO,CAAC;IACnC,4CAA4C,EAAE,OAAO,CAAC;IACtD,aAAa,EAAE,kBAAkB,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA4EF,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C,CAAC,EAAE,OAAO,CAAC;CACxD,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsYrB;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOjC,CAAC"}
|
|
@@ -41,7 +41,7 @@ var FormType;
|
|
|
41
41
|
FormType["OrderTravelCard"] = "orderTravelCard";
|
|
42
42
|
})(FormType || (FormType = {}));
|
|
43
43
|
const setInputsToValidate = (context) => {
|
|
44
|
-
const { formType, firstName, lastName, email, phoneNumber, question, orderId, customerNumber, travelCardNumber, } = context;
|
|
44
|
+
const { formType, firstName, lastName, email, phoneNumber, question, orderId, customerNumber, travelCardNumber, includePhoneNumberInPriceAndTravelSuggestion, } = context;
|
|
45
45
|
const commonFields = {
|
|
46
46
|
formType,
|
|
47
47
|
question,
|
|
@@ -53,6 +53,7 @@ const setInputsToValidate = (context) => {
|
|
|
53
53
|
case FormType.PriceAndTicketTypes:
|
|
54
54
|
return {
|
|
55
55
|
...commonFields,
|
|
56
|
+
...(includePhoneNumberInPriceAndTravelSuggestion && { phoneNumber }),
|
|
56
57
|
};
|
|
57
58
|
case FormType.AppTicketing:
|
|
58
59
|
return {
|
|
@@ -64,6 +65,7 @@ const setInputsToValidate = (context) => {
|
|
|
64
65
|
case FormType.AppTravelSuggestion:
|
|
65
66
|
return {
|
|
66
67
|
...commonFields,
|
|
68
|
+
...(includePhoneNumberInPriceAndTravelSuggestion && { phoneNumber }),
|
|
67
69
|
};
|
|
68
70
|
case FormType.AppAccount:
|
|
69
71
|
return {
|
|
@@ -210,6 +212,7 @@ function createTicketingStateMachine(onSubmit, paths) {
|
|
|
210
212
|
hasInternationalBankAccount: false,
|
|
211
213
|
isInitialAgreementChecked: false,
|
|
212
214
|
showInputTravelCardNumber: true,
|
|
215
|
+
includePhoneNumberInPriceAndTravelSuggestion: paths?.includePhoneNumberInPriceAndTravelSuggestion === true,
|
|
213
216
|
errorMessages: {},
|
|
214
217
|
},
|
|
215
218
|
on: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Language,
|
|
1
|
+
import { Language, RichTranslatedString, TranslateFunction } from './commons';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import type { ContactFormTranslationsOverride } from './types';
|
|
4
4
|
export declare function useTranslation(): {
|
|
5
5
|
t: TranslateFunction;
|
|
6
|
-
tRich: (text:
|
|
6
|
+
tRich: (text: RichTranslatedString) => import("react").JSX.Element;
|
|
7
7
|
language: Language;
|
|
8
8
|
};
|
|
9
9
|
export type AppLanguageProviderProps = PropsWithChildren<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-context.d.ts","sourceRoot":"","sources":["../../src/translations/language-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"language-context.d.ts","sourceRoot":"","sources":["../../src/translations/language-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EACR,oBAAoB,EAEpB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAK/D,wBAAgB,cAAc;;kBAMP,oBAAoB;;EAI1C;AAeD,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD;;;OAGG;IACH,SAAS,EAAE,+BAA+B,CAAC;IAC3C,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC,CAAC;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,wBAAwB,+BAQ1B;AAED,4FAA4F;AAC5F,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,YAK7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { translation as _ } from '../../translations/commons';
|
|
2
|
-
import { ReasonForTransportFailure,
|
|
2
|
+
import { ReasonForTransportFailure, TicketType } from '../../types';
|
|
3
3
|
export declare const Contact: {
|
|
4
4
|
pageTitle: import("../../translations/commons").TranslatedString;
|
|
5
5
|
contactPageLayout: {
|
|
@@ -80,7 +80,7 @@ export declare const Contact: {
|
|
|
80
80
|
travelGuaranteeExceptions: {
|
|
81
81
|
label: import("../../translations/commons").TranslatedString;
|
|
82
82
|
exceptions: {
|
|
83
|
-
text: import("../../translations/commons").
|
|
83
|
+
text: import("../../translations/commons").RichTranslatedString;
|
|
84
84
|
examples: import("../../translations/commons").TranslatedString[];
|
|
85
85
|
}[];
|
|
86
86
|
exclusion: import("../../translations/commons").TranslatedString;
|
|
@@ -92,7 +92,6 @@ export declare const Contact: {
|
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
refundTaxi: {
|
|
95
|
-
description: import("../../translations/commons").TranslatedString;
|
|
96
95
|
taxiReceipt: {
|
|
97
96
|
title: import("../../translations/commons").TranslatedString;
|
|
98
97
|
info: import("../../translations/commons").TranslatedString;
|
|
@@ -104,6 +103,11 @@ export declare const Contact: {
|
|
|
104
103
|
title: import("../../translations/commons").TranslatedString;
|
|
105
104
|
};
|
|
106
105
|
};
|
|
106
|
+
otherTicketRefund: {
|
|
107
|
+
receipt: {
|
|
108
|
+
info: import("../../translations/commons").TranslatedString;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
107
111
|
refundCar: {
|
|
108
112
|
description: import("../../translations/commons").TranslatedString;
|
|
109
113
|
info: import("../../translations/commons").TranslatedString;
|
|
@@ -163,6 +167,7 @@ export declare const Contact: {
|
|
|
163
167
|
injury: {
|
|
164
168
|
description: import("../../translations/commons").TranslatedString;
|
|
165
169
|
info: import("../../translations/commons").TranslatedString;
|
|
170
|
+
feedbackDescription: import("../../translations/commons").TranslatedString;
|
|
166
171
|
about: {
|
|
167
172
|
title: import("../../translations/commons").TranslatedString;
|
|
168
173
|
description: import("../../translations/commons").TranslatedString;
|
|
@@ -215,7 +220,7 @@ export declare const Contact: {
|
|
|
215
220
|
question: import("../../translations/commons").TranslatedString;
|
|
216
221
|
orderTravelCard: {
|
|
217
222
|
label: import("../../translations/commons").TranslatedString;
|
|
218
|
-
detailsList: import("../../translations/commons").
|
|
223
|
+
detailsList: import("../../translations/commons").RichTranslatedString[];
|
|
219
224
|
};
|
|
220
225
|
travelCardQuestion: {
|
|
221
226
|
label: import("../../translations/commons").TranslatedString;
|
|
@@ -389,6 +394,7 @@ export declare const Contact: {
|
|
|
389
394
|
framApp: import("../../translations/commons").TranslatedString;
|
|
390
395
|
enturWeb: import("../../translations/commons").TranslatedString;
|
|
391
396
|
framWeb: import("../../translations/commons").TranslatedString;
|
|
397
|
+
sms: import("../../translations/commons").TranslatedString;
|
|
392
398
|
};
|
|
393
399
|
errorMessages: {
|
|
394
400
|
empty: import("../../translations/commons").TranslatedString;
|
|
@@ -569,9 +575,12 @@ export declare const Contact: {
|
|
|
569
575
|
};
|
|
570
576
|
};
|
|
571
577
|
};
|
|
572
|
-
|
|
578
|
+
identificationAttachments: {
|
|
573
579
|
label: import("../../translations/commons").TranslatedString;
|
|
580
|
+
};
|
|
581
|
+
refundReason: {
|
|
574
582
|
question: import("../../translations/commons").TranslatedString;
|
|
583
|
+
description: import("../../translations/commons").TranslatedString;
|
|
575
584
|
errorMessages: {
|
|
576
585
|
empty: import("../../translations/commons").TranslatedString;
|
|
577
586
|
};
|
|
@@ -588,10 +597,7 @@ export declare const Contact: {
|
|
|
588
597
|
ticketType: {
|
|
589
598
|
labelRefund: import("../../translations/commons").TranslatedString;
|
|
590
599
|
optionLabelRefund: import("../../translations/commons").TranslatedString;
|
|
591
|
-
options:
|
|
592
|
-
id: TicketTypeId;
|
|
593
|
-
name: import("../../translations/commons").TranslatedString;
|
|
594
|
-
}[];
|
|
600
|
+
options: TicketType[];
|
|
595
601
|
errorMessages: {
|
|
596
602
|
empty: import("../../translations/commons").TranslatedString;
|
|
597
603
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/translations/pages/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,CAAC,EAEjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/translations/pages/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,CAAC,EAEjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,yBAAyB,EACzB,UAAU,EAEX,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAiwBG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8dlC,yBAAyB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAwPF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAsHhC,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA2EM,MAAM;;;;yCASA,MAAM;;;;CAexC,CAAC"}
|
|
@@ -100,15 +100,15 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
100
100
|
label: (0, commons_1.translation)('I hvilke tilfeller gjelder ikke reisegarantien?', 'In which cases does the travel guarentee not apply?', 'I kva tilfelle gjeld ikkje reisegarantien?'),
|
|
101
101
|
exceptions: [
|
|
102
102
|
{
|
|
103
|
-
text: (0, commons_1.
|
|
103
|
+
text: (0, commons_1.richTranslation)('Reisegarantien gjelder ikke for fergene. Reisegarantien gjelder heller ikke for flybussen i Ålesund eller andre kommersielle busslinjer.', 'The travel guarantee does not apply to the ferries. The travel guarantee also does not apply to the airport bus in Ålesund or other commercial bus lines.', 'Reisegarantien gjeld ikkje for ferjene. Reisegarantien gjeld heller ikkje for flybussen i Ålesund eller andre kommersielle busslinjer.'),
|
|
104
104
|
examples: [],
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
text: (0, commons_1.
|
|
107
|
+
text: (0, commons_1.richTranslation)('Reisegarantien gjelder ikke dersom det er 20 minutter eller mindre til neste avgang i henhold til rutetabellen.', 'The travel guarantee does not apply if there are 20 minutes or less until the next departure according to the timetable.', 'Reisegarantien gjeld ikkje dersom det er 20 minutt eller mindre til neste avgang i følgje rutetabellen.'),
|
|
108
108
|
examples: [],
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
text: (0, commons_1.
|
|
111
|
+
text: (0, commons_1.richTranslation)('Reisegarantien gjelder heller ikke hvis forsinkelsen eller innstillingen skyldes forhold utenfor kontrollen til operatøren. Dette inkluderer situasjoner som (for eksempel):', 'The travel guarantee also does not apply if the delay or cancellation is due to circumstances beyond the control of the operator. These are cases such as (for example):', 'Reisegarantien gjeld heller ikkje dersom forseinkinga eller innstillinga skjer på grunn av forhold utanfor kontrollen til operatøren. Dette er tilfelle som (for eksempel):'),
|
|
112
112
|
examples: [
|
|
113
113
|
(0, commons_1.translation)('offentlige påbud og forbud', 'public orders and prohibitions', 'offentlege påbod og forbod'),
|
|
114
114
|
(0, commons_1.translation)('streik og lignende', 'strikes and similar situations', 'streik og liknande'),
|
|
@@ -129,7 +129,6 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
129
129
|
},
|
|
130
130
|
},
|
|
131
131
|
refundTaxi: {
|
|
132
|
-
description: (0, commons_1.translation)('Jeg ønsker refusjon for drosje', 'I would like refund for taxi', 'Eg ønsker refusjon for drosje'),
|
|
133
132
|
taxiReceipt: {
|
|
134
133
|
title: (0, commons_1.translation)('Informasjon fra drosjekvitteringen', 'Information from the taxi receipt', 'Informasjon frå drosjekvitteringa'),
|
|
135
134
|
info: (0, commons_1.translation)('Last opp en kopi eller et bilde av kvitteringen fra drosjeturen. Kvitteringen må inneholde informasjon om hvor du reiste fra og til.', 'Upload a copy or a photo of the receipt from the taxi ride. The receipt must contain information about where you traveled from and to.', 'Last opp ein kopi eller eit bilde av kvitteringa frå drosjeturen. Kvitteringa må innehalde informasjon om kor du reiste frå og til.'),
|
|
@@ -139,6 +138,11 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
139
138
|
title: (0, commons_1.translation)('Om den planlagte reisen din', 'About your planned trip', 'Om den planlagde reisa di'),
|
|
140
139
|
},
|
|
141
140
|
},
|
|
141
|
+
otherTicketRefund: {
|
|
142
|
+
receipt: {
|
|
143
|
+
info: (0, commons_1.translation)('Last opp en kopi eller et bilde av kvitteringen fra billettkjøpet. Kvittering/billett må inneholde produkt kjøpt, dato og salgsreferanse.', 'Upload a copy or a photo of the receipt from the ticket purchase. The receipt/ticket must include the product purchased, the date and the sales reference.', 'Last opp ein kopi eller eit bilete av kvitteringa frå billettkjøpet. Kvittering/billett må innehalde produkt kjøpt, dato og salsreferanse.'),
|
|
144
|
+
},
|
|
145
|
+
},
|
|
142
146
|
refundCar: {
|
|
143
147
|
description: (0, commons_1.translation)('Jeg ønsker refusjon for bruk av bil', 'I would like refund for the use of a car', 'Eg ønsker refusjon for bruk av en bil'),
|
|
144
148
|
info: (0, commons_1.translation)('Hvis du ikke kommer frem med et annet rutetilbud, refunderer vi dokumenterte utgifter for bruk av bil. Vi betaler kilometergodtgjørelse etter statens satser. Refusjonen dekker ikke bompenger, parkering eller andre utgifter knyttet til leiebil/delebil.', 'If you are unable to reach your destination by an alternative service, we will refund documented expenses for the use of a car. We pay compensation per kilometer according to government rates. The refund does not cover tolls, parking, or other expenses related to rental cars/sharing cars', 'Viss du ikkje kjem fram med eit anna rutetilbod, refunderer vi dokumenterte utlegg for bruk av bil. Vi betalar kilometergodtgjersle etter statens satsar. Refusjonen dekker ikkje bompengar, parkering eller andre utgifter knytt til leigebil/delebil.'),
|
|
@@ -198,6 +202,7 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
198
202
|
injury: {
|
|
199
203
|
description: (0, commons_1.translation)('Melde fra om personskade eller ulykke', 'Report of personal injury or accident', 'Melde frå om personskade eller ulykke'),
|
|
200
204
|
info: (0, commons_1.translation)('Skadet du deg selv eller noe du eier om bord eller på stoppestedet/kai? Gi tilbakemelding her, så hjelper vi deg.', 'Did you injure yourself or something you own on board or at the stop/dock? Give feedback here, and we will help you.', 'Skada du deg sjølv eller noko du eig om bord eller på haldeplass/kai? Gje tilbakemelding her, så hjelper vi deg.'),
|
|
205
|
+
feedbackDescription: (0, commons_1.translation)('Unngå å oppgi personlig informasjon som bankkortnummer eller helseopplysninger. Vi vil spørre deg senere om det er nødvendig.', 'Avoid providing personal information such as bank card numbers or health information. We will ask you later if it is necessary.', 'Unngå å oppgi personopplysningar som bankkortnummer eller helseopplysningar. Vi spør deg seinare viss det er nødvendig.'),
|
|
201
206
|
about: {
|
|
202
207
|
title: (0, commons_1.translation)('Om reisen', 'About the trip', 'Om reisa'),
|
|
203
208
|
description: (0, commons_1.translation)('Vi trenger å vite litt om reisen din. Da er det lettere for oss å følge opp saken.', 'We need to know a bit about your trip. Then it is easier for us to follow up on the case.', 'Vi treng å vite litt om reisa di. Då er det enklare for oss å følgje opp saka.'),
|
|
@@ -251,9 +256,9 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
251
256
|
orderTravelCard: {
|
|
252
257
|
label: (0, commons_1.translation)(`Bestill ${terms_1.T.travelCard.base}`, `Order ${terms_1.T.travelCard.base}`, `Bestill ${terms_1.T.travelCard.base}`),
|
|
253
258
|
detailsList: [
|
|
254
|
-
(0, commons_1.
|
|
255
|
-
(0, commons_1.
|
|
256
|
-
(0, commons_1.
|
|
259
|
+
(0, commons_1.richTranslation)(`${terms_1.T.travelCard.Indefinite} er et fysisk plastkort. På ${terms_1.T.travelCard.definite} kan du legge periodebilletter.`, `${terms_1.T.travelCard.Indefinite} is a physical plastic card. You can add period tickets to ${terms_1.T.travelCard.definite}`, `${terms_1.T.travelCard.Indefinite} er eit fysisk plastkort. På ${terms_1.T.travelCard.definite} kan du legge periodebillettar.`),
|
|
260
|
+
(0, commons_1.richTranslation)(`${terms_1.T.travelCard.Base} får du tak i hos sjåføren om bord i bussen, eller matrosen om bord i hurtigbåten.`, `${terms_1.T.travelCard.Base} is available from the bus driver, or the sailor on board the express boat.`, `${terms_1.T.travelCard.Base} får du tak i hos sjåføren om bord i bussen, eller matrosen om bord i hurtigbåten.`),
|
|
261
|
+
(0, commons_1.richTranslation)('Du trenger ikke kjøpe produktet hos sjåfør. Du kan ta med deg et kort og fylle på det produktet du vil i nettbutikken', 'You don’t need to purchase the product from the driver. You can take a card with you and top up the desired product later in the webshop', 'Du treng ikkje kjøpe produktet hos sjåfør. Du kan ta med deg eit kort og fylle på det produktet du vil i nettbutikken'),
|
|
257
262
|
],
|
|
258
263
|
},
|
|
259
264
|
travelCardQuestion: {
|
|
@@ -441,6 +446,7 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
441
446
|
framApp: (0, commons_1.translation)(terms_1.T.orgApp.Base, terms_1.T.orgApp.Base, terms_1.T.orgApp.Base),
|
|
442
447
|
enturWeb: (0, commons_1.translation)('Entur nettbutikk', 'Entur webshop', 'Entur nettbutikk'),
|
|
443
448
|
framWeb: (0, commons_1.translation)('Nettbutikk', 'Webshop', 'Nettbutikk'),
|
|
449
|
+
sms: (0, commons_1.translation)('SMS', 'SMS', 'SMS'),
|
|
444
450
|
},
|
|
445
451
|
errorMessages: {
|
|
446
452
|
empty: (0, commons_1.translation)('Velg app eller nettbutikk', 'Select app or webshop', 'Vel app eller nettbutikk'),
|
|
@@ -637,9 +643,12 @@ Restverdien blir betalt ut i slutten av kvar månad (med atterhald). Viss du har
|
|
|
637
643
|
},
|
|
638
644
|
},
|
|
639
645
|
},
|
|
646
|
+
identificationAttachments: {
|
|
647
|
+
label: (0, commons_1.translation)('Gyldig legitimasjon (førerkort, pass, ID-kort etc)', "Valid identification (driver's licence, passport, ID card etc)", 'Gyldig legitimasjon (førarkort, pass, ID-kort etc)'),
|
|
648
|
+
},
|
|
640
649
|
refundReason: {
|
|
641
|
-
label: (0, commons_1.translation)('Refusjonen gjelder', 'The refund applies', 'Refusjonen gjeld'),
|
|
642
650
|
question: (0, commons_1.translation)('Hva er grunnen til at du ønsker refusjon?', 'What is the reason you want a refund?', 'Kva er grunnen til at du ønsker refusjon?'),
|
|
651
|
+
description: (0, commons_1.translation)('', '', ''),
|
|
643
652
|
errorMessages: {
|
|
644
653
|
empty: (0, commons_1.translation)('Grunn for refusjon mangler', 'Reason for refund is missing', 'Grunn for refusjon manglar'),
|
|
645
654
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as PageText from './pages';
|
|
3
3
|
import type { Terms } from './terms';
|
|
4
|
+
import type { RichTranslatedString, TranslatedString } from './commons';
|
|
4
5
|
export declare enum LanguageAndTextLanguagesEnum {
|
|
5
6
|
nob = "nob",
|
|
6
7
|
nno = "nno",
|
|
@@ -19,17 +20,21 @@ export declare const languageAndTextSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
19
20
|
}, z.core.$strip>]>;
|
|
20
21
|
export type LanguageAndTextType = z.infer<typeof languageAndTextSchema>;
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
+
* Override shape for the page dictionaries. Each translation must be complete
|
|
24
|
+
* (all languages), and `richTranslation` values are only accepted where the
|
|
25
|
+
* default is rich, since plain keys render Markdown literally.
|
|
23
26
|
*/
|
|
24
|
-
export type
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
+
export type TranslationOverride<T> = T extends RichTranslatedString ? TranslatedString : T extends TranslatedString ? TranslatedString & {
|
|
28
|
+
readonly __rich?: never;
|
|
29
|
+
} : T extends string | ((...args: never[]) => unknown) ? T : T extends readonly (infer E)[] ? TranslationOverride<E>[] : T extends object ? {
|
|
30
|
+
[P in keyof T]?: TranslationOverride<T[P]>;
|
|
31
|
+
} : T;
|
|
27
32
|
/**
|
|
28
33
|
* Optional, structured translation overrides that consumers can pass to
|
|
29
34
|
* tweak or extend the built-in dictionaries.
|
|
30
35
|
*/
|
|
31
36
|
export type ContactFormTranslationsOverride = {
|
|
32
|
-
pages?:
|
|
37
|
+
pages?: TranslationOverride<typeof PageText>;
|
|
33
38
|
terms?: Partial<Terms>;
|
|
34
39
|
};
|
|
35
40
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/translations/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/translations/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAExE,oBAAY,4BAA4B;IACtC,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,EAAE,OAAO;CACV;AAED,eAAO,MAAM,qBAAqB;;;;;;mBAShC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,oBAAoB,GAC/D,gBAAgB,GAChB,CAAC,SAAS,gBAAgB,GACxB,gBAAgB,GAAG;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,GAC9C,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC,GAChD,CAAC,GACD,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC5B,mBAAmB,CAAC,CAAC,CAAC,EAAE,GACxB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC9C,CAAC,CAAC;AAEd;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,QAAQ,CAAC,CAAC;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACxB,CAAC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export type TicketType = {
|
|
|
12
12
|
id: TicketTypeId | (string & {});
|
|
13
13
|
name: TranslatedString;
|
|
14
14
|
};
|
|
15
|
-
export type PurchasePlatformType = 'framApp' | 'enturApp' | 'framWeb' | 'enturWeb';
|
|
15
|
+
export type PurchasePlatformType = 'framApp' | 'enturApp' | 'framWeb' | 'enturWeb' | 'sms';
|
|
16
16
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAC3B,KAAK,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,sBAAsB,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE/E,oBAAY,YAAY;IACtB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;CAC9B;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACjC,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,oBAAoB,GAC9B,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAC3B,KAAK,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,sBAAsB,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE/E,oBAAY,YAAY;IACtB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;CAC9B;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACjC,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,oBAAoB,GAC9B,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationRules.d.ts","sourceRoot":"","sources":["../../src/validation/validationRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAyD7D,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC;IAClC,YAAY,EAAE,gBAAgB,CAAC;CAChC,CAAC;AAgYF,KAAK,kBAAkB,GAAG;IAAE,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,EAAE,CAAA;CAAE,CAAC;AAEpE,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"validationRules.d.ts","sourceRoot":"","sources":["../../src/validation/validationRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAyD7D,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC;IAClC,YAAY,EAAE,gBAAgB,CAAC;CAChC,CAAC;AAgYF,KAAK,kBAAkB,GAAG;IAAE,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,EAAE,CAAA;CAAE,CAAC;AAEpE,eAAO,MAAM,eAAe,EAAE,kBA2C7B,CAAC"}
|
|
@@ -316,7 +316,7 @@ const rulesAPurchasePlatform = [
|
|
|
316
316
|
];
|
|
317
317
|
const rulesAttachments = [
|
|
318
318
|
{
|
|
319
|
-
validate: (
|
|
319
|
+
validate: (files) => !!files?.length,
|
|
320
320
|
errorMessage: translations_1.PageText.Contact.components.fileinput.errorMessages.empty,
|
|
321
321
|
},
|
|
322
322
|
];
|
|
@@ -403,6 +403,7 @@ exports.validationRules = {
|
|
|
403
403
|
purchasePlatform: rulesAPurchasePlatform,
|
|
404
404
|
attachments: rulesAttachments,
|
|
405
405
|
receiptAttachments: rulesAttachments,
|
|
406
|
+
identificationAttachments: rulesAttachments,
|
|
406
407
|
appPhoneNumber: rulesAppPhoneNumber,
|
|
407
408
|
customerNumber: rulesCustomerNumber,
|
|
408
409
|
travelCardNumber: rulesTravelCardNumber,
|