@licklist/design 0.70.6-dev.0 → 0.70.7
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/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/assets/iframe/available.svg +4 -4
- package/dist/assets/iframe/available.svg.js +18 -16
- package/dist/auth/Login/LoginComponent.js +1 -2
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +2 -4
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -1
- package/dist/availability-indicator/AvailabilityIndicator.js +18 -112
- package/dist/calendar/Calendar.d.ts +0 -2
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +2 -3
- package/dist/calendar/utils/index.d.ts +2 -8
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +21 -9
- package/dist/date-time-button/DateContent.d.ts.map +1 -1
- package/dist/date-time-button/DateContent.js +3 -3
- package/dist/date-time-button/DateTimeButton.d.ts +1 -3
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +3 -5
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -3
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +0 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.js +4 -11
- package/dist/iframe/activity-card/ActivityCard.d.ts +1 -3
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +3 -5
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +32 -43
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +12 -25
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +5 -4
- package/dist/layout/DropDown.d.ts +1 -2
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +0 -3
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +2 -48
- package/dist/product-set/form/ProductSetForm.d.ts +1 -4
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +1 -1
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +2 -0
- package/dist/product-set/form/ProductsControl.js +0 -1
- package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +3 -0
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +3 -0
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +0 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +0 -3
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +0 -12
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +0 -3
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +0 -3
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +2 -0
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +0 -21
- package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.js +1 -16
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +0 -8
- package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +4 -10
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +0 -3
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +0 -3
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +0 -3
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -9
- package/dist/styles/date-time-button/DateTimeButton.scss +1 -2
- package/dist/styles/iframe-events/TicketDescription.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +0 -22
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/tiptap-editor/TipTapEditor.d.ts +1 -2
- package/dist/tiptap-editor/TipTapEditor.d.ts.map +1 -1
- package/dist/tiptap-editor/TipTapEditor.js +2 -32
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +0 -3
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +0 -3
- package/package.json +6 -8
- package/src/affiliate/form/AffiliateForm.tsx +0 -1
- package/src/assets/iframe/available.svg +4 -4
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/availability-indicator/AvailabilityIndicator.tsx +17 -92
- package/src/calendar/Calendar.tsx +0 -2
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +0 -3
- package/src/calendar/utils/index.ts +26 -17
- package/src/date-time-button/DateContent.tsx +3 -3
- package/src/date-time-button/DateTimeButton.tsx +3 -7
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
- package/src/events/event-venue-map/EventVenueMap.tsx +0 -1
- package/src/events/event-venue-map/hooks/useCanvasSize.ts +1 -5
- package/src/iframe/activity-card/ActivityCard.tsx +2 -15
- package/src/iframe/event/ticket-description/TicketDescription.tsx +22 -35
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +3 -14
- package/src/iframe/ryft/utils/ryft-form.ts +5 -6
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
- package/src/product-set/form/ProductSetForm.tsx +2 -6
- package/src/product-set/form/ProductZonesControl.tsx +4 -1
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/product-set/form/SubProductsControl.tsx +3 -0
- package/src/product-set/form/VenueMapsControl.tsx +3 -0
- package/src/product-set/product/ProductControl.tsx +1 -0
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
- package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
- package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
- package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +0 -4
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
- package/src/resource/form/components/CapacityControl.tsx +0 -1
- package/src/resource/form/components/SortControl.tsx +0 -1
- package/src/sales/booking/results/components/ResultCard.tsx +2 -0
- package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
- package/src/setting/admin/PaymentFeeForm.tsx +0 -5
- package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
- package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
- package/src/sortable-tree/SortableTreeItem.tsx +0 -6
- package/src/static/CurrencyNumberInput.tsx +0 -1
- package/src/static/form-number-input/FormNumberInput.tsx +0 -1
- package/src/static/number-input/NumberInput.tsx +0 -1
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -9
- package/src/styles/date-time-button/DateTimeButton.scss +1 -2
- package/src/styles/iframe-events/TicketDescription.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +0 -22
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/tiptap-editor/TipTapEditor.tsx +1 -8
- package/src/zone/form/components/GameDurationControl.tsx +0 -1
- package/src/zone/form/components/SortControl.tsx +0 -1
- package/yarn.lock +31 -32
|
@@ -2,7 +2,6 @@ import { ReactElement } from 'react'
|
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import { DateTime } from 'luxon'
|
|
4
4
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
5
|
-
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
|
|
6
5
|
import { AvailabilityIndicator } from '../availability-indicator'
|
|
7
6
|
import { DateContent } from './DateContent'
|
|
8
7
|
|
|
@@ -22,7 +21,6 @@ export type DateTimeButtonProps = {
|
|
|
22
21
|
resources?: ZoneResourcesAvailability | null
|
|
23
22
|
showResources?: boolean
|
|
24
23
|
variant: Variant
|
|
25
|
-
availabilityFormat?: AvailabilityFormat | null
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
export const DateTimeButton = ({
|
|
@@ -35,7 +33,6 @@ export const DateTimeButton = ({
|
|
|
35
33
|
resources,
|
|
36
34
|
showResources,
|
|
37
35
|
variant = Variant.week,
|
|
38
|
-
availabilityFormat,
|
|
39
36
|
}: DateTimeButtonProps) => {
|
|
40
37
|
const isSoldOut =
|
|
41
38
|
_isSoldOut ||
|
|
@@ -46,7 +43,7 @@ export const DateTimeButton = ({
|
|
|
46
43
|
const isPast = variant === Variant.time ? isPastTime(date) : isPastDate(date)
|
|
47
44
|
|
|
48
45
|
const isDisabled = _isDisabled || isSoldOut || isPast
|
|
49
|
-
|
|
46
|
+
|
|
50
47
|
return (
|
|
51
48
|
<button
|
|
52
49
|
type='button'
|
|
@@ -70,11 +67,10 @@ export const DateTimeButton = ({
|
|
|
70
67
|
variant={variant}
|
|
71
68
|
/>
|
|
72
69
|
{price && !isDisabled && <div className='price'>{price}</div>}
|
|
73
|
-
{showResources &&
|
|
70
|
+
{showResources && resources && (
|
|
74
71
|
<AvailabilityIndicator
|
|
75
|
-
availabilityFormat={availabilityFormat}
|
|
76
72
|
resources={resources}
|
|
77
|
-
isUnavailable={
|
|
73
|
+
isUnavailable={_isDisabled || isPast}
|
|
78
74
|
isSoldOut={isSoldOut}
|
|
79
75
|
/>
|
|
80
76
|
)}
|
|
@@ -10,17 +10,13 @@ export const useCanvasSize = ({
|
|
|
10
10
|
width: componentWidth,
|
|
11
11
|
height: componentHeight,
|
|
12
12
|
}: CanvasSizeProps) => {
|
|
13
|
-
// TODO Fix often updating of width and height
|
|
14
13
|
const { width, height } = useWindowDimensions()
|
|
15
14
|
|
|
16
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
|
-
const memoizedDimensions = useMemo(() => ({ width, height }), [width])
|
|
18
|
-
|
|
19
15
|
const memoedComponentParameters = useMemo(() => {
|
|
20
16
|
if (!componentWidth && !componentHeight) return null
|
|
21
17
|
|
|
22
18
|
return { width: componentWidth, height: componentHeight }
|
|
23
19
|
}, [componentWidth, componentHeight])
|
|
24
20
|
|
|
25
|
-
return memoedComponentParameters ||
|
|
21
|
+
return memoedComponentParameters || { width, height }
|
|
26
22
|
}
|
|
@@ -2,7 +2,6 @@ import { ReactNode } from 'react'
|
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
4
4
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
5
|
-
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
|
|
6
5
|
import { AvailabilityIndicator } from '../../availability-indicator'
|
|
7
6
|
|
|
8
7
|
export const LAYOUT_GRID = 'grid'
|
|
@@ -19,7 +18,6 @@ export type ActivityCardProps = {
|
|
|
19
18
|
availableTimes?: string | null
|
|
20
19
|
image?: Image | null
|
|
21
20
|
resources?: ZoneResourcesAvailability
|
|
22
|
-
availabilityFormat?: AvailabilityFormat | null
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
export const ActivityCard = ({
|
|
@@ -32,7 +30,6 @@ export const ActivityCard = ({
|
|
|
32
30
|
onSelect,
|
|
33
31
|
isSelected,
|
|
34
32
|
layout = LAYOUT_GRID,
|
|
35
|
-
availabilityFormat,
|
|
36
33
|
resources,
|
|
37
34
|
}: ActivityCardProps) => {
|
|
38
35
|
if (layout === LAYOUT_GRID) {
|
|
@@ -53,12 +50,7 @@ export const ActivityCard = ({
|
|
|
53
50
|
{description && (
|
|
54
51
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
55
52
|
)}
|
|
56
|
-
{resources &&
|
|
57
|
-
<AvailabilityIndicator
|
|
58
|
-
resources={resources}
|
|
59
|
-
availabilityFormat={availabilityFormat}
|
|
60
|
-
/>
|
|
61
|
-
)}
|
|
53
|
+
{resources && <AvailabilityIndicator resources={resources} />}
|
|
62
54
|
</div>
|
|
63
55
|
</button>
|
|
64
56
|
)
|
|
@@ -84,12 +76,7 @@ export const ActivityCard = ({
|
|
|
84
76
|
{description && (
|
|
85
77
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
86
78
|
)}
|
|
87
|
-
{resources &&
|
|
88
|
-
<AvailabilityIndicator
|
|
89
|
-
resources={resources}
|
|
90
|
-
availabilityFormat={availabilityFormat}
|
|
91
|
-
/>
|
|
92
|
-
)}
|
|
79
|
+
{resources && <AvailabilityIndicator resources={resources} />}
|
|
93
80
|
</div>
|
|
94
81
|
|
|
95
82
|
<hr className='list-activity-card-hr' />
|
|
@@ -30,6 +30,7 @@ export function TicketDescription({
|
|
|
30
30
|
canExpand = true,
|
|
31
31
|
}: TicketDescriptionProps) {
|
|
32
32
|
const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false)
|
|
33
|
+
const showDescription = !!description
|
|
33
34
|
|
|
34
35
|
const wrapperClasses = clsx('ticket-description', className)
|
|
35
36
|
|
|
@@ -41,6 +42,24 @@ export function TicketDescription({
|
|
|
41
42
|
'--description-wrapper-height': 'inherit',
|
|
42
43
|
} as CSSProperties
|
|
43
44
|
|
|
45
|
+
const renderDescription = () => (
|
|
46
|
+
<div className='description-content'>
|
|
47
|
+
<div className='d-flex flex-column'>
|
|
48
|
+
<div className='product-title'>
|
|
49
|
+
{title} {isRequired && <span>*</span>}
|
|
50
|
+
</div>
|
|
51
|
+
{showDescription && (
|
|
52
|
+
<TipTapEditor
|
|
53
|
+
viewMode
|
|
54
|
+
disabled
|
|
55
|
+
content={description}
|
|
56
|
+
editorStyle={{ backgroundColor: 'transparent' }}
|
|
57
|
+
/>
|
|
58
|
+
)}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
)
|
|
62
|
+
|
|
44
63
|
return (
|
|
45
64
|
<div className={wrapperClasses}>
|
|
46
65
|
<div
|
|
@@ -59,46 +78,14 @@ export function TicketDescription({
|
|
|
59
78
|
isExpanded={isDescriptionExpanded}
|
|
60
79
|
setIsExpanded={setIsDescriptionExpanded}
|
|
61
80
|
>
|
|
62
|
-
|
|
63
|
-
title={title}
|
|
64
|
-
isRequired={isRequired}
|
|
65
|
-
description={description}
|
|
66
|
-
/>
|
|
81
|
+
{renderDescription()}
|
|
67
82
|
</TextExpand>
|
|
68
83
|
) : (
|
|
69
|
-
|
|
70
|
-
title={title}
|
|
71
|
-
isRequired={isRequired}
|
|
72
|
-
description={description}
|
|
73
|
-
/>
|
|
84
|
+
renderDescription()
|
|
74
85
|
)}
|
|
75
86
|
</div>
|
|
76
87
|
</div>
|
|
77
|
-
{price && <div className={clsx(
|
|
88
|
+
{price && <div className={clsx(showDescription && 'mt-5')}>{price}</div>}
|
|
78
89
|
</div>
|
|
79
90
|
)
|
|
80
91
|
}
|
|
81
|
-
|
|
82
|
-
const Description = ({
|
|
83
|
-
title,
|
|
84
|
-
isRequired,
|
|
85
|
-
description,
|
|
86
|
-
}: Pick<TicketDescriptionProps, 'title' | 'isRequired' | 'description'>) => (
|
|
87
|
-
<div className='description-content'>
|
|
88
|
-
<div className='d-flex flex-column'>
|
|
89
|
-
<div className='product-title'>
|
|
90
|
-
{title} {isRequired && <span>*</span>}
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
{!!description && (
|
|
94
|
-
<TipTapEditor
|
|
95
|
-
viewMode
|
|
96
|
-
disabled
|
|
97
|
-
content={description}
|
|
98
|
-
editorStyle={{ backgroundColor: 'transparent' }}
|
|
99
|
-
hideEmptyEditor
|
|
100
|
-
/>
|
|
101
|
-
)}
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
)
|
package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx
CHANGED
|
@@ -89,7 +89,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
89
89
|
<FormControl
|
|
90
90
|
type='number'
|
|
91
91
|
onChange={(e) => handleChangeValue(Number(e.target.value))}
|
|
92
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
93
92
|
value={value}
|
|
94
93
|
min={0}
|
|
95
94
|
max={max}
|
|
@@ -102,14 +101,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|
|
|
102
101
|
<button
|
|
103
102
|
type='button'
|
|
104
103
|
onClick={handleArrowUpClick}
|
|
105
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
106
|
-
onFocus={(event) =>
|
|
107
|
-
event.target.addEventListener(
|
|
108
|
-
'wheel',
|
|
109
|
-
(event) => event.preventDefault(),
|
|
110
|
-
{ passive: false },
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
104
|
className={`payment-number-input__btn-up ${
|
|
114
105
|
plusButtonGreyedOut && 'disabled-number-input-button'
|
|
115
106
|
}`}
|
|
@@ -33,11 +33,6 @@ export const ryftErrorMap: Record<string, string> = {
|
|
|
33
33
|
|
|
34
34
|
export type RyftPaymentFormValues = Record<string, never>
|
|
35
35
|
|
|
36
|
-
interface GoogleAndApplePayResponse {
|
|
37
|
-
paymentSession: AttemptPaymentResponse
|
|
38
|
-
eventName: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
36
|
export interface RyftPaymentFormProps {
|
|
42
37
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
38
|
accountId: any
|
|
@@ -94,10 +89,10 @@ export const RyftPaymentForm = ({
|
|
|
94
89
|
setReferrerBeforePayment()
|
|
95
90
|
}
|
|
96
91
|
|
|
97
|
-
const handleSubmit = async (
|
|
92
|
+
const handleSubmit = async () => {
|
|
98
93
|
setIsBtnDisabled(true)
|
|
99
94
|
try {
|
|
100
|
-
const paymentSession =
|
|
95
|
+
const paymentSession = await onSubmit()
|
|
101
96
|
|
|
102
97
|
if (!paymentSession) {
|
|
103
98
|
setRyftError('unknown_error')
|
|
@@ -169,12 +164,6 @@ export const RyftPaymentForm = ({
|
|
|
169
164
|
addEventHandler('cardValidationChanged', (e: MessageEvent['data']) => {
|
|
170
165
|
setIsValid(e.isValid)
|
|
171
166
|
})
|
|
172
|
-
addEventHandler(
|
|
173
|
-
'walletPaymentSessionResult',
|
|
174
|
-
(e: MessageEvent<GoogleAndApplePayResponse>['data']) => {
|
|
175
|
-
handleSubmit(e.paymentSession)
|
|
176
|
-
},
|
|
177
|
-
)
|
|
178
167
|
|
|
179
168
|
setRyftInitFailure(false)
|
|
180
169
|
},
|
|
@@ -229,7 +218,7 @@ export const RyftPaymentForm = ({
|
|
|
229
218
|
ref={formRef}
|
|
230
219
|
id='ryft-pay-form'
|
|
231
220
|
noValidate
|
|
232
|
-
onSubmit={methods.handleSubmit(
|
|
221
|
+
onSubmit={methods.handleSubmit(handleSubmit)}
|
|
233
222
|
className='ryft-payment-form'
|
|
234
223
|
>
|
|
235
224
|
<div className='form-disable-box' id='form-disable-box' />
|
|
@@ -61,22 +61,20 @@ export const injectComponentsInRyftForm = ({
|
|
|
61
61
|
divider.id = 'mobile-pay-divider'
|
|
62
62
|
container.id = 'mobile-pay-divider-container'
|
|
63
63
|
container.append(dividerText, divider)
|
|
64
|
-
const payIframe = document.getElementById(
|
|
64
|
+
const payIframe = document.getElementById("ryft-pay-iframe");
|
|
65
65
|
if (payIframe) {
|
|
66
66
|
const formBox = document.getElementById('form-disable-box')
|
|
67
67
|
if (formBox) {
|
|
68
|
-
formBox.style.display = isDisableButton ?
|
|
68
|
+
formBox.style.display = isDisableButton ? "block" : "none"
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const googleButton = document.getElementById(
|
|
72
72
|
'gpay-button-online-api-id',
|
|
73
73
|
) as HTMLButtonElement
|
|
74
|
-
const appleButton =
|
|
75
|
-
'ryft-pay-apple-pay-button',
|
|
76
|
-
) as HTMLButtonElement
|
|
74
|
+
const appleButton =document.getElementById("ryft-pay-apple-pay-button") as HTMLButtonElement
|
|
77
75
|
if (googleButton) {
|
|
78
76
|
googleButton.disabled = isDisableButton
|
|
79
|
-
googleButton.style.opacity =
|
|
77
|
+
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
80
78
|
}
|
|
81
79
|
if (appleButton) {
|
|
82
80
|
appleButton.disabled = isDisableButton
|
|
@@ -88,6 +86,7 @@ export const injectComponentsInRyftForm = ({
|
|
|
88
86
|
const applePayButton = document.createElement('button')
|
|
89
87
|
applePayButton.id = 'apple-pay'
|
|
90
88
|
applePayButton.type = 'button'
|
|
89
|
+
applePayButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
91
90
|
applePayButton.className = 'bg-dark btn btn-primary apple-pay-button'
|
|
92
91
|
applePayButton.textContent = t('Events:payWithApple')
|
|
93
92
|
applePayButton.onclick = onApplePayButtonClick
|
package/src/layout/DropDown.tsx
CHANGED
|
@@ -434,7 +434,6 @@ export const EmailTemplateControl = forwardRef(
|
|
|
434
434
|
`templateOptionValues.${option?.id}.value`,
|
|
435
435
|
)}
|
|
436
436
|
type='number'
|
|
437
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
438
437
|
placeholder={t(`Design:${option.name}`)}
|
|
439
438
|
id={option.name + option.id}
|
|
440
439
|
defaultValue={option.selectedValue || ''}
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
useFormContext,
|
|
9
9
|
useWatch,
|
|
10
10
|
} from 'react-hook-form'
|
|
11
|
-
import { FaBars, FaBowlingBall, FaCalendar, FaTicketAlt } from 'react-icons/fa'
|
|
12
11
|
import { useTranslation } from 'react-i18next'
|
|
13
12
|
import { useSensor, MouseSensor } from '@dnd-kit/core'
|
|
14
13
|
import {
|
|
@@ -26,11 +25,7 @@ import { ProductCategoryControl } from '../product-category'
|
|
|
26
25
|
import { ProductCategory } from '../types'
|
|
27
26
|
import { ProductsControl } from './ProductsControl'
|
|
28
27
|
import { ProductSetFormValues, WithIsLoading } from './ProductSetForm'
|
|
29
|
-
import {
|
|
30
|
-
SelectCategoryModal,
|
|
31
|
-
CATEGORY_TYPES_NAMES,
|
|
32
|
-
CategoryConfig,
|
|
33
|
-
} from './SelectCategoryModal'
|
|
28
|
+
import { SelectCategoryModal } from './SelectCategoryModal'
|
|
34
29
|
import { ProductSetLoadingContext } from './context'
|
|
35
30
|
import { VenueMapSetModal } from './VenueMapSetModal'
|
|
36
31
|
import { moveArrayElements, sortArrayByIndex } from '../utils'
|
|
@@ -38,29 +33,6 @@ import { useSortableTreeFunctions } from '../hooks/useSortableTreeFunctions'
|
|
|
38
33
|
// @TODO not for first release
|
|
39
34
|
// import Popover from "./ProductSetFormPopover";
|
|
40
35
|
|
|
41
|
-
const CATEGORIES_TYPE: Partial<Record<CategoryType, CategoryConfig>> = {
|
|
42
|
-
[CATEGORY_TYPES_NAMES.tickets]: {
|
|
43
|
-
label: 'tickets',
|
|
44
|
-
icon: <FaTicketAlt color='#0e8ce2' size={10} />,
|
|
45
|
-
},
|
|
46
|
-
[CATEGORY_TYPES_NAMES.bookings]: {
|
|
47
|
-
label: 'bookings',
|
|
48
|
-
icon: <FaCalendar color='#0e8ce2' size={10} />,
|
|
49
|
-
},
|
|
50
|
-
[CATEGORY_TYPES_NAMES.menuItems]: {
|
|
51
|
-
label: 'menuItems',
|
|
52
|
-
icon: <FaBars color='#0e8ce2' size={10} />,
|
|
53
|
-
},
|
|
54
|
-
[CATEGORY_TYPES_NAMES.game]: {
|
|
55
|
-
label: 'game',
|
|
56
|
-
icon: <FaBowlingBall color='#0e8ce2' size={10} />,
|
|
57
|
-
},
|
|
58
|
-
[CATEGORY_TYPES_NAMES.fixedDuration]: {
|
|
59
|
-
label: 'fixedDuration',
|
|
60
|
-
icon: <FaCalendar color='#0e8ce2' size={10} />,
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
|
|
64
36
|
interface ProductCategoriesControlProps extends WithIsLoading {
|
|
65
37
|
stepIndex: number
|
|
66
38
|
isOverrides?: boolean
|
|
@@ -256,8 +228,6 @@ export function ProductCategoriesControl({
|
|
|
256
228
|
setIsExpanded(productCategoryId)
|
|
257
229
|
}
|
|
258
230
|
|
|
259
|
-
const categoryType = CATEGORIES_TYPE[productCategory.type]
|
|
260
|
-
|
|
261
231
|
return (
|
|
262
232
|
<Controller
|
|
263
233
|
key={`product-category-${productCategory._id}`}
|
|
@@ -302,12 +272,6 @@ export function ProductCategoriesControl({
|
|
|
302
272
|
)}
|
|
303
273
|
modalClass={ProductSetModalClasses.category}
|
|
304
274
|
isNewAdded={showCategoryModal}
|
|
305
|
-
itemButton={
|
|
306
|
-
<div className='btn-outline-primary item-icon sm border border-primary rounded-sm'>
|
|
307
|
-
{categoryType.icon}
|
|
308
|
-
<span className='ml-2'>{t(categoryType.label)}</span>
|
|
309
|
-
</div>
|
|
310
|
-
}
|
|
311
275
|
body={
|
|
312
276
|
<ProductCategoryControl
|
|
313
277
|
isLoading={isLoading}
|
|
@@ -12,7 +12,7 @@ import { isEqual } from 'lodash'
|
|
|
12
12
|
import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
|
|
13
13
|
import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
|
|
14
14
|
import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
|
|
15
|
-
import { transformErrorToMessage } from '@licklist/plugins
|
|
15
|
+
import { transformErrorToMessage } from '@licklist/plugins'
|
|
16
16
|
import { Dialog, useDialogContext } from '../../modals/dialog'
|
|
17
17
|
import {
|
|
18
18
|
ProductSetControl,
|
|
@@ -28,16 +28,12 @@ import { ErrorModal } from '../../iframe/order-process/components/ErrorModal'
|
|
|
28
28
|
export interface WithIsLoading {
|
|
29
29
|
isLoading: boolean
|
|
30
30
|
}
|
|
31
|
-
export interface WithIdOptional {
|
|
32
|
-
id?: number
|
|
33
|
-
}
|
|
34
|
-
|
|
35
31
|
export interface WithId {
|
|
36
32
|
id: number
|
|
37
33
|
}
|
|
38
34
|
export interface ProductSetFormValues
|
|
39
35
|
extends FormValues,
|
|
40
|
-
|
|
36
|
+
WithId,
|
|
41
37
|
ProductSetControlValues {
|
|
42
38
|
steps: Step[]
|
|
43
39
|
isOverrides?: boolean
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from 'react-icons/fa'
|
|
26
26
|
import { ProductSetLoadingContext } from './context'
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const CATEGORY_TYPES_NAMES = {
|
|
29
29
|
menuItems: CATEGORY_TYPE_MENU_ITEMS,
|
|
30
30
|
tickets: CATEGORY_TYPE_TICKETS,
|
|
31
31
|
bookings: CATEGORY_TYPE_BOOKINGS,
|
|
@@ -33,7 +33,7 @@ export const CATEGORY_TYPES_NAMES = {
|
|
|
33
33
|
fixedDuration: CATEGORY_TYPE_FIXED_DURATION,
|
|
34
34
|
} as const
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
type CategoryConfig = { label: string; icon: ReactElement }
|
|
37
37
|
|
|
38
38
|
const MAIN_CATEGORIES: Partial<Record<CategoryType, CategoryConfig>> = {
|
|
39
39
|
[CATEGORY_TYPES_NAMES.tickets]: {
|
|
@@ -70,6 +70,9 @@ export function SubProductsControl({
|
|
|
70
70
|
images: subProducts[index]?.images as Image[],
|
|
71
71
|
}
|
|
72
72
|
// @ts-expect-error TS2345
|
|
73
|
+
// @TODO fix prod type error
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
75
|
+
// @ts-ignore
|
|
73
76
|
append(subProductCopy)
|
|
74
77
|
}}
|
|
75
78
|
/>
|
|
@@ -46,6 +46,9 @@ export const VenueMapsControl = ({
|
|
|
46
46
|
url={image.url}
|
|
47
47
|
name={name}
|
|
48
48
|
points={points}
|
|
49
|
+
// @TODO fix prod type error
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
51
|
+
// @ts-ignore
|
|
49
52
|
products={products}
|
|
50
53
|
pointProducts={pointProducts}
|
|
51
54
|
onPointProductsChange={onPointProductsChange}
|
|
@@ -86,7 +86,6 @@ export function ProductBookingManagementControl<T extends FormValues>(
|
|
|
86
86
|
<Form.Control
|
|
87
87
|
ref={ref}
|
|
88
88
|
type='number'
|
|
89
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
90
89
|
min={0}
|
|
91
90
|
step={1}
|
|
92
91
|
value={value as string}
|
|
@@ -130,7 +129,6 @@ export function ProductBookingManagementControl<T extends FormValues>(
|
|
|
130
129
|
<Form.Control
|
|
131
130
|
ref={ref}
|
|
132
131
|
type='number'
|
|
133
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
134
132
|
min='0'
|
|
135
133
|
step='1'
|
|
136
134
|
value={value as string}
|
|
@@ -91,7 +91,6 @@ export const ProductDurationControl = <T,>({
|
|
|
91
91
|
<Form.Control
|
|
92
92
|
type='number'
|
|
93
93
|
min={0}
|
|
94
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
95
94
|
step={1}
|
|
96
95
|
value={durationHours}
|
|
97
96
|
disabled={disabled}
|
|
@@ -128,7 +127,6 @@ export const ProductDurationControl = <T,>({
|
|
|
128
127
|
type='number'
|
|
129
128
|
min={0}
|
|
130
129
|
step={1}
|
|
131
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
132
130
|
disabled={disabled}
|
|
133
131
|
value={durationMinutes}
|
|
134
132
|
isInvalid={isInvalid}
|
|
@@ -111,7 +111,6 @@ export function ProductQuantityConstantControl<T extends FormValues>(
|
|
|
111
111
|
type='number'
|
|
112
112
|
min={0}
|
|
113
113
|
step={1}
|
|
114
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
115
114
|
value={value as string}
|
|
116
115
|
isInvalid={HookFormService.isInvalid<T>(
|
|
117
116
|
`${fieldNamePrefix}.totalQuantity` as Path<T>,
|
|
@@ -166,7 +165,6 @@ export function ProductQuantityConstantControl<T extends FormValues>(
|
|
|
166
165
|
type='number'
|
|
167
166
|
min={0}
|
|
168
167
|
step={1}
|
|
169
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
170
168
|
value={value as string}
|
|
171
169
|
onChange={onChange}
|
|
172
170
|
onFocus={onFocus}
|
|
@@ -85,7 +85,6 @@ export function ProductQuantityControl<T extends FormValues>(
|
|
|
85
85
|
type='number'
|
|
86
86
|
min={0}
|
|
87
87
|
step={1}
|
|
88
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
89
88
|
value={value as string}
|
|
90
89
|
onChange={onChange}
|
|
91
90
|
onFocus={onFocus}
|
|
@@ -144,7 +143,6 @@ export function ProductQuantityControl<T extends FormValues>(
|
|
|
144
143
|
type='number'
|
|
145
144
|
min={0}
|
|
146
145
|
step={1}
|
|
147
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
148
146
|
value={value && (value as string)}
|
|
149
147
|
onFocus={onFocus}
|
|
150
148
|
onChange={onChange}
|
|
@@ -69,7 +69,6 @@ export function ProductQuantityRechargingControl<T extends FormValues>(
|
|
|
69
69
|
type='number'
|
|
70
70
|
min={0}
|
|
71
71
|
step={1}
|
|
72
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
73
72
|
{...register(`${fieldNamePrefix}.totalQuantity` as Path<T>, {
|
|
74
73
|
validate: (value) => {
|
|
75
74
|
if (unlimited) return true
|
|
@@ -216,7 +216,6 @@ export function ProductCategoryControl({
|
|
|
216
216
|
step={1}
|
|
217
217
|
value={value === null ? '' : value}
|
|
218
218
|
onChange={onChange}
|
|
219
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
220
219
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
221
220
|
`${fieldNamePrefix}.minSubItems` as const,
|
|
222
221
|
errors,
|
|
@@ -289,7 +288,6 @@ export function ProductCategoryControl({
|
|
|
289
288
|
name={name}
|
|
290
289
|
value={value === null ? '' : value}
|
|
291
290
|
onChange={onChange}
|
|
292
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
293
291
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
294
292
|
`${fieldNamePrefix}.maxSubItems` as const,
|
|
295
293
|
errors,
|
|
@@ -350,7 +348,6 @@ export function ProductCategoryControl({
|
|
|
350
348
|
min={0}
|
|
351
349
|
step={1}
|
|
352
350
|
type='number'
|
|
353
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
354
351
|
disabled={isOverride}
|
|
355
352
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
356
353
|
`${fieldNamePrefix}.overallQuantity`,
|
|
@@ -533,7 +530,6 @@ export function ProductCategoryControl({
|
|
|
533
530
|
step={1}
|
|
534
531
|
value={value}
|
|
535
532
|
onChange={onChange}
|
|
536
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
537
533
|
isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
|
|
538
534
|
`${fieldNamePrefix}.remainderExpireAfter` as const,
|
|
539
535
|
errors,
|
|
@@ -109,7 +109,6 @@ function RecurrenceEndInput({
|
|
|
109
109
|
type='number'
|
|
110
110
|
min={1}
|
|
111
111
|
max={500}
|
|
112
|
-
onWheel={(event) => event.currentTarget.blur()}
|
|
113
112
|
disabled={disabled || !count || count === 500}
|
|
114
113
|
aria-label='Occurrence count'
|
|
115
114
|
value={count ?? defaultOccurrences[frequency]}
|