@licklist/design 0.78.7 → 0.78.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 (153) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/affiliate/form/AffiliateForm.js +6 -2
  3. package/dist/auth/AccessDenied/AccessDenied.d.ts.map +1 -1
  4. package/dist/auth/AccessDenied/AccessDenied.js +4 -3
  5. package/dist/auth/Authorizer.d.ts.map +1 -1
  6. package/dist/auth/Authorizer.js +10 -6
  7. package/dist/auth/ChangePassword/ChangePasswordComponent.d.ts.map +1 -1
  8. package/dist/auth/ChangePassword/ChangePasswordComponent.js +36 -41
  9. package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
  10. package/dist/auth/Layout/AuthNavComponent.js +2 -3
  11. package/dist/auth/Layout/UserNavDropDown.d.ts.map +1 -1
  12. package/dist/auth/Layout/UserNavDropDown.js +8 -9
  13. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  14. package/dist/auth/Login/LoginComponent.js +57 -60
  15. package/dist/auth/Logout/Logout.d.ts.map +1 -1
  16. package/dist/auth/Logout/Logout.js +4 -2
  17. package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
  18. package/dist/auth/Register/RegisterComponent.js +53 -58
  19. package/dist/auth/ResetPassword/ResetPasswordComponent.d.ts.map +1 -1
  20. package/dist/auth/ResetPassword/ResetPasswordComponent.js +26 -30
  21. package/dist/auth/Social/SocialCallbackComponent.d.ts.map +1 -1
  22. package/dist/auth/Social/SocialCallbackComponent.js +3 -3
  23. package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts +2 -2
  24. package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts.map +1 -1
  25. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +0 -1
  26. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  27. package/dist/events/event-card/EventCard.d.ts +1 -1
  28. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  29. package/dist/events/event-card/EventCard.js +1 -1
  30. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  31. package/dist/events/event-statistic-modal/EventStatisticModal.js +0 -1
  32. package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts +2 -2
  33. package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
  34. package/dist/file-upload/FileUpload.d.ts +1 -1
  35. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +1 -2
  36. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
  37. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +3 -4
  38. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
  39. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +5 -6
  40. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +1 -2
  41. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -1
  42. package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.d.ts.map +1 -1
  43. package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.js +3 -2
  44. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  45. package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.js +3 -3
  46. package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +2 -2
  47. package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
  48. package/dist/iframe/payment/order-items-table/OrderItemsTable.js +0 -1
  49. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
  50. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  51. package/dist/iframe/payment/payment-form/PaymentForm.js +0 -1
  52. package/dist/iframe/payment/payment-page/PaymentPage.d.ts +1 -1
  53. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  54. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  55. package/dist/iframe/ryft/RyftPaymentForm.js +1 -3
  56. package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -1
  57. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +3 -1
  61. package/dist/modals/dialog/Dialog.d.ts.map +1 -1
  62. package/dist/modals/dialog/Dialog.js +39 -41
  63. package/dist/modals/dialog/DialogContext.d.ts +2 -2
  64. package/dist/modals/dialog/DialogContext.d.ts.map +1 -1
  65. package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
  66. package/dist/pages/PrivacyComponent.d.ts +3 -0
  67. package/dist/pages/PrivacyComponent.d.ts.map +1 -0
  68. package/dist/pages/PrivacyComponent.js +536 -0
  69. package/dist/pages/TermsComponent.d.ts +3 -0
  70. package/dist/pages/TermsComponent.d.ts.map +1 -0
  71. package/dist/pages/TermsComponent.js +682 -0
  72. package/dist/pages/index.d.ts +3 -0
  73. package/dist/pages/index.d.ts.map +1 -0
  74. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  75. package/dist/product-set/card/ProductSetCard.js +3 -2
  76. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  77. package/dist/product-set/form/ProductsControl.js +1 -1
  78. package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -2
  79. package/dist/product-set/utils/index.d.ts +1 -1
  80. package/dist/product-set/utils/index.d.ts.map +1 -1
  81. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  82. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  83. package/dist/sales/notes/NotesTableRow.js +0 -1
  84. package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts.map +1 -1
  85. package/dist/sales/payment-form/components/RyftPayment/RyftPayment.js +1 -3
  86. package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
  87. package/dist/setting/dashboard/snippets/card/SnippetCard.d.ts.map +1 -1
  88. package/dist/setting/dashboard/snippets/card/SnippetCard.js +4 -4
  89. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  90. package/dist/snippet/snippet-template/preview/Preview.js +14 -21
  91. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  92. package/dist/static/RestrictedAccess.js +3 -2
  93. package/dist/static/index.js +1 -1
  94. package/dist/striped-static-table/StripedStaticTable.js +0 -1
  95. package/dist/table/ReactTableHelperComponent.d.ts.map +1 -1
  96. package/dist/table/ReactTableHelperComponent.js +3 -3
  97. package/dist/table/TableHelperComponent.d.ts.map +1 -1
  98. package/dist/table/TableHelperComponent.js +3 -3
  99. package/dist/venue-map-sets/card/VenueMapSetCard.d.ts.map +1 -1
  100. package/dist/venue-map-sets/card/VenueMapSetCard.js +4 -3
  101. package/dist/zone/card/ZoneCard.d.ts.map +1 -1
  102. package/dist/zone/card/ZoneCard.js +4 -3
  103. package/package.json +23 -20
  104. package/src/affiliate/form/AffiliateForm.tsx +4 -2
  105. package/src/auth/AccessDenied/AccessDenied.tsx +4 -3
  106. package/src/auth/Authorizer.tsx +11 -6
  107. package/src/auth/ChangePassword/ChangePasswordComponent.tsx +21 -26
  108. package/src/auth/Layout/AuthNavComponent.tsx +2 -3
  109. package/src/auth/Layout/UserNavDropDown.tsx +6 -7
  110. package/src/auth/Login/LoginComponent.tsx +42 -46
  111. package/src/auth/Logout/Logout.stories.tsx +12 -14
  112. package/src/auth/Logout/Logout.tsx +4 -3
  113. package/src/auth/Register/RegisterComponent.tsx +35 -41
  114. package/src/auth/ResetPassword/ResetPasswordComponent.tsx +16 -20
  115. package/src/auth/Social/SocialCallbackComponent.tsx +4 -4
  116. package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
  117. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -0
  118. package/src/events/event-card/EventCard.tsx +10 -8
  119. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -0
  120. package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
  121. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -8
  122. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +12 -4
  123. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
  124. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +18 -20
  125. package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +3 -2
  126. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -5
  127. package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +3 -3
  128. package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +3 -3
  129. package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +1 -1
  130. package/src/iframe/payment/payment-page/PaymentPage.tsx +1 -1
  131. package/src/iframe/ryft/RyftPaymentForm.tsx +2 -5
  132. package/src/iframe/ryft/utils/ryft-form.ts +1 -1
  133. package/src/index.ts +1 -0
  134. package/src/modals/dialog/Dialog.tsx +35 -36
  135. package/src/modals/dialog/DialogContext.tsx +8 -2
  136. package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
  137. package/src/pages/PrivacyComponent.tsx +318 -0
  138. package/src/pages/TermsComponent.tsx +306 -0
  139. package/src/pages/index.ts +2 -0
  140. package/src/product-set/card/ProductSetCard.tsx +3 -2
  141. package/src/product-set/form/ProductSetForm.tsx +2 -1
  142. package/src/product-set/utils/index.ts +15 -14
  143. package/src/recurrence-input/RecurrenceInput.tsx +4 -3
  144. package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +1 -3
  145. package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +1 -0
  146. package/src/setting/dashboard/snippets/card/SnippetCard.tsx +4 -3
  147. package/src/snippet/snippet-template/preview/Preview.tsx +6 -9
  148. package/src/static/RestrictedAccess.tsx +3 -6
  149. package/src/table/ReactTableHelperComponent.tsx +3 -5
  150. package/src/table/TableHelperComponent.tsx +3 -3
  151. package/src/venue-map-sets/card/VenueMapSetCard.tsx +4 -3
  152. package/src/zone/card/ZoneCard.tsx +4 -3
  153. package/yarn.lock +474 -542
