@licklist/design 0.72.3 → 0.72.4

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 (90) hide show
  1. package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
  2. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  3. package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
  4. package/dist/auth/Logout/Logout.js +1 -0
  5. package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
  6. package/dist/auth/Register/RegisterFormComponent.d.ts.map +1 -1
  7. package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts.map +1 -1
  8. package/dist/auth/Router.d.ts.map +1 -1
  9. package/dist/auth/Router.js +2 -0
  10. package/dist/calendar/utils/index.d.ts +1 -1
  11. package/dist/calendar/utils/index.d.ts.map +1 -1
  12. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
  13. package/dist/events/event-card/utils.d.ts.map +1 -1
  14. package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
  15. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
  16. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  17. package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -1
  18. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  19. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +1 -1
  20. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.d.ts.map +1 -1
  21. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.js +3 -3
  22. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  23. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  24. package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
  25. package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +2 -2
  26. package/dist/iframe/ryft/RyftPaymentForm.js +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
  29. package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
  30. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  31. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  32. package/dist/product-set/form/VenueMapsControl.d.ts +1 -1
  33. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  34. package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -0
  35. package/dist/sales/life-time-sales/LifeTimeSalesChart.js +1 -0
  36. package/dist/sales/manual-booking/select-event/SelectEvent.js +1 -0
  37. package/dist/sales/manual-booking/select-menu/SelectMenu.js +1 -0
  38. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -0
  39. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  40. package/dist/setting/dashboard/snippet-templates/card/SnippetTemplateCard.d.ts.map +1 -1
  41. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  42. package/dist/snippet/snippet-template/preview/Preview.js +3 -1
  43. package/dist/static/date-range-input/utils/index.d.ts +1 -1
  44. package/dist/static/date-range-input/utils/index.d.ts.map +1 -1
  45. package/dist/static/loader/FullScreenLoader.d.ts +8 -0
  46. package/dist/static/loader/FullScreenLoader.d.ts.map +1 -0
  47. package/dist/static/loader/FullScreenLoader.js +41 -0
  48. package/dist/static/loader/LoaderIndicator.d.ts +2 -3
  49. package/dist/static/loader/LoaderIndicator.d.ts.map +1 -1
  50. package/dist/static/loader/LoaderIndicator.js +4 -2
  51. package/dist/static/loader/index.d.ts +1 -0
  52. package/dist/static/loader/index.d.ts.map +1 -1
  53. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
  54. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -1
  55. package/dist/styles/static/Loader.scss +9 -0
  56. package/package.json +5 -5
  57. package/src/auth/Layout/AuthNavComponent.tsx +4 -0
  58. package/src/auth/Login/LoginComponent.tsx +2 -0
  59. package/src/auth/Login/LoginFormComponent.tsx +2 -0
  60. package/src/auth/Register/RegisterComponent.tsx +2 -0
  61. package/src/auth/Register/RegisterFormComponent.tsx +4 -0
  62. package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +4 -0
  63. package/src/auth/Router.tsx +2 -0
  64. package/src/calendar/Calendar.stories.tsx +2 -2
  65. package/src/calendar/utils/index.ts +1 -1
  66. package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +9 -7
  67. package/src/events/event-card/utils.ts +10 -9
  68. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -1
  69. package/src/events/event-statistic-modal/hooks/useTableData.tsx +1 -0
  70. package/src/events/event-statistic-modal/utils/index.ts +2 -1
  71. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +13 -11
  72. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -2
  73. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +1 -2
  74. package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +19 -20
  75. package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
  76. package/src/notification/sms-template/card/SmsTemplateCard.tsx +2 -0
  77. package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -4
  78. package/src/product-set/control/DateInput.tsx +3 -4
  79. package/src/product-set/form/VenueMapsControl.tsx +1 -1
  80. package/src/setting/admin/AdminSettingForm.tsx +4 -0
  81. package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +2 -0
  82. package/src/snippet/snippet-template/preview/Preview.tsx +1 -2
  83. package/src/static/date-range-input/utils/index.ts +1 -1
  84. package/src/static/loader/FullScreenLoader.tsx +16 -0
  85. package/src/static/loader/LoaderIndicator.tsx +6 -3
  86. package/src/static/loader/index.ts +1 -0
  87. package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
  88. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -1
  89. package/src/styles/static/Loader.scss +9 -0
  90. package/yarn.lock +14 -42
