droplinked-editor-configs 1.8.4 → 1.8.6
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/apis/blogs/interfaces.d.ts +0 -38
- package/dist/apis/blogs/services.d.ts +1 -6
- package/dist/apis/product/interface.d.ts +12 -100
- package/dist/apis/product/services.d.ts +1 -6
- package/dist/apis/shop/interface.d.ts +0 -3
- package/dist/apis/shop/service.d.ts +1 -2
- package/dist/droplinked-editor.es.js +16 -16
- package/dist/droplinked-editor.umd.js +4 -4
- package/dist/lib/stores/productQueryStore/productQueryStore.d.ts +2 -2
- package/package.json +2 -2
- package/src/apis/blogs/interfaces.ts +0 -39
- package/src/apis/blogs/services.ts +2 -5
- package/src/apis/product/interface.ts +14 -291
- package/src/apis/product/services.ts +2 -33
- package/src/apis/shop/interface.ts +0 -4
- package/src/apis/shop/service.ts +3 -7
- package/src/components/productGrid/components/ControlBar/sort/SortDropdown.tsx +1 -1
- package/src/components/productGrid/components/ControlBar/sort/SortOptionButton.tsx +1 -1
- package/src/components/productGrid/components/FilterPanel/TypeFilter.tsx +2 -2
- package/src/components/productGrid/components/ProductGrid/GridViewProductCard.tsx +2 -2
- package/src/components/productGrid/components/ProductGrid/ListViewProductCard.tsx +4 -4
- package/src/components/productGrid/components/ProductGrid/ProductGrid.tsx +2 -2
- package/src/components/productGrid/components/ProductGrid/Slider/ProductImageSlider.tsx +4 -4
- package/src/components/productGrid/hooks/useSortHandler.ts +2 -2
- package/src/lib/stores/productQueryStore/productQueryStore.ts +4 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/models/product.d.ts +0 -97
- package/src/lib/models/product.ts +0 -104
|
@@ -9,44 +9,6 @@ export interface BlogPost {
|
|
|
9
9
|
tags: string[];
|
|
10
10
|
slug: string;
|
|
11
11
|
}
|
|
12
|
-
export interface IBlogContent {
|
|
13
|
-
_id: string;
|
|
14
|
-
shopID: string;
|
|
15
|
-
author: string;
|
|
16
|
-
content: string;
|
|
17
|
-
title: string;
|
|
18
|
-
writer: string;
|
|
19
|
-
isVisible: boolean;
|
|
20
|
-
category: string[];
|
|
21
|
-
tags: string[];
|
|
22
|
-
commentsCount: number;
|
|
23
|
-
image: string;
|
|
24
|
-
likes: number;
|
|
25
|
-
readTime: number;
|
|
26
|
-
version: number;
|
|
27
|
-
isFeatured: boolean;
|
|
28
|
-
seoData: {
|
|
29
|
-
metaDescription: string;
|
|
30
|
-
keywords: string[];
|
|
31
|
-
slug: string;
|
|
32
|
-
canonicalUrl: string;
|
|
33
|
-
ogTitle: string;
|
|
34
|
-
ogDescription: string;
|
|
35
|
-
ogImage: string;
|
|
36
|
-
structuredData: string;
|
|
37
|
-
_id: string;
|
|
38
|
-
};
|
|
39
|
-
mediaData: {
|
|
40
|
-
url: string;
|
|
41
|
-
title: string;
|
|
42
|
-
positionIndex: number;
|
|
43
|
-
_id: string;
|
|
44
|
-
}[];
|
|
45
|
-
publishedDate: string;
|
|
46
|
-
createdAt: string;
|
|
47
|
-
updatedAt: Date;
|
|
48
|
-
__v: number;
|
|
49
|
-
}
|
|
50
12
|
export interface Blog {
|
|
51
13
|
featured: BlogPost[];
|
|
52
14
|
recent: BlogPost[];
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { Blog
|
|
1
|
+
import { Blog } from './interfaces';
|
|
2
2
|
|
|
3
3
|
export declare const getShopBlogsService: (shopName: string) => Promise<{
|
|
4
4
|
data: Blog;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const getBlogByIdService: ({ slug }: {
|
|
7
|
-
slug: string;
|
|
8
|
-
}) => Promise<{
|
|
9
|
-
data: IBlogContent;
|
|
10
|
-
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IRuleSetID, IMedia as Media } from 'lib/models/product';
|
|
2
1
|
import { ProductQuery } from 'lib/stores/productQueryStore/productQueryStore';
|
|
3
2
|
|
|
4
3
|
export interface IGetProductsRequest extends ProductQuery {
|
|
@@ -7,107 +6,20 @@ export interface IGetProductsRequest extends ProductQuery {
|
|
|
7
6
|
limit: number;
|
|
8
7
|
}
|
|
9
8
|
export interface IHomePageProduct {
|
|
10
|
-
|
|
9
|
+
id: string;
|
|
11
10
|
title: string;
|
|
12
11
|
slug: string;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
type: string;
|
|
13
|
+
status: string;
|
|
14
|
+
images: {
|
|
15
|
+
original: string;
|
|
16
|
+
thumbnail: string;
|
|
17
|
+
alt: string;
|
|
15
18
|
}[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
isPurchasable: boolean;
|
|
20
|
+
lowestPrice: number;
|
|
21
|
+
collectionName: string;
|
|
19
22
|
discountRuleset: boolean;
|
|
23
|
+
gatedRuleset: boolean;
|
|
24
|
+
nftRecording: any;
|
|
20
25
|
}
|
|
21
|
-
export interface IgetProductPublicService {
|
|
22
|
-
shopname: string;
|
|
23
|
-
productID: string;
|
|
24
|
-
}
|
|
25
|
-
export interface IGetProductBySlugService {
|
|
26
|
-
shopname: string;
|
|
27
|
-
slug: string;
|
|
28
|
-
}
|
|
29
|
-
export interface IGetProductByLinkId {
|
|
30
|
-
linkId: string;
|
|
31
|
-
}
|
|
32
|
-
interface IMedia {
|
|
33
|
-
isMain: boolean;
|
|
34
|
-
thumbnail: string;
|
|
35
|
-
url: string;
|
|
36
|
-
_id: string;
|
|
37
|
-
}
|
|
38
|
-
interface IProductCollection {
|
|
39
|
-
title: string;
|
|
40
|
-
ruleSetID?: IRuleSetID;
|
|
41
|
-
}
|
|
42
|
-
interface IRuleSet {
|
|
43
|
-
gated?: boolean;
|
|
44
|
-
redeemedNFTs?: any;
|
|
45
|
-
rules?: any;
|
|
46
|
-
}
|
|
47
|
-
export interface IOption {
|
|
48
|
-
variantName: string;
|
|
49
|
-
value: string;
|
|
50
|
-
caption: string;
|
|
51
|
-
}
|
|
52
|
-
export interface ISku {
|
|
53
|
-
_id: string;
|
|
54
|
-
price: number;
|
|
55
|
-
quantity: number;
|
|
56
|
-
image?: string;
|
|
57
|
-
weight: number;
|
|
58
|
-
dimensions: {
|
|
59
|
-
height: number;
|
|
60
|
-
length: number;
|
|
61
|
-
width: number;
|
|
62
|
-
};
|
|
63
|
-
options?: IOption[];
|
|
64
|
-
}
|
|
65
|
-
export interface IProduct {
|
|
66
|
-
description: string;
|
|
67
|
-
media: IMedia[];
|
|
68
|
-
productCollectionID: IProductCollection;
|
|
69
|
-
ruleSet?: IRuleSet;
|
|
70
|
-
slug: string | null;
|
|
71
|
-
title: string;
|
|
72
|
-
_id: string | null;
|
|
73
|
-
ownerID: string | null;
|
|
74
|
-
product_type: "NORMAL" | "PRINT_ON_DEMAND" | "DIGITAL";
|
|
75
|
-
skuIDs: ISku[];
|
|
76
|
-
launchDate?: string;
|
|
77
|
-
purchaseAvailable: boolean;
|
|
78
|
-
pod_blank_product_id: string;
|
|
79
|
-
nftData?: INftData;
|
|
80
|
-
m2m_positions: IM2MPosition[];
|
|
81
|
-
m2m_services: IM2MService[];
|
|
82
|
-
shippingType: string;
|
|
83
|
-
}
|
|
84
|
-
export interface IM2MPosition {
|
|
85
|
-
placement: string;
|
|
86
|
-
variantIDs: number[];
|
|
87
|
-
url: string;
|
|
88
|
-
}
|
|
89
|
-
export interface IM2MService {
|
|
90
|
-
_id: string;
|
|
91
|
-
name: string;
|
|
92
|
-
chain: string;
|
|
93
|
-
}
|
|
94
|
-
export interface INftData {
|
|
95
|
-
deployHash: string;
|
|
96
|
-
transactionUrl: string;
|
|
97
|
-
networkName: string;
|
|
98
|
-
}
|
|
99
|
-
export interface IShippingAvailbilityData {
|
|
100
|
-
statusCode: number;
|
|
101
|
-
message: string | null;
|
|
102
|
-
data: string[];
|
|
103
|
-
}
|
|
104
|
-
export declare const convertProductDataToModel: (data: any) => IProduct;
|
|
105
|
-
export interface ISemanticSearchParams {
|
|
106
|
-
query: string;
|
|
107
|
-
limit?: number;
|
|
108
|
-
}
|
|
109
|
-
export interface NftImagesData {
|
|
110
|
-
nfts: string[];
|
|
111
|
-
domains: string[];
|
|
112
|
-
}
|
|
113
|
-
export {};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IGetProductsRequest } from './interface';
|
|
2
2
|
|
|
3
3
|
export declare const getProductsService: (params: IGetProductsRequest) => Promise<any>;
|
|
4
|
-
export declare const getProductPublicService: ({ productID, shopname }: IgetProductPublicService) => Promise<IProduct>;
|
|
5
|
-
export declare const getProductBySlugService: ({ slug, shopname }: IGetProductBySlugService) => Promise<import('axios').AxiosResponse<any, any>>;
|
|
6
|
-
export declare const getProductByLinkId: ({ linkId }: IGetProductByLinkId) => Promise<import('axios').AxiosResponse<any, any>>;
|
|
7
|
-
export declare const getShippingAvailability: (productId: string) => Promise<IShippingAvailbilityData>;
|
|
8
|
-
export declare const semanticSearchService: ({ query, limit }: ISemanticSearchParams) => Promise<import('axios').AxiosResponse<any, any>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IgetShopService,
|
|
1
|
+
import { IgetShopService, ProductFiltersResponse } from './interface';
|
|
2
2
|
|
|
3
|
-
export declare const shopDomainService: ({ domain }: IshopDomainService) => Promise<import('axios').AxiosResponse<any, any>>;
|
|
4
3
|
export declare const getShopService: ({ shopName }: IgetShopService) => Promise<import('axios').AxiosResponse<any, any>>;
|
|
5
4
|
export declare const getAvailableProductFilters: (shopName: string) => Promise<{
|
|
6
5
|
data: ProductFiltersResponse;
|
|
@@ -57944,7 +57944,7 @@ var Aq = uF({
|
|
|
57944
57944
|
dev: "https://apiv3dev.droplinked.com"
|
|
57945
57945
|
}, Sje = () => yj[kje] || yj.dev, _je = nr.create({
|
|
57946
57946
|
baseURL: Sje()
|
|
57947
|
-
}), Eje = _je, Pje = (e) => Eje.get("
|
|
57947
|
+
}), Eje = _je, Pje = (e) => Eje.get("shops/v2/templates", {
|
|
57948
57948
|
headers: {
|
|
57949
57949
|
Authorization: `Bearer ${e}`
|
|
57950
57950
|
}
|
|
@@ -64011,8 +64011,8 @@ const iI = (e) => {
|
|
|
64011
64011
|
return Object.assign(r, t), r;
|
|
64012
64012
|
}, g6 = (e) => e ? iI(e) : iI, Km = {
|
|
64013
64013
|
search: "",
|
|
64014
|
-
|
|
64015
|
-
|
|
64014
|
+
sortBy: "",
|
|
64015
|
+
productTypes: [],
|
|
64016
64016
|
collectionId: []
|
|
64017
64017
|
}, qr = g6((e) => ({
|
|
64018
64018
|
stagedProductQuery: Km,
|
|
@@ -65333,11 +65333,11 @@ function MNe() {
|
|
|
65333
65333
|
] });
|
|
65334
65334
|
}
|
|
65335
65335
|
function ONe() {
|
|
65336
|
-
const { isLoading: e, data: t, updateFilter: r } = j7(), n = qr((i) => i.stagedProductQuery.
|
|
65336
|
+
const { isLoading: e, data: t, updateFilter: r } = j7(), n = qr((i) => i.stagedProductQuery.productTypes);
|
|
65337
65337
|
if (e) return /* @__PURE__ */ p.jsx(A7, {});
|
|
65338
65338
|
const o = (i, s) => {
|
|
65339
65339
|
const a = s ? [...n, i] : n.filter((l) => l !== i);
|
|
65340
|
-
r("
|
|
65340
|
+
r("productTypes", a);
|
|
65341
65341
|
};
|
|
65342
65342
|
return /* @__PURE__ */ p.jsx("div", { className: "space-y-4", children: t?.types.map((i, s) => /* @__PURE__ */ p.jsx(
|
|
65343
65343
|
BG,
|
|
@@ -65350,7 +65350,7 @@ function ONe() {
|
|
|
65350
65350
|
s
|
|
65351
65351
|
)) });
|
|
65352
65352
|
}
|
|
65353
|
-
const RNe = ({ shopName: e }) => G1.get(
|
|
65353
|
+
const RNe = ({ shopName: e }) => G1.get(`/shops/v2/public/name/${e}`), ANe = (e) => G1.get(`/product-v2/available/filters/${e}`).then((t) => t.data);
|
|
65354
65354
|
function jNe() {
|
|
65355
65355
|
const { states: { shop: e } } = Bn();
|
|
65356
65356
|
return gY({
|
|
@@ -66714,13 +66714,13 @@ function SVe() {
|
|
|
66714
66714
|
applyStagedFilters: n.applyStagedFilters
|
|
66715
66715
|
}));
|
|
66716
66716
|
function r(n, o) {
|
|
66717
|
-
n === "default" ? (e("
|
|
66717
|
+
n === "default" ? (e("sortBy", ""), e("order", void 0)) : (e("sortBy", n), e("order", o)), t();
|
|
66718
66718
|
}
|
|
66719
66719
|
return r;
|
|
66720
66720
|
}
|
|
66721
66721
|
function nQ({ option: e }) {
|
|
66722
66722
|
const { stagedSortOption: t, stagedSortOrder: r } = qr((c) => ({
|
|
66723
|
-
stagedSortOption: c.stagedProductQuery.
|
|
66723
|
+
stagedSortOption: c.stagedProductQuery.sortBy,
|
|
66724
66724
|
stagedSortOrder: c.stagedProductQuery.order
|
|
66725
66725
|
})), n = SVe(), { isDarkTheme: o } = st(), s = e.value === t && e.sortOrder === r || e.value === "default" && t === "" ? o ? "#222" : "#F2F2F2" : void 0, a = o ? "neutral-gray-900" : "neutral-gray-100", l = o ? "text-subtextPlaceholder-Dark" : "text-subtextPlaceholder-Light";
|
|
66726
66726
|
return /* @__PURE__ */ p.jsxs(
|
|
@@ -66738,7 +66738,7 @@ function nQ({ option: e }) {
|
|
|
66738
66738
|
}
|
|
66739
66739
|
function _Ve() {
|
|
66740
66740
|
const { isDarkTheme: e } = st(), { stagedSortOption: t, stagedSortOrder: r } = qr((o) => ({
|
|
66741
|
-
stagedSortOption: o.stagedProductQuery.
|
|
66741
|
+
stagedSortOption: o.stagedProductQuery.sortBy,
|
|
66742
66742
|
stagedSortOrder: o.stagedProductQuery.order
|
|
66743
66743
|
})), n = () => {
|
|
66744
66744
|
const o = k6.find(
|
|
@@ -67475,7 +67475,7 @@ function jVe({ imagesLength: e, isVisible: t, currentIndex: r, onDotClick: n })
|
|
|
67475
67475
|
);
|
|
67476
67476
|
}
|
|
67477
67477
|
function IVe({ product: e, isHovered: t, isEditing: r }) {
|
|
67478
|
-
const {
|
|
67478
|
+
const { images: n, title: o, slug: i } = e, { navigate: s } = dd(), [a, l] = de(0), c = n.slice(0, 3), [u, d] = AVe.useKeenSlider({
|
|
67479
67479
|
loop: !0,
|
|
67480
67480
|
slides: { perView: 1 },
|
|
67481
67481
|
mode: "snap",
|
|
@@ -67496,7 +67496,7 @@ function IVe({ product: e, isHovered: t, isEditing: r }) {
|
|
|
67496
67496
|
"img",
|
|
67497
67497
|
{
|
|
67498
67498
|
src: c[0]?.thumbnail,
|
|
67499
|
-
alt: o,
|
|
67499
|
+
alt: c[0]?.alt || o,
|
|
67500
67500
|
onClick: f,
|
|
67501
67501
|
className: "w-full h-full object-cover transition-transform duration-500 ease-in-out group-hover:scale-[1.04]"
|
|
67502
67502
|
}
|
|
@@ -67507,7 +67507,7 @@ function IVe({ product: e, isHovered: t, isEditing: r }) {
|
|
|
67507
67507
|
"img",
|
|
67508
67508
|
{
|
|
67509
67509
|
src: m.thumbnail,
|
|
67510
|
-
alt: `${o}-${v}`,
|
|
67510
|
+
alt: m.alt || `${o}-${v}`,
|
|
67511
67511
|
className: "w-full h-full object-cover transition-transform duration-500 ease-in-out group-hover:scale-[1.04]"
|
|
67512
67512
|
}
|
|
67513
67513
|
) }, v)) }),
|
|
@@ -67533,7 +67533,7 @@ function fI({ product: e }) {
|
|
|
67533
67533
|
] });
|
|
67534
67534
|
}
|
|
67535
67535
|
function LVe({ product: e, isEditing: t }) {
|
|
67536
|
-
const { title: r,
|
|
67536
|
+
const { title: r, lowestPrice: n, id: o, slug: i } = e, [s, a] = de(!1);
|
|
67537
67537
|
return /* @__PURE__ */ p.jsxs(
|
|
67538
67538
|
"div",
|
|
67539
67539
|
{
|
|
@@ -67557,7 +67557,7 @@ function $Ve() {
|
|
|
67557
67557
|
] }, n)) });
|
|
67558
67558
|
}
|
|
67559
67559
|
function FVe({ product: e }) {
|
|
67560
|
-
const {
|
|
67560
|
+
const { images: t, title: r, lowestPrice: n, discountRuleset: o, gatedRuleset: i, slug: s, id: a } = e, { isDarkTheme: l } = st(), c = l ? "[&_path]:stroke-white" : "", { navigate: u } = dd(), d = (t.find((f) => f.original) ?? t[0])?.thumbnail || t[0]?.original;
|
|
67561
67561
|
return /* @__PURE__ */ p.jsx("div", { className: "cursor-pointer", onClick: () => u(`product/${s ?? a}`), children: /* @__PURE__ */ p.jsx(
|
|
67562
67562
|
aQ,
|
|
67563
67563
|
{
|
|
@@ -67636,7 +67636,7 @@ const VVe = (e) => {
|
|
|
67636
67636
|
numberFormat: "string",
|
|
67637
67637
|
emptyValues: !1
|
|
67638
67638
|
}).toString();
|
|
67639
|
-
return G1.get(
|
|
67639
|
+
return G1.get(`/product-v2/public/shop/${e.shopName}?${t}`).then((r) => r.data);
|
|
67640
67640
|
};
|
|
67641
67641
|
function zVe(e) {
|
|
67642
67642
|
const { states: { shop: { name: t, currency: { conversionRateToUSD: r } } } } = Bn(), n = qr((c) => c.appliedProductQuery), { minPrice: o, maxPrice: i } = n, s = o ? o / r : void 0, a = i ? i / r : void 0, l = e ? Math.min(e, 4) : 15;
|
|
@@ -67658,7 +67658,7 @@ function cQ({ limit: e, isEditing: t }) {
|
|
|
67658
67658
|
const { isLoading: r, data: n, hasNextPage: o, fetchNextPage: i, isFetchingNextPage: s } = zVe(e), a = n?.pages.flatMap((d) => d?.data?.data || []) || [], l = qr((d) => d.viewMode), c = lQ(), u = () => l === "list" ? /* @__PURE__ */ p.jsx(NVe, {}) : /* @__PURE__ */ p.jsx($Ve, {});
|
|
67659
67659
|
return r ? /* @__PURE__ */ p.jsx(S3, { children: u() }) : a.length === 0 ? /* @__PURE__ */ p.jsx(S3, { children: /* @__PURE__ */ p.jsx(gt, { as: "p", className: "col-span-full text-center", children: "No products available. Please try again later." }) }) : /* @__PURE__ */ p.jsxs("div", { children: [
|
|
67660
67660
|
/* @__PURE__ */ p.jsxs(S3, { children: [
|
|
67661
|
-
a.map((d) => c && l === "list" ? /* @__PURE__ */ p.jsx(FVe, { product: d }, d.
|
|
67661
|
+
a.map((d) => c && l === "list" ? /* @__PURE__ */ p.jsx(FVe, { product: d }, d.id) : /* @__PURE__ */ p.jsx(LVe, { product: d, isEditing: t }, d.id)),
|
|
67662
67662
|
s && u()
|
|
67663
67663
|
] }),
|
|
67664
67664
|
o && !e && /* @__PURE__ */ p.jsx("div", { className: "flex justify-center mt-14 lg:mt-20", children: /* @__PURE__ */ p.jsx(bl, { variant: "secondary", onClick: () => i(), children: "Show More" }) })
|