@jay-framework/wix-stores-v1 0.25.4 → 0.26.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/agent-kit/designer/wix-stores-v1-dashboard-content.md +75 -0
- package/dist/index.client-CU_1d48Q.d.ts +854 -0
- package/dist/index.client.d.ts +8 -0
- package/dist/index.d.ts +8 -845
- package/dist/index.js +14 -4
- package/package.json +31 -22
- package/plugin.yaml +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,150 +1,12 @@
|
|
|
1
|
-
import { CartState } from '@jay-framework/wix-cart';
|
|
2
1
|
export { AddToCartOptions, CartIndicatorState, CartLineItem, CartState, CartSummary, WIX_CART_CONTEXT, WIX_CART_SERVICE, WixCartContext, WixCartService, cartIndicator, cartPage, provideWixCartContext, provideWixCartService } from '@jay-framework/wix-cart';
|
|
2
|
+
import { P as ProductCardViewState, W as WixStoresV1Service, C as CollectionViewState } from './index.client-CU_1d48Q.js';
|
|
3
|
+
export { l as CollectionPageParams, f as ProductPageParams, b as WIX_STORES_V1_CONTEXT, a as WIX_STORES_V1_SERVICE_MARKER, c as WixStoresV1Context, d as WixStoresV1InitData, i as categoryList, k as categoryPage, h as collectionList, j as collectionPage, m as init, e as productPage, g as productSearch, p as provideWixStoresV1Service } from './index.client-CU_1d48Q.js';
|
|
3
4
|
import * as _jay_framework_fullstack_component from '@jay-framework/fullstack-component';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import * as _jay_framework_component from '@jay-framework/component';
|
|
10
|
-
|
|
11
|
-
interface WixStoresV1Config {
|
|
12
|
-
/**
|
|
13
|
-
* Locale product card prices are formatted with (BCP 47, e.g. "he-IL" — a Wix site's regional setting).
|
|
14
|
-
* Not set = the API's formatted price.
|
|
15
|
-
*/
|
|
16
|
-
locale: string | null;
|
|
17
|
-
/**
|
|
18
|
-
* Product slugs listed first, in this order, by the default (relevance, unfiltered) product search — e.g. a
|
|
19
|
-
* Wix collection's manual order, which no public V1 query returns. Other products follow by numericId.
|
|
20
|
-
* Empty = the API's order.
|
|
21
|
-
*/
|
|
22
|
-
productOrder: string[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface WixStoresV1Service extends WixStoresV1Config {
|
|
26
|
-
wixClient: WixClient;
|
|
27
|
-
}
|
|
28
|
-
declare const WIX_STORES_V1_SERVICE_MARKER: _jay_framework_fullstack_component.ServiceMarker<WixStoresV1Service>;
|
|
29
|
-
declare function provideWixStoresV1Service(wixClient: WixClient, config?: Partial<WixStoresV1Config>): WixStoresV1Service;
|
|
30
|
-
|
|
31
|
-
declare enum OptionRenderType$1 {
|
|
32
|
-
TEXT_CHOICES,
|
|
33
|
-
COLOR_SWATCH_CHOICES
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare enum ChoiceType$1 {
|
|
37
|
-
CHOICE_TEXT,
|
|
38
|
-
ONE_COLOR
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface ChoiceOfProductOptionsViewState {
|
|
42
|
-
choiceId: string,
|
|
43
|
-
name: string,
|
|
44
|
-
choiceType: ChoiceType$1,
|
|
45
|
-
colorCode: string,
|
|
46
|
-
inStock: boolean,
|
|
47
|
-
variantId: string,
|
|
48
|
-
isSelected: boolean
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
interface ProductOptionsViewState {
|
|
52
|
-
_id: string,
|
|
53
|
-
name: string,
|
|
54
|
-
optionRenderType: OptionRenderType$1,
|
|
55
|
-
choices: Array<ChoiceOfProductOptionsViewState>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
interface ProductOptionsRepeatedRefs {
|
|
60
|
-
choices: {
|
|
61
|
-
choiceButton: HTMLElementCollectionProxy<ChoiceOfProductOptionsViewState, HTMLButtonElement>
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
declare enum MediaType$2 {
|
|
66
|
-
IMAGE,
|
|
67
|
-
VIDEO
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
interface MainMediaOfProductCardViewState {
|
|
71
|
-
url: string,
|
|
72
|
-
altText: string,
|
|
73
|
-
mediaType: MediaType$2
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
interface ThumbnailOfProductCardViewState {
|
|
77
|
-
url: string,
|
|
78
|
-
altText: string,
|
|
79
|
-
width: number,
|
|
80
|
-
height: number
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
declare enum AvailabilityStatus {
|
|
84
|
-
IN_STOCK,
|
|
85
|
-
OUT_OF_STOCK,
|
|
86
|
-
PARTIALLY_OUT_OF_STOCK
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
declare enum PreorderStatus {
|
|
90
|
-
ENABLED,
|
|
91
|
-
DISABLED,
|
|
92
|
-
PARTIALLY_ENABLED
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
interface InventoryOfProductCardViewState {
|
|
96
|
-
availabilityStatus: AvailabilityStatus,
|
|
97
|
-
preorderStatus: PreorderStatus
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface RibbonOfProductCardViewState {
|
|
101
|
-
_id: string,
|
|
102
|
-
name: string
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
interface BrandOfProductCardViewState {
|
|
106
|
-
_id: string,
|
|
107
|
-
name: string
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
declare enum ProductType$1 {
|
|
111
|
-
PHYSICAL,
|
|
112
|
-
DIGITAL
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
declare enum QuickAddType {
|
|
116
|
-
SIMPLE,
|
|
117
|
-
SINGLE_OPTION,
|
|
118
|
-
NEEDS_CONFIGURATION
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface ProductCardViewState {
|
|
122
|
-
_id: string,
|
|
123
|
-
name: string,
|
|
124
|
-
slug: string,
|
|
125
|
-
productUrl: string,
|
|
126
|
-
mainMedia: MainMediaOfProductCardViewState,
|
|
127
|
-
thumbnail: ThumbnailOfProductCardViewState,
|
|
128
|
-
price: string,
|
|
129
|
-
strikethroughPrice: string,
|
|
130
|
-
hasDiscount: boolean,
|
|
131
|
-
inventory: InventoryOfProductCardViewState,
|
|
132
|
-
ribbon: RibbonOfProductCardViewState,
|
|
133
|
-
hasRibbon: boolean,
|
|
134
|
-
brand: BrandOfProductCardViewState,
|
|
135
|
-
productType: ProductType$1,
|
|
136
|
-
isAddingToCart: boolean,
|
|
137
|
-
quickAddType: QuickAddType,
|
|
138
|
-
quickOption: ProductOptionsViewState
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
interface ProductCardRepeatedRefs {
|
|
143
|
-
productLink: HTMLElementCollectionProxy<ProductCardViewState, HTMLAnchorElement>,
|
|
144
|
-
addToCartButton: HTMLElementCollectionProxy<ProductCardViewState, HTMLButtonElement>,
|
|
145
|
-
viewOptionsButton: HTMLElementCollectionProxy<ProductCardViewState, HTMLButtonElement>,
|
|
146
|
-
quickOption: ProductOptionsRepeatedRefs
|
|
147
|
-
}
|
|
5
|
+
import '@jay-framework/wix-cart/client';
|
|
6
|
+
import '@jay-framework/component';
|
|
7
|
+
import '@jay-framework/runtime';
|
|
8
|
+
import '@wix/sdk';
|
|
9
|
+
import '@jay-framework/reactive';
|
|
148
10
|
|
|
149
11
|
interface V1Media {
|
|
150
12
|
mainMedia?: V1MediaItem;
|
|
@@ -177,77 +39,6 @@ interface V1Collection {
|
|
|
177
39
|
numberOfProducts?: number;
|
|
178
40
|
}
|
|
179
41
|
|
|
180
|
-
/**
|
|
181
|
-
* Wix Stores Catalog V1 Product Mapping Utilities
|
|
182
|
-
*
|
|
183
|
-
* Maps Wix Stores Catalog V1 product responses to view state contracts.
|
|
184
|
-
*
|
|
185
|
-
* Key V1 vs V3 differences handled here:
|
|
186
|
-
* - V1 prices are numbers (289), V3 are strings ("120")
|
|
187
|
-
* - V1 has price.formatted.price, V3 doesn't include formatted in response
|
|
188
|
-
* - V1 uses stock.inStock/inventoryStatus, V3 uses inventory.availabilityStatus
|
|
189
|
-
* - V1 media URLs are complete, V3 uses wix:image:// URIs
|
|
190
|
-
* - V1 uses productOptions[], V3 uses options[]
|
|
191
|
-
*
|
|
192
|
-
* Reference: wix/exploration/query-products-catalog-v1/output/individual/*.json
|
|
193
|
-
*/
|
|
194
|
-
|
|
195
|
-
interface CollectionViewState {
|
|
196
|
-
_id: string;
|
|
197
|
-
name: string;
|
|
198
|
-
slug: string;
|
|
199
|
-
description: string;
|
|
200
|
-
imageUrl: string;
|
|
201
|
-
productCount: number;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Configuration passed from server to client for Wix Stores V1.
|
|
206
|
-
*/
|
|
207
|
-
interface WixStoresV1InitData {
|
|
208
|
-
/** Enable client-side cart operations */
|
|
209
|
-
enableClientCart: boolean;
|
|
210
|
-
/** Enable client-side search */
|
|
211
|
-
enableClientSearch: boolean;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Reactive cart indicator state.
|
|
215
|
-
*/
|
|
216
|
-
interface ReactiveCartIndicator {
|
|
217
|
-
itemCount: Getter<number>;
|
|
218
|
-
hasItems: Getter<boolean>;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Result of a cart operation that modifies items.
|
|
222
|
-
*/
|
|
223
|
-
interface CartOperationResult {
|
|
224
|
-
cartState: CartState;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Client-side Wix Stores V1 context interface.
|
|
228
|
-
*/
|
|
229
|
-
interface WixStoresV1Context {
|
|
230
|
-
cartIndicator: ReactiveCartIndicator;
|
|
231
|
-
refreshCartIndicator(): Promise<void>;
|
|
232
|
-
getEstimatedCart(): Promise<CartState>;
|
|
233
|
-
addToCart(productId: string, quantity?: number, variantId?: string, options?: Record<string, string>): Promise<CartOperationResult>;
|
|
234
|
-
removeLineItems(lineItemIds: string[]): Promise<CartOperationResult>;
|
|
235
|
-
updateLineItemQuantity(lineItemId: string, quantity: number): Promise<CartOperationResult>;
|
|
236
|
-
clearCart(): Promise<void>;
|
|
237
|
-
applyCoupon(couponCode: string): Promise<CartOperationResult>;
|
|
238
|
-
removeCoupon(): Promise<CartOperationResult>;
|
|
239
|
-
loadMoreCollectionProducts(collectionId: string, page: number, pageSize: number): Promise<{
|
|
240
|
-
products: ProductCardViewState[];
|
|
241
|
-
hasMore: boolean;
|
|
242
|
-
totalProducts: number;
|
|
243
|
-
}>;
|
|
244
|
-
getCollections(): Promise<CollectionViewState[]>;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Context marker for client-side Wix Stores V1 operations.
|
|
248
|
-
*/
|
|
249
|
-
declare const WIX_STORES_V1_CONTEXT: _jay_framework_runtime.ContextMarker<WixStoresV1Context>;
|
|
250
|
-
|
|
251
42
|
type ProductSortField = 'relevance' | 'price_asc' | 'price_desc' | 'name_asc' | 'name_desc' | 'newest';
|
|
252
43
|
interface ProductSearchFilters {
|
|
253
44
|
minPrice?: number;
|
|
@@ -288,632 +79,4 @@ declare const searchProducts: _jay_framework_fullstack_component.JayAction<Searc
|
|
|
288
79
|
declare const getProductBySlug: _jay_framework_fullstack_component.JayAction<GetProductBySlugInput, ProductCardViewState> & _jay_framework_fullstack_component.JayActionDefinition<GetProductBySlugInput, ProductCardViewState, [WixStoresV1Service]>;
|
|
289
80
|
declare const getCollections: _jay_framework_fullstack_component.JayAction<Record<string, never>, CollectionViewState[]> & _jay_framework_fullstack_component.JayActionDefinition<Record<string, never>, CollectionViewState[], [WixStoresV1Service]>;
|
|
290
81
|
|
|
291
|
-
|
|
292
|
-
IMAGE,
|
|
293
|
-
VIDEO
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
interface MediaViewState {
|
|
297
|
-
url: string,
|
|
298
|
-
mediaType: MediaType$1
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
interface MediaRefs {}
|
|
302
|
-
|
|
303
|
-
declare enum Selected {
|
|
304
|
-
selected,
|
|
305
|
-
notSelected
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
interface AvailableMediaOfMediaGalleryViewState {
|
|
309
|
-
mediaId: string,
|
|
310
|
-
media: MediaViewState,
|
|
311
|
-
selected: Selected
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
interface MediaGalleryViewState {
|
|
315
|
-
selectedMedia: MediaViewState,
|
|
316
|
-
availableMedia: Array<AvailableMediaOfMediaGalleryViewState>
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
interface MediaGalleryRefs {
|
|
321
|
-
selectedMedia: MediaRefs,
|
|
322
|
-
availableMedia: {
|
|
323
|
-
selected: HTMLElementCollectionProxy<AvailableMediaOfMediaGalleryViewState, HTMLImageElement | HTMLDivElement>,
|
|
324
|
-
media: MediaRefs
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
declare enum ProductType {
|
|
329
|
-
PHYSICAL,
|
|
330
|
-
DIGITAL
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
declare enum StockStatus {
|
|
334
|
-
OUT_OF_STOCK,
|
|
335
|
-
IN_STOCK
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
interface QuantityOfProductPageViewState {
|
|
339
|
-
quantity: number
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
declare enum OptionRenderType {
|
|
343
|
-
TEXT_CHOICES,
|
|
344
|
-
COLOR_SWATCH_CHOICES
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
interface ChoiceOfOptionOfProductPageViewState {
|
|
348
|
-
choiceId: string,
|
|
349
|
-
choiceType: ChoiceType,
|
|
350
|
-
name: string,
|
|
351
|
-
colorCode: string,
|
|
352
|
-
inStock: boolean,
|
|
353
|
-
isSelected: boolean
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
interface OptionOfProductPageViewState {
|
|
357
|
-
_id: string,
|
|
358
|
-
name: string,
|
|
359
|
-
optionRenderType: OptionRenderType,
|
|
360
|
-
textChoiceSelection: string,
|
|
361
|
-
choices: Array<ChoiceOfOptionOfProductPageViewState>
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
interface InfoSectionOfProductPageViewState {
|
|
365
|
-
_id: string,
|
|
366
|
-
title: string,
|
|
367
|
-
plainDescription: string
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
declare enum ModifierType {
|
|
371
|
-
TEXT_CHOICES,
|
|
372
|
-
COLOR_SWATCH_CHOICES,
|
|
373
|
-
FREE_TEXT
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
declare enum ChoiceType {
|
|
377
|
-
CHOICE_TEXT,
|
|
378
|
-
ONE_COLOR
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
declare enum ChoiceType {
|
|
382
|
-
CHOICE_TEXT,
|
|
383
|
-
ONE_COLOR
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
interface ChoiceOfModifierOfProductPageViewState {
|
|
387
|
-
choiceId: string,
|
|
388
|
-
choiceType: ChoiceType,
|
|
389
|
-
name: string,
|
|
390
|
-
colorCode: string,
|
|
391
|
-
isSelected: boolean
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
interface ModifierOfProductPageViewState {
|
|
395
|
-
_id: string,
|
|
396
|
-
name: string,
|
|
397
|
-
modifierType: ModifierType,
|
|
398
|
-
textModifierSelection: string,
|
|
399
|
-
textInputLength: number,
|
|
400
|
-
textInputRequired: boolean,
|
|
401
|
-
choices: Array<ChoiceOfModifierOfProductPageViewState>
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
interface PropOfTagOfSeoDatumOfProductPageViewState {
|
|
405
|
-
key: string,
|
|
406
|
-
value: string
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
interface MetaOfTagOfSeoDatumOfProductPageViewState {
|
|
410
|
-
key: string,
|
|
411
|
-
value: string
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
interface TagOfSeoDatumOfProductPageViewState {
|
|
415
|
-
position: string,
|
|
416
|
-
type: string,
|
|
417
|
-
props: Array<PropOfTagOfSeoDatumOfProductPageViewState>,
|
|
418
|
-
meta: Array<MetaOfTagOfSeoDatumOfProductPageViewState>,
|
|
419
|
-
children: string
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
interface KeywordOfSettingOfSeoDatumOfProductPageViewState {
|
|
423
|
-
term: string,
|
|
424
|
-
isMain: boolean,
|
|
425
|
-
origin: string
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
interface SettingOfSeoDatumOfProductPageViewState {
|
|
429
|
-
preventAutoRedirect: boolean,
|
|
430
|
-
keywords: Array<KeywordOfSettingOfSeoDatumOfProductPageViewState>
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
interface SeoDatumOfProductPageViewState {
|
|
434
|
-
tags: Array<TagOfSeoDatumOfProductPageViewState>,
|
|
435
|
-
settings: SettingOfSeoDatumOfProductPageViewState
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
interface ProductPageViewState {
|
|
439
|
-
_id: string,
|
|
440
|
-
productName: string,
|
|
441
|
-
mediaGallery: MediaGalleryViewState,
|
|
442
|
-
description: string,
|
|
443
|
-
brand: string,
|
|
444
|
-
ribbon: string,
|
|
445
|
-
productType: ProductType,
|
|
446
|
-
sku: string,
|
|
447
|
-
price: string,
|
|
448
|
-
strikethroughPrice: string,
|
|
449
|
-
pricePerUnit: string,
|
|
450
|
-
stockStatus: StockStatus,
|
|
451
|
-
quantity: QuantityOfProductPageViewState,
|
|
452
|
-
actionsEnabled: boolean,
|
|
453
|
-
options: Array<OptionOfProductPageViewState>,
|
|
454
|
-
infoSections: Array<InfoSectionOfProductPageViewState>,
|
|
455
|
-
modifiers: Array<ModifierOfProductPageViewState>,
|
|
456
|
-
seoData: SeoDatumOfProductPageViewState
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
type ProductPageSlowViewState = Pick<ProductPageViewState, '_id' | 'productName' | 'description' | 'brand' | 'ribbon' | 'productType'> & {
|
|
460
|
-
options: Array<Pick<ProductPageViewState['options'][number], '_id' | 'name' | 'optionRenderType'> & {
|
|
461
|
-
choices: Array<Pick<ProductPageViewState['options'][number]['choices'][number], 'choiceId' | 'choiceType' | 'name' | 'colorCode' | 'inStock'>>;
|
|
462
|
-
}>;
|
|
463
|
-
infoSections: Array<ProductPageViewState['infoSections'][number]>;
|
|
464
|
-
modifiers: Array<Pick<ProductPageViewState['modifiers'][number], '_id' | 'name' | 'modifierType' | 'textInputLength' | 'textInputRequired'> & {
|
|
465
|
-
choices: Array<Pick<ProductPageViewState['modifiers'][number]['choices'][number], 'choiceId' | 'choiceType' | 'name' | 'colorCode'>>;
|
|
466
|
-
}>;
|
|
467
|
-
seoData: ProductPageViewState['seoData'];
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
type ProductPageFastViewState = Pick<ProductPageViewState, 'sku' | 'price' | 'strikethroughPrice' | 'pricePerUnit' | 'stockStatus' | 'actionsEnabled'> & {
|
|
471
|
-
mediaGallery: ProductPageViewState['mediaGallery'];
|
|
472
|
-
quantity: ProductPageViewState['quantity'];
|
|
473
|
-
options: Array<Pick<ProductPageViewState['options'][number], '_id' | 'textChoiceSelection'> & {
|
|
474
|
-
choices: Array<Pick<ProductPageViewState['options'][number]['choices'][number], 'choiceId' | 'isSelected'>>;
|
|
475
|
-
}>;
|
|
476
|
-
modifiers: Array<Pick<ProductPageViewState['modifiers'][number], '_id' | 'textModifierSelection'> & {
|
|
477
|
-
choices: Array<Pick<ProductPageViewState['modifiers'][number]['choices'][number], 'choiceId' | 'isSelected'>>;
|
|
478
|
-
}>;
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
type ProductPageInteractiveViewState = Pick<ProductPageViewState, 'sku' | 'price' | 'strikethroughPrice' | 'pricePerUnit' | 'stockStatus' | 'actionsEnabled'> & {
|
|
482
|
-
mediaGallery: ProductPageViewState['mediaGallery'];
|
|
483
|
-
quantity: ProductPageViewState['quantity'];
|
|
484
|
-
options: Array<Pick<ProductPageViewState['options'][number], '_id' | 'textChoiceSelection'> & {
|
|
485
|
-
choices: Array<Pick<ProductPageViewState['options'][number]['choices'][number], 'choiceId' | 'isSelected'>>;
|
|
486
|
-
}>;
|
|
487
|
-
modifiers: Array<Pick<ProductPageViewState['modifiers'][number], '_id' | 'textModifierSelection'> & {
|
|
488
|
-
choices: Array<Pick<ProductPageViewState['modifiers'][number]['choices'][number], 'choiceId' | 'isSelected'>>;
|
|
489
|
-
}>;
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
interface ProductPageRefs {
|
|
494
|
-
addToCartButton: HTMLElementProxy<ProductPageViewState, HTMLButtonElement>,
|
|
495
|
-
buyNowButton: HTMLElementProxy<ProductPageViewState, HTMLButtonElement>,
|
|
496
|
-
mediaGallery: MediaGalleryRefs,
|
|
497
|
-
quantity: {
|
|
498
|
-
decrementButton: HTMLElementProxy<QuantityOfProductPageViewState, HTMLButtonElement>,
|
|
499
|
-
incrementButton: HTMLElementProxy<QuantityOfProductPageViewState, HTMLButtonElement>,
|
|
500
|
-
quantity: HTMLElementProxy<QuantityOfProductPageViewState, HTMLInputElement>
|
|
501
|
-
},
|
|
502
|
-
options: {
|
|
503
|
-
textChoice: HTMLElementCollectionProxy<OptionOfProductPageViewState, HTMLSelectElement>,
|
|
504
|
-
choices: {
|
|
505
|
-
choiceButton: HTMLElementCollectionProxy<ChoiceOfOptionOfProductPageViewState, HTMLButtonElement>
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
modifiers: {
|
|
509
|
-
textModifier: HTMLElementCollectionProxy<ModifierOfProductPageViewState, HTMLSelectElement>,
|
|
510
|
-
textInput: HTMLElementCollectionProxy<ModifierOfProductPageViewState, HTMLInputElement | HTMLAreaElement>,
|
|
511
|
-
choices: {
|
|
512
|
-
choiceButton: HTMLElementCollectionProxy<ChoiceOfModifierOfProductPageViewState, HTMLButtonElement>
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* URL parameters for product page routes
|
|
519
|
-
*/
|
|
520
|
-
interface ProductPageParams extends UrlParams {
|
|
521
|
-
slug: string;
|
|
522
|
-
}
|
|
523
|
-
interface InteractiveVariant {
|
|
524
|
-
_id: string;
|
|
525
|
-
sku: string;
|
|
526
|
-
price: string;
|
|
527
|
-
strikethroughPrice: string;
|
|
528
|
-
choices: Record<string, string>;
|
|
529
|
-
inventoryStatus: StockStatus;
|
|
530
|
-
}
|
|
531
|
-
interface ProductSlowCarryForward {
|
|
532
|
-
productId: string;
|
|
533
|
-
mediaGallery: MediaGalleryViewState;
|
|
534
|
-
options: ProductPageFastViewState['options'];
|
|
535
|
-
pricePerUnit: string;
|
|
536
|
-
stockStatus: StockStatus;
|
|
537
|
-
variants: InteractiveVariant[];
|
|
538
|
-
}
|
|
539
|
-
interface ProductFastCarryForward {
|
|
540
|
-
productId: string;
|
|
541
|
-
variants: InteractiveVariant[];
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* Product Page Component (V1)
|
|
545
|
-
*
|
|
546
|
-
* A complete headless product page using Wix Catalog V1 API.
|
|
547
|
-
*/
|
|
548
|
-
declare const productPage: _jay_framework_fullstack_component.JayStackComponentDefinition<ProductPageRefs, ProductPageSlowViewState, ProductPageFastViewState, ProductPageInteractiveViewState, [ProductSlowCarryForward, WixStoresV1Service], [Signals<ProductPageFastViewState>, ProductFastCarryForward, WixStoresV1Context], PageProps & ProductPageParams, ProductPageParams, _jay_framework_component.JayComponentCore<PageProps & ProductPageParams, ProductPageInteractiveViewState>>;
|
|
549
|
-
|
|
550
|
-
interface RangeOfPriceRangeOfFilterOfProductSearchViewState {
|
|
551
|
-
rangeId: string,
|
|
552
|
-
label: string,
|
|
553
|
-
minValue: number,
|
|
554
|
-
maxValue: number,
|
|
555
|
-
isSelected: boolean
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
interface PriceRangeOfFilterOfProductSearchViewState {
|
|
559
|
-
minPrice: number,
|
|
560
|
-
maxPrice: number,
|
|
561
|
-
minBound: number,
|
|
562
|
-
maxBound: number,
|
|
563
|
-
ranges: Array<RangeOfPriceRangeOfFilterOfProductSearchViewState>
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
interface CategoryOfCategoryFilterOfFilterOfProductSearchViewState {
|
|
567
|
-
categoryId: string,
|
|
568
|
-
categoryName: string,
|
|
569
|
-
categorySlug: string,
|
|
570
|
-
isSelected: boolean
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
interface CategoryFilterOfFilterOfProductSearchViewState {
|
|
574
|
-
categories: Array<CategoryOfCategoryFilterOfFilterOfProductSearchViewState>
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
interface FilterOfProductSearchViewState {
|
|
578
|
-
priceRange: PriceRangeOfFilterOfProductSearchViewState,
|
|
579
|
-
categoryFilter: CategoryFilterOfFilterOfProductSearchViewState
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
declare enum CurrentSort {
|
|
583
|
-
relevance,
|
|
584
|
-
priceAsc,
|
|
585
|
-
priceDesc,
|
|
586
|
-
newest,
|
|
587
|
-
nameAsc,
|
|
588
|
-
nameDesc
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
interface SortByOfProductSearchViewState {
|
|
592
|
-
currentSort: CurrentSort
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
interface SuggestionOfProductSearchViewState {
|
|
596
|
-
suggestionId: string,
|
|
597
|
-
suggestionText: string
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
interface ProductSearchViewState {
|
|
601
|
-
searchExpression: string,
|
|
602
|
-
searchFields: string,
|
|
603
|
-
fuzzySearch: boolean,
|
|
604
|
-
isSearching: boolean,
|
|
605
|
-
hasSearched: boolean,
|
|
606
|
-
searchResults: Array<ProductCardViewState>,
|
|
607
|
-
resultCount: number,
|
|
608
|
-
hasResults: boolean,
|
|
609
|
-
emptyStateMessage: string,
|
|
610
|
-
filters: FilterOfProductSearchViewState,
|
|
611
|
-
sortBy: SortByOfProductSearchViewState,
|
|
612
|
-
hasMore: boolean,
|
|
613
|
-
loadedCount: number,
|
|
614
|
-
totalCount: number,
|
|
615
|
-
hasSuggestions: boolean,
|
|
616
|
-
suggestions: Array<SuggestionOfProductSearchViewState>
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
type ProductSearchSlowViewState = Pick<ProductSearchViewState, 'searchFields' | 'fuzzySearch' | 'emptyStateMessage'> & {
|
|
620
|
-
filters: {
|
|
621
|
-
categoryFilter: {
|
|
622
|
-
categories: Array<Pick<ProductSearchViewState['filters']['categoryFilter']['categories'][number], 'categoryId' | 'categoryName' | 'categorySlug'>>;
|
|
623
|
-
};
|
|
624
|
-
};
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
type ProductSearchFastViewState = Pick<ProductSearchViewState, 'searchExpression' | 'isSearching' | 'hasSearched' | 'resultCount' | 'hasResults' | 'hasMore' | 'loadedCount' | 'totalCount' | 'hasSuggestions'> & {
|
|
628
|
-
searchResults: Array<ProductSearchViewState['searchResults'][number]>;
|
|
629
|
-
filters: {
|
|
630
|
-
priceRange: ProductSearchViewState['filters']['priceRange'];
|
|
631
|
-
categoryFilter: {
|
|
632
|
-
categories: Array<Pick<ProductSearchViewState['filters']['categoryFilter']['categories'][number], 'categoryId' | 'isSelected'>>;
|
|
633
|
-
};
|
|
634
|
-
};
|
|
635
|
-
sortBy: ProductSearchViewState['sortBy'];
|
|
636
|
-
suggestions: Array<ProductSearchViewState['suggestions'][number]>;
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
type ProductSearchInteractiveViewState = Pick<ProductSearchViewState, 'searchExpression' | 'isSearching' | 'hasSearched' | 'resultCount' | 'hasResults' | 'hasMore' | 'loadedCount' | 'totalCount' | 'hasSuggestions'> & {
|
|
640
|
-
searchResults: Array<ProductSearchViewState['searchResults'][number]>;
|
|
641
|
-
filters: {
|
|
642
|
-
priceRange: ProductSearchViewState['filters']['priceRange'];
|
|
643
|
-
categoryFilter: {
|
|
644
|
-
categories: Array<Pick<ProductSearchViewState['filters']['categoryFilter']['categories'][number], 'categoryId' | 'isSelected'>>;
|
|
645
|
-
};
|
|
646
|
-
};
|
|
647
|
-
sortBy: ProductSearchViewState['sortBy'];
|
|
648
|
-
suggestions: Array<ProductSearchViewState['suggestions'][number]>;
|
|
649
|
-
};
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
interface ProductSearchRefs {
|
|
653
|
-
searchExpression: HTMLElementProxy<ProductSearchViewState, HTMLInputElement>,
|
|
654
|
-
searchButton: HTMLElementProxy<ProductSearchViewState, HTMLButtonElement>,
|
|
655
|
-
clearSearchButton: HTMLElementProxy<ProductSearchViewState, HTMLButtonElement>,
|
|
656
|
-
loadMoreButton: HTMLElementProxy<ProductSearchViewState, HTMLButtonElement>,
|
|
657
|
-
searchResults: ProductCardRepeatedRefs,
|
|
658
|
-
filters: {
|
|
659
|
-
clearFilters: HTMLElementProxy<FilterOfProductSearchViewState, HTMLButtonElement>,
|
|
660
|
-
priceRange: {
|
|
661
|
-
minPrice: HTMLElementProxy<PriceRangeOfFilterOfProductSearchViewState, HTMLInputElement>,
|
|
662
|
-
maxPrice: HTMLElementProxy<PriceRangeOfFilterOfProductSearchViewState, HTMLInputElement>,
|
|
663
|
-
ranges: {
|
|
664
|
-
isSelected: HTMLElementCollectionProxy<RangeOfPriceRangeOfFilterOfProductSearchViewState, HTMLInputElement>
|
|
665
|
-
}
|
|
666
|
-
},
|
|
667
|
-
categoryFilter: {
|
|
668
|
-
categories: {
|
|
669
|
-
isSelected: HTMLElementCollectionProxy<CategoryOfCategoryFilterOfFilterOfProductSearchViewState, HTMLInputElement>
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
},
|
|
673
|
-
sortBy: {
|
|
674
|
-
sortDropdown: HTMLElementProxy<SortByOfProductSearchViewState, HTMLSelectElement>
|
|
675
|
-
},
|
|
676
|
-
suggestions: {
|
|
677
|
-
suggestionButton: HTMLElementCollectionProxy<SuggestionOfProductSearchViewState, HTMLButtonElement>
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* Collection info for filtering (V1 uses collections, not categories)
|
|
683
|
-
*/
|
|
684
|
-
type CollectionInfos = ProductSearchSlowViewState['filters']['categoryFilter']['categories'];
|
|
685
|
-
interface SearchSlowCarryForward {
|
|
686
|
-
searchFields: string;
|
|
687
|
-
fuzzySearch: boolean;
|
|
688
|
-
collections: CollectionInfos;
|
|
689
|
-
}
|
|
690
|
-
interface SearchFastCarryForward {
|
|
691
|
-
searchFields: string;
|
|
692
|
-
fuzzySearch: boolean;
|
|
693
|
-
collections: CollectionInfos;
|
|
694
|
-
}
|
|
695
|
-
/**
|
|
696
|
-
* Product Search Component (V1)
|
|
697
|
-
*
|
|
698
|
-
* A complete headless product search using Wix Catalog V1 API.
|
|
699
|
-
* Uses collections for filtering and page-based pagination.
|
|
700
|
-
*/
|
|
701
|
-
declare const productSearch: _jay_framework_fullstack_component.JayStackComponentDefinition<ProductSearchRefs, ProductSearchSlowViewState, ProductSearchFastViewState, ProductSearchInteractiveViewState, [SearchSlowCarryForward, WixStoresV1Service], [Signals<ProductSearchFastViewState>, SearchFastCarryForward, WixStoresV1Context], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, ProductSearchInteractiveViewState>>;
|
|
702
|
-
|
|
703
|
-
interface CategoryOfCategoryListViewState {
|
|
704
|
-
_id: string,
|
|
705
|
-
name: string,
|
|
706
|
-
slug: string,
|
|
707
|
-
description: string,
|
|
708
|
-
productCount: number,
|
|
709
|
-
imageUrl: string,
|
|
710
|
-
hasImage: boolean
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
interface CategoryListViewState {
|
|
714
|
-
categories: Array<CategoryOfCategoryListViewState>,
|
|
715
|
-
hasCategories: boolean
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
type CategoryListSlowViewState = Pick<CategoryListViewState, 'hasCategories'> & {
|
|
719
|
-
categories: Array<CategoryListViewState['categories'][number]>;
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
type CategoryListFastViewState = {};
|
|
723
|
-
|
|
724
|
-
type CategoryListInteractiveViewState = {};
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
interface CategoryListRefs {
|
|
728
|
-
categories: {
|
|
729
|
-
categoryLink: HTMLElementCollectionProxy<CategoryOfCategoryListViewState, HTMLAnchorElement>
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* Collection List Component (V1)
|
|
735
|
-
*
|
|
736
|
-
* A headless component that displays a grid of store collections.
|
|
737
|
-
* Uses the same contract as category-list for template compatibility.
|
|
738
|
-
*
|
|
739
|
-
* Usage:
|
|
740
|
-
* ```html
|
|
741
|
-
* <script type="application/jay-headless"
|
|
742
|
-
* plugin="@jay-framework/wix-stores-v1"
|
|
743
|
-
* contract="category-list"
|
|
744
|
-
* key="collectionList"
|
|
745
|
-
* ></script>
|
|
746
|
-
*
|
|
747
|
-
* <div class="collections-grid">
|
|
748
|
-
* <article forEach="collectionList.categories" trackBy="_id">
|
|
749
|
-
* <a href="/collections/{slug}" ref="collectionList.categories.categoryLink">
|
|
750
|
-
* <img src="{imageUrl}" alt="{name}" />
|
|
751
|
-
* <h2>{name}</h2>
|
|
752
|
-
* <span>{productCount} products</span>
|
|
753
|
-
* </a>
|
|
754
|
-
* </article>
|
|
755
|
-
* </div>
|
|
756
|
-
* ```
|
|
757
|
-
*/
|
|
758
|
-
declare const collectionList: _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>> & {
|
|
759
|
-
withFastRender<NewCarryForward extends object>(fastRender: _jay_framework_fullstack_component.RenderFast<[Record<string, never>, WixStoresV1Service], PageProps, CategoryListFastViewState, NewCarryForward>): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>> & {
|
|
760
|
-
withClientDefaults(fn: (props: PageProps) => {
|
|
761
|
-
viewState: CategoryListFastViewState;
|
|
762
|
-
carryForward?: any;
|
|
763
|
-
}): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>> & /*elided*/ any;
|
|
764
|
-
withInteractive(comp: _jay_framework_component.ComponentConstructor<PageProps, CategoryListRefs, CategoryListInteractiveViewState, [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>;
|
|
765
|
-
};
|
|
766
|
-
withInteractive(comp: _jay_framework_component.ComponentConstructor<PageProps, CategoryListRefs, CategoryListInteractiveViewState, [], _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>;
|
|
767
|
-
};
|
|
768
|
-
declare const categoryList: _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>> & {
|
|
769
|
-
withFastRender<NewCarryForward extends object>(fastRender: _jay_framework_fullstack_component.RenderFast<[Record<string, never>, WixStoresV1Service], PageProps, CategoryListFastViewState, NewCarryForward>): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>> & {
|
|
770
|
-
withClientDefaults(fn: (props: PageProps) => {
|
|
771
|
-
viewState: CategoryListFastViewState;
|
|
772
|
-
carryForward?: any;
|
|
773
|
-
}): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>> & /*elided*/ any;
|
|
774
|
-
withInteractive(comp: _jay_framework_component.ComponentConstructor<PageProps, CategoryListRefs, CategoryListInteractiveViewState, [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [_jay_framework_fullstack_component.Signals<CategoryListFastViewState>, NewCarryForward], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>;
|
|
775
|
-
};
|
|
776
|
-
withInteractive(comp: _jay_framework_component.ComponentConstructor<PageProps, CategoryListRefs, CategoryListInteractiveViewState, [], _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>): _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState, [Record<string, never>, WixStoresV1Service], [], PageProps, {}, _jay_framework_component.JayComponentCore<PageProps, CategoryListInteractiveViewState>>;
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
interface MainMediaOfMediaOfCategoryPageViewState {
|
|
780
|
-
_id: string,
|
|
781
|
-
url: string,
|
|
782
|
-
altText: string,
|
|
783
|
-
mediaType: MediaType
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
declare enum MediaType {
|
|
787
|
-
IMAGE,
|
|
788
|
-
VIDEO,
|
|
789
|
-
AUDIO,
|
|
790
|
-
DOCUMENT,
|
|
791
|
-
ZIP
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
declare enum MediaType {
|
|
795
|
-
IMAGE,
|
|
796
|
-
VIDEO,
|
|
797
|
-
AUDIO,
|
|
798
|
-
DOCUMENT,
|
|
799
|
-
ZIP
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
interface ThumbnailOfItemOfMediaOfCategoryPageViewState {
|
|
803
|
-
url: string,
|
|
804
|
-
width: number,
|
|
805
|
-
height: number,
|
|
806
|
-
format: string
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
interface ItemOfMediaOfCategoryPageViewState {
|
|
810
|
-
_id: string,
|
|
811
|
-
url: string,
|
|
812
|
-
altText: string,
|
|
813
|
-
title: string,
|
|
814
|
-
mediaType: MediaType,
|
|
815
|
-
thumbnail: ThumbnailOfItemOfMediaOfCategoryPageViewState
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
interface MediaOfCategoryPageViewState {
|
|
819
|
-
mainMedia: MainMediaOfMediaOfCategoryPageViewState,
|
|
820
|
-
items: Array<ItemOfMediaOfCategoryPageViewState>
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
interface BreadcrumbOfCategoryPageViewState {
|
|
824
|
-
categoryId: string,
|
|
825
|
-
categoryName: string,
|
|
826
|
-
categorySlug: string
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
interface CategoryPageViewState {
|
|
830
|
-
_id: string,
|
|
831
|
-
name: string,
|
|
832
|
-
description: string,
|
|
833
|
-
slug: string,
|
|
834
|
-
visible: boolean,
|
|
835
|
-
numberOfProducts: number,
|
|
836
|
-
hasImage: boolean,
|
|
837
|
-
media: MediaOfCategoryPageViewState,
|
|
838
|
-
breadcrumbs: Array<BreadcrumbOfCategoryPageViewState>,
|
|
839
|
-
products: Array<ProductCardViewState>,
|
|
840
|
-
loadedProducts: Array<ProductCardViewState>,
|
|
841
|
-
hasMore: boolean,
|
|
842
|
-
loadedCount: number,
|
|
843
|
-
isLoading: boolean,
|
|
844
|
-
hasProducts: boolean
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
type CategoryPageSlowViewState = Pick<CategoryPageViewState, '_id' | 'name' | 'description' | 'slug' | 'visible' | 'numberOfProducts' | 'hasImage'> & {
|
|
848
|
-
media: CategoryPageViewState['media'];
|
|
849
|
-
breadcrumbs: Array<CategoryPageViewState['breadcrumbs'][number]>;
|
|
850
|
-
products: Array<Pick<CategoryPageViewState['products'][number], '_id' | 'name' | 'slug' | 'productUrl' | 'hasDiscount' | 'hasRibbon' | 'productType' | 'quickAddType'> & {
|
|
851
|
-
mainMedia: CategoryPageViewState['products'][number]['mainMedia'];
|
|
852
|
-
thumbnail: CategoryPageViewState['products'][number]['thumbnail'];
|
|
853
|
-
inventory: CategoryPageViewState['products'][number]['inventory'];
|
|
854
|
-
ribbon: CategoryPageViewState['products'][number]['ribbon'];
|
|
855
|
-
brand: CategoryPageViewState['products'][number]['brand'];
|
|
856
|
-
quickOption: Pick<CategoryPageViewState['products'][number]['quickOption'], '_id' | 'name' | 'optionRenderType'> & {
|
|
857
|
-
choices: Array<Pick<CategoryPageViewState['products'][number]['quickOption']['choices'][number], 'choiceId' | 'name' | 'choiceType' | 'colorCode' | 'variantId'>>;
|
|
858
|
-
};
|
|
859
|
-
}>;
|
|
860
|
-
};
|
|
861
|
-
|
|
862
|
-
type CategoryPageFastViewState = Pick<CategoryPageViewState, 'hasMore' | 'loadedCount' | 'isLoading' | 'hasProducts'> & {
|
|
863
|
-
products: Array<Pick<CategoryPageViewState['products'][number], '_id' | 'price' | 'strikethroughPrice' | 'isAddingToCart'> & {
|
|
864
|
-
quickOption: {
|
|
865
|
-
choices: Array<Pick<CategoryPageViewState['products'][number]['quickOption']['choices'][number], 'choiceId' | 'inStock' | 'isSelected'>>;
|
|
866
|
-
};
|
|
867
|
-
}>;
|
|
868
|
-
loadedProducts: Array<CategoryPageViewState['loadedProducts'][number]>;
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
type CategoryPageInteractiveViewState = Pick<CategoryPageViewState, 'hasMore' | 'loadedCount' | 'isLoading' | 'hasProducts'> & {
|
|
872
|
-
products: Array<Pick<CategoryPageViewState['products'][number], '_id' | 'price' | 'strikethroughPrice' | 'isAddingToCart'> & {
|
|
873
|
-
quickOption: {
|
|
874
|
-
choices: Array<Pick<CategoryPageViewState['products'][number]['quickOption']['choices'][number], 'choiceId' | 'inStock' | 'isSelected'>>;
|
|
875
|
-
};
|
|
876
|
-
}>;
|
|
877
|
-
loadedProducts: Array<CategoryPageViewState['loadedProducts'][number]>;
|
|
878
|
-
};
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
interface CategoryPageRefs {
|
|
882
|
-
loadMoreButton: HTMLElementProxy<CategoryPageViewState, HTMLButtonElement>,
|
|
883
|
-
breadcrumbs: {
|
|
884
|
-
categoryLink: HTMLElementCollectionProxy<BreadcrumbOfCategoryPageViewState, HTMLAnchorElement>
|
|
885
|
-
},
|
|
886
|
-
products: ProductCardRepeatedRefs,
|
|
887
|
-
loadedProducts: ProductCardRepeatedRefs
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* URL parameters for collection page routes
|
|
892
|
-
*/
|
|
893
|
-
interface CollectionPageParams extends UrlParams {
|
|
894
|
-
slug: string;
|
|
895
|
-
}
|
|
896
|
-
interface CollectionSlowCarryForward {
|
|
897
|
-
collectionId: string;
|
|
898
|
-
collectionSlug: string;
|
|
899
|
-
totalProducts: number;
|
|
900
|
-
products: ProductCardViewState[];
|
|
901
|
-
currentOffset: number;
|
|
902
|
-
}
|
|
903
|
-
interface CollectionFastCarryForward {
|
|
904
|
-
collectionId: string;
|
|
905
|
-
totalProducts: number;
|
|
906
|
-
currentOffset: number;
|
|
907
|
-
}
|
|
908
|
-
/**
|
|
909
|
-
* Collection Page Component (V1)
|
|
910
|
-
*
|
|
911
|
-
* A headless collection page using Wix Catalog V1 API.
|
|
912
|
-
* Uses the same contract as category-page for template compatibility.
|
|
913
|
-
*/
|
|
914
|
-
declare const collectionPage: _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryPageRefs, CategoryPageSlowViewState, CategoryPageFastViewState, CategoryPageInteractiveViewState, [CollectionSlowCarryForward, WixStoresV1Service], [Signals<CategoryPageFastViewState>, CollectionFastCarryForward, WixStoresV1Context], PageProps & CollectionPageParams, CollectionPageParams, _jay_framework_component.JayComponentCore<PageProps & CollectionPageParams, CategoryPageInteractiveViewState>>;
|
|
915
|
-
declare const categoryPage: _jay_framework_fullstack_component.JayStackComponentDefinition<CategoryPageRefs, CategoryPageSlowViewState, CategoryPageFastViewState, CategoryPageInteractiveViewState, [CollectionSlowCarryForward, WixStoresV1Service], [Signals<CategoryPageFastViewState>, CollectionFastCarryForward, WixStoresV1Context], PageProps & CollectionPageParams, CollectionPageParams, _jay_framework_component.JayComponentCore<PageProps & CollectionPageParams, CategoryPageInteractiveViewState>>;
|
|
916
|
-
|
|
917
|
-
declare const init: _jay_framework_fullstack_component.JayInit<WixStoresV1InitData>;
|
|
918
|
-
|
|
919
|
-
export { type CollectionPageParams, type CollectionViewState, type GetProductBySlugInput, type PriceAggregationData, type PriceRangeBucket, type ProductPageParams, type ProductSearchFilters, type ProductSortField, type SearchProductsInput, type SearchProductsOutput, type V1Collection, WIX_STORES_V1_CONTEXT, WIX_STORES_V1_SERVICE_MARKER, type WixStoresV1Context, type WixStoresV1InitData, type WixStoresV1Service, categoryList, categoryPage, collectionList, collectionPage, getCollections, getProductBySlug, init, productPage, productSearch, provideWixStoresV1Service, searchProducts };
|
|
82
|
+
export { CollectionViewState, type GetProductBySlugInput, type PriceAggregationData, type PriceRangeBucket, type ProductSearchFilters, type ProductSortField, type SearchProductsInput, type SearchProductsOutput, type V1Collection, WixStoresV1Service, getCollections, getProductBySlug, searchProducts };
|