@mrfylke/contact-form 0.1.11 → 0.1.21
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 +393 -2
- package/lib/commoneEvents.d.ts +1 -1
- package/lib/commoneEvents.d.ts.map +1 -1
- package/lib/components/form/date-selector.d.ts.map +1 -1
- package/lib/components/form/date-selector.js +5 -4
- package/lib/components/form/departure-time-field.d.ts +16 -0
- package/lib/components/form/departure-time-field.d.ts.map +1 -0
- package/lib/components/form/departure-time-field.js +28 -0
- package/lib/components/form/description-modal.d.ts.map +1 -1
- package/lib/components/form/description-modal.js +2 -1
- package/lib/components/form/file-input.d.ts.map +1 -1
- package/lib/components/form/file-input.js +2 -1
- package/lib/components/form/index.d.ts +1 -0
- package/lib/components/form/index.d.ts.map +1 -1
- package/lib/components/form/index.js +3 -1
- package/lib/components/form/input.d.ts.map +1 -1
- package/lib/components/form/input.js +2 -1
- package/lib/components/form/searchable-select/utils.js +6 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +2 -1
- package/lib/contact.module.css +9 -0
- package/lib/error-content/error-content.d.ts.map +1 -1
- package/lib/error-content/error-content.js +2 -1
- package/lib/group-travel/index.d.ts.map +1 -1
- package/lib/group-travel/index.js +3 -1
- package/lib/index.d.ts +16 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +41 -1
- package/lib/journey-info/index.d.ts.map +1 -1
- package/lib/journey-info/index.js +13 -7
- package/lib/journey-info/journeyInfoStateMachine.d.ts +8 -8
- package/lib/layouts/contact-page-layout.d.ts +2 -2
- package/lib/layouts/contact-page-layout.d.ts.map +1 -1
- package/lib/layouts/contact-page-layout.js +19 -16
- package/lib/layouts/container.module.css +1 -1
- package/lib/layouts/layout.module.css +23 -2
- package/lib/lines/use-departures.d.ts +12 -0
- package/lib/lines/use-departures.d.ts.map +1 -0
- package/lib/lines/use-departures.js +35 -0
- package/lib/lines/use-lines.d.ts +4 -3
- package/lib/lines/use-lines.d.ts.map +1 -1
- package/lib/lines/use-lines.js +43 -10
- package/lib/lost-property/LostPropertyForm.d.ts +10 -0
- package/lib/lost-property/LostPropertyForm.d.ts.map +1 -0
- package/lib/lost-property/LostPropertyForm.js +65 -0
- package/lib/lost-property/LostPropertyMachine.d.ts +116 -0
- package/lib/lost-property/LostPropertyMachine.d.ts.map +1 -0
- package/lib/lost-property/LostPropertyMachine.js +187 -0
- package/lib/lost-property/index.d.ts.map +1 -1
- package/lib/lost-property/index.js +27 -3
- package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/delayForm.js +26 -18
- package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/driverForm.js +26 -18
- package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/injuryForm.js +26 -18
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/serviceOfferingForm.js +10 -9
- package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/stopForm.js +13 -12
- package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/transportationForm.js +26 -18
- package/lib/means-of-transport/index.d.ts.map +1 -1
- package/lib/means-of-transport/index.js +13 -4
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +10 -8
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -1
- package/lib/means-of-transport/means-of-transport-form-machine.js +6 -0
- package/lib/modules/config/types.d.ts +48 -1
- 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 +15 -8
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.js +15 -8
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +46 -11
- package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/index.js +8 -7
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +53 -19
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
- package/lib/refund/forms/residualValueOnTravelCard/index.js +5 -3
- package/lib/refund/index.d.ts.map +1 -1
- package/lib/refund/index.js +39 -6
- package/lib/refund/refundFormMachine.d.ts +37 -13
- package/lib/refund/refundFormMachine.d.ts.map +1 -1
- package/lib/refund/refundFormMachine.js +96 -3
- package/lib/server/journey-planner/index.d.ts.map +1 -1
- package/lib/server/journey-planner/index.js +15 -6
- package/lib/server/journey-planner/validators.d.ts +2 -0
- package/lib/server/journey-planner/validators.d.ts.map +1 -1
- package/lib/server/journey-planner/validators.js +1 -0
- package/lib/success-content/success-content.d.ts.map +1 -1
- package/lib/success-content/success-content.js +2 -1
- package/lib/ticket-control/events.d.ts +1 -1
- package/lib/ticket-control/events.d.ts.map +1 -1
- package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -1
- package/lib/ticket-control/forms/feeComplaintForm.js +28 -25
- package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -1
- package/lib/ticket-control/forms/feedbackForm.js +22 -14
- package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -1
- package/lib/ticket-control/forms/postponePayment.js +8 -7
- package/lib/ticket-control/index.d.ts.map +1 -1
- package/lib/ticket-control/index.js +15 -6
- package/lib/ticket-control/ticket-control-form-machine.d.ts +14 -10
- package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -1
- package/lib/ticket-control/ticket-control-form-machine.js +17 -2
- package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appAccountForm.js +9 -8
- package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appTicketingForm.js +13 -12
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appTravelSuggestionForm.js +6 -5
- package/lib/ticketing/forms/app/index.d.ts.map +1 -1
- package/lib/ticketing/forms/app/index.js +2 -1
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -1
- package/lib/ticketing/forms/priceAndTicketTypesForm.js +6 -5
- package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/index.js +2 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +2 -2
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.js +9 -8
- package/lib/ticketing/forms/webshop/index.d.ts.map +1 -1
- package/lib/ticketing/forms/webshop/index.js +2 -1
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -1
- package/lib/ticketing/forms/webshop/webshopAccountForm.js +9 -8
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -1
- package/lib/ticketing/forms/webshop/webshopTicketingForm.js +12 -11
- package/lib/ticketing/index.d.ts.map +1 -1
- package/lib/ticketing/index.js +21 -6
- package/lib/ticketing/ticketingStateMachine.d.ts +12 -12
- package/lib/translations/index.d.ts +1 -1
- package/lib/translations/index.d.ts.map +1 -1
- package/lib/translations/index.js +2 -1
- package/lib/translations/pages/contact.d.ts +46 -0
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +50 -2
- package/lib/translations/translations-context.d.ts +2 -0
- package/lib/translations/translations-context.d.ts.map +1 -1
- package/lib/translations/translations-context.js +39 -0
- package/lib/types/submit-payloads.d.ts +19 -0
- package/lib/types/submit-payloads.d.ts.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/url-form-type.d.ts +6 -0
- package/lib/url-form-type.d.ts.map +1 -0
- package/lib/url-form-type.js +21 -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 +7 -0
- package/package.json +1 -2
|
@@ -5,7 +5,8 @@ import type { FormSchemaName } from '../modules/config/types';
|
|
|
5
5
|
export declare enum FormCategory {
|
|
6
6
|
RefundOfTicket = "refundOfTicket",
|
|
7
7
|
RefundAndTravelGuarantee = "refundAndTravelGuarantee",
|
|
8
|
-
ResidualValueOnTravelCard = "residualValueOnTravelCard"
|
|
8
|
+
ResidualValueOnTravelCard = "residualValueOnTravelCard",
|
|
9
|
+
TicketBoughtOnBus = "ticketBoughtOnBus"
|
|
9
10
|
}
|
|
10
11
|
export declare enum RefundTicketForm {
|
|
11
12
|
AppTicketRefund = "appTicketRefund",
|
|
@@ -20,7 +21,10 @@ export declare enum FormType {
|
|
|
20
21
|
RefundCar = "refundCar",
|
|
21
22
|
AppTicketRefund = "appTicketRefund",
|
|
22
23
|
OtherTicketRefund = "otherTicketRefund",
|
|
23
|
-
ResidualValueOnTravelCard = "residualValueOnTravelCard"
|
|
24
|
+
ResidualValueOnTravelCard = "residualValueOnTravelCard",
|
|
25
|
+
TicketBoughtOnBus = "ticketBoughtOnBus",
|
|
26
|
+
TravelMoneyRefund = "travelMoneyRefund",
|
|
27
|
+
WebshopTicketRefund = "webshopTicketRefund"
|
|
24
28
|
}
|
|
25
29
|
type SubmitInput = {
|
|
26
30
|
firstName?: string;
|
|
@@ -41,6 +45,7 @@ type SubmitInput = {
|
|
|
41
45
|
toStop?: string;
|
|
42
46
|
date?: string;
|
|
43
47
|
plannedDepartureTime?: string;
|
|
48
|
+
tripId?: string;
|
|
44
49
|
kilometersDriven?: string;
|
|
45
50
|
fromAddress?: string;
|
|
46
51
|
toAddress?: string;
|
|
@@ -52,6 +57,7 @@ type SubmitInput = {
|
|
|
52
57
|
travelCardNumber?: string;
|
|
53
58
|
refundReason?: string;
|
|
54
59
|
purchasePlatform?: string;
|
|
60
|
+
bankCardDetails?: string;
|
|
55
61
|
};
|
|
56
62
|
export type RefundContextProps = {
|
|
57
63
|
formType?: FormType;
|
|
@@ -73,6 +79,7 @@ export type RefundContextProps = {
|
|
|
73
79
|
toStop?: Line['quays'][0] | undefined;
|
|
74
80
|
date?: string;
|
|
75
81
|
plannedDepartureTime?: string;
|
|
82
|
+
tripId?: string;
|
|
76
83
|
kilometersDriven?: string;
|
|
77
84
|
fromAddress?: string;
|
|
78
85
|
toAddress?: string;
|
|
@@ -84,8 +91,11 @@ export type RefundContextProps = {
|
|
|
84
91
|
travelCardNumber?: string;
|
|
85
92
|
refundReason?: string;
|
|
86
93
|
purchasePlatform?: PurchasePlatformType | undefined;
|
|
94
|
+
bankCardDetails?: string;
|
|
87
95
|
isInitialAgreementChecked: boolean;
|
|
88
96
|
hasInternationalBankAccount: boolean;
|
|
97
|
+
includeOtherTicketTypeSelector: boolean;
|
|
98
|
+
includeRefundDepartureInfo: boolean;
|
|
89
99
|
errorMessages: InputErrorMessages;
|
|
90
100
|
firstIncorrectErrorMessage?: string;
|
|
91
101
|
hasSubmissionError?: boolean;
|
|
@@ -93,10 +103,12 @@ export type RefundContextProps = {
|
|
|
93
103
|
export type MachinePaths = {
|
|
94
104
|
successPath: string;
|
|
95
105
|
errorPath: string;
|
|
106
|
+
includeOtherTicketTypeSelector?: boolean;
|
|
107
|
+
includeRefundDepartureInfo?: boolean;
|
|
96
108
|
};
|
|
97
|
-
export declare function createRefundStateMachine(onSubmit: (schemaName: FormSchemaName, state: Record<string, unknown>) => Promise<Response>, paths?: MachinePaths): import("xstate").StateMachine<RefundContextProps, {
|
|
109
|
+
export declare function createRefundStateMachine(onSubmit: (schemaName: FormSchemaName, state: Record<string, unknown>) => Promise<Response>, paths?: Partial<MachinePaths>): import("xstate").StateMachine<RefundContextProps, {
|
|
98
110
|
type: "ON_INPUT_CHANGE";
|
|
99
|
-
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" | "feedback" | "attachments" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber";
|
|
111
|
+
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";
|
|
100
112
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line["quays"][0] | File[] | undefined;
|
|
101
113
|
} | {
|
|
102
114
|
type: "SELECT_FORM_CATEGORY";
|
|
@@ -126,6 +138,9 @@ export declare function createRefundStateMachine(onSubmit: (schemaName: FormSche
|
|
|
126
138
|
logic: import("xstate").PromiseActorLogic<true, SubmitInput, import("xstate").EventObject>;
|
|
127
139
|
id: string | undefined;
|
|
128
140
|
}, {
|
|
141
|
+
type: "onInputChange";
|
|
142
|
+
params: unknown;
|
|
143
|
+
} | {
|
|
129
144
|
type: "navigateToErrorPage";
|
|
130
145
|
params: unknown;
|
|
131
146
|
} | {
|
|
@@ -152,9 +167,6 @@ export declare function createRefundStateMachine(onSubmit: (schemaName: FormSche
|
|
|
152
167
|
} | {
|
|
153
168
|
type: "clearSubmissionError";
|
|
154
169
|
params: unknown;
|
|
155
|
-
} | {
|
|
156
|
-
type: "onInputChange";
|
|
157
|
-
params: unknown;
|
|
158
170
|
} | {
|
|
159
171
|
type: "onTransportModeChange";
|
|
160
172
|
params: unknown;
|
|
@@ -176,6 +188,9 @@ export declare function createRefundStateMachine(onSubmit: (schemaName: FormSche
|
|
|
176
188
|
} | {
|
|
177
189
|
type: "isResidualValueOnTravelCard";
|
|
178
190
|
params: unknown;
|
|
191
|
+
} | {
|
|
192
|
+
type: "isTicketBoughtOnBus";
|
|
193
|
+
params: unknown;
|
|
179
194
|
} | {
|
|
180
195
|
type: "isAppTicketRefund";
|
|
181
196
|
params: unknown;
|
|
@@ -189,7 +204,7 @@ export declare function createRefundStateMachine(onSubmit: (schemaName: FormSche
|
|
|
189
204
|
type: "isRefundTaxi";
|
|
190
205
|
params: unknown;
|
|
191
206
|
}, never, "success" | "formCategoryHandler" | "refundTicketFormHandler" | "refundAndTravelGuaranteeFormHandler" | "validating" | "submitting" | {
|
|
192
|
-
editing: "residualValueOnTravelCard" | "selectFormCategory" | {
|
|
207
|
+
editing: "ticketBoughtOnBus" | "residualValueOnTravelCard" | "selectFormCategory" | {
|
|
193
208
|
refundOfTicket: "appTicketRefund" | "otherTicketRefund" | "selectRefundOfTicketForm";
|
|
194
209
|
} | {
|
|
195
210
|
refundAndTravelGuarantee: "refundTaxi" | "refundCar" | "selectRefundAndTravelGuaranteeForm";
|
|
@@ -236,6 +251,9 @@ export declare function createRefundStateMachine(onSubmit: (schemaName: FormSche
|
|
|
236
251
|
readonly residualValueOnTravelCard: {
|
|
237
252
|
id: "residualValueOnTravelCard";
|
|
238
253
|
};
|
|
254
|
+
readonly ticketBoughtOnBus: {
|
|
255
|
+
id: "ticketBoughtOnBus";
|
|
256
|
+
};
|
|
239
257
|
readonly history: {};
|
|
240
258
|
};
|
|
241
259
|
};
|
|
@@ -250,7 +268,7 @@ export declare function createRefundStateMachine(onSubmit: (schemaName: FormSche
|
|
|
250
268
|
}>;
|
|
251
269
|
export declare const refundStateMachine: import("xstate").StateMachine<RefundContextProps, {
|
|
252
270
|
type: "ON_INPUT_CHANGE";
|
|
253
|
-
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" | "feedback" | "attachments" | "isInitialAgreementChecked" | "hasInternationalBankAccount" | "showInputTravelCardNumber";
|
|
271
|
+
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";
|
|
254
272
|
value: string | boolean | ReasonForTransportFailure | TicketType | Line["quays"][0] | File[] | undefined;
|
|
255
273
|
} | {
|
|
256
274
|
type: "SELECT_FORM_CATEGORY";
|
|
@@ -280,6 +298,9 @@ export declare const refundStateMachine: import("xstate").StateMachine<RefundCon
|
|
|
280
298
|
logic: import("xstate").PromiseActorLogic<true, SubmitInput, import("xstate").EventObject>;
|
|
281
299
|
id: string | undefined;
|
|
282
300
|
}, {
|
|
301
|
+
type: "onInputChange";
|
|
302
|
+
params: unknown;
|
|
303
|
+
} | {
|
|
283
304
|
type: "navigateToErrorPage";
|
|
284
305
|
params: unknown;
|
|
285
306
|
} | {
|
|
@@ -306,9 +327,6 @@ export declare const refundStateMachine: import("xstate").StateMachine<RefundCon
|
|
|
306
327
|
} | {
|
|
307
328
|
type: "clearSubmissionError";
|
|
308
329
|
params: unknown;
|
|
309
|
-
} | {
|
|
310
|
-
type: "onInputChange";
|
|
311
|
-
params: unknown;
|
|
312
330
|
} | {
|
|
313
331
|
type: "onTransportModeChange";
|
|
314
332
|
params: unknown;
|
|
@@ -330,6 +348,9 @@ export declare const refundStateMachine: import("xstate").StateMachine<RefundCon
|
|
|
330
348
|
} | {
|
|
331
349
|
type: "isResidualValueOnTravelCard";
|
|
332
350
|
params: unknown;
|
|
351
|
+
} | {
|
|
352
|
+
type: "isTicketBoughtOnBus";
|
|
353
|
+
params: unknown;
|
|
333
354
|
} | {
|
|
334
355
|
type: "isAppTicketRefund";
|
|
335
356
|
params: unknown;
|
|
@@ -343,7 +364,7 @@ export declare const refundStateMachine: import("xstate").StateMachine<RefundCon
|
|
|
343
364
|
type: "isRefundTaxi";
|
|
344
365
|
params: unknown;
|
|
345
366
|
}, never, "success" | "formCategoryHandler" | "refundTicketFormHandler" | "refundAndTravelGuaranteeFormHandler" | "validating" | "submitting" | {
|
|
346
|
-
editing: "residualValueOnTravelCard" | "selectFormCategory" | {
|
|
367
|
+
editing: "ticketBoughtOnBus" | "residualValueOnTravelCard" | "selectFormCategory" | {
|
|
347
368
|
refundOfTicket: "appTicketRefund" | "otherTicketRefund" | "selectRefundOfTicketForm";
|
|
348
369
|
} | {
|
|
349
370
|
refundAndTravelGuarantee: "refundTaxi" | "refundCar" | "selectRefundAndTravelGuaranteeForm";
|
|
@@ -390,6 +411,9 @@ export declare const refundStateMachine: import("xstate").StateMachine<RefundCon
|
|
|
390
411
|
readonly residualValueOnTravelCard: {
|
|
391
412
|
id: "residualValueOnTravelCard";
|
|
392
413
|
};
|
|
414
|
+
readonly ticketBoughtOnBus: {
|
|
415
|
+
id: "ticketBoughtOnBus";
|
|
416
|
+
};
|
|
393
417
|
readonly history: {};
|
|
394
418
|
};
|
|
395
419
|
};
|
|
@@ -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,EACX,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAWzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,oBAAY,YAAY;IACtB,cAAc,mBAAmB;IACjC,wBAAwB,6BAA6B;IACrD,yBAAyB,8BAA8B;
|
|
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,EACX,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAwB,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAWzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,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,sB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
|
|
|
11
11
|
FormCategory["RefundOfTicket"] = "refundOfTicket";
|
|
12
12
|
FormCategory["RefundAndTravelGuarantee"] = "refundAndTravelGuarantee";
|
|
13
13
|
FormCategory["ResidualValueOnTravelCard"] = "residualValueOnTravelCard";
|
|
14
|
+
FormCategory["TicketBoughtOnBus"] = "ticketBoughtOnBus";
|
|
14
15
|
})(FormCategory || (exports.FormCategory = FormCategory = {}));
|
|
15
16
|
var RefundTicketForm;
|
|
16
17
|
(function (RefundTicketForm) {
|
|
@@ -29,6 +30,9 @@ var FormType;
|
|
|
29
30
|
FormType["AppTicketRefund"] = "appTicketRefund";
|
|
30
31
|
FormType["OtherTicketRefund"] = "otherTicketRefund";
|
|
31
32
|
FormType["ResidualValueOnTravelCard"] = "residualValueOnTravelCard";
|
|
33
|
+
FormType["TicketBoughtOnBus"] = "ticketBoughtOnBus";
|
|
34
|
+
FormType["TravelMoneyRefund"] = "travelMoneyRefund";
|
|
35
|
+
FormType["WebshopTicketRefund"] = "webshopTicketRefund";
|
|
32
36
|
})(FormType || (exports.FormType = FormType = {}));
|
|
33
37
|
const setFormTypeAndInitialContext = (context, formType) => {
|
|
34
38
|
return { ...context, formType: formType, errorMessages: {} };
|
|
@@ -42,7 +46,7 @@ const setInitialAgreementAndFormType = (context, isChecked) => {
|
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
48
|
const setInputToValidate = (context) => {
|
|
45
|
-
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,
|
|
49
|
+
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, } = context;
|
|
46
50
|
const commonFields = {
|
|
47
51
|
formType,
|
|
48
52
|
transportMode,
|
|
@@ -78,13 +82,22 @@ const setInputToValidate = (context) => {
|
|
|
78
82
|
city,
|
|
79
83
|
email,
|
|
80
84
|
phoneNumber,
|
|
85
|
+
...(includeRefundDepartureInfo
|
|
86
|
+
? {
|
|
87
|
+
transportMode,
|
|
88
|
+
line,
|
|
89
|
+
fromStop,
|
|
90
|
+
toStop,
|
|
91
|
+
date,
|
|
92
|
+
plannedDepartureTime,
|
|
93
|
+
}
|
|
94
|
+
: {}),
|
|
81
95
|
};
|
|
82
96
|
case FormType.OtherTicketRefund:
|
|
83
97
|
return {
|
|
84
98
|
formType,
|
|
85
|
-
ticketType,
|
|
99
|
+
...(includeOtherTicketTypeSelector ? { ticketType } : {}),
|
|
86
100
|
refundReason,
|
|
87
|
-
travelCardNumber,
|
|
88
101
|
firstName,
|
|
89
102
|
lastName,
|
|
90
103
|
address,
|
|
@@ -96,12 +109,68 @@ const setInputToValidate = (context) => {
|
|
|
96
109
|
...(hasInternationalBankAccount
|
|
97
110
|
? { IBAN, SWIFT }
|
|
98
111
|
: { bankAccountNumber }),
|
|
112
|
+
...(includeRefundDepartureInfo
|
|
113
|
+
? {
|
|
114
|
+
transportMode,
|
|
115
|
+
line,
|
|
116
|
+
fromStop,
|
|
117
|
+
toStop,
|
|
118
|
+
date,
|
|
119
|
+
plannedDepartureTime,
|
|
120
|
+
}
|
|
121
|
+
: {}),
|
|
122
|
+
};
|
|
123
|
+
case FormType.TicketBoughtOnBus:
|
|
124
|
+
return {
|
|
125
|
+
formType,
|
|
126
|
+
transportMode,
|
|
127
|
+
line,
|
|
128
|
+
fromStop,
|
|
129
|
+
toStop,
|
|
130
|
+
date,
|
|
131
|
+
plannedDepartureTime,
|
|
132
|
+
bankCardDetails: context.bankCardDetails,
|
|
133
|
+
refundReason,
|
|
134
|
+
firstName,
|
|
135
|
+
lastName,
|
|
136
|
+
email,
|
|
137
|
+
};
|
|
138
|
+
case FormType.TravelMoneyRefund:
|
|
139
|
+
return {
|
|
140
|
+
formType,
|
|
141
|
+
travelCardNumber: context.travelCardNumber,
|
|
142
|
+
refundReason,
|
|
143
|
+
firstName,
|
|
144
|
+
lastName,
|
|
145
|
+
address,
|
|
146
|
+
postalCode,
|
|
147
|
+
city,
|
|
148
|
+
email,
|
|
149
|
+
phoneNumber,
|
|
150
|
+
...(hasInternationalBankAccount
|
|
151
|
+
? { IBAN, SWIFT }
|
|
152
|
+
: { bankAccountNumber }),
|
|
153
|
+
};
|
|
154
|
+
case FormType.WebshopTicketRefund:
|
|
155
|
+
return {
|
|
156
|
+
formType,
|
|
157
|
+
travelCardNumber: context.travelCardNumber,
|
|
158
|
+
refundReason,
|
|
159
|
+
firstName,
|
|
160
|
+
lastName,
|
|
161
|
+
address,
|
|
162
|
+
postalCode,
|
|
163
|
+
city,
|
|
164
|
+
email,
|
|
165
|
+
phoneNumber,
|
|
99
166
|
};
|
|
100
167
|
}
|
|
101
168
|
};
|
|
102
169
|
function createRefundStateMachine(onSubmit, paths) {
|
|
103
170
|
const successPath = paths?.successPath ?? '/contact/success';
|
|
104
171
|
const errorPath = paths?.errorPath ?? '/contact/error';
|
|
172
|
+
const includeOtherTicketTypeSelector = paths?.includeOtherTicketTypeSelector !== false;
|
|
173
|
+
const includeRefundDepartureInfo = paths?.includeRefundDepartureInfo === true;
|
|
105
174
|
return (0, xstate_1.setup)({
|
|
106
175
|
types: { context: {}, events: events_1.RefundFormEvents },
|
|
107
176
|
guards: {
|
|
@@ -116,6 +185,8 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
116
185
|
event.formCategory === FormCategory.RefundAndTravelGuarantee,
|
|
117
186
|
isResidualValueOnTravelCard: ({ event }) => event.type === 'SELECT_FORM_CATEGORY' &&
|
|
118
187
|
event.formCategory === FormCategory.ResidualValueOnTravelCard,
|
|
188
|
+
isTicketBoughtOnBus: ({ event }) => event.type === 'SELECT_FORM_CATEGORY' &&
|
|
189
|
+
event.formCategory === FormCategory.TicketBoughtOnBus,
|
|
119
190
|
isAppTicketRefund: ({ event }) => event.type === 'SELECT_REFUND_TICKET_FORM' &&
|
|
120
191
|
event.refundTicketForm === RefundTicketForm.AppTicketRefund,
|
|
121
192
|
isOtherTicketRefund: ({ event }) => event.type === 'SELECT_REFUND_TICKET_FORM' &&
|
|
@@ -192,9 +263,16 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
192
263
|
};
|
|
193
264
|
}
|
|
194
265
|
context.errorMessages[inputName] = [];
|
|
266
|
+
const clearsDeparture = inputName === 'fromStop' ||
|
|
267
|
+
inputName === 'toStop' ||
|
|
268
|
+
inputName === 'date';
|
|
195
269
|
return {
|
|
196
270
|
...context,
|
|
197
271
|
[inputName]: value,
|
|
272
|
+
...(clearsDeparture && {
|
|
273
|
+
plannedDepartureTime: undefined,
|
|
274
|
+
tripId: undefined,
|
|
275
|
+
}),
|
|
198
276
|
hasSubmissionError: undefined,
|
|
199
277
|
};
|
|
200
278
|
}
|
|
@@ -239,6 +317,8 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
239
317
|
context: {
|
|
240
318
|
isInitialAgreementChecked: false,
|
|
241
319
|
hasInternationalBankAccount: false,
|
|
320
|
+
includeOtherTicketTypeSelector,
|
|
321
|
+
includeRefundDepartureInfo,
|
|
242
322
|
errorMessages: {},
|
|
243
323
|
},
|
|
244
324
|
on: {
|
|
@@ -270,6 +350,10 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
270
350
|
guard: 'isResidualValueOnTravelCard',
|
|
271
351
|
target: `#${FormCategory.ResidualValueOnTravelCard}`,
|
|
272
352
|
},
|
|
353
|
+
{
|
|
354
|
+
guard: 'isTicketBoughtOnBus',
|
|
355
|
+
target: `#${FormCategory.TicketBoughtOnBus}`,
|
|
356
|
+
},
|
|
273
357
|
],
|
|
274
358
|
},
|
|
275
359
|
refundTicketFormHandler: {
|
|
@@ -346,6 +430,13 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
346
430
|
formType: () => FormType.ResidualValueOnTravelCard,
|
|
347
431
|
}),
|
|
348
432
|
},
|
|
433
|
+
ticketBoughtOnBus: {
|
|
434
|
+
id: 'ticketBoughtOnBus',
|
|
435
|
+
entry: (0, xstate_1.assign)({
|
|
436
|
+
formType: () => FormType.TicketBoughtOnBus,
|
|
437
|
+
}),
|
|
438
|
+
exit: 'clearValidationErrors',
|
|
439
|
+
},
|
|
349
440
|
history: { type: 'history', history: 'deep' },
|
|
350
441
|
},
|
|
351
442
|
},
|
|
@@ -370,6 +461,7 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
370
461
|
toStop: context.toStop?.name,
|
|
371
462
|
date: context?.date,
|
|
372
463
|
plannedDepartureTime: context?.plannedDepartureTime,
|
|
464
|
+
tripId: context?.tripId,
|
|
373
465
|
kilometersDriven: context?.kilometersDriven,
|
|
374
466
|
fromAddress: context?.fromAddress,
|
|
375
467
|
toAddress: context?.toAddress,
|
|
@@ -393,6 +485,7 @@ function createRefundStateMachine(onSubmit, paths) {
|
|
|
393
485
|
travelCardNumber: context?.travelCardNumber,
|
|
394
486
|
refundReason: context?.refundReason,
|
|
395
487
|
purchasePlatform: context?.purchasePlatform,
|
|
488
|
+
bankCardDetails: context?.bankCardDetails,
|
|
396
489
|
}),
|
|
397
490
|
onDone: { target: 'success' },
|
|
398
491
|
onError: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/journey-planner/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAe,MAAM,cAAc,CAAC;AAgBjD;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/journey-planner/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAe,MAAM,cAAc,CAAC;AAgBjD;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA+D5E"}
|
|
@@ -36,9 +36,11 @@ async function getLines(fallbackAuthorityId) {
|
|
|
36
36
|
transportSubmode: (0, transport_mode_1.isTransportSubmodeType)(line.transportSubmode)
|
|
37
37
|
? line.transportSubmode
|
|
38
38
|
: null,
|
|
39
|
-
quays: line.quays
|
|
40
|
-
id: quay.id,
|
|
41
|
-
|
|
39
|
+
quays: line.quays
|
|
40
|
+
.map((quay) => ({ id: quay.id, name: quay.name }))
|
|
41
|
+
.sort((a, b) => a.name.localeCompare(b.name, undefined, {
|
|
42
|
+
numeric: true,
|
|
43
|
+
sensitivity: 'base',
|
|
42
44
|
})),
|
|
43
45
|
}));
|
|
44
46
|
const validated = validators_1.linesSchema.safeParse(data);
|
|
@@ -46,8 +48,12 @@ async function getLines(fallbackAuthorityId) {
|
|
|
46
48
|
throw validated.error;
|
|
47
49
|
}
|
|
48
50
|
validated.data.sort((a, b) => {
|
|
49
|
-
if (a.publicCode === null && b.publicCode === null)
|
|
50
|
-
return
|
|
51
|
+
if (a.publicCode === null && b.publicCode === null) {
|
|
52
|
+
return a.name.localeCompare(b.name, undefined, {
|
|
53
|
+
numeric: true,
|
|
54
|
+
sensitivity: 'base',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
51
57
|
if (a.publicCode === null)
|
|
52
58
|
return 1;
|
|
53
59
|
if (b.publicCode === null)
|
|
@@ -57,7 +63,10 @@ async function getLines(fallbackAuthorityId) {
|
|
|
57
63
|
if (aIsNumber && bIsNumber) {
|
|
58
64
|
return Number(a.publicCode) - Number(b.publicCode);
|
|
59
65
|
}
|
|
60
|
-
return a.publicCode.localeCompare(b.publicCode
|
|
66
|
+
return a.publicCode.localeCompare(b.publicCode, undefined, {
|
|
67
|
+
numeric: true,
|
|
68
|
+
sensitivity: 'base',
|
|
69
|
+
});
|
|
61
70
|
});
|
|
62
71
|
return validated.data;
|
|
63
72
|
}
|
|
@@ -8,6 +8,7 @@ export declare const lineSchema: z.ZodObject<{
|
|
|
8
8
|
quays: z.ZodArray<z.ZodObject<{
|
|
9
9
|
id: z.ZodString;
|
|
10
10
|
name: z.ZodString;
|
|
11
|
+
description: z.ZodNullable<z.ZodString>;
|
|
11
12
|
}, z.core.$strip>>;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
export declare const linesSchema: z.ZodArray<z.ZodObject<{
|
|
@@ -19,6 +20,7 @@ export declare const linesSchema: z.ZodArray<z.ZodObject<{
|
|
|
19
20
|
quays: z.ZodArray<z.ZodObject<{
|
|
20
21
|
id: z.ZodString;
|
|
21
22
|
name: z.ZodString;
|
|
23
|
+
description: z.ZodNullable<z.ZodString>;
|
|
22
24
|
}, z.core.$strip>>;
|
|
23
25
|
}, z.core.$strip>>;
|
|
24
26
|
export type Line = z.infer<typeof lineSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/server/journey-planner/validators.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/server/journey-planner/validators.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU;;;;;;;;;;;iBAarB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;kBAAsB,CAAC;AAE/C,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success-content.d.ts","sourceRoot":"","sources":["../../src/success-content/success-content.tsx"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"success-content.d.ts","sourceRoot":"","sources":["../../src/success-content/success-content.tsx"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,4CAoB7B"}
|
|
@@ -12,8 +12,9 @@ const icon_1 = require("../components/icon");
|
|
|
12
12
|
const typography_1 = require("../components/typography");
|
|
13
13
|
const config_1 = require("../modules/config");
|
|
14
14
|
function SuccessContent() {
|
|
15
|
+
const PageText = (0, translations_1.usePageText)();
|
|
15
16
|
const { t } = (0, translations_1.useTranslation)();
|
|
16
17
|
const { layout } = (0, config_1.useContactFormConfig)();
|
|
17
18
|
const backHref = layout?.basePath ?? '/contact';
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: success_content_module_css_1.default.container, children: [(0, jsx_runtime_1.jsx)(button_1.ButtonLink, { mode: "transparent", href: backHref, title: t(
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: success_content_module_css_1.default.container, children: [(0, jsx_runtime_1.jsx)(button_1.ButtonLink, { mode: "transparent", href: backHref, title: t(PageText.Contact.error.backButton), icon: { left: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowLeft" }) } }), (0, jsx_runtime_1.jsx)(typography_1.Typo.h2, { textType: "heading__xl", children: t(PageText.Contact.success.title) }), (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.success.info) })] }));
|
|
19
20
|
}
|
|
@@ -3,7 +3,7 @@ import { FormType } from './ticket-control-form-machine';
|
|
|
3
3
|
type TicketControlSpecificFormEvents = {
|
|
4
4
|
type: 'ON_INPUT_CHANGE';
|
|
5
5
|
inputName: 'formType' | 'feeNumber' | 'invoiceNumber' | 'appPhoneNumber' | 'customerNumber' | 'travelCardNumber' | 'isAppTicketStorageMode' | 'agreesFirstAgreement' | 'agreesSecondAgreement' | 'hasInternationalBankAccount' | 'dateOfTicketControl' | 'timeOfTicketControl';
|
|
6
|
-
value: string | boolean;
|
|
6
|
+
value: string | boolean | undefined;
|
|
7
7
|
} | {
|
|
8
8
|
type: 'SELECT_FORM_TYPE';
|
|
9
9
|
formType: FormType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/ticket-control/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,KAAK,+BAA+B,GAChC;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EACL,UAAU,GACV,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,wBAAwB,GACxB,sBAAsB,GACtB,uBAAuB,GACvB,6BAA6B,GAC7B,qBAAqB,GACrB,qBAAqB,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/ticket-control/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,KAAK,+BAA+B,GAChC;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EACL,UAAU,GACV,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,wBAAwB,GACxB,sBAAsB,GACtB,uBAAuB,GACvB,6BAA6B,GAC7B,qBAAqB,GACrB,qBAAqB,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACrC,GACD;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC;AACN,eAAO,MAAM,uBAAuB,EAChC,+BAA+B,GAC/B,OAAO,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeComplaintForm.d.ts","sourceRoot":"","sources":["../../../src/ticket-control/forms/feeComplaintForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"feeComplaintForm.d.ts","sourceRoot":"","sources":["../../../src/ticket-control/forms/feeComplaintForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAUpD,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE;QAAE,OAAO,EAAE,yBAAyB,CAAA;KAAE,CAAC;IAC9C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,uBAAuB,KAAK,IAAI,CAAC;CACvD,CAAC;AA0cF,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,qBAAqB,4CAYtE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|