delivapp-ordering 0.0.2
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/README.md +11 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/types/components/CounterButton/CounterButton.d.ts +10 -0
- package/dist/cjs/types/components/CounterButton/index.d.ts +1 -0
- package/dist/cjs/types/components/HeaderCartButton/HeaderCartButton.d.ts +9 -0
- package/dist/cjs/types/components/HeaderCartButton/index.d.ts +1 -0
- package/dist/cjs/types/components/Icons/IconsPreview.d.ts +3 -0
- package/dist/cjs/types/components/Icons/index.d.ts +26 -0
- package/dist/cjs/types/components/IngredientsSelector/IngredientsSelector.d.ts +12 -0
- package/dist/cjs/types/components/IngredientsSelector/index.d.ts +1 -0
- package/dist/cjs/types/components/Input/Input.d.ts +8 -0
- package/dist/cjs/types/components/Input/index.d.ts +1 -0
- package/dist/cjs/types/components/Media/Image.d.ts +12 -0
- package/dist/cjs/types/components/Media/Media.d.ts +20 -0
- package/dist/cjs/types/components/Media/Video.d.ts +16 -0
- package/dist/cjs/types/components/Media/index.d.ts +1 -0
- package/dist/cjs/types/components/OptionSelector/IOption.d.ts +14 -0
- package/dist/cjs/types/components/ProductCommentsSection/ProductCommentsSection.d.ts +9 -0
- package/dist/cjs/types/components/ProductCommentsSection/index.d.ts +1 -0
- package/dist/cjs/types/components/ProductConstructor/ProductConstructor.d.ts +44 -0
- package/dist/cjs/types/components/ProductConstructor/index.d.ts +1 -0
- package/dist/cjs/types/components/ProductConstructorFooter/ProductConstructorFooter.d.ts +15 -0
- package/dist/cjs/types/components/ProductConstructorFooter/index.d.ts +1 -0
- package/dist/cjs/types/components/ProductPreview/ProductPreview.d.ts +19 -0
- package/dist/cjs/types/components/ProductPreview/index.d.ts +1 -0
- package/dist/cjs/types/components/ProductPreviewList/ProductPreviewList.d.ts +12 -0
- package/dist/cjs/types/components/ProductPreviewList/index.d.ts +1 -0
- package/dist/cjs/types/components/ProductSummary/ProductSummary.d.ts +11 -0
- package/dist/cjs/types/components/ProductTags/ProductTags.d.ts +10 -0
- package/dist/cjs/types/components/ProductTags/index.d.ts +1 -0
- package/dist/cjs/types/components/RestaurantBenefits/RestaurantBenefits.d.ts +17 -0
- package/dist/cjs/types/components/RestaurantBenefits/index.d.ts +1 -0
- package/dist/cjs/types/components/RestaurantHeader/RestaurantHeader.d.ts +16 -0
- package/dist/cjs/types/components/RestaurantHeader/index.d.ts +1 -0
- package/dist/cjs/types/components/RestaurantTags/RestaurantTags.d.ts +8 -0
- package/dist/cjs/types/components/RestaurantTags/index.d.ts +1 -0
- package/dist/cjs/types/components/Stepper/Stepper.d.ts +12 -0
- package/dist/cjs/types/components/Stepper/index.d.ts +1 -0
- package/dist/cjs/types/components/SuboptionSelector/ISuboption.d.ts +8 -0
- package/dist/cjs/types/components/SuboptionSelector/SuboptionMultiSelector/SuboptionMultiSelector.d.ts +10 -0
- package/dist/cjs/types/components/SuboptionSelector/SuboptionMultiSelector/index.d.ts +1 -0
- package/dist/cjs/types/components/SuboptionSelector/SuboptionRadioSelector/SuboptionRadioSelector.d.ts +10 -0
- package/dist/cjs/types/components/SuboptionSelector/index.d.ts +1 -0
- package/dist/cjs/types/components/Tag/Tag.d.ts +8 -0
- package/dist/cjs/types/components/Tag/index.d.ts +1 -0
- package/dist/cjs/types/components/Warning/Warning.d.ts +6 -0
- package/dist/cjs/types/components/Warning/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +14 -0
- package/dist/cjs/types/enums/enums.d.ts +44 -0
- package/dist/cjs/types/helpers/context.d.ts +3 -0
- package/dist/cjs/types/helpers/productConstructor.d.ts +18 -0
- package/dist/cjs/types/helpers/utils.d.ts +3 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/types/components/CounterButton/CounterButton.d.ts +10 -0
- package/dist/esm/types/components/CounterButton/index.d.ts +1 -0
- package/dist/esm/types/components/HeaderCartButton/HeaderCartButton.d.ts +9 -0
- package/dist/esm/types/components/HeaderCartButton/index.d.ts +1 -0
- package/dist/esm/types/components/Icons/IconsPreview.d.ts +3 -0
- package/dist/esm/types/components/Icons/index.d.ts +26 -0
- package/dist/esm/types/components/IngredientsSelector/IngredientsSelector.d.ts +12 -0
- package/dist/esm/types/components/IngredientsSelector/index.d.ts +1 -0
- package/dist/esm/types/components/Input/Input.d.ts +8 -0
- package/dist/esm/types/components/Input/index.d.ts +1 -0
- package/dist/esm/types/components/Media/Image.d.ts +12 -0
- package/dist/esm/types/components/Media/Media.d.ts +20 -0
- package/dist/esm/types/components/Media/Video.d.ts +16 -0
- package/dist/esm/types/components/Media/index.d.ts +1 -0
- package/dist/esm/types/components/OptionSelector/IOption.d.ts +14 -0
- package/dist/esm/types/components/ProductCommentsSection/ProductCommentsSection.d.ts +9 -0
- package/dist/esm/types/components/ProductCommentsSection/index.d.ts +1 -0
- package/dist/esm/types/components/ProductConstructor/ProductConstructor.d.ts +44 -0
- package/dist/esm/types/components/ProductConstructor/index.d.ts +1 -0
- package/dist/esm/types/components/ProductConstructorFooter/ProductConstructorFooter.d.ts +15 -0
- package/dist/esm/types/components/ProductConstructorFooter/index.d.ts +1 -0
- package/dist/esm/types/components/ProductPreview/ProductPreview.d.ts +19 -0
- package/dist/esm/types/components/ProductPreview/index.d.ts +1 -0
- package/dist/esm/types/components/ProductPreviewList/ProductPreviewList.d.ts +12 -0
- package/dist/esm/types/components/ProductPreviewList/index.d.ts +1 -0
- package/dist/esm/types/components/ProductSummary/ProductSummary.d.ts +11 -0
- package/dist/esm/types/components/ProductTags/ProductTags.d.ts +10 -0
- package/dist/esm/types/components/ProductTags/index.d.ts +1 -0
- package/dist/esm/types/components/RestaurantBenefits/RestaurantBenefits.d.ts +17 -0
- package/dist/esm/types/components/RestaurantBenefits/index.d.ts +1 -0
- package/dist/esm/types/components/RestaurantHeader/RestaurantHeader.d.ts +16 -0
- package/dist/esm/types/components/RestaurantHeader/index.d.ts +1 -0
- package/dist/esm/types/components/RestaurantTags/RestaurantTags.d.ts +8 -0
- package/dist/esm/types/components/RestaurantTags/index.d.ts +1 -0
- package/dist/esm/types/components/Stepper/Stepper.d.ts +12 -0
- package/dist/esm/types/components/Stepper/index.d.ts +1 -0
- package/dist/esm/types/components/SuboptionSelector/ISuboption.d.ts +8 -0
- package/dist/esm/types/components/SuboptionSelector/SuboptionMultiSelector/SuboptionMultiSelector.d.ts +10 -0
- package/dist/esm/types/components/SuboptionSelector/SuboptionMultiSelector/index.d.ts +1 -0
- package/dist/esm/types/components/SuboptionSelector/SuboptionRadioSelector/SuboptionRadioSelector.d.ts +10 -0
- package/dist/esm/types/components/SuboptionSelector/index.d.ts +1 -0
- package/dist/esm/types/components/Tag/Tag.d.ts +8 -0
- package/dist/esm/types/components/Tag/index.d.ts +1 -0
- package/dist/esm/types/components/Warning/Warning.d.ts +6 -0
- package/dist/esm/types/components/Warning/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +14 -0
- package/dist/esm/types/enums/enums.d.ts +44 -0
- package/dist/esm/types/helpers/context.d.ts +3 -0
- package/dist/esm/types/helpers/productConstructor.d.ts +18 -0
- package/dist/esm/types/helpers/utils.d.ts +3 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/index.d.ts +276 -0
- package/package.json +69 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
import { CURRENCY } from '../../../enums/enums';
|
|
4
|
+
import { ISuboption } from '../ISuboption';
|
|
5
|
+
export interface SuboptionRadioSelectorProps {
|
|
6
|
+
currency: CURRENCY;
|
|
7
|
+
ingredients: ISuboption[];
|
|
8
|
+
onSelect: (id: string, quantity: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const SuboptionRadioSelector: ({ ingredients, onSelect, currency }: SuboptionRadioSelectorProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SuboptionMultiSelector';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tag, type TagProps } from './Tag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type WarningProps, Warning } from './Warning';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './CounterButton';
|
|
2
|
+
export * from './Icons';
|
|
3
|
+
export * from './IngredientsSelector';
|
|
4
|
+
export * from './Input';
|
|
5
|
+
export * from './Media';
|
|
6
|
+
export * from './ProductConstructor';
|
|
7
|
+
export * from './ProductPreview';
|
|
8
|
+
export * from './ProductPreviewList';
|
|
9
|
+
export * from './ProductTags';
|
|
10
|
+
export * from './RestaurantHeader';
|
|
11
|
+
export * from './RestaurantTags';
|
|
12
|
+
export * from './Stepper';
|
|
13
|
+
export * from './SuboptionSelector';
|
|
14
|
+
export * from './Warning';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare enum CROP_MODE {
|
|
2
|
+
'fill' = 0,
|
|
3
|
+
'pad' = 1,
|
|
4
|
+
'fit' = 2,
|
|
5
|
+
'mfit' = 3,
|
|
6
|
+
'scale' = 4,
|
|
7
|
+
'limit' = 5,
|
|
8
|
+
'lpad' = 6,
|
|
9
|
+
'mpad' = 7,
|
|
10
|
+
'crop' = 8,
|
|
11
|
+
'fill_pad' = 9,
|
|
12
|
+
'thumb' = 10
|
|
13
|
+
}
|
|
14
|
+
export declare enum GRAVITY_MODE {
|
|
15
|
+
'center' = 0,
|
|
16
|
+
'north_east' = 1,
|
|
17
|
+
'north' = 2,
|
|
18
|
+
'north_west' = 3,
|
|
19
|
+
'west' = 4,
|
|
20
|
+
'south_west' = 5,
|
|
21
|
+
'south' = 6,
|
|
22
|
+
'south_east' = 7,
|
|
23
|
+
'east' = 8,
|
|
24
|
+
'liquid' = 9,
|
|
25
|
+
'auto' = 10
|
|
26
|
+
}
|
|
27
|
+
export declare enum QUALITY_MODE {
|
|
28
|
+
best = 1,
|
|
29
|
+
good = 2,
|
|
30
|
+
eco = 3,
|
|
31
|
+
low = 4,
|
|
32
|
+
custom = 5
|
|
33
|
+
}
|
|
34
|
+
export declare enum CURRENCY {
|
|
35
|
+
'USD' = "$",
|
|
36
|
+
'EUR' = "\u20AC",
|
|
37
|
+
'GBP' = "\u00A3",
|
|
38
|
+
'UAH' = "\u20B4",
|
|
39
|
+
'AED' = "\u062F.",
|
|
40
|
+
'ILS' = "\u20AA",
|
|
41
|
+
'JPY' = "\u00A5",
|
|
42
|
+
'KZT' = "\u20B8",
|
|
43
|
+
'RUB' = "\u20BD"
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const INGREDIENTS = "#INGREDIENTS";
|
|
2
|
+
export declare const HALF_SELECTOR = "#HALF_SELECTOR";
|
|
3
|
+
export declare const HALF_SELECTOR_FULL = "#HALF_SELECTOR_FULL";
|
|
4
|
+
export declare const HALF_SELECTOR_HALF = "#HALF_SELECTOR_HALF";
|
|
5
|
+
export declare enum HALF_OPTION {
|
|
6
|
+
none = 0,
|
|
7
|
+
left = 1,
|
|
8
|
+
right = 2
|
|
9
|
+
}
|
|
10
|
+
export declare const prepeareIngredients: (ingredients: any) => {
|
|
11
|
+
id: string;
|
|
12
|
+
min: number;
|
|
13
|
+
max: any;
|
|
14
|
+
name: string;
|
|
15
|
+
ingredients: any;
|
|
16
|
+
};
|
|
17
|
+
export declare const prepeareOptions: (extras: any, extraHalf: any, isHalf: any) => any[];
|
|
18
|
+
export declare const getErrorContsructor: (option: any) => string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { HTMLProps, InputHTMLAttributes, ReactElement, ChangeEvent, FC, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
interface CounterButtonProps {
|
|
6
|
+
count: number;
|
|
7
|
+
isAddDisable: boolean;
|
|
8
|
+
isRemoveDisable: boolean;
|
|
9
|
+
onAdd: () => void;
|
|
10
|
+
onRemove: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const CounterButton: ({ count, isRemoveDisable, isAddDisable, onAdd, onRemove, }: CounterButtonProps) => React__default.JSX.Element;
|
|
13
|
+
|
|
14
|
+
type IconProps = Omit<Partial<HTMLProps<SVGElement>>, 'size'> & {
|
|
15
|
+
size?: 'big' | 'small' | 'default' | number | string;
|
|
16
|
+
};
|
|
17
|
+
declare const IconTrash: (props: IconProps) => React__default.JSX.Element;
|
|
18
|
+
declare const IconStar: (props: IconProps) => React__default.JSX.Element;
|
|
19
|
+
declare const IconStarBorder: (props: IconProps) => React__default.JSX.Element;
|
|
20
|
+
declare const IconVegan: (props: IconProps) => React__default.JSX.Element;
|
|
21
|
+
declare const IconSpicy: (props: IconProps) => React__default.JSX.Element;
|
|
22
|
+
declare const IconNoGluten: (props: IconProps) => React__default.JSX.Element;
|
|
23
|
+
declare const IconSearch: (props: IconProps) => React__default.JSX.Element;
|
|
24
|
+
declare const IconCart: (props: IconProps) => React__default.JSX.Element;
|
|
25
|
+
declare const IconBicycle: (props: IconProps) => React__default.JSX.Element;
|
|
26
|
+
declare const IconClockAfternoon: (props: IconProps) => React__default.JSX.Element;
|
|
27
|
+
declare const IconClose: (props: IconProps) => React__default.JSX.Element;
|
|
28
|
+
declare const IconMapPin: (props: IconProps) => React__default.JSX.Element;
|
|
29
|
+
declare const IconPersonSimpleWalk: (props: IconProps) => React__default.JSX.Element;
|
|
30
|
+
declare const IconSparkle: (props: IconProps) => React__default.JSX.Element;
|
|
31
|
+
declare const IconPlay: (props: IconProps) => React__default.JSX.Element;
|
|
32
|
+
declare const IconPause: (props: IconProps) => React__default.JSX.Element;
|
|
33
|
+
declare const IconMute: (props: IconProps) => React__default.JSX.Element;
|
|
34
|
+
declare const IconUnmute: (props: IconProps) => React__default.JSX.Element;
|
|
35
|
+
declare const IconPlus: (props: IconProps) => React__default.JSX.Element;
|
|
36
|
+
declare const IconMinus: (props: IconProps) => React__default.JSX.Element;
|
|
37
|
+
declare const IconWarning: (props: IconProps) => React__default.JSX.Element;
|
|
38
|
+
|
|
39
|
+
interface Ingredient {
|
|
40
|
+
name: string;
|
|
41
|
+
id: string;
|
|
42
|
+
quantity?: number;
|
|
43
|
+
}
|
|
44
|
+
interface IngredientsSelectorProps {
|
|
45
|
+
ingredients: Ingredient[];
|
|
46
|
+
onSelect: (id: number) => void;
|
|
47
|
+
}
|
|
48
|
+
declare const IngredientsSelector: ({ ingredients, onSelect }: IngredientsSelectorProps) => React__default.JSX.Element;
|
|
49
|
+
|
|
50
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
51
|
+
debounce?: number;
|
|
52
|
+
icon?: ReactElement;
|
|
53
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
54
|
+
}
|
|
55
|
+
declare const Input: FC<InputProps>;
|
|
56
|
+
|
|
57
|
+
declare enum CROP_MODE {
|
|
58
|
+
'fill' = 0,
|
|
59
|
+
'pad' = 1,
|
|
60
|
+
'fit' = 2,
|
|
61
|
+
'mfit' = 3,
|
|
62
|
+
'scale' = 4,
|
|
63
|
+
'limit' = 5,
|
|
64
|
+
'lpad' = 6,
|
|
65
|
+
'mpad' = 7,
|
|
66
|
+
'crop' = 8,
|
|
67
|
+
'fill_pad' = 9,
|
|
68
|
+
'thumb' = 10
|
|
69
|
+
}
|
|
70
|
+
declare enum GRAVITY_MODE {
|
|
71
|
+
'center' = 0,
|
|
72
|
+
'north_east' = 1,
|
|
73
|
+
'north' = 2,
|
|
74
|
+
'north_west' = 3,
|
|
75
|
+
'west' = 4,
|
|
76
|
+
'south_west' = 5,
|
|
77
|
+
'south' = 6,
|
|
78
|
+
'south_east' = 7,
|
|
79
|
+
'east' = 8,
|
|
80
|
+
'liquid' = 9,
|
|
81
|
+
'auto' = 10
|
|
82
|
+
}
|
|
83
|
+
declare enum QUALITY_MODE {
|
|
84
|
+
best = 1,
|
|
85
|
+
good = 2,
|
|
86
|
+
eco = 3,
|
|
87
|
+
low = 4,
|
|
88
|
+
custom = 5
|
|
89
|
+
}
|
|
90
|
+
declare enum CURRENCY {
|
|
91
|
+
'USD' = "$",
|
|
92
|
+
'EUR' = "\u20AC",
|
|
93
|
+
'GBP' = "\u00A3",
|
|
94
|
+
'UAH' = "\u20B4",
|
|
95
|
+
'AED' = "\u062F.",
|
|
96
|
+
'ILS' = "\u20AA",
|
|
97
|
+
'JPY' = "\u00A5",
|
|
98
|
+
'KZT' = "\u20B8",
|
|
99
|
+
'RUB' = "\u20BD"
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface MediaSettings {
|
|
103
|
+
quality_mode: QUALITY_MODE;
|
|
104
|
+
gravity_mode: GRAVITY_MODE;
|
|
105
|
+
crop_mode: CROP_MODE;
|
|
106
|
+
quality: number;
|
|
107
|
+
}
|
|
108
|
+
interface MediaProp {
|
|
109
|
+
settings?: MediaSettings;
|
|
110
|
+
src?: string;
|
|
111
|
+
alt?: string;
|
|
112
|
+
id?: string;
|
|
113
|
+
controls?: boolean;
|
|
114
|
+
autoPlay?: boolean;
|
|
115
|
+
onEnd?: () => void;
|
|
116
|
+
onStart?: () => void;
|
|
117
|
+
}
|
|
118
|
+
declare const Media: FC<MediaProp>;
|
|
119
|
+
|
|
120
|
+
interface ISuboption {
|
|
121
|
+
name: string;
|
|
122
|
+
max: number;
|
|
123
|
+
id: string;
|
|
124
|
+
enabled: boolean;
|
|
125
|
+
quantity?: number;
|
|
126
|
+
price?: number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare enum HALF_OPTION {
|
|
130
|
+
none = 0,
|
|
131
|
+
left = 1,
|
|
132
|
+
right = 2
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface IOption {
|
|
136
|
+
name?: string;
|
|
137
|
+
min: number;
|
|
138
|
+
max: number;
|
|
139
|
+
respectTo: number | null;
|
|
140
|
+
withHalfOption: boolean;
|
|
141
|
+
id: string;
|
|
142
|
+
enabled: boolean;
|
|
143
|
+
limitSuboptionsByMax: boolean;
|
|
144
|
+
half: HALF_OPTION;
|
|
145
|
+
suboptions: ISuboption[];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface ProductConstructorProps {
|
|
149
|
+
id: string;
|
|
150
|
+
name?: string;
|
|
151
|
+
media?: MediaProp;
|
|
152
|
+
currency: CURRENCY;
|
|
153
|
+
price: number;
|
|
154
|
+
oldPrice: number;
|
|
155
|
+
totalPrice: number;
|
|
156
|
+
description?: string;
|
|
157
|
+
max?: number;
|
|
158
|
+
quantity?: number;
|
|
159
|
+
allowComments: boolean;
|
|
160
|
+
isHalf: boolean;
|
|
161
|
+
ingredients: Ingredient[];
|
|
162
|
+
extras: {
|
|
163
|
+
name: string;
|
|
164
|
+
id: string;
|
|
165
|
+
enabled: boolean;
|
|
166
|
+
options: IOption[];
|
|
167
|
+
}[];
|
|
168
|
+
extrasHalf: {
|
|
169
|
+
name: string;
|
|
170
|
+
id: string;
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
options: IOption[];
|
|
173
|
+
}[];
|
|
174
|
+
onChangeIngredients: (id: number) => void;
|
|
175
|
+
onChangeQuantity: (quantity: number) => void;
|
|
176
|
+
onChangeExtra: (parentId: string, id: string, quantity: number) => void;
|
|
177
|
+
onChangeExtraHalf: (parentId: string, id: string, half: HALF_OPTION, quantity: number) => void;
|
|
178
|
+
onChangeName: (v: string) => void;
|
|
179
|
+
onChangeComment: (v: string) => void;
|
|
180
|
+
onAdd: () => void;
|
|
181
|
+
onRemove: () => void;
|
|
182
|
+
onAddToCart: () => void;
|
|
183
|
+
}
|
|
184
|
+
declare const ProductConstructor: FC<ProductConstructorProps>;
|
|
185
|
+
|
|
186
|
+
interface ProductTagsProps {
|
|
187
|
+
vegan?: boolean;
|
|
188
|
+
vegetarian?: boolean;
|
|
189
|
+
isNew?: boolean;
|
|
190
|
+
spicy?: number;
|
|
191
|
+
glutenFree?: boolean;
|
|
192
|
+
}
|
|
193
|
+
declare const ProductTags: FC<ProductTagsProps>;
|
|
194
|
+
|
|
195
|
+
interface ProductPreviewProp extends ProductTagsProps {
|
|
196
|
+
name: string;
|
|
197
|
+
id: string;
|
|
198
|
+
description: string;
|
|
199
|
+
price: number;
|
|
200
|
+
oldPrice?: number;
|
|
201
|
+
image?: MediaProp;
|
|
202
|
+
currency: CURRENCY;
|
|
203
|
+
trashIcon?: boolean;
|
|
204
|
+
quantity?: number;
|
|
205
|
+
onClick?: (id: string) => void;
|
|
206
|
+
onClickTrash?: (id: string) => void;
|
|
207
|
+
}
|
|
208
|
+
declare const ProductPreview: FC<ProductPreviewProp>;
|
|
209
|
+
|
|
210
|
+
interface ProductPreviewListProps {
|
|
211
|
+
categories: {
|
|
212
|
+
name: string;
|
|
213
|
+
id: string;
|
|
214
|
+
products: ProductPreviewProp[];
|
|
215
|
+
}[];
|
|
216
|
+
onClickProduct?: (categoryId: string, productId: string) => void;
|
|
217
|
+
}
|
|
218
|
+
declare const ProductPreviewList: FC<ProductPreviewListProps>;
|
|
219
|
+
|
|
220
|
+
interface RestaurantTagsProps {
|
|
221
|
+
score?: number;
|
|
222
|
+
isNew?: boolean;
|
|
223
|
+
kosher?: boolean;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
interface RestaurantBenefitsProps {
|
|
227
|
+
dontHide?: boolean;
|
|
228
|
+
minimum?: number;
|
|
229
|
+
isPickUp?: boolean;
|
|
230
|
+
withTitle?: boolean;
|
|
231
|
+
estimationRangeMin?: number;
|
|
232
|
+
estimationRangeMax?: number;
|
|
233
|
+
estimationTime?: string;
|
|
234
|
+
distance?: boolean;
|
|
235
|
+
deliveryPrice?: number;
|
|
236
|
+
currency?: CURRENCY;
|
|
237
|
+
deliveryToLocation?: number;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
interface RestaurantHeaderProps extends RestaurantTagsProps, RestaurantBenefitsProps {
|
|
241
|
+
name: string;
|
|
242
|
+
isFavorite: boolean;
|
|
243
|
+
cartAmount?: number;
|
|
244
|
+
currency?: CURRENCY;
|
|
245
|
+
alternativeView?: boolean;
|
|
246
|
+
searchValue?: string;
|
|
247
|
+
onSearch?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
248
|
+
onCartClick?: () => void;
|
|
249
|
+
}
|
|
250
|
+
declare const RestaurantHeader: FC<RestaurantHeaderProps>;
|
|
251
|
+
|
|
252
|
+
interface StepProps {
|
|
253
|
+
name: string;
|
|
254
|
+
component: ReactNode;
|
|
255
|
+
}
|
|
256
|
+
interface StepperProps {
|
|
257
|
+
steps: StepProps[];
|
|
258
|
+
currentStep: number;
|
|
259
|
+
}
|
|
260
|
+
declare const Stepper: ({ steps, currentStep }: StepperProps) => React__default.JSX.Element;
|
|
261
|
+
|
|
262
|
+
interface SuboptionMultiSelectorProps {
|
|
263
|
+
currency: CURRENCY;
|
|
264
|
+
suboptions: ISuboption[];
|
|
265
|
+
onChangeQuantity: (id: string, operation: number) => void;
|
|
266
|
+
}
|
|
267
|
+
declare const SuboptionMultiSelector: ({ suboptions, onChangeQuantity, currency }: SuboptionMultiSelectorProps) => React__default.JSX.Element;
|
|
268
|
+
|
|
269
|
+
interface WarningProps {
|
|
270
|
+
message: string;
|
|
271
|
+
}
|
|
272
|
+
declare const Warning: ({ message }: WarningProps) => React__default.JSX.Element;
|
|
273
|
+
|
|
274
|
+
declare const TranslationUIProvider: React.Provider<any>;
|
|
275
|
+
|
|
276
|
+
export { CounterButton, CounterButtonProps, IconBicycle, IconCart, IconClockAfternoon, IconClose, IconMapPin, IconMinus, IconMute, IconNoGluten, IconPause, IconPersonSimpleWalk, IconPlay, IconPlus, IconProps, IconSearch, IconSparkle, IconSpicy, IconStar, IconStarBorder, IconTrash, IconUnmute, IconVegan, IconWarning, IngredientsSelector, IngredientsSelectorProps, Input, InputProps, Media, MediaProp, ProductConstructor, ProductConstructorProps, ProductPreview, ProductPreviewList, ProductPreviewListProps, ProductPreviewProp, ProductTags, ProductTagsProps, RestaurantHeader, RestaurantHeaderProps, Stepper, StepperProps, SuboptionMultiSelector, SuboptionMultiSelectorProps, TranslationUIProvider, Warning, WarningProps };
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "delivapp-ordering",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/esm/index.js",
|
|
6
|
+
"module": "dist/cjs/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "eslint --ext .ts,.tsx src --fix",
|
|
13
|
+
"pub": "npm version patch && npm publish",
|
|
14
|
+
"build": "npm run lint && rollup -c",
|
|
15
|
+
"sb": "storybook dev -p 6006",
|
|
16
|
+
"build-storybook": "storybook build",
|
|
17
|
+
"deploy-storybook": "npm run build-storybook && gh-pages -d storybook-static"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [],
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@babel/core": "^7.20.12",
|
|
24
|
+
"@babel/preset-env": "^7.22.4",
|
|
25
|
+
"@babel/preset-react": "^7.22.3",
|
|
26
|
+
"@babel/preset-typescript": "^7.21.5",
|
|
27
|
+
"@rollup/plugin-terser": "^0.3.0",
|
|
28
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
29
|
+
"@rollup/plugin-url": "^8.0.1",
|
|
30
|
+
"@storybook/addon-actions": "^7.0.18",
|
|
31
|
+
"@storybook/addon-essentials": "^7.0.18",
|
|
32
|
+
"@storybook/addon-interactions": "^7.0.18",
|
|
33
|
+
"@storybook/addon-links": "^7.0.18",
|
|
34
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
35
|
+
"@storybook/react": "^7.0.18",
|
|
36
|
+
"@storybook/react-webpack5": "^7.0.18",
|
|
37
|
+
"@storybook/testing-library": "^0.1.0",
|
|
38
|
+
"@svgr/rollup": "^6.5.1",
|
|
39
|
+
"@svgr/webpack": "^6.5.1",
|
|
40
|
+
"@types/react": "^18.0.27",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
42
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
43
|
+
"autoprefixer": "^8.4.14",
|
|
44
|
+
"babel-loader": "^8.3.0",
|
|
45
|
+
"classnames": "^2.3.2",
|
|
46
|
+
"cloudinary-react": "^1.8.1",
|
|
47
|
+
"eslint": "^8.32.0",
|
|
48
|
+
"eslint-config-standard-with-typescript": "^31.0.0",
|
|
49
|
+
"eslint-plugin-n": "^15.6.1",
|
|
50
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
51
|
+
"eslint-plugin-react": "^7.32.2",
|
|
52
|
+
"eslint-plugin-storybook": "^0.6.12",
|
|
53
|
+
"postcss": "^8.4.24",
|
|
54
|
+
"postcss-loader": "^7.3.2",
|
|
55
|
+
"react-overflow-list": "^0.5.0",
|
|
56
|
+
"rollup": "^3.10.1",
|
|
57
|
+
"rollup-plugin-dts": "^5.1.1",
|
|
58
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
59
|
+
"sass": "^1.62.1",
|
|
60
|
+
"sass-loader": "^13.3.1",
|
|
61
|
+
"storybook": "^7.0.18",
|
|
62
|
+
"typescript": "^4.9.4",
|
|
63
|
+
"url-loader": "^4.1.1"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"react": "^17.0.2",
|
|
67
|
+
"react-dom": "^17.0.2"
|
|
68
|
+
}
|
|
69
|
+
}
|