@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.
Files changed (157) hide show
  1. package/README.md +393 -2
  2. package/lib/commoneEvents.d.ts +1 -1
  3. package/lib/commoneEvents.d.ts.map +1 -1
  4. package/lib/components/form/date-selector.d.ts.map +1 -1
  5. package/lib/components/form/date-selector.js +5 -4
  6. package/lib/components/form/departure-time-field.d.ts +16 -0
  7. package/lib/components/form/departure-time-field.d.ts.map +1 -0
  8. package/lib/components/form/departure-time-field.js +28 -0
  9. package/lib/components/form/description-modal.d.ts.map +1 -1
  10. package/lib/components/form/description-modal.js +2 -1
  11. package/lib/components/form/file-input.d.ts.map +1 -1
  12. package/lib/components/form/file-input.js +2 -1
  13. package/lib/components/form/index.d.ts +1 -0
  14. package/lib/components/form/index.d.ts.map +1 -1
  15. package/lib/components/form/index.js +3 -1
  16. package/lib/components/form/input.d.ts.map +1 -1
  17. package/lib/components/form/input.js +2 -1
  18. package/lib/components/form/searchable-select/utils.js +6 -1
  19. package/lib/components/index.d.ts +1 -1
  20. package/lib/components/index.d.ts.map +1 -1
  21. package/lib/components/index.js +2 -1
  22. package/lib/contact.module.css +9 -0
  23. package/lib/error-content/error-content.d.ts.map +1 -1
  24. package/lib/error-content/error-content.js +2 -1
  25. package/lib/group-travel/index.d.ts.map +1 -1
  26. package/lib/group-travel/index.js +3 -1
  27. package/lib/index.d.ts +16 -4
  28. package/lib/index.d.ts.map +1 -1
  29. package/lib/index.js +41 -1
  30. package/lib/journey-info/index.d.ts.map +1 -1
  31. package/lib/journey-info/index.js +13 -7
  32. package/lib/journey-info/journeyInfoStateMachine.d.ts +8 -8
  33. package/lib/layouts/contact-page-layout.d.ts +2 -2
  34. package/lib/layouts/contact-page-layout.d.ts.map +1 -1
  35. package/lib/layouts/contact-page-layout.js +19 -16
  36. package/lib/layouts/container.module.css +1 -1
  37. package/lib/layouts/layout.module.css +23 -2
  38. package/lib/lines/use-departures.d.ts +12 -0
  39. package/lib/lines/use-departures.d.ts.map +1 -0
  40. package/lib/lines/use-departures.js +35 -0
  41. package/lib/lines/use-lines.d.ts +4 -3
  42. package/lib/lines/use-lines.d.ts.map +1 -1
  43. package/lib/lines/use-lines.js +43 -10
  44. package/lib/lost-property/LostPropertyForm.d.ts +10 -0
  45. package/lib/lost-property/LostPropertyForm.d.ts.map +1 -0
  46. package/lib/lost-property/LostPropertyForm.js +65 -0
  47. package/lib/lost-property/LostPropertyMachine.d.ts +116 -0
  48. package/lib/lost-property/LostPropertyMachine.d.ts.map +1 -0
  49. package/lib/lost-property/LostPropertyMachine.js +187 -0
  50. package/lib/lost-property/index.d.ts.map +1 -1
  51. package/lib/lost-property/index.js +27 -3
  52. package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -1
  53. package/lib/means-of-transport/forms/delayForm.js +26 -18
  54. package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -1
  55. package/lib/means-of-transport/forms/driverForm.js +26 -18
  56. package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
  57. package/lib/means-of-transport/forms/injuryForm.js +26 -18
  58. package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -1
  59. package/lib/means-of-transport/forms/serviceOfferingForm.js +10 -9
  60. package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -1
  61. package/lib/means-of-transport/forms/stopForm.js +13 -12
  62. package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -1
  63. package/lib/means-of-transport/forms/transportationForm.js +26 -18
  64. package/lib/means-of-transport/index.d.ts.map +1 -1
  65. package/lib/means-of-transport/index.js +13 -4
  66. package/lib/means-of-transport/means-of-transport-form-machine.d.ts +10 -8
  67. package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -1
  68. package/lib/means-of-transport/means-of-transport-form-machine.js +6 -0
  69. package/lib/modules/config/types.d.ts +48 -1
  70. package/lib/modules/config/types.d.ts.map +1 -1
  71. package/lib/refund/events.d.ts +1 -1
  72. package/lib/refund/events.d.ts.map +1 -1
  73. package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -1
  74. package/lib/refund/forms/refund-and-travel-guarantee/index.js +2 -2
  75. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -1
  76. package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +15 -8
  77. package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -1
  78. package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.js +15 -8
  79. package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
  80. package/lib/refund/forms/refund-ticket/appTicketRefund.js +46 -11
  81. package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
  82. package/lib/refund/forms/refund-ticket/index.js +8 -7
  83. package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
  84. package/lib/refund/forms/refund-ticket/otherTicketRefund.js +53 -19
  85. package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
  86. package/lib/refund/forms/residualValueOnTravelCard/index.js +5 -3
  87. package/lib/refund/index.d.ts.map +1 -1
  88. package/lib/refund/index.js +39 -6
  89. package/lib/refund/refundFormMachine.d.ts +37 -13
  90. package/lib/refund/refundFormMachine.d.ts.map +1 -1
  91. package/lib/refund/refundFormMachine.js +96 -3
  92. package/lib/server/journey-planner/index.d.ts.map +1 -1
  93. package/lib/server/journey-planner/index.js +15 -6
  94. package/lib/server/journey-planner/validators.d.ts +2 -0
  95. package/lib/server/journey-planner/validators.d.ts.map +1 -1
  96. package/lib/server/journey-planner/validators.js +1 -0
  97. package/lib/success-content/success-content.d.ts.map +1 -1
  98. package/lib/success-content/success-content.js +2 -1
  99. package/lib/ticket-control/events.d.ts +1 -1
  100. package/lib/ticket-control/events.d.ts.map +1 -1
  101. package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -1
  102. package/lib/ticket-control/forms/feeComplaintForm.js +28 -25
  103. package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -1
  104. package/lib/ticket-control/forms/feedbackForm.js +22 -14
  105. package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -1
  106. package/lib/ticket-control/forms/postponePayment.js +8 -7
  107. package/lib/ticket-control/index.d.ts.map +1 -1
  108. package/lib/ticket-control/index.js +15 -6
  109. package/lib/ticket-control/ticket-control-form-machine.d.ts +14 -10
  110. package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -1
  111. package/lib/ticket-control/ticket-control-form-machine.js +17 -2
  112. package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -1
  113. package/lib/ticketing/forms/app/appAccountForm.js +9 -8
  114. package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -1
  115. package/lib/ticketing/forms/app/appTicketingForm.js +13 -12
  116. package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -1
  117. package/lib/ticketing/forms/app/appTravelSuggestionForm.js +6 -5
  118. package/lib/ticketing/forms/app/index.d.ts.map +1 -1
  119. package/lib/ticketing/forms/app/index.js +2 -1
  120. package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -1
  121. package/lib/ticketing/forms/priceAndTicketTypesForm.js +6 -5
  122. package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -1
  123. package/lib/ticketing/forms/travel-card/index.js +2 -1
  124. package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
  125. package/lib/ticketing/forms/travel-card/orderTravelCard.js +2 -2
  126. package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -1
  127. package/lib/ticketing/forms/travel-card/travelCardQuestionForm.js +9 -8
  128. package/lib/ticketing/forms/webshop/index.d.ts.map +1 -1
  129. package/lib/ticketing/forms/webshop/index.js +2 -1
  130. package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -1
  131. package/lib/ticketing/forms/webshop/webshopAccountForm.js +9 -8
  132. package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -1
  133. package/lib/ticketing/forms/webshop/webshopTicketingForm.js +12 -11
  134. package/lib/ticketing/index.d.ts.map +1 -1
  135. package/lib/ticketing/index.js +21 -6
  136. package/lib/ticketing/ticketingStateMachine.d.ts +12 -12
  137. package/lib/translations/index.d.ts +1 -1
  138. package/lib/translations/index.d.ts.map +1 -1
  139. package/lib/translations/index.js +2 -1
  140. package/lib/translations/pages/contact.d.ts +46 -0
  141. package/lib/translations/pages/contact.d.ts.map +1 -1
  142. package/lib/translations/pages/contact.js +50 -2
  143. package/lib/translations/translations-context.d.ts +2 -0
  144. package/lib/translations/translations-context.d.ts.map +1 -1
  145. package/lib/translations/translations-context.js +39 -0
  146. package/lib/types/submit-payloads.d.ts +19 -0
  147. package/lib/types/submit-payloads.d.ts.map +1 -1
  148. package/lib/types.d.ts +1 -1
  149. package/lib/types.d.ts.map +1 -1
  150. package/lib/url-form-type.d.ts +6 -0
  151. package/lib/url-form-type.d.ts.map +1 -0
  152. package/lib/url-form-type.js +21 -0
  153. package/lib/utils.d.ts.map +1 -1
  154. package/lib/utils.js +10 -0
  155. package/lib/validation/validationRules.d.ts.map +1 -1
  156. package/lib/validation/validationRules.js +7 -0
  157. package/package.json +1 -2
