@jay-framework/wix-stores-v1 0.22.2 → 0.24.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/package.json +14 -14
- package/dist/actions/get-collections.jay-action +0 -12
- package/dist/actions/get-product-by-slug.jay-action +0 -10
- package/dist/actions/search-products.jay-action +0 -32
- package/dist/contracts/category-list.jay-contract +0 -56
- package/dist/contracts/category-list.jay-contract.d.ts +0 -41
- package/dist/contracts/category-page.jay-contract +0 -204
- package/dist/contracts/category-page.jay-contract.d.ts +0 -131
- package/dist/contracts/media-gallery.jay-contract +0 -22
- package/dist/contracts/media-gallery.jay-contract.d.ts +0 -53
- package/dist/contracts/media.jay-contract +0 -4
- package/dist/contracts/media.jay-contract.d.ts +0 -24
- package/dist/contracts/product-card.jay-contract +0 -179
- package/dist/contracts/product-card.jay-contract.d.ts +0 -119
- package/dist/contracts/product-options.jay-contract +0 -66
- package/dist/contracts/product-options.jay-contract.d.ts +0 -57
- package/dist/contracts/product-page.jay-contract +0 -153
- package/dist/contracts/product-page.jay-contract.d.ts +0 -224
- package/dist/contracts/product-search.jay-contract +0 -240
- package/dist/contracts/product-search.jay-contract.d.ts +0 -165
- package/dist/index.client.js +0 -860
- package/dist/index.d.ts +0 -920
- package/dist/index.js +0 -976
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/wix-stores-v1",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Wix Stores Catalog V1 API client for Jay Framework",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
"test": ":"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@jay-framework/component": "^0.
|
|
39
|
-
"@jay-framework/fullstack-component": "^0.
|
|
40
|
-
"@jay-framework/reactive": "^0.
|
|
41
|
-
"@jay-framework/runtime": "^0.
|
|
42
|
-
"@jay-framework/secure": "^0.
|
|
43
|
-
"@jay-framework/stack-client-runtime": "^0.
|
|
44
|
-
"@jay-framework/stack-server-runtime": "^0.
|
|
45
|
-
"@jay-framework/wix-cart": "^0.
|
|
46
|
-
"@jay-framework/wix-server-client": "^0.
|
|
47
|
-
"@jay-framework/wix-utils": "^0.
|
|
38
|
+
"@jay-framework/component": "^0.24.0",
|
|
39
|
+
"@jay-framework/fullstack-component": "^0.24.0",
|
|
40
|
+
"@jay-framework/reactive": "^0.24.0",
|
|
41
|
+
"@jay-framework/runtime": "^0.24.0",
|
|
42
|
+
"@jay-framework/secure": "^0.24.0",
|
|
43
|
+
"@jay-framework/stack-client-runtime": "^0.24.0",
|
|
44
|
+
"@jay-framework/stack-server-runtime": "^0.24.0",
|
|
45
|
+
"@jay-framework/wix-cart": "^0.24.0",
|
|
46
|
+
"@jay-framework/wix-server-client": "^0.24.0",
|
|
47
|
+
"@jay-framework/wix-utils": "^0.24.0",
|
|
48
48
|
"@wix/sdk": "^1.21.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@babel/core": "^7.23.7",
|
|
52
52
|
"@babel/preset-env": "^7.23.8",
|
|
53
53
|
"@babel/preset-typescript": "^7.23.3",
|
|
54
|
-
"@jay-framework/compiler-jay-stack": "^0.
|
|
55
|
-
"@jay-framework/jay-cli": "^0.
|
|
56
|
-
"@jay-framework/vite-plugin": "^0.
|
|
54
|
+
"@jay-framework/compiler-jay-stack": "^0.24.0",
|
|
55
|
+
"@jay-framework/jay-cli": "^0.24.0",
|
|
56
|
+
"@jay-framework/vite-plugin": "^0.24.0",
|
|
57
57
|
"nodemon": "^3.0.3",
|
|
58
58
|
"rimraf": "^5.0.5",
|
|
59
59
|
"tslib": "^2.6.2",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
name: getCollections
|
|
2
|
-
description: Get available store collections for filtering products. V1 uses collections instead of categories. Returns collection details including name, slug, description, image, and product count.
|
|
3
|
-
|
|
4
|
-
inputSchema: {}
|
|
5
|
-
|
|
6
|
-
outputSchema:
|
|
7
|
-
- _id: string
|
|
8
|
-
name: string
|
|
9
|
-
slug: string
|
|
10
|
-
description: string
|
|
11
|
-
imageUrl: string
|
|
12
|
-
productCount: number
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
name: getProductBySlug
|
|
2
|
-
description: Get a single product by its URL slug using Catalog V1. Returns full ProductCardViewState or null if not found.
|
|
3
|
-
|
|
4
|
-
import:
|
|
5
|
-
productCard: product-card.jay-contract
|
|
6
|
-
|
|
7
|
-
inputSchema:
|
|
8
|
-
slug: string
|
|
9
|
-
|
|
10
|
-
outputSchema: productCard?
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: searchProducts
|
|
2
|
-
description: Search products using Wix Stores Catalog V1 with page-based pagination. Supports text search, price and collection filtering, sorting, and returns price aggregation data.
|
|
3
|
-
|
|
4
|
-
import:
|
|
5
|
-
productCard: product-card.jay-contract
|
|
6
|
-
|
|
7
|
-
inputSchema:
|
|
8
|
-
query: string
|
|
9
|
-
filters?:
|
|
10
|
-
minPrice?: number
|
|
11
|
-
maxPrice?: number
|
|
12
|
-
collectionIds?: string[]
|
|
13
|
-
sortBy?: enum(relevance | price_asc | price_desc | name_asc | name_desc | newest)
|
|
14
|
-
page?: number
|
|
15
|
-
pageSize?: number
|
|
16
|
-
|
|
17
|
-
outputSchema:
|
|
18
|
-
products:
|
|
19
|
-
- productCard
|
|
20
|
-
totalCount: number
|
|
21
|
-
currentPage: number
|
|
22
|
-
totalPages: number
|
|
23
|
-
hasMore: boolean
|
|
24
|
-
priceAggregation:
|
|
25
|
-
minBound: number
|
|
26
|
-
maxBound: number
|
|
27
|
-
ranges:
|
|
28
|
-
- rangeId: string
|
|
29
|
-
label: string
|
|
30
|
-
minValue?: number
|
|
31
|
-
maxValue?: number
|
|
32
|
-
isSelected: boolean
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
name: category-list
|
|
2
|
-
tags:
|
|
3
|
-
# List of visible categories
|
|
4
|
-
- tag: categories
|
|
5
|
-
type: sub-contract
|
|
6
|
-
repeated: true
|
|
7
|
-
trackBy: _id
|
|
8
|
-
description: List of visible store categories
|
|
9
|
-
tags:
|
|
10
|
-
- tag: _id
|
|
11
|
-
type: data
|
|
12
|
-
dataType: string
|
|
13
|
-
description: Category GUID
|
|
14
|
-
|
|
15
|
-
- tag: name
|
|
16
|
-
type: data
|
|
17
|
-
dataType: string
|
|
18
|
-
required: true
|
|
19
|
-
description: Category name
|
|
20
|
-
|
|
21
|
-
- tag: slug
|
|
22
|
-
type: data
|
|
23
|
-
dataType: string
|
|
24
|
-
description: Category slug for URL
|
|
25
|
-
|
|
26
|
-
- tag: description
|
|
27
|
-
type: data
|
|
28
|
-
dataType: string
|
|
29
|
-
description: Category description
|
|
30
|
-
|
|
31
|
-
- tag: productCount
|
|
32
|
-
type: data
|
|
33
|
-
dataType: number
|
|
34
|
-
description: Number of products in category
|
|
35
|
-
|
|
36
|
-
- tag: imageUrl
|
|
37
|
-
type: data
|
|
38
|
-
dataType: string
|
|
39
|
-
description: Category image URL
|
|
40
|
-
meta: {mediaType: wix-image}
|
|
41
|
-
|
|
42
|
-
- tag: hasImage
|
|
43
|
-
type: variant
|
|
44
|
-
dataType: boolean
|
|
45
|
-
description: Whether the category has an image
|
|
46
|
-
|
|
47
|
-
- tag: categoryLink
|
|
48
|
-
type: interactive
|
|
49
|
-
elementType: HTMLAnchorElement
|
|
50
|
-
description: Link to category page
|
|
51
|
-
|
|
52
|
-
# Empty state
|
|
53
|
-
- tag: hasCategories
|
|
54
|
-
type: variant
|
|
55
|
-
dataType: boolean
|
|
56
|
-
description: Whether there are any categories
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import {HTMLElementCollectionProxy, JayContract} from "@jay-framework/runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface CategoryOfCategoryListViewState {
|
|
5
|
-
_id: string,
|
|
6
|
-
name: string,
|
|
7
|
-
slug: string,
|
|
8
|
-
description: string,
|
|
9
|
-
productCount: number,
|
|
10
|
-
imageUrl: string,
|
|
11
|
-
hasImage: boolean
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface CategoryListViewState {
|
|
15
|
-
categories: Array<CategoryOfCategoryListViewState>,
|
|
16
|
-
hasCategories: boolean
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type CategoryListSlowViewState = Pick<CategoryListViewState, 'hasCategories'> & {
|
|
20
|
-
categories: Array<CategoryListViewState['categories'][number]>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type CategoryListFastViewState = {};
|
|
24
|
-
|
|
25
|
-
export type CategoryListInteractiveViewState = {};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export interface CategoryListRefs {
|
|
29
|
-
categories: {
|
|
30
|
-
categoryLink: HTMLElementCollectionProxy<CategoryOfCategoryListViewState, HTMLAnchorElement>
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export interface CategoryListRepeatedRefs {
|
|
36
|
-
categories: {
|
|
37
|
-
categoryLink: HTMLElementCollectionProxy<CategoryOfCategoryListViewState, HTMLAnchorElement>
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type CategoryListContract = JayContract<CategoryListViewState, CategoryListRefs, CategoryListSlowViewState, CategoryListFastViewState, CategoryListInteractiveViewState>
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
name: category-page
|
|
2
|
-
params:
|
|
3
|
-
slug: string
|
|
4
|
-
tags:
|
|
5
|
-
# Category/Collection information (from Wix Stores Collection API)
|
|
6
|
-
- tag: _id
|
|
7
|
-
type: data
|
|
8
|
-
dataType: string
|
|
9
|
-
description: Collection GUID
|
|
10
|
-
|
|
11
|
-
- tag: name
|
|
12
|
-
type: data
|
|
13
|
-
dataType: string
|
|
14
|
-
required: true
|
|
15
|
-
description: Collection name
|
|
16
|
-
|
|
17
|
-
- tag: description
|
|
18
|
-
type: data
|
|
19
|
-
dataType: string
|
|
20
|
-
description: Collection description
|
|
21
|
-
|
|
22
|
-
- tag: slug
|
|
23
|
-
type: data
|
|
24
|
-
dataType: string
|
|
25
|
-
description: Collection slug
|
|
26
|
-
|
|
27
|
-
- tag: visible
|
|
28
|
-
type: data
|
|
29
|
-
dataType: boolean
|
|
30
|
-
description: Collection visibility (impacts dynamic pages only)
|
|
31
|
-
|
|
32
|
-
- tag: numberOfProducts
|
|
33
|
-
type: data
|
|
34
|
-
dataType: number
|
|
35
|
-
description: Number of products in the collection
|
|
36
|
-
|
|
37
|
-
# Whether the collection has media
|
|
38
|
-
- tag: hasImage
|
|
39
|
-
type: variant
|
|
40
|
-
dataType: boolean
|
|
41
|
-
description: Whether the collection has a main image
|
|
42
|
-
|
|
43
|
-
# Media (from Wix Stores Collection API)
|
|
44
|
-
- tag: media
|
|
45
|
-
type: sub-contract
|
|
46
|
-
description: Media items associated with this collection
|
|
47
|
-
tags:
|
|
48
|
-
- tag: mainMedia
|
|
49
|
-
type: sub-contract
|
|
50
|
-
description: Primary media for the collection
|
|
51
|
-
tags:
|
|
52
|
-
- tag: _id
|
|
53
|
-
type: data
|
|
54
|
-
dataType: string
|
|
55
|
-
description: Media GUID
|
|
56
|
-
|
|
57
|
-
- tag: url
|
|
58
|
-
type: data
|
|
59
|
-
dataType: string
|
|
60
|
-
description: Media URL
|
|
61
|
-
meta: {mediaType: wix-image}
|
|
62
|
-
|
|
63
|
-
- tag: altText
|
|
64
|
-
type: data
|
|
65
|
-
dataType: string
|
|
66
|
-
description: Media alt text
|
|
67
|
-
|
|
68
|
-
- tag: mediaType
|
|
69
|
-
type: data
|
|
70
|
-
dataType: enum (IMAGE | VIDEO | AUDIO | DOCUMENT | ZIP)
|
|
71
|
-
description: Media item type
|
|
72
|
-
|
|
73
|
-
- tag: items
|
|
74
|
-
type: sub-contract
|
|
75
|
-
repeated: true
|
|
76
|
-
trackBy: _id
|
|
77
|
-
description: All media items
|
|
78
|
-
tags:
|
|
79
|
-
- tag: _id
|
|
80
|
-
type: data
|
|
81
|
-
dataType: string
|
|
82
|
-
description: Media GUID
|
|
83
|
-
|
|
84
|
-
- tag: url
|
|
85
|
-
type: data
|
|
86
|
-
dataType: string
|
|
87
|
-
description: Media URL
|
|
88
|
-
meta: {mediaType: wix-image}
|
|
89
|
-
|
|
90
|
-
- tag: altText
|
|
91
|
-
type: data
|
|
92
|
-
dataType: string
|
|
93
|
-
description: Media alt text
|
|
94
|
-
|
|
95
|
-
- tag: title
|
|
96
|
-
type: data
|
|
97
|
-
dataType: string
|
|
98
|
-
description: Media item title
|
|
99
|
-
|
|
100
|
-
- tag: mediaType
|
|
101
|
-
type: data
|
|
102
|
-
dataType: enum (IMAGE | VIDEO | AUDIO | DOCUMENT | ZIP)
|
|
103
|
-
description: Media item type
|
|
104
|
-
|
|
105
|
-
- tag: thumbnail
|
|
106
|
-
type: sub-contract
|
|
107
|
-
description: Media thumbnail
|
|
108
|
-
tags:
|
|
109
|
-
- tag: url
|
|
110
|
-
type: data
|
|
111
|
-
dataType: string
|
|
112
|
-
description: Thumbnail URL
|
|
113
|
-
meta: {mediaType: wix-image}
|
|
114
|
-
|
|
115
|
-
- tag: width
|
|
116
|
-
type: data
|
|
117
|
-
dataType: number
|
|
118
|
-
description: Thumbnail width in pixels
|
|
119
|
-
|
|
120
|
-
- tag: height
|
|
121
|
-
type: data
|
|
122
|
-
dataType: number
|
|
123
|
-
description: Thumbnail height in pixels
|
|
124
|
-
|
|
125
|
-
- tag: format
|
|
126
|
-
type: data
|
|
127
|
-
dataType: string
|
|
128
|
-
description: Media format (mp4, png, etc.)
|
|
129
|
-
|
|
130
|
-
# Breadcrumbs navigation
|
|
131
|
-
- tag: breadcrumbs
|
|
132
|
-
type: sub-contract
|
|
133
|
-
repeated: true
|
|
134
|
-
trackBy: categoryId
|
|
135
|
-
description: Breadcrumb navigation path
|
|
136
|
-
tags:
|
|
137
|
-
- tag: categoryId
|
|
138
|
-
type: data
|
|
139
|
-
dataType: string
|
|
140
|
-
description: Category GUID
|
|
141
|
-
|
|
142
|
-
- tag: categoryName
|
|
143
|
-
type: data
|
|
144
|
-
dataType: string
|
|
145
|
-
description: Category name in breadcrumb
|
|
146
|
-
|
|
147
|
-
- tag: categorySlug
|
|
148
|
-
type: data
|
|
149
|
-
dataType: string
|
|
150
|
-
description: Category slug for link
|
|
151
|
-
|
|
152
|
-
- tag: categoryLink
|
|
153
|
-
type: interactive
|
|
154
|
-
elementType: HTMLAnchorElement
|
|
155
|
-
description: Link to category
|
|
156
|
-
|
|
157
|
-
# Initial products (SSR - loaded in slow phase)
|
|
158
|
-
- tag: products
|
|
159
|
-
type: sub-contract
|
|
160
|
-
repeated: true
|
|
161
|
-
trackBy: _id
|
|
162
|
-
description: Initial products in this category (rendered server-side)
|
|
163
|
-
link: ./product-card
|
|
164
|
-
|
|
165
|
-
# Additional products (loaded on client via "load more")
|
|
166
|
-
- tag: loadedProducts
|
|
167
|
-
type: sub-contract
|
|
168
|
-
repeated: true
|
|
169
|
-
trackBy: _id
|
|
170
|
-
phase: fast+interactive
|
|
171
|
-
description: Additional products loaded on the client
|
|
172
|
-
link: ./product-card
|
|
173
|
-
|
|
174
|
-
# Load more functionality
|
|
175
|
-
- tag: hasMore
|
|
176
|
-
type: variant
|
|
177
|
-
dataType: boolean
|
|
178
|
-
phase: fast+interactive
|
|
179
|
-
description: Whether there are more products to load
|
|
180
|
-
|
|
181
|
-
- tag: loadMoreButton
|
|
182
|
-
type: interactive
|
|
183
|
-
elementType: HTMLButtonElement
|
|
184
|
-
description: Button to load more products
|
|
185
|
-
|
|
186
|
-
- tag: loadedCount
|
|
187
|
-
type: data
|
|
188
|
-
dataType: number
|
|
189
|
-
phase: fast+interactive
|
|
190
|
-
description: Number of products currently loaded
|
|
191
|
-
|
|
192
|
-
# Loading state
|
|
193
|
-
- tag: isLoading
|
|
194
|
-
type: variant
|
|
195
|
-
dataType: boolean
|
|
196
|
-
phase: fast+interactive
|
|
197
|
-
description: Whether products are currently loading
|
|
198
|
-
|
|
199
|
-
# Empty state
|
|
200
|
-
- tag: hasProducts
|
|
201
|
-
type: variant
|
|
202
|
-
dataType: boolean
|
|
203
|
-
phase: fast+interactive
|
|
204
|
-
description: Whether category has any products
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import {HTMLElementCollectionProxy, HTMLElementProxy, JayContract} from "@jay-framework/runtime";
|
|
2
|
-
import {ProductCardViewState, ProductCardRefs, ProductCardRepeatedRefs} from "./product-card.jay-contract";
|
|
3
|
-
|
|
4
|
-
export enum MediaType {
|
|
5
|
-
IMAGE,
|
|
6
|
-
VIDEO,
|
|
7
|
-
AUDIO,
|
|
8
|
-
DOCUMENT,
|
|
9
|
-
ZIP
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface MainMediaOfMediaOfCategoryPageViewState {
|
|
13
|
-
_id: string,
|
|
14
|
-
url: string,
|
|
15
|
-
altText: string,
|
|
16
|
-
mediaType: MediaType
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export enum MediaType {
|
|
20
|
-
IMAGE,
|
|
21
|
-
VIDEO,
|
|
22
|
-
AUDIO,
|
|
23
|
-
DOCUMENT,
|
|
24
|
-
ZIP
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ThumbnailOfItemOfMediaOfCategoryPageViewState {
|
|
28
|
-
url: string,
|
|
29
|
-
width: number,
|
|
30
|
-
height: number,
|
|
31
|
-
format: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface ItemOfMediaOfCategoryPageViewState {
|
|
35
|
-
_id: string,
|
|
36
|
-
url: string,
|
|
37
|
-
altText: string,
|
|
38
|
-
title: string,
|
|
39
|
-
mediaType: MediaType,
|
|
40
|
-
thumbnail: ThumbnailOfItemOfMediaOfCategoryPageViewState
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface MediaOfCategoryPageViewState {
|
|
44
|
-
mainMedia: MainMediaOfMediaOfCategoryPageViewState,
|
|
45
|
-
items: Array<ItemOfMediaOfCategoryPageViewState>
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface BreadcrumbOfCategoryPageViewState {
|
|
49
|
-
categoryId: string,
|
|
50
|
-
categoryName: string,
|
|
51
|
-
categorySlug: string
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface CategoryPageViewState {
|
|
55
|
-
_id: string,
|
|
56
|
-
name: string,
|
|
57
|
-
description: string,
|
|
58
|
-
slug: string,
|
|
59
|
-
visible: boolean,
|
|
60
|
-
numberOfProducts: number,
|
|
61
|
-
hasImage: boolean,
|
|
62
|
-
media: MediaOfCategoryPageViewState,
|
|
63
|
-
breadcrumbs: Array<BreadcrumbOfCategoryPageViewState>,
|
|
64
|
-
products: Array<ProductCardViewState>,
|
|
65
|
-
loadedProducts: Array<ProductCardViewState>,
|
|
66
|
-
hasMore: boolean,
|
|
67
|
-
loadedCount: number,
|
|
68
|
-
isLoading: boolean,
|
|
69
|
-
hasProducts: boolean
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type CategoryPageSlowViewState = Pick<CategoryPageViewState, '_id' | 'name' | 'description' | 'slug' | 'visible' | 'numberOfProducts' | 'hasImage'> & {
|
|
73
|
-
media: CategoryPageViewState['media'];
|
|
74
|
-
breadcrumbs: Array<CategoryPageViewState['breadcrumbs'][number]>;
|
|
75
|
-
products: Array<Pick<CategoryPageViewState['products'][number], '_id' | 'name' | 'slug' | 'productUrl' | 'hasDiscount' | 'hasRibbon' | 'productType' | 'quickAddType'> & {
|
|
76
|
-
mainMedia: CategoryPageViewState['products'][number]['mainMedia'];
|
|
77
|
-
thumbnail: CategoryPageViewState['products'][number]['thumbnail'];
|
|
78
|
-
inventory: CategoryPageViewState['products'][number]['inventory'];
|
|
79
|
-
ribbon: CategoryPageViewState['products'][number]['ribbon'];
|
|
80
|
-
brand: CategoryPageViewState['products'][number]['brand'];
|
|
81
|
-
quickOption: Pick<CategoryPageViewState['products'][number]['quickOption'], '_id' | 'name' | 'optionRenderType'> & {
|
|
82
|
-
choices: Array<Pick<CategoryPageViewState['products'][number]['quickOption']['choices'][number], 'choiceId' | 'name' | 'choiceType' | 'colorCode' | 'variantId'>>;
|
|
83
|
-
};
|
|
84
|
-
}>;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export type CategoryPageFastViewState = Pick<CategoryPageViewState, 'hasMore' | 'loadedCount' | 'isLoading' | 'hasProducts'> & {
|
|
88
|
-
products: Array<Pick<CategoryPageViewState['products'][number], '_id' | 'price' | 'strikethroughPrice' | 'isAddingToCart'> & {
|
|
89
|
-
quickOption: {
|
|
90
|
-
choices: Array<Pick<CategoryPageViewState['products'][number]['quickOption']['choices'][number], 'choiceId' | 'inStock' | 'isSelected'>>;
|
|
91
|
-
};
|
|
92
|
-
}>;
|
|
93
|
-
loadedProducts: Array<CategoryPageViewState['loadedProducts'][number]>;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type CategoryPageInteractiveViewState = Pick<CategoryPageViewState, 'hasMore' | 'loadedCount' | 'isLoading' | 'hasProducts'> & {
|
|
97
|
-
products: Array<Pick<CategoryPageViewState['products'][number], '_id' | 'price' | 'strikethroughPrice' | 'isAddingToCart'> & {
|
|
98
|
-
quickOption: {
|
|
99
|
-
choices: Array<Pick<CategoryPageViewState['products'][number]['quickOption']['choices'][number], 'choiceId' | 'inStock' | 'isSelected'>>;
|
|
100
|
-
};
|
|
101
|
-
}>;
|
|
102
|
-
loadedProducts: Array<CategoryPageViewState['loadedProducts'][number]>;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
export interface CategoryPageRefs {
|
|
107
|
-
loadMoreButton: HTMLElementProxy<CategoryPageViewState, HTMLButtonElement>,
|
|
108
|
-
breadcrumbs: {
|
|
109
|
-
categoryLink: HTMLElementCollectionProxy<BreadcrumbOfCategoryPageViewState, HTMLAnchorElement>
|
|
110
|
-
},
|
|
111
|
-
products: ProductCardRepeatedRefs,
|
|
112
|
-
loadedProducts: ProductCardRepeatedRefs
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export interface CategoryPageRepeatedRefs {
|
|
117
|
-
loadMoreButton: HTMLElementCollectionProxy<CategoryPageViewState, HTMLButtonElement>,
|
|
118
|
-
breadcrumbs: {
|
|
119
|
-
categoryLink: HTMLElementCollectionProxy<BreadcrumbOfCategoryPageViewState, HTMLAnchorElement>
|
|
120
|
-
},
|
|
121
|
-
products: ProductCardRepeatedRefs,
|
|
122
|
-
loadedProducts: ProductCardRepeatedRefs
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
import { UrlParams } from '@jay-framework/fullstack-component';
|
|
126
|
-
|
|
127
|
-
export interface CategoryPageParams extends UrlParams {
|
|
128
|
-
slug: string;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export type CategoryPageContract = JayContract<CategoryPageViewState, CategoryPageRefs, CategoryPageSlowViewState, CategoryPageFastViewState, CategoryPageInteractiveViewState>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: mediaGallery
|
|
2
|
-
tags:
|
|
3
|
-
- tag: selectedMedia
|
|
4
|
-
type: sub-contract
|
|
5
|
-
description: Selected Media (image, video) to display with selection based galleries
|
|
6
|
-
link: ./media
|
|
7
|
-
|
|
8
|
-
- tag: availableMedia
|
|
9
|
-
type: sub-contract
|
|
10
|
-
repeated: true
|
|
11
|
-
trackBy: mediaId
|
|
12
|
-
description: Available media for display or use as thumbnails
|
|
13
|
-
tags:
|
|
14
|
-
- tag: mediaId
|
|
15
|
-
type: data
|
|
16
|
-
- tag: media
|
|
17
|
-
type: sub-contract
|
|
18
|
-
link: ./media
|
|
19
|
-
- tag: selected
|
|
20
|
-
type: [variant, interactive]
|
|
21
|
-
dataType: enum(selected | notSelected)
|
|
22
|
-
elementType: HTMLImageElement | HTMLDivElement
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {HTMLElementCollectionProxy, JayContract} from "@jay-framework/runtime";
|
|
2
|
-
import {MediaViewState, MediaRefs, MediaRepeatedRefs} from "./media.jay-contract";
|
|
3
|
-
|
|
4
|
-
export enum Selected {
|
|
5
|
-
selected,
|
|
6
|
-
notSelected
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface AvailableMediaOfMediaGalleryViewState {
|
|
10
|
-
mediaId: string,
|
|
11
|
-
media: MediaViewState,
|
|
12
|
-
selected: Selected
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface MediaGalleryViewState {
|
|
16
|
-
selectedMedia: MediaViewState,
|
|
17
|
-
availableMedia: Array<AvailableMediaOfMediaGalleryViewState>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type MediaGallerySlowViewState = {
|
|
21
|
-
selectedMedia: MediaGalleryViewState['selectedMedia'];
|
|
22
|
-
availableMedia: Array<Pick<MediaGalleryViewState['availableMedia'][number], 'mediaId'> & {
|
|
23
|
-
media: MediaGalleryViewState['availableMedia'][number]['media'];
|
|
24
|
-
}>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export type MediaGalleryFastViewState = {
|
|
28
|
-
availableMedia: Array<Pick<MediaGalleryViewState['availableMedia'][number], 'mediaId' | 'selected'>>;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type MediaGalleryInteractiveViewState = {
|
|
32
|
-
availableMedia: Array<Pick<MediaGalleryViewState['availableMedia'][number], 'mediaId' | 'selected'>>;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export interface MediaGalleryRefs {
|
|
37
|
-
selectedMedia: MediaRefs,
|
|
38
|
-
availableMedia: {
|
|
39
|
-
selected: HTMLElementCollectionProxy<AvailableMediaOfMediaGalleryViewState, HTMLImageElement | HTMLDivElement>,
|
|
40
|
-
media: MediaRefs
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export interface MediaGalleryRepeatedRefs {
|
|
46
|
-
selectedMedia: MediaRepeatedRefs,
|
|
47
|
-
availableMedia: {
|
|
48
|
-
selected: HTMLElementCollectionProxy<AvailableMediaOfMediaGalleryViewState, HTMLImageElement | HTMLDivElement>,
|
|
49
|
-
media: MediaRepeatedRefs
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export type MediaGalleryContract = JayContract<MediaGalleryViewState, MediaGalleryRefs, MediaGallerySlowViewState, MediaGalleryFastViewState, MediaGalleryInteractiveViewState>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {JayContract} from "@jay-framework/runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export enum MediaType {
|
|
5
|
-
IMAGE,
|
|
6
|
-
VIDEO
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface MediaViewState {
|
|
10
|
-
url: string,
|
|
11
|
-
mediaType: MediaType
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type MediaSlowViewState = Pick<MediaViewState, 'url' | 'mediaType'>;
|
|
15
|
-
|
|
16
|
-
export type MediaFastViewState = {};
|
|
17
|
-
|
|
18
|
-
export type MediaInteractiveViewState = {};
|
|
19
|
-
|
|
20
|
-
export interface MediaRefs {}
|
|
21
|
-
|
|
22
|
-
export interface MediaRepeatedRefs {}
|
|
23
|
-
|
|
24
|
-
export type MediaContract = JayContract<MediaViewState, MediaRefs, MediaSlowViewState, MediaFastViewState, MediaInteractiveViewState>
|