@mrfylke/contact-form 0.1.31 → 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/README.md +19 -3
- 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.d.ts +6 -6
- package/lib/components/icon/generated-icons.js +16 -16
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/lines/use-lines.d.ts +2 -2
- package/lib/lines/use-lines.d.ts.map +1 -1
- package/lib/lines/use-lines.js +14 -21
- package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/injuryForm.js +1 -1
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +2 -2
- package/lib/modules/config/context.d.ts.map +1 -1
- package/lib/modules/config/types.d.ts +46 -21
- 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 +2 -2
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +5 -2
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.js +7 -4
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +17 -9
- package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/index.js +2 -5
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +14 -5
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
- package/lib/refund/forms/residualValueOnTravelCard/index.js +2 -7
- package/lib/refund/index.d.ts.map +1 -1
- package/lib/refund/index.js +12 -6
- package/lib/refund/refundFormMachine.d.ts +19 -10
- package/lib/refund/refundFormMachine.d.ts.map +1 -1
- package/lib/refund/refundFormMachine.js +42 -15
- 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/forms/travel-card/orderTravelCard.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +2 -11
- package/lib/ticketing/index.d.ts.map +1 -1
- package/lib/ticketing/index.js +8 -2
- package/lib/ticketing/ticketingStateMachine.d.ts +6 -4
- package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -1
- package/lib/ticketing/ticketingStateMachine.js +4 -1
- package/lib/translations/commons.d.ts +8 -2
- package/lib/translations/commons.d.ts.map +1 -1
- package/lib/translations/commons.js +4 -0
- package/lib/translations/index.d.ts +3 -2
- package/lib/translations/index.d.ts.map +1 -1
- package/lib/translations/index.js +5 -1
- package/lib/translations/language-context.d.ts +4 -10
- package/lib/translations/language-context.d.ts.map +1 -1
- package/lib/translations/language-context.js +12 -5
- package/lib/translations/lobot.d.ts +9 -0
- package/lib/translations/lobot.d.ts.map +1 -0
- package/lib/translations/lobot.js +6 -0
- package/lib/translations/merge-overrides.d.ts +2 -0
- package/lib/translations/merge-overrides.d.ts.map +1 -1
- package/lib/translations/merge-overrides.js +2 -0
- package/lib/translations/pages/contact.d.ts +19 -22
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +52 -40
- package/lib/translations/terms/default-terms.d.ts +23 -0
- package/lib/translations/terms/default-terms.d.ts.map +1 -0
- package/lib/translations/terms/default-terms.js +25 -0
- package/lib/translations/terms/index.d.ts +4 -0
- package/lib/translations/terms/index.d.ts.map +1 -0
- package/lib/translations/terms/index.js +9 -0
- package/lib/translations/terms/placeholders.d.ts +16 -0
- package/lib/translations/terms/placeholders.d.ts.map +1 -0
- package/lib/translations/terms/placeholders.js +16 -0
- package/lib/translations/terms/types.d.ts +17 -0
- package/lib/translations/terms/types.d.ts.map +1 -0
- package/lib/translations/terms/types.js +2 -0
- package/lib/translations/translations-context.d.ts +6 -0
- package/lib/translations/translations-context.d.ts.map +1 -1
- package/lib/translations/translations-context.js +25 -0
- package/lib/translations/types.d.ts +12 -5
- package/lib/translations/types.d.ts.map +1 -1
- package/lib/types.d.ts +3 -3
- package/lib/types.d.ts.map +1 -1
- package/lib/utils/rich-text.d.ts +9 -0
- package/lib/utils/rich-text.d.ts.map +1 -0
- package/lib/utils/rich-text.js +33 -0
- package/lib/utils/rich-text.module.css +5 -0
- package/lib/validation/validationRules.d.ts.map +1 -1
- package/lib/validation/validationRules.js +2 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -283,6 +283,20 @@ const customTranslations = {
|
|
|
283
283
|
};
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
+
Org-specific words (e.g. "reisekort") are terms: override them once via `terms` instead of every string that contains them. Terms are grouped by concept, with one lowercase value per grammatical form; capitalized forms are derived unless set under `capitalized`. See `defaultTerms` for the available groups and forms, `T` to use them in your own strings, and INTEGRATION.md for details.
|
|
287
|
+
|
|
288
|
+
```tsx
|
|
289
|
+
terms: {
|
|
290
|
+
travelCard: {
|
|
291
|
+
base: translation('t:kort', 't:card', 't:kort'),
|
|
292
|
+
indefinite: translation('et t:kort', 'a t:card', 'eit t:kort'),
|
|
293
|
+
definite: translation('t:kortet', 'the t:card', 't:kortet'),
|
|
294
|
+
plural: translation('t:kort', 't:cards', 't:kort'),
|
|
295
|
+
capitalized: { definite: translation('t:kortet', 'The t:card', 't:kortet') },
|
|
296
|
+
},
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
286
300
|
## Theme
|
|
287
301
|
|
|
288
302
|
### Using `@atb-as/theme` (recommended)
|
|
@@ -335,7 +349,7 @@ Provide a React component for each key. Each component accepts `size`, `classNam
|
|
|
335
349
|
| Feature | Default | Config key |
|
|
336
350
|
|---|---|---|
|
|
337
351
|
| Pages/tabs | All 7 tabs, all internal | `pagesOverrides` |
|
|
338
|
-
|
|
|
352
|
+
| Transport modes | `['bus', 'expressboat', 'ferry']` | `transportModes` |
|
|
339
353
|
| Form schemas | All types/categories per page | `formSchemaOverrides` |
|
|
340
354
|
| Header links | Single optional home link | `layout.headerLinksOverride` |
|
|
341
355
|
| Footer links | Standard sections | `layout.footerLinksOverride` |
|
|
@@ -353,12 +367,14 @@ pagesOverrides: {
|
|
|
353
367
|
|
|
354
368
|
Page IDs: `'ticket-control'` · `'refund'` · `'means-of-transport'` · `'ticketing'` · `'lost-property'` · `'group-travel'` · `'journey-info'`
|
|
355
369
|
|
|
356
|
-
###
|
|
370
|
+
### Transport modes
|
|
357
371
|
|
|
358
372
|
```ts
|
|
359
|
-
|
|
373
|
+
transportModes: ['bus', 'tram'] // dropdown options and line filtering, in display order
|
|
360
374
|
```
|
|
361
375
|
|
|
376
|
+
Available: `'bus'` · `'tram'` · `'expressboat'` · `'ferry'` · `'bestillingstransport'`
|
|
377
|
+
|
|
362
378
|
### Form schema overrides
|
|
363
379
|
|
|
364
380
|
```ts
|
|
@@ -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
|
}
|
|
@@ -1288,7 +1288,7 @@ export declare const icons: {
|
|
|
1288
1288
|
darkable: boolean;
|
|
1289
1289
|
id: string;
|
|
1290
1290
|
};
|
|
1291
|
-
|
|
1291
|
+
Crash: {
|
|
1292
1292
|
relative: string;
|
|
1293
1293
|
absolute: string;
|
|
1294
1294
|
assetType: string;
|
|
@@ -1296,7 +1296,7 @@ export declare const icons: {
|
|
|
1296
1296
|
darkable: boolean;
|
|
1297
1297
|
id: string;
|
|
1298
1298
|
};
|
|
1299
|
-
|
|
1299
|
+
DashboardBackground: {
|
|
1300
1300
|
relative: string;
|
|
1301
1301
|
absolute: string;
|
|
1302
1302
|
assetType: string;
|
|
@@ -1304,7 +1304,7 @@ export declare const icons: {
|
|
|
1304
1304
|
darkable: boolean;
|
|
1305
1305
|
id: string;
|
|
1306
1306
|
};
|
|
1307
|
-
|
|
1307
|
+
Onboarding4: {
|
|
1308
1308
|
relative: string;
|
|
1309
1309
|
absolute: string;
|
|
1310
1310
|
assetType: string;
|
|
@@ -1312,7 +1312,7 @@ export declare const icons: {
|
|
|
1312
1312
|
darkable: boolean;
|
|
1313
1313
|
id: string;
|
|
1314
1314
|
};
|
|
1315
|
-
|
|
1315
|
+
Onboarding5: {
|
|
1316
1316
|
relative: string;
|
|
1317
1317
|
absolute: string;
|
|
1318
1318
|
assetType: string;
|
|
@@ -1320,7 +1320,7 @@ export declare const icons: {
|
|
|
1320
1320
|
darkable: boolean;
|
|
1321
1321
|
id: string;
|
|
1322
1322
|
};
|
|
1323
|
-
|
|
1323
|
+
TicketSplash: {
|
|
1324
1324
|
relative: string;
|
|
1325
1325
|
absolute: string;
|
|
1326
1326
|
assetType: string;
|
|
@@ -1328,7 +1328,7 @@ export declare const icons: {
|
|
|
1328
1328
|
darkable: boolean;
|
|
1329
1329
|
id: string;
|
|
1330
1330
|
};
|
|
1331
|
-
|
|
1331
|
+
"logo/RichLogo": {
|
|
1332
1332
|
relative: string;
|
|
1333
1333
|
absolute: string;
|
|
1334
1334
|
assetType: string;
|
|
@@ -1294,14 +1294,6 @@ exports.icons = {
|
|
|
1294
1294
|
"darkable": false,
|
|
1295
1295
|
"id": "favicon"
|
|
1296
1296
|
},
|
|
1297
|
-
"logo/RichLogo": {
|
|
1298
|
-
"relative": "colors/logo/RichLogo.svg",
|
|
1299
|
-
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/logo/RichLogo.svg",
|
|
1300
|
-
"assetType": "colors",
|
|
1301
|
-
"colorType": "images",
|
|
1302
|
-
"darkable": false,
|
|
1303
|
-
"id": "logo/RichLogo"
|
|
1304
|
-
},
|
|
1305
1297
|
"Crash": {
|
|
1306
1298
|
"relative": "colors/images/Crash.svg",
|
|
1307
1299
|
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/images/Crash.svg",
|
|
@@ -1342,6 +1334,14 @@ exports.icons = {
|
|
|
1342
1334
|
"darkable": false,
|
|
1343
1335
|
"id": "TicketSplash"
|
|
1344
1336
|
},
|
|
1337
|
+
"logo/RichLogo": {
|
|
1338
|
+
"relative": "colors/logo/RichLogo.svg",
|
|
1339
|
+
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/logo/RichLogo.svg",
|
|
1340
|
+
"assetType": "colors",
|
|
1341
|
+
"colorType": "images",
|
|
1342
|
+
"darkable": false,
|
|
1343
|
+
"id": "logo/RichLogo"
|
|
1344
|
+
},
|
|
1345
1345
|
"BackgroundIllustration-OnBehalfOf": {
|
|
1346
1346
|
"relative": "colors/images/dark/BackgroundIllustration-OnBehalfOf.svg",
|
|
1347
1347
|
"absolute": "/home/runner/work/mrfylke-contact-form/mrfylke-contact-form/packages/contact-form/.tmp-icon-assets/colors/images/dark/BackgroundIllustration-OnBehalfOf.svg",
|
|
@@ -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,
|
package/lib/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { SectionCard } from './components/section-card';
|
|
|
14
14
|
export { FieldWrapperWithError, FileInput, Fieldset, Input, Radio, Select, Textarea, SearchableSelect, getLineOptions, getStopOptions, DateSelector, TimeSelector, DepartureTimeField, } from './components';
|
|
15
15
|
export { Checkbox } from './components/checkbox';
|
|
16
16
|
export { type Line } from './server/journey-planner/validators';
|
|
17
|
-
export { useLines, useTransportModeOptions } from './lines/use-lines';
|
|
17
|
+
export { useLines, useTransportModeOptions, DEFAULT_TRANSPORT_MODES, } from './lines/use-lines';
|
|
18
18
|
export { scrollToFirstErrorMessage, findFirstErrorMessage, getLineName, findOrderFormFields, } from './utils';
|
|
19
19
|
export { commonInputValidator } from './validation';
|
|
20
20
|
export type { InputErrorMessages } from './validation';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,iBAAiB,EACjB,yBAAyB,EACzB,UAAU,EACV,oBAAoB,GACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE3E,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,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WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
21
|
-
exports.ContactFormRoot = exports.JourneyInfoContent = exports.TicketingContent = void 0;
|
|
20
|
+
exports.MeansOfTransportContent = exports.AppTicketRefundContent = exports.RefundFormEvents = exports.RefundTicketForm = exports.FormType = exports.RefundContent = exports.SuccessContent = exports.ErrorContent = exports.ExternalLinkPage = exports.ContactFormContainer = exports.useActiveContactPageTitle = exports.getPageTitleForPathname = exports.getContactPages = exports.ContactPageLayout = exports.commonInputValidator = exports.findOrderFormFields = exports.getLineName = exports.findFirstErrorMessage = exports.scrollToFirstErrorMessage = exports.DEFAULT_TRANSPORT_MODES = exports.useTransportModeOptions = exports.useLines = exports.Checkbox = exports.DepartureTimeField = exports.TimeSelector = exports.DateSelector = exports.getStopOptions = exports.getLineOptions = exports.SearchableSelect = exports.Textarea = exports.Select = exports.Radio = exports.Input = exports.Fieldset = exports.FileInput = exports.FieldWrapperWithError = exports.SectionCard = exports.ErrorMessage = exports.Typo = exports.Button = exports.ButtonLink = exports.useHtmlDarkMode = exports.useTheme = exports.ThemeProvider = exports.TicketTypeId = exports.createDefaultOnSubmit = exports.buildEnabledPageIds = exports.useApiConfig = exports.useThemeConfig = exports.useContactFormConfig = void 0;
|
|
21
|
+
exports.ContactFormRoot = exports.JourneyInfoContent = exports.TicketingContent = exports.TicketControlPageContent = void 0;
|
|
22
22
|
// Configuration system (NEW - required for setup)
|
|
23
23
|
var config_1 = require("./modules/config");
|
|
24
24
|
Object.defineProperty(exports, "useContactFormConfig", { enumerable: true, get: function () { return config_1.useContactFormConfig; } });
|
|
@@ -65,6 +65,7 @@ Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function ()
|
|
|
65
65
|
var use_lines_1 = require("./lines/use-lines");
|
|
66
66
|
Object.defineProperty(exports, "useLines", { enumerable: true, get: function () { return use_lines_1.useLines; } });
|
|
67
67
|
Object.defineProperty(exports, "useTransportModeOptions", { enumerable: true, get: function () { return use_lines_1.useTransportModeOptions; } });
|
|
68
|
+
Object.defineProperty(exports, "DEFAULT_TRANSPORT_MODES", { enumerable: true, get: function () { return use_lines_1.DEFAULT_TRANSPORT_MODES; } });
|
|
68
69
|
var utils_1 = require("./utils");
|
|
69
70
|
Object.defineProperty(exports, "scrollToFirstErrorMessage", { enumerable: true, get: function () { return utils_1.scrollToFirstErrorMessage; } });
|
|
70
71
|
Object.defineProperty(exports, "findFirstErrorMessage", { enumerable: true, get: function () { return utils_1.findFirstErrorMessage; } });
|
package/lib/lines/use-lines.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TransportModeType } from '../types';
|
|
2
2
|
import { Line } from '../server/journey-planner/validators';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const DEFAULT_TRANSPORT_MODES: TransportModeType[];
|
|
4
4
|
export declare const useTransportModeOptions: () => TransportModeType[];
|
|
5
|
-
export declare function filterLinesByMode(lines: Line[], transportMode: TransportModeType,
|
|
5
|
+
export declare function filterLinesByMode(lines: Line[], transportMode: TransportModeType, enabledModes: TransportModeType[]): Line[];
|
|
6
6
|
export declare const useLines: () => {
|
|
7
7
|
lines: {
|
|
8
8
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lines.d.ts","sourceRoot":"","sources":["../../src/lines/use-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAK5D,
|
|
1
|
+
{"version":3,"file":"use-lines.d.ts","sourceRoot":"","sources":["../../src/lines/use-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAK5D,eAAO,MAAM,uBAAuB,EAAE,iBAAiB,EAItD,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAO,iBAAiB,EACM,CAAC;AAsCnE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,IAAI,EAAE,EACb,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAAE,iBAAiB,EAAE,GAChC,IAAI,EAAE,CA6CR;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;oCAWoB,iBAAiB,KAAG,IAAI,EAAE;6BAUjC,MAAM,KAAG,IAAI,CAAC,OAAO,CAAC;CAYvD,CAAC"}
|
package/lib/lines/use-lines.js
CHANGED
|
@@ -3,24 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useLines = exports.useTransportModeOptions = void 0;
|
|
7
|
-
exports.getTransportModeOptions = getTransportModeOptions;
|
|
6
|
+
exports.useLines = exports.useTransportModeOptions = exports.DEFAULT_TRANSPORT_MODES = void 0;
|
|
8
7
|
exports.filterLinesByMode = filterLinesByMode;
|
|
9
8
|
const immutable_1 = __importDefault(require("swr/immutable"));
|
|
10
9
|
const api_browser_1 = require("../modules/api-browser");
|
|
11
10
|
const config_1 = require("../modules/config");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return modes;
|
|
19
|
-
}
|
|
20
|
-
const useTransportModeOptions = () => {
|
|
21
|
-
const { features } = (0, config_1.useContactFormConfig)();
|
|
22
|
-
return getTransportModeOptions(features?.includeFerry !== false, features?.includeBestillingstransport === true);
|
|
23
|
-
};
|
|
11
|
+
exports.DEFAULT_TRANSPORT_MODES = [
|
|
12
|
+
'bus',
|
|
13
|
+
'expressboat',
|
|
14
|
+
'ferry',
|
|
15
|
+
];
|
|
16
|
+
const useTransportModeOptions = () => (0, config_1.useContactFormConfig)().transportModes ?? exports.DEFAULT_TRANSPORT_MODES;
|
|
24
17
|
exports.useTransportModeOptions = useTransportModeOptions;
|
|
25
18
|
const subTransportModesExpressboat = [
|
|
26
19
|
'highSpeedPassengerService',
|
|
@@ -56,14 +49,14 @@ function sortLinesByCode(lines) {
|
|
|
56
49
|
});
|
|
57
50
|
});
|
|
58
51
|
}
|
|
59
|
-
function filterLinesByMode(lines, transportMode,
|
|
60
|
-
if ((transportMode
|
|
61
|
-
!includeFerry) {
|
|
52
|
+
function filterLinesByMode(lines, transportMode, enabledModes) {
|
|
53
|
+
if (!enabledModes.includes(transportMode))
|
|
62
54
|
return [];
|
|
63
|
-
}
|
|
64
55
|
switch (transportMode) {
|
|
65
56
|
case 'bus':
|
|
66
57
|
return sortLinesByCode(lines.filter((line) => line.transportMode === 'bus'));
|
|
58
|
+
case 'tram':
|
|
59
|
+
return sortLinesByCode(lines.filter((line) => line.transportMode === 'tram'));
|
|
67
60
|
case 'bestillingstransport':
|
|
68
61
|
return sortLinesByCode(lines.filter((line) => line.transportMode === 'taxi' ||
|
|
69
62
|
line.name.toLowerCase().includes('bestillingsrute')));
|
|
@@ -81,14 +74,14 @@ function filterLinesByMode(lines, transportMode, includeFerry) {
|
|
|
81
74
|
}
|
|
82
75
|
const useLines = () => {
|
|
83
76
|
const apiConfig = (0, config_1.useApiConfig)();
|
|
84
|
-
const {
|
|
85
|
-
const
|
|
77
|
+
const { lineFilters } = (0, config_1.useContactFormConfig)();
|
|
78
|
+
const enabledModes = (0, exports.useTransportModeOptions)();
|
|
86
79
|
const linesEndpoint = apiConfig.endpoints?.lines || '/api/contact/lines';
|
|
87
80
|
const { data: lines, error, isLoading, } = (0, immutable_1.default)(linesEndpoint, api_browser_1.swrFetcher);
|
|
88
81
|
const getLinesByMode = (transportMode) => {
|
|
89
82
|
if (!lines)
|
|
90
83
|
return [];
|
|
91
|
-
const filteredLines = filterLinesByMode(lines, transportMode,
|
|
84
|
+
const filteredLines = filterLinesByMode(lines, transportMode, enabledModes);
|
|
92
85
|
const additionalPredicate = lineFilters?.additionalPredicate;
|
|
93
86
|
if (!additionalPredicate)
|
|
94
87
|
return filteredLines;
|
|
@@ -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,
|
|
@@ -133,7 +133,7 @@ export declare function createMeansOfTransportFormMachine(onSubmit: (slug: FormS
|
|
|
133
133
|
type: "isInjuryForm";
|
|
134
134
|
params: unknown;
|
|
135
135
|
}, never, "success" | "formTypeHandler" | "validating" | "submitting" | {
|
|
136
|
-
editing: "
|
|
136
|
+
editing: "stop" | "driver" | "transportation" | "delay" | "serviceOffering" | "injury" | "selectFormType";
|
|
137
137
|
}, string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
138
138
|
states: {
|
|
139
139
|
readonly formTypeHandler: {
|
|
@@ -252,7 +252,7 @@ export declare const meansOfTransportFormMachine: import("xstate").StateMachine<
|
|
|
252
252
|
type: "isInjuryForm";
|
|
253
253
|
params: unknown;
|
|
254
254
|
}, never, "success" | "formTypeHandler" | "validating" | "submitting" | {
|
|
255
|
-
editing: "
|
|
255
|
+
editing: "stop" | "driver" | "transportation" | "delay" | "serviceOffering" | "injury" | "selectFormType";
|
|
256
256
|
}, string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
257
257
|
states: {
|
|
258
258
|
readonly formTypeHandler: {
|
|
@@ -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;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;;;
|
|
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;;;aAYm0D,CAAC;kBAA+U,CAAC;cAAoB,CAAC;;EADpsE"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { ComponentType } from 'react';
|
|
6
6
|
import type { Line } from '../../server/journey-planner/validators';
|
|
7
7
|
import type { ContactFormTranslationsOverride, TranslatedString } from '../../translations';
|
|
8
|
-
import type { TransportModeType } from '../../types';
|
|
8
|
+
import type { PurchasePlatformType, TransportModeType } from '../../types';
|
|
9
9
|
import type { MonoIcons } from '../../components/icon';
|
|
10
10
|
import type { AssertExtends, CheckNoConflicts } from '../../utils/typing';
|
|
11
11
|
export type ContactPage = {
|
|
@@ -283,6 +283,7 @@ export type FormSchemaOverrides = {
|
|
|
283
283
|
};
|
|
284
284
|
refund?: {
|
|
285
285
|
enabledFormCategories?: string[];
|
|
286
|
+
enabledPurchasePlatforms?: PurchasePlatformType[];
|
|
286
287
|
customFormRenderers?: Record<string, (state: unknown, send: unknown) => React.ReactNode>;
|
|
287
288
|
};
|
|
288
289
|
ticketing?: {
|
|
@@ -305,13 +306,6 @@ export type ContactFormConfig = {
|
|
|
305
306
|
api?: ApiConfig;
|
|
306
307
|
/** Feature flags */
|
|
307
308
|
features?: {
|
|
308
|
-
enableFileUploads?: boolean;
|
|
309
|
-
/**
|
|
310
|
-
* Include ferry as a transport mode option.
|
|
311
|
-
* Default: true (ferry included).
|
|
312
|
-
* When false, ferry is excluded from transport mode dropdowns and Entur/lines queries.
|
|
313
|
-
*/
|
|
314
|
-
includeFerry?: boolean;
|
|
315
309
|
/**
|
|
316
310
|
* Include bank account fields (bankkontonummer / utenlandsk bankkontonummer) in the
|
|
317
311
|
* fee complaint form.
|
|
@@ -335,13 +329,6 @@ export type ContactFormConfig = {
|
|
|
335
329
|
* useful for orgs using Entur-appen where customers don't have a customer number.
|
|
336
330
|
*/
|
|
337
331
|
includeCustomerNumberInFeeComplaint?: boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Include bestillingstransport (on-demand/flexible transport) as a transport mode option.
|
|
340
|
-
* Default: false.
|
|
341
|
-
* When true, bestillingstransport is added to transport mode dropdowns and uses the
|
|
342
|
-
* same Entur line/stop queries as bus.
|
|
343
|
-
*/
|
|
344
|
-
includeBestillingstransport?: boolean;
|
|
345
332
|
/**
|
|
346
333
|
* Include departure info fields (transport mode, line, from stop, date, departure time)
|
|
347
334
|
* in the ticket refund forms (appTicketRefund and otherTicketRefund).
|
|
@@ -363,11 +350,26 @@ export type ContactFormConfig = {
|
|
|
363
350
|
*/
|
|
364
351
|
enableRequiredLineInServiceOffering?: boolean;
|
|
365
352
|
/**
|
|
366
|
-
* Include the order id
|
|
367
|
-
* form.
|
|
353
|
+
* Include the order id field in the other ticket refund form.
|
|
368
354
|
* Default: false.
|
|
369
355
|
*/
|
|
370
|
-
|
|
356
|
+
includeOrderIdInOtherTicketRefund?: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* Include the amount field in the other ticket refund form.
|
|
359
|
+
* Default: false.
|
|
360
|
+
*/
|
|
361
|
+
includeAmountInOtherTicketRefund?: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Include the amount field in the taxi refund form.
|
|
364
|
+
* Default: true.
|
|
365
|
+
*/
|
|
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;
|
|
371
373
|
/**
|
|
372
374
|
* Include the fee date field in the fee complaint and postpone payment
|
|
373
375
|
* forms.
|
|
@@ -375,12 +377,35 @@ export type ContactFormConfig = {
|
|
|
375
377
|
*/
|
|
376
378
|
includeFeeDateInTicketControl?: boolean;
|
|
377
379
|
/**
|
|
378
|
-
*
|
|
379
|
-
*
|
|
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.
|
|
380
393
|
* Default: false.
|
|
381
394
|
*/
|
|
382
|
-
|
|
395
|
+
enableIdentificationAttachmentInOtherTicketRefund?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Allow IBAN/SWIFT in the travel guarantee forms.
|
|
398
|
+
* Default: true.
|
|
399
|
+
* When false, only the Norwegian bank account number field is shown and validated.
|
|
400
|
+
*/
|
|
401
|
+
enableInternationalBankAccountInTravelGuarantee?: boolean;
|
|
383
402
|
};
|
|
403
|
+
/**
|
|
404
|
+
* Transport modes offered in dropdowns and used to filter lines, in
|
|
405
|
+
* display order.
|
|
406
|
+
* Default: ['bus', 'expressboat', 'ferry'].
|
|
407
|
+
*/
|
|
408
|
+
transportModes?: TransportModeType[];
|
|
384
409
|
/** Optional host-provided filters for line lookups. */
|
|
385
410
|
lineFilters?: LineFilterConfig;
|
|
386
411
|
/** Optional layout config: basePath, backLinkDefault, successPath, errorPath */
|
|
@@ -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,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
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,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,MAAM,WAAW,GAAG;IACxB,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,gBAAgB,CAAC;IACxB,qLAAqL;IACrL,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,6CAA6C;IAC7C,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,MAAM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AC,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"],"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,2BAA2B,GAC3B,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 +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"}
|
|
@@ -17,7 +17,7 @@ const typography_1 = require("../../../components/typography");
|
|
|
17
17
|
const checkbox_1 = require("../../../components/checkbox");
|
|
18
18
|
const utils_1 = require("../../../utils");
|
|
19
19
|
const RefundAndTravelGuaranteeForms = ({ state, send, }) => {
|
|
20
|
-
const { t } = (0, translations_1.useTranslation)();
|
|
20
|
+
const { t, tRich } = (0, translations_1.useTranslation)();
|
|
21
21
|
const { PageText } = (0, translations_context_1.useMergedTranslations)();
|
|
22
22
|
const travelGuaranteeLinkHref = t(PageText.Contact.refund.agreement.travelGuaranteeExceptions.link.href);
|
|
23
23
|
if (!travelGuaranteeLinkHref) {
|
|
@@ -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) }), (
|
|
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',
|