@@ -5,8 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const translations_1 = require("../../../translations");
6
6
  const components_1 = require("../../../components");
7
7
  const AppAccountForm = ({ state, send }) => {
8
+ const PageText = (0, translations_1.usePageText)();
8
9
  const { t } = (0, translations_1.useTranslation)();
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
11
  type: 'ON_INPUT_CHANGE',
11
12
  inputName: 'question',
12
13
  value: e.target.value,
@@ -15,7 +16,7 @@ const AppAccountForm = ({ state, send }) => {
15
16
  : undefined, fileInputProps: {
16
17
  id: 'attachments',
17
18
  name: 'attachments',
18
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
19
+ iconLabel: t(PageText.Contact.input.question.attachment),
19
20
  onChange: (files) => {
20
21
  send({
21
22
  type: 'ON_INPUT_CHANGE',
@@ -23,25 +24,25 @@ const AppAccountForm = ({ state, send }) => {
23
24
  value: files,
24
25
  });
25
26
  },
26
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(translations_1.PageText.Contact.input.customerNumber.label), type: "text", name: "customerNumber", value: state.context.customerNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
27
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(PageText.Contact.input.customerNumber.label), type: "text", name: "customerNumber", value: state.context.customerNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
27
28
  type: 'ON_INPUT_CHANGE',
28
29
  inputName: 'customerNumber',
29
30
  value: e.target.value,
30
31
  }), modalContent: {
31
- description: t(translations_1.PageText.Contact.input.customerNumber.description),
32
- } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
32
+ description: t(PageText.Contact.input.customerNumber.description),
33
+ } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
33
34
  type: 'ON_INPUT_CHANGE',
34
35
  inputName: 'firstName',
35
36
  value: e.target.value,
36
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
37
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
37
38
  type: 'ON_INPUT_CHANGE',
38
39
  inputName: 'lastName',
39
40
  value: e.target.value,
40
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
41
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
41
42
  type: 'ON_INPUT_CHANGE',
42
43
  inputName: 'email',
43
44
  value: e.target.value,
44
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(translations_1.PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
45
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
45
46
  type: 'ON_INPUT_CHANGE',
46
47
  inputName: 'phoneNumber',
47
48
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"appTicketingForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/appTicketingForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,qBAAqB,4CAwJtE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"appTicketingForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/appTicketingForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,qBAAqB,4CAyJtE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -5,16 +5,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const translations_1 = require("../../../translations");
6
6
  const components_1 = require("../../../components");
7
7
  const AppTicketingForm = ({ state, send }) => {
8
+ const PageText = (0, translations_1.usePageText)();
8
9
  const { t } = (0, translations_1.useTranslation)();
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.app.appTicketing.title), children: (0, jsx_runtime_1.jsx)(components_1.Input, { id: "orderId", label: t(translations_1.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({
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.app.appTicketing.title), children: (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({
10
11
  type: 'ON_INPUT_CHANGE',
11
12
  inputName: 'orderId',
12
13
  value: e.target.value,
13
14
  }), modalContent: {
14
- description: t(translations_1.PageText.Contact.input.orderId.description),
15
- instruction: t(translations_1.PageText.Contact.input.orderId.instruction),
16
- bulletPoints: translations_1.PageText.Contact.input.orderId.descriptionBulletPoints.map((bulletpoint) => t(bulletpoint)),
17
- } }) }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
15
+ description: t(PageText.Contact.input.orderId.description),
16
+ instruction: t(PageText.Contact.input.orderId.instruction),
17
+ bulletPoints: PageText.Contact.input.orderId.descriptionBulletPoints.map((bulletpoint) => t(bulletpoint)),
18
+ } }) }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
18
19
  type: 'ON_INPUT_CHANGE',
