@licklist/design 0.69.3-dev.7 → 0.69.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/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +1 -2
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -2
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +2 -3
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +1 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +28 -31
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +1 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -14
- 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-card/utils.d.ts +0 -1
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-card/utils.js +2 -6
- 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 +1 -8
- 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/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +0 -2
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts +2 -2
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +2 -8
- package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -2
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +1 -20
- package/dist/index.js +0 -1
- package/dist/layout/DropDown.d.ts +1 -2
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts +1 -3
- package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.js +8 -172
- 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/card/ProductSetCard.d.ts +2 -6
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +11 -20
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +3 -4
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +2 -2
- 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 -64
- 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/form/index.d.ts +0 -1
- package/dist/product-set/form/index.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -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/product-set/utils/index.d.ts +0 -7
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -10
- 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 -6
- 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/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +0 -22
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +0 -25
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +1 -5
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +2 -9
- 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/auth/Login/LoginComponent.tsx +1 -1
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -3
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +85 -88
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +1 -11
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
- package/src/events/event-card/utils.ts +1 -5
- package/src/iframe/activity-card/ActivityCard.tsx +0 -6
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +4 -9
- package/src/iframe/ryft/utils/ryft-form.ts +2 -28
- package/src/layout/DropDown.tsx +1 -1
- package/src/modals/confirmation/ConfirmModal.tsx +3 -19
- package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
- package/src/product-set/card/ProductSetCard.tsx +6 -32
- package/src/product-set/control/DateAndRecurrenceInput.tsx +1 -3
- package/src/product-set/control/DateInput.tsx +1 -2
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
- package/src/product-set/form/ProductSetForm.tsx +2 -24
- 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/form/index.ts +0 -1
- 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/product-set/utils/index.ts +0 -11
- 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/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +0 -22
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +0 -25
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +1 -15
- package/src/zone/form/components/GameDurationControl.tsx +0 -1
- package/src/zone/form/components/SortControl.tsx +0 -1
- package/yarn.lock +25 -25
- package/dist/product-set/form/ProductSetNameControl.d.ts +0 -6
- package/dist/product-set/form/ProductSetNameControl.d.ts.map +0 -1
- package/dist/product-set/form/ProductSetNameControl.js +0 -35
- package/src/product-set/form/ProductSetNameControl.tsx +0 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.30.
|
|
45
|
+
"@licklist/core": "0.30.3",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.33.
|
|
47
|
+
"@licklist/plugins": "0.33.1",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
49
|
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@licklist/core": "0.30.
|
|
64
|
+
"@licklist/core": "0.30.3",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
|
-
"@licklist/plugins": "0.33.
|
|
66
|
+
"@licklist/plugins": "0.33.1",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
68
68
|
"@mantine/hooks": "6.0.22",
|
|
69
69
|
"@mdx-js/react": "1.6.22",
|
|
@@ -202,10 +202,8 @@
|
|
|
202
202
|
"yarn tsc"
|
|
203
203
|
]
|
|
204
204
|
},
|
|
205
|
-
"packageManager": "yarn@4.4.0",
|
|
206
205
|
"volta": {
|
|
207
206
|
"node": "20.9.0",
|
|
208
207
|
"yarn": "4.4.0"
|
|
209
|
-
}
|
|
210
|
-
"stableVersion": "0.69.1-dev.3"
|
|
208
|
+
}
|
|
211
209
|
}
|
|
@@ -76,7 +76,6 @@ export const AffiliateForm = ({
|
|
|
76
76
|
const copyToClipboard = () =>
|
|
77
77
|
// eslint-disable-next-line consistent-return
|
|
78
78
|
window.navigator.clipboard.writeText(formValues.link)
|
|
79
|
-
|
|
80
79
|
return (
|
|
81
80
|
<FormProvider {...form}>
|
|
82
81
|
<Form onSubmit={form.handleSubmit(handleSubmit)}>
|
|
@@ -64,7 +64,6 @@ export interface EditEventFormProps extends HasPermissionProp {
|
|
|
64
64
|
isExternalPaymentLinkEnabled?: boolean
|
|
65
65
|
timeZone: string
|
|
66
66
|
eventProductSet?: ProductSet
|
|
67
|
-
overrideNameError?: string
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
const eventImageTypes = {
|
|
@@ -86,7 +85,6 @@ export const EditEventForm = ({
|
|
|
86
85
|
isExternalPaymentLinkEnabled,
|
|
87
86
|
timeZone,
|
|
88
87
|
eventProductSet,
|
|
89
|
-
overrideNameError,
|
|
90
88
|
}: EditEventFormProps) => {
|
|
91
89
|
const { t } = useTranslation(['Design', 'Validation'])
|
|
92
90
|
|
|
@@ -408,7 +406,6 @@ export const EditEventForm = ({
|
|
|
408
406
|
showEditProductSet={showEditProductSet}
|
|
409
407
|
timeZone={timeZone}
|
|
410
408
|
eventProductSet={eventProductSet}
|
|
411
|
-
overrideNameError={overrideNameError}
|
|
412
409
|
/>
|
|
413
410
|
|
|
414
411
|
{hasPermission && !showEditProductSet && (
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -5,12 +5,9 @@ import { useId } from '@react-aria/utils'
|
|
|
5
5
|
import { Controller, useFormContext } from 'react-hook-form'
|
|
6
6
|
import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission'
|
|
7
7
|
import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper'
|
|
8
|
-
import { uniqBy } from 'lodash'
|
|
9
|
-
import { getTypeHeadItemsFromMenus } from '../../../../product-set/utils'
|
|
10
8
|
import { ConfirmModal } from '../../../../modals/confirmation/ConfirmModal'
|
|
11
9
|
import { EditEventFormValues } from '../EditEventForm/EditEventForm'
|
|
12
10
|
import { EditEventProductSet } from './component/EditEventProductSet'
|
|
13
|
-
import { Typeahead } from '../../../../typeahead'
|
|
14
11
|
|
|
15
12
|
interface SelectEventProductSetProps extends HasPermissionProp {
|
|
16
13
|
productSets?: ProductSet[]
|
|
@@ -20,7 +17,6 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
20
17
|
setEditProductSetId: (value: string) => void
|
|
21
18
|
timeZone: string
|
|
22
19
|
eventProductSet?: ProductSet
|
|
23
|
-
overrideNameError?: string
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
export const SelectEventProductSet = ({
|
|
@@ -31,7 +27,6 @@ export const SelectEventProductSet = ({
|
|
|
31
27
|
setShowEditProductSet,
|
|
32
28
|
timeZone,
|
|
33
29
|
eventProductSet,
|
|
34
|
-
overrideNameError,
|
|
35
30
|
}: SelectEventProductSetProps) => {
|
|
36
31
|
const productSets = eventProductSet
|
|
37
32
|
? [..._productSets, eventProductSet]
|
|
@@ -53,22 +48,6 @@ export const SelectEventProductSet = ({
|
|
|
53
48
|
const productSetId = watch('productSetId')
|
|
54
49
|
const editedProductSet = watch('editedProductSet')
|
|
55
50
|
|
|
56
|
-
const typeheadValues = uniqBy(
|
|
57
|
-
getTypeHeadItemsFromMenus(
|
|
58
|
-
editedProductSet
|
|
59
|
-
? productSets.map((productSet) =>
|
|
60
|
-
productSet.id === editedProductSet.id
|
|
61
|
-
? editedProductSet
|
|
62
|
-
: productSet,
|
|
63
|
-
)
|
|
64
|
-
: productSets,
|
|
65
|
-
),
|
|
66
|
-
(item) => item.id,
|
|
67
|
-
)
|
|
68
|
-
const selectedProductSetTypeheadValue = productSetId
|
|
69
|
-
? typeheadValues?.find((typeheadValue) => typeheadValue.id === productSetId)
|
|
70
|
-
: undefined
|
|
71
|
-
|
|
72
51
|
const onEditProductSet = useCallback(
|
|
73
52
|
() => {
|
|
74
53
|
setEditProductSetId(String(productSetId))
|
|
@@ -122,7 +101,6 @@ export const SelectEventProductSet = ({
|
|
|
122
101
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
123
102
|
const onSubmit = (value: EditEventFormValues['editedProductSet']) => {
|
|
124
103
|
setShowEditProductSet(false)
|
|
125
|
-
setValue('productSetId', value.id)
|
|
126
104
|
setValue('editedProductSet', value)
|
|
127
105
|
}
|
|
128
106
|
|
|
@@ -138,73 +116,93 @@ export const SelectEventProductSet = ({
|
|
|
138
116
|
<Controller
|
|
139
117
|
control={control}
|
|
140
118
|
name='productSetId'
|
|
141
|
-
render={() =>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
119
|
+
render={({ field }) => {
|
|
120
|
+
const fieldValue = String(field.value)
|
|
121
|
+
return (
|
|
122
|
+
<>
|
|
123
|
+
<div className='d-flex align-items-center flex-row w-100'>
|
|
124
|
+
<ConfirmModal>
|
|
125
|
+
{(confirm) => (
|
|
126
|
+
<Form.Control
|
|
127
|
+
as='select'
|
|
128
|
+
onChange={(e) =>
|
|
129
|
+
onChangeProductSet(Number(e.target.value), confirm)
|
|
130
|
+
}
|
|
131
|
+
isInvalid={Boolean(errors.productSetId)}
|
|
132
|
+
value={fieldValue}
|
|
133
|
+
>
|
|
134
|
+
<option value='' hidden>
|
|
135
|
+
{t('Design:chooseProductSet')}
|
|
136
|
+
</option>
|
|
137
|
+
{productSets?.map((productSet) => {
|
|
138
|
+
const isCurrentEditedProductSet =
|
|
139
|
+
editedProductSet &&
|
|
140
|
+
editedProductSet?.id === productSet?.id
|
|
141
|
+
return (
|
|
142
|
+
<option key={productSet.id} value={productSet.id}>
|
|
143
|
+
{isCurrentEditedProductSet ||
|
|
144
|
+
productSet.isOverride
|
|
145
|
+
? `[${t('edited')}] ${
|
|
146
|
+
isCurrentEditedProductSet
|
|
147
|
+
? editedProductSet?.name
|
|
148
|
+
: productSet.name
|
|
149
|
+
}`
|
|
150
|
+
: productSet.name}
|
|
151
|
+
</option>
|
|
152
|
+
)
|
|
153
|
+
})}
|
|
154
|
+
</Form.Control>
|
|
155
|
+
)}
|
|
156
|
+
</ConfirmModal>
|
|
157
|
+
|
|
158
|
+
<div className='buttons-container'>
|
|
159
|
+
{!showEditProductSet && !editedProductSet && (
|
|
160
|
+
<Button
|
|
161
|
+
variant=''
|
|
162
|
+
className='btn product-set-button mr-4'
|
|
163
|
+
onClick={handleCreateProductSet}
|
|
164
|
+
>
|
|
165
|
+
{t('addNewProductSet')}
|
|
166
|
+
</Button>
|
|
167
|
+
)}
|
|
168
|
+
{showOverrideProductSet && (
|
|
169
|
+
<Button
|
|
170
|
+
variant=''
|
|
171
|
+
className='btn product-set-button'
|
|
172
|
+
onClick={onEditProductSet}
|
|
173
|
+
>
|
|
174
|
+
{isOverrideProductSet
|
|
175
|
+
? t('editOverrides')
|
|
176
|
+
: t('editProductSet')}
|
|
177
|
+
</Button>
|
|
178
|
+
)}
|
|
179
|
+
{showEditProductSet && (
|
|
180
|
+
<Button
|
|
181
|
+
variant=''
|
|
182
|
+
className='btn product-set-button'
|
|
183
|
+
onClick={revertEditProductSet}
|
|
184
|
+
>
|
|
185
|
+
{t('cancelAndRevert')}
|
|
186
|
+
</Button>
|
|
187
|
+
)}
|
|
188
|
+
{!showEditProductSet && editedProductSet && (
|
|
189
|
+
<Button
|
|
190
|
+
variant=''
|
|
191
|
+
className='btn product-set-button ml-4 text-danger'
|
|
192
|
+
onClick={revertEditProductSet}
|
|
193
|
+
>
|
|
194
|
+
{t('undoChanges')}
|
|
195
|
+
</Button>
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
200
198
|
</div>
|
|
201
|
-
</div>
|
|
202
199
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
200
|
+
<Form.Control.Feedback type='invalid'>
|
|
201
|
+
{errors?.productSetId?.message}
|
|
202
|
+
</Form.Control.Feedback>
|
|
203
|
+
</>
|
|
204
|
+
)
|
|
205
|
+
}}
|
|
208
206
|
/>
|
|
209
207
|
</Form.Group>
|
|
210
208
|
</div>
|
|
@@ -215,7 +213,6 @@ export const SelectEventProductSet = ({
|
|
|
215
213
|
productSetId === editedProductSet?.id && editedProductSet
|
|
216
214
|
}
|
|
217
215
|
timeZone={timeZone}
|
|
218
|
-
overrideNameError={overrideNameError}
|
|
219
216
|
/>
|
|
220
217
|
)}
|
|
221
218
|
</>
|
|
@@ -23,14 +23,12 @@ interface EditEventProductSetProps {
|
|
|
23
23
|
onSubmit: (value: EditEventFormValues['editedProductSet']) => void
|
|
24
24
|
defaultValues?: EditEventFormValues['editedProductSet']
|
|
25
25
|
timeZone: string
|
|
26
|
-
overrideNameError?: string
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export const EditEventProductSet = ({
|
|
30
29
|
onSubmit,
|
|
31
30
|
defaultValues,
|
|
32
31
|
timeZone,
|
|
33
|
-
overrideNameError,
|
|
34
32
|
}: EditEventProductSetProps) => {
|
|
35
33
|
const { companyId } = useParams<{
|
|
36
34
|
companyId: string
|
|
@@ -66,15 +64,7 @@ export const EditEventProductSet = ({
|
|
|
66
64
|
mode: 'onChange',
|
|
67
65
|
})
|
|
68
66
|
|
|
69
|
-
const { reset, handleSubmit, watch
|
|
70
|
-
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if (!overrideNameError) {
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
setError('name', { message: overrideNameError })
|
|
76
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
-
}, [overrideNameError])
|
|
67
|
+
const { reset, handleSubmit, watch } = form
|
|
78
68
|
|
|
79
69
|
const formValues = watch()
|
|
80
70
|
|
|
@@ -21,14 +21,10 @@ export const formatContentWithoutTags = (
|
|
|
21
21
|
.replace(/\s\s+/g, ' ')
|
|
22
22
|
|
|
23
23
|
const words = trimmedText.slice(0, maxLength).split(' ')
|
|
24
|
-
const contentWithMinLength = content.slice(0, MIN_EVENT_DESCRIPTION_SIZE)
|
|
25
24
|
const index = String(content).indexOf(words[words.length - 2])
|
|
26
|
-
|
|
27
|
-
const contentWithMinSize = contentWithMinLength.length > slicedContent.length ? contentWithMinLength : slicedContent
|
|
28
|
-
return contentWithMinSize.concat('...')
|
|
25
|
+
return content.slice(0, index).concat('...')
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
export const MIN_EVENT_DESCRIPTION_SIZE = 150
|
|
32
28
|
export const EVENT_DESCRIPTION_SIZE = 350
|
|
33
29
|
|
|
34
30
|
/**
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react'
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
4
|
-
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
5
|
-
import { AvailabilityIndicator } from '../../availability-indicator'
|
|
6
4
|
|
|
7
5
|
export const LAYOUT_GRID = 'grid'
|
|
8
6
|
export const LAYOUT_LIST = 'list'
|
|
@@ -17,7 +15,6 @@ export type ActivityCardProps = {
|
|
|
17
15
|
layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST
|
|
18
16
|
availableTimes?: string | null
|
|
19
17
|
image?: Image | null
|
|
20
|
-
resources?: ZoneResourcesAvailability
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
export const ActivityCard = ({
|
|
@@ -30,7 +27,6 @@ export const ActivityCard = ({
|
|
|
30
27
|
onSelect,
|
|
31
28
|
isSelected,
|
|
32
29
|
layout = LAYOUT_GRID,
|
|
33
|
-
resources,
|
|
34
30
|
}: ActivityCardProps) => {
|
|
35
31
|
if (layout === LAYOUT_GRID) {
|
|
36
32
|
return (
|
|
@@ -50,7 +46,6 @@ export const ActivityCard = ({
|
|
|
50
46
|
{description && (
|
|
51
47
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
52
48
|
)}
|
|
53
|
-
{resources && <AvailabilityIndicator resources={resources} />}
|
|
54
49
|
</div>
|
|
55
50
|
</button>
|
|
56
51
|
)
|
|
@@ -76,7 +71,6 @@ export const ActivityCard = ({
|
|
|
76
71
|
{description && (
|
|
77
72
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
78
73
|
)}
|
|
79
|
-
{resources && <AvailabilityIndicator resources={resources} />}
|
|
80
74
|
</div>
|
|
81
75
|
|
|
82
76
|
<hr className='list-activity-card-hr' />
|
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
|
}`}
|
|
@@ -38,7 +38,7 @@ export interface RyftPaymentFormProps {
|
|
|
38
38
|
isCreateLoading: boolean
|
|
39
39
|
isAppUsingInIframe?: boolean
|
|
40
40
|
onApplePayButtonClick?: () => void
|
|
41
|
-
|
|
41
|
+
applePayButtonDisabled?: boolean
|
|
42
42
|
initRyft: (
|
|
43
43
|
onSuccess: () => void,
|
|
44
44
|
onFailure: (error?: string) => void,
|
|
@@ -57,7 +57,6 @@ export const RyftPaymentForm = ({
|
|
|
57
57
|
initRyft,
|
|
58
58
|
resetReferrer,
|
|
59
59
|
onSubmit,
|
|
60
|
-
payButtonDisabled,
|
|
61
60
|
}: RyftPaymentFormProps) => {
|
|
62
61
|
const { t } = useTranslation(['Design', 'Validation', 'Ryft'])
|
|
63
62
|
const formRef = useRef<HTMLFormElement | null>(null)
|
|
@@ -90,6 +89,7 @@ export const RyftPaymentForm = ({
|
|
|
90
89
|
|
|
91
90
|
const handleSubmit = async () => {
|
|
92
91
|
setIsBtnDisabled(true)
|
|
92
|
+
|
|
93
93
|
try {
|
|
94
94
|
const paymentSession = await onSubmit()
|
|
95
95
|
|
|
@@ -142,21 +142,17 @@ export const RyftPaymentForm = ({
|
|
|
142
142
|
t,
|
|
143
143
|
isAppUsingInIframe,
|
|
144
144
|
onApplePayButtonClick,
|
|
145
|
-
isDisableButton: !payButtonDisabled,
|
|
146
145
|
additionalPaymentMethodsEnabled:
|
|
147
146
|
providerPaymentSettings?.additionalPaymentMethodsEnabled,
|
|
148
147
|
})
|
|
149
148
|
},
|
|
150
149
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
151
|
-
[
|
|
152
|
-
formRef.current?.childNodes?.length,
|
|
153
|
-
showApplePayButton,
|
|
154
|
-
payButtonDisabled,
|
|
155
|
-
],
|
|
150
|
+
[formRef.current?.childNodes?.length, showApplePayButton],
|
|
156
151
|
)
|
|
157
152
|
|
|
158
153
|
useEffect(() => {
|
|
159
154
|
if (!accountId.data?.account_id || accountId.isError) return
|
|
155
|
+
|
|
160
156
|
initRyft(
|
|
161
157
|
() => {
|
|
162
158
|
addEventHandler('cardValidationChanged', (e: MessageEvent['data']) => {
|
|
@@ -219,7 +215,6 @@ export const RyftPaymentForm = ({
|
|
|
219
215
|
onSubmit={methods.handleSubmit(handleSubmit)}
|
|
220
216
|
className='ryft-payment-form'
|
|
221
217
|
>
|
|
222
|
-
<div className='form-disable-box' id='form-disable-box' />
|
|
223
218
|
<div className='submit-button-wrapper mt-4 p-1'>
|
|
224
219
|
<Button type='submit' disabled={isBtnDisabled || !isValid}>
|
|
225
220
|
{isBtnDisabled && <ButtonLoader />}
|
|
@@ -7,7 +7,6 @@ interface InjectComponentsInRyftForm
|
|
|
7
7
|
'onApplePayButtonClick' | 'isAppUsingInIframe'
|
|
8
8
|
> {
|
|
9
9
|
t: TFunction<string[]>
|
|
10
|
-
isDisableButton?: boolean
|
|
11
10
|
additionalPaymentMethodsEnabled?: boolean
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -15,19 +14,16 @@ export const injectComponentsInRyftForm = ({
|
|
|
15
14
|
t,
|
|
16
15
|
additionalPaymentMethodsEnabled,
|
|
17
16
|
isAppUsingInIframe,
|
|
18
|
-
isDisableButton,
|
|
19
17
|
onApplePayButtonClick,
|
|
20
18
|
}: InjectComponentsInRyftForm) => {
|
|
21
19
|
const cardContainer = document.getElementById('ryft-pay-iframe')
|
|
20
|
+
|
|
22
21
|
if (!cardContainer) {
|
|
23
22
|
return
|
|
24
23
|
}
|
|
25
24
|
// Removing of the old title container
|
|
26
25
|
document.getElementById('card-title-container')?.remove()
|
|
27
26
|
|
|
28
|
-
cardContainer.style.opacity = isDisableButton ? '0.6' : '1'
|
|
29
|
-
cardContainer.ariaDisabled = isDisableButton?.toString()
|
|
30
|
-
|
|
31
27
|
const cardTitle = document.createElement('div')
|
|
32
28
|
const cardText = document.createElement('div')
|
|
33
29
|
const cardTitleContainer = document.createElement('div')
|
|
@@ -39,6 +35,7 @@ export const injectComponentsInRyftForm = ({
|
|
|
39
35
|
cardContainer?.before(cardTitleContainer)
|
|
40
36
|
|
|
41
37
|
const payGrid = document.getElementById('ryft-pay-grid')
|
|
38
|
+
|
|
42
39
|
if (!payGrid || !additionalPaymentMethodsEnabled) {
|
|
43
40
|
return
|
|
44
41
|
}
|
|
@@ -61,29 +58,6 @@ export const injectComponentsInRyftForm = ({
|
|
|
61
58
|
divider.id = 'mobile-pay-divider'
|
|
62
59
|
container.id = 'mobile-pay-divider-container'
|
|
63
60
|
container.append(dividerText, divider)
|
|
64
|
-
const payIframe = document.getElementById('ryft-pay-iframe')
|
|
65
|
-
if (payIframe) {
|
|
66
|
-
const formBox = document.getElementById('form-disable-box')
|
|
67
|
-
if (formBox) {
|
|
68
|
-
formBox.style.display = isDisableButton ? 'block' : 'none'
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const googleButton = document.getElementById(
|
|
72
|
-
'gpay-button-online-api-id',
|
|
73
|
-
) as HTMLButtonElement
|
|
74
|
-
const appleButton = document.getElementById(
|
|
75
|
-
'ryft-pay-apple-pay-button',
|
|
76
|
-
) as HTMLButtonElement
|
|
77
|
-
if (googleButton) {
|
|
78
|
-
googleButton.disabled = isDisableButton
|
|
79
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
80
|
-
}
|
|
81
|
-
if (appleButton) {
|
|
82
|
-
appleButton.disabled = isDisableButton
|
|
83
|
-
appleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
61
|
if (isAppUsingInIframe) {
|
|
88
62
|
const applePayButton = document.createElement('button')
|
|
89
63
|
applePayButton.id = 'apple-pay'
|
package/src/layout/DropDown.tsx
CHANGED
|
@@ -20,9 +20,6 @@ export type ConfirmModalTypes =
|
|
|
20
20
|
export interface ConfirmModalProps {
|
|
21
21
|
type?: ConfirmModalTypes
|
|
22
22
|
children?: (confirm: (action: ConfirmAction) => void) => ReactNode
|
|
23
|
-
// confirm function memoize the callback function. It's an alternative function
|
|
24
|
-
confirmationHandler?: () => Promise<boolean | undefined>
|
|
25
|
-
disabledButtons?: boolean
|
|
26
23
|
title?: string
|
|
27
24
|
content?: string | ReactNode
|
|
28
25
|
onClose?: () => void
|
|
@@ -40,9 +37,7 @@ export function ConfirmModal({
|
|
|
40
37
|
type = 'default',
|
|
41
38
|
children,
|
|
42
39
|
onClose,
|
|
43
|
-
confirmationHandler,
|
|
44
40
|
title,
|
|
45
|
-
disabledButtons,
|
|
46
41
|
content,
|
|
47
42
|
hideButtons = false,
|
|
48
43
|
}: ConfirmModalProps) {
|
|
@@ -57,16 +52,10 @@ export function ConfirmModal({
|
|
|
57
52
|
setIsOpen(() => true)
|
|
58
53
|
}
|
|
59
54
|
|
|
60
|
-
const handleConfirmation =
|
|
55
|
+
const handleConfirmation = (e) => {
|
|
61
56
|
e.stopPropagation()
|
|
62
|
-
if (!actionRef.current
|
|
63
|
-
|
|
64
|
-
const res = await confirmationHandler()
|
|
65
|
-
if (res) {
|
|
66
|
-
setIsOpen(() => false)
|
|
67
|
-
}
|
|
68
|
-
return
|
|
69
|
-
}
|
|
57
|
+
if (!actionRef.current) return
|
|
58
|
+
|
|
70
59
|
actionRef.current()
|
|
71
60
|
setIsOpen(() => false)
|
|
72
61
|
}
|
|
@@ -99,7 +88,6 @@ export function ConfirmModal({
|
|
|
99
88
|
<Button
|
|
100
89
|
variant='danger'
|
|
101
90
|
className='btn-sm rounded'
|
|
102
|
-
disabled={disabledButtons}
|
|
103
91
|
onClick={handleClose}
|
|
104
92
|
data-id={CONFIRM_MODAL_ACTION_DECLINE}
|
|
105
93
|
>
|
|
@@ -117,14 +105,12 @@ export function ConfirmModal({
|
|
|
117
105
|
variant='outline'
|
|
118
106
|
className='cancel-button'
|
|
119
107
|
onClick={handleClose}
|
|
120
|
-
disabled={disabledButtons}
|
|
121
108
|
data-id={CONFIRM_MODAL_ACTION_DECLINE}
|
|
122
109
|
>
|
|
123
110
|
{t('cancel')}
|
|
124
111
|
</Button>
|
|
125
112
|
<Button
|
|
126
113
|
variant='danger'
|
|
127
|
-
disabled={disabledButtons}
|
|
128
114
|
onClick={handleConfirmation}
|
|
129
115
|
data-id={CONFIRM_MODAL_ACTION_CONFIRM}
|
|
130
116
|
>
|
|
@@ -135,7 +121,6 @@ export function ConfirmModal({
|
|
|
135
121
|
<>
|
|
136
122
|
<Button
|
|
137
123
|
variant='danger'
|
|
138
|
-
disabled={disabledButtons}
|
|
139
124
|
onClick={handleClose}
|
|
140
125
|
data-id={CONFIRM_MODAL_ACTION_DECLINE}
|
|
141
126
|
>
|
|
@@ -143,7 +128,6 @@ export function ConfirmModal({
|
|
|
143
128
|
</Button>
|
|
144
129
|
<Button
|
|
145
130
|
variant='success'
|
|
146
|
-
disabled={disabledButtons}
|
|
147
131
|
onClick={handleConfirmation}
|
|
148
132
|
data-id={CONFIRM_MODAL_ACTION_CONFIRM}
|
|
149
133
|
>
|