@licklist/design 0.78.5-dev.1 → 0.78.5-dev.13
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/CustomDatePicker/CustomDatePicker.d.ts +10 -0
- package/dist/CustomDatePicker/CustomDatePicker.d.ts.map +1 -0
- package/dist/auth/Layout/UserNavDropDownToggle.js +3 -0
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts +2 -2
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts +2 -2
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.d.ts +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +1 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +2 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +2 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +2 -2
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +81 -80
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.js +39 -41
- package/dist/modals/dialog/DialogContext.d.ts +2 -2
- package/dist/modals/dialog/DialogContext.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts +1 -0
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +4 -4
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts +2 -1
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts.map +1 -1
- package/dist/notification/email-template/form/EmailTemplateForm.js +2 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
- package/dist/product-set/utils/index.d.ts +1 -1
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.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 +14 -20
- package/package.json +20 -18
- package/src/CustomDatePicker/CustomDatePicker.tsx +252 -0
- package/src/auth/Layout/UserNavDropDownToggle.tsx +1 -1
- package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -0
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -0
- package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -8
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +12 -4
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +10 -6
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +18 -20
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -5
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +3 -3
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +103 -109
- package/src/iframe/payment/payment-page/PaymentPage.tsx +1 -1
- package/src/iframe/ryft/utils/ryft-form.ts +1 -1
- package/src/modals/dialog/Dialog.tsx +35 -36
- package/src/modals/dialog/DialogContext.tsx +8 -2
- package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
- package/src/notification/email-template/control/EmailTemplateControl.tsx +7 -5
- package/src/notification/email-template/form/EmailTemplateForm.tsx +3 -0
- package/src/product-set/form/ProductSetForm.tsx +2 -1
- package/src/product-set/utils/index.ts +15 -14
- package/src/recurrence-input/RecurrenceInput.tsx +4 -3
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +1 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -9
- package/yarn.lock +694 -724
|
@@ -27,6 +27,7 @@ export interface EmailTemplateControlProps {
|
|
|
27
27
|
meta: string
|
|
28
28
|
defaultAttachments?: Attachment[]
|
|
29
29
|
notificationTypes?: NotificationType[]
|
|
30
|
+
waiverType?: boolean
|
|
30
31
|
getDefaultTemplateMetaByType?: (type?: NotificationType | null) => string
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -38,6 +39,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
38
39
|
options = [],
|
|
39
40
|
defaultAttachments = [],
|
|
40
41
|
notificationTypes = [],
|
|
42
|
+
waiverType = false,
|
|
41
43
|
getDefaultTemplateMetaByType,
|
|
42
44
|
}: EmailTemplateControlProps,
|
|
43
45
|
ref: any,
|
|
@@ -196,7 +198,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
196
198
|
})
|
|
197
199
|
})
|
|
198
200
|
}
|
|
199
|
-
|
|
201
|
+
|
|
200
202
|
return (
|
|
201
203
|
<>
|
|
202
204
|
<Row>
|
|
@@ -284,7 +286,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
284
286
|
</Form.Group>
|
|
285
287
|
</Row>
|
|
286
288
|
|
|
287
|
-
<Row>
|
|
289
|
+
{ !waiverType && (<Row>
|
|
288
290
|
<Form.Group as={Col}>
|
|
289
291
|
<Form.Check
|
|
290
292
|
{...register('isActive')}
|
|
@@ -301,7 +303,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
301
303
|
custom
|
|
302
304
|
/>
|
|
303
305
|
</Form.Group>
|
|
304
|
-
</Row>
|
|
306
|
+
</Row>)}
|
|
305
307
|
<Row className='mb-4'>
|
|
306
308
|
<Form.Group as={Col}>
|
|
307
309
|
<Form.Label>{t('Design:emailBody')}</Form.Label>
|
|
@@ -374,7 +376,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
374
376
|
}
|
|
375
377
|
// should show dropdown only if user want to include PDF file
|
|
376
378
|
if (option.type === OPTION_TYPE.files_selector) {
|
|
377
|
-
|
|
379
|
+
const fileSelectors = option?.defaultValue ? JSON.parse(option.defaultValue) : ''
|
|
378
380
|
const fileNames = Object.values(fileSelectors)
|
|
379
381
|
const fileKeys = Object.keys(fileSelectors)
|
|
380
382
|
|
|
@@ -423,7 +425,7 @@ export const EmailTemplateControl = forwardRef(
|
|
|
423
425
|
)
|
|
424
426
|
}
|
|
425
427
|
|
|
426
|
-
if (option.type === OPTION_TYPE.days_reminder) {
|
|
428
|
+
if (option.type === OPTION_TYPE.days_reminder || option.type === OPTION_TYPE.waiver_reminder ) {
|
|
427
429
|
return (
|
|
428
430
|
<>
|
|
429
431
|
<Form.Label className='mt-4'>
|
|
@@ -41,6 +41,7 @@ export interface EmailTemplateProps extends HasPermissionProp {
|
|
|
41
41
|
placeholders?: NotificationPlaceholder[]
|
|
42
42
|
options?: TemplateOption[]
|
|
43
43
|
serverErrors?: ServerError
|
|
44
|
+
waiverType?: boolean
|
|
44
45
|
notificationTypes?: NotificationType[]
|
|
45
46
|
getDefaultTemplateMetaByType?: (type?: NotificationType | null) => string
|
|
46
47
|
onTypeChange?: (type?: NotificationType | null) => void
|
|
@@ -54,6 +55,7 @@ export const EmailTemplateForm = ({
|
|
|
54
55
|
placeholders = [],
|
|
55
56
|
options = [],
|
|
56
57
|
serverErrors,
|
|
58
|
+
waiverType,
|
|
57
59
|
notificationTypes = [],
|
|
58
60
|
getDefaultTemplateMetaByType,
|
|
59
61
|
onTypeChange,
|
|
@@ -93,6 +95,7 @@ export const EmailTemplateForm = ({
|
|
|
93
95
|
>
|
|
94
96
|
<EmailTemplateControl
|
|
95
97
|
ref={emailEditorRef}
|
|
98
|
+
waiverType={waiverType}
|
|
96
99
|
setIsLoading={setIsLoading}
|
|
97
100
|
meta={defaultValues?.meta || null}
|
|
98
101
|
defaultAttachments={defaultValues?.attachments || []}
|
|
@@ -2,7 +2,8 @@ import { useEffect, useState } from 'react'
|
|
|
2
2
|
import { FormValues } from '@licklist/plugins/dist/types/services/Form/hook-form-service'
|
|
3
3
|
import { Button, Form, Col, Row } from 'react-bootstrap'
|
|
4
4
|
import { FormProvider, useForm } from 'react-hook-form'
|
|
5
|
-
import { TFunction
|
|
5
|
+
import { TFunction } from 'i18next'
|
|
6
|
+
import { useTranslation } from 'react-i18next'
|
|
6
7
|
import { VenueMapSet } from '@licklist/core/dist/DataMapper/Product/VenueMapSetDataMapper'
|
|
7
8
|
import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
|
|
8
9
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
|
|
@@ -2,14 +2,13 @@ import { EmailTemplate } from '@licklist/core/dist/DataMapper/Notification/Email
|
|
|
2
2
|
import { SmsTemplate } from '@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper'
|
|
3
3
|
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
|
|
4
4
|
import { convertToTypeaheadOptions } from 'src/sales/coupon/utils'
|
|
5
|
-
import { TFunction } from '
|
|
5
|
+
import { TFunction } from 'i18next'
|
|
6
6
|
import { UseFormSetError } from 'react-hook-form'
|
|
7
7
|
import { checkIfZoneCategory } from '@licklist/plugins'
|
|
8
8
|
import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper'
|
|
9
9
|
import { TemplateItem } from '../control/ProductSetControl'
|
|
10
10
|
import { ProductSetFormValues } from '../form/ProductSetForm'
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
interface CheckAvailableTimesErrors {
|
|
14
13
|
values: ProductSetFormValues
|
|
15
14
|
setError: UseFormSetError<ProductSetFormValues>
|
|
@@ -61,21 +60,23 @@ export const getFilteredTemplates = (
|
|
|
61
60
|
}))
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
export
|
|
63
|
+
export const updateModifiersSetAtProductSetForm = (
|
|
64
|
+
data: ProductSetFormValues,
|
|
65
|
+
) => ({
|
|
65
66
|
...data,
|
|
66
|
-
steps: data.steps.map(step => ({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})),
|
|
67
|
+
steps: data.steps.map((step) => ({
|
|
68
|
+
...step,
|
|
69
|
+
productCategories: step.productCategories.map((category) => ({
|
|
70
|
+
...category,
|
|
71
|
+
products: category.products.map((product) => ({
|
|
72
|
+
...product,
|
|
73
|
+
modifiersSet: product?.modifiersSet
|
|
74
|
+
? convertToTypeaheadOptions(product.modifiersSet as ModifierSet[])
|
|
75
|
+
: [],
|
|
76
76
|
})),
|
|
77
|
+
})),
|
|
77
78
|
})),
|
|
78
|
-
})
|
|
79
|
+
})
|
|
79
80
|
|
|
80
81
|
export const checkAvailableTimesErrors = ({
|
|
81
82
|
values,
|
|
@@ -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
|
|
4
|
+
import { useEffect, useReducer } from 'react'
|
|
5
5
|
import RRule, { Frequency, Weekday } from 'rrule'
|
|
6
6
|
import RecurrenceEndInput, { defaultOccurrences } from './RecurrenceEndInput'
|
|
7
7
|
import RecurrenceIntervalAndFrequencyInput from './RecurrenceIntervalAndFrequencyInput'
|
|
@@ -37,7 +37,7 @@ export function RecurrenceInput({
|
|
|
37
37
|
|
|
38
38
|
useEffect(
|
|
39
39
|
// TODO: unhardcode timezone
|
|
40
|
-
() =>
|
|
40
|
+
() => {
|
|
41
41
|
onChange(
|
|
42
42
|
RRule.optionsToString({
|
|
43
43
|
freq: state.freq,
|
|
@@ -47,7 +47,8 @@ export function RecurrenceInput({
|
|
|
47
47
|
tzid: 'Europe/London',
|
|
48
48
|
...state,
|
|
49
49
|
}).replace('RRULE:', ''),
|
|
50
|
-
)
|
|
50
|
+
)
|
|
51
|
+
},
|
|
51
52
|
[state],
|
|
52
53
|
)
|
|
53
54
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useContext, useState } from 'react'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
|
-
import { MemoryRouter } from 'react-router-dom'
|
|
4
3
|
import { Button } from 'react-bootstrap'
|
|
5
4
|
import {
|
|
6
5
|
SNIPPET_TEMPLATE_TYPE_VENUE_MAP,
|
|
@@ -79,14 +78,12 @@ export function Preview({
|
|
|
79
78
|
<div className='mt-5 pt-5 external-header'>
|
|
80
79
|
<PageHeader showCloseButton showBackButton>
|
|
81
80
|
<Timer timer={600} />
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/>
|
|
89
|
-
</MemoryRouter>
|
|
81
|
+
<NavigationSteps
|
|
82
|
+
steps={[
|
|
83
|
+
{ pathname: '/step1', key: '/step1', name: 'Burger' },
|
|
84
|
+
{ pathname: '/step2', key: '/step2', name: 'Cheese' },
|
|
85
|
+
]}
|
|
86
|
+
/>
|
|
90
87
|
</PageHeader>
|
|
91
88
|
</div>
|
|
92
89
|
</div>
|