19
20
  inputName: 'question',
20
21
  value: e.target.value,
@@ -23,7 +24,7 @@ const AppTicketingForm = ({ state, send }) => {
23
24
  : undefined, fileInputProps: {
24
25
  id: 'attachments',
25
26
  name: 'attachments',
26
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
27
+ iconLabel: t(PageText.Contact.input.question.attachment),
27
28
  onChange: (files) => {
28
29
  send({
29
30
  type: 'ON_INPUT_CHANGE',
@@ -31,25 +32,25 @@ const AppTicketingForm = ({ state, send }) => {
31
32
  value: files,
32
33
  });
33
34
  },
34
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(translations_1.PageText.Contact.input.customerNumber.labelOptional), type: "text", name: "customerNumber", value: state.context.customerNumber || '', errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
35
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(PageText.Contact.input.customerNumber.labelOptional), type: "text", name: "customerNumber", value: state.context.customerNumber || '', errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
35
36
  type: 'ON_INPUT_CHANGE',
36
37
  inputName: 'customerNumber',
37
38
  value: e.target.value,
38
39
  }), modalContent: {
39
- description: t(translations_1.PageText.Contact.input.customerNumber.description),
40
- } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
40
+ description: t(PageText.Contact.input.customerNumber.description),
41
+ } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
41
42
  type: 'ON_INPUT_CHANGE',