@@ -1,7 +1,7 @@
1
- import { FC, useState } from 'react'
1
+ import { PropsWithChildren, useState } from 'react'
2
2
  import { CustomFieldSetsContext, ValuesType } from '../contexts'
3
3
 
4
- export const CustomFieldSetsProvider: FC = ({ children }) => {
4
+ export const CustomFieldSetsProvider = ({ children }: PropsWithChildren) => {
5
5
  const [values, setValues] = useState<ValuesType>({})
6
6
 
7
7
  return (
@@ -86,6 +86,7 @@ export const EditRecurrentEventModal = ({
86
86
  contentClassName='rounded'
87
87
  >
88
88
  <Form onSubmit={handleSubmit(onSubmit)} noValidate>
89
+ {/* @ts-ignore */}
89
90
  <Modal.Header className='border-0'>
90
91
  <Modal.Title as='h6'>{title}</Modal.Title>
91
92
  <Button
@@ -33,7 +33,7 @@ export interface EventCardProps extends HasPermissionProp {
33
33
  onPreview: () => void
34
34
  onEdit: () => void
35
35
  onCopy: () => void
36
- onRemove: () => void
36
+ onRemove?: () => void
37
37
  onOpenQrCode: () => void
38
38
  eventStatistic?: EventStatistic | null
39
39
  eventMetadata?: EventMetadata | null
@@ -212,13 +212,15 @@ export function EventCard({
212
212
  >
213
213
  <FaCopy />
214
214
  </button>
215
- <button
216
- type='button'
217
- className='event-card-link-button'
218
- onClick={onRemove}
219
- >
220
- <FaTrashAlt />
221
- </button>
215
+ {onRemove && (
216
+ <button
217
+ type='button'
218
+ className='event-card-link-button'
219
+ onClick={onRemove}
220
+ >
221
+ <FaTrashAlt />
222
+ </button>
223
+ )}
222
224
  </>
223
225
  )}
224
226
  </div>
@@ -37,6 +37,7 @@ export const EventStatisticModal = ({
37
37
  contentClassName='rounded'
38
38
  className='event-statistic-modal'
39
39
  >
40
+ {/* @ts-ignore */}
40
41
  <Modal.Header>
41
42
  <Modal.Title as='h6'>{title ?? t('eventStatistic')}</Modal.Title>
42
43
  <Button
@@ -1,6 +1,6 @@
1
- import { FC } from 'react'
1
+ import { PropsWithChildren } from 'react'
2
2
 
3
- export const DropdownWrapper: FC = ({ children }) => (
3
+ export const DropdownWrapper = ({ children }: PropsWithChildren) => (
4
4
  <div className='canvas-dropdown-wrapper'>
5
5
  <div className='arrow' />
6
6
  <div className='children-container'>{children}</div>
@@ -5,13 +5,15 @@ import { isEmpty, uniqBy } from 'lodash'
5
5
  import { useTranslation } from 'react-i18next'
6
6
  import { useIntl } from 'react-intl'
7
7
  import { Currency } from '@licklist/core/dist/Config'
8
- import { MenuStep } from '@licklist/plugins/dist/types/context/sale/menuSteps'
8
+ import {
9
+ MenuStep,
10
+ Product,
11
+ } from '@licklist/plugins/dist/types/context/sale/menuSteps'
9
12
  import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
10
- import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps'
11
13
  import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper'
12
- import { NumberInputHorizontal } from 'src/sales'
13
14
  import clsx from 'clsx'
14
15
  import { ProductCategory } from 'dist/product-set/types'
16
+ import { NumberInputHorizontal } from '../../../sales'
15
17
  import { MAX_PRODUCT_NUMBER } from '../../order-process/components/CategoryProduct/constants'
16
18
  import { FormOrderItem } from '../../order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput'
17
19
  import { getOrderProductModifiersPrice } from '../../order-process/components/BookingSummary/utils'
@@ -63,20 +65,23 @@ export const ProductWithModifierSetForm = ({
63
65
  const defaultProductQuantity = editOrderModifier?.productQuantity ?? 0
64
66
 
65
67
  const valuesOrder = watch()
66
- const productQuantity = valuesOrder?.product?.quantity ?? defaultProductQuantity
68
+ const productQuantity =
69
+ valuesOrder?.product?.quantity ?? defaultProductQuantity
67
70
 
68
71
  const orderModifiersSets =
69
72
  valuesOrder[`${product.id}`]?.orderProductModifiers || []
70
73
 
71
74
  const filteredOrderModifiers = filteredOrderModifierSets(orderModifiersSets)
72
75
 
73
- const orderModifierSets: OrderModifierByProduct[] = useMemo(() => [
76
+ const orderModifierSets: OrderModifierByProduct[] = useMemo(
77
+ () => [
74
78
  {
75
79
  productQuantity: productQuantity ?? 1,
76
80
  modifiers: filteredOrderModifiers,
77
81
  },
78
- ]
79
- , [filteredOrderModifiers, productQuantity])
82
+ ],
83
+ [filteredOrderModifiers, productQuantity],
84
+ )
80
85
 
81
86
  const onSubmit = (event) => {
82
87
  event.preventDefault()
@@ -180,7 +185,7 @@ export const ProductWithModifierSetForm = ({
180
185
  isLoading={isSubmitting}
181
186
  />
182
187
  </div>
183
- <div className=' d-flex flex-column align-items-center justify-content-center'>
188
+ <div className='d-flex flex-column align-items-center justify-content-center'>
184
189
  <div className='modifier-price pb-4 pl-5'>
185
190
  {formatToCurrency(product.price)}
186
191
  </div>
@@ -1,10 +1,10 @@
1
- import { useDialogContext, DialogContextProvider } from 'src/modals'
2
1
  import { Modal } from 'react-bootstrap'
3
2
  import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
4
3
  import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps'
5
- import { TicketDescription } from 'src/iframe/event'
6
4
  import clsx from 'clsx'
7
5
  import { ProductCategory } from 'dist/product-set/types'
6
+ import { useDialogContext, DialogContextProvider } from '../../../modals'
7
+ import { TicketDescription } from '../../event'
8
8
  import { FormOrderItem } from '../../order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput'
9
9
  import { useOnWindowUnmount } from '../../order-process/components/utils/useOnWindowUnmount'
10
10
  import { ProductWithModifierSetForm } from './ProductWithModifierSetForm'
@@ -48,12 +48,20 @@ export const ProductWithModifierSetModal = ({
48
48
  </button>
49
49
  </div>
50
50
  <div className='right-block' id='select-event-container'>
51
- <div className={clsx('manual-booking-container', !product?.images?.length && 'tw-mt-8')}>
51
+ <div
52
+ className={clsx(
53
+ 'manual-booking-container',
54
+ !product.images.length && 'tw-mt-8',
55
+ )}
56
+ >
52
57
  <div className='manual-booking-header'>
53
58
  <TicketDescription
54
59
  title={product.name}
55
60
  description={product.description}
56
- className={clsx('iframe-event__product-description', !product?.images?.length && 'mt-6')}
61
+ className={clsx(
62
+ 'iframe-event__product-description',
63
+ !product.images.length && 'mt-6',
64
+ )}
57
65
  classNameProductModal='d-block'
58
66
  images={product.images}
59
67
  isRequired={product.isRequired}
@@ -10,8 +10,8 @@ import { xor } from 'lodash'
10
10
  import clsx from 'clsx'
11
11
  import { Currency } from '@licklist/core/dist/Config'
12
12
  import { useIntl } from 'react-intl'
13
- import { MAX_PRODUCT_NUMBER } from 'src/iframe/order-process/components/CategoryProduct/constants'
14
- import { NumberInputHorizontal } from 'src/sales'
13
+ import { MAX_PRODUCT_NUMBER } from '../../../order-process/components/CategoryProduct/constants'
14
+ import { NumberInputHorizontal } from '../../../../sales'
15
15
  import { selectModifierType } from '../../utils'
16
16
 
17
17
  interface ModifiersSetControllProps {
@@ -2,7 +2,7 @@ import { useEffect } from 'react'
2
2
  import { useFormContext, Controller } from 'react-hook-form'
3
3
  import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
4
4
  import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps'
5
- import { useTranslation } from 'react-i18next' // Added translation hook
5
+ import { useTranslation } from 'react-i18next'
6
6
  import { ModifiersSetControl } from './ModifierSetControll'
7
7
  import { orderProductModifiersQuantity } from '../../utils'
8
8
 
@@ -69,25 +69,23 @@ export const ProductControl = ({
69
69
  return true
70
70
  },
71
71
  }}
72
- render={({ fieldState: { error } }) => {
73
- return(
74
- <>
75
- <ModifiersSetControl
76
- modifierSet={modifierSet}
77
- productId={product.id}
78
- modifiers={modifierSet.modifiers}
79
- isEditMode={!!editOrderModifier?.modifiers}
80
- orderProductModifierSets={editOrderModifier?.modifiers}
81
- isLoading={isLoading}
82
- />
83
- {error?.message && (
84
- <div className='invalid-feedback d-flex pl-4'>
85
- {error?.message}!
86
- </div>
87
- )}
88
- </>,
89
- )
90
- }}
72
+ render={({ fieldState: { error } }) => (
73
+ <>
74
+ <ModifiersSetControl
75
+ modifierSet={modifierSet}
76
+ productId={product.id}
77
+ modifiers={modifierSet.modifiers}
78
+ isEditMode={!!editOrderModifier?.modifiers}
79
+ orderProductModifierSets={editOrderModifier?.modifiers}
80
+ isLoading={isLoading}
81
+ />
82
+ {error?.message && (
83
+ <div className='invalid-feedback d-flex pl-4'>
84
+ {error?.message}!
85
+ </div>
86
+ )}
87
+ </>
88
+ )}
91
89
  />
92
90
  </div>
93
91
  )
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from 'react-i18next'
2
2
  import Button from 'react-bootstrap/Button'
3
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
4
3
  import { FaArrowLeft, FaArrowRight } from 'react-icons/fa'
4
+ import { useNavigate } from 'react-router-dom'
5
5
 
6
6
  interface PaginationDotsProps {
7
7
  amount: number
@@ -33,13 +33,14 @@ export function EventNavigationFooter({
33
33
  // @TODO remove and adjust components that uses old interface
34
34
  // used onSubmit for old cases
35
35
  const submitButtonProps = onSubmit ? { onSubmit } : { type: 'submit' }
36
+ const navigate = useNavigate()
36
37
 
37
38
  const onPrevButtonClick = () => {
38
39
  if (activeElement === 1) {
39
40
  if (onPrevStep) {
40
41
  onPrevStep()
41
42
  } else {
42
- RouteService.goBack()
43
+ navigate(-1)
43
44
  }
44
45
 
45
46
  return
@@ -10,10 +10,8 @@ import {
10
10
  Product,
11
11
  ProductCategory,
12
12
  } from '@licklist/plugins/dist/types/context/sale/menuSteps'
13
- import { Button } from 'react-bootstrap'
14
- import { FaTrashAlt } from 'react-icons/fa'
15
- import { ProductWithModifierSetModal } from 'src/iframe/ProductWithModifierModal'
16
13
  import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
14
+ import { ProductWithModifierSetModal } from '../../../ProductWithModifierModal'
17
15
  import { TicketDescription } from '../../../event/ticket-description'
18
16
  import { ProductQuantityInput } from './components/ProductQuantityInput'
19
17
  import { FormOrderItem } from './components/ProductQuantityInput/ProductQuantityInput'
@@ -160,8 +158,8 @@ export const CategoryProduct = ({
160
158
  ).orderModifiersSets
161
159
  ?.filter((_, index) => index !== modifierIndex)
162
160
  .concat(value.orderModifiersSets)
163
-
164
- onChange({
161
+
162
+ onChange({
165
163
  ...value,
166
164
  orderModifiersSets: editedOrderModifiersSets,
167
165
  quantity: editedOrderModifiersSets.reduce(
@@ -1,5 +1,5 @@
1
1
  import { useRef, useMemo, useEffect, useState, useCallback } from 'react'
2
- import { useLocation, useHistory } from 'react-router-dom'
2
+ import { useLocation, useNavigate } from 'react-router-dom'
3
3
  import clsx from 'clsx'
4
4
  import { useTranslation } from 'react-i18next'
5
5
  import { SnippetLoader } from '../../../../static'
@@ -22,7 +22,7 @@ export const NavigationSteps = ({
22
22
  }: NavigationStepsProps) => {
23
23
  const { t } = useTranslation('Design')
24
24
  const location = useLocation()
25
- const history = useHistory()
25
+ const navigate = useNavigate()
26
26
 
27
27
  const containerRef = useRef<HTMLDivElement>(null)
28
28
  const containerWrapperRef = useRef<HTMLDivElement>(null)
@@ -45,7 +45,7 @@ export const NavigationSteps = ({
45
45
  pathname: string,
46
46
  queryParams?: Record<string, string>,
47
47
  ) => {
48
- history.push({
48
+ navigate({
49
49
  pathname,
50
50
  search: new URLSearchParams(queryParams).toString(),
51
51
  })
@@ -1,4 +1,4 @@
1
- import { FC, ReactNode } from 'react'
1
+ import { PropsWithChildren, ReactNode } from 'react'
2
2
  import { useTranslation } from 'react-i18next'
3
3
  import { useIntl } from 'react-intl'
4
4
  import * as Config from '@licklist/core/dist/Config'
@@ -15,14 +15,14 @@ export type PaymentCardProps = {
15
15
  isFreePayment?: boolean
16
16
  }
17
17
 
18
- export const PaymentCard: FC<PaymentCardProps> = ({
18
+ export const PaymentCard = ({
19
19
  order,
20
20
  totalWithDiscount,
21
21
  recalculatedFee,
22
22
  discountBlock,
23
23
  paymentDetail,
24
24
  isFreePayment,
25
- }) => {
25
+ }: PropsWithChildren<PaymentCardProps>) => {
26
26
  const { t } = useTranslation(['Design'])
27
27
  const { formatNumber } = useIntl()
28
28
 
@@ -22,4 +22,4 @@ export const useOnWindowUnmount = ({
22
22
  }, [])
23
23
 
24
24
  return null
25
- }
25
+ }
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
4
4
  import { Button, Col } from 'react-bootstrap'
5
5
  import { PaymentSessionContext } from '@licklist/plugins/dist/context/payment/PaymentSessionContext'
6
6
  import { PaymentLinkResponse } from '@licklist/plugins/dist/hooks/Api/usePaymentApi'
7
- import { BookingSummaryProps } from 'src/iframe/order-process/components/BookingSummary/types'
7
+ import { BookingSummaryProps } from '../../order-process/components/BookingSummary/types'
8
8
  // eslint-disable-next-line max-len
9
9
  import { SummaryTotalBlock } from '../../order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock'
10
10
  import { LoaderIndicator } from '../../../static'
@@ -1,9 +1,7 @@
1
1
  import { useEffect, useRef, useState } from 'react'
2
2
  import { useTranslation } from 'react-i18next'
3
3
  import { useForm } from 'react-hook-form'
4
-
5
4
  import Button from 'react-bootstrap/Button'
6
- import { useHistory } from 'react-router-dom'
7
5
  import Alert from 'react-bootstrap/Alert'
8
6
  import {
9
7
  STATUS_APPROVED,
@@ -16,7 +14,6 @@ import {
16
14
  AttemptPaymentResponse,
17
15
  } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
18
16
  import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
19
-
20
17
  import { BlockLoader, ButtonLoader } from '../../static'
21
18
  import { injectComponentsInRyftForm } from './utils/ryft-form'
22
19
 
@@ -72,7 +69,7 @@ export const RyftPaymentForm = ({
72
69
  const showApplePayButton =
73
70
  isAppUsingInIframe &&
74
71
  providerPaymentSettings?.additionalPaymentMethodsEnabled
75
- const history = useHistory()
72
+
76
73
  const [isValid, setIsValid] = useState(false)
77
74
  const [isBtnDisabled, setIsBtnDisabled] = useState(false)
78
75
  const [ryftInitFailure, setRyftInitFailure] = useState<boolean>(false)
@@ -214,7 +211,7 @@ export const RyftPaymentForm = ({
214
211
  <Button
215
212
  variant='primary'
216
213
  onClick={() => {
217
- history.go(0)
214
+ window.location.reload()
218
215
  }}
219
216
  >
220
217
  {t('Ryft:refresh')}
@@ -1,4 +1,4 @@
1
- import { TFunction } from 'react-i18next'
1
+ import { TFunction } from 'i18next'
2
2
  import { RyftPaymentFormProps } from '../RyftPaymentForm'
3
3
 
4
4
  interface InjectComponentsInRyftForm
package/src/index.ts CHANGED
@@ -42,3 +42,4 @@ export * from './calendar'
42
42
  export * from './availability-indicator'
43
43
  export * from './number-of-people-input'
44
44
  export * from './fullscreen-loader'
45
+ export * from './pages'
@@ -32,42 +32,41 @@ export const Dialog = ({
32
32
  }
33
33
 
34
34
  return (
35
- <>
36
- <Modal
37
- show={isActive}
38
- onHide={onDecline}
39
- animation={false}
40
- size='sm'
41
- centered
42
- className='text-center justify-content-center rounded'
43
- >
44
- <Modal.Header className='justify-content-center border-0'>
45
- {title && <Modal.Title as='h6'>{title}</Modal.Title>}
46
- </Modal.Header>
47
- {content && (
48
- <Modal.Body className='justify-content-center'>{content}</Modal.Body>
35
+ <Modal
36
+ show={isActive}
37
+ onHide={onDecline}
38
+ animation={false}
39
+ size='sm'
40
+ centered
41
+ className='text-center justify-content-center rounded'
42
+ >
43
+ {/* @ts-ignore */}
44
+ <Modal.Header className='justify-content-center border-0'>
45
+ {title && <Modal.Title as='h6'>{title}</Modal.Title>}
46
+ </Modal.Header>
47
+ {content && (
48
+ <Modal.Body className='justify-content-center'>{content}</Modal.Body>
49
+ )}
50
+ <Modal.Footer className='border-0 justify-content-center'>
51
+ {customButtons || (
52
+ <>
53
+ <Button
54
+ variant='secondary'
55
+ className='modal-buttons'
56
+ onClick={declineHandler}
57
+ >
58
+ {t('cancel')}
59
+ </Button>
60
+ <Button
61
+ variant='primary'
62
+ className='modal-buttons'
63
+ onClick={approveHandler}
64
+ >
65
+ {t('Design:confirm')}
66
+ </Button>
67
+ </>
49
68
  )}
50
- <Modal.Footer className='border-0 justify-content-center'>
51
- {customButtons || (
52
- <>
53
- <Button
54
- variant='secondary'
55
- className='modal-buttons'
56
- onClick={declineHandler}
57
- >
58
- {t('cancel')}
59
- </Button>
60
- <Button
61
- variant='primary'
62
- className='modal-buttons'
63
- onClick={approveHandler}
64
- >
65
- {t('Design:confirm')}
66
- </Button>
67
- </>
68
- )}
69
- </Modal.Footer>
70
- </Modal>
71
- </>
69
+ </Modal.Footer>
70
+ </Modal>
72
71
  )
73
72
  }
@@ -1,4 +1,10 @@
1
- import { createContext, useContext, FC, useState, useCallback } from 'react'
1
+ import {
2
+ createContext,
3
+ useContext,
4
+ useState,
5
+ useCallback,
6
+ PropsWithChildren,
7
+ } from 'react'
2
8
 
3
9
  interface IDialogContext {
4
10
  isShownDialog: boolean
@@ -20,7 +26,7 @@ export const DialogContext = createContext<IDialogContext>({
20
26
  onApproveDialog: () => undefined,
21
27
  })
22
28
 
23
- export const DialogContextProvider: FC = ({ children }) => {
29
+ export const DialogContextProvider = ({ children }: PropsWithChildren) => {
24
30
  const [isShownDialog, setShownDialog] = useState(false)
25
31
 
26
32
  const showDialog = () => {
@@ -35,8 +35,6 @@ export function EmailTemplateCard({
35
35
  return (
36
36
  <div className='snippet-template-card'>
37
37
  <div className='snippet-template-card-header'>
38
- {/* TODO fix issue react router types
39
- @ts-expect-error */}
40
38
  <Link to={href}>{name}</Link>
41
39
  {hasPermission && Boolean(onRemove) && (
42
40
  <ConfirmModal