@licklist/design 0.72.2 → 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.
- package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +1 -0
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterFormComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts.map +1 -1
- package/dist/auth/Router.d.ts.map +1 -1
- package/dist/auth/Router.js +2 -0
- package/dist/calendar/utils/index.d.ts +1 -1
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts +3 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +11 -4
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +3 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +20 -6
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +5 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +5 -3
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -1
- package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.js +3 -3
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +2 -2
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -0
- package/dist/index.js +2 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.d.ts +1 -1
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +7 -3
- package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -0
- package/dist/sales/life-time-sales/LifeTimeSalesChart.js +1 -0
- package/dist/sales/manual-booking/select-event/SelectEvent.js +1 -0
- package/dist/sales/manual-booking/select-menu/SelectMenu.js +1 -0
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -0
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/snippet-templates/card/SnippetTemplateCard.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +3 -1
- package/dist/static/date-range-input/utils/index.d.ts +1 -1
- package/dist/static/date-range-input/utils/index.d.ts.map +1 -1
- package/dist/static/loader/FullScreenLoader.d.ts +8 -0
- package/dist/static/loader/FullScreenLoader.d.ts.map +1 -0
- package/dist/static/loader/FullScreenLoader.js +41 -0
- package/dist/static/loader/LoaderIndicator.d.ts +2 -3
- package/dist/static/loader/LoaderIndicator.d.ts.map +1 -1
- package/dist/static/loader/LoaderIndicator.js +4 -2
- package/dist/static/loader/index.d.ts +1 -0
- package/dist/static/loader/index.d.ts.map +1 -1
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -1
- package/dist/styles/static/Loader.scss +9 -0
- package/package.json +5 -5
- package/src/auth/Layout/AuthNavComponent.tsx +4 -0
- package/src/auth/Login/LoginComponent.tsx +2 -0
- package/src/auth/Login/LoginFormComponent.tsx +2 -0
- package/src/auth/Register/RegisterComponent.tsx +2 -0
- package/src/auth/Register/RegisterFormComponent.tsx +4 -0
- package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +4 -0
- package/src/auth/Router.tsx +2 -0
- package/src/calendar/Calendar.stories.tsx +2 -2
- package/src/calendar/utils/index.ts +1 -1
- package/src/events/edit-event-modal/IntervalInput.tsx +13 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +24 -2
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +9 -7
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +9 -1
- package/src/events/event-card/utils.ts +10 -9
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -1
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +1 -0
- package/src/events/event-statistic-modal/utils/index.ts +2 -1
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +13 -11
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -2
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +1 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +19 -20
- package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
- package/src/notification/sms-template/card/SmsTemplateCard.tsx +2 -0
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -4
- package/src/product-set/control/DateInput.tsx +3 -4
- package/src/product-set/form/VenueMapsControl.tsx +1 -1
- package/src/recurrence-input/RecurrenceInput.tsx +10 -6
- package/src/setting/admin/AdminSettingForm.tsx +4 -0
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +2 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +1 -2
- package/src/static/date-range-input/utils/index.ts +1 -1
- package/src/static/loader/FullScreenLoader.tsx +16 -0
- package/src/static/loader/LoaderIndicator.tsx +6 -3
- package/src/static/loader/index.ts +1 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -1
- package/src/styles/static/Loader.scss +9 -0
- package/yarn.lock +175 -175
|
@@ -100,7 +100,8 @@ export const convertEventStatisticToTableData = (
|
|
|
100
100
|
|
|
101
101
|
const maxTotalQuantity = maxBy(overrides, 'id')?.totalQuantity
|
|
102
102
|
|
|
103
|
-
const totalQuantity =
|
|
103
|
+
const totalQuantity =
|
|
104
|
+
maxTotalQuantity || productSummary?.totalQuantity
|
|
104
105
|
|
|
105
106
|
summaryMap.set(`${categoryName}.${productSummary.name}`, {
|
|
106
107
|
name: productSummary.name,
|
package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx
CHANGED
|
@@ -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
|
-
|
|
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=
|
|
39
|
+
<div className='d-flex flex-column justify-content-between'>
|
|
41
40
|
<SummaryTotalBlock
|
|
42
|
-
label={t(hasRemaingToPay ?
|
|
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
|
-
|
|
52
|
+
<SummaryTotalBlock
|
|
53
|
+
label={t('remaining')}
|
|
54
|
+
amount={totalSum - cartSum}
|
|
55
|
+
/>
|
|
54
56
|
|
|
55
|
-
|
|
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
|
|
@@ -59,20 +59,19 @@ export const PaymentStatusPage = ({
|
|
|
59
59
|
|
|
60
60
|
if (isLoading) return <LoaderIndicator isLoaded={false} />
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
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
|
-
|
|
161
|
+
{hasRemaingToPay && (
|
|
163
162
|
<SummaryTotalBlock
|
|
164
|
-
label={t(
|
|
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 =
|
|
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 =
|
|
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[]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable prefer-destructuring */
|
|
2
2
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3
3
|
import { DateTime } from 'luxon'
|
|
4
|
-
import { useEffect, useReducer } from 'react'
|
|
4
|
+
import { useEffect, useReducer, useState } from 'react'
|
|
5
5
|
import RRule, { Frequency, Weekday } from 'rrule'
|
|
6
6
|
import RecurrenceEndInput, { defaultOccurrences } from './RecurrenceEndInput'
|
|
7
7
|
import RecurrenceIntervalAndFrequencyInput from './RecurrenceIntervalAndFrequencyInput'
|
|
@@ -39,10 +39,14 @@ export function RecurrenceInput({
|
|
|
39
39
|
// TODO: unhardcode timezone
|
|
40
40
|
() =>
|
|
41
41
|
onChange(
|
|
42
|
-
RRule.optionsToString({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
RRule.optionsToString({
|
|
43
|
+
freq: state.freq,
|
|
44
|
+
count: state.count,
|
|
45
|
+
interval: state.interval,
|
|
46
|
+
byweekday: state.byweekday,
|
|
47
|
+
tzid: 'Europe/London',
|
|
48
|
+
...state,
|
|
49
|
+
}).replace('RRULE:', ''),
|
|
46
50
|
),
|
|
47
51
|
[state],
|
|
48
52
|
)
|
|
@@ -54,8 +58,8 @@ export function RecurrenceInput({
|
|
|
54
58
|
frequency={state.freq}
|
|
55
59
|
onChange={({ interval, frequency }) => {
|
|
56
60
|
updateState({
|
|
57
|
-
interval,
|
|
58
61
|
freq: frequency,
|
|
62
|
+
interval,
|
|
59
63
|
byweekday:
|
|
60
64
|
frequency === state.freq
|
|
61
65
|
? state.byweekday
|
|
@@ -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 {
|
|
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(
|
|
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}
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
gap: 0.5rem;
|
|
6
6
|
font-weight: 300;
|
|
7
|
-
|
|
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;
|