42
43
  inputName: 'firstName',
43
44
  value: e.target.value,
44
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
45
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
45
46
  type: 'ON_INPUT_CHANGE',
46
47
  inputName: 'lastName',
47
48
  value: e.target.value,
48
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
49
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
49
50
  type: 'ON_INPUT_CHANGE',
50
51
  inputName: 'email',
51
52
  value: e.target.value,
52
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(translations_1.PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
53
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
53
54
  type: 'ON_INPUT_CHANGE',
54
55
  inputName: 'phoneNumber',
55
56
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"appTravelSuggestionForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/appTravelSuggestionForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,4CA4F9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"appTravelSuggestionForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/appTravelSuggestionForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,4CA6F9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -5,8 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const translations_1 = require("../../../translations");
6
6
  const components_1 = require("../../../components");
7
7
  const AppTravelSuggestionForm = ({ state, send, }) => {
8
+ const PageText = (0, translations_1.usePageText)();
8
9
  const { t } = (0, translations_1.useTranslation)();
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
11
  type: 'ON_INPUT_CHANGE',
11
12
  inputName: 'question',
12
13
  value: e.target.value,
@@ -15,7 +16,7 @@ const AppTravelSuggestionForm = ({ state, send, }) => {
15
16
  : undefined, fileInputProps: {
16
17
  id: 'attachments',
17
18
  name: 'attachments',
18
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
19
+ iconLabel: t(PageText.Contact.input.question.attachment),
19
20
  onChange: (files) => {
20
21
  send({
21
22
  type: 'ON_INPUT_CHANGE',
@@ -23,15 +24,15 @@ const AppTravelSuggestionForm = ({ state, send, }) => {
23
24
  value: files,
24
25
  });
25
26
  },
26
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
27
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
27
28
  type: 'ON_INPUT_CHANGE',
28
29
  inputName: 'firstName',
29
30
  value: e.target.value,
30
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
31
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
31
32
  type: 'ON_INPUT_CHANGE',
32
33
  inputName: 'lastName',
33
34
  value: e.target.value,
34
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
35
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
35
36
  type: 'ON_INPUT_CHANGE',
36
37
  inputName: 'email',
37
38
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAW,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAI7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,iBAAiB,aAAa,4CAmCtD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/app/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAW,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAI7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,iBAAiB,aAAa,4CAoCtD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -13,8 +13,9 @@ const appTicketingForm_1 = __importDefault(require("./appTicketingForm"));
13
13
  const appTravelSuggestionForm_1 = __importDefault(require("./appTravelSuggestionForm"));
14
14
  const components_1 = require("../../../components");
15
15
  const AppForms = ({ state, send }) => {
16
+ const PageText = (0, translations_1.usePageText)();
16
17
  const { t } = (0, translations_1.useTranslation)();
17
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.app.description), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: Object.values(ticketingStateMachine_1.AppForm).map((appForm) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(translations_1.PageText.Contact.ticketing.app[appForm].label), checked: state.matches({ editing: { app: appForm } }), onChange: () => send({
18
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.app.description), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: Object.values(ticketingStateMachine_1.AppForm).map((appForm) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(PageText.Contact.ticketing.app[appForm].label), checked: state.matches({ editing: { app: appForm } }), onChange: () => send({
18
19
  type: 'SELECT_APP_FORM',
19
20
  appForm: appForm,
20
21
  }) }) }, appForm))) }) }), state.matches({ editing: { app: 'appTicketing' } }) && ((0, jsx_runtime_1.jsx)(appTicketingForm_1.default, { state: state, send: send })), state.matches({ editing: { app: 'appTravelSuggestion' } }) && ((0, jsx_runtime_1.jsx)(appTravelSuggestionForm_1.default, { state: state, send: send })), state.matches({ editing: { app: 'appAccount' } }) && ((0, jsx_runtime_1.jsx)(appAccountForm_1.default, { state: state, send: send }))] }));
