@licklist/design 0.76.0 → 0.78.0
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/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/fullscreen-loader/FullscreenLoader.d.ts +4 -0
- package/dist/fullscreen-loader/FullscreenLoader.d.ts.map +1 -0
- package/dist/fullscreen-loader/FullscreenLoader.js +73 -0
- package/dist/fullscreen-loader/context.d.ts +3 -0
- package/dist/fullscreen-loader/context.d.ts.map +1 -0
- package/dist/fullscreen-loader/context.js +10 -0
- package/dist/fullscreen-loader/index.d.ts +4 -0
- package/dist/fullscreen-loader/index.d.ts.map +1 -0
- package/dist/fullscreen-loader/useFullscreenLoader.d.ts +2 -0
- package/dist/fullscreen-loader/useFullscreenLoader.d.ts.map +1 -0
- package/dist/fullscreen-loader/useFullscreenLoader.js +8 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +1 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +0 -2
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -3
- package/dist/product-set/form/StepsControl.d.ts.map +1 -1
- package/dist/product-set/form/StepsControl.js +2 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +0 -3
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/form/context.d.ts +1 -2
- package/dist/product-set/form/context.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/styles/product-set/ProductSetForm.scss +2 -3
- package/package.json +1 -1
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +12 -7
- package/src/fullscreen-loader/FullscreenLoader.tsx +19 -0
- package/src/fullscreen-loader/context.ts +5 -0
- package/src/fullscreen-loader/index.ts +3 -0
- package/src/fullscreen-loader/useFullscreenLoader.ts +4 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/index.ts +1 -0
- package/src/layout/DropDown.tsx +1 -1
- package/src/product-set/control/ProductSetControl.tsx +11 -8
- package/src/product-set/form/ProductSetForm.tsx +1 -4
- package/src/product-set/form/ProductZonesControl.tsx +1 -4
- package/src/product-set/form/ProductsControl.tsx +1 -9
- package/src/product-set/form/StepsControl.tsx +1 -3
- package/src/product-set/form/SubProductsControl.tsx +0 -3
- package/src/product-set/form/VenueMapsControl.tsx +0 -3
- package/src/product-set/form/context.tsx +2 -5
- package/src/product-set/product/ProductControl.tsx +1 -5
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/sortable-tree/SortableTreeItem.tsx +1 -6
- package/src/styles/product-set/ProductSetForm.scss +2 -3
- package/yarn.lock +138 -138
|
@@ -7,10 +7,7 @@ import { VenueMapSet } from '@licklist/core/dist/DataMapper/Product/VenueMapSetD
|
|
|
7
7
|
import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
|
|
8
8
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
|
|
9
9
|
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
|
|
10
|
-
|
|
11
10
|
import { isEqual } from 'lodash'
|
|
12
|
-
// eslint-disable-next-line max-len
|
|
13
|
-
import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
|
|
14
11
|
import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
|
|
15
12
|
import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
|
|
16
13
|
import { transformErrorToMessage } from '@licklist/plugins'
|
|
@@ -55,7 +52,7 @@ export interface ProductSetFormProps
|
|
|
55
52
|
serverErrors?: ServerError
|
|
56
53
|
providerHasMap?: boolean
|
|
57
54
|
venueMapSets?: VenueMapSet[]
|
|
58
|
-
providerHasBookingManagement?:
|
|
55
|
+
providerHasBookingManagement?: boolean
|
|
59
56
|
zones?: Zone[] | null
|
|
60
57
|
isCreateAction?: boolean
|
|
61
58
|
isOverrides?: boolean
|
|
@@ -9,18 +9,14 @@ import {
|
|
|
9
9
|
} from 'react-hook-form'
|
|
10
10
|
import { useSensor, MouseSensor } from '@dnd-kit/core'
|
|
11
11
|
import { useTranslation } from 'react-i18next'
|
|
12
|
-
import { DEFAULT_PRODUCT_TYPE } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper'
|
|
13
12
|
import { generateUuid } from '@licklist/core/dist/Services'
|
|
14
13
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService'
|
|
15
|
-
|
|
16
14
|
import { CategoryType } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper'
|
|
17
15
|
import { ProductControl, ProductControlProps, ProductSetFormValues } from '..'
|
|
18
16
|
import { SortableTree } from '../../sortable-tree'
|
|
19
17
|
import { CreateProductSetItem } from '../item/CreateProductSetItem'
|
|
20
18
|
import { Product } from '../types'
|
|
21
19
|
import { WithIsLoading } from './ProductSetForm'
|
|
22
|
-
// @TODO not for first release
|
|
23
|
-
// import Popover from "./ProductSetFormPopover";
|
|
24
20
|
import { useSortableTreeFunctions } from '../hooks/useSortableTreeFunctions'
|
|
25
21
|
import { SubProductsControl } from './SubProductsControl'
|
|
26
22
|
import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem'
|
|
@@ -60,7 +56,6 @@ const getDefaultProductValue = (sort: number): Product => ({
|
|
|
60
56
|
hasSpecialNotes: false,
|
|
61
57
|
weight: 0,
|
|
62
58
|
originalProductId: null,
|
|
63
|
-
type: DEFAULT_PRODUCT_TYPE,
|
|
64
59
|
tierId: Number(uniqueId()),
|
|
65
60
|
subProducts: [],
|
|
66
61
|
images: [],
|
|
@@ -289,7 +284,6 @@ export function ProductsControl({
|
|
|
289
284
|
trigger(`${productControlFieldName}.${index}`)
|
|
290
285
|
}
|
|
291
286
|
saveValidField={saveValidField}
|
|
292
|
-
// preItem={<Popover className="d-none d-sm-block" />}
|
|
293
287
|
>
|
|
294
288
|
<SubProductsControl
|
|
295
289
|
isLoading={isLoading}
|
|
@@ -315,9 +309,7 @@ export function ProductsControl({
|
|
|
315
309
|
}
|
|
316
310
|
}}
|
|
317
311
|
/>
|
|
318
|
-
<div className='manual-form-error'>
|
|
319
|
-
{categoryProductErrors && categoryProductErrors.message}
|
|
320
|
-
</div>
|
|
312
|
+
<div className='manual-form-error'>{categoryProductErrors?.message}</div>
|
|
321
313
|
</>
|
|
322
314
|
)
|
|
323
315
|
}
|
|
@@ -70,9 +70,6 @@ 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
|
|
76
73
|
append(subProductCopy)
|
|
77
74
|
}}
|
|
78
75
|
/>
|
|
@@ -46,9 +46,6 @@ 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
|
|
52
49
|
products={products}
|
|
53
50
|
pointProducts={pointProducts}
|
|
54
51
|
onPointProductsChange={onPointProductsChange}
|
|
@@ -8,12 +8,9 @@ import {
|
|
|
8
8
|
} from 'react'
|
|
9
9
|
import { VenueMapSet } from '@licklist/core/dist/DataMapper/Product/VenueMapSetDataMapper'
|
|
10
10
|
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
|
|
11
|
-
// eslint-disable-next-line max-len
|
|
12
|
-
import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
|
|
13
11
|
import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
|
|
14
12
|
import { SelectItem } from '../../types/generic/SelectItem'
|
|
15
13
|
|
|
16
|
-
|
|
17
14
|
interface LoadingContext {
|
|
18
15
|
isLoading: boolean
|
|
19
16
|
setLoading: (loading: boolean) => void
|
|
@@ -21,7 +18,7 @@ interface LoadingContext {
|
|
|
21
18
|
modifiersSetList?: ModifierSet[] | null
|
|
22
19
|
providerHasMap?: boolean | null
|
|
23
20
|
venueMapSets?: VenueMapSet[]
|
|
24
|
-
providerHasBookingManagement?:
|
|
21
|
+
providerHasBookingManagement?: boolean
|
|
25
22
|
zones?: Zone[] | null
|
|
26
23
|
expandedProductCategories: Record<string, boolean>
|
|
27
24
|
setExpandedProductCategories: Dispatch<
|
|
@@ -46,7 +43,7 @@ type ProductSetContextProviderProps = PropsWithChildren<
|
|
|
46
43
|
export function ProductSetContextProvider({
|
|
47
44
|
children,
|
|
48
45
|
productGroupList = [],
|
|
49
|
-
modifiersSetList =[],
|
|
46
|
+
modifiersSetList = [],
|
|
50
47
|
providerHasMap = false,
|
|
51
48
|
venueMapSets = [],
|
|
52
49
|
providerHasBookingManagement,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryType,
|
|
3
3
|
QuantityType,
|
|
4
|
-
QUANTITY_TYPE_CONSTANT,
|
|
5
|
-
QUANTITY_TYPE_LIST_DTO,
|
|
6
|
-
QUANTITY_TYPE_RECHARGING,
|
|
7
4
|
} from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper'
|
|
8
5
|
import { ProductType } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper'
|
|
9
6
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService'
|
|
@@ -28,13 +25,11 @@ import {
|
|
|
28
25
|
Controller,
|
|
29
26
|
Path,
|
|
30
27
|
useFormContext,
|
|
31
|
-
useWatch,
|
|
32
28
|
UnpackNestedValue,
|
|
33
29
|
PathValue,
|
|
34
30
|
} from 'react-hook-form'
|
|
35
31
|
import { useTranslation } from 'react-i18next'
|
|
36
32
|
import { useImages } from '@licklist/plugins/dist/hooks/Media/useImages'
|
|
37
|
-
|
|
38
33
|
import {
|
|
39
34
|
Image,
|
|
40
35
|
IMAGE_TYPE_IMAGE,
|
|
@@ -417,6 +412,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
417
412
|
name={`${fieldNamePrefix}.isSoldOut` as Path<T>}
|
|
418
413
|
/>
|
|
419
414
|
</Form.Group>
|
|
415
|
+
|
|
420
416
|
<Form.Group controlId={advancedId} className='custom-checkbox'>
|
|
421
417
|
<Form.Check
|
|
422
418
|
custom
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.product-set-form {
|
|
2
|
-
|
|
3
2
|
input,
|
|
4
3
|
textarea,
|
|
5
4
|
select,
|
|
@@ -211,8 +210,8 @@
|
|
|
211
210
|
|
|
212
211
|
.sortable-tree-item-toggle {
|
|
213
212
|
.product-zone-badge {
|
|
214
|
-
background-color: #
|
|
215
|
-
color: #
|
|
213
|
+
background-color: #efe9f5;
|
|
214
|
+
color: #84269b;
|
|
216
215
|
font-size: 0.875rem;
|
|
217
216
|
font-weight: 600;
|
|
218
217
|
}
|