@nyris/nyris-webapp 0.3.23 → 0.3.25
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 +1 -1
- package/build/asset-manifest.json +12 -18
- package/build/index.html +1 -1
- package/build/{precache-manifest.550e76235499efc131a68c80392f6bfc.js → precache-manifest.3eed67031bd288eaf7ff98cd02aef6d7.js} +11 -35
- package/build/service-worker.js +1 -1
- package/build/static/css/main.0d30f026.chunk.css +2 -0
- package/build/static/css/main.0d30f026.chunk.css.map +1 -0
- package/build/static/js/2.ad8c5320.chunk.js +3 -0
- package/build/static/js/{2.f0507df9.chunk.js.LICENSE.txt → 2.ad8c5320.chunk.js.LICENSE.txt} +0 -15
- package/build/static/js/2.ad8c5320.chunk.js.map +1 -0
- package/build/static/js/main.7c54ad4d.chunk.js +3 -0
- package/build/static/js/main.7c54ad4d.chunk.js.map +1 -0
- package/package.json +5 -3
- package/src/App.tsx +24 -15
- package/src/Router.tsx +6 -41
- package/src/Store/Store.ts +14 -23
- package/src/Store/{Auth.ts → auth/Auth.ts} +6 -17
- package/src/Store/auth/types.ts +11 -0
- package/src/Store/constants.ts +21 -0
- package/src/Store/nyris/Nyris.ts +67 -0
- package/src/Store/nyris/types.ts +11 -0
- package/src/Store/{Search.ts → search/Search.ts} +3 -63
- package/src/Store/search/search.initialState.ts +28 -0
- package/src/Store/search/types.ts +34 -0
- package/src/components/DetailItem.tsx +29 -25
- package/src/components/DragDropFile.tsx +8 -3
- package/src/components/Feedback.tsx +11 -14
- package/src/components/FooterMobile.tsx +3 -51
- package/src/components/FooterResult.tsx +1 -1
- package/src/components/Header.tsx +29 -30
- package/src/components/HeaderMobile.tsx +14 -21
- package/src/components/Layout.tsx +11 -27
- package/src/components/PanelResult/index.tsx +1 -1
- package/src/components/{LoadingScreen → ProductList}/index.tsx +3 -3
- package/src/components/appMobile.scss +2 -21
- package/src/components/carousel/ImagePreviewCarousel.tsx +2 -1
- package/src/components/clear-refinements/clear-refinements.tsx +1 -1
- package/src/components/common.scss +2 -0
- package/src/components/drawer/cameraCustom.tsx +7 -14
- package/src/components/input/inputSearch.tsx +9 -8
- package/src/components/pre-filter/{desktop/index.tsx → index.tsx} +5 -5
- package/src/components/results/ItemResult.tsx +40 -34
- package/src/constants.ts +12 -0
- package/src/hooks/useVisualSearch.tsx +2 -2
- package/src/i18n.ts +10 -0
- package/src/index.css +13 -0
- package/src/index.tsx +0 -20
- package/src/{modules/LandingPage/indexNewVersion.tsx → page/landingPage/AppMD.tsx} +2 -4
- package/src/{modules/LandingPage → page/landingPage}/AppMobile.tsx +4 -5
- package/src/{modules/LandingPage → page/landingPage}/common.scss +2 -8
- package/src/page/result/index.tsx +8 -10
- package/src/services/Feedback.ts +48 -71
- package/src/services/{filter.tsx → filter.ts} +1 -1
- package/src/services/types.ts +30 -39
- package/src/translations.ts +22 -0
- package/src/types.ts +13 -66
- package/build/js/test.js +0 -84
- package/build/static/css/main.c956b74c.chunk.css +0 -2
- package/build/static/css/main.c956b74c.chunk.css.map +0 -1
- package/build/static/js/2.f0507df9.chunk.js +0 -3
- package/build/static/js/2.f0507df9.chunk.js.map +0 -1
- package/build/static/js/main.247c7b7e.chunk.js +0 -3
- package/build/static/js/main.247c7b7e.chunk.js.map +0 -1
- package/build/static/media/Rectangle.4dd8b747.png +0 -0
- package/build/static/media/icon_company.2b2a0a61.svg +0 -3
- package/build/static/media/icon_email.132d632b.svg +0 -3
- package/build/static/media/icon_phone.09335da9.svg +0 -3
- package/build/static/media/icon_textArea.f6d78b61.svg +0 -3
- package/build/static/media/icon_users.2013c76e.svg +0 -3
- package/public/js/test.js +0 -84
- package/src/App.css +0 -65
- package/src/Store/Nyris.ts +0 -77
- package/src/components/AppContainer.tsx +0 -126
- package/src/components/CategoryFilter.tsx +0 -17
- package/src/components/Codes.tsx +0 -20
- package/src/components/CustomHits/index.tsx +0 -47
- package/src/components/Footer.tsx +0 -96
- package/src/components/FooterMD.tsx +0 -54
- package/src/components/FooterNewVersion.tsx +0 -12
- package/src/components/HeaderMd.tsx +0 -38
- package/src/components/HeaderNewVersion.tsx +0 -112
- package/src/components/Navigation.tsx +0 -34
- package/src/components/PredictedCategories.tsx +0 -14
- package/src/components/Refine.tsx +0 -28
- package/src/components/RelevantSort.tsx +0 -12
- package/src/components/Result.tsx +0 -210
- package/src/components/Saved/AllItem.tsx +0 -32
- package/src/components/Saved/Category.tsx +0 -16
- package/src/components/auto-complete/basic.tsx +0 -153
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.css +0 -3
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.tsx +0 -75
- package/src/components/button/clear-fillter.tsx +0 -30
- package/src/components/camera/screenshot.tsx +0 -33
- package/src/components/count/count.tsx +0 -20
- package/src/components/hitItem/hits.tsx +0 -50
- package/src/components/hitItem/infinitiHits.tsx +0 -33
- package/src/components/icon/icon.tsx +0 -13
- package/src/components/icon_textArea.svg +0 -3
- package/src/components/refinement-list/index.tsx +0 -42
- package/src/components/results/pagination.tsx +0 -34
- package/src/components/search/ListSearch.tsx +0 -209
- package/src/defaults.ts +0 -37
- package/src/modules/LandingPage/App.tsx +0 -318
- package/src/modules/LandingPage/AppMD.tsx +0 -399
- package/src/modules/LandingPage/index.tsx +0 -186
- package/src/modules/LandingPage/propsType.ts +0 -43
- package/src/page/Auth/login.tsx +0 -7
- package/src/page/Exception/404.tsx +0 -11
- package/src/page/History/index.tsx +0 -76
- package/src/page/Profile/index.tsx +0 -140
- package/src/page/ResultMobile/index.tsx +0 -12
- package/src/page/Saved/MockData.ts +0 -223
- package/src/page/Saved/index.tsx +0 -166
- package/src/page/Support/MockData.ts +0 -45
- package/src/page/Support/index.tsx +0 -492
- package/src/page/result/MockData.ts +0 -50
- /package/build/static/js/{main.247c7b7e.chunk.js.LICENSE.txt → main.7c54ad4d.chunk.js.LICENSE.txt} +0 -0
package/src/services/Feedback.ts
CHANGED
|
@@ -1,88 +1,65 @@
|
|
|
1
|
-
import NyrisAPI, {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import NyrisAPI, {
|
|
2
|
+
FeedbackEventPayload,
|
|
3
|
+
NyrisAPISettings,
|
|
4
|
+
RectCoords,
|
|
5
|
+
} from '@nyris/nyris-api';
|
|
6
|
+
import { RootState } from '../Store/Store';
|
|
7
|
+
import { ToastHelper } from '../helpers/ToastHelper';
|
|
4
8
|
|
|
5
9
|
export const feedbackSuccessEpic = async (
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
state: RootState,
|
|
11
|
+
success: boolean,
|
|
8
12
|
) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
const { search, settings } = state;
|
|
14
|
+
const sessionId = search.sessionId;
|
|
15
|
+
const requestId = search.requestId || search.sessionId;
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
try {
|
|
18
|
+
const res = await sendFeedbackByApi(settings, sessionId, requestId, {
|
|
19
|
+
event: 'feedback',
|
|
20
|
+
data: { success },
|
|
21
|
+
});
|
|
22
|
+
ToastHelper.success('Thank you for your feedback.');
|
|
23
|
+
return res;
|
|
24
|
+
} catch (err: any) {
|
|
25
|
+
console.log(err);
|
|
26
|
+
}
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
export const feedbackClickEpic = async (state: RootState, position: number) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const { search, settings } = state;
|
|
31
|
+
return await sendFeedbackByApi(settings, search.sessionId, search.requestId, {
|
|
32
|
+
event: 'click',
|
|
33
|
+
data: { positions: [position] },
|
|
34
|
+
});
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
// export const feedbackTextSearchEpic = async (
|
|
34
|
-
// state: RootState,
|
|
35
|
-
// query: string,
|
|
36
|
-
// page: number,
|
|
37
|
-
// productIds: string[],
|
|
38
|
-
// ) => {
|
|
39
|
-
// try {
|
|
40
|
-
// const { search, settings } = state;
|
|
41
|
-
// const eventData = {
|
|
42
|
-
// query,
|
|
43
|
-
// page,
|
|
44
|
-
// product_ids: productIds,
|
|
45
|
-
// };
|
|
46
|
-
// const textSearchEvent = { event: 'text-search', data: eventData };
|
|
47
|
-
// // @ts-ignore
|
|
48
|
-
// return await sendFeedbackByApi(
|
|
49
|
-
// settings,
|
|
50
|
-
// search.sessionId,
|
|
51
|
-
// search.requestId,
|
|
52
|
-
// textSearchEvent,
|
|
53
|
-
// );
|
|
54
|
-
// } catch (error) {
|
|
55
|
-
// console.log('error feedbackTextSearchEpic', error);
|
|
56
|
-
// }
|
|
57
|
-
// };
|
|
58
|
-
|
|
59
37
|
export const feedbackRegionEpic = async (
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
state: RootState,
|
|
39
|
+
region: RectCoords,
|
|
62
40
|
) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
41
|
+
const { settings, search } = state;
|
|
42
|
+
const { sessionId, requestId } = search;
|
|
43
|
+
const { x1, x2, y1, y2 } = region;
|
|
44
|
+
const payload: FeedbackEventPayload = {
|
|
45
|
+
event: 'region',
|
|
46
|
+
data: { rect: { x: x1, y: y1, w: x2 - x1, h: y2 - y1 } },
|
|
47
|
+
};
|
|
48
|
+
return await sendFeedbackByApi(settings, sessionId, requestId, payload);
|
|
71
49
|
};
|
|
72
50
|
|
|
73
51
|
export const sendFeedbackByApi = async (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
52
|
+
settings: NyrisAPISettings,
|
|
53
|
+
sessionId: string | undefined,
|
|
54
|
+
requestId: string | undefined,
|
|
55
|
+
payload: FeedbackEventPayload,
|
|
78
56
|
) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
console.log('error sendFeedbackByApi321', error);
|
|
86
|
-
}
|
|
57
|
+
const api = new NyrisAPI(settings);
|
|
58
|
+
if (sessionId && requestId) {
|
|
59
|
+
try {
|
|
60
|
+
await api.sendFeedback(sessionId, requestId, payload).then(res => {});
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.log('error sendFeedbackByApi321', error);
|
|
87
63
|
}
|
|
64
|
+
}
|
|
88
65
|
};
|
package/src/services/types.ts
CHANGED
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
// import {SearchAction, SearchState} from "./actions/searchActions";
|
|
2
|
-
// import {NyrisAction, NyrisAppState} from "./actions/nyrisAppActions";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {MDSettings} from "../types";
|
|
6
|
-
|
|
7
1
|
export interface SearchServiceSettings {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
maxWidth: number,
|
|
26
|
-
maxHeight: number,
|
|
27
|
-
useRecommendations: boolean
|
|
2
|
+
xOptions: boolean | string;
|
|
3
|
+
customSearchRequest?: (file: Blob, client: any) => Promise<any>;
|
|
4
|
+
responseHook?: (response: any) => any;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
imageMatchingUrl?: string;
|
|
7
|
+
imageMatchingUrlBySku?: string;
|
|
8
|
+
imageMatchingSubmitManualUrl?: string;
|
|
9
|
+
regionProposalUrl?: string;
|
|
10
|
+
responseFormat?: string;
|
|
11
|
+
feedbackUrl?: string;
|
|
12
|
+
exampleImages: string[];
|
|
13
|
+
noImageUrl?: string;
|
|
14
|
+
preview: boolean;
|
|
15
|
+
regions: boolean;
|
|
16
|
+
jpegQuality: number;
|
|
17
|
+
maxWidth: number;
|
|
18
|
+
maxHeight: number;
|
|
28
19
|
}
|
|
29
20
|
|
|
30
21
|
export interface Crop {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
w: number;
|
|
25
|
+
h: number;
|
|
35
26
|
}
|
|
36
27
|
|
|
37
28
|
export interface WH {
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
w: number;
|
|
30
|
+
h: number;
|
|
40
31
|
}
|
|
41
32
|
|
|
42
33
|
export interface Result {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
position: number;
|
|
35
|
+
sku?: string;
|
|
36
|
+
title?: string;
|
|
37
|
+
l?: string;
|
|
38
|
+
img?: { url?: string };
|
|
39
|
+
// There can be also any other data
|
|
40
|
+
[x: string]: any;
|
|
50
41
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const translations = {
|
|
2
|
+
en: {
|
|
3
|
+
translation: {
|
|
4
|
+
Search: 'Search',
|
|
5
|
+
'Choose an image': 'Choose an image',
|
|
6
|
+
'or drag it here': 'or drag it here',
|
|
7
|
+
'Manufacturer Number': 'Manufacturer Number',
|
|
8
|
+
'Close group': 'Close group',
|
|
9
|
+
'Show group': 'Show group',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
de: {
|
|
13
|
+
translation: {
|
|
14
|
+
Search: 'Suche',
|
|
15
|
+
'Choose an image': 'Bild wählen',
|
|
16
|
+
'or drag it here': 'oder hierhin ziehen',
|
|
17
|
+
'Manufacturer Number': 'Herst. Teile-Nr.',
|
|
18
|
+
'Close group': 'Schließe Gruppe',
|
|
19
|
+
'Show group': 'Zeige Gruppe',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
package/src/types.ts
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import { NyrisAPISettings } from '@nyris/nyris-api';
|
|
2
|
-
import { NyrisAppState } from 'Store/
|
|
3
|
-
import { SearchState } from 'Store/
|
|
4
|
-
|
|
5
|
-
export interface MDSettings {
|
|
6
|
-
customFontFamily?: string;
|
|
7
|
-
appBarLogoUrl: string;
|
|
8
|
-
appBarTitle: string;
|
|
9
|
-
appBarCustomBackgroundColor?: string;
|
|
10
|
-
appBarCustomTextColor?: string;
|
|
11
|
-
primaryColor: string;
|
|
12
|
-
secondaryColor: string;
|
|
13
|
-
resultFirstRowProperty: string;
|
|
14
|
-
resultSecondRowProperty: string;
|
|
15
|
-
|
|
16
|
-
resultLinkText?: string;
|
|
17
|
-
resultLinkIcon?: string;
|
|
18
|
-
active?: boolean;
|
|
19
|
-
}
|
|
2
|
+
import { NyrisAppState } from 'Store/nyris/types';
|
|
3
|
+
import { SearchState } from 'Store/search/types';
|
|
20
4
|
|
|
21
5
|
export interface AlgoliaSettings {
|
|
22
6
|
apiKey: string;
|
|
@@ -29,10 +13,9 @@ export interface AppSettings extends NyrisAPISettings {
|
|
|
29
13
|
preview: boolean;
|
|
30
14
|
cadSearch?: boolean;
|
|
31
15
|
noImageUrl?: string;
|
|
32
|
-
resultTemplate?: string;
|
|
33
16
|
regions: boolean;
|
|
34
17
|
instantRedirectPatterns: string[];
|
|
35
|
-
|
|
18
|
+
theme: SearchSuiteSettings;
|
|
36
19
|
algolia?: AlgoliaSettings;
|
|
37
20
|
productCtaText?: string;
|
|
38
21
|
appTitle?: string;
|
|
@@ -47,28 +30,19 @@ export interface AppSettings extends NyrisAPISettings {
|
|
|
47
30
|
alogoliaFilterField?: string;
|
|
48
31
|
headerText?: string;
|
|
49
32
|
brandName?: string;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
active: boolean;
|
|
33
|
+
shareOption?: boolean;
|
|
34
|
+
language?: string;
|
|
35
|
+
itemIdLabel?: string;
|
|
54
36
|
}
|
|
55
37
|
|
|
56
38
|
export interface SearchSuiteSettings {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
primaryColor: string;
|
|
65
|
-
secondaryColor: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface ThemeChoice {
|
|
69
|
-
default?: DefaultThemeSettings;
|
|
70
|
-
materialDesign?: MDSettings;
|
|
71
|
-
searchSuite?: SearchSuiteSettings;
|
|
39
|
+
appBarLogoUrl?: string;
|
|
40
|
+
headerColor?: string;
|
|
41
|
+
logoWidth?: string;
|
|
42
|
+
logoHeight?: string;
|
|
43
|
+
mobileFooterImageColor?: string;
|
|
44
|
+
primaryColor?: string;
|
|
45
|
+
secondaryColor?: string;
|
|
72
46
|
}
|
|
73
47
|
|
|
74
48
|
export type AppState = {
|
|
@@ -81,30 +55,3 @@ export interface CanvasWithId {
|
|
|
81
55
|
canvas: HTMLCanvasElement;
|
|
82
56
|
id: string;
|
|
83
57
|
}
|
|
84
|
-
|
|
85
|
-
export interface SearchServiceSettings {
|
|
86
|
-
xOptions: boolean | string;
|
|
87
|
-
customSearchRequest?: (file: Blob, client: any) => Promise<any>;
|
|
88
|
-
responseHook?: (response: any) => any;
|
|
89
|
-
apiKey: string;
|
|
90
|
-
imageMatchingUrl?: string;
|
|
91
|
-
imageMatchingUrlBySku?: string;
|
|
92
|
-
imageMatchingSubmitManualUrl?: string;
|
|
93
|
-
regionProposalUrl?: string;
|
|
94
|
-
responseFormat?: string;
|
|
95
|
-
feedbackUrl?: string;
|
|
96
|
-
exampleImages: string[];
|
|
97
|
-
resultTemplate?: string;
|
|
98
|
-
noImageUrl?: string;
|
|
99
|
-
materialDesign?: MDSettings;
|
|
100
|
-
preview: boolean;
|
|
101
|
-
regions: boolean;
|
|
102
|
-
jpegQuality: number;
|
|
103
|
-
maxWidth: number;
|
|
104
|
-
maxHeight: number;
|
|
105
|
-
useRecommendations: boolean;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface AlgoliaResult {
|
|
109
|
-
sku: string;
|
|
110
|
-
}
|
package/build/js/test.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
var settings = {
|
|
2
|
-
apiKey: 'ZKbb76cwHmBUoXR4uqwD5PqaJK3wobdZ',
|
|
3
|
-
// apiKeyDMGMori: 'nlLoWoR4GqT1BVbdkYiVsp85oMokpzMS',
|
|
4
|
-
maxWidth: 300,
|
|
5
|
-
maxHeight: 300,
|
|
6
|
-
jpegQuality: 0.9,
|
|
7
|
-
regions: true,
|
|
8
|
-
preview: true,
|
|
9
|
-
useRecommendations: false,
|
|
10
|
-
xOptions:
|
|
11
|
-
'default +estimated-category similarity.threshold=0.05 similarity.threshold.discard=0.05 exact.threshold.perfect=200 similarity.threshold.perfect=2 scoring.indicative-min-hits=1 scoring.promo-min-hits=20 scoring.interpolation-cutoff=0 +barcode +barcode-detection',
|
|
12
|
-
baseUrl: 'https://api.i.nyris.io',
|
|
13
|
-
resultTemplate: 'default',
|
|
14
|
-
responseFormat: 'application/offers.complete+json',
|
|
15
|
-
exampleImages: [
|
|
16
|
-
'https://storage.googleapis.com/nyris/share/examples_search/example_1.jpg',
|
|
17
|
-
'https://storage.googleapis.com/nyris/share/examples_search/example_2.jpg',
|
|
18
|
-
'https://storage.googleapis.com/nyris/share/examples_search/example_3.jpg',
|
|
19
|
-
'https://storage.googleapis.com/nyris/share/examples_search/example_4.jpg',
|
|
20
|
-
],
|
|
21
|
-
deactivated: false,
|
|
22
|
-
cadSearch: false,
|
|
23
|
-
themePage: {
|
|
24
|
-
default: {
|
|
25
|
-
active: false,
|
|
26
|
-
},
|
|
27
|
-
materialDesign: {
|
|
28
|
-
active: false,
|
|
29
|
-
appBarLogoUrl: 'https://nyris.io/wp-content/themes/nyris/img/logo.svg',
|
|
30
|
-
appBarTitle: '',
|
|
31
|
-
appBarCustomBackgroundColor: 'black',
|
|
32
|
-
appBarCustomTextColor: 'white',
|
|
33
|
-
|
|
34
|
-
primaryColor: '#e31b5d',
|
|
35
|
-
secondaryColor: '#ccc',
|
|
36
|
-
resultFirstRowProperty: 'title',
|
|
37
|
-
resultSecondRowProperty: 'price',
|
|
38
|
-
resultLinkText: 'show',
|
|
39
|
-
resultLinkIcon: 'eye',
|
|
40
|
-
},
|
|
41
|
-
searchSuite: {
|
|
42
|
-
active: true,
|
|
43
|
-
moreInfoText: 'more info',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
imageMatchingUrl: 'https://api.nyris.io/find/v1',
|
|
47
|
-
imageMatchingUrlBySku: 'https://api.nyris.io/recommend/v1',
|
|
48
|
-
imageMatchingSubmitManualUrl: 'https://api.nyris.io/find/v1/manual',
|
|
49
|
-
regionProposalUrl: 'https://api.nyris.io/find/v1/regions',
|
|
50
|
-
feedbackUrl: 'https://api.nyris.io/feedback/v1',
|
|
51
|
-
algolia: {
|
|
52
|
-
apiKey: '6d20d5463452614ea94aae323d8d038e',
|
|
53
|
-
appId: 'HBDJYUK5G4',
|
|
54
|
-
indexName: 'dmg-mori',
|
|
55
|
-
},
|
|
56
|
-
refinements: [
|
|
57
|
-
{
|
|
58
|
-
type: 'list',
|
|
59
|
-
header: 'Brands',
|
|
60
|
-
attribute: 'brand',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
type: 'list',
|
|
64
|
-
header: 'Norm',
|
|
65
|
-
attribute: 'keyword_0',
|
|
66
|
-
options: {
|
|
67
|
-
searchable: true,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'list',
|
|
72
|
-
header: 'Category',
|
|
73
|
-
attribute: 'custom_category',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
autocompleteSearchConfig: {
|
|
77
|
-
placeholders: ['brand', 'keyword_0', 'custom_category'],
|
|
78
|
-
debouncing: 800,
|
|
79
|
-
detachedMediaQuery: '(max-width: 776px)',
|
|
80
|
-
},
|
|
81
|
-
visualSearchFilterKey: 'machineType',
|
|
82
|
-
};
|
|
83
|
-
settings['customSearchRequest'] = null;
|
|
84
|
-
settings['responseHook'] = null;
|