@@ -1 +1 @@
1
- {"version":3,"file":"priceAndTicketTypesForm.d.ts","sourceRoot":"","sources":["../../../src/ticketing/forms/priceAndTicketTypesForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,4CA4F9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"priceAndTicketTypesForm.d.ts","sourceRoot":"","sources":["../../../src/ticketing/forms/priceAndTicketTypesForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,kBAGrC,4BAA4B,4CA6F9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -5,8 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const translations_1 = require("../../translations");
6
6
  const components_1 = require("../../components");
7
7
  const PriceAndTicketTypesForm = ({ state, send, }) => {
8
+ const PageText = (0, translations_1.usePageText)();
8
9
  const { t } = (0, translations_1.useTranslation)();
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
11
  type: 'ON_INPUT_CHANGE',
11
12
  inputName: 'question',
12
13
  value: e.target.value,
@@ -15,7 +16,7 @@ const PriceAndTicketTypesForm = ({ state, send, }) => {
15
16
  : undefined, fileInputProps: {
16
17
  id: 'attachments',
17
18
  name: 'attachments',
18
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
19
+ iconLabel: t(PageText.Contact.input.question.attachment),
19
20
  onChange: (files) => {
20
21
  send({
21
22
  type: 'ON_INPUT_CHANGE',
@@ -23,15 +24,15 @@ const PriceAndTicketTypesForm = ({ state, send, }) => {
23
24
  value: files,
24
25
  });
25
26
  },
26
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
27
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
27
28
  type: 'ON_INPUT_CHANGE',
28
29
  inputName: 'firstName',
29
30
  value: e.target.value,
30
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
31
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
31
32
  type: 'ON_INPUT_CHANGE',
32
33
  inputName: 'lastName',
33
34
  value: e.target.value,
34
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
35
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
35
36
  type: 'ON_INPUT_CHANGE',
36
37
  inputName: 'email',
37
38
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAEL,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,iBAAiB,oBAAoB,4CAoCpE,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAEL,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,iBAAiB,oBAAoB,4CAqCpE,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -12,8 +12,9 @@ const components_1 = require("../../../components");
12
12
  const travelCardQuestionForm_1 = __importDefault(require("./travelCardQuestionForm"));
13
13
  const orderTravelCard_1 = __importDefault(require("./orderTravelCard"));
14
14
  const TravelCardForms = ({ state, send }) => {
15
+ const PageText = (0, translations_1.usePageText)();
15
16
  const { t } = (0, translations_1.useTranslation)();
16
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.travelCard.description), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: Object.values(ticketingStateMachine_1.TravelCardForm).map((travelCardForm) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(translations_1.PageText.Contact.ticketing.travelCard[travelCardForm].label), checked: state.matches({
17
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.travelCard.description), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: Object.values(ticketingStateMachine_1.TravelCardForm).map((travelCardForm) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(PageText.Contact.ticketing.travelCard[travelCardForm].label), checked: state.matches({
17
18
  editing: { travelCard: travelCardForm },
18
19
  }), onChange: () => send({
19
20
  type: 'SELECT_TRAVELCARD_FORM',
@@ -1 +1 @@
1
- {"version":3,"file":"orderTravelCard.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/orderTravelCard.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,mBAAmB,+CAoC/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"orderTravelCard.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/orderTravelCard.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,mBAAmB,+CAuC/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -13,8 +13,8 @@ const link_1 = __importDefault(require("next/link"));
13
13
  const OrderTravelCardForm = () => {
14
14
  const { t } = (0, translations_1.useTranslation)();
15
15
  return ((0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.travelCard.orderTravelCard.label), children: (0, jsx_runtime_1.jsxs)("ul", { className: contact_module_css_1.default.rules__list, children: [translations_1.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}`))), (0, jsx_runtime_1.jsxs)("li", { children: [t(translations_1.PageText.Contact.ticketing.travelCard.orderTravelCard.detailWithUrl
16
- .detail), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { href: t(translations_1.PageText.Contact.ticketing.travelCard.orderTravelCard
17
- .detailWithUrl.href), children: t(translations_1.PageText.Contact.ticketing.travelCard.orderTravelCard
16
+ .detail), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { className: contact_module_css_1.default.link, href: t(translations_1.PageText.Contact.ticketing.travelCard.orderTravelCard
17
+ .detailWithUrl.href), target: "_blank", rel: "noopener noreferrer", children: t(translations_1.PageText.Contact.ticketing.travelCard.orderTravelCard
18
18
  .detailWithUrl.linkText) }), "."] })] }) }));
19
19
  };
20
20
  exports.OrderTravelCardForm = OrderTravelCardForm;
@@ -1 +1 @@
1
- {"version":3,"file":"travelCardQuestionForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/travelCardQuestionForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAInE,KAAK,2BAA2B,GAAG;IACjC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kBAGpC,2BAA2B,4CAwI7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"travelCardQuestionForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/travel-card/travelCardQuestionForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAInE,KAAK,2BAA2B,GAAG;IACjC,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kBAGpC,2BAA2B,4CAyI7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -6,14 +6,15 @@ const translations_1 = require("../../../translations");
6
6
  const typography_1 = require("../../../components/typography");
7
7
  const components_1 = require("../../../components");
8
8
  const TravelCardQuestionForm = ({ state, send, }) => {
9
+ const PageText = (0, translations_1.usePageText)();
9
10
  const { t } = (0, translations_1.useTranslation)();
10
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.travelCard.travelCardQuestion.label), children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(translations_1.PageText.Contact.input.travelCardNumber.info) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "travelCardNumber", label: t(translations_1.PageText.Contact.input.travelCardNumber.label), type: "text", name: "travelCardNumber", value: state.context.travelCardNumber || '', modalContent: {
11
- description: t(translations_1.PageText.Contact.input.travelCardNumber.info),
11
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.travelCard.travelCardQuestion.label), children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(PageText.Contact.input.travelCardNumber.info) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "travelCardNumber", label: t(PageText.Contact.input.travelCardNumber.label), type: "text", name: "travelCardNumber", value: state.context.travelCardNumber || '', modalContent: {
12
+ description: t(PageText.Contact.input.travelCardNumber.info),
12
13
  }, isRequired: true, errorMessage: state.context?.errorMessages['travelCardNumber']?.[0], onChange: (e) => send({
13
14
  type: 'ON_INPUT_CHANGE',
14
15
  inputName: 'travelCardNumber',
15
16
  value: e.target.value,
16
- }) })] }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
17
+ }) })] }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
17
18
  type: 'ON_INPUT_CHANGE',
18
19
  inputName: 'question',
19
20
  value: e.target.value,
@@ -22,7 +23,7 @@ const TravelCardQuestionForm = ({ state, send, }) => {
22
23
  : undefined, fileInputProps: {
23
24
  id: 'attachments',
24
25
  name: 'attachments',
25
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
26
+ iconLabel: t(PageText.Contact.input.question.attachment),
26
27
  onChange: (files) => {
27
28
  send({
28
29
  type: 'ON_INPUT_CHANGE',
@@ -30,19 +31,19 @@ const TravelCardQuestionForm = ({ state, send, }) => {
30
31
  value: files,
31
32
  });
32
33
  },
33
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
34
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
34
35
  type: 'ON_INPUT_CHANGE',
35
36
  inputName: 'firstName',
36
37
  value: e.target.value,
37
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
38
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
38
39
  type: 'ON_INPUT_CHANGE',
39
40
  inputName: 'lastName',
40
41
  value: e.target.value,
41
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
42
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
42
43
  type: 'ON_INPUT_CHANGE',
43
44
  inputName: 'email',
44
45
  value: e.target.value,
45
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(translations_1.PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
46
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
46
47
  type: 'ON_INPUT_CHANGE',
47
48
  inputName: 'phoneNumber',
48
49
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/webshop/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAEL,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,iBAAiB,aAAa,4CAgC1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/webshop/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAEL,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,iBAAiB,aAAa,4CAiC1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -12,8 +12,9 @@ const components_1 = require("../../../components");
12
12
  const webshopAccountForm_1 = __importDefault(require("./webshopAccountForm"));
13
13
  const webshopTicketingForm_1 = __importDefault(require("./webshopTicketingForm"));
14
14
  const WebshopForms = ({ state, send }) => {
15
+ const PageText = (0, translations_1.usePageText)();
15
16
  const { t } = (0, translations_1.useTranslation)();
16
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.webshop.description), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: Object.values(ticketingStateMachine_1.WebshopForm).map((webshopForm) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(translations_1.PageText.Contact.ticketing.webshop[webshopForm].label), checked: state.matches({ editing: { webshop: webshopForm } }), onChange: () => send({
17
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.webshop.description), children: (0, jsx_runtime_1.jsx)("ul", { className: contact_module_css_1.default.form_options__list, children: Object.values(ticketingStateMachine_1.WebshopForm).map((webshopForm) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(components_1.Radio, { label: t(PageText.Contact.ticketing.webshop[webshopForm].label), checked: state.matches({ editing: { webshop: webshopForm } }), onChange: () => send({
17
18
  type: 'SELECT_WEBSHOP_FORM',
18
19
  webshopForm: webshopForm,
19
20
  }) }) }, webshopForm))) }) }), state.matches({ editing: { webshop: 'webshopTicketing' } }) && ((0, jsx_runtime_1.jsx)(webshopTicketingForm_1.default, { state: state, send: send })), state.matches({ editing: { webshop: 'webshopAccount' } }) && ((0, jsx_runtime_1.jsx)(webshopAccountForm_1.default, { state: state, send: send }))] }));
@@ -1 +1 @@
1
- {"version":3,"file":"webshopAccountForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/webshop/webshopAccountForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kBAGhC,uBAAuB,4CA+HzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"webshopAccountForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/webshop/webshopAccountForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kBAGhC,uBAAuB,4CAgIzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -5,8 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const translations_1 = require("../../../translations");
6
6
  const components_1 = require("../../../components");
7
7
  const WebshopAccountForm = ({ state, send, }) => {
8
+ const PageText = (0, translations_1.usePageText)();
8
9
  const { t } = (0, translations_1.useTranslation)();
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
10
11
  type: 'ON_INPUT_CHANGE',
11
12
  inputName: 'question',
12
13
  value: e.target.value,
@@ -15,7 +16,7 @@ const WebshopAccountForm = ({ state, send, }) => {
15
16
  : undefined, fileInputProps: {
16
17
  id: 'attachments',
17
18
  name: 'attachments',
18
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
19
+ iconLabel: t(PageText.Contact.input.question.attachment),
19
20
  onChange: (files) => {
20
21
  send({
21
22
  type: 'ON_INPUT_CHANGE',
@@ -23,25 +24,25 @@ const WebshopAccountForm = ({ state, send, }) => {
23
24
  value: files,
24
25
  });
25
26
  },
26
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(translations_1.PageText.Contact.input.customerNumber.labelOptional), type: "text", name: "customerNumber", value: state.context.customerNumber || '', errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
27
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(PageText.Contact.input.customerNumber.labelOptional), type: "text", name: "customerNumber", value: state.context.customerNumber || '', errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
27
28
  type: 'ON_INPUT_CHANGE',
28
29
  inputName: 'customerNumber',
29
30
  value: e.target.value,
30
31
  }), modalContent: {
31
- description: t(translations_1.PageText.Contact.input.customerNumber.description),
32
- } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
32
+ description: t(PageText.Contact.input.customerNumber.description),
33
+ } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", value: state.context.firstName || '', isRequired: true, errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
33
34
  type: 'ON_INPUT_CHANGE',
34
35
  inputName: 'firstName',
35
36
  value: e.target.value,
36
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
37
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", value: state.context.lastName || '', isRequired: true, errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
37
38
  type: 'ON_INPUT_CHANGE',
38
39
  inputName: 'lastName',
39
40
  value: e.target.value,
40
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
41
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", value: state.context.email || '', isRequired: true, errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
41
42
  type: 'ON_INPUT_CHANGE',
42
43
  inputName: 'email',
43
44
  value: e.target.value,
44
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(translations_1.PageText.Contact.input.phoneNumber.label), type: "tel", autoComplete: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
45
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", autoComplete: "tel", name: "phoneNumber", value: state.context.phoneNumber || '', isRequired: true, errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
45
46
  type: 'ON_INPUT_CHANGE',
46
47
  inputName: 'phoneNumber',
47
48
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"webshopTicketingForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/webshop/webshopTicketingForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,kBAGlC,yBAAyB,4CA2J3B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"webshopTicketingForm.d.ts","sourceRoot":"","sources":["../../../../src/ticketing/forms/webshop/webshopTicketingForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE;QAAE,OAAO,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,kBAGlC,yBAAyB,4CA4J3B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -5,15 +5,16 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const translations_1 = require("../../../translations");
6
6
  const components_1 = require("../../../components");
7
7
  const WebshopTicketingForm = ({ state, send, }) => {
8
+ const PageText = (0, translations_1.usePageText)();
8
9
  const { t } = (0, translations_1.useTranslation)();
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.ticketing.webshop.webshopTicketing.title), children: (0, jsx_runtime_1.jsx)(components_1.Input, { id: "orderId", label: t(translations_1.PageText.Contact.input.orderId.label(false)), type: "text", name: "orderId", value: state.context.orderId || '', isRequired: true, modalContent: {
10
- description: t(translations_1.PageText.Contact.input.orderId.description),
11
- bulletPoints: translations_1.PageText.Contact.input.orderId.descriptionBulletPoints.map((bulletPoint) => t(bulletPoint)),
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.ticketing.webshop.webshopTicketing.title), children: (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, modalContent: {
11
+ description: t(PageText.Contact.input.orderId.description),
12
+ bulletPoints: PageText.Contact.input.orderId.descriptionBulletPoints.map((bulletPoint) => t(bulletPoint)),
12
13
  }, errorMessage: state.context?.errorMessages['orderId']?.[0], onChange: (e) => send({
13
14
  type: 'ON_INPUT_CHANGE',
14
15
  inputName: 'orderId',
15
16
  value: e.target.value,
16
- }) }) }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(translations_1.PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
17
+ }) }) }), (0, jsx_runtime_1.jsx)(components_1.Fieldset, { title: t(PageText.Contact.input.question.title), isRequired: true, children: (0, jsx_runtime_1.jsx)(components_1.Textarea, { id: "question", description: t(PageText.Contact.input.question.info), value: state.context.question || '', onChange: (e) => send({
17
18
  type: 'ON_INPUT_CHANGE',
18
19
  inputName: 'question',
19
20
  value: e.target.value,
@@ -22,7 +23,7 @@ const WebshopTicketingForm = ({ state, send, }) => {
22
23
  : undefined, fileInputProps: {
23
24
  id: 'attachments',
24
25
  name: 'attachments',
25
- iconLabel: t(translations_1.PageText.Contact.input.question.attachment),
26
+ iconLabel: t(PageText.Contact.input.question.attachment),
26
27
  onChange: (files) => {
27
28
  send({
28
29
  type: 'ON_INPUT_CHANGE',
@@ -30,25 +31,25 @@ const WebshopTicketingForm = ({ state, send, }) => {
30
31
  value: files,
31
32
  });
32
33
  },
33
- } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(translations_1.PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(translations_1.PageText.Contact.input.customerNumber.labelOptional), type: "text", name: "customerNumber", value: state.context.customerNumber || '', errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
34
+ } }) }), (0, jsx_runtime_1.jsxs)(components_1.Fieldset, { title: t(PageText.Contact.aboutYouInfo.title), children: [(0, jsx_runtime_1.jsx)(components_1.Input, { id: "customerNumber", label: t(PageText.Contact.input.customerNumber.labelOptional), type: "text", name: "customerNumber", value: state.context.customerNumber || '', errorMessage: state.context?.errorMessages['customerNumber']?.[0], onChange: (e) => send({
34
35
  type: 'ON_INPUT_CHANGE',
35
36
  inputName: 'customerNumber',
36
37
  value: e.target.value,
37
38
  }), modalContent: {
38
- description: t(translations_1.PageText.Contact.input.customerNumber.description),
39
- } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(translations_1.PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", isRequired: true, value: state.context.firstName || '', errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
39
+ description: t(PageText.Contact.input.customerNumber.description),
40
+ } }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "firstName", label: t(PageText.Contact.input.firstName.label), type: "text", autoComplete: "given-name additional-name", name: "firstName", isRequired: true, value: state.context.firstName || '', errorMessage: state.context?.errorMessages['firstName']?.[0], onChange: (e) => send({
40
41
  type: 'ON_INPUT_CHANGE',
41
42
  inputName: 'firstName',
42
43
  value: e.target.value,
43
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(translations_1.PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", isRequired: true, value: state.context.lastName || '', errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
44
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "lastName", label: t(PageText.Contact.input.lastName.label), type: "text", autoComplete: "family-name", name: "lastName", isRequired: true, value: state.context.lastName || '', errorMessage: state.context?.errorMessages['lastName']?.[0], onChange: (e) => send({
44
45
  type: 'ON_INPUT_CHANGE',
45
46
  inputName: 'lastName',
46
47
  value: e.target.value,
47
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(translations_1.PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", isRequired: true, value: state.context.email || '', errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
48
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "email", label: t(PageText.Contact.input.email.label), type: "email", autoComplete: "email", name: "email", isRequired: true, value: state.context.email || '', errorMessage: state.context?.errorMessages['email']?.[0], onChange: (e) => send({
48
49
  type: 'ON_INPUT_CHANGE',
49
50
  inputName: 'email',
50
51
  value: e.target.value,
51
- }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(translations_1.PageText.Contact.input.phoneNumber.label), type: "tel", autoComplete: "tel", name: "phoneNumber", isRequired: true, value: state.context.phoneNumber || '', errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
52
+ }) }), (0, jsx_runtime_1.jsx)(components_1.Input, { id: "phoneNumber", label: t(PageText.Contact.input.phoneNumber.label), type: "tel", autoComplete: "tel", name: "phoneNumber", isRequired: true, value: state.context.phoneNumber || '', errorMessage: state.context?.errorMessages['phoneNumber']?.[0], onChange: (e) => send({
52
53
  type: 'ON_INPUT_CHANGE',
53
54
  inputName: 'phoneNumber',
54
55
  value: e.target.value,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ticketing/index.tsx"],"names":[],"mappings":"AAkBA,QAAA,MAAM,gBAAgB,+CAuGrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ticketing/index.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,gBAAgB,+CAqHrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}