@mrfylke/contact-form 0.1.27 → 0.1.29
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/date-selector.d.ts.map +1 -1
- package/lib/components/form/date-selector.js +2 -1
- package/lib/components/form/time-selector.d.ts.map +1 -1
- package/lib/components/form/time-selector.js +2 -1
- package/lib/components/icon/generated-icons.d.ts +63 -63
- package/lib/components/icon/generated-icons.js +206 -206
- package/lib/group-travel/index.d.ts.map +1 -1
- package/lib/group-travel/index.js +6 -1
- package/lib/lost-property-external/index.d.ts.map +1 -1
- package/lib/lost-property-external/index.js +6 -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 +7 -3
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.js +7 -7
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +1 -3
- package/lib/refund/refundFormMachine.d.ts +6 -2
- package/lib/refund/refundFormMachine.d.ts.map +1 -1
- package/lib/refund/refundFormMachine.js +7 -3
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +9 -4
- package/lib/ticketing/index.d.ts.map +1 -1
- package/lib/ticketing/index.js +7 -2
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +12 -28
- package/lib/types.d.ts +1 -5
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +0 -4
- package/lib/utils.d.ts +2 -0
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +10 -0
- package/lib/validation/validationRules.d.ts.map +1 -1
- package/lib/validation/validationRules.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/group-travel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/group-travel/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,kBAAkB,gCAuBzC"}
|
|
@@ -9,8 +9,13 @@ const components_1 = require("../components");
|
|
|
9
9
|
const link_1 = __importDefault(require("next/link"));
|
|
10
10
|
const translations_1 = require("../translations");
|
|
11
11
|
const typography_1 = require("../components/typography");
|
|
12
|
+
const utils_1 = require("../utils");
|
|
12
13
|
function GroupTravelContent() {
|
|
13
14
|
const PageText = (0, translations_1.usePageText)();
|
|
14
15
|
const { t } = (0, translations_1.useTranslation)();
|
|
15
|
-
|
|
16
|
+
const url = t(PageText.Contact.groupTravel.description.url);
|
|
17
|
+
if (!url) {
|
|
18
|
+
(0, utils_1.warnDevMissingTranslation)('groupTravel.description.url');
|
|
19
|
+
}
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.groupTravel.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.groupTravel.description.info), url && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: url, target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.groupTravel.description.externalLink) })] }))] }) }));
|
|
16
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lost-property-external/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lost-property-external/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,+BAA+B,gCAuBtD"}
|
|
@@ -9,8 +9,13 @@ const components_1 = require("../components");
|
|
|
9
9
|
const link_1 = __importDefault(require("next/link"));
|
|
10
10
|
const translations_1 = require("../translations");
|
|
11
11
|
const typography_1 = require("../components/typography");
|
|
12
|
+
const utils_1 = require("../utils");
|
|
12
13
|
function LostPropertyExternalFormContent() {
|
|
13
14
|
const PageText = (0, translations_1.usePageText)();
|
|
14
15
|
const { t } = (0, translations_1.useTranslation)();
|
|
15
|
-
|
|
16
|
+
const url = t(PageText.Contact.lostProperty.description.url);
|
|
17
|
+
if (!url) {
|
|
18
|
+
(0, utils_1.warnDevMissingTranslation)('lostProperty.description.url');
|
|
19
|
+
}
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.lostProperty.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.lostProperty.description.info), url && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: url, target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.lostProperty.description.externalLink) })] }))] }) }));
|
|
16
21
|
}
|
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' | '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' | '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,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,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;
|
|
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,gCA2HpC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -15,17 +15,21 @@ const translations_context_1 = require("../../../translations/translations-conte
|
|
|
15
15
|
const components_1 = require("../../../components");
|
|
16
16
|
const typography_1 = require("../../../components/typography");
|
|
17
17
|
const checkbox_1 = require("../../../components/checkbox");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
18
19
|
const RefundAndTravelGuaranteeForms = ({ state, send, }) => {
|
|
19
20
|
const { t } = (0, translations_1.useTranslation)();
|
|
20
21
|
const { PageText } = (0, translations_context_1.useMergedTranslations)();
|
|
22
|
+
const travelGuaranteeLinkHref = t(PageText.Contact.refund.agreement.travelGuaranteeExceptions.link.href);
|
|
23
|
+
if (!travelGuaranteeLinkHref) {
|
|
24
|
+
(0, utils_1.warnDevMissingTranslation)('refund.agreement.travelGuaranteeExceptions.link.href');
|
|
25
|
+
}
|
|
21
26
|
const displayRefundTaxiForm = state.context.isInitialAgreementChecked &&
|
|
22
27
|
state.context.formType === 'refundTaxi';
|
|
23
28
|
const displayRefundCarForm = state.context.isInitialAgreementChecked &&
|
|
24
29
|
state.context.formType === 'refundCar';
|
|
25
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) }), (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.refund.agreement.ticketRefundText) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "heading__m", children: t(PageText.Contact.refund.agreement.travelGuaranteeExceptions.label) }), (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: PageText.Contact.refund.agreement.travelGuaranteeExceptions.exceptions.map((exception, index) => ((0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(exception.text) }), exception.examples.length > 0 && ((0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.rules__list, children: exception.examples.map((example, exampleIndex) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(example) }) }, exampleIndex))) }))] }, index))) })] }), (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.refund.agreement.travelGuaranteeExceptions
|
|
26
|
-
.exclusion), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: t(PageText.Contact.refund.agreement.travelGuaranteeExceptions
|
|
27
|
-
|
|
28
|
-
.text) })] }), (0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { label: t(PageText.Contact.ticketControl.feeComplaint.firstAgreement.checkbox), checked: state.context.isInitialAgreementChecked, onChange: () => send({
|
|
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
|
+
.link.text) })] }))] }), (0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { label: t(PageText.Contact.ticketControl.feeComplaint.firstAgreement.checkbox), checked: state.context.isInitialAgreementChecked, onChange: () => send({
|
|
29
33
|
type: 'ON_INPUT_CHANGE',
|
|
30
34
|
inputName: 'isInitialAgreementChecked',
|
|
31
35
|
value: !state.context.isInitialAgreementChecked,
|
|
@@ -15,14 +15,14 @@ const RefundTaxiForm = ({ state, send }) => {
|
|
|
15
15
|
type: 'ON_INPUT_CHANGE',
|
|
16
16
|
inputName: 'amount',
|
|
17
17
|
value: e.target.value,
|
|
18
|
-
}) }), (0, jsx_runtime_1.jsx)(components_1.FileInput, { id: "
|
|
18
|
+
}) }), (0, jsx_runtime_1.jsx)(components_1.FileInput, { id: "receiptAttachments", label: t(PageText.Contact.refund.refundTaxi.taxiReceipt.info), iconLabel: t(PageText.Contact.input.feedback.attachment.receipt), name: "receiptAttachments", isRequired: true, onChange: (files) => {
|
|
19
19
|
send({
|
|
20
20
|
type: 'ON_INPUT_CHANGE',
|
|
21
|
-
inputName: '
|
|
21
|
+
inputName: 'receiptAttachments',
|
|
22
22
|
value: files,
|
|
23
23
|
});
|
|
24
|
-
}, errorMessage: state.context?.errorMessages['
|
|
25
|
-
? t(state.context?.errorMessages['
|
|
24
|
+
}, errorMessage: state.context?.errorMessages['receiptAttachments']?.[0]
|
|
25
|
+
? t(state.context?.errorMessages['receiptAttachments']?.[0])
|
|
26
26
|
: undefined })] }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.refund.refundTaxi.aboutYourTrip.title), children: [(0, jsx_runtime_1.jsx)(components_1.Select, { id: "transportMode", label: t(PageText.Contact.input.transportMode.label), value: state.context.transportMode || '', onChange: (value) => send({
|
|
27
27
|
type: 'ON_TRANSPORTMODE_CHANGE',
|
|
28
28
|
value: value,
|
|
@@ -80,14 +80,14 @@ const RefundTaxiForm = ({ state, send }) => {
|
|
|
80
80
|
inputName: 'feedback',
|
|
81
81
|
value: e.target.value,
|
|
82
82
|
}), fileInputProps: {
|
|
83
|
-
id: '
|
|
83
|
+
id: 'feedbackAttachments',
|
|
84
84
|
iconLabel: t(PageText.Contact.refund.refundAndTravelGuarantee
|
|
85
85
|
.feedbackAttachmentLabel),
|
|
86
|
-
name: '
|
|
86
|
+
name: 'feedbackAttachments',
|
|
87
87
|
onChange: (files) => {
|
|
88
88
|
send({
|
|
89
89
|
type: 'ON_INPUT_CHANGE',
|
|
90
|
-
inputName: '
|
|
90
|
+
inputName: 'feedbackAttachments',
|
|
91
91
|
value: files,
|
|
92
92
|
});
|
|
93
93
|
},
|
|
@@ -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;AAqeF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,sBAAsB,gCAWxE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -12,8 +12,6 @@ const RefundSection = ({ state, send }) => {
|
|
|
12
12
|
const PageText = (0, translations_1.usePageText)();
|
|
13
13
|
const { t } = (0, translations_1.useTranslation)();
|
|
14
14
|
const { features } = (0, context_1.useContactFormConfig)();
|
|
15
|
-
const ticketTypeOptions = PageText.Contact.input.ticketType.options.filter((option) => option.id == types_1.TicketTypeId.SingleTicket ||
|
|
16
|
-
option.id == types_1.TicketTypeId.PeriodTicket);
|
|
17
15
|
const showTravelCardNumber = !state.context.includeOtherTicketTypeSelector ||
|
|
18
16
|
state.context.ticketType?.id === types_1.TicketTypeId.PeriodTicket;
|
|
19
17
|
return ((0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.refund.otherTicketRefund.label), children: [state.context.includeOtherTicketTypeSelector && ((0, jsx_runtime_1.jsx)(components_1.Select, { id: "ticketType", label: t(PageText.Contact.input.ticketType.labelRefund), value: state.context.ticketType, valueToId: (option) => option.id, valueToText: (option) => t(option.name), onChange: (value) => {
|
|
@@ -24,7 +22,7 @@ const RefundSection = ({ state, send }) => {
|
|
|
24
22
|
inputName: 'ticketType',
|
|
25
23
|
value: value,
|
|
26
24
|
});
|
|
27
|
-
}, placeholder: t(PageText.Contact.input.ticketType.optionLabelRefund), options:
|
|
25
|
+
}, placeholder: t(PageText.Contact.input.ticketType.optionLabelRefund), options: PageText.Contact.input.ticketType.options, isRequired: true, error: state.context?.errorMessages['ticketType']?.[0]
|
|
28
26
|
? t(state.context?.errorMessages['ticketType'][0])
|
|
29
27
|
: undefined })), features?.includeOrderIdAndAmountInOtherTicketRefund && ((0, jsx_runtime_1.jsx)(components_1.Input, { id: "orderId", label: t(PageText.Contact.input.orderId.label(false)), type: "text", name: "orderId", value: state.context.orderId || '', isRequired: true, errorMessage: state.context?.errorMessages['orderId']?.[0], onChange: (e) => send({
|
|
30
28
|
type: 'ON_INPUT_CHANGE',
|
|
@@ -40,6 +40,8 @@ type SubmitInput = {
|
|
|
40
40
|
SWIFT?: string;
|
|
41
41
|
feedback?: string;
|
|
42
42
|
attachments?: File[];
|
|
43
|
+
receiptAttachments?: File[];
|
|
44
|
+
feedbackAttachments?: File[];
|
|
43
45
|
transportMode?: string;
|
|
44
46
|
line?: string;
|
|
45
47
|
fromStop?: string;
|
|
@@ -74,6 +76,8 @@ export type RefundContextProps = {
|
|
|
74
76
|
SWIFT?: string;
|
|
75
77
|
feedback?: string;
|
|
76
78
|
attachments?: File[];
|
|
79
|
+
receiptAttachments?: File[];
|
|
80
|
+
feedbackAttachments?: File[];
|
|
77
81
|
transportMode?: TransportModeType | undefined;
|
|
78
82
|
line?: Line | undefined;
|
|
79
83
|
fromStop?: Line['quays'][0] | undefined;
|
|
@@ -117,7 +121,7 @@ export type MachinePaths = {
|
|
|
117
121
|
};
|
|
118
122
|
export declare function createRefundStateMachine(onSubmit: (slug: FormSlug, state: Record<string, unknown>) => Promise<Response>, paths?: Partial<MachinePaths>): import("xstate").StateMachine<RefundContextProps, {
|
|
119
123
|
type: "ON_INPUT_CHANGE";
|
|
120
|
-
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" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber" | "bankCardDetails";
|
|
124
|
+
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";
|
|
121
125
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line["quays"][0] | File[] | undefined;
|
|
122
126
|
} | {
|
|
123
127
|
type: "SELECT_FORM_CATEGORY";
|
|
@@ -277,7 +281,7 @@ export declare function createRefundStateMachine(onSubmit: (slug: FormSlug, stat
|
|
|
277
281
|
}>;
|
|
278
282
|
export declare const refundStateMachine: import("xstate").StateMachine<RefundContextProps, {
|
|
279
283
|
type: "ON_INPUT_CHANGE";
|
|
280
|
-
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" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber" | "bankCardDetails";
|
|
284
|
+
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";
|
|
281
285
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line["quays"][0] | File[] | undefined;
|
|
282
286
|
} | {
|
|
283
287
|
type: "SELECT_FORM_CATEGORY";
|
|
@@ -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,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC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AO,CAAC;IACpD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2CAA2C,EAAE,OAAO,CAAC;IACrD,aAAa,EAAE,kBAAkB,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;
|
|
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,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgtBrD,CAAC"}
|
|
@@ -47,7 +47,7 @@ const setInitialAgreementAndFormType = (context, isChecked) => {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
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, orderId, ticketType, refundReason, includeOtherTicketTypeSelector, includeRefundDepartureInfo, includeCustomerNumberAndPurchasePlatformInAppTicketRefund, customerNumber, purchasePlatform, includeOrderIdAndAmountInOtherTicketRefund, enableFileUploads, enableRequiredAttachmentInOtherTicketRefund, } = 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, includeOrderIdAndAmountInOtherTicketRefund, enableFileUploads, enableRequiredAttachmentInOtherTicketRefund, } = context;
|
|
51
51
|
const commonFields = {
|
|
52
52
|
formType,
|
|
53
53
|
transportMode,
|
|
@@ -68,7 +68,7 @@ const setInputToValidate = (context) => {
|
|
|
68
68
|
};
|
|
69
69
|
switch (formType) {
|
|
70
70
|
case FormType.RefundTaxi:
|
|
71
|
-
return { ...commonFields,
|
|
71
|
+
return { ...commonFields, receiptAttachments, amount };
|
|
72
72
|
case FormType.RefundCar:
|
|
73
73
|
return { ...commonFields, kilometersDriven, fromAddress, toAddress };
|
|
74
74
|
case FormType.AppTicketRefund:
|
|
@@ -489,7 +489,11 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
489
489
|
toAddress: context?.toAddress,
|
|
490
490
|
reasonForTransportFailure: context?.reasonForTransportFailure?.name.no,
|
|
491
491
|
additionalInfo: context?.feedback,
|
|
492
|
-
attachments:
|
|
492
|
+
attachments: [
|
|
493
|
+
...(context.receiptAttachments ?? []),
|
|
494
|
+
...(context.feedbackAttachments ?? []),
|
|
495
|
+
...(context.attachments ?? []),
|
|
496
|
+
],
|
|
493
497
|
firstName: context?.firstName,
|
|
494
498
|
lastName: context?.lastName,
|
|
495
499
|
address: context?.address,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orderTravelCard.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/orderTravelCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orderTravelCard.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/orderTravelCard.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB,mCA8C/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -10,12 +10,17 @@ const translations_1 = require("../../../translations");
|
|
|
10
10
|
const typography_1 = require("../../../components/typography");
|
|
11
11
|
const components_1 = require("../../../components");
|
|
12
12
|
const link_1 = __importDefault(require("next/link"));
|
|
13
|
+
const utils_1 = require("../../../utils");
|
|
13
14
|
const OrderTravelCardForm = () => {
|
|
15
|
+
const PageText = (0, translations_1.usePageText)();
|
|
14
16
|
const { t } = (0, translations_1.useTranslation)();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const detailWithUrlHref = t(PageText.Contact.ticketing.travelCard.orderTravelCard.detailWithUrl.href);
|
|
18
|
+
if (!detailWithUrlHref) {
|
|
19
|
+
(0, utils_1.warnDevMissingTranslation)('ticketing.travelCard.orderTravelCard.detailWithUrl.href');
|
|
20
|
+
}
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.travelCard.orderTravelCard.label), children: (0, jsx_runtime_1.jsxs)("ul", { className: contact_module_css_1.default.rules__list, children: [PageText.Contact.ticketing.travelCard.orderTravelCard.detailsList.map((paragraph, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(paragraph) }) }, `info-paragraph-${index}`))), detailWithUrlHref && ((0, jsx_runtime_1.jsxs)("li", { children: [t(PageText.Contact.ticketing.travelCard.orderTravelCard
|
|
22
|
+
.detailWithUrl.detail), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: detailWithUrlHref, target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.ticketing.travelCard.orderTravelCard
|
|
23
|
+
.detailWithUrl.linkText) }), "."] }))] }) }));
|
|
19
24
|
};
|
|
20
25
|
exports.OrderTravelCardForm = OrderTravelCardForm;
|
|
21
26
|
exports.default = exports.OrderTravelCardForm;
|
|
@@ -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,mCA6HrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/lib/ticketing/index.js
CHANGED
|
@@ -56,8 +56,13 @@ const TicketingContent = () => {
|
|
|
56
56
|
e.preventDefault();
|
|
57
57
|
send({ type: 'SUBMIT', orderedFormFieldNames: (0, utils_1.findOrderFormFields)(e) });
|
|
58
58
|
};
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const additionalTicketingInfoHref = PageText.Contact.ticketing.additionalTicketingInfo &&
|
|
60
|
+
t(PageText.Contact.ticketing.additionalTicketingInfo.href);
|
|
61
|
+
if (PageText.Contact.ticketing.additionalTicketingInfo &&
|
|
62
|
+
!additionalTicketingInfoHref) {
|
|
63
|
+
(0, utils_1.warnDevMissingTranslation)('ticketing.additionalTicketingInfo.href');
|
|
64
|
+
}
|
|
65
|
+
const additionalTicketingInfo = additionalTicketingInfoHref ? ((0, jsx_runtime_1.jsxs)("p", { children: [t(PageText.Contact.ticketing.additionalTicketingInfo.detail), ' ', (0, jsx_runtime_1.jsx)("a", { href: additionalTicketingInfoHref, children: t(PageText.Contact.ticketing.additionalTicketingInfo.linkText) }), "."] })) : null;
|
|
61
66
|
return ((0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, className: contact_module_css_1.default.form, children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.title), children: [(0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: enabledFormCategories.map((formCategory) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(PageText.Contact.ticketing[formCategory].description), checked: state.matches({ editing: formCategory }), onChange: () => {
|
|
62
67
|
(0, url_form_type_1.setFormTypeParam)(formCategory);
|
|
63
68
|
send({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/translations/pages/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,CAAC,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEtE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;qCAyLd,MAAM;;;;yCASA,MAAM;;;;CAexC,CAAC"}
|
|
@@ -105,7 +105,7 @@ exports.Contact = {
|
|
|
105
105
|
examples: [],
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
|
-
text: (0, commons_1.translation)('Reisegarantien gjelder heller ikke hvis forsinkelsen eller innstillingen skyldes forhold utenfor kontrollen til
|
|
108
|
+
text: (0, commons_1.translation)('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):'),
|
|
109
109
|
examples: [
|
|
110
110
|
(0, commons_1.translation)('offentlige påbud og forbud', 'public orders and prohibitions', 'offentlege påbod og forbod'),
|
|
111
111
|
(0, commons_1.translation)('streik og lignende', 'strikes and similar situations', 'streik og liknande'),
|
|
@@ -120,7 +120,7 @@ exports.Contact = {
|
|
|
120
120
|
exclusion: (0, commons_1.translation)('Reisegarantien omfatter heller ikke tap som følge av forsinkelsen, som for eksempel mistet tannlegetime, jobbavtale, togavgang, fergeavgang eller flyavgang.', 'The travel guarantee does not cover losses resulting from the delay, such as missed dental appointments, job agreements, train departures, ferry departures or flight departures.', 'Reisegarantien omfattar heller ikkje tap som følge av forseinkinga, som for eksempel mista tannlegetime, jobbavtale, togavgang, ferjeavgang eller flyavgang.'),
|
|
121
121
|
link: {
|
|
122
122
|
text: (0, commons_1.translation)('Les mer om reisegranti', 'Read more about travel guarantee', 'Les meir om reisegaranti'),
|
|
123
|
-
href: (0, commons_1.translation)('
|
|
123
|
+
href: (0, commons_1.translation)('', '', ''),
|
|
124
124
|
},
|
|
125
125
|
checkbox: (0, commons_1.translation)('Jeg forstår', 'I understand', 'Eg forstår'),
|
|
126
126
|
},
|
|
@@ -206,15 +206,15 @@ exports.Contact = {
|
|
|
206
206
|
description: {
|
|
207
207
|
info: (0, commons_1.translation)('Har du glemt igjen noe på en av bussene, hurtigbåtene, eller fergene, ', `If you've left something behind on a bus, express boat, or ferry,`, 'Har du gløymt igjen noko i ein av bussane, hurtigbåtane eller ferjene, '),
|
|
208
208
|
externalLink: (0, commons_1.translation)('finner du informasjon om hvem du kan ta kontakt med her.', 'you can find information about whom to contact here.', 'finn du informasjon om kven du kan ta kontakt med her.'),
|
|
209
|
-
url: (0, commons_1.translation)('
|
|
209
|
+
url: (0, commons_1.translation)('', '', ''),
|
|
210
210
|
},
|
|
211
211
|
},
|
|
212
212
|
ticketing: {
|
|
213
213
|
title: (0, commons_1.translation)('Billetter og app', 'Tickets and app', 'Billettar og app'),
|
|
214
214
|
additionalTicketingInfo: {
|
|
215
|
-
detail: (0, commons_1.translation)('For informasjon om betaling på
|
|
216
|
-
linkText: (0, commons_1.translation)('betaling for
|
|
217
|
-
href: (0, commons_1.translation)('
|
|
215
|
+
detail: (0, commons_1.translation)('For informasjon om betaling på ferge, se', 'For information on payment on the ferry, see', 'For informasjon om betaling på ferje, sjå'),
|
|
216
|
+
linkText: (0, commons_1.translation)('betaling for ferge', 'payment on the ferry', 'betaling for ferje'),
|
|
217
|
+
href: (0, commons_1.translation)('', '', ''),
|
|
218
218
|
},
|
|
219
219
|
priceAndTicketTypes: {
|
|
220
220
|
description: (0, commons_1.translation)('Priser og billettyper', 'Prices and ticket types', 'Prisar og billettypar'),
|
|
@@ -249,12 +249,12 @@ exports.Contact = {
|
|
|
249
249
|
label: (0, commons_1.translation)('Bestill reisekort', 'Order travel card', 'Bestill reisekort'),
|
|
250
250
|
detailsList: [
|
|
251
251
|
(0, commons_1.translation)('Et reisekort er et fysisk plastkort. På reisekortet kan du legge periodebilletter.', 'A travel card is a physical plastic card. You can add period tickets to the travel card', 'Eit reisekort er eit fysisk plastkort. På reisekortet kan du legge periodebillettar.'),
|
|
252
|
-
(0, commons_1.translation)('Reisekort får du tak i hos sjåføren om bord i bussen, eller matrosen om bord i hurtigbåten.
|
|
252
|
+
(0, commons_1.translation)('Reisekort får du tak i hos sjåføren om bord i bussen, eller matrosen om bord i hurtigbåten.', 'Travel cards can be provided by the bus driver, or the sailor on board the express boat.', 'Reisekort får du tak i hos sjåføren om bord i bussen, eller matrosen om bord i hurtigbåten.'),
|
|
253
253
|
],
|
|
254
254
|
detailWithUrl: {
|
|
255
255
|
detail: (0, commons_1.translation)('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', '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', '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'),
|
|
256
256
|
linkText: (0, commons_1.translation)('nettbutikken', 'webshop', 'nettbutikken'),
|
|
257
|
-
href: (0, commons_1.translation)('
|
|
257
|
+
href: (0, commons_1.translation)('', '', ''),
|
|
258
258
|
},
|
|
259
259
|
},
|
|
260
260
|
travelCardQuestion: {
|
|
@@ -341,7 +341,7 @@ exports.Contact = {
|
|
|
341
341
|
description: {
|
|
342
342
|
info: (0, commons_1.translation)('Vi har gjort endring i praksisen for hvordan vi håndterer gruppebestillinger.', 'We have made changes to the practice for how we handle group bookings.', 'Vi har gjort endringar i praksisen for korleis vi handterer gruppebestillingar.'),
|
|
343
343
|
externalLink: (0, commons_1.translation)('Les mer om gruppereise her', 'Read more about group travel here', 'Les meir om gruppereise her'),
|
|
344
|
-
url: (0, commons_1.translation)('
|
|
344
|
+
url: (0, commons_1.translation)('', '', ''),
|
|
345
345
|
},
|
|
346
346
|
},
|
|
347
347
|
aboutYouInfo: {
|
|
@@ -436,9 +436,9 @@ exports.Contact = {
|
|
|
436
436
|
optionLabel: (0, commons_1.translation)('Velg app eller nettbutikk billetten ble kjøpt i', 'Select the app or webshop where the ticket was purchased', 'Vel app eller nettbutikk der billetten vart kjøpt'),
|
|
437
437
|
platforms: {
|
|
438
438
|
enturApp: (0, commons_1.translation)('Entur-appen', 'Entur app', 'Entur-appen'),
|
|
439
|
-
framApp: (0, commons_1.translation)('
|
|
439
|
+
framApp: (0, commons_1.translation)('App', 'App', 'App'),
|
|
440
440
|
enturWeb: (0, commons_1.translation)('Entur nettbutikk', 'Entur webshop', 'Entur nettbutikk'),
|
|
441
|
-
framWeb: (0, commons_1.translation)('
|
|
441
|
+
framWeb: (0, commons_1.translation)('Nettbutikk', 'Webshop', 'Nettbutikk'),
|
|
442
442
|
},
|
|
443
443
|
errorMessages: {
|
|
444
444
|
empty: (0, commons_1.translation)('Velg app eller nettbutikk', 'Select app or webshop', 'Vel app eller nettbutikk'),
|
|
@@ -582,7 +582,7 @@ exports.Contact = {
|
|
|
582
582
|
customerNumber: {
|
|
583
583
|
label: (0, commons_1.translation)('Kundenummer', 'Customer number', 'Kundenummer'),
|
|
584
584
|
labelOptional: (0, commons_1.translation)('Kundenummer - (valgfritt)', 'Customer number - (optional)', 'Kundenummer - (valfritt)'),
|
|
585
|
-
description: (0, commons_1.translation)('Kundenummeret består av 7 siffer og du finner det under Min bruker i
|
|
585
|
+
description: (0, commons_1.translation)('Kundenummeret består av 7 siffer og du finner det under Min bruker i appen, eller i nettbutikken.', 'The customer number consists of 7 digits and can be found under My user in the app, or in the webshop', 'Kundenummeret består av 7 siffer og du finn det under Min bruker i appen, eller i nettbutikken.'),
|
|
586
586
|
errorMessages: {
|
|
587
587
|
empty: (0, commons_1.translation)('Fyll inn kundenummer', 'Enter customer number', 'Fyll inn kundenummer'),
|
|
588
588
|
invalidFormat: (0, commons_1.translation)('Ugyldig kundenummer. Skriv inn et gyldig kundenummer med 7 eller 8 siffer.', 'Invalid customer number. Please enter a valid 7 or 8-digit number.', 'Ugyldig kundenummer. Skriv inn eit gyldig kundenummer med 7 eller 8 siffer.'),
|
|
@@ -662,22 +662,6 @@ exports.Contact = {
|
|
|
662
662
|
id: types_1.TicketTypeId.PeriodTicket,
|
|
663
663
|
name: (0, commons_1.translation)('Periodebillett (sonebasert)', 'Period ticket (zone-based)', 'Periodebillett (sonebasert)'),
|
|
664
664
|
},
|
|
665
|
-
{
|
|
666
|
-
id: types_1.TicketTypeId.FramYoung,
|
|
667
|
-
name: (0, commons_1.translation)('FRAM Ung', 'FRAM Ung', 'FRAM Ung'),
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
id: types_1.TicketTypeId.FramStudent,
|
|
671
|
-
name: (0, commons_1.translation)('FRAM Student', 'FRAM Student', 'FRAM Student'),
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
id: types_1.TicketTypeId.FramAdult,
|
|
675
|
-
name: (0, commons_1.translation)('FRAM Vaksen', 'FRAM Vaksen', 'FRAM Vaksen'),
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
id: types_1.TicketTypeId.FramSenior,
|
|
679
|
-
name: (0, commons_1.translation)('FRAM Honnør', 'FRAM Honnør', 'FRAM Honnør'),
|
|
680
|
-
},
|
|
681
665
|
],
|
|
682
666
|
errorMessages: {
|
|
683
667
|
empty: (0, commons_1.translation)('Billett for refusjon mangler', 'Ticket for refund is missing', 'Billett for refusjon manglar'),
|
package/lib/types.d.ts
CHANGED
|
@@ -6,11 +6,7 @@ export type ReasonForTransportFailure = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare enum TicketTypeId {
|
|
8
8
|
SingleTicket = "singleTicket",
|
|
9
|
-
PeriodTicket = "periodTicket"
|
|
10
|
-
FramYoung = "framYoung",
|
|
11
|
-
FramStudent = "framStudent",
|
|
12
|
-
FramAdult = "framAdult",
|
|
13
|
-
FramSenior = "framSenior"
|
|
9
|
+
PeriodTicket = "periodTicket"
|
|
14
10
|
}
|
|
15
11
|
export type TicketType = {
|
|
16
12
|
id: TicketTypeId;
|
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,aAAa,GAAG,OAAO,GAAG,sBAAsB,CAAC;AAC3D,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;
|
|
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,aAAa,GAAG,OAAO,GAAG,sBAAsB,CAAC;AAC3D,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,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,oBAAoB,GAC9B,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC"}
|
package/lib/types.js
CHANGED
|
@@ -5,8 +5,4 @@ var TicketTypeId;
|
|
|
5
5
|
(function (TicketTypeId) {
|
|
6
6
|
TicketTypeId["SingleTicket"] = "singleTicket";
|
|
7
7
|
TicketTypeId["PeriodTicket"] = "periodTicket";
|
|
8
|
-
TicketTypeId["FramYoung"] = "framYoung";
|
|
9
|
-
TicketTypeId["FramStudent"] = "framStudent";
|
|
10
|
-
TicketTypeId["FramAdult"] = "framAdult";
|
|
11
|
-
TicketTypeId["FramSenior"] = "framSenior";
|
|
12
8
|
})(TicketTypeId || (exports.TicketTypeId = TicketTypeId = {}));
|
package/lib/utils.d.ts
CHANGED
|
@@ -15,4 +15,6 @@ export declare const findOrderFormFields: (e: FormEvent<HTMLFormElement>) => str
|
|
|
15
15
|
export declare const scrollToFirstErrorMessage: (id: string | undefined) => void;
|
|
16
16
|
export declare const findFirstErrorMessage: (formFields: string[] | undefined, errors: InputErrorMessages) => string | undefined;
|
|
17
17
|
export declare function getLineName(line: Line | undefined): string | undefined;
|
|
18
|
+
export declare function warnDev(message: string): void;
|
|
19
|
+
export declare function warnDevMissingTranslation(key: string): void;
|
|
18
20
|
//# sourceMappingURL=utils.d.ts.map
|
package/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAY,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,eAAO,MAAM,mBAAmB,GAC9B,WAAW,gBAAgB,KAC1B,gBAAgB,EAIlB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,aAAa,IAAI,EAAE,KAClB,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CAsB9C,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAC/C,SAAS,GAAG,EACZ,cAAc,iBAAiB,QAqBhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,SAAS,GAAG,EAAE,MAAM,IAAI,GAAG,SAAS,QAkBxE,CAAC;AAEF,eAAO,MAAM,2CAA2C,GACtD,SAAS,GAAG,EACZ,6BAA6B,OAAO,QAUr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,CAAC,eAAe,CAAC,KAAG,MAAM,EAOpC,CAAC;AAEvC,eAAO,MAAM,yBAAyB,GAAI,IAAI,MAAM,GAAG,SAAS,KAAG,IA4BlE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,YAAY,MAAM,EAAE,GAAG,SAAS,EAChC,QAAQ,kBAAkB,KACzB,MAAM,GAAG,SAQX,CAAC;AAEF,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEtE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI7C;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI3D"}
|
package/lib/utils.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findFirstErrorMessage = exports.scrollToFirstErrorMessage = exports.findOrderFormFields = exports.setBankAccountStatusAndResetBankInformation = exports.setLineAndResetStops = exports.setTransportModeAndResetLineAndStops = exports.convertFilesToBase64 = exports.getContactPageTitle = void 0;
|
|
4
4
|
exports.getLineName = getLineName;
|
|
5
|
+
exports.warnDev = warnDev;
|
|
6
|
+
exports.warnDevMissingTranslation = warnDevMissingTranslation;
|
|
5
7
|
const translations_1 = require("./translations");
|
|
6
8
|
const getContactPageTitle = (subtitle) => {
|
|
7
9
|
return subtitle
|
|
@@ -130,3 +132,11 @@ exports.findFirstErrorMessage = findFirstErrorMessage;
|
|
|
130
132
|
function getLineName(line) {
|
|
131
133
|
return line ? `${line.publicCode} - ${line.name}` : undefined;
|
|
132
134
|
}
|
|
135
|
+
function warnDev(message) {
|
|
136
|
+
if (process.env.NODE_ENV === 'development') {
|
|
137
|
+
console.warn(message);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function warnDevMissingTranslation(key) {
|
|
141
|
+
warnDev(`${key} is empty - provide it via translations overrides for this org.`);
|
|
142
|
+
}
|
|
@@ -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,kBA0C7B,CAAC"}
|
|
@@ -402,6 +402,7 @@ exports.validationRules = {
|
|
|
402
402
|
ticketType: rulesTicketType,
|
|
403
403
|
purchasePlatform: rulesAPurchasePlatform,
|
|
404
404
|
attachments: rulesAttachments,
|
|
405
|
+
receiptAttachments: rulesAttachments,
|
|
405
406
|
appPhoneNumber: rulesAppPhoneNumber,
|
|
406
407
|
customerNumber: rulesCustomerNumber,
|
|
407
408
|
travelCardNumber: rulesTravelCardNumber,
|