@fast-simon/shopify-hydrogen 1.0.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/README.md +180 -0
- package/dist/esnext/@types/Tab.d.ts +9 -0
- package/dist/esnext/@types/Tab.js +5 -0
- package/dist/esnext/@types/appServerProps.d.ts +12 -0
- package/dist/esnext/@types/appServerProps.js +1 -0
- package/dist/esnext/@types/articles.d.ts +12 -0
- package/dist/esnext/@types/articles.js +1 -0
- package/dist/esnext/@types/categories.d.ts +10 -0
- package/dist/esnext/@types/categories.js +1 -0
- package/dist/esnext/@types/currency.d.ts +1 -0
- package/dist/esnext/@types/currency.js +1 -0
- package/dist/esnext/@types/device.d.ts +1 -0
- package/dist/esnext/@types/device.js +1 -0
- package/dist/esnext/@types/editor.d.ts +416 -0
- package/dist/esnext/@types/editor.js +6 -0
- package/dist/esnext/@types/facets.d.ts +37 -0
- package/dist/esnext/@types/facets.js +16 -0
- package/dist/esnext/@types/ispOptions.d.ts +6 -0
- package/dist/esnext/@types/ispOptions.js +1 -0
- package/dist/esnext/@types/narrow.d.ts +7 -0
- package/dist/esnext/@types/narrow.js +1 -0
- package/dist/esnext/@types/product.d.ts +134 -0
- package/dist/esnext/@types/product.js +7 -0
- package/dist/esnext/@types/promoTile.d.ts +11 -0
- package/dist/esnext/@types/promoTile.js +1 -0
- package/dist/esnext/@types/results.d.ts +36 -0
- package/dist/esnext/@types/results.js +1 -0
- package/dist/esnext/@types/routing.d.ts +11 -0
- package/dist/esnext/@types/routing.js +1 -0
- package/dist/esnext/@types/siteSetup.d.ts +52 -0
- package/dist/esnext/@types/siteSetup.js +1 -0
- package/dist/esnext/@types/siteStatus.d.ts +5 -0
- package/dist/esnext/@types/siteStatus.js +1 -0
- package/dist/esnext/@types/sortBy.d.ts +12 -0
- package/dist/esnext/@types/sortBy.js +1 -0
- package/dist/esnext/@types/translations.d.ts +12 -0
- package/dist/esnext/@types/translations.js +6 -0
- package/dist/esnext/components/FastSimonApp.server.d.ts +8 -0
- package/dist/esnext/components/FastSimonApp.server.js +45 -0
- package/dist/esnext/components/FastSimonProvider.server.d.ts +10 -0
- package/dist/esnext/components/FastSimonProvider.server.js +9 -0
- package/dist/esnext/components/Filters/DesktopFilters/DesktopFilters.server.d.ts +7 -0
- package/dist/esnext/components/Filters/DesktopFilters/DesktopFilters.server.js +5 -0
- package/dist/esnext/components/Filters/FacetOption.client.d.ts +8 -0
- package/dist/esnext/components/Filters/FacetOption.client.js +39 -0
- package/dist/esnext/components/Filters/Filters.server.d.ts +11 -0
- package/dist/esnext/components/Filters/Filters.server.js +11 -0
- package/dist/esnext/components/Filters/FiltersList.server.d.ts +7 -0
- package/dist/esnext/components/Filters/FiltersList.server.js +11 -0
- package/dist/esnext/components/Filters/FiltersSkeleton.d.ts +2 -0
- package/dist/esnext/components/Filters/FiltersSkeleton.js +32 -0
- package/dist/esnext/components/Filters/MobileFilters/MobileFilters.client.d.ts +6 -0
- package/dist/esnext/components/Filters/MobileFilters/MobileFilters.client.js +20 -0
- package/dist/esnext/components/Filters/RemovableTags/RemovableTag.client.d.ts +7 -0
- package/dist/esnext/components/Filters/RemovableTags/RemovableTag.client.js +11 -0
- package/dist/esnext/components/Filters/RemovableTags/RemovableTags.client.d.ts +7 -0
- package/dist/esnext/components/Filters/RemovableTags/RemovableTags.client.js +51 -0
- package/dist/esnext/components/PageTitle/PageTitle.server.d.ts +6 -0
- package/dist/esnext/components/PageTitle/PageTitle.server.js +4 -0
- package/dist/esnext/components/Pagination/Pagination.client.d.ts +8 -0
- package/dist/esnext/components/Pagination/Pagination.client.js +43 -0
- package/dist/esnext/components/Pagination/utils.d.ts +1 -0
- package/dist/esnext/components/Pagination/utils.js +4 -0
- package/dist/esnext/components/ProductCard/ProductCard.d.ts +9 -0
- package/dist/esnext/components/ProductCard/ProductCard.js +31 -0
- package/dist/esnext/components/ProductCard/components/AddToCart/AddToCart.client.d.ts +9 -0
- package/dist/esnext/components/ProductCard/components/AddToCart/AddToCart.client.js +23 -0
- package/dist/esnext/components/ProductCard/components/Compare/Compare.d.ts +5 -0
- package/dist/esnext/components/ProductCard/components/Compare/Compare.js +6 -0
- package/dist/esnext/components/ProductCard/components/Info/ProductInfo.d.ts +8 -0
- package/dist/esnext/components/ProductCard/components/Info/ProductInfo.js +11 -0
- package/dist/esnext/components/ProductCard/components/Price/Price.d.ts +6 -0
- package/dist/esnext/components/ProductCard/components/Price/Price.js +6 -0
- package/dist/esnext/components/ProductCard/components/ProductImage/ProductImage.d.ts +7 -0
- package/dist/esnext/components/ProductCard/components/ProductImage/ProductImage.js +7 -0
- package/dist/esnext/components/ProductCard/components/Title/Title.d.ts +6 -0
- package/dist/esnext/components/ProductCard/components/Title/Title.js +4 -0
- package/dist/esnext/components/ProductGrid/ProductGrid.server.d.ts +9 -0
- package/dist/esnext/components/ProductGrid/ProductGrid.server.js +10 -0
- package/dist/esnext/components/ProductGrid/stylesUtil.d.ts +138 -0
- package/dist/esnext/components/ProductGrid/stylesUtil.js +122 -0
- package/dist/esnext/components/ResultsSummary/ResultsSummary.server.d.ts +6 -0
- package/dist/esnext/components/ResultsSummary/ResultsSummary.server.js +8 -0
- package/dist/esnext/components/SortBy/SortBy.client.d.ts +9 -0
- package/dist/esnext/components/SortBy/SortBy.client.js +8 -0
- package/dist/esnext/components/SortBy/components/DesktopSortBy.client.d.ts +7 -0
- package/dist/esnext/components/SortBy/components/DesktopSortBy.client.js +30 -0
- package/dist/esnext/components/SortBy/utils.d.ts +8 -0
- package/dist/esnext/components/SortBy/utils.js +28 -0
- package/dist/esnext/components/index.d.ts +2 -0
- package/dist/esnext/components/index.js +2 -0
- package/dist/esnext/context/setRoutingContext.d.ts +2 -0
- package/dist/esnext/context/setRoutingContext.js +14 -0
- package/dist/esnext/context/setSiteContext.d.ts +6 -0
- package/dist/esnext/context/setSiteContext.js +18 -0
- package/dist/esnext/hooks/ResizeDetect.client.d.ts +1 -0
- package/dist/esnext/hooks/ResizeDetect.client.js +6 -0
- package/dist/esnext/hooks/useClickOutside.d.ts +1 -0
- package/dist/esnext/hooks/useClickOutside.js +12 -0
- package/dist/esnext/hooks/useScreenSize.d.ts +1 -0
- package/dist/esnext/hooks/useScreenSize.js +19 -0
- package/dist/esnext/icons/DownArrowIcon.d.ts +8 -0
- package/dist/esnext/icons/DownArrowIcon.js +5 -0
- package/dist/esnext/icons/LeftArrowIcon.d.ts +7 -0
- package/dist/esnext/icons/LeftArrowIcon.js +5 -0
- package/dist/esnext/icons/RejectIcon.d.ts +7 -0
- package/dist/esnext/icons/RejectIcon.js +5 -0
- package/dist/esnext/icons/RightArrowIcon.d.ts +7 -0
- package/dist/esnext/icons/RightArrowIcon.js +5 -0
- package/dist/esnext/icons/Spinner.d.ts +10 -0
- package/dist/esnext/icons/Spinner.js +6 -0
- package/dist/esnext/index.d.ts +1 -0
- package/dist/esnext/index.js +1 -0
- package/dist/esnext/services/categories_navigation.d.ts +48 -0
- package/dist/esnext/services/categories_navigation.js +51 -0
- package/dist/esnext/services/search.d.ts +47 -0
- package/dist/esnext/services/search.js +51 -0
- package/dist/esnext/services/site_setup.d.ts +7 -0
- package/dist/esnext/services/site_setup.js +69 -0
- package/dist/esnext/styles/fast-simon.css +622 -0
- package/dist/esnext/utils/DynamicStyle.d.ts +6 -0
- package/dist/esnext/utils/DynamicStyle.js +5 -0
- package/dist/esnext/utils/defaults.d.ts +8 -0
- package/dist/esnext/utils/defaults.js +9 -0
- package/dist/esnext/utils/getDynamicStylesVar.d.ts +1 -0
- package/dist/esnext/utils/getDynamicStylesVar.js +5 -0
- package/dist/esnext/utils/getRoutingState.d.ts +9 -0
- package/dist/esnext/utils/getRoutingState.js +13 -0
- package/dist/esnext/utils/makeServingRequests.d.ts +6 -0
- package/dist/esnext/utils/makeServingRequests.js +32 -0
- package/dist/node/plugin/extendOptimizeDeps.d.ts +2 -0
- package/dist/node/plugin/extendOptimizeDeps.js +14 -0
- package/dist/node/plugin/index.d.ts +3 -0
- package/dist/node/plugin/index.js +13 -0
- package/dist/node/plugin/injectCSS.d.ts +2 -0
- package/dist/node/plugin/injectCSS.js +25 -0
- package/dist/node/plugin/suppressWarnings.d.ts +2 -0
- package/dist/node/plugin/suppressWarnings.js +21 -0
- package/package.json +34 -0
- package/plugin.js +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Fast Simon & Shopify Integration
|
|
2
|
+
Build Search and Discovery experience with Fast Simon, a Shopify Plus Certified Partner
|
|
3
|
+
|
|
4
|
+
[Getting started guide]('https://instantsearchplus.zendesk.com/hc/en-us/categories/360000839131-Getting-Started-with-Fast-Simon')
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Hydrogen App
|
|
8
|
+
Hydrogen is a React framework and SDK that you can use to build fast and dynamic Shopify custom storefronts.
|
|
9
|
+
|
|
10
|
+
[Getting started guide]('https://shopify.dev/custom-storefronts/hydrogen')
|
|
11
|
+
|
|
12
|
+
# Fast Simon For Shopify Hydrogen
|
|
13
|
+
React NPM package to support Fast Simon Search and Discovery tools in Shopify Hydrogen Projects.
|
|
14
|
+
|
|
15
|
+
# What is Fast Simon for Shopify Hydrogen?
|
|
16
|
+
Fast Simon Shopify Hydrogen is a React library to be used in Shopify Hydrogen apps.
|
|
17
|
+
|
|
18
|
+
By installing this library on your Hydrogen-based React Shopify storefront, you will be able to render Fast Simon Search and Discovery tools in your app.
|
|
19
|
+
|
|
20
|
+
# Installation Guide
|
|
21
|
+
This document will guide you to:
|
|
22
|
+
* Configure your Shopify store ready for Fast Simon Shopify Hydrogen.
|
|
23
|
+
* Install and use Fast Simon Shopify Hydrogen components in your Shopify Hydrogen app.
|
|
24
|
+
|
|
25
|
+
### Requirements
|
|
26
|
+
* Shopify store
|
|
27
|
+
* Hydrogen app
|
|
28
|
+
* Fast Simon app installed on your Shopify store
|
|
29
|
+
* Shopify custom app with Storefront access token
|
|
30
|
+
|
|
31
|
+
### Configure Hydrogen app config
|
|
32
|
+
Update hydrogen.config.js with your shop's domain and Storefront API token.
|
|
33
|
+
|
|
34
|
+
### Expose Shopify Metafields
|
|
35
|
+
Fast Simon Search and Discovery uses Metafields in order to customize the UI based on Fast Simon No-code editor configuration.
|
|
36
|
+
Metafields need to be exposed so that they can be retrieved by your Hydrogen app.
|
|
37
|
+
|
|
38
|
+
Unfortunately, Shopify does not have a way of exposing Shop Metafields via their admin UI.
|
|
39
|
+
|
|
40
|
+
We strongly recommend to contact Fast Simon Support, we will expose the relevant Metafields for you.
|
|
41
|
+
|
|
42
|
+
# How to Use Fast Simon In Your Hydrogen App
|
|
43
|
+
#### Installation
|
|
44
|
+
|
|
45
|
+
1. In your Hydrogen app directory, run
|
|
46
|
+
```shell
|
|
47
|
+
npm install @fast-simon/shopify-hydrogen
|
|
48
|
+
```
|
|
49
|
+
2. Create ```fastsimon.config.json``` file in your root directory and fill it with your Fast Simon UUID & store id:
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"UUID": "",
|
|
53
|
+
"storeID": 0
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
3. Open ```vite.config.ts``` and import the Fast Simon plugin:
|
|
57
|
+
```typescript
|
|
58
|
+
import fastSimonPlugin from "@fast-simon/shopify-hydrogen/plugin";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
4. Add ```fastSimon()```to the list of plugins:
|
|
62
|
+
```typescript
|
|
63
|
+
/// <reference types="vitest" />
|
|
64
|
+
import {defineConfig} from 'vite';
|
|
65
|
+
import hydrogen from '@shopify/hydrogen/plugin';
|
|
66
|
+
import fastSimonPlugin from "@fast-simon/shopify-hydrogen/plugin";
|
|
67
|
+
|
|
68
|
+
export default defineConfig({
|
|
69
|
+
plugins: [hydrogen(), fastSimonPlugin()],
|
|
70
|
+
resolve: {
|
|
71
|
+
alias: [{find: /^~\/(.*)/, replacement: '/src/$1'}],
|
|
72
|
+
},
|
|
73
|
+
optimizeDeps: {
|
|
74
|
+
include: ['@headlessui/react', 'clsx', 'react-use', 'typographic-base'],
|
|
75
|
+
},
|
|
76
|
+
test: {
|
|
77
|
+
globals: true,
|
|
78
|
+
testTimeout: 10000,
|
|
79
|
+
hookTimeout: 10000,
|
|
80
|
+
},
|
|
81
|
+
server: {
|
|
82
|
+
port: 5000
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
5. Open App.server.tsx and import ```FastSimonProviderServer```:
|
|
88
|
+
```typescript
|
|
89
|
+
import fastSimonPlugin from "@fast-simon/shopify-hydrogen/plugin";
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
6. Include the ```FastSimonProviderServer```, passing through the request object, UUID and store id from your ```fastsimon.config.json file```:
|
|
93
|
+
```jsx
|
|
94
|
+
function App({request}) {
|
|
95
|
+
const pathname = new URL(request.normalizedUrl).pathname;
|
|
96
|
+
const localeMatch = /^\/([a-z]{2})(\/|$)/i.exec(pathname);
|
|
97
|
+
const countryCode = localeMatch ? localeMatch[1] : undefined;
|
|
98
|
+
const isHome = pathname === `/${countryCode ? countryCode + '/' : ''}`;
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Suspense fallback={<HeaderFallback isHome={isHome} />}>
|
|
102
|
+
<ShopifyProvider countryCode={countryCode}>
|
|
103
|
+
<FastSimonProviderServer storeID={fastConfig.storeID} uuid={fastConfig.UUID} request={request}>
|
|
104
|
+
<CartProvider countryCode={countryCode}>
|
|
105
|
+
<Suspense>
|
|
106
|
+
<DefaultSeo />
|
|
107
|
+
</Suspense>
|
|
108
|
+
<Router>
|
|
109
|
+
<FileRoutes
|
|
110
|
+
basePath={countryCode ? `/${countryCode}/` : undefined}
|
|
111
|
+
/>
|
|
112
|
+
<Route path="*" page={<NotFound />} />
|
|
113
|
+
</Router>
|
|
114
|
+
</CartProvider>
|
|
115
|
+
<PerformanceMetrics />
|
|
116
|
+
{import.meta.env.DEV && <PerformanceMetricsDebug />}
|
|
117
|
+
<ShopifyAnalytics />
|
|
118
|
+
</FastSimonProviderServer>
|
|
119
|
+
</ShopifyProvider>
|
|
120
|
+
</Suspense>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
You can also provide your UUID and storeID directly instead of creating the ```fastsimon.config.json```
|
|
126
|
+
|
|
127
|
+
### Usage
|
|
128
|
+
##### Collections:
|
|
129
|
+
1. Open ```src/routes/collections/[handle].server.jsx``` and import ```FastSimonAppServer```:
|
|
130
|
+
```typescript
|
|
131
|
+
import {FastSimonAppServer} from "@fast-simon/shopify-hydrogen";
|
|
132
|
+
```
|
|
133
|
+
2. To the collection handler function, add ```fastSimonProps``` parameter:
|
|
134
|
+
```jsx
|
|
135
|
+
export default function Collection({params, fastSimonProps}) {...}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
3. Replace the Shopify Grid component by ```FastSimonAppServer```, pass ```collectionID``` and ```fastSimonProps``` as shown below.
|
|
139
|
+
```jsx
|
|
140
|
+
<Layout>
|
|
141
|
+
<Suspense>
|
|
142
|
+
<Seo type="collection" data={collection} />
|
|
143
|
+
</Suspense>
|
|
144
|
+
<PageHeader heading={collection.title}>
|
|
145
|
+
{collection?.description && (
|
|
146
|
+
<div className="flex items-baseline justify-between w-full">
|
|
147
|
+
<div>
|
|
148
|
+
<Text format width="narrow" as="p" className="inline-block">
|
|
149
|
+
{collection.description}
|
|
150
|
+
</Text>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
)}
|
|
154
|
+
</PageHeader>
|
|
155
|
+
<Section>
|
|
156
|
+
<FastSimonAppServer collectionID={collection.id} fastSimonProps={fastSimonProps}/>
|
|
157
|
+
</Section>
|
|
158
|
+
</Layout>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
##### Search Page:
|
|
162
|
+
1. Open ```src/routes/search.server.jsx``` and import ```FastSimonAppServer```:
|
|
163
|
+
```typescript
|
|
164
|
+
import {FastSimonAppServer} from "@fast-simon/shopify-hydrogen";
|
|
165
|
+
```
|
|
166
|
+
2. To the search handler function, add ```fastSimonProps``` parameter:
|
|
167
|
+
```jsx
|
|
168
|
+
export default function Search({pageBy = PAGINATION_SIZE, params, fastSimonProps}) {...}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
3. Replace the Shopify Grid component by ```FastSimonAppServer```, pass ```query``` and ```fastSimonProps``` as shown below.
|
|
172
|
+
```jsx
|
|
173
|
+
return (
|
|
174
|
+
<SearchPage searchTerm={decodeURI(searchTerm)}>
|
|
175
|
+
<Section>
|
|
176
|
+
<FastSimonAppServer query={decodeURI(searchTerm)} fastSimonProps={fastSimonProps}/>
|
|
177
|
+
</Section>
|
|
178
|
+
</SearchPage>
|
|
179
|
+
);
|
|
180
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SortBy } from "./sortBy";
|
|
2
|
+
import type { Narrow } from "./narrow";
|
|
3
|
+
export interface AppServerProps {
|
|
4
|
+
page?: number;
|
|
5
|
+
sortBy?: SortBy;
|
|
6
|
+
narrow?: Narrow;
|
|
7
|
+
searchWithinSearch?: string;
|
|
8
|
+
query?: string;
|
|
9
|
+
collectionID?: string;
|
|
10
|
+
narrowString?: string;
|
|
11
|
+
deviceMode?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type ArticleServerItem = [ArticleTitle, ArticleURL, ArticleDescription, null, ArticleImage];
|
|
2
|
+
declare type ArticleTitle = string;
|
|
3
|
+
declare type ArticleURL = string;
|
|
4
|
+
declare type ArticleDescription = string | null;
|
|
5
|
+
declare type ArticleImage = string | null;
|
|
6
|
+
export interface Article {
|
|
7
|
+
title: string;
|
|
8
|
+
url: string;
|
|
9
|
+
description: string;
|
|
10
|
+
image: string;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Currency = string | 'USD' | 'CRC' | 'AUD' | 'AZN' | 'NZD' | 'CAD' | 'VES' | 'SGD' | 'COP' | 'GBP' | 'BRL' | 'ILS' | 'AED' | 'JMD' | 'MYR' | 'THB' | 'DKK' | 'EGP' | 'NOK' | 'SEK' | 'HKD' | 'ZAR' | 'CHF' | 'HRK' | 'INR' | 'UAH' | 'RUB' | 'BYR' | 'IRR' | 'MXN' | 'TWD' | 'TRY' | 'TRL' | 'TL' | 'PLN' | 'HUF' | 'BGN' | 'EUR' | 'NGN' | 'RON' | 'VND' | 'BDT' | 'XOF' | 'JPY' | 'CNY' | 'KRW' | 'ARS';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Device = 'mobile' | 'desktop' | 'tablet';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import type { SortBy } from "./sortBy";
|
|
2
|
+
export interface GridPosition {
|
|
3
|
+
row: number;
|
|
4
|
+
numOfCols: number;
|
|
5
|
+
areaName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FontSettings {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
fontWeight: string;
|
|
10
|
+
font: string;
|
|
11
|
+
textAlign: string;
|
|
12
|
+
lineHeight: string;
|
|
13
|
+
letterSpacing: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DimensionsSettings {
|
|
16
|
+
x: string;
|
|
17
|
+
y: string;
|
|
18
|
+
width: string;
|
|
19
|
+
height: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ProductTitleSettings {
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
font: FontSettings;
|
|
24
|
+
dimensions: DimensionsSettings;
|
|
25
|
+
margin: string;
|
|
26
|
+
gridPosition: GridPosition;
|
|
27
|
+
numberOfLines: string;
|
|
28
|
+
color: string;
|
|
29
|
+
saveSpaceForLineClamp: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface ProductPriceSettings {
|
|
32
|
+
isActive: boolean;
|
|
33
|
+
font: FontSettings;
|
|
34
|
+
dimensions: DimensionsSettings;
|
|
35
|
+
margin: string;
|
|
36
|
+
gridPosition: GridPosition;
|
|
37
|
+
colorIfCompareEnable: string;
|
|
38
|
+
color: string;
|
|
39
|
+
shadow: string;
|
|
40
|
+
alignIfCompare: 'left' | 'center' | 'right';
|
|
41
|
+
currency: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ProductComparePriceSettings {
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
font: FontSettings;
|
|
46
|
+
dimensions: DimensionsSettings;
|
|
47
|
+
margin: string;
|
|
48
|
+
gridPosition: GridPosition;
|
|
49
|
+
color: string;
|
|
50
|
+
shadow: string;
|
|
51
|
+
}
|
|
52
|
+
export interface ProductReviewsSettings {
|
|
53
|
+
isActive: boolean;
|
|
54
|
+
font: FontSettings;
|
|
55
|
+
size: string;
|
|
56
|
+
margin: string;
|
|
57
|
+
color: string;
|
|
58
|
+
gridPosition: GridPosition;
|
|
59
|
+
dimensions: DimensionsSettings;
|
|
60
|
+
reviewsCount: boolean;
|
|
61
|
+
shadow: string;
|
|
62
|
+
widgetForNoReview: boolean;
|
|
63
|
+
noReviewsStarsColor: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ProductAddToCartSettings {
|
|
66
|
+
isActive: boolean;
|
|
67
|
+
margin: string;
|
|
68
|
+
gridPosition: GridPosition;
|
|
69
|
+
addToCartType: 'product level' | 'variant level';
|
|
70
|
+
font: FontSettings;
|
|
71
|
+
text: string;
|
|
72
|
+
dimensions: DimensionsSettings;
|
|
73
|
+
ajaxAnimation: boolean;
|
|
74
|
+
backgroundColor: string;
|
|
75
|
+
color: string;
|
|
76
|
+
border: string;
|
|
77
|
+
borderRadius: string;
|
|
78
|
+
shadow: string;
|
|
79
|
+
showOnHover: boolean;
|
|
80
|
+
changeColorsOnHover: boolean;
|
|
81
|
+
backgroundColorOnHover: string;
|
|
82
|
+
textColorsOnHover: string;
|
|
83
|
+
borderColorOnHover: string;
|
|
84
|
+
addToCartPosition: 'product bottom' | 'image bottom';
|
|
85
|
+
quantitySelector: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface ProductBackInStockSettings {
|
|
88
|
+
isActive: boolean;
|
|
89
|
+
margin: string;
|
|
90
|
+
gridPosition: GridPosition;
|
|
91
|
+
font: FontSettings;
|
|
92
|
+
text: string;
|
|
93
|
+
dimensions: DimensionsSettings;
|
|
94
|
+
backgroundColor: string;
|
|
95
|
+
color: string;
|
|
96
|
+
border: string;
|
|
97
|
+
borderRadius: string;
|
|
98
|
+
shadow: string;
|
|
99
|
+
showOnHover: boolean;
|
|
100
|
+
changeColorsOnHover: boolean;
|
|
101
|
+
backgroundColorOnHover: string;
|
|
102
|
+
textColorsOnHover: string;
|
|
103
|
+
borderColorOnHover: string;
|
|
104
|
+
backInStockPosition: 'product bottom' | 'image bottom';
|
|
105
|
+
}
|
|
106
|
+
export interface ProductSKUSettings {
|
|
107
|
+
isActive: boolean;
|
|
108
|
+
font: FontSettings;
|
|
109
|
+
margin: string;
|
|
110
|
+
gridPosition: GridPosition;
|
|
111
|
+
dimensions: DimensionsSettings;
|
|
112
|
+
color: string;
|
|
113
|
+
shadow: string;
|
|
114
|
+
}
|
|
115
|
+
export interface ProductDescriptionSettings {
|
|
116
|
+
isActive: boolean;
|
|
117
|
+
font: FontSettings;
|
|
118
|
+
margin: string;
|
|
119
|
+
gridPosition: GridPosition;
|
|
120
|
+
dimensions: DimensionsSettings;
|
|
121
|
+
numberOfLines: string;
|
|
122
|
+
color: string;
|
|
123
|
+
shadow: string;
|
|
124
|
+
saveSpaceForLineClamp: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface ProductStockBadgeSettings {
|
|
127
|
+
isActive: boolean;
|
|
128
|
+
font: FontSettings;
|
|
129
|
+
margin: string;
|
|
130
|
+
gridPosition: GridPosition;
|
|
131
|
+
text: string;
|
|
132
|
+
border: string;
|
|
133
|
+
borderRadius: string;
|
|
134
|
+
dimensions: DimensionsSettings;
|
|
135
|
+
color: string;
|
|
136
|
+
backgroundColor: string;
|
|
137
|
+
shadow: string;
|
|
138
|
+
}
|
|
139
|
+
export interface ProductVendorSettings {
|
|
140
|
+
isActive: boolean;
|
|
141
|
+
font: FontSettings;
|
|
142
|
+
margin: string;
|
|
143
|
+
gridPosition: GridPosition;
|
|
144
|
+
dimensions: DimensionsSettings;
|
|
145
|
+
color: string;
|
|
146
|
+
shadow: string;
|
|
147
|
+
}
|
|
148
|
+
export interface ProductWishlistSettings {
|
|
149
|
+
isActive: boolean;
|
|
150
|
+
size: string;
|
|
151
|
+
margin: string;
|
|
152
|
+
gridPosition: GridPosition;
|
|
153
|
+
dimensions: DimensionsSettings;
|
|
154
|
+
location: 'on-image' | 'in-info';
|
|
155
|
+
position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
156
|
+
padding: string;
|
|
157
|
+
notCheckedColor: string;
|
|
158
|
+
checkedColor: string;
|
|
159
|
+
isCustomIcon: boolean;
|
|
160
|
+
checkedIconName: string;
|
|
161
|
+
notCheckedIconName: string;
|
|
162
|
+
}
|
|
163
|
+
export interface ProductQuickViewSettings {
|
|
164
|
+
isActive: boolean;
|
|
165
|
+
font: FontSettings;
|
|
166
|
+
margin: string;
|
|
167
|
+
gridPosition: GridPosition;
|
|
168
|
+
text: string;
|
|
169
|
+
border: string;
|
|
170
|
+
borderRadius: string;
|
|
171
|
+
dimensions: DimensionsSettings;
|
|
172
|
+
theme: 'modern' | 'classic';
|
|
173
|
+
color: string;
|
|
174
|
+
backgroundColor: string;
|
|
175
|
+
}
|
|
176
|
+
export interface ProductLookALikeSettings {
|
|
177
|
+
isActive: boolean;
|
|
178
|
+
font: FontSettings;
|
|
179
|
+
margin: string;
|
|
180
|
+
gridPosition: GridPosition;
|
|
181
|
+
text: string;
|
|
182
|
+
border: string;
|
|
183
|
+
borderRadius: string;
|
|
184
|
+
dimensions: DimensionsSettings;
|
|
185
|
+
color: string;
|
|
186
|
+
backgroundColor: string;
|
|
187
|
+
}
|
|
188
|
+
export declare enum SwatchType {
|
|
189
|
+
Color = 0,
|
|
190
|
+
Image = 1,
|
|
191
|
+
Text = 2
|
|
192
|
+
}
|
|
193
|
+
export interface ProductColorSwatchesSettings {
|
|
194
|
+
isActive: boolean;
|
|
195
|
+
margin: string;
|
|
196
|
+
gridPosition: GridPosition;
|
|
197
|
+
dimensions: DimensionsSettings;
|
|
198
|
+
maxSwatches: number;
|
|
199
|
+
swatchesType: SwatchType;
|
|
200
|
+
changeVariantOnHover: boolean;
|
|
201
|
+
}
|
|
202
|
+
export interface ProductStyles {
|
|
203
|
+
border: string;
|
|
204
|
+
backgroundColor: string;
|
|
205
|
+
shadow: string;
|
|
206
|
+
}
|
|
207
|
+
export interface PageTitleSettings {
|
|
208
|
+
isActive: boolean;
|
|
209
|
+
font: FontSettings;
|
|
210
|
+
margin: string;
|
|
211
|
+
dimensions: DimensionsSettings;
|
|
212
|
+
numberOfLines: string;
|
|
213
|
+
color: string;
|
|
214
|
+
}
|
|
215
|
+
export interface ProductInfo {
|
|
216
|
+
padding: string;
|
|
217
|
+
gridAreas: string;
|
|
218
|
+
}
|
|
219
|
+
export interface ProductSettings {
|
|
220
|
+
border: string;
|
|
221
|
+
borderRadius: string;
|
|
222
|
+
backgroundColor: string;
|
|
223
|
+
shadow: string;
|
|
224
|
+
imageRatio: number;
|
|
225
|
+
imageFit: string;
|
|
226
|
+
padding: string;
|
|
227
|
+
imageLoadingType: string;
|
|
228
|
+
imageCarousel: 'auto' | 'arrows' | false;
|
|
229
|
+
isCustomCarouselIcons: boolean;
|
|
230
|
+
leftArrowIconName: string;
|
|
231
|
+
leftArrowSlideDirection: 'left' | 'right';
|
|
232
|
+
rightArrowSlideDirection: 'left' | 'right';
|
|
233
|
+
rightArrowIconName: string;
|
|
234
|
+
showBorderOnHover: boolean;
|
|
235
|
+
info: ProductInfo;
|
|
236
|
+
dimensions: DimensionsSettings;
|
|
237
|
+
title: ProductTitleSettings;
|
|
238
|
+
price: ProductPriceSettings;
|
|
239
|
+
compare: ProductComparePriceSettings;
|
|
240
|
+
reviews: ProductReviewsSettings;
|
|
241
|
+
addToCart: ProductAddToCartSettings;
|
|
242
|
+
description: ProductDescriptionSettings;
|
|
243
|
+
inStock: ProductStockBadgeSettings;
|
|
244
|
+
outOfStock: ProductStockBadgeSettings;
|
|
245
|
+
vendor: ProductVendorSettings;
|
|
246
|
+
wishList: ProductWishlistSettings;
|
|
247
|
+
quickView: ProductQuickViewSettings;
|
|
248
|
+
lookALike: ProductLookALikeSettings;
|
|
249
|
+
colorSwatches: ProductColorSwatchesSettings;
|
|
250
|
+
sku: ProductSKUSettings;
|
|
251
|
+
backInStock: ProductBackInStockSettings;
|
|
252
|
+
}
|
|
253
|
+
export interface Pagination {
|
|
254
|
+
paginationType: 'pagination' | 'infinite scroll';
|
|
255
|
+
loadMore: boolean;
|
|
256
|
+
loadMoreAfter: number;
|
|
257
|
+
paginationProgress: boolean;
|
|
258
|
+
progressBarColor: string;
|
|
259
|
+
isCustomIcon: boolean;
|
|
260
|
+
leftArrowIcon: string;
|
|
261
|
+
rightArrowIcon: string;
|
|
262
|
+
}
|
|
263
|
+
export interface ScrollToTopSettings {
|
|
264
|
+
active: boolean;
|
|
265
|
+
text: string;
|
|
266
|
+
backgroundColor: string;
|
|
267
|
+
textColor: string;
|
|
268
|
+
fontFamily: string;
|
|
269
|
+
fontSize: string;
|
|
270
|
+
fontWeight: string;
|
|
271
|
+
isCustomIcon: boolean;
|
|
272
|
+
iconName: string;
|
|
273
|
+
iconPosition: 'left' | 'right';
|
|
274
|
+
}
|
|
275
|
+
export interface ProductsGridSettings {
|
|
276
|
+
product: ProductSettings;
|
|
277
|
+
pageTitle: PageTitleSettings;
|
|
278
|
+
pagination: Pagination;
|
|
279
|
+
quickViewModal: QuickViewModalSettings;
|
|
280
|
+
numberOfColumns: string;
|
|
281
|
+
numberOfRows: string;
|
|
282
|
+
backgroundColor: string;
|
|
283
|
+
font: FontSettings;
|
|
284
|
+
gridColumnGap: string;
|
|
285
|
+
gridRowGap: string;
|
|
286
|
+
pagePadding: string;
|
|
287
|
+
gridViewButton: boolean;
|
|
288
|
+
isGridViewCustomIcon: boolean;
|
|
289
|
+
gridViewIcon: string;
|
|
290
|
+
listViewIcon: string;
|
|
291
|
+
scrollToTopSettings?: ScrollToTopSettings;
|
|
292
|
+
}
|
|
293
|
+
export interface RemovableTagsSettings {
|
|
294
|
+
isActive: boolean;
|
|
295
|
+
font: FontSettings;
|
|
296
|
+
dimensions: DimensionsSettings;
|
|
297
|
+
color: string;
|
|
298
|
+
backgroundColor: string;
|
|
299
|
+
shadow: string;
|
|
300
|
+
border: string;
|
|
301
|
+
borderRadius: string;
|
|
302
|
+
onTopPage: boolean;
|
|
303
|
+
inFilters: boolean;
|
|
304
|
+
}
|
|
305
|
+
export interface SearchWithinFiltersSettings {
|
|
306
|
+
isActive: boolean;
|
|
307
|
+
border: string;
|
|
308
|
+
borderRadius: string;
|
|
309
|
+
placeHolder: string;
|
|
310
|
+
dimensions: DimensionsSettings;
|
|
311
|
+
color: string;
|
|
312
|
+
backgroundColor: string;
|
|
313
|
+
shadow: string;
|
|
314
|
+
}
|
|
315
|
+
export interface SearchWithinResultsSettings {
|
|
316
|
+
isActive: boolean;
|
|
317
|
+
border: string;
|
|
318
|
+
borderRadius: string;
|
|
319
|
+
placeHolder: string;
|
|
320
|
+
dimensions: DimensionsSettings;
|
|
321
|
+
color: string;
|
|
322
|
+
backgroundColor: string;
|
|
323
|
+
shadow: string;
|
|
324
|
+
}
|
|
325
|
+
export interface ShowHideFiltersButtonSettings {
|
|
326
|
+
isActive: boolean;
|
|
327
|
+
border: string;
|
|
328
|
+
borderRadius: string;
|
|
329
|
+
text: string;
|
|
330
|
+
color: string;
|
|
331
|
+
dimensions: DimensionsSettings;
|
|
332
|
+
backgroundColor: string;
|
|
333
|
+
shadow: string;
|
|
334
|
+
font: FontSettings;
|
|
335
|
+
}
|
|
336
|
+
export declare type FiltersLayout = 'classic' | 'modern' | 'vertical' | 'dropdown' | 'collapsed';
|
|
337
|
+
export interface FiltersSettings {
|
|
338
|
+
isActive: boolean;
|
|
339
|
+
layout: FiltersLayout;
|
|
340
|
+
optionsColor: string;
|
|
341
|
+
titlesColor: string;
|
|
342
|
+
optionsFont: FontSettings;
|
|
343
|
+
titlesFont: FontSettings;
|
|
344
|
+
titlesBackground: string;
|
|
345
|
+
backgroundColor: string;
|
|
346
|
+
priceFilterSlider: boolean;
|
|
347
|
+
showMoreButton: boolean;
|
|
348
|
+
colorsFilter: 'swatches' | 'checkboxes';
|
|
349
|
+
removableTags: RemovableTagsSettings;
|
|
350
|
+
searchWithinFilters: SearchWithinFiltersSettings;
|
|
351
|
+
searchWithinResults: SearchWithinResultsSettings;
|
|
352
|
+
showHideFiltersButton: ShowHideFiltersButtonSettings;
|
|
353
|
+
filtersTopBar: boolean;
|
|
354
|
+
numberOfOpenFacets: number | "all";
|
|
355
|
+
isCustomIcon: boolean;
|
|
356
|
+
filtersButtonCustomIconName: string;
|
|
357
|
+
}
|
|
358
|
+
export interface SearchBoxSettings {
|
|
359
|
+
isActive: boolean;
|
|
360
|
+
border: string;
|
|
361
|
+
borderRadius: string;
|
|
362
|
+
placeHolder: string;
|
|
363
|
+
dimensions: DimensionsSettings;
|
|
364
|
+
}
|
|
365
|
+
export interface SortingOption {
|
|
366
|
+
backendName: SortBy;
|
|
367
|
+
customName: string;
|
|
368
|
+
active: boolean;
|
|
369
|
+
}
|
|
370
|
+
export interface SearchResultsSortingSettings {
|
|
371
|
+
isActive: boolean;
|
|
372
|
+
sortOptions: SortBy[];
|
|
373
|
+
defaultOption: SortBy;
|
|
374
|
+
dimensions: DimensionsSettings;
|
|
375
|
+
sortingOptions: SortingOption[];
|
|
376
|
+
mobileLayout: "classic" | "modern" | "in-filters";
|
|
377
|
+
optionsFont: FontSettings;
|
|
378
|
+
optionsColor: string;
|
|
379
|
+
optionsHeight: string;
|
|
380
|
+
selectedBackground: string;
|
|
381
|
+
titleFont: FontSettings;
|
|
382
|
+
titleColor: string;
|
|
383
|
+
titleHeight: string;
|
|
384
|
+
modalHeight: string;
|
|
385
|
+
modalBorderRadius: string;
|
|
386
|
+
modalBackground: string;
|
|
387
|
+
isCustomIcon: boolean;
|
|
388
|
+
sortingButtonCustomIconName: string;
|
|
389
|
+
}
|
|
390
|
+
export interface CollectionsSettings {
|
|
391
|
+
categoriesWheelsOnSerp: boolean;
|
|
392
|
+
categoriesWheelsOnCollections: boolean;
|
|
393
|
+
wheelSize: number;
|
|
394
|
+
numberOfWheelTitleLines: number;
|
|
395
|
+
isCustomCarouselIcons: boolean;
|
|
396
|
+
leftArrowIconName: string;
|
|
397
|
+
rightArrowIconName: string;
|
|
398
|
+
}
|
|
399
|
+
export interface QuickViewModalSettings {
|
|
400
|
+
openingDirection: "top to bottom" | "left to right" | "bottom to top" | "right to left";
|
|
401
|
+
animationInY: number;
|
|
402
|
+
animationInX: number;
|
|
403
|
+
animationOutY: number;
|
|
404
|
+
animationOutX: number;
|
|
405
|
+
animationDuration: number;
|
|
406
|
+
width: string;
|
|
407
|
+
height: string;
|
|
408
|
+
imagesBar: boolean;
|
|
409
|
+
}
|
|
410
|
+
export interface ProductGridEditorSettings {
|
|
411
|
+
productGrid: ProductsGridSettings;
|
|
412
|
+
filters: FiltersSettings;
|
|
413
|
+
searchBox: SearchBoxSettings;
|
|
414
|
+
sorting: SearchResultsSortingSettings;
|
|
415
|
+
collections: CollectionsSettings;
|
|
416
|
+
}
|