@@ -105,6 +105,8 @@ function RegisterComponent({
105
105
  <h6 className='text-center'>
106
106
  <Trans t={t} i18nKey='registerPromo'>
107
107
  Fill out the form below to sign up for {{ name: t('bookedit') }}
108
+ {/* TODO fix issue react router types
109
+ @ts-expect-error */}
108
110
  . Already signed up? Then just <Link to='/login'>Log in</Link>.
109
111
  </Trans>
110
112
  </h6>
@@ -400,10 +400,14 @@ function RegisterFormComponent({
400
400
  <Trans t={t} i18nKey='User:agreementsPromo'>
401
401
  By creating an account, I agree to {{ name: t('User:bookedit') }}
402
402
  &apos;s{' '}
403
+ {/* TODO fix issue react router types
404
+ @ts-expect-error */}
403
405
  <Link to='/terms' className={[isLoading && 'disabled'].join(' ')}>
404
406
  terms of service
405
407
  </Link>{' '}
406
408
  and{' '}
409
+ {/* TODO fix issue react router types
410
+ @ts-expect-error */}
407
411
  <Link to='/privacy' className={[isLoading && 'disabled'].join(' ')}>
408
412
  privacy policy
409
413
  </Link>
@@ -97,6 +97,8 @@ function ResetPasswordFormComponent(props: ResetPasswordFormComponentProps) {
97
97
  <p className='text-center mb-0 mt-3'>
98
98
  <Trans t={t} i18nKey='User:signinPromo'>
99
99
  Already a user?{' '}
100
+ {/* TODO fix issue react router types
101
+ @ts-expect-error */}
100
102
  <Link to='/login' className={[isLoading && 'disabled'].join(' ')}>
101
103
  Sign in
102
104
  </Link>
@@ -106,6 +108,8 @@ function ResetPasswordFormComponent(props: ResetPasswordFormComponentProps) {
106
108
  <p className='text-center mb-0 mt-3'>
107
109
  <Trans t={t} i18nKey='User:loginPromo'>
108
110
  Don&apos;t have an account?{' '}
111
+ {/* TODO fix issue react router types
112
+ @ts-expect-error */}
109
113
  <Link
110
114
  to='/register'
111
115
  className={[isLoading && 'disabled'].join(' ')}
@@ -29,6 +29,8 @@ function Router(props: RouterProps) {
29
29
  }
30
30
  }, [])
31
31
 
32
+ // TODO fix issue react router types
33
+ // @ts-expect-error
32
34
  return <BrowserRouter history={history}>{children}</BrowserRouter>
33
35
  }
34
36
 
@@ -28,7 +28,7 @@ Default.args = {
28
28
  fromPrice: 'from £10',
29
29
  selectedDate: null,
30
30
  setSelectedDate: () => null,
31
- calendarDates: getMonthCalendarDates(now),
31
+ calendarDates: getMonthCalendarDates({ initialDate: now }),
32
32
  currentDate: now,
33
33
  getDateTimeButtonProps: () => ({
34
34
  resources: [],
@@ -50,7 +50,7 @@ Loading.args = {
50
50
  fromPrice: 'from £10',
51
51
  selectedDate: null,
52
52
  setSelectedDate: () => null,
53
- calendarDates: getMonthCalendarDates(now),
53
+ calendarDates: getMonthCalendarDates({ initialDate: now }),
54
54
  currentDate: now,
55
55
  getDateTimeButtonProps: () => ({
56
56
  resources: [],
@@ -3,7 +3,7 @@ import { DateTime, Interval } from 'luxon'
3
3
 
4
4
  type Builder = (args: {
5
5
  initialDate?: DateTime
6
- timeZone: TimeZone['name']
6
+ timeZone?: TimeZone['name']
7
7
  }) => DateTime[]
8
8
 
9
9
  export const getMonthCalendarDates: Builder = ({
@@ -28,11 +28,13 @@ export const DEADLINE_NAME = [
28
28
 
29
29
  export type DeadLineNameType = (typeof DEADLINE_NAME)[number]
30
30
 
31
- type SaleDeadlineType = {
32
- saleDeadline: null | number
33
- } | {
34
- [key: string] : null | number
35
- }
31
+ type SaleDeadlineType =
32
+ | {
33
+ saleDeadline: null | number
34
+ }
35
+ | {
36
+ [key: string]: null | number
37
+ }
36
38
 
37
39
  export const SaleDeadline = ({
38
40
  disabled = false,
@@ -52,8 +54,8 @@ export const SaleDeadline = ({
52
54
  const [deadlineType, setDeadlineType] = useState<DeadlineType>(
53
55
  SALE_DEADLINE_BEFORE_TYPE,
54
56
  )
55
-
56
- const saleDeadline = watch(deadLineCategory || SALE_DEADLINE_NAME)
57
+
58
+ const saleDeadline = watch(deadLineCategory || SALE_DEADLINE_NAME)
57
59
 
58
60
  useEffect(() => {
59
61
  if (onlyBefore) return
@@ -2,24 +2,25 @@ import { DATE_FORMAT, DATE_TIME_FULL_FORMAT } from '@licklist/core/dist/Config'
2
2
  import { EventStatistic } from '@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper'
3
3
  import { DateTime } from 'luxon'
4
4
 
5
- export const MIN_EVENT_DESCRIPTION_SIZE = 150;
6
- export const EVENT_DESCRIPTION_SIZE = 350;
7
- export const EMOJI_REGEX = /<span data-emoji-replacer=""><img[^>]*alt="([^"]+)"[^>]*><\/span>/g;
5
+ export const MIN_EVENT_DESCRIPTION_SIZE = 150
6
+ export const EVENT_DESCRIPTION_SIZE = 350
7
+ export const EMOJI_REGEX =
8
+ /<span data-emoji-replacer=""><img[^>]*alt="([^"]+)"[^>]*><\/span>/g
8
9
 
9
10
  export const formatContent = (content, maxLength = EVENT_DESCRIPTION_SIZE) => {
10
- if (!content) return '';
11
+ if (!content) return ''
11
12
 
12
- const replacedContent = replaceEmojiImagesWithText(content);
13
+ const replacedContent = replaceEmojiImagesWithText(content)
13
14
 
14
15
  if (replacedContent.length <= maxLength) {
15
- return replacedContent;
16
+ return replacedContent
16
17
  }
17
18
 
18
- return replacedContent.slice(0, maxLength).concat('...');
19
- };
19
+ return replacedContent.slice(0, maxLength).concat('...')
20
+ }
20
21
 
21
22
  function replaceEmojiImagesWithText(text) {
22
- return text.replace(EMOJI_REGEX, (_, emojiText) => emojiText);
23
+ return text.replace(EMOJI_REGEX, (_, emojiText) => emojiText)
23
24
  }
24
25
 
25
26
  /**
@@ -23,7 +23,7 @@ export const EventStatisticModal = ({
23
23
  }: EventStatisticModalProps) => {
24
24
  const { t } = useTranslation('Design')
25
25
 
26
- const data = useTableData(date, eventStatistic)
26
+ const data = useTableData(date, eventStatistic, eventId)
27
27
  const handleClose = () => {
28
28
  setIsOpen(false)
29
29
  }
@@ -11,6 +11,7 @@ import { StaticTableData } from '../../../table'
11
11
  export const useTableData = (
12
12
  date: Event['startAt'] | null,
13
13
  eventStatistic: EventStatistic | null,
14
+ eventId: string,
14
15
  ) => {
15
16
  const { t } = useTranslation('Design')
16
17
  const { formatNumber } = useIntl()
@@ -100,7 +100,8 @@ export const convertEventStatisticToTableData = (
100
100
 
101
101
  const maxTotalQuantity = maxBy(overrides, 'id')?.totalQuantity
102
102
 
103
- const totalQuantity = maxTotalQuantity || productSummary?.totalQuantity
103
+ const totalQuantity =
104
+ maxTotalQuantity || productSummary?.totalQuantity
104
105
 
105
106
  summaryMap.set(`${categoryName}.${productSummary.name}`, {
106
107
  name: productSummary.name,
@@ -22,24 +22,23 @@ export const SummaryTotal = ({
22
22
 
23
23
  const cartSum = isFreePayment
24
24
  ? 0
25
- : cartSumByOrderProducts({orderProducts}) + transactionFee
25
+ : cartSumByOrderProducts({ orderProducts }) + transactionFee
26
26
 
27
-
28
- const totalSum = isFreePayment
27
+ const totalSum = isFreePayment
29
28
  ? 0
30
- : cartSumByOrderProducts({orderProducts, isTotalSum: true}) +
31
- transactionFee;
32
-
33
- const hasRemaingToPay = totalSum > cartSum;
29
+ : cartSumByOrderProducts({ orderProducts, isTotalSum: true }) +
30
+ transactionFee
31
+
32
+ const hasRemaingToPay = totalSum > cartSum
34
33
 
35
34
  if (!orderProducts.length) {
36
35
  return null
37
36
  }
38
37
 
39
38
  return (
40
- <div className="d-flex flex-column justify-content-between">
39
+ <div className='d-flex flex-column justify-content-between'>
41
40
  <SummaryTotalBlock
42
- label={t(hasRemaingToPay ? "payNow" : "total")}
41
+ label={t(hasRemaingToPay ? 'payNow' : 'total')}
43
42
  amount={cartSum}
44
43
  />
45
44
  {!!totalWithDiscount && !isFreePayment && (
@@ -50,9 +49,12 @@ export const SummaryTotal = ({
50
49
  )}
51
50
  {hasRemaingToPay && (
52
51
  <>
53
- <SummaryTotalBlock label={t("remaining")} amount={totalSum - cartSum} />
52
+ <SummaryTotalBlock
53
+ label={t('remaining')}
54
+ amount={totalSum - cartSum}
55
+ />
54
56
 
55
- <SummaryTotalBlock label={t("total")} amount={totalSum} />
57
+ <SummaryTotalBlock label={t('total')} amount={totalSum} />
56
58
  </>
57
59
  )}
58
60
  </div>
@@ -9,8 +9,8 @@ export const cartSumByOrderProducts = ({
9
9
  orderProducts,
10
10
  isTotalSum,
11
11
  }: {
12
- orderProducts?: OrderItem[];
13
- isTotalSum?: boolean;
12
+ orderProducts?: OrderItem[]
13
+ isTotalSum?: boolean
14
14
  }) => {
15
15
  if (!orderProducts || !orderProducts.length) {
16
16
  return 0
@@ -69,8 +69,7 @@ export const useResizePageBody = () => {
69
69
  rightBlockHeight -
70
70
  CALENDAR_WRAPPER_HEIGHT,
71
71
  }
72
-
73
- }
72
+ }
74
73
  return {
75
74
  maxHeight:
76
75
  height -
@@ -59,20 +59,19 @@ export const PaymentStatusPage = ({
59
59
 
60
60
  if (isLoading) return <LoaderIndicator isLoaded={false} />
61
61
 
62
-
63
- const orderCartAmountByFormValues = cartSumByOrderProducts({
64
- orderProducts:
65
- bookingSummaryProps?.formValues &&
66
- Object.values(bookingSummaryProps?.formValues),
67
- });
68
- const orderTotalAmountByFormValues = cartSumByOrderProducts({
69
- orderProducts:
70
- bookingSummaryProps?.formValues &&
71
- Object.values(bookingSummaryProps?.formValues),
72
- isTotalSum: true,
73
- });
74
- const hasRemaingToPay =
75
- orderTotalAmountByFormValues > orderCartAmountByFormValues;
62
+ const orderCartAmountByFormValues = cartSumByOrderProducts({
63
+ orderProducts:
64
+ bookingSummaryProps?.formValues &&
65
+ Object.values(bookingSummaryProps?.formValues),
66
+ })
67
+ const orderTotalAmountByFormValues = cartSumByOrderProducts({
68
+ orderProducts:
69
+ bookingSummaryProps?.formValues &&
70
+ Object.values(bookingSummaryProps?.formValues),
71
+ isTotalSum: true,
72
+ })
73
+ const hasRemaingToPay =
74
+ orderTotalAmountByFormValues > orderCartAmountByFormValues
76
75
 
77
76
  // User can fill promocode only in iframe appcliation.
78
77
  // It didn't possible via payment link. This check will
@@ -81,9 +80,9 @@ const hasRemaingToPay =
81
80
  // For payment status page booking summary props can be empty
82
81
  // so we should also check for them
83
82
  const isCalculatedAmountGreaterThanOrderAmount =
84
- !hasRemaingToPay &&
85
- bookingSummaryProps &&
86
- orderCartAmountByFormValues > totalAmount;
83
+ !hasRemaingToPay &&
84
+ bookingSummaryProps &&
85
+ orderCartAmountByFormValues > totalAmount
87
86
 
88
87
  return (
89
88
  <Page
@@ -140,7 +139,7 @@ const hasRemaingToPay =
140
139
  <>
141
140
  {isCalculatedAmountGreaterThanOrderAmount && (
142
141
  <SummaryTotalBlock
143
- label={t(hasRemaingToPay ? "payNow" : "total")}
142
+ label={t(hasRemaingToPay ? 'payNow' : 'total')}
144
143
  amount={
145
144
  orderCartAmountByFormValues +
146
145
  (bookingSummaryProps?.transactionFee || 0)
@@ -159,9 +158,9 @@ const hasRemaingToPay =
159
158
  (bookingSummaryProps?.transactionFee || 0)
160
159
  }
161
160
  />
162
- {hasRemaingToPay && (
161
+ {hasRemaingToPay && (
163
162
  <SummaryTotalBlock
164
- label={t("remaining")}
163
+ label={t('remaining')}
165
164
  amount={
166
165
  orderTotalAmountByFormValues -
167
166
  orderCartAmountByFormValues
@@ -35,6 +35,8 @@ 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 */}
38
40
  <Link to={href}>{name}</Link>
39
41
  {hasPermission && Boolean(onRemove) && (
40
42
  <ConfirmModal
@@ -33,6 +33,8 @@ export function SmsTemplateCard({
33
33
  return (
34
34
  <div className='snippet-template-card'>
35
35
  <div className='snippet-template-card-header'>
36
+ {/* TODO fix issue react router types
37
+ @ts-expect-error */}
36
38
  <Link to={href}>{name}</Link>
37
39
  {hasPermission && Boolean(onRemove) && (
38
40
  <ConfirmModal
@@ -198,7 +198,8 @@ export const DateAndRecurrenceInput = ({
198
198
  move(prevIndex, nextIndex)
199
199
  }
200
200
 
201
- const errorMessage = errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
201
+ const errorMessage =
202
+ errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
202
203
 
203
204
  useEffect(() => {
204
205
  if (fields.length) {
@@ -308,9 +309,7 @@ export const DateAndRecurrenceInput = ({
308
309
  })}
309
310
  />
310
311
 
311
- <div className='manual-form-error'>
312
- {errorMessage}
313
- </div>
312
+ <div className='manual-form-error'>{errorMessage}</div>
314
313
  </div>
315
314
  </OverlayTrigger>
316
315
  </Form.Group>
@@ -195,7 +195,8 @@ export const DateInput = ({
195
195
  }, 100)
196
196
  }
197
197
 
198
- const errorMessage = errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
198
+ const errorMessage =
199
+ errors.menuRecurrences?.message || errors.menuRecurrences?.root?.message
199
200
 
200
201
  return (
201
202
  <Form.Group>
@@ -284,9 +285,7 @@ export const DateInput = ({
284
285
  })}
285
286
  />
286
287
 
287
- <div className='manual-form-error'>
288
- {errorMessage}
289
- </div>
288
+ <div className='manual-form-error'>{errorMessage}</div>
290
289
  </div>
291
290
  </OverlayTrigger>
292
291
  </Form.Group>
@@ -3,9 +3,9 @@ import { Button } from 'react-bootstrap'
3
3
  import { VenueMap } from '@licklist/core/dist/DataMapper/Product/VenueMapDataMapper'
4
4
  import MediaService from '@licklist/plugins/dist/services/Media/MediaService'
5
5
  import { PointProduct } from '@licklist/core/dist/DataMapper/Product/PointProductDataMapper'
6
+ import { Product } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper'
6
7
  import { FullscreenModal } from '../../modals/fullscreen'
7
8
  import { EventVenueMap } from '../../events/event-venue-map'
8
- import { Product } from '../types'
9
9
 
10
10
  type VenueMapsControlProps = {
11
11
  venueMaps?: VenueMap[]
@@ -145,10 +145,14 @@ export const AdminSettingForm = ({
145
145
  ) && (
146
146
  <>
147
147
  {t('noCountryIsProvided')}
148
+ {/* TODO fix issue react router types
149
+ @ts-expect-error */}
148
150
  <Link
149
151
  role='button'
150
152
  to={`/provider/${providerMetadata?.providerType}/${providerMetadata?.providableId}/update`}
151
153
  >
154
+ {/* TODO fix issue react router types
155
+ @ts-expect-error */}
152
156
  {t('here')}
153
157
  </Link>
154
158
  </>
@@ -24,6 +24,8 @@ export function SnippetTemplateCard({
24
24
  return (
25
25
  <div className='snippet-template-card'>
26
26
  <div className='snippet-template-card-header'>
27
+ {/* TODO fix issue react router types
28
+ @ts-expect-error */}
27
29
  <Link to={href}>{name}</Link>
28
30
  {hasPermission && !isDefault && (
29
31
  <button
@@ -29,7 +29,6 @@ import {
29
29
  import { NumberInput } from '../../../iframe/order-process/components/CategoryProduct/components/NumberInput'
30
30
  import { SnippetTemplateContext } from '../context/snippetTemplate'
31
31
 
32
-
33
32
  const DEFAULT_IMAGE =
34
33
  'https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80'
35
34
 
@@ -58,7 +57,7 @@ export function Preview({
58
57
 
59
58
  const [currentDate, setCurrentDate] = useState<DateTime>(defaultStartDay)
60
59
  const [selectedDate, setSelectedDate] = useState<DateTime | null>(null)
61
- const calendarDates = getMonthCalendarDates(currentDate)
60
+ const calendarDates = getMonthCalendarDates({ initialDate: currentDate })
62
61
 
63
62
  return (
64
63
  <div className='w-100 h-100 snippet-template-preview'>
@@ -58,7 +58,7 @@ export const stringDatesToInputValue = ({
58
58
  )} - ${DateTime.fromJSDate(nextEndDate).toFormat(INPUT_DATE_FORMAT)}`
59
59
  }
60
60
 
61
- export const getDateParams = (date: Date) => {
61
+ export const getDateParams = (date: Date): [number, number, number] => {
62
62
  const year = date.getFullYear()
63
63
  const month = date.getMonth() + 1
64
64
  const monthDate = date.getDate()
@@ -0,0 +1,16 @@
1
+ import clsx from 'clsx'
2
+ import { LoaderIndicator, LoaderIndicatorProps } from './LoaderIndicator'
3
+
4
+ interface FullScreenLoaderProps {
5
+ containerClassName?: string
6
+ indicatorProps?: LoaderIndicatorProps
7
+ }
8
+
9
+ export const FullScreenLoader = ({
10
+ containerClassName,
11
+ indicatorProps,
12
+ }: FullScreenLoaderProps) => (
13
+ <div className={clsx('fullscreen-loader', containerClassName)}>
14
+ <LoaderIndicator {...indicatorProps} />
15
+ </div>
16
+ )
@@ -1,16 +1,17 @@
1
1
  /* eslint-disable react/jsx-pascal-case */
2
- import { ReactNode } from 'react'
2
+ import { PropsWithChildren } from 'react'
3
3
  import * as ReactLoader from 'react-loader'
4
4
  import ILoaderOptions from '../../types/static/ILoaderOptions'
5
5
 
6
6
  export interface LoaderIndicatorProps {
7
- children?: ReactNode | ReactNode[]
8
7
  isLoaded?: boolean
9
8
  options?: ILoaderOptions
10
9
  className?: string
11
10
  }
12
11
 
13
- export function LoaderIndicator(props: LoaderIndicatorProps) {
12
+ export function LoaderIndicator(
13
+ props: PropsWithChildren<LoaderIndicatorProps>,
14
+ ) {
14
15
  const { children, isLoaded, options, className = '' } = props
15
16
 
16
17
  const defaultOptions: ILoaderOptions = {
@@ -37,6 +38,8 @@ export function LoaderIndicator(props: LoaderIndicatorProps) {
37
38
  } as ILoaderOptions
38
39
 
39
40
  return (
41
+ // TODO Remove this library, it's deprecated and even removed from npm packages
42
+ // @ts-expect-error
40
43
  <ReactLoader.default
41
44
  loaded={isLoaded!}
42
45
  options={mergedOptions}
@@ -5,3 +5,4 @@ export { ButtonLoader } from './ButtonLoader'
5
5
  export { SnippetLoader } from './SnippetLoader'
6
6
  export { PaymentLoader } from './PaymentLoader'
7
7
  export type { PaymentLoaderProps } from './PaymentLoader'
8
+ export { FullScreenLoader } from './FullScreenLoader'
@@ -4,8 +4,7 @@
4
4
  align-items: center;
5
5
  gap: 0.5rem;
6
6
  font-weight: 300;
7
- max-width: 100%;
8
-
7
+ width: 100%;
9
8
 
10
9
  .indicator-label {
11
10
  text-overflow: ellipsis;
@@ -25,8 +24,6 @@
25
24
  }
26
25
  }
27
26
 
28
-
29
-
30
27
  .activity-card {
31
28
  .availability-indicator {
32
29
  margin-top: 0.5rem;
@@ -180,7 +180,7 @@
180
180
  .form-disable-box {
181
181
  top: 20rem;
182
182
  }
183
- }
183
+ }
184
184
  }
185
185
 
186
186
  @include media-breakpoint-up(md) {
@@ -27,6 +27,15 @@
27
27
  }
28
28
  }
29
29
 
30
+ .fullscreen-loader {
31
+ width: 100vw;
32
+ height: 100vh;
33
+ position: fixed;
34
+ z-index: 5000;
35
+ top: 0;
36
+ left: 0;
37
+ }
38
+
30
39
  .payment-loader {
31
40
  position: absolute;
32
41
  top: 50%;
package/yarn.lock CHANGED
@@ -2453,9 +2453,9 @@ __metadata:
2453
2453
  languageName: node
2454
2454
  linkType: hard
2455
2455
 
2456
- "@licklist/core@npm:0.32.10":
2457
- version: 0.32.10
2458
- resolution: "@licklist/core@npm:0.32.10"
2456
+ "@licklist/core@npm:0.32.12":
2457
+ version: 0.32.12
2458
+ resolution: "@licklist/core@npm:0.32.12"
2459
2459
  dependencies:
2460
2460
  "@sentry/browser": "npm:6.2.0"
2461
2461
  axios: "npm:0.26.0"
@@ -2477,35 +2477,7 @@ __metadata:
2477
2477
  react-i18next: 11.8.8
2478
2478
  react-intl: 6.6.8
2479
2479
  zustand: 3.7.2
2480
- checksum: 10c0/7c0b0bae3c81bb88b9e4e660c4657f2ea3cb82edd6ce2b5d2846f4265cb60363484c7e128f422227609331d9cac79667a9619b55b27418f69e2b0b554490ff1a
2481
- languageName: node
2482
- linkType: hard
2483
-
2484
- "@licklist/core@npm:0.32.11":
2485
- version: 0.32.11
2486
- resolution: "@licklist/core@npm:0.32.11"
2487
- dependencies:
2488
- "@sentry/browser": "npm:6.2.0"
2489
- axios: "npm:0.26.0"
2490
- i18next: "npm:19.4.5"
2491
- luxon: "npm:3.5.0"
2492
- react: "npm:17.0.2"
2493
- react-dom: "npm:17.0.2"
2494
- react-i18next: "npm:11.8.8"
2495
- react-intl: "npm:6.6.8"
2496
- uuid: "npm:9.0.0"
2497
- wait-for-expect: "npm:3.0.2"
2498
- zustand: "npm:3.7.2"
2499
- peerDependencies:
2500
- "@licklist/eslint-config": 0.5.6
2501
- axios: 0.26.0
2502
- luxon: 3.5.0
2503
- react: 17.0.2
2504
- react-dom: 17.0.2
2505
- react-i18next: 11.8.8
2506
- react-intl: 6.6.8
2507
- zustand: 3.7.2
2508
- checksum: 10c0/6555b3ef6a6d5907a6978b08fcde5f0e4d16992fda5afe725ed7dfc34a606032722937edc2471e1dd2a68ce7c85aa93983eea6543c1a74fd1f78ed92c9f8041b
2480
+ checksum: 10c0/a3f2ad9000bd665afcc794ab02a4bd14e558807127036c2ead0453ee3b21810fded1c71aff1fc0317f8547cc5ad6ac419ac77badf661ad5c371928ef05e4f7fe
2509
2481
  languageName: node
2510
2482
  linkType: hard
2511
2483
 
@@ -2520,9 +2492,9 @@ __metadata:
2520
2492
  "@dnd-kit/utilities": "npm:2.0.0"
2521
2493
  "@fortawesome/fontawesome-svg-core": "npm:1.2.34"
2522
2494
  "@fortawesome/free-solid-svg-icons": "npm:5.15.2"
2523
- "@licklist/core": "npm:0.32.11"
2495
+ "@licklist/core": "npm:0.32.12"
2524
2496
  "@licklist/eslint-config": "npm:0.5.6"
2525
- "@licklist/plugins": "npm:0.35.9"
2497
+ "@licklist/plugins": "npm:0.35.10"
2526
2498
  "@mantine/core": "npm:6.0.22"
2527
2499
  "@mantine/hooks": "npm:6.0.22"
2528
2500
  "@mdx-js/react": "npm:1.6.22"
@@ -2651,9 +2623,9 @@ __metadata:
2651
2623
  vite-plugin-svgr: "npm:4.2.0"
2652
2624
  vite-tsconfig-paths: "npm:5.0.1"
2653
2625
  peerDependencies:
2654
- "@licklist/core": 0.32.11
2626
+ "@licklist/core": 0.32.12
2655
2627
  "@licklist/eslint-config": 0.5.6
2656
- "@licklist/plugins": 0.35.9
2628
+ "@licklist/plugins": 0.35.10
2657
2629
  lodash: 4.17.21
2658
2630
  luxon: 3.5.0
2659
2631
  react: 17.0.2
@@ -2683,11 +2655,11 @@ __metadata:
2683
2655
  languageName: node
2684
2656
  linkType: hard
2685
2657
 
2686
- "@licklist/plugins@npm:0.35.9":
2687
- version: 0.35.9
2688
- resolution: "@licklist/plugins@npm:0.35.9"
2658
+ "@licklist/plugins@npm:0.35.10":
2659
+ version: 0.35.10
2660
+ resolution: "@licklist/plugins@npm:0.35.10"
2689
2661
  dependencies:
2690
- "@licklist/core": "npm:0.32.10"
2662
+ "@licklist/core": "npm:0.32.12"
2691
2663
  axios: "npm:0.26.0"
2692
2664
  history: "npm:4.10.1"
2693
2665
  laravel-echo: "npm:1.15.1"
@@ -2707,7 +2679,7 @@ __metadata:
2707
2679
  rrule: "npm:2.6.8"
2708
2680
  use-debounce: "npm:7.0.1"
2709
2681
  peerDependencies:
2710
- "@licklist/core": 0.32.10
2682
+ "@licklist/core": 0.32.12
2711
2683
  "@licklist/eslint-config": 0.5.6
2712
2684
  axios: 0.26.0
2713
2685
  lodash: 4.17.21
@@ -2719,7 +2691,7 @@ __metadata:
2719
2691
  react-loader: 2.4.7
2720
2692
  react-query: 3.34.12
2721
2693
  react-router-dom: 5.2.0
2722
- checksum: 10c0/a298001b55a22e93667f0f5095010b65c1fed745ed2ce8cbb2c7ea2f534301dbb9e7924f97b394bfdf4d8aec9339ea575575964e28301974e6aaf31fe371c725
2694
+ checksum: 10c0/2bdd1cad9e15d1442b93ca5d8649d89ce9ef08c77c4be7426daecfc04e3cc22771a6cd97bb8716f2a194655c0d2ee910a6080582914fd94c26f4193a0973d426
2723
2695
  languageName: node
2724
2696
  linkType: hard
2725
2697