@eventlook/sdk 1.5.0-beta.6 → 1.5.0-beta.8

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 (91) hide show
  1. package/.claude/settings.local.json +6 -10
  2. package/.env.example +1 -0
  3. package/README.md +18 -16
  4. package/dist/cjs/{index-DvUR1fp8.js → index-CUIxdwQn.js} +3340 -577
  5. package/dist/cjs/index-CUIxdwQn.js.map +1 -0
  6. package/dist/cjs/index-D5rQiSGP.js +38574 -0
  7. package/dist/cjs/index-D5rQiSGP.js.map +1 -0
  8. package/dist/cjs/index.js +2 -2
  9. package/dist/cjs/{index.umd-6SU6nkkJ.js → index.umd-BoFEW91M.js} +9 -19
  10. package/dist/cjs/index.umd-BoFEW91M.js.map +1 -0
  11. package/dist/cjs/index.umd-BzSM62qM.js +13397 -0
  12. package/dist/cjs/index.umd-BzSM62qM.js.map +1 -0
  13. package/dist/esm/index-Cm7V8Zl3.js +38571 -0
  14. package/dist/esm/index-Cm7V8Zl3.js.map +1 -0
  15. package/dist/esm/{index-BlTqx0jm.js → index-fvLIN6eP.js} +3327 -563
  16. package/dist/esm/index-fvLIN6eP.js.map +1 -0
  17. package/dist/esm/index.js +2 -2
  18. package/dist/esm/{index.umd-Dn0hjh7E.js → index.umd-BKBHcCnm.js} +9 -19
  19. package/dist/esm/index.umd-BKBHcCnm.js.map +1 -0
  20. package/dist/esm/index.umd-bIV_YpEF.js +13395 -0
  21. package/dist/esm/index.umd-bIV_YpEF.js.map +1 -0
  22. package/dist/types/components/hook-form/FormProvider.d.ts +2 -1
  23. package/dist/types/form/PaymentOverviewBox.d.ts +2 -0
  24. package/dist/types/form/PaymentOverviewDrawer.d.ts +10 -0
  25. package/dist/types/form/TicketForm.d.ts +1 -0
  26. package/dist/types/form/index.d.ts +2 -1
  27. package/dist/types/form/merchandise/MerchandiseSelection.d.ts +9 -0
  28. package/dist/types/form/merchandise/MerchandiseSlider.d.ts +10 -0
  29. package/dist/types/form/payment/PaymentOverviewCheckbox.d.ts +0 -4
  30. package/dist/types/form/product/ProductVariantsDialog.d.ts +3 -1
  31. package/dist/types/form/services/index.d.ts +7 -0
  32. package/dist/types/form/style.d.ts +1 -0
  33. package/dist/types/form/tickets/ReleaseDescription.d.ts +10 -0
  34. package/dist/types/form/tickets/ReleaseWithMerchandise.d.ts +12 -0
  35. package/dist/types/form/tickets/TicketQuantityControl.d.ts +13 -0
  36. package/dist/types/form/tickets/TicketSelectionMobile.d.ts +16 -0
  37. package/dist/types/hooks/useScrollToFirstError.d.ts +4 -0
  38. package/dist/types/locales/cs.d.ts +22 -0
  39. package/dist/types/locales/en.d.ts +22 -0
  40. package/dist/types/locales/es.d.ts +22 -0
  41. package/dist/types/locales/pl.d.ts +22 -0
  42. package/dist/types/locales/sk.d.ts +22 -0
  43. package/dist/types/locales/uk.d.ts +22 -0
  44. package/dist/types/utils/data/global.d.ts +1 -0
  45. package/dist/types/utils/data/ticket.d.ts +1 -0
  46. package/package.json +10 -4
  47. package/rollup.config.mjs +7 -12
  48. package/src/components/hook-form/FormProvider.tsx +5 -2
  49. package/src/form/ChildEventDialog.tsx +3 -3
  50. package/src/form/ContactPerson.tsx +1 -1
  51. package/src/form/PaymentOverviewBox.tsx +96 -123
  52. package/src/form/PaymentOverviewDrawer.tsx +445 -0
  53. package/src/form/PaymentPending.tsx +19 -4
  54. package/src/form/ReleaseWithMerchandise.tsx +4 -4
  55. package/src/form/Shipping.tsx +48 -33
  56. package/src/form/TicketForm.tsx +146 -41
  57. package/src/form/index.tsx +3 -1
  58. package/src/form/merchandise/MerchandiseSelection.tsx +24 -0
  59. package/src/form/merchandise/MerchandiseSlider.tsx +62 -0
  60. package/src/form/payment/FeeBox.tsx +4 -31
  61. package/src/form/payment/PaymentOverviewCheckbox.tsx +68 -69
  62. package/src/form/product/ProductCard.tsx +258 -59
  63. package/src/form/product/ProductVariantsDialog.tsx +292 -139
  64. package/src/form/services/index.tsx +262 -0
  65. package/src/form/style.ts +16 -4
  66. package/src/form/tickets/ReleaseDescription.tsx +46 -0
  67. package/src/form/tickets/ReleaseWithMerchandise.tsx +267 -0
  68. package/src/form/tickets/TicketQuantityControl.tsx +100 -0
  69. package/src/form/tickets/TicketSelection.tsx +236 -0
  70. package/src/form/{TicketSelectionMap.tsx → tickets/TicketSelectionMap.tsx} +18 -2
  71. package/src/form/tickets/TicketSelectionMobile.tsx +188 -0
  72. package/src/form/{TicketWithMerchandiseSelection.tsx → tickets/TicketWithMerchandiseSelection.tsx} +52 -38
  73. package/src/hooks/useScrollToFirstError.ts +99 -0
  74. package/src/locales/cs.tsx +25 -3
  75. package/src/locales/en.tsx +23 -1
  76. package/src/locales/es.tsx +23 -1
  77. package/src/locales/pl.tsx +23 -1
  78. package/src/locales/sk.tsx +24 -2
  79. package/src/locales/uk.tsx +23 -1
  80. package/src/utils/data/global.ts +1 -0
  81. package/src/utils/data/ticket.ts +1 -0
  82. package/tsconfig.json +1 -1
  83. package/README +0 -1
  84. package/dist/cjs/index-DvUR1fp8.js.map +0 -1
  85. package/dist/cjs/index.umd-6SU6nkkJ.js.map +0 -1
  86. package/dist/esm/index-BlTqx0jm.js.map +0 -1
  87. package/dist/esm/index.umd-Dn0hjh7E.js.map +0 -1
  88. package/src/form/TicketSelection.tsx +0 -307
  89. /package/dist/types/form/{TicketSelection.d.ts → tickets/TicketSelection.d.ts} +0 -0
  90. /package/dist/types/form/{TicketSelectionMap.d.ts → tickets/TicketSelectionMap.d.ts} +0 -0
  91. /package/dist/types/form/{TicketWithMerchandiseSelection.d.ts → tickets/TicketWithMerchandiseSelection.d.ts} +0 -0
@@ -1,15 +1,14 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import { useFormContext, useWatch } from 'react-hook-form';
3
- import { Box, Divider, Skeleton, Stack, Typography } from '@mui/material';
3
+ import { Box, Skeleton, Stack, Typography } from '@mui/material';
4
4
  import { ITicketForm, ITicketFormTicket } from '@utils/types/ticket.type';
5
5
  import useEventActiveReleases from '@hooks/data/useEventActiveReleases';
6
6
  import { groupBy } from '@utils/global';
7
7
  import { IReleaseShort } from '@utils/types/release.type';
8
- import FeeBox from '@form/payment/FeeBox';
9
8
  import { IEvent } from '@utils/types/event.type';
10
- import useResponsive from '@hooks/useResponsive';
11
- import ReleaseWithMerchandise from '@form/ReleaseWithMerchandise';
9
+ import ReleaseWithMerchandise from '@form/tickets/ReleaseWithMerchandise';
12
10
  import { EventType } from '@utils/data/event';
11
+ import { MAX_TICKETS_PER_ORDER } from '@utils/data/ticket';
13
12
  import useGlobal from '@hooks/useGlobal';
14
13
 
15
14
  interface Props {
@@ -18,7 +17,6 @@ interface Props {
18
17
 
19
18
  const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
20
19
  const { t } = useGlobal();
21
- const isMobile = useResponsive('down', 'md');
22
20
  const { setValue, watch } = useFormContext<ITicketForm>();
23
21
  const tickets: ITicketFormTicket[] = useWatch({ name: `tickets.${event.id}`, defaultValue: [] });
24
22
  const eventTimeslotId = watch('eventTimeslotId');
@@ -45,7 +43,15 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
45
43
  item2.releaseCategoryName === item.releaseCategoryName && item2.order === item.order + 1
46
44
  );
47
45
  const selected = tickets.find((ticket) => ticket.releaseId === item.id);
48
- return !!nextRelease && item.locked && !!selected && index + 1 == tickets.length;
46
+ const maxSelectable = Math.min(item.availableTickets || 0, MAX_TICKETS_PER_ORDER);
47
+
48
+ return (
49
+ !!nextRelease &&
50
+ item.locked &&
51
+ !!selected &&
52
+ Number(selected.quantity) >= maxSelectable &&
53
+ index + 1 == tickets.length
54
+ );
49
55
  });
50
56
  return lockedSelectedReleases && lockedSelectedReleases.includes(true);
51
57
  };
@@ -56,33 +62,40 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
56
62
 
57
63
  const selectedTickets = async () => {
58
64
  const releases = await mutate();
65
+ const currentReleases = releases || activeReleases || [];
59
66
  const allFilled = tickets.filter((item) => !item.releaseId || !item.quantity);
60
67
 
61
- const soldOutReleaseCategories = activeReleases?.filter((release) =>
68
+ const soldOutReleaseCategories = currentReleases.filter((release) =>
62
69
  tickets.find(
63
70
  (ticket) =>
64
71
  release.id === ticket.releaseId &&
65
- ticket.quantity === release.availableTickets &&
66
- release.availableTickets !== 10
72
+ Number(ticket.quantity) >= Math.min(release.availableTickets || 0, MAX_TICKETS_PER_ORDER)
67
73
  )
68
74
  );
69
75
 
70
76
  // Unlock next releases when current release is sold out
71
- if (soldOutReleaseCategories?.length && activeReleases) {
77
+ if (currentReleases.length) {
72
78
  let hasChanges = false;
73
- const updatedReleases = activeReleases.map((release) => {
74
- // For each sold-out release, find and unlock the next one
75
- const soldOutRelease = soldOutReleaseCategories.find(
76
- (soldOut) =>
77
- soldOut.releaseCategoryName === release.releaseCategoryName &&
78
- soldOut.order === release.order - 1 &&
79
- release.locked
79
+ const updatedReleases = currentReleases.map((release) => {
80
+ const previousRelease = currentReleases.find(
81
+ (item) =>
82
+ item.releaseCategoryName === release.releaseCategoryName &&
83
+ item.order === release.order - 1
84
+ );
85
+
86
+ if (!release.locked || !previousRelease) return release;
87
+
88
+ const previousTicket = tickets.find((ticket) => ticket.releaseId === previousRelease.id);
89
+ const previousMaxSelectable = Math.min(
90
+ previousRelease.availableTickets || 0,
91
+ MAX_TICKETS_PER_ORDER
80
92
  );
81
- if (soldOutRelease) {
82
- hasChanges = true;
83
- return { ...release, locked: false };
84
- }
85
- return release;
93
+ const shouldUnlock = Number(previousTicket?.quantity || 0) >= previousMaxSelectable;
94
+
95
+ if (!shouldUnlock) return release;
96
+
97
+ hasChanges = true;
98
+ return { ...release, locked: false };
86
99
  });
87
100
 
88
101
  if (hasChanges) {
@@ -90,7 +103,7 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
90
103
  }
91
104
  }
92
105
 
93
- const hasSelectableRelease = activeReleases?.some(
106
+ const hasSelectableRelease = currentReleases.some(
94
107
  (release) => !isReleaseSelected(release.id) && !release.locked
95
108
  );
96
109
 
@@ -99,9 +112,9 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
99
112
  selectedReleaseIsSoldOut(releases) &&
100
113
  tickets.length < soldOutReleaseCategories.length + countUnlockedReleases() &&
101
114
  !allFilled.length) ||
102
- (activeReleases &&
103
- soldOutReleaseCategories?.length &&
104
- activeReleases?.length > tickets.length &&
115
+ (currentReleases.length &&
116
+ soldOutReleaseCategories.length &&
117
+ currentReleases.length > tickets.length &&
105
118
  tickets.length < soldOutReleaseCategories.length + countUnlockedReleases() &&
106
119
  !allFilled.length) ||
107
120
  (tickets.length < countReleaseCategories() && !allFilled.length);
@@ -138,7 +151,7 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
138
151
  };
139
152
 
140
153
  return (
141
- <Stack spacing={3} direction="column" divider={<Divider sx={{ borderStyle: 'dashed' }} />}>
154
+ <Stack spacing={1} direction="column">
142
155
  {!activeReleases && event.type !== EventType.RECURRING ? (
143
156
  <Skeleton
144
157
  variant="rounded"
@@ -148,16 +161,18 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
148
161
  }}
149
162
  />
150
163
  ) : (
151
- activeReleases?.map((release, index) => (
152
- <ReleaseWithMerchandise
153
- key={release.id}
154
- eventId={event.id}
155
- release={release}
156
- activeReleases={activeReleases}
157
- currency={event.currency}
158
- index={index}
159
- />
160
- ))
164
+ activeReleases
165
+ ?.filter((release) => !release.locked || isReleaseSelected(release.id))
166
+ .map((release, index) => (
167
+ <ReleaseWithMerchandise
168
+ key={release.id}
169
+ eventId={event.id}
170
+ release={release}
171
+ activeReleases={activeReleases}
172
+ currency={event.currency}
173
+ index={index}
174
+ />
175
+ ))
161
176
  )}
162
177
  {!activeReleases && event.type === EventType.RECURRING && (
163
178
  <Typography variant="h5">{t('event.tickets.stepper.1.select_timeslot')}</Typography>
@@ -169,7 +184,6 @@ const TicketWithMerchandiseSelection: React.FC<Props> = ({ event }) => {
169
184
  <Typography variant="caption" component="div" fontStyle="italic" mb={2}>
170
185
  *{t('event.tickets.stepper.1.max_ticket_quantity')}
171
186
  </Typography>
172
- {isMobile && <FeeBox event={event} align="right" />}
173
187
  </Box>
174
188
  </Stack>
175
189
  );
@@ -0,0 +1,99 @@
1
+ import { useCallback } from 'react';
2
+ import { FieldError, FieldErrors, FieldValues, Path, UseFormReturn } from 'react-hook-form';
3
+
4
+ type FirstError<T extends FieldValues> = {
5
+ name: Path<T>;
6
+ ref?: HTMLElement | null;
7
+ };
8
+
9
+ const isFieldError = (value: unknown): value is FieldError =>
10
+ !!value && typeof value === 'object' && ('type' in value || 'message' in value);
11
+
12
+ const getFirstError = <T extends FieldValues>(
13
+ errors: FieldErrors<T>,
14
+ parentPath = ''
15
+ ): FirstError<T> | null => {
16
+ for (const [key, value] of Object.entries(errors)) {
17
+ if (!value) {
18
+ continue;
19
+ }
20
+
21
+ const fieldPath = parentPath ? `${parentPath}.${key}` : key;
22
+
23
+ if (isFieldError(value)) {
24
+ return {
25
+ name: fieldPath as Path<T>,
26
+ ref: value.ref instanceof HTMLElement ? value.ref : null,
27
+ };
28
+ }
29
+
30
+ if (Array.isArray(value)) {
31
+ for (let index = 0; index < value.length; index++) {
32
+ const nestedError = value[index] as FieldErrors<T> | undefined;
33
+ if (!nestedError) {
34
+ continue;
35
+ }
36
+
37
+ const firstNestedError = getFirstError(
38
+ nestedError,
39
+ parentPath ? `${parentPath}.${key}.${index}` : `${key}.${index}`
40
+ );
41
+ if (firstNestedError) {
42
+ return firstNestedError;
43
+ }
44
+ }
45
+ } else if (typeof value === 'object') {
46
+ const firstNestedError = getFirstError(value as FieldErrors<T>, fieldPath);
47
+ if (firstNestedError) {
48
+ return firstNestedError;
49
+ }
50
+ }
51
+ }
52
+
53
+ return null;
54
+ };
55
+
56
+ const escapeSelectorValue = (value: string): string => {
57
+ if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {
58
+ return CSS.escape(value);
59
+ }
60
+
61
+ // Fallback: escape all CSS special characters manually
62
+ return value.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, '\\$1');
63
+ };
64
+
65
+ type ScrollToFirstErrorMethods<T extends FieldValues> = Pick<
66
+ UseFormReturn<T, object, undefined>,
67
+ 'setFocus'
68
+ >;
69
+
70
+ export default function useScrollToFirstError<T extends FieldValues>({
71
+ setFocus,
72
+ }: ScrollToFirstErrorMethods<T>) {
73
+ return useCallback(
74
+ (errors: FieldErrors<T>) => {
75
+ const firstError = getFirstError(errors);
76
+ if (!firstError) {
77
+ return;
78
+ }
79
+
80
+ // Re-query the DOM instead of relying on potentially stale refs
81
+ const fieldName = String(firstError.name);
82
+ const scrollTarget =
83
+ document.querySelector<HTMLElement>(`[name="${escapeSelectorValue(fieldName)}"]`) ||
84
+ document.getElementById(fieldName);
85
+
86
+ if (scrollTarget) {
87
+ scrollTarget.scrollIntoView({
88
+ behavior: 'smooth',
89
+ block: 'center',
90
+ });
91
+ scrollTarget.focus({ preventScroll: true });
92
+ } else {
93
+ // Fallback to RHF's setFocus if no DOM element found
94
+ setFocus(firstError.name);
95
+ }
96
+ },
97
+ [setFocus]
98
+ );
99
+ }
@@ -7,6 +7,8 @@ const cs = {
7
7
  add: 'Přidat',
8
8
  confirm: 'Potvrdit',
9
9
  cancel: 'Zrušit',
10
+ close: 'Zavřít',
11
+ remove: 'Odstranit',
10
12
  pay: 'Zaplatit',
11
13
  change: 'Změnit',
12
14
  free: 'Zdarma',
@@ -39,7 +41,7 @@ const cs = {
39
41
  promo_code: 'Slevový kód',
40
42
  start_date: 'Datum konání',
41
43
  organizer: 'Pořadatel',
42
- total: 'Celkem ',
44
+ total: 'Celkem',
43
45
  with_fee: 'vč. servisního poplatku',
44
46
  service_fee: 'Servisní poplatek',
45
47
  shipping_fee: 'Doprava',
@@ -53,6 +55,10 @@ const cs = {
53
55
  category: 'Kategorie',
54
56
  sms_notification: 'SMS notifikace',
55
57
  open_map: 'Otevřít mapu',
58
+ payment_overview_open: 'Otevřít přehled platby',
59
+ payment_overview_close: 'Zavřít přehled platby',
60
+ ticket_quantity_decrease: 'Snížit počet vstupenek',
61
+ ticket_quantity_increase: 'Zvýšit počet vstupenek',
56
62
  },
57
63
  validation: {
58
64
  required: 'Toto pole je povinné.',
@@ -105,9 +111,13 @@ const cs = {
105
111
  7: {
106
112
  title: 'Přidružené eventy',
107
113
  },
114
+ 8: {
115
+ title: 'Dodatečné služby',
116
+ additional_info: 'Více informací ke službám',
117
+ },
108
118
  },
109
119
  terms_and_conditions:
110
- 'Odesláním objednávky souhlasím s <0>Obchodními podmínkami</0> {{termsAndConditionsCompanies}} a beru na vědomí <1>Zásady soukromí</1>.',
120
+ 'Souhlasím s <0>Obchodními podmínkami</0> {{termsAndConditionsCompanies}} a <1>Zásady soukromí</1>.',
111
121
  insurance: {
112
122
  label: 'Pojištění vstupenek',
113
123
  per_ticket: 'ks',
@@ -120,13 +130,23 @@ const cs = {
120
130
  },
121
131
  },
122
132
  sms_notification: {
123
- label: 'SMS připomenutí termínu akce',
133
+ label: 'SMS připomenutí termínu',
124
134
  modal: {
125
135
  description:
126
136
  'Připomínka akce den předem: SMS vás upozorní na blížící se událost, abyste na ni nezapomněli a stihli se včas připravit.',
127
137
  price: 'Cena SMS připomenutí termínu akce',
128
138
  },
129
139
  },
140
+ merchandise: {
141
+ show_sizes: 'Zobrazit velikosti',
142
+ show_added: 'Zobrazit přidané',
143
+ },
144
+ services: {
145
+ add_tickets_first: 'Nejdříve prosím přidejte vstupenky',
146
+ },
147
+ shipping: {
148
+ choose_address: 'Vybrat adresu',
149
+ },
130
150
  order_success: {
131
151
  title: 'Vstupenky byly úspěšně zarezervovány. Teď už zbývá jenom zaplatit.',
132
152
  description:
@@ -161,6 +181,8 @@ const cs = {
161
181
  components: {
162
182
  product_variant_dialog: {
163
183
  select_variant: 'Musíte vybrat variantu produktu.',
184
+ decrease_quantity: 'Snížit množství varianty produktu',
185
+ increase_quantity: 'Zvýšit množství varianty produktu',
164
186
  },
165
187
  },
166
188
  };
@@ -7,6 +7,8 @@ const en = {
7
7
  add: 'Add',
8
8
  confirm: 'Confirm',
9
9
  cancel: 'Cancel',
10
+ close: 'Close',
11
+ remove: 'Remove',
10
12
  pay: 'Pay',
11
13
  change: 'Change',
12
14
  free: 'Free',
@@ -53,6 +55,10 @@ const en = {
53
55
  category: 'Category',
54
56
  sms_notification: 'SMS notification',
55
57
  open_map: 'Open map',
58
+ payment_overview_open: 'Open payment overview',
59
+ payment_overview_close: 'Close payment overview',
60
+ ticket_quantity_decrease: 'Decrease ticket quantity',
61
+ ticket_quantity_increase: 'Increase ticket quantity',
56
62
  },
57
63
  validation: {
58
64
  required: 'This field is required.',
@@ -105,9 +111,13 @@ const en = {
105
111
  7: {
106
112
  title: 'Associated events',
107
113
  },
114
+ 8: {
115
+ title: 'Additional services',
116
+ additional_info: 'More information about services',
117
+ },
108
118
  },
109
119
  terms_and_conditions:
110
- 'By submitting the order, I agree to the <0>Terms and Conditions</0> of {{termsAndConditionsCompanies}} and acknowledge the <1>Privacy Policy</1>.',
120
+ 'I agree with the <0>Terms and Conditions</0> {{termsAndConditionsCompanies}} and the <1>Privacy Policy</1>.',
111
121
  insurance: {
112
122
  label: 'Ticket insurance',
113
123
  per_ticket: 'pc',
@@ -128,6 +138,16 @@ const en = {
128
138
  price: 'SMS event reminder price',
129
139
  },
130
140
  },
141
+ merchandise: {
142
+ show_sizes: 'Show sizes',
143
+ show_added: 'Show added',
144
+ },
145
+ services: {
146
+ add_tickets_first: 'Please add tickets first',
147
+ },
148
+ shipping: {
149
+ choose_address: 'Choose address',
150
+ },
131
151
  order_success: {
132
152
  title: 'Tickets have been successfully reserved. Now you just need to pay.',
133
153
  description:
@@ -162,6 +182,8 @@ const en = {
162
182
  components: {
163
183
  product_variant_dialog: {
164
184
  select_variant: 'You must select a product variant',
185
+ decrease_quantity: 'Decrease product variant quantity',
186
+ increase_quantity: 'Increase product variant quantity',
165
187
  },
166
188
  },
167
189
  };
@@ -7,6 +7,8 @@ const es = {
7
7
  add: 'Añadir',
8
8
  confirm: 'Confirmar',
9
9
  cancel: 'Cancelar',
10
+ close: 'Cerrar',
11
+ remove: 'Eliminar',
10
12
  pay: 'Pagar',
11
13
  change: 'Cambiar',
12
14
  free: 'Gratis',
@@ -53,6 +55,10 @@ const es = {
53
55
  category: 'Categoría',
54
56
  sms_notification: 'Notificación SMS',
55
57
  open_map: 'Abrir mapa',
58
+ payment_overview_open: 'Abrir resumen de pago',
59
+ payment_overview_close: 'Cerrar resumen de pago',
60
+ ticket_quantity_decrease: 'Disminuir cantidad de entradas',
61
+ ticket_quantity_increase: 'Aumentar cantidad de entradas',
56
62
  },
57
63
  validation: {
58
64
  required: 'Este campo es obligatorio.',
@@ -105,9 +111,13 @@ const es = {
105
111
  7: {
106
112
  title: 'Eventos asociados',
107
113
  },
114
+ 8: {
115
+ title: 'Servicios adicionales',
116
+ additional_info: 'Más información sobre los servicios',
117
+ },
108
118
  },
109
119
  terms_and_conditions:
110
- 'Al enviar el pedido, acepto los <0>Términos y Condiciones</0> de {{termsAndConditionsCompanies}} y reconozco la <1>Política de Privacidad</1>.',
120
+ 'Estoy de acuerdo con los <0>Términos y Condiciones</0> de {{termsAndConditionsCompanies}} y la <1>Política de Privacidad</1>.',
111
121
  insurance: {
112
122
  label: 'Seguro de entrada',
113
123
  per_ticket: 'pc',
@@ -128,6 +138,16 @@ const es = {
128
138
  price: 'Precio del recordatorio por SMS del evento',
129
139
  },
130
140
  },
141
+ merchandise: {
142
+ show_sizes: 'Mostrar tallas',
143
+ show_added: 'Mostrar añadidos',
144
+ },
145
+ services: {
146
+ add_tickets_first: 'Por favor, agregue entradas primero',
147
+ },
148
+ shipping: {
149
+ choose_address: 'Elegir dirección',
150
+ },
131
151
  order_success: {
132
152
  title: 'Las entradas han sido reservadas con éxito. Ahora solo tienes que pagar.',
133
153
  description:
@@ -163,6 +183,8 @@ const es = {
163
183
  components: {
164
184
  product_variant_dialog: {
165
185
  select_variant: 'Debes seleccionar una variante de producto',
186
+ decrease_quantity: 'Disminuir cantidad de variante de producto',
187
+ increase_quantity: 'Aumentar cantidad de variante de producto',
166
188
  },
167
189
  },
168
190
  };
@@ -7,6 +7,8 @@ const pl = {
7
7
  add: 'Dodaj',
8
8
  confirm: 'Potwierdź',
9
9
  cancel: 'Anuluj',
10
+ close: 'Zamknij',
11
+ remove: 'Usuń',
10
12
  pay: 'Zapłać',
11
13
  change: 'Zmień',
12
14
  free: 'Darmowe',
@@ -53,6 +55,10 @@ const pl = {
53
55
  category: 'Kategoria',
54
56
  sms_notification: 'Powiadomienie SMS',
55
57
  open_map: 'Otwórz mapę',
58
+ payment_overview_open: 'Otwórz podsumowanie płatności',
59
+ payment_overview_close: 'Zamknij podsumowanie płatności',
60
+ ticket_quantity_decrease: 'Zmniejsz liczbę biletów',
61
+ ticket_quantity_increase: 'Zwiększ liczbę biletów',
56
62
  },
57
63
  validation: {
58
64
  required: 'To pole jest wymagane.',
@@ -105,9 +111,13 @@ const pl = {
105
111
  7: {
106
112
  title: 'Powiązane wydarzenia',
107
113
  },
114
+ 8: {
115
+ title: 'Usługi dodatkowe',
116
+ additional_info: 'Więcej informacji o usługach',
117
+ },
108
118
  },
109
119
  terms_and_conditions:
110
- 'Składając zamówienie, akceptuję <0>Regulamin</0> {{termsAndConditionsCompanies}} oraz potwierdzam <1>Politykę prywatności</1>.',
120
+ 'Zgadzam się z <0>Regulaminem</0> {{termsAndConditionsCompanies}} i <1>Polityką prywatności</1>.',
111
121
  insurance: {
112
122
  label: 'Ubezpieczenie biletu',
113
123
  per_ticket: 'pc',
@@ -128,6 +138,16 @@ const pl = {
128
138
  price: 'Cena przypomnienia SMS o wydarzeniu',
129
139
  },
130
140
  },
141
+ merchandise: {
142
+ show_sizes: 'Pokaż rozmiary',
143
+ show_added: 'Pokaż dodane',
144
+ },
145
+ services: {
146
+ add_tickets_first: 'Najpierw dodaj bilety',
147
+ },
148
+ shipping: {
149
+ choose_address: 'Wybierz adres',
150
+ },
131
151
  order_success: {
132
152
  title: 'Bilety zostały pomyślnie zarezerwowane. Teraz wystarczy zapłacić.',
133
153
  description:
@@ -161,6 +181,8 @@ const pl = {
161
181
  components: {
162
182
  product_variant_dialog: {
163
183
  select_variant: 'Musisz wybrać wariant produktu',
184
+ decrease_quantity: 'Zmniejsz ilość wariantu produktu',
185
+ increase_quantity: 'Zwiększ ilość wariantu produktu',
164
186
  },
165
187
  },
166
188
  };
@@ -7,6 +7,8 @@ const sk = {
7
7
  add: 'Pridať',
8
8
  confirm: 'Potvrdiť',
9
9
  cancel: 'Zrušiť',
10
+ close: 'Zavrieť',
11
+ remove: 'Odstrániť',
10
12
  pay: 'Zaplaťte',
11
13
  change: 'Zmeniť',
12
14
  free: 'Zadarmo',
@@ -53,6 +55,10 @@ const sk = {
53
55
  category: 'Kategória',
54
56
  sms_notification: 'SMS notifikácia',
55
57
  open_map: 'Otvoriť mapu',
58
+ payment_overview_open: 'Otvoriť prehľad platby',
59
+ payment_overview_close: 'Zavrieť prehľad platby',
60
+ ticket_quantity_decrease: 'Znížiť počet vstupeniek',
61
+ ticket_quantity_increase: 'Zvýšiť počet vstupeniek',
56
62
  },
57
63
  validation: {
58
64
  required: 'Toto pole je povinné.',
@@ -105,9 +111,13 @@ const sk = {
105
111
  7: {
106
112
  title: 'Pridružené eventy',
107
113
  },
114
+ 8: {
115
+ title: 'Dodatočné služby',
116
+ additional_info: 'Viac informácií o službách',
117
+ },
108
118
  },
109
119
  terms_and_conditions:
110
- 'Odoslaním objednávky súhlasím s <0>Obchodnými podmienkami</0> {{termsAndConditionsCompanies}} a beriem na vedomie <1>Zásady ochrany osobných údajov</1>.',
120
+ 'Súhlasím s <0>Obchodnými podmienkami</0> {{termsAndConditionsCompanies}} a <1>Zásadami ochrany osobných údajov</1>.',
111
121
  insurance: {
112
122
  label: 'Poistenie vstupenky',
113
123
  per_ticket: 'pc',
@@ -121,13 +131,23 @@ const sk = {
121
131
  },
122
132
  },
123
133
  sms_notification: {
124
- label: 'SMS pripomenutie termínu akcie',
134
+ label: 'SMS pripomenutie termínu',
125
135
  modal: {
126
136
  description:
127
137
  'Pripomienka akcie deň vopred: SMS vás upozorní na blížiacu sa udalosť, aby ste na ňu nezabudli a stihli sa včas pripraviť.',
128
138
  price: 'Cena SMS pripomenutia termínu akcie',
129
139
  },
130
140
  },
141
+ merchandise: {
142
+ show_sizes: 'Zobraziť veľkosti',
143
+ show_added: 'Zobraziť pridané',
144
+ },
145
+ services: {
146
+ add_tickets_first: 'Najskôr prosím pridajte lístky',
147
+ },
148
+ shipping: {
149
+ choose_address: 'Vybrať adresu',
150
+ },
131
151
  order_success: {
132
152
  title: 'Vstupenky boli úspešne rezervované. Teraz už len zaplatiť.',
133
153
  description:
@@ -162,6 +182,8 @@ const sk = {
162
182
  components: {
163
183
  product_variant_dialog: {
164
184
  select_variant: 'Musíte vybrať variant produktu',
185
+ decrease_quantity: 'Znížiť množstvo variantu produktu',
186
+ increase_quantity: 'Zvýšiť množstvo variantu produktu',
165
187
  },
166
188
  },
167
189
  };
@@ -7,6 +7,8 @@ const uk = {
7
7
  add: 'Додати',
8
8
  confirm: 'Підтвердити',
9
9
  cancel: 'Скасувати',
10
+ close: 'Закрити',
11
+ remove: 'Видалити',
10
12
  pay: 'Оплатити',
11
13
  change: 'Змінити',
12
14
  free: 'Безкоштовно',
@@ -53,6 +55,10 @@ const uk = {
53
55
  category: 'Категорія',
54
56
  sms_notification: 'SMS-сповіщення',
55
57
  open_map: 'Відкрити карту',
58
+ payment_overview_open: 'Відкрити огляд платежу',
59
+ payment_overview_close: 'Закрити огляд платежу',
60
+ ticket_quantity_decrease: 'Зменшити кількість квитків',
61
+ ticket_quantity_increase: 'Збільшити кількість квитків',
56
62
  },
57
63
  validation: {
58
64
  required: "Це поле обов'язкове.",
@@ -105,9 +111,13 @@ const uk = {
105
111
  7: {
106
112
  title: 'Пов’язані події',
107
113
  },
114
+ 8: {
115
+ title: 'Додаткові послуги',
116
+ additional_info: 'Додаткова інформація про послуги',
117
+ },
108
118
  },
109
119
  terms_and_conditions:
110
- 'Надсилаючи замовлення, я погоджуюсь з <0>Правилами та умовами</0> {{termsAndConditionsCompanies}} та підтверджую <1>Політику конфіденційності</1>.',
120
+ 'Я погоджуюся з <0>Правилами та умовами</0> {{termsAndConditionsCompanies}} та <1>Політикою конфіденційності</1>.',
111
121
  insurance: {
112
122
  label: 'Страхування квитка',
113
123
  per_ticket: 'pc',
@@ -128,6 +138,16 @@ const uk = {
128
138
  price: 'Ціна SMS-нагадування про подію',
129
139
  },
130
140
  },
141
+ merchandise: {
142
+ show_sizes: 'Показати розміри',
143
+ show_added: 'Показати додані',
144
+ },
145
+ services: {
146
+ add_tickets_first: 'Будь ласка, спочатку додайте квитки',
147
+ },
148
+ shipping: {
149
+ choose_address: 'Вибрати адресу',
150
+ },
131
151
  order_success: {
132
152
  title: 'Квитки успішно зарезервовані. Тепер залишилося оплатити.',
133
153
  description:
@@ -162,6 +182,8 @@ const uk = {
162
182
  components: {
163
183
  product_variant_dialog: {
164
184
  select_variant: 'Ви повинні вибрати варіант продукту',
185
+ decrease_quantity: 'Зменшити кількість варіанту продукту',
186
+ increase_quantity: 'Збільшити кількість варіанту продукту',
165
187
  },
166
188
  },
167
189
  };
@@ -1 +1,2 @@
1
+ export const EVENTLOOK_ORDER_FORM_CONTAINER_ID = 'eventlook-order-form-container';
1
2
  export const EVENTLOOK_ORDER_FORM_ID = 'eventlook-order-form';
@@ -0,0 +1 @@
1
+ export const MAX_TICKETS_PER_ORDER = 10;
package/tsconfig.json CHANGED
@@ -24,4 +24,4 @@
24
24
  }
25
25
  },
26
26
  "include": ["src/**/*"]
27
- }
27
+ }
package/README DELETED
@@ -1 +0,0 @@
1
- Eventlook Order Form SDK