@mohasinac/appkit 4.15.0 → 4.16.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/dist/_internal/shared/actions/action-registry.d.ts +9 -2
- package/dist/_internal/shared/actions/action-registry.js +455 -6
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/cart/schema.d.ts +11 -11
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +22 -22
- package/dist/_internal/shared/features/orders/schema.d.ts +4 -4
- package/dist/_internal/shared/features/products/schema.d.ts +25 -25
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
- package/dist/contracts/extend.d.ts +29 -0
- package/dist/contracts/extend.js +20 -0
- package/dist/contracts/index.d.ts +2 -1
- package/dist/contracts/index.js +2 -0
- package/dist/features/admin/components/AdminViewCards.js +24 -17
- package/dist/features/admin/components/DataListingView.js +15 -1
- package/dist/features/admin/components/DataTable.js +7 -17
- package/dist/features/auctions/schemas/index.d.ts +14 -14
- package/dist/features/auth/schemas/index.d.ts +2 -2
- package/dist/features/blog/actions/blog-actions.d.ts +7 -7
- package/dist/features/blog/schemas/blog-form.d.ts +6 -6
- package/dist/features/blog/schemas/index.d.ts +10 -10
- package/dist/features/cart/schemas/index.d.ts +3 -3
- package/dist/features/catalogue/schemas/validation.d.ts +12 -12
- package/dist/features/categories/schemas/index.d.ts +16 -16
- package/dist/features/collections/schemas/index.d.ts +8 -8
- package/dist/features/events/schemas/index.d.ts +2 -2
- package/dist/features/faq/actions/faq-actions.d.ts +6 -6
- package/dist/features/faq/schemas/index.d.ts +6 -6
- package/dist/features/grouped/schemas/grouped-listing-form.d.ts +2 -2
- package/dist/features/grouped/schemas/index.d.ts +4 -4
- package/dist/features/homepage/schemas/index.d.ts +40 -40
- package/dist/features/messages/schemas/index.d.ts +2 -2
- package/dist/features/orders/schemas/index.d.ts +24 -24
- package/dist/features/pre-orders/schemas/index.d.ts +4 -4
- package/dist/features/products/schemas/index.d.ts +36 -36
- package/dist/features/products/schemas/product-features.validators.d.ts +2 -2
- package/dist/features/promotions/schemas/index.d.ts +14 -14
- package/dist/features/reviews/schemas/index.d.ts +14 -14
- package/dist/features/scams/schemas/index.d.ts +2 -2
- package/dist/features/search/schemas/index.d.ts +2 -2
- package/dist/features/seller/schemas/index.d.ts +2 -2
- package/dist/features/shipments/schemas/validation.d.ts +22 -22
- package/dist/features/store-extensions/schemas/listing-template-form.d.ts +3 -3
- package/dist/features/store-extensions/schemas/store-category-form.d.ts +2 -2
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/features/support/schemas/index.d.ts +4 -4
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +24 -0
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
- package/dist/schemas/registry.d.ts +108 -108
- package/dist/styles.css +1 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/DataTable.js +4 -2
- package/dist/ui/columns/build-columns.d.ts +6 -1
- package/dist/ui/columns/build-columns.js +53 -0
- package/dist/ui/columns/cell-renderers.d.ts +68 -0
- package/dist/ui/columns/cell-renderers.js +111 -0
- package/dist/ui/columns/column-renderers.d.ts +6 -1
- package/dist/ui/columns/column-renderers.js +6 -1
- package/dist/ui/columns/index.d.ts +2 -1
- package/dist/ui/columns/index.js +5 -1
- package/dist/ui/components/Button.js +27 -2
- package/dist/ui/icons/icon-registry.d.ts +65 -0
- package/dist/ui/icons/icon-registry.js +115 -0
- package/package.json +1 -1
|
@@ -16,8 +16,8 @@ export declare const blogPostInputSchema: z.ZodObject<{
|
|
|
16
16
|
status: "draft" | "published";
|
|
17
17
|
title: string;
|
|
18
18
|
content: string;
|
|
19
|
-
slug: string;
|
|
20
19
|
category: string;
|
|
20
|
+
slug: string;
|
|
21
21
|
tags: string[];
|
|
22
22
|
isFeatured: boolean;
|
|
23
23
|
youtubeId?: string | undefined;
|
|
@@ -28,8 +28,8 @@ export declare const blogPostInputSchema: z.ZodObject<{
|
|
|
28
28
|
}, {
|
|
29
29
|
title: string;
|
|
30
30
|
content: string;
|
|
31
|
-
slug: string;
|
|
32
31
|
category: string;
|
|
32
|
+
slug: string;
|
|
33
33
|
status?: "draft" | "published" | undefined;
|
|
34
34
|
youtubeId?: string | undefined;
|
|
35
35
|
tags?: string[] | undefined;
|
|
@@ -56,8 +56,8 @@ export declare const blogPostUpdateSchema: z.ZodObject<Omit<{
|
|
|
56
56
|
status?: "draft" | "published" | undefined;
|
|
57
57
|
title?: string | undefined;
|
|
58
58
|
content?: string | undefined;
|
|
59
|
-
youtubeId?: string | undefined;
|
|
60
59
|
category?: string | undefined;
|
|
60
|
+
youtubeId?: string | undefined;
|
|
61
61
|
tags?: string[] | undefined;
|
|
62
62
|
isFeatured?: boolean | undefined;
|
|
63
63
|
excerpt?: string | undefined;
|
|
@@ -68,8 +68,8 @@ export declare const blogPostUpdateSchema: z.ZodObject<Omit<{
|
|
|
68
68
|
status?: "draft" | "published" | undefined;
|
|
69
69
|
title?: string | undefined;
|
|
70
70
|
content?: string | undefined;
|
|
71
|
-
youtubeId?: string | undefined;
|
|
72
71
|
category?: string | undefined;
|
|
72
|
+
youtubeId?: string | undefined;
|
|
73
73
|
tags?: string[] | undefined;
|
|
74
74
|
isFeatured?: boolean | undefined;
|
|
75
75
|
excerpt?: string | undefined;
|
|
@@ -17,10 +17,10 @@ export declare const addToCartSchema: z.ZodObject<{
|
|
|
17
17
|
storeId: string;
|
|
18
18
|
price: number;
|
|
19
19
|
listingType: "art" | "stickers" | "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live";
|
|
20
|
+
storeName: string;
|
|
21
|
+
quantity: number;
|
|
20
22
|
productId: string;
|
|
21
23
|
productTitle: string;
|
|
22
|
-
quantity: number;
|
|
23
|
-
storeName: string;
|
|
24
24
|
productImage: string;
|
|
25
25
|
offerId?: string | undefined;
|
|
26
26
|
lockedPrice?: number | undefined;
|
|
@@ -32,8 +32,8 @@ export declare const addToCartSchema: z.ZodObject<{
|
|
|
32
32
|
productId: string;
|
|
33
33
|
productTitle: string;
|
|
34
34
|
currency?: string | undefined;
|
|
35
|
-
quantity?: number | undefined;
|
|
36
35
|
storeName?: string | undefined;
|
|
36
|
+
quantity?: number | undefined;
|
|
37
37
|
productImage?: string | undefined;
|
|
38
38
|
offerId?: string | undefined;
|
|
39
39
|
lockedPrice?: number | undefined;
|
|
@@ -43,11 +43,11 @@ export declare const updateCartItemSchema: z.ZodObject<{
|
|
|
43
43
|
productId: z.ZodString;
|
|
44
44
|
quantity: z.ZodNumber;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
productId: string;
|
|
47
46
|
quantity: number;
|
|
48
|
-
}, {
|
|
49
47
|
productId: string;
|
|
48
|
+
}, {
|
|
50
49
|
quantity: number;
|
|
50
|
+
productId: string;
|
|
51
51
|
}>;
|
|
52
52
|
export declare const removeFromCartSchema: z.ZodObject<{
|
|
53
53
|
productId: z.ZodString;
|
|
@@ -75,10 +75,10 @@ export declare const mergeGuestCartSchema: z.ZodObject<{
|
|
|
75
75
|
storeId: string;
|
|
76
76
|
price: number;
|
|
77
77
|
listingType: "art" | "stickers" | "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live";
|
|
78
|
+
storeName: string;
|
|
79
|
+
quantity: number;
|
|
78
80
|
productId: string;
|
|
79
81
|
productTitle: string;
|
|
80
|
-
quantity: number;
|
|
81
|
-
storeName: string;
|
|
82
82
|
productImage: string;
|
|
83
83
|
offerId?: string | undefined;
|
|
84
84
|
lockedPrice?: number | undefined;
|
|
@@ -90,8 +90,8 @@ export declare const mergeGuestCartSchema: z.ZodObject<{
|
|
|
90
90
|
productId: string;
|
|
91
91
|
productTitle: string;
|
|
92
92
|
currency?: string | undefined;
|
|
93
|
-
quantity?: number | undefined;
|
|
94
93
|
storeName?: string | undefined;
|
|
94
|
+
quantity?: number | undefined;
|
|
95
95
|
productImage?: string | undefined;
|
|
96
96
|
offerId?: string | undefined;
|
|
97
97
|
lockedPrice?: number | undefined;
|
|
@@ -103,10 +103,10 @@ export declare const mergeGuestCartSchema: z.ZodObject<{
|
|
|
103
103
|
storeId: string;
|
|
104
104
|
price: number;
|
|
105
105
|
listingType: "art" | "stickers" | "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live";
|
|
106
|
+
storeName: string;
|
|
107
|
+
quantity: number;
|
|
106
108
|
productId: string;
|
|
107
109
|
productTitle: string;
|
|
108
|
-
quantity: number;
|
|
109
|
-
storeName: string;
|
|
110
110
|
productImage: string;
|
|
111
111
|
offerId?: string | undefined;
|
|
112
112
|
lockedPrice?: number | undefined;
|
|
@@ -120,8 +120,8 @@ export declare const mergeGuestCartSchema: z.ZodObject<{
|
|
|
120
120
|
productId: string;
|
|
121
121
|
productTitle: string;
|
|
122
122
|
currency?: string | undefined;
|
|
123
|
-
quantity?: number | undefined;
|
|
124
123
|
storeName?: string | undefined;
|
|
124
|
+
quantity?: number | undefined;
|
|
125
125
|
productImage?: string | undefined;
|
|
126
126
|
offerId?: string | undefined;
|
|
127
127
|
lockedPrice?: number | undefined;
|
|
@@ -26,35 +26,35 @@ export declare const bundleQueryRuleSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
26
26
|
/** Eligible listing types for a dynamic bundle rule. */
|
|
27
27
|
listingType: z.ZodOptional<z.ZodEnum<["standard", "pre-order", "prize-draw"]>>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
29
30
|
categorySlug?: string | undefined;
|
|
30
31
|
brandSlug?: string | undefined;
|
|
31
32
|
tags?: string[] | undefined;
|
|
32
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
33
33
|
}, {
|
|
34
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
34
35
|
categorySlug?: string | undefined;
|
|
35
36
|
brandSlug?: string | undefined;
|
|
36
37
|
tags?: string[] | undefined;
|
|
37
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
38
38
|
}>;
|
|
39
39
|
orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
|
|
40
40
|
limit: z.ZodNumber;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
type: "dynamic";
|
|
43
43
|
filter: {
|
|
44
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
44
45
|
categorySlug?: string | undefined;
|
|
45
46
|
brandSlug?: string | undefined;
|
|
46
47
|
tags?: string[] | undefined;
|
|
47
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
48
48
|
};
|
|
49
49
|
limit: number;
|
|
50
50
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
51
51
|
}, {
|
|
52
52
|
type: "dynamic";
|
|
53
53
|
filter: {
|
|
54
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
54
55
|
categorySlug?: string | undefined;
|
|
55
56
|
brandSlug?: string | undefined;
|
|
56
57
|
tags?: string[] | undefined;
|
|
57
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
58
58
|
};
|
|
59
59
|
limit: number;
|
|
60
60
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -102,35 +102,35 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
102
102
|
/** Eligible listing types for a dynamic bundle rule. */
|
|
103
103
|
listingType: z.ZodOptional<z.ZodEnum<["standard", "pre-order", "prize-draw"]>>;
|
|
104
104
|
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
105
106
|
categorySlug?: string | undefined;
|
|
106
107
|
brandSlug?: string | undefined;
|
|
107
108
|
tags?: string[] | undefined;
|
|
108
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
109
109
|
}, {
|
|
110
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
110
111
|
categorySlug?: string | undefined;
|
|
111
112
|
brandSlug?: string | undefined;
|
|
112
113
|
tags?: string[] | undefined;
|
|
113
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
114
114
|
}>;
|
|
115
115
|
orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
|
|
116
116
|
limit: z.ZodNumber;
|
|
117
117
|
}, "strip", z.ZodTypeAny, {
|
|
118
118
|
type: "dynamic";
|
|
119
119
|
filter: {
|
|
120
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
120
121
|
categorySlug?: string | undefined;
|
|
121
122
|
brandSlug?: string | undefined;
|
|
122
123
|
tags?: string[] | undefined;
|
|
123
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
124
124
|
};
|
|
125
125
|
limit: number;
|
|
126
126
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
127
127
|
}, {
|
|
128
128
|
type: "dynamic";
|
|
129
129
|
filter: {
|
|
130
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
130
131
|
categorySlug?: string | undefined;
|
|
131
132
|
brandSlug?: string | undefined;
|
|
132
133
|
tags?: string[] | undefined;
|
|
133
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
134
134
|
};
|
|
135
135
|
limit: number;
|
|
136
136
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -172,10 +172,10 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
172
172
|
} | {
|
|
173
173
|
type: "dynamic";
|
|
174
174
|
filter: {
|
|
175
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
175
176
|
categorySlug?: string | undefined;
|
|
176
177
|
brandSlug?: string | undefined;
|
|
177
178
|
tags?: string[] | undefined;
|
|
178
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
179
179
|
};
|
|
180
180
|
limit: number;
|
|
181
181
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -185,9 +185,9 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
185
185
|
icon?: string | undefined;
|
|
186
186
|
coverImage?: string | undefined;
|
|
187
187
|
} | undefined;
|
|
188
|
-
description?: string | undefined;
|
|
189
|
-
slug?: string | undefined;
|
|
190
188
|
brandSlug?: string | undefined;
|
|
189
|
+
slug?: string | undefined;
|
|
190
|
+
description?: string | undefined;
|
|
191
191
|
isActive?: boolean | undefined;
|
|
192
192
|
bundleItemDetails?: {
|
|
193
193
|
productId: string;
|
|
@@ -204,10 +204,10 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
204
204
|
} | {
|
|
205
205
|
type: "dynamic";
|
|
206
206
|
filter: {
|
|
207
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
207
208
|
categorySlug?: string | undefined;
|
|
208
209
|
brandSlug?: string | undefined;
|
|
209
210
|
tags?: string[] | undefined;
|
|
210
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
211
211
|
};
|
|
212
212
|
limit: number;
|
|
213
213
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -217,9 +217,9 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
217
217
|
icon?: string | undefined;
|
|
218
218
|
coverImage?: string | undefined;
|
|
219
219
|
} | undefined;
|
|
220
|
-
description?: string | undefined;
|
|
221
|
-
slug?: string | undefined;
|
|
222
220
|
brandSlug?: string | undefined;
|
|
221
|
+
slug?: string | undefined;
|
|
222
|
+
description?: string | undefined;
|
|
223
223
|
isActive?: boolean | undefined;
|
|
224
224
|
bundleItemDetails?: {
|
|
225
225
|
productId: string;
|
|
@@ -250,35 +250,35 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
250
250
|
/** Eligible listing types for a dynamic bundle rule. */
|
|
251
251
|
listingType: z.ZodOptional<z.ZodEnum<["standard", "pre-order", "prize-draw"]>>;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
253
254
|
categorySlug?: string | undefined;
|
|
254
255
|
brandSlug?: string | undefined;
|
|
255
256
|
tags?: string[] | undefined;
|
|
256
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
257
257
|
}, {
|
|
258
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
258
259
|
categorySlug?: string | undefined;
|
|
259
260
|
brandSlug?: string | undefined;
|
|
260
261
|
tags?: string[] | undefined;
|
|
261
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
262
262
|
}>;
|
|
263
263
|
orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
|
|
264
264
|
limit: z.ZodNumber;
|
|
265
265
|
}, "strip", z.ZodTypeAny, {
|
|
266
266
|
type: "dynamic";
|
|
267
267
|
filter: {
|
|
268
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
268
269
|
categorySlug?: string | undefined;
|
|
269
270
|
brandSlug?: string | undefined;
|
|
270
271
|
tags?: string[] | undefined;
|
|
271
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
272
272
|
};
|
|
273
273
|
limit: number;
|
|
274
274
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
275
275
|
}, {
|
|
276
276
|
type: "dynamic";
|
|
277
277
|
filter: {
|
|
278
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
278
279
|
categorySlug?: string | undefined;
|
|
279
280
|
brandSlug?: string | undefined;
|
|
280
281
|
tags?: string[] | undefined;
|
|
281
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
282
282
|
};
|
|
283
283
|
limit: number;
|
|
284
284
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -315,8 +315,8 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
315
315
|
coverImage?: string | undefined;
|
|
316
316
|
} | undefined;
|
|
317
317
|
name?: string | undefined;
|
|
318
|
-
description?: string | undefined;
|
|
319
318
|
brandSlug?: string | undefined;
|
|
319
|
+
description?: string | undefined;
|
|
320
320
|
isActive?: boolean | undefined;
|
|
321
321
|
bundleKind?: "brand" | "special" | undefined;
|
|
322
322
|
bundleProductIds?: string[] | undefined;
|
|
@@ -331,10 +331,10 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
331
331
|
} | {
|
|
332
332
|
type: "dynamic";
|
|
333
333
|
filter: {
|
|
334
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
334
335
|
categorySlug?: string | undefined;
|
|
335
336
|
brandSlug?: string | undefined;
|
|
336
337
|
tags?: string[] | undefined;
|
|
337
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
338
338
|
};
|
|
339
339
|
limit: number;
|
|
340
340
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -346,8 +346,8 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
346
346
|
coverImage?: string | undefined;
|
|
347
347
|
} | undefined;
|
|
348
348
|
name?: string | undefined;
|
|
349
|
-
description?: string | undefined;
|
|
350
349
|
brandSlug?: string | undefined;
|
|
350
|
+
description?: string | undefined;
|
|
351
351
|
isActive?: boolean | undefined;
|
|
352
352
|
bundleKind?: "brand" | "special" | undefined;
|
|
353
353
|
bundleProductIds?: string[] | undefined;
|
|
@@ -362,10 +362,10 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
362
362
|
} | {
|
|
363
363
|
type: "dynamic";
|
|
364
364
|
filter: {
|
|
365
|
+
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
365
366
|
categorySlug?: string | undefined;
|
|
366
367
|
brandSlug?: string | undefined;
|
|
367
368
|
tags?: string[] | undefined;
|
|
368
|
-
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
369
369
|
};
|
|
370
370
|
limit: number;
|
|
371
371
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
@@ -6,12 +6,12 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
6
6
|
price: z.ZodNumber;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
8
|
price: number;
|
|
9
|
-
productId: string;
|
|
10
9
|
quantity: number;
|
|
10
|
+
productId: string;
|
|
11
11
|
}, {
|
|
12
12
|
price: number;
|
|
13
|
-
productId: string;
|
|
14
13
|
quantity: number;
|
|
14
|
+
productId: string;
|
|
15
15
|
}>, "many">;
|
|
16
16
|
shippingAddress: z.ZodObject<{
|
|
17
17
|
fullName: z.ZodString;
|
|
@@ -57,8 +57,8 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
57
57
|
};
|
|
58
58
|
items: {
|
|
59
59
|
price: number;
|
|
60
|
-
productId: string;
|
|
61
60
|
quantity: number;
|
|
61
|
+
productId: string;
|
|
62
62
|
}[];
|
|
63
63
|
couponCode?: string | undefined;
|
|
64
64
|
}, {
|
|
@@ -75,8 +75,8 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
75
75
|
};
|
|
76
76
|
items: {
|
|
77
77
|
price: number;
|
|
78
|
-
productId: string;
|
|
79
78
|
quantity: number;
|
|
79
|
+
productId: string;
|
|
80
80
|
}[];
|
|
81
81
|
couponCode?: string | undefined;
|
|
82
82
|
}>;
|
|
@@ -26,16 +26,16 @@ export declare const productInputSchema: z.ZodObject<{
|
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
27
|
currency: string;
|
|
28
28
|
title: string;
|
|
29
|
-
category: string;
|
|
30
29
|
price: number;
|
|
30
|
+
category: string;
|
|
31
31
|
stockQuantity: number;
|
|
32
32
|
availableQuantity: number;
|
|
33
33
|
mainImage: string;
|
|
34
34
|
images: string[];
|
|
35
35
|
tags: string[];
|
|
36
|
+
brandSlug?: string | undefined;
|
|
36
37
|
features?: string[] | undefined;
|
|
37
38
|
description?: string | undefined;
|
|
38
|
-
brandSlug?: string | undefined;
|
|
39
39
|
shippingInfo?: string | undefined;
|
|
40
40
|
returnPolicy?: string | undefined;
|
|
41
41
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | undefined;
|
|
@@ -49,14 +49,14 @@ export declare const productInputSchema: z.ZodObject<{
|
|
|
49
49
|
minOfferPercent?: number | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
title: string;
|
|
52
|
-
category: string;
|
|
53
52
|
price: number;
|
|
53
|
+
category: string;
|
|
54
54
|
mainImage: string;
|
|
55
55
|
currency?: string | undefined;
|
|
56
|
-
features?: string[] | undefined;
|
|
57
|
-
description?: string | undefined;
|
|
58
56
|
brandSlug?: string | undefined;
|
|
59
57
|
stockQuantity?: number | undefined;
|
|
58
|
+
features?: string[] | undefined;
|
|
59
|
+
description?: string | undefined;
|
|
60
60
|
availableQuantity?: number | undefined;
|
|
61
61
|
images?: string[] | undefined;
|
|
62
62
|
tags?: string[] | undefined;
|
|
@@ -99,12 +99,12 @@ export declare const productUpdateSchema: z.ZodObject<{
|
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
100
|
currency?: string | undefined;
|
|
101
101
|
title?: string | undefined;
|
|
102
|
-
|
|
103
|
-
description?: string | undefined;
|
|
102
|
+
price?: number | undefined;
|
|
104
103
|
category?: string | undefined;
|
|
105
104
|
brandSlug?: string | undefined;
|
|
106
|
-
price?: number | undefined;
|
|
107
105
|
stockQuantity?: number | undefined;
|
|
106
|
+
features?: string[] | undefined;
|
|
107
|
+
description?: string | undefined;
|
|
108
108
|
availableQuantity?: number | undefined;
|
|
109
109
|
mainImage?: string | undefined;
|
|
110
110
|
images?: string[] | undefined;
|
|
@@ -123,12 +123,12 @@ export declare const productUpdateSchema: z.ZodObject<{
|
|
|
123
123
|
}, {
|
|
124
124
|
currency?: string | undefined;
|
|
125
125
|
title?: string | undefined;
|
|
126
|
-
|
|
127
|
-
description?: string | undefined;
|
|
126
|
+
price?: number | undefined;
|
|
128
127
|
category?: string | undefined;
|
|
129
128
|
brandSlug?: string | undefined;
|
|
130
|
-
price?: number | undefined;
|
|
131
129
|
stockQuantity?: number | undefined;
|
|
130
|
+
features?: string[] | undefined;
|
|
131
|
+
description?: string | undefined;
|
|
132
132
|
availableQuantity?: number | undefined;
|
|
133
133
|
mainImage?: string | undefined;
|
|
134
134
|
images?: string[] | undefined;
|
|
@@ -182,20 +182,20 @@ export declare const auctionInputSchema: z.ZodObject<{
|
|
|
182
182
|
}, "strip", z.ZodTypeAny, {
|
|
183
183
|
currency: string;
|
|
184
184
|
title: string;
|
|
185
|
-
category: string;
|
|
186
185
|
price: number;
|
|
186
|
+
listingType: "auction";
|
|
187
|
+
category: string;
|
|
187
188
|
stockQuantity: number;
|
|
188
189
|
availableQuantity: number;
|
|
189
190
|
mainImage: string;
|
|
190
191
|
images: string[];
|
|
191
192
|
tags: string[];
|
|
192
|
-
listingType: "auction";
|
|
193
193
|
auctionEndDate: string;
|
|
194
194
|
startingBid: number;
|
|
195
195
|
autoExtendable: boolean;
|
|
196
|
+
brandSlug?: string | undefined;
|
|
196
197
|
features?: string[] | undefined;
|
|
197
198
|
description?: string | undefined;
|
|
198
|
-
brandSlug?: string | undefined;
|
|
199
199
|
shippingInfo?: string | undefined;
|
|
200
200
|
returnPolicy?: string | undefined;
|
|
201
201
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | undefined;
|
|
@@ -214,17 +214,17 @@ export declare const auctionInputSchema: z.ZodObject<{
|
|
|
214
214
|
minOfferPercent?: number | undefined;
|
|
215
215
|
}, {
|
|
216
216
|
title: string;
|
|
217
|
-
category: string;
|
|
218
217
|
price: number;
|
|
219
|
-
mainImage: string;
|
|
220
218
|
listingType: "auction";
|
|
219
|
+
category: string;
|
|
220
|
+
mainImage: string;
|
|
221
221
|
auctionEndDate: string;
|
|
222
222
|
startingBid: number;
|
|
223
223
|
currency?: string | undefined;
|
|
224
|
-
features?: string[] | undefined;
|
|
225
|
-
description?: string | undefined;
|
|
226
224
|
brandSlug?: string | undefined;
|
|
227
225
|
stockQuantity?: number | undefined;
|
|
226
|
+
features?: string[] | undefined;
|
|
227
|
+
description?: string | undefined;
|
|
228
228
|
availableQuantity?: number | undefined;
|
|
229
229
|
images?: string[] | undefined;
|
|
230
230
|
tags?: string[] | undefined;
|
|
@@ -280,20 +280,20 @@ export declare const preOrderInputSchema: z.ZodObject<{
|
|
|
280
280
|
}, "strip", z.ZodTypeAny, {
|
|
281
281
|
currency: string;
|
|
282
282
|
title: string;
|
|
283
|
-
category: string;
|
|
284
283
|
price: number;
|
|
284
|
+
listingType: "pre-order";
|
|
285
|
+
category: string;
|
|
285
286
|
stockQuantity: number;
|
|
286
287
|
availableQuantity: number;
|
|
287
288
|
mainImage: string;
|
|
288
289
|
images: string[];
|
|
289
290
|
tags: string[];
|
|
290
|
-
listingType: "pre-order";
|
|
291
291
|
preOrderDeliveryDate: string;
|
|
292
292
|
preOrderProductionStatus: "upcoming" | "in_production" | "ready_to_ship";
|
|
293
293
|
preOrderCancellable: boolean;
|
|
294
|
+
brandSlug?: string | undefined;
|
|
294
295
|
features?: string[] | undefined;
|
|
295
296
|
description?: string | undefined;
|
|
296
|
-
brandSlug?: string | undefined;
|
|
297
297
|
shippingInfo?: string | undefined;
|
|
298
298
|
returnPolicy?: string | undefined;
|
|
299
299
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | undefined;
|
|
@@ -309,16 +309,16 @@ export declare const preOrderInputSchema: z.ZodObject<{
|
|
|
309
309
|
minOfferPercent?: number | undefined;
|
|
310
310
|
}, {
|
|
311
311
|
title: string;
|
|
312
|
-
category: string;
|
|
313
312
|
price: number;
|
|
314
|
-
mainImage: string;
|
|
315
313
|
listingType: "pre-order";
|
|
314
|
+
category: string;
|
|
315
|
+
mainImage: string;
|
|
316
316
|
preOrderDeliveryDate: string;
|
|
317
317
|
currency?: string | undefined;
|
|
318
|
-
features?: string[] | undefined;
|
|
319
|
-
description?: string | undefined;
|
|
320
318
|
brandSlug?: string | undefined;
|
|
321
319
|
stockQuantity?: number | undefined;
|
|
320
|
+
features?: string[] | undefined;
|
|
321
|
+
description?: string | undefined;
|
|
322
322
|
availableQuantity?: number | undefined;
|
|
323
323
|
images?: string[] | undefined;
|
|
324
324
|
tags?: string[] | undefined;
|
|
@@ -75,7 +75,7 @@ export declare const createCouponSchema: z.ZodObject<{
|
|
|
75
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
76
|
code: string;
|
|
77
77
|
type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
|
|
78
|
-
scope: "
|
|
78
|
+
scope: "admin" | "seller";
|
|
79
79
|
name: string;
|
|
80
80
|
discount: {
|
|
81
81
|
value: number;
|
|
@@ -99,7 +99,7 @@ export declare const createCouponSchema: z.ZodObject<{
|
|
|
99
99
|
}, {
|
|
100
100
|
code: string;
|
|
101
101
|
type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
|
|
102
|
-
scope: "
|
|
102
|
+
scope: "admin" | "seller";
|
|
103
103
|
name: string;
|
|
104
104
|
discount: {
|
|
105
105
|
value: number;
|
|
@@ -177,7 +177,7 @@ export declare const updateCouponSchema: z.ZodObject<Omit<{
|
|
|
177
177
|
}>>>;
|
|
178
178
|
}, "code">, "strip", z.ZodTypeAny, {
|
|
179
179
|
type?: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y" | undefined;
|
|
180
|
-
scope?: "
|
|
180
|
+
scope?: "admin" | "seller" | undefined;
|
|
181
181
|
name?: string | undefined;
|
|
182
182
|
discount?: {
|
|
183
183
|
value: number;
|
|
@@ -200,7 +200,7 @@ export declare const updateCouponSchema: z.ZodObject<Omit<{
|
|
|
200
200
|
} | undefined;
|
|
201
201
|
}, {
|
|
202
202
|
type?: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y" | undefined;
|
|
203
|
-
scope?: "
|
|
203
|
+
scope?: "admin" | "seller" | undefined;
|
|
204
204
|
name?: string | undefined;
|
|
205
205
|
discount?: {
|
|
206
206
|
value: number;
|
|
@@ -11,16 +11,16 @@ export declare const createReviewSchema: z.ZodObject<{
|
|
|
11
11
|
title: string;
|
|
12
12
|
body: string;
|
|
13
13
|
storeId: string;
|
|
14
|
+
rating: number;
|
|
14
15
|
images: string[];
|
|
15
16
|
productId: string;
|
|
16
|
-
rating: number;
|
|
17
17
|
orderId?: string | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
title: string;
|
|
20
20
|
body: string;
|
|
21
21
|
storeId: string;
|
|
22
|
-
productId: string;
|
|
23
22
|
rating: number;
|
|
23
|
+
productId: string;
|
|
24
24
|
orderId?: string | undefined;
|
|
25
25
|
images?: string[] | undefined;
|
|
26
26
|
}>;
|
|
@@ -91,7 +91,36 @@ export interface TableColumn<T = unknown> {
|
|
|
91
91
|
width?: string;
|
|
92
92
|
/** Hide this column from the rendered table (keeps it in the array for export) */
|
|
93
93
|
hidden?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Lowest breakpoint at which this column is rendered. Default `"lg"`.
|
|
96
|
+
*
|
|
97
|
+
* The DataTable turns this into `hidden md:table-cell` / `lg:` / `xl:`
|
|
98
|
+
* INSIDE the primitive, so consumer code never authors a breakpoint prefix
|
|
99
|
+
* (and `audit-variant-prop-coverage` stays green).
|
|
100
|
+
*
|
|
101
|
+
* Set from the field dictionary, not by taste:
|
|
102
|
+
* `always` — the thumbnail, the one identifying label, row actions
|
|
103
|
+
* `md` — one state and one number: status, price/total, type badge
|
|
104
|
+
* `lg` — relational context: category, store, quantity, rating
|
|
105
|
+
* `xl` — audit metadata: createdAt/updatedAt, id/slug, view counts
|
|
106
|
+
*
|
|
107
|
+
* A 7-column table with none of these set renders all 7 at 320px, which is
|
|
108
|
+
* what every table in this codebase did before this field existed.
|
|
109
|
+
*/
|
|
110
|
+
priority?: ColumnPriority;
|
|
94
111
|
}
|
|
112
|
+
/** @see TableColumn.priority */
|
|
113
|
+
export type ColumnPriority = "always" | "md" | "lg" | "xl";
|
|
114
|
+
/**
|
|
115
|
+
* Tailwind classes per priority. `always` emits nothing — an unprefixed
|
|
116
|
+
* column is visible at every width.
|
|
117
|
+
*
|
|
118
|
+
* Written out in full rather than interpolated: Tailwind's scanner only sees
|
|
119
|
+
* literal class strings, so `hidden ${bp}:table-cell` would be purged.
|
|
120
|
+
*/
|
|
121
|
+
export declare const COLUMN_PRIORITY_CLASS: Record<ColumnPriority, string>;
|
|
122
|
+
/** The same, for a non-table (card/list) cell where `table-cell` is wrong. */
|
|
123
|
+
export declare const COLUMN_PRIORITY_CLASS_BLOCK: Record<ColumnPriority, string>;
|
|
95
124
|
/**
|
|
96
125
|
* Options accepted by every feature's `buildXxxColumns<T>()` factory.
|
|
97
126
|
* Allows apps to override individual column renderers and/or append extras.
|
package/dist/contracts/extend.js
CHANGED
|
@@ -37,6 +37,26 @@
|
|
|
37
37
|
* <ProductGrid products={products} {...productExt.slots} />
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
+
/**
|
|
41
|
+
* Tailwind classes per priority. `always` emits nothing — an unprefixed
|
|
42
|
+
* column is visible at every width.
|
|
43
|
+
*
|
|
44
|
+
* Written out in full rather than interpolated: Tailwind's scanner only sees
|
|
45
|
+
* literal class strings, so `hidden ${bp}:table-cell` would be purged.
|
|
46
|
+
*/
|
|
47
|
+
export const COLUMN_PRIORITY_CLASS = {
|
|
48
|
+
always: "",
|
|
49
|
+
md: "hidden md:table-cell",
|
|
50
|
+
lg: "hidden lg:table-cell",
|
|
51
|
+
xl: "hidden xl:table-cell",
|
|
52
|
+
};
|
|
53
|
+
/** The same, for a non-table (card/list) cell where `table-cell` is wrong. */
|
|
54
|
+
export const COLUMN_PRIORITY_CLASS_BLOCK = {
|
|
55
|
+
always: "",
|
|
56
|
+
md: "hidden md:block",
|
|
57
|
+
lg: "hidden lg:block",
|
|
58
|
+
xl: "hidden xl:block",
|
|
59
|
+
};
|
|
40
60
|
/**
|
|
41
61
|
* Merges an array of extra filter/sort definitions with a base set,
|
|
42
62
|
* respecting `position` ordering. Used internally by listing views.
|
|
@@ -17,7 +17,8 @@ export type { ExtraFormField, ExtraFieldRenderArgs } from "./form";
|
|
|
17
17
|
export { registerFormFields, resolveFormFields, removeFormFields, _resetFormFields, } from "./form";
|
|
18
18
|
export type { RouteStub, ApiRouteStub, FeatureManifest, FeaturesConfig, } from "./feature";
|
|
19
19
|
export type { SiteConfig, NavItem } from "./config";
|
|
20
|
-
export type { WithTransformOpts, GenericListResponse, TableColumn, ColumnExtensionOpts, LayoutSlots, FeatureExtension, } from "./extend";
|
|
20
|
+
export type { WithTransformOpts, GenericListResponse, TableColumn, ColumnPriority, ColumnExtensionOpts, LayoutSlots, FeatureExtension, } from "./extend";
|
|
21
|
+
export { COLUMN_PRIORITY_CLASS, COLUMN_PRIORITY_CLASS_BLOCK } from "./extend";
|
|
21
22
|
export type { PaginationConfig, StickyConfig, TableConfig, TableViewMode, } from "./table";
|
|
22
23
|
export { DEFAULT_PAGINATION_CONFIG, DEFAULT_STICKY_CONFIG, DEFAULT_TABLE_CONFIG, mergeTableConfig, } from "./table";
|
|
23
24
|
export type { IFieldOps, FieldSentinel } from "./field-ops";
|
package/dist/contracts/index.js
CHANGED
|
@@ -10,6 +10,8 @@ export { IShippingProvider } from "./shipping";
|
|
|
10
10
|
export { registerProviders, getProviders, _resetProviders } from "./registry";
|
|
11
11
|
export { setCollectionHooks, getCollectionHooks, removeCollectionHooks, _resetCollectionHooks, } from "./repository";
|
|
12
12
|
export { registerFormFields, resolveFormFields, removeFormFields, _resetFormFields, } from "./form";
|
|
13
|
+
// Value exports (the priority→class maps are runtime lookups, not types).
|
|
14
|
+
export { COLUMN_PRIORITY_CLASS, COLUMN_PRIORITY_CLASS_BLOCK } from "./extend";
|
|
13
15
|
export { DEFAULT_PAGINATION_CONFIG, DEFAULT_STICKY_CONFIG, DEFAULT_TABLE_CONFIG, mergeTableConfig, } from "./table";
|
|
14
16
|
export { registerFieldOps, serverTimestamp, increment, arrayUnion, arrayRemove, deleteField, } from "./field-ops";
|
|
15
17
|
export { registerClientRealtimeProvider, getClientRealtimeProvider, } from "./client-realtime";
|