-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtex.product-price.d.ts
374 lines (373 loc) · 16.5 KB
/
vtex.product-price.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
import { Block } from '.'
declare global {
namespace JSX {
interface IntrinsicElements {
/**
* Renders the product list price.
* If it is equal or lower than the product selling price, this block will not be rendered.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-list-price': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* Renders the product selling price.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-selling-price': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* Renders the product spot price (in case it equals the product selling price, the block is not rendered).
* This block finds the spot price by looking for the cheapest price of all installments options.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-spot-price': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* Renders the product installments.
* If more than one option is available, the one with the biggest number of installments will be displayed by default.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-installments': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* When set to `max-quantity`, the block will render the installments plan with the biggest number of installments.
* When set to `max-quantity-without-interest`, the block will render the installments plan with the biggest number of installments and **zero interest**.
* Notice that, if this prop is set to `max-quantity-without-interest`, and no installments plan matches the 'without interest' criteria, the component will fallback the default behavior.
*
* @default "max-quantity"
*/
installmentsCriteria?: 'max-quantity' | 'max-quantity-without-interest'
/**
* Allows you to define two filtering rules that will narrow down the possible installments plans the component might render.
*
* @default undefined
*/
installemntOptionsFilter?: {
paymentSystemName?: string
installmentsQuantity?: number
}
}>
/**
* Renders all the installments of the payment system with the biggest amount of installments options by default.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-installments-list': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* This prop enables you to filter the listed installments options by a certain payment system.
* If not passed, the installments of the payment system with the biggest amount of installments options will be rendered.
*
* @default undefined
*/
paymentSystemName?: string
/**
* Which installments options you want to show the user, in terms of the number of installments.
* For example, if `[1, 3]` is passed as a value for this prop, only the installments options with `NumberOfInstallments` equal to 1 and 3 will be rendered.
* If not passed, all options will be rendered.
*
* @default undefined
*/
installmentsToShow?: number[]
}>
/**
* Renders an installments option of the `product-installments-list-item`.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-installments-list-item': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
}>
/**
* Renders the product price savings, if there is any.
* It can show the percentage of the discount or the value of the absolute saving.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-price-savings': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Set to `compact` if you want to remove the white space between the number and the percent sign.
* It uses pattern provided by the current locale as default.
*
* @default "locale"
*/
percentageStyle?: 'locale' | 'compact'
/**
* Set the minimum value for the percentage value display.
* If not informed, it always appears.
* Example: `10`, savings under or equal 10% will not show up.
*
* @default 0
*/
minimumPercentage?: number
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* Renders the product spot price savings, if there is any.
* It can show the percentage of the discount or the value of the absolute saving.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-spot-price-savings': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* Renders the product list price range.
* It follows the same logic applied to the `ListPrice`: if its value is equal to the product selling price, this block is not rendered.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-list-price-range': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* The product selling price range.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-selling-price-range': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Renders the block even when the product is unavailable.
*
* @default false
*/
alwaysShow?: boolean
}>
/**
* Renders the name of the product's seller.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-seller-name': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
}>
/**
* Renders a fallback component when the price is loading and its children blocks when the price is not loading.
* This block is extremely useful when the store works with asynchronous prices.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.product-price}
*/
'product-price-suspense': Block<{
/**
* IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor.
* Learn how to use them accessing the documentation on [Using the Markers prop to customize a block's message](https://vtex.io/docs/recipes/style/using-the-markers-prop-to-customize-a-blocks-message).
* Notice the following: a block's message can also be customized in the Store Theme source code using the `message` prop.
*
* @default []
*/
markers?: string[]
/**
* Defines the block's default text i.e. the block message.
* You can also define which text message a block will render on the UI using the admin's Site Editor.
*
* @default undefined
*/
message?: string
/**
* Name of the block that will be rendered when the price is loading.
*
* @default "rich-text#loading"
*/
Fallback?: string
}>
}
}
}