@mohasinac/appkit 2.7.11 → 2.7.12
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/server/jobs/core/assignSpinPrize.js +8 -7
- package/dist/_internal/server/jobs/core/bundleStockSync.js +11 -6
- package/dist/_internal/server/jobs/core/countersReconcile.js +3 -2
- package/dist/_internal/server/jobs/core/onProductStockChange.js +12 -7
- package/dist/_internal/server/jobs/core/onProductWrite.js +3 -2
- package/dist/_internal/server/jobs/core/prizeRevealClose.js +7 -5
- package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +11 -6
- package/dist/_internal/server/jobs/core/prizeRevealOpen.js +13 -7
- package/dist/_internal/server/jobs/core/prizeRevealReminder.js +9 -4
- package/dist/_internal/server/jobs/core/triggerEventRaffle.js +3 -2
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
- package/dist/_internal/shared/features/events/schema.d.ts +4 -4
- package/dist/_internal/shared/features/products/schema.d.ts +20 -20
- package/dist/_internal/shared/features/promotions/schema.d.ts +2 -2
- package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
- package/dist/constants/field-names.d.ts +813 -0
- package/dist/constants/field-names.js +918 -0
- package/dist/constants/sort.d.ts +7 -0
- package/dist/constants/sort.js +5 -0
- package/dist/constants/table-keys.d.ts +48 -0
- package/dist/constants/table-keys.js +46 -0
- package/dist/features/account/components/AddressesIndexListing.js +9 -6
- package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -1
- package/dist/features/admin/components/AdminBidsView.js +4 -1
- package/dist/features/admin/components/AdminBlogView.js +9 -2
- package/dist/features/admin/components/AdminBrandsView.js +9 -2
- package/dist/features/admin/components/AdminCarouselView.js +4 -1
- package/dist/features/admin/components/AdminCartsView.js +4 -1
- package/dist/features/admin/components/AdminCategoriesView.js +9 -2
- package/dist/features/admin/components/AdminContactView.js +4 -1
- package/dist/features/admin/components/AdminCouponsView.js +4 -1
- package/dist/features/admin/components/AdminFaqsView.js +5 -1
- package/dist/features/admin/components/AdminFeaturesView.js +5 -2
- package/dist/features/admin/components/AdminHistoryView.js +5 -1
- package/dist/features/admin/components/AdminNewsletterView.js +4 -1
- package/dist/features/admin/components/AdminNotificationsView.js +4 -1
- package/dist/features/admin/components/AdminOrdersView.js +14 -12
- package/dist/features/admin/components/AdminPayoutsView.js +4 -1
- package/dist/features/admin/components/AdminPrizeDrawsView.js +4 -1
- package/dist/features/admin/components/AdminProductsView.js +14 -3
- package/dist/features/admin/components/AdminReturnRequestsView.js +4 -1
- package/dist/features/admin/components/AdminReviewsView.js +4 -1
- package/dist/features/admin/components/AdminScammersView.js +4 -1
- package/dist/features/admin/components/AdminSessionsView.js +4 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +5 -1
- package/dist/features/admin/components/AdminStoresView.js +10 -3
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +4 -1
- package/dist/features/admin/components/AdminSupportTicketsView.js +4 -1
- package/dist/features/admin/components/AdminTeamView.js +4 -1
- package/dist/features/admin/components/AdminUsersView.js +9 -12
- package/dist/features/admin/components/AdminViewCards.d.ts +12 -0
- package/dist/features/admin/components/AdminViewCards.js +53 -0
- package/dist/features/admin/components/AdminWishlistsView.js +4 -1
- package/dist/features/auctions/repository/bid.repository.js +1 -6
- package/dist/features/auctions/schemas/index.d.ts +4 -4
- package/dist/features/blog/actions/blog-actions.d.ts +16 -16
- package/dist/features/blog/components/BlogFilters.d.ts +28 -28
- package/dist/features/blog/components/BlogFilters.js +18 -15
- package/dist/features/blog/components/BlogIndexListing.js +20 -16
- package/dist/features/blog/schemas/index.d.ts +10 -10
- package/dist/features/categories/components/CategoriesIndexListing.js +25 -21
- package/dist/features/categories/schemas/index.d.ts +2 -2
- package/dist/features/events/components/AdminEventsView.js +5 -1
- package/dist/features/events/components/EventFilters.d.ts +24 -24
- package/dist/features/events/components/EventFilters.js +16 -13
- package/dist/features/events/components/EventStatusBadge.js +1 -0
- package/dist/features/events/components/EventsIndexListing.js +31 -26
- package/dist/features/events/components/EventsListPageView.js +13 -10
- package/dist/features/events/schemas/firestore.d.ts +1 -0
- package/dist/features/events/schemas/firestore.js +1 -0
- package/dist/features/events/schemas/index.d.ts +1 -1
- package/dist/features/events/types/index.d.ts +1 -1
- package/dist/features/faq/actions/faq-actions.d.ts +10 -10
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/orders/components/OrderFilters.d.ts +20 -20
- package/dist/features/orders/components/OrderFilters.js +33 -30
- package/dist/features/orders/repository/orders.repository.js +1 -15
- package/dist/features/orders/schemas/index.d.ts +2 -2
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +35 -31
- package/dist/features/pre-orders/schemas/index.d.ts +3 -3
- package/dist/features/products/components/AuctionsIndexListing.js +34 -30
- package/dist/features/products/components/BidHistory.d.ts +0 -1
- package/dist/features/products/components/BidHistory.js +1 -1
- package/dist/features/products/components/PrizeDrawsIndexListing.js +44 -40
- package/dist/features/products/components/ProductDetailPageView.js +1 -1
- package/dist/features/products/components/ProductFilters.d.ts +20 -20
- package/dist/features/products/components/ProductFilters.js +62 -59
- package/dist/features/products/components/ProductsIndexListing.js +28 -24
- package/dist/features/products/components/ProductsIndexPageView.js +18 -10
- package/dist/features/products/hooks/useProducts.js +2 -0
- package/dist/features/products/repository/products.repository.js +2 -22
- package/dist/features/products/schemas/index.d.ts +28 -28
- package/dist/features/products/schemas/product-features.validators.d.ts +12 -12
- package/dist/features/products/types/index.d.ts +2 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +21 -17
- package/dist/features/promotions/schemas/index.d.ts +4 -4
- package/dist/features/reviews/components/ReviewDetailShell.js +6 -5
- package/dist/features/reviews/components/ReviewFilters.d.ts +16 -16
- package/dist/features/reviews/components/ReviewFilters.js +10 -7
- package/dist/features/reviews/components/ReviewsIndexListing.js +21 -17
- package/dist/features/reviews/components/ReviewsList.d.ts +5 -2
- package/dist/features/reviews/components/ReviewsList.js +11 -5
- package/dist/features/reviews/schemas/firestore.d.ts +1 -0
- package/dist/features/reviews/schemas/index.d.ts +8 -8
- package/dist/features/reviews/types/index.d.ts +1 -0
- package/dist/features/search/schemas/index.d.ts +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +5 -1
- package/dist/features/seller/components/SellerBidsView.js +4 -1
- package/dist/features/seller/components/SellerCouponsView.js +4 -1
- package/dist/features/seller/components/SellerOffersView.js +5 -1
- package/dist/features/seller/components/SellerOrdersView.js +4 -1
- package/dist/features/seller/components/SellerPayoutsView.js +5 -1
- package/dist/features/seller/components/SellerPreOrdersView.js +4 -1
- package/dist/features/seller/components/SellerPrizeDrawsView.js +4 -1
- package/dist/features/seller/components/SellerProductsView.js +4 -1
- package/dist/features/seller/schemas/index.d.ts +10 -10
- package/dist/features/stores/api/route.js +10 -1
- package/dist/features/stores/components/StoreReviewsListing.js +1 -1
- package/dist/features/stores/components/StoresIndexListing.js +24 -20
- package/dist/features/stores/schemas/firestore.d.ts +1 -0
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/index.d.ts +8 -1
- package/dist/index.js +12 -1
- package/dist/react/hooks/useUrlTable.js +2 -1
- package/dist/seed/bids-seed-data.js +45 -44
- package/dist/seed/categories-seed-data.js +41 -40
- package/dist/seed/coupons-seed-data.js +41 -40
- package/dist/seed/products-auctions-seed-data.js +54 -53
- package/dist/seed/products-preorders-seed-data.js +25 -24
- package/dist/seed/products-prize-draws-seed-data.js +24 -23
- package/dist/seed/products-standard-seed-data.js +294 -293
- package/dist/seed/reviews-seed-data.js +61 -60
- package/dist/seed/scammers-seed-data.js +3 -2
- package/dist/seed/stores-seed-data.js +9 -8
- package/dist/seed/support-tickets-seed-data.js +13 -12
- package/dist/seed/users-seed-data.js +28 -27
- package/dist/tailwind-utilities.css +1 -1
- package/dist/utils/sieve-builder.d.ts +41 -0
- package/dist/utils/sieve-builder.js +66 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const SIEVE_OP: {
|
|
2
|
+
readonly EQ: "==";
|
|
3
|
+
readonly NEQ: "!=";
|
|
4
|
+
readonly GT: ">";
|
|
5
|
+
readonly LT: "<";
|
|
6
|
+
readonly GTE: ">=";
|
|
7
|
+
readonly LTE: "<=";
|
|
8
|
+
readonly CONTAINS: "@=";
|
|
9
|
+
readonly STARTS: "_=";
|
|
10
|
+
readonly ENDS: "_-=";
|
|
11
|
+
readonly NOT_CONTAINS: "!@=";
|
|
12
|
+
readonly NOT_STARTS: "!_=";
|
|
13
|
+
readonly NOT_ENDS: "!_-=";
|
|
14
|
+
readonly CONTAINS_CI: "@=*";
|
|
15
|
+
readonly STARTS_CI: "_=*";
|
|
16
|
+
readonly ENDS_CI: "_-=*";
|
|
17
|
+
readonly EQ_CI: "==*";
|
|
18
|
+
readonly NEQ_CI: "!=*";
|
|
19
|
+
};
|
|
20
|
+
export type SieveOp = (typeof SIEVE_OP)[keyof typeof SIEVE_OP];
|
|
21
|
+
/** Operators for which the pipe `|` is valid for OR-matching within a single clause */
|
|
22
|
+
export declare const SIEVE_PIPE_OPS: Set<SieveOp>;
|
|
23
|
+
/** Single Sieve clause: sieveFilter("status", "==", "published") → "status==published" */
|
|
24
|
+
export declare function sieveFilter(field: string, op: SieveOp, value: string | number | boolean): string;
|
|
25
|
+
/**
|
|
26
|
+
* Multi-value equality filter as multiple AND clauses.
|
|
27
|
+
* sieveMultiEq("condition", ["new","used"]) → "condition==new,condition==used"
|
|
28
|
+
*
|
|
29
|
+
* For pipe-valid ops (CONTAINS / STARTS / ENDS and CI variants), pass the
|
|
30
|
+
* pipe-joined value directly to sieveFilter() instead of this helper.
|
|
31
|
+
*/
|
|
32
|
+
export declare function sieveMultiEq(field: string, values: (string | number | boolean)[]): string;
|
|
33
|
+
/**
|
|
34
|
+
* Expand a URL param that may contain "|"-separated values into the correct Sieve clause(s).
|
|
35
|
+
* - For equality ops: "new|used" → "condition==new,condition==used"
|
|
36
|
+
* - For pipe-valid ops: "foo|bar" → "title@=*foo|bar" (single clause, valid)
|
|
37
|
+
*/
|
|
38
|
+
export declare function expandSieveParam(field: string, value: string | null, op?: SieveOp): string;
|
|
39
|
+
/** Join Sieve clauses with comma (AND) — drops falsy values */
|
|
40
|
+
export declare function sieveAnd(...clauses: (string | null | undefined | false)[]): string;
|
|
41
|
+
export { sortBy } from "../constants/sort";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export const SIEVE_OP = {
|
|
2
|
+
EQ: "==",
|
|
3
|
+
NEQ: "!=",
|
|
4
|
+
GT: ">",
|
|
5
|
+
LT: "<",
|
|
6
|
+
GTE: ">=",
|
|
7
|
+
LTE: "<=",
|
|
8
|
+
CONTAINS: "@=",
|
|
9
|
+
STARTS: "_=",
|
|
10
|
+
ENDS: "_-=",
|
|
11
|
+
NOT_CONTAINS: "!@=",
|
|
12
|
+
NOT_STARTS: "!_=",
|
|
13
|
+
NOT_ENDS: "!_-=",
|
|
14
|
+
CONTAINS_CI: "@=*",
|
|
15
|
+
STARTS_CI: "_=*",
|
|
16
|
+
ENDS_CI: "_-=*",
|
|
17
|
+
EQ_CI: "==*",
|
|
18
|
+
NEQ_CI: "!=*",
|
|
19
|
+
};
|
|
20
|
+
/** Operators for which the pipe `|` is valid for OR-matching within a single clause */
|
|
21
|
+
export const SIEVE_PIPE_OPS = new Set([
|
|
22
|
+
SIEVE_OP.CONTAINS,
|
|
23
|
+
SIEVE_OP.STARTS,
|
|
24
|
+
SIEVE_OP.ENDS,
|
|
25
|
+
SIEVE_OP.CONTAINS_CI,
|
|
26
|
+
SIEVE_OP.STARTS_CI,
|
|
27
|
+
SIEVE_OP.ENDS_CI,
|
|
28
|
+
]);
|
|
29
|
+
/** Single Sieve clause: sieveFilter("status", "==", "published") → "status==published" */
|
|
30
|
+
export function sieveFilter(field, op, value) {
|
|
31
|
+
return `${field}${op}${value}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Multi-value equality filter as multiple AND clauses.
|
|
35
|
+
* sieveMultiEq("condition", ["new","used"]) → "condition==new,condition==used"
|
|
36
|
+
*
|
|
37
|
+
* For pipe-valid ops (CONTAINS / STARTS / ENDS and CI variants), pass the
|
|
38
|
+
* pipe-joined value directly to sieveFilter() instead of this helper.
|
|
39
|
+
*/
|
|
40
|
+
export function sieveMultiEq(field, values) {
|
|
41
|
+
return values.map((v) => sieveFilter(field, SIEVE_OP.EQ, v)).join(",");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Expand a URL param that may contain "|"-separated values into the correct Sieve clause(s).
|
|
45
|
+
* - For equality ops: "new|used" → "condition==new,condition==used"
|
|
46
|
+
* - For pipe-valid ops: "foo|bar" → "title@=*foo|bar" (single clause, valid)
|
|
47
|
+
*/
|
|
48
|
+
export function expandSieveParam(field, value, op = SIEVE_OP.EQ) {
|
|
49
|
+
if (!value)
|
|
50
|
+
return "";
|
|
51
|
+
const values = value.split("|").filter(Boolean);
|
|
52
|
+
if (values.length === 0)
|
|
53
|
+
return "";
|
|
54
|
+
if (SIEVE_PIPE_OPS.has(op)) {
|
|
55
|
+
return sieveFilter(field, op, value);
|
|
56
|
+
}
|
|
57
|
+
if (values.length === 1) {
|
|
58
|
+
return sieveFilter(field, op, values[0]);
|
|
59
|
+
}
|
|
60
|
+
return sieveMultiEq(field, values);
|
|
61
|
+
}
|
|
62
|
+
/** Join Sieve clauses with comma (AND) — drops falsy values */
|
|
63
|
+
export function sieveAnd(...clauses) {
|
|
64
|
+
return clauses.filter(Boolean).join(",");
|
|
65
|
+
}
|
|
66
|
+
export { sortBy } from "../constants/sort";
|