@open-tender/types 0.1.7 → 0.1.9
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/cjs/types/api/config.d.ts +5 -368
- package/dist/cjs/types/api/configPos.d.ts +47 -0
- package/dist/cjs/types/api/creditCards.d.ts +6 -2
- package/dist/cjs/types/api/customer/communicationPreferences.d.ts +1 -1
- package/dist/cjs/types/api/customer/customer.d.ts +5 -5
- package/dist/cjs/types/api/customer/giftCards.d.ts +12 -3
- package/dist/cjs/types/api/customer/index.d.ts +0 -1
- package/dist/cjs/types/api/customer/index.js +0 -1
- package/dist/cjs/types/api/customer/rewards.d.ts +2 -3
- package/dist/cjs/types/api/deals.d.ts +2 -3
- package/dist/cjs/types/api/donations.d.ts +3 -3
- package/dist/cjs/types/api/index.d.ts +10 -10
- package/dist/cjs/types/api/index.js +10 -10
- package/dist/cjs/types/api/order.d.ts +8 -9
- package/dist/cjs/types/api/pos.d.ts +54 -3
- package/dist/cjs/types/api/revenueCenter.d.ts +160 -47
- package/dist/cjs/types/api/theme.d.ts +493 -0
- package/dist/cjs/types/global.d.ts +9 -1
- package/dist/cjs/types/index.d.ts +1 -1
- package/dist/cjs/types/index.js +1 -1
- package/dist/cjs/types/inputs.d.ts +80 -0
- package/dist/cjs/types/inputs.js +23 -0
- package/dist/cjs/types/request.d.ts +1 -1
- package/dist/cjs/types/themePos.js +2 -0
- package/dist/esm/types/api/config.d.ts +5 -368
- package/dist/esm/types/api/configPos.d.ts +47 -0
- package/dist/esm/types/api/creditCards.d.ts +6 -2
- package/dist/esm/types/api/customer/communicationPreferences.d.ts +1 -1
- package/dist/esm/types/api/customer/customer.d.ts +5 -5
- package/dist/esm/types/api/customer/giftCards.d.ts +12 -3
- package/dist/esm/types/api/customer/index.d.ts +0 -1
- package/dist/esm/types/api/customer/index.js +0 -1
- package/dist/esm/types/api/customer/rewards.d.ts +2 -3
- package/dist/esm/types/api/deals.d.ts +2 -3
- package/dist/esm/types/api/donations.d.ts +3 -3
- package/dist/esm/types/api/index.d.ts +10 -10
- package/dist/esm/types/api/index.js +10 -10
- package/dist/esm/types/api/order.d.ts +8 -9
- package/dist/esm/types/api/pos.d.ts +54 -3
- package/dist/esm/types/api/revenueCenter.d.ts +160 -47
- package/dist/esm/types/api/theme.d.ts +493 -0
- package/dist/esm/types/global.d.ts +9 -1
- package/dist/esm/types/index.d.ts +1 -1
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/inputs.d.ts +80 -0
- package/dist/esm/types/inputs.js +15 -0
- package/dist/esm/types/request.d.ts +1 -1
- package/dist/esm/types/themePos.js +1 -0
- package/package.json +1 -1
- package/dist/cjs/types/api/customer/revenueCenters.d.ts +0 -187
- package/dist/esm/types/api/customer/revenueCenters.d.ts +0 -187
- /package/dist/cjs/types/api/{customer/revenueCenters.js → configPos.js} +0 -0
- /package/dist/cjs/types/{theme.js → api/theme.js} +0 -0
- /package/dist/cjs/types/{theme.d.ts → themePos.d.ts} +0 -0
- /package/dist/esm/types/api/{customer/revenueCenters.js → configPos.js} +0 -0
- /package/dist/esm/types/{theme.js → api/theme.js} +0 -0
- /package/dist/esm/types/{theme.d.ts → themePos.d.ts} +0 -0
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
export interface ThemeAlert extends Record<string, string> {
|
|
2
|
+
bgColor: string;
|
|
3
|
+
color: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ThemeColorsBase extends Record<string, string> {
|
|
6
|
+
alert: string;
|
|
7
|
+
allergens: string;
|
|
8
|
+
dark: string;
|
|
9
|
+
error: string;
|
|
10
|
+
light: string;
|
|
11
|
+
primary: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
success: string;
|
|
14
|
+
tertiary: string;
|
|
15
|
+
toast: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ThemeBackgroundColors extends ThemeColorsBase {
|
|
18
|
+
highlight: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ThemeBorder extends Record<string, string> {
|
|
21
|
+
color: string;
|
|
22
|
+
radius: string;
|
|
23
|
+
radiusSmall: string;
|
|
24
|
+
width: string;
|
|
25
|
+
widthApp: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ThemeBoxShadow extends Record<string, string> {
|
|
28
|
+
appBig: string;
|
|
29
|
+
appSmall: string;
|
|
30
|
+
inset: string;
|
|
31
|
+
outer: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ThemeBreakpoints extends Record<string, string> {
|
|
34
|
+
laptop: string;
|
|
35
|
+
mobile: string;
|
|
36
|
+
narrow: string;
|
|
37
|
+
tablet: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ThemeColors extends ThemeColorsBase {
|
|
40
|
+
title: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ThemeButtonColor extends Record<string, string> {
|
|
43
|
+
color: string;
|
|
44
|
+
bgColor: string;
|
|
45
|
+
borderColor: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ThemeButtonLargeColor extends ThemeButtonColor {
|
|
48
|
+
iconColor: string;
|
|
49
|
+
subtitleColor: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ThemeButtonColors extends Record<string, ThemeButtonColor | ThemeButtonLargeColor> {
|
|
52
|
+
cart: ThemeButtonColor;
|
|
53
|
+
cartHover: ThemeButtonColor;
|
|
54
|
+
header: ThemeButtonColor;
|
|
55
|
+
headerHover: ThemeButtonColor;
|
|
56
|
+
large: ThemeButtonLargeColor;
|
|
57
|
+
largeHover: ThemeButtonLargeColor;
|
|
58
|
+
light: ThemeButtonColor;
|
|
59
|
+
lightHover: ThemeButtonColor;
|
|
60
|
+
primary: ThemeButtonColor;
|
|
61
|
+
primaryHover: ThemeButtonColor;
|
|
62
|
+
secondary: ThemeButtonColor;
|
|
63
|
+
secondaryHover: ThemeButtonColor;
|
|
64
|
+
}
|
|
65
|
+
export interface ThemeButtonSize extends Record<string, string | boolean> {
|
|
66
|
+
borderRadius: string;
|
|
67
|
+
borderWidth: string;
|
|
68
|
+
borderWidthApp: string;
|
|
69
|
+
family: string;
|
|
70
|
+
fontMobile: string;
|
|
71
|
+
fontSize: string;
|
|
72
|
+
fontSmoothing: string;
|
|
73
|
+
fontStyle: string;
|
|
74
|
+
letterSpacing: string;
|
|
75
|
+
padding: string;
|
|
76
|
+
textTransform: string;
|
|
77
|
+
weight: string;
|
|
78
|
+
}
|
|
79
|
+
export interface ThemeButtonLargeSize extends ThemeButtonSize {
|
|
80
|
+
minHeight: string;
|
|
81
|
+
minHeightMobile: string;
|
|
82
|
+
showButtonApp: boolean;
|
|
83
|
+
showSubtitle: boolean;
|
|
84
|
+
showSubtitleMobile: boolean;
|
|
85
|
+
subtitleFontMobile: string;
|
|
86
|
+
subtitleFontSize: string;
|
|
87
|
+
subtitleFontSizeMobile: string;
|
|
88
|
+
subtitleFontWeight: string;
|
|
89
|
+
subtitleMarginTop: string;
|
|
90
|
+
subtitleMarginTopMobile: string;
|
|
91
|
+
titleFontMobile: string;
|
|
92
|
+
titleFontSize: string;
|
|
93
|
+
titleFontSizeMobile: string;
|
|
94
|
+
titleFontWeight: string;
|
|
95
|
+
titleMarginLeft: string;
|
|
96
|
+
titleMarginLeftMobile: string;
|
|
97
|
+
titleMarginTop: string;
|
|
98
|
+
titleMarginTopMobile: string;
|
|
99
|
+
}
|
|
100
|
+
export interface ThemeButtonSizes extends Record<string, ThemeButtonSize | ThemeButtonLargeSize> {
|
|
101
|
+
big: ThemeButtonSize;
|
|
102
|
+
default: ThemeButtonSize;
|
|
103
|
+
header: ThemeButtonSize;
|
|
104
|
+
large: ThemeButtonLargeSize;
|
|
105
|
+
small: ThemeButtonSize;
|
|
106
|
+
}
|
|
107
|
+
export interface ThemeButtons extends Record<string, ThemeButtonColors | ThemeButtonSizes> {
|
|
108
|
+
colors: ThemeButtonColors;
|
|
109
|
+
sizes: ThemeButtonSizes;
|
|
110
|
+
}
|
|
111
|
+
export interface ThemeCard extends Record<string, string | boolean | number> {
|
|
112
|
+
bgColor: string;
|
|
113
|
+
borderColor: string;
|
|
114
|
+
borderRadius: string;
|
|
115
|
+
borderWidth: string;
|
|
116
|
+
borderWidthApp: string;
|
|
117
|
+
boxShadow: string;
|
|
118
|
+
displayAsCard: boolean;
|
|
119
|
+
overrideFontColors: boolean;
|
|
120
|
+
padding: string;
|
|
121
|
+
paddingApp: string;
|
|
122
|
+
textColor: string;
|
|
123
|
+
textSize: string;
|
|
124
|
+
textSizeMobile: string;
|
|
125
|
+
titleColor: string;
|
|
126
|
+
titleSize: string;
|
|
127
|
+
titleSizeMobile: string;
|
|
128
|
+
}
|
|
129
|
+
export interface ThemeCardItem extends ThemeCard {
|
|
130
|
+
caloriesColor: string;
|
|
131
|
+
caloriesSize: string;
|
|
132
|
+
caloriesSizeMobile: string;
|
|
133
|
+
imageAsImg: boolean;
|
|
134
|
+
imageAspectRatio: number;
|
|
135
|
+
imageBgSize: string;
|
|
136
|
+
priceColor: string;
|
|
137
|
+
priceSize: string;
|
|
138
|
+
priceSizeMobile: string;
|
|
139
|
+
}
|
|
140
|
+
export interface ThemeCards extends Record<string, ThemeCard | ThemeCardItem> {
|
|
141
|
+
default: ThemeCard;
|
|
142
|
+
form: ThemeCard;
|
|
143
|
+
menuItem: ThemeCardItem;
|
|
144
|
+
modifier: ThemeCardItem;
|
|
145
|
+
}
|
|
146
|
+
export declare type ThemeTextAlignment = 'left' | 'right' | 'center' | 'justify';
|
|
147
|
+
export declare type ThemeJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around';
|
|
148
|
+
export declare type ThemeCategoryDisplayType = 'LIST' | 'CARDS' | 'SQUARES';
|
|
149
|
+
export declare type ThemeCategoryLineType = 'none' | 'underline' | 'overline';
|
|
150
|
+
export interface ThemeCategory extends Record<string, string | number | boolean> {
|
|
151
|
+
backgroundColor: string;
|
|
152
|
+
backgroundColorHover: string;
|
|
153
|
+
borderRadius: string;
|
|
154
|
+
boxShadow: string;
|
|
155
|
+
containerMaxWidth: string;
|
|
156
|
+
displayType: ThemeCategoryDisplayType;
|
|
157
|
+
gap: string;
|
|
158
|
+
gapDouble: string;
|
|
159
|
+
gapHalf: string;
|
|
160
|
+
imageBgSize: string;
|
|
161
|
+
imageBorderRadius: string;
|
|
162
|
+
imagePadding: string;
|
|
163
|
+
imageRatio: number;
|
|
164
|
+
imageScale: number;
|
|
165
|
+
imageScaleHover: number;
|
|
166
|
+
justifyContent: ThemeJustifyContent;
|
|
167
|
+
lineHeight: string;
|
|
168
|
+
lineMargin: string;
|
|
169
|
+
lineType: ThemeCategoryLineType;
|
|
170
|
+
lineWidth: string;
|
|
171
|
+
maxWidth: string;
|
|
172
|
+
minWidth: string;
|
|
173
|
+
overlayColor: string;
|
|
174
|
+
overlayOpacity: number;
|
|
175
|
+
overlayOpacityHover: number;
|
|
176
|
+
paddingBottom: string;
|
|
177
|
+
paddingHorizontal: string;
|
|
178
|
+
paddingTop: string;
|
|
179
|
+
perRow: number;
|
|
180
|
+
showDescription: boolean;
|
|
181
|
+
subtitleColor: string;
|
|
182
|
+
subtitleColorHover: string;
|
|
183
|
+
subtitleSize: string;
|
|
184
|
+
textAlign: ThemeJustifyContent;
|
|
185
|
+
textAlignVertical: ThemeJustifyContent;
|
|
186
|
+
textAlignment: ThemeTextAlignment;
|
|
187
|
+
titleColor: string;
|
|
188
|
+
titleColorHover: string;
|
|
189
|
+
titleSize: string;
|
|
190
|
+
transition: string;
|
|
191
|
+
width: string;
|
|
192
|
+
}
|
|
193
|
+
export interface ThemeCategories extends Record<string, ThemeCategory> {
|
|
194
|
+
desktop: ThemeCategory;
|
|
195
|
+
mobile: ThemeCategory;
|
|
196
|
+
}
|
|
197
|
+
export interface ThemeCount extends Record<string, string | boolean> {
|
|
198
|
+
bgColor: string;
|
|
199
|
+
borderColor: string;
|
|
200
|
+
borderWidth: string;
|
|
201
|
+
borderWidthApp: string;
|
|
202
|
+
color: string;
|
|
203
|
+
family: string;
|
|
204
|
+
fontMobile: string;
|
|
205
|
+
fontSize: string;
|
|
206
|
+
fontSizeMobile: string;
|
|
207
|
+
fontSmoothing: string;
|
|
208
|
+
fontStyle: string;
|
|
209
|
+
hide: boolean;
|
|
210
|
+
paddingBottom: string;
|
|
211
|
+
paddingTop: string;
|
|
212
|
+
weight: string;
|
|
213
|
+
}
|
|
214
|
+
export interface ThemeCounts extends Record<string, ThemeCount> {
|
|
215
|
+
alerts: ThemeCount;
|
|
216
|
+
quantity: ThemeCount;
|
|
217
|
+
}
|
|
218
|
+
export interface ThemeFavorite extends Record<string, string> {
|
|
219
|
+
iconSize: string;
|
|
220
|
+
size: string;
|
|
221
|
+
}
|
|
222
|
+
export declare type ThemeFontSize = 'big' | 'giga' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'main' | 'mega' | 'small' | 'tera' | 'xBig' | 'xSmall' | 'xxBig' | 'xxSmall';
|
|
223
|
+
export declare type ThemeFontSizes = Record<string, string> & {
|
|
224
|
+
[keys in ThemeFontSize]: string;
|
|
225
|
+
};
|
|
226
|
+
export interface ThemeFont extends Record<string, string | ThemeFontSizes | undefined | number> {
|
|
227
|
+
color: string;
|
|
228
|
+
family: string;
|
|
229
|
+
fontSize?: string;
|
|
230
|
+
fontMobile: string;
|
|
231
|
+
fontSmoothing: string;
|
|
232
|
+
fontStyle: string;
|
|
233
|
+
letterSpacing: string;
|
|
234
|
+
lineHeight: number;
|
|
235
|
+
lineHeights?: ThemeFontSizes;
|
|
236
|
+
textTransform: string;
|
|
237
|
+
url?: string;
|
|
238
|
+
weight: string;
|
|
239
|
+
}
|
|
240
|
+
export interface ThemeFonts extends Record<string, ThemeFont | ThemeFontSizes | undefined> {
|
|
241
|
+
body: ThemeFont;
|
|
242
|
+
headings: ThemeFont;
|
|
243
|
+
headline: ThemeFont;
|
|
244
|
+
lineHeights?: ThemeFontSizes;
|
|
245
|
+
preface: ThemeFont;
|
|
246
|
+
sizes: ThemeFontSizes;
|
|
247
|
+
sizesMobile: ThemeFontSizes;
|
|
248
|
+
}
|
|
249
|
+
export interface ThemeHeader extends Record<string, string> {
|
|
250
|
+
primary: string;
|
|
251
|
+
primaryBorder: string;
|
|
252
|
+
stuck: string;
|
|
253
|
+
stuckBorder: string;
|
|
254
|
+
}
|
|
255
|
+
export interface ThemeIcons extends Record<string, number> {
|
|
256
|
+
strokeWidth: number;
|
|
257
|
+
}
|
|
258
|
+
export interface ThemeInputsLabel extends Record<string, string> {
|
|
259
|
+
fontSize: string;
|
|
260
|
+
fontSizeMobile: string;
|
|
261
|
+
left: string;
|
|
262
|
+
lineHeight: string;
|
|
263
|
+
offset: string;
|
|
264
|
+
padding: string;
|
|
265
|
+
top: string;
|
|
266
|
+
}
|
|
267
|
+
export interface ThemeInputs extends Record<string, string | boolean | ThemeInputsLabel> {
|
|
268
|
+
bgColor: string;
|
|
269
|
+
bgColorFocus: string;
|
|
270
|
+
borderColor: string;
|
|
271
|
+
borderColorFocus: string;
|
|
272
|
+
borderStyle: string;
|
|
273
|
+
borderWidth: string;
|
|
274
|
+
borderWidthApp: string;
|
|
275
|
+
bottomBorderOnly: boolean;
|
|
276
|
+
boxShadow: string;
|
|
277
|
+
color: string;
|
|
278
|
+
colorFocus: string;
|
|
279
|
+
family: string;
|
|
280
|
+
fontMobile: string;
|
|
281
|
+
fontSize: string;
|
|
282
|
+
fontSizeMobile: string;
|
|
283
|
+
fontSmoothing: string;
|
|
284
|
+
iconLeft: string;
|
|
285
|
+
iconPadding: string;
|
|
286
|
+
label: ThemeInputsLabel;
|
|
287
|
+
letterSpacing: string;
|
|
288
|
+
lineHeight: string;
|
|
289
|
+
padding: string;
|
|
290
|
+
paddingBottom: string;
|
|
291
|
+
paddingBottomActive: string;
|
|
292
|
+
paddingHorizontal: string;
|
|
293
|
+
paddingTop: string;
|
|
294
|
+
paddingTopActive: string;
|
|
295
|
+
paddingVertical: string;
|
|
296
|
+
placeholderColor: string;
|
|
297
|
+
radius: string;
|
|
298
|
+
selectPaddingBottom: string;
|
|
299
|
+
selectSize: string;
|
|
300
|
+
selectSizeMobile: string;
|
|
301
|
+
showIcon: boolean;
|
|
302
|
+
showLabel: boolean;
|
|
303
|
+
showOutline: boolean;
|
|
304
|
+
textTransform: string;
|
|
305
|
+
weight: string;
|
|
306
|
+
}
|
|
307
|
+
export interface ThemeItemStyles extends Record<string, string | number> {
|
|
308
|
+
imageAsImg: number;
|
|
309
|
+
imageAspectRatio: number;
|
|
310
|
+
imageBgSize: string;
|
|
311
|
+
imageHeight: string;
|
|
312
|
+
imageMargin: string;
|
|
313
|
+
imageMaxHeight: string;
|
|
314
|
+
imageMinHeight: string;
|
|
315
|
+
imagePadding: string;
|
|
316
|
+
imagePaddingAll: string;
|
|
317
|
+
maxWidth: string;
|
|
318
|
+
padding: string;
|
|
319
|
+
}
|
|
320
|
+
export interface ThemeItem extends Record<string, ThemeItemStyles> {
|
|
321
|
+
desktop: ThemeItemStyles;
|
|
322
|
+
mobile: ThemeItemStyles;
|
|
323
|
+
}
|
|
324
|
+
export interface ThemeItemsStyles extends Record<string, string> {
|
|
325
|
+
containerMaxWidth: string;
|
|
326
|
+
gap: string;
|
|
327
|
+
gapDouble: string;
|
|
328
|
+
gapHalf: string;
|
|
329
|
+
justifyContent: string;
|
|
330
|
+
marginBottom: string;
|
|
331
|
+
minWidth: string;
|
|
332
|
+
perRow: string;
|
|
333
|
+
width: string;
|
|
334
|
+
}
|
|
335
|
+
export interface ThemeItems extends Record<string, ThemeItemsStyles> {
|
|
336
|
+
desktop: ThemeItemsStyles;
|
|
337
|
+
mobile: ThemeItemsStyles;
|
|
338
|
+
}
|
|
339
|
+
export interface ThemeLayout extends Record<string, string> {
|
|
340
|
+
containerMaxWidth: string;
|
|
341
|
+
headerHeightApp: string;
|
|
342
|
+
headerHeightSite: string;
|
|
343
|
+
headerHeightSiteMobile: string;
|
|
344
|
+
margin: string;
|
|
345
|
+
marginMobile: string;
|
|
346
|
+
maxWidth: string;
|
|
347
|
+
navHeight: string;
|
|
348
|
+
navHeightApp: string;
|
|
349
|
+
navHeightMobile: string;
|
|
350
|
+
padding: string;
|
|
351
|
+
paddingMobile: string;
|
|
352
|
+
}
|
|
353
|
+
export interface ThemeLink extends Record<string, string> {
|
|
354
|
+
color: string;
|
|
355
|
+
hover: string;
|
|
356
|
+
}
|
|
357
|
+
export interface ThemeLinks extends Record<string, string | ThemeLink> {
|
|
358
|
+
customize: ThemeLink;
|
|
359
|
+
dark: ThemeLink;
|
|
360
|
+
light: ThemeLink;
|
|
361
|
+
primary: ThemeLink;
|
|
362
|
+
textDecoration: string;
|
|
363
|
+
transition: string;
|
|
364
|
+
}
|
|
365
|
+
export interface ThemeLogo extends Record<string, string> {
|
|
366
|
+
marginTop: string;
|
|
367
|
+
marginTopMobile: string;
|
|
368
|
+
width: string;
|
|
369
|
+
widthMobile: string;
|
|
370
|
+
}
|
|
371
|
+
export interface ThemeModifiersBox extends Record<string, string | number> {
|
|
372
|
+
border: string;
|
|
373
|
+
borderRadius: string;
|
|
374
|
+
boxShadow: string;
|
|
375
|
+
gap: string;
|
|
376
|
+
gapHalf: string;
|
|
377
|
+
layout: string;
|
|
378
|
+
margin: string;
|
|
379
|
+
minHeight: string;
|
|
380
|
+
minWidth: string;
|
|
381
|
+
padding: string;
|
|
382
|
+
perRow: number;
|
|
383
|
+
width: string;
|
|
384
|
+
}
|
|
385
|
+
export interface ThemeModifiersText extends Record<string, string> {
|
|
386
|
+
color: string;
|
|
387
|
+
fontSize: string;
|
|
388
|
+
hoverColor: string;
|
|
389
|
+
selectedColor: string;
|
|
390
|
+
}
|
|
391
|
+
export interface ThemeModifiersColors extends Record<string, string> {
|
|
392
|
+
bgColor: string;
|
|
393
|
+
borderColor: string;
|
|
394
|
+
}
|
|
395
|
+
export interface ThemeModifiersBox extends Record<string, string | number> {
|
|
396
|
+
border: string;
|
|
397
|
+
borderRadius: string;
|
|
398
|
+
boxShadow: string;
|
|
399
|
+
gap: string;
|
|
400
|
+
gapHalf: string;
|
|
401
|
+
layout: string;
|
|
402
|
+
margin: string;
|
|
403
|
+
minHeight: string;
|
|
404
|
+
minWidth: string;
|
|
405
|
+
padding: string;
|
|
406
|
+
perRow: number;
|
|
407
|
+
width: string;
|
|
408
|
+
}
|
|
409
|
+
export interface ThemeModifiersImage extends Record<string, string | boolean> {
|
|
410
|
+
asImg: boolean;
|
|
411
|
+
bgColor: string;
|
|
412
|
+
bgSize: string;
|
|
413
|
+
border: string;
|
|
414
|
+
borderColor: string;
|
|
415
|
+
borderRadius: string;
|
|
416
|
+
boxShadow: string;
|
|
417
|
+
height: string;
|
|
418
|
+
margin: string;
|
|
419
|
+
padding: string;
|
|
420
|
+
width: string;
|
|
421
|
+
}
|
|
422
|
+
export interface ThemeModifiersContent extends Record<string, string> {
|
|
423
|
+
padding: string;
|
|
424
|
+
}
|
|
425
|
+
export interface ThemeModifiers extends Record<string, ThemeModifiersText | ThemeModifiersColors | ThemeModifiersBox | ThemeModifiersImage | ThemeModifiersContent> {
|
|
426
|
+
box: ThemeModifiersBox;
|
|
427
|
+
calories: ThemeModifiersText;
|
|
428
|
+
colors: ThemeModifiersColors;
|
|
429
|
+
content: ThemeModifiersContent;
|
|
430
|
+
hoverColors: ThemeModifiersColors;
|
|
431
|
+
image: ThemeModifiersImage;
|
|
432
|
+
price: ThemeModifiersText;
|
|
433
|
+
selectedColors: ThemeModifiersColors;
|
|
434
|
+
text: ThemeModifiersText;
|
|
435
|
+
title: ThemeModifiersText;
|
|
436
|
+
}
|
|
437
|
+
export interface ThemeOverlay extends Record<string, string> {
|
|
438
|
+
alert: string;
|
|
439
|
+
dark: string;
|
|
440
|
+
light: string;
|
|
441
|
+
primary: string;
|
|
442
|
+
secondary: string;
|
|
443
|
+
tertiary: string;
|
|
444
|
+
}
|
|
445
|
+
export interface ThemeWelcomeStyles extends Record<string, string | boolean | number> {
|
|
446
|
+
buttonPaddingLeft: string;
|
|
447
|
+
buttonPaddingRight: string;
|
|
448
|
+
marginBottom: string;
|
|
449
|
+
marginTop: string;
|
|
450
|
+
showIcons: boolean;
|
|
451
|
+
subtitleLineHeight: number;
|
|
452
|
+
subtitleMarginTop: string;
|
|
453
|
+
subtitleSize: string;
|
|
454
|
+
textAlign: ThemeTextAlignment;
|
|
455
|
+
titleLineHeight: number;
|
|
456
|
+
titleMarginLeft: string;
|
|
457
|
+
titleSize: string;
|
|
458
|
+
}
|
|
459
|
+
export interface ThemeWelcome extends Record<string, ThemeWelcomeStyles> {
|
|
460
|
+
desktop: ThemeWelcomeStyles;
|
|
461
|
+
mobile: ThemeWelcomeStyles;
|
|
462
|
+
}
|
|
463
|
+
export interface Theme {
|
|
464
|
+
alert: ThemeAlert;
|
|
465
|
+
bgColors: ThemeBackgroundColors;
|
|
466
|
+
boldWeight: string;
|
|
467
|
+
border: ThemeBorder;
|
|
468
|
+
boxShadow: ThemeBoxShadow;
|
|
469
|
+
breakpoints: ThemeBreakpoints;
|
|
470
|
+
buttons: ThemeButtons;
|
|
471
|
+
cards: ThemeCards;
|
|
472
|
+
categories: ThemeCategories;
|
|
473
|
+
colors: ThemeColors;
|
|
474
|
+
counts: ThemeCounts;
|
|
475
|
+
error: ThemeAlert;
|
|
476
|
+
favorite: ThemeFavorite;
|
|
477
|
+
fonts: ThemeFonts;
|
|
478
|
+
header: ThemeHeader;
|
|
479
|
+
icons: ThemeIcons;
|
|
480
|
+
inputs: ThemeInputs;
|
|
481
|
+
item: ThemeItem;
|
|
482
|
+
items: ThemeItems;
|
|
483
|
+
layout: ThemeLayout;
|
|
484
|
+
lineHeight: string;
|
|
485
|
+
links: ThemeLinks;
|
|
486
|
+
logo: ThemeLogo;
|
|
487
|
+
logoFooter: ThemeLogo;
|
|
488
|
+
modifiers: ThemeModifiers;
|
|
489
|
+
overlay: ThemeOverlay;
|
|
490
|
+
success: ThemeAlert;
|
|
491
|
+
toast: ThemeAlert;
|
|
492
|
+
welcome: ThemeWelcome;
|
|
493
|
+
}
|
|
@@ -15,7 +15,7 @@ export declare type FullOrderType = OrderType | 'MAIN_MENU' | 'ECOMMERCE';
|
|
|
15
15
|
export declare type OrderTypeMap = {
|
|
16
16
|
[Property in OrderType]: string;
|
|
17
17
|
};
|
|
18
|
-
export declare type ServiceType = 'WALKIN' | 'PICKUP' | 'DELIVERY'
|
|
18
|
+
export declare type ServiceType = 'WALKIN' | 'PICKUP' | 'DELIVERY';
|
|
19
19
|
export declare type ServiceTypeMap = {
|
|
20
20
|
[Property in ServiceType]: string;
|
|
21
21
|
};
|
|
@@ -44,3 +44,11 @@ export interface PicklistOption {
|
|
|
44
44
|
export declare type PicklistOptions = PicklistOption[];
|
|
45
45
|
export declare type DeviceType = 'DESKTOP' | 'KIOSK' | 'MOBILE' | 'NONE' | 'TABLET';
|
|
46
46
|
export declare type PrepType = 'EAT_HERE' | 'TAKE_OUT';
|
|
47
|
+
export declare type ImageType = 'APP_IMAGE' | 'LARGE_IMAGE' | 'SMALL_IMAGE';
|
|
48
|
+
export interface Image {
|
|
49
|
+
type: ImageType;
|
|
50
|
+
url: string;
|
|
51
|
+
}
|
|
52
|
+
export declare type Images = Image[];
|
|
53
|
+
export declare type OrderNotifications = 'ALL' | 'EMAIL' | 'NEW' | 'NONE' | 'SMS';
|
|
54
|
+
export declare type Gender = 'MALE' | 'FEMALE' | 'DECLINED' | null;
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -4,6 +4,6 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./api"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./datetimes"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./global"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./inputs"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./request"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./theme"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./errors"), exports);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Checkbox {
|
|
3
|
+
description?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
id?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
on?: boolean;
|
|
9
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
showLabel?: boolean;
|
|
12
|
+
type: string;
|
|
13
|
+
}
|
|
14
|
+
export interface Input {
|
|
15
|
+
autoComplete?: string;
|
|
16
|
+
children?: JSX.Element;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
icon?: JSX.Element;
|
|
20
|
+
label?: string;
|
|
21
|
+
max?: number;
|
|
22
|
+
min?: number;
|
|
23
|
+
name: string;
|
|
24
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
25
|
+
onBlur?: (evt: any) => void;
|
|
26
|
+
pattern?: string;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
required?: boolean;
|
|
30
|
+
showLabel?: boolean;
|
|
31
|
+
style?: React.CSSProperties;
|
|
32
|
+
type: string;
|
|
33
|
+
value?: string | number;
|
|
34
|
+
}
|
|
35
|
+
export interface Select {
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
error: string;
|
|
38
|
+
label: string;
|
|
39
|
+
name: string;
|
|
40
|
+
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
41
|
+
options: {
|
|
42
|
+
name: string;
|
|
43
|
+
value: string;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
}[];
|
|
46
|
+
required?: boolean;
|
|
47
|
+
showLabel?: boolean;
|
|
48
|
+
type: string;
|
|
49
|
+
value?: string | number;
|
|
50
|
+
}
|
|
51
|
+
export interface Switch {
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
id?: string;
|
|
54
|
+
label: string;
|
|
55
|
+
name: string;
|
|
56
|
+
on?: boolean;
|
|
57
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
58
|
+
type: string;
|
|
59
|
+
}
|
|
60
|
+
export interface Textarea {
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
error?: string;
|
|
63
|
+
icon?: JSX.Element;
|
|
64
|
+
label: string;
|
|
65
|
+
name: string;
|
|
66
|
+
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
67
|
+
placeholder?: string;
|
|
68
|
+
readOnly?: boolean;
|
|
69
|
+
required?: boolean;
|
|
70
|
+
showLabel?: boolean;
|
|
71
|
+
style?: React.CSSProperties;
|
|
72
|
+
type: string;
|
|
73
|
+
value?: string;
|
|
74
|
+
}
|
|
75
|
+
export declare type FormFieldType = Checkbox | Input | Select | Switch | Textarea;
|
|
76
|
+
export declare const isCheckbox: (field: FormFieldType) => field is Checkbox;
|
|
77
|
+
export declare const isSelect: (field: FormFieldType) => field is Select;
|
|
78
|
+
export declare const isSwitch: (field: FormFieldType) => field is Switch;
|
|
79
|
+
export declare const isTextarea: (field: FormFieldType) => field is Textarea;
|
|
80
|
+
export declare const isInput: (field: FormFieldType) => field is Input;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInput = exports.isTextarea = exports.isSwitch = exports.isSelect = exports.isCheckbox = void 0;
|
|
4
|
+
const isCheckbox = (field) => {
|
|
5
|
+
return field.type === 'checkbox';
|
|
6
|
+
};
|
|
7
|
+
exports.isCheckbox = isCheckbox;
|
|
8
|
+
const isSelect = (field) => {
|
|
9
|
+
return field.type === 'select';
|
|
10
|
+
};
|
|
11
|
+
exports.isSelect = isSelect;
|
|
12
|
+
const isSwitch = (field) => {
|
|
13
|
+
return field.type === 'switch';
|
|
14
|
+
};
|
|
15
|
+
exports.isSwitch = isSwitch;
|
|
16
|
+
const isTextarea = (field) => {
|
|
17
|
+
return field.type === 'textarea';
|
|
18
|
+
};
|
|
19
|
+
exports.isTextarea = isTextarea;
|
|
20
|
+
const isInput = (field) => {
|
|
21
|
+
return !['checkbox', 'select', 'switch', 'textarea'].includes(field.type);
|
|
22
|
+
};
|
|
23
|
+
exports.isInput = isInput;
|
|
@@ -8,7 +8,7 @@ export interface RequestErrorMessage {
|
|
|
8
8
|
message: string;
|
|
9
9
|
title: string;
|
|
10
10
|
}
|
|
11
|
-
export declare type RequestErrorParams = Record<string,
|
|
11
|
+
export declare type RequestErrorParams = Record<string, string>;
|
|
12
12
|
export interface RequestErrorAPI extends RequestErrorMessage {
|
|
13
13
|
status: number;
|
|
14
14
|
params?: RequestErrorParams;
|