@coveops/abi 0.5.1 → 0.5.2
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/abi/abi.css +1 -1
- package/dist/abi/index.esm.js +1 -1
- package/dist/bundle/index.css +1 -1
- package/dist/bundle/index.html +4 -5
- package/dist/bundle/index.js +17 -17
- package/dist/cjs/index.cjs.js +12 -1
- package/dist/collection/index.js +11 -0
- package/dist/components/index.js +12 -1
- package/dist/esm/index.js +12 -1
- package/package.json +1 -1
- package/src/index.ts +11 -0
- package/src/pages/index.html +4 -5
- package/src/style/index.css +20 -8
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -7,11 +7,22 @@ async function main() {
|
|
|
7
7
|
const searchInterface = document.querySelector("atomic-search-interface");
|
|
8
8
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
9
9
|
const organizationId = "anheuserbuschinbevprod";
|
|
10
|
-
const accessToken = "
|
|
10
|
+
const accessToken = "x0e506b82-043a-4eea-b18d-ee82aab46562";
|
|
11
11
|
await searchInterface.initialize({
|
|
12
12
|
accessToken,
|
|
13
13
|
organizationId,
|
|
14
14
|
platformUrl,
|
|
15
|
+
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
16
|
+
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "search") {
|
|
17
|
+
request.url += '&viewAllContent=1';
|
|
18
|
+
var body = JSON.parse(request.body);
|
|
19
|
+
body.context = {
|
|
20
|
+
"user_country_snow": "CZ"
|
|
21
|
+
};
|
|
22
|
+
request.body = JSON.stringify(body);
|
|
23
|
+
}
|
|
24
|
+
return request;
|
|
25
|
+
}
|
|
15
26
|
});
|
|
16
27
|
searchInterface.executeFirstSearch();
|
|
17
28
|
}
|
package/dist/collection/index.js
CHANGED
|
@@ -9,6 +9,17 @@ async function main() {
|
|
|
9
9
|
accessToken,
|
|
10
10
|
organizationId,
|
|
11
11
|
platformUrl,
|
|
12
|
+
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
13
|
+
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "search") {
|
|
14
|
+
request.url += '&viewAllContent=1';
|
|
15
|
+
var body = JSON.parse(request.body);
|
|
16
|
+
body.context = {
|
|
17
|
+
"user_country_snow": "CZ"
|
|
18
|
+
};
|
|
19
|
+
request.body = JSON.stringify(body);
|
|
20
|
+
}
|
|
21
|
+
return request;
|
|
22
|
+
}
|
|
12
23
|
});
|
|
13
24
|
searchInterface.executeFirstSearch();
|
|
14
25
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -972,11 +972,22 @@ async function main() {
|
|
|
972
972
|
const searchInterface = document.querySelector("atomic-search-interface");
|
|
973
973
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
974
974
|
const organizationId = "anheuserbuschinbevprod";
|
|
975
|
-
const accessToken = "
|
|
975
|
+
const accessToken = "x0e506b82-043a-4eea-b18d-ee82aab46562";
|
|
976
976
|
await searchInterface.initialize({
|
|
977
977
|
accessToken,
|
|
978
978
|
organizationId,
|
|
979
979
|
platformUrl,
|
|
980
|
+
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
981
|
+
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "search") {
|
|
982
|
+
request.url += '&viewAllContent=1';
|
|
983
|
+
var body = JSON.parse(request.body);
|
|
984
|
+
body.context = {
|
|
985
|
+
"user_country_snow": "CZ"
|
|
986
|
+
};
|
|
987
|
+
request.body = JSON.stringify(body);
|
|
988
|
+
}
|
|
989
|
+
return request;
|
|
990
|
+
}
|
|
980
991
|
});
|
|
981
992
|
searchInterface.executeFirstSearch();
|
|
982
993
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -5,11 +5,22 @@ async function main() {
|
|
|
5
5
|
const searchInterface = document.querySelector("atomic-search-interface");
|
|
6
6
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
7
7
|
const organizationId = "anheuserbuschinbevprod";
|
|
8
|
-
const accessToken = "
|
|
8
|
+
const accessToken = "x0e506b82-043a-4eea-b18d-ee82aab46562";
|
|
9
9
|
await searchInterface.initialize({
|
|
10
10
|
accessToken,
|
|
11
11
|
organizationId,
|
|
12
12
|
platformUrl,
|
|
13
|
+
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
14
|
+
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "search") {
|
|
15
|
+
request.url += '&viewAllContent=1';
|
|
16
|
+
var body = JSON.parse(request.body);
|
|
17
|
+
body.context = {
|
|
18
|
+
"user_country_snow": "CZ"
|
|
19
|
+
};
|
|
20
|
+
request.body = JSON.stringify(body);
|
|
21
|
+
}
|
|
22
|
+
return request;
|
|
23
|
+
}
|
|
13
24
|
});
|
|
14
25
|
searchInterface.executeFirstSearch();
|
|
15
26
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -12,6 +12,17 @@ async function main() {
|
|
|
12
12
|
accessToken,
|
|
13
13
|
organizationId,
|
|
14
14
|
platformUrl,
|
|
15
|
+
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
16
|
+
if(clientOrigin == "searchApiFetch" && metadata?.method == "search") {
|
|
17
|
+
request.url += '&viewAllContent=1';
|
|
18
|
+
var body = JSON.parse(request.body as string);
|
|
19
|
+
body.context = {
|
|
20
|
+
"user_country_snow": "CZ"
|
|
21
|
+
};
|
|
22
|
+
request.body = JSON.stringify(body);
|
|
23
|
+
}
|
|
24
|
+
return request;
|
|
25
|
+
}
|
|
15
26
|
});
|
|
16
27
|
|
|
17
28
|
searchInterface.executeFirstSearch();
|
package/src/pages/index.html
CHANGED
|
@@ -66,21 +66,20 @@
|
|
|
66
66
|
<atomic-layout-section style="justify-self:center" section="search">
|
|
67
67
|
<atomic-search-box></atomic-search-box>
|
|
68
68
|
</atomic-layout-section>
|
|
69
|
-
|
|
69
|
+
<atomic-layout-section section="facets">
|
|
70
70
|
<atomic-facet-manager>
|
|
71
71
|
<atomic-facet field="abicontenttype" label="Filetype"></atomic-facet>
|
|
72
72
|
<atomic-facet field="source" label="Source"></atomic-facet>
|
|
73
73
|
</atomic-facet-manager>
|
|
74
|
-
|
|
74
|
+
</atomic-layout-section>
|
|
75
75
|
<atomic-layout-section section="main">
|
|
76
76
|
<atomic-layout-section section="status">
|
|
77
77
|
<atomic-breadbox></atomic-breadbox>
|
|
78
78
|
<atomic-query-summary enable-duration="true"></atomic-query-summary>
|
|
79
79
|
<atomic-refine-toggle></atomic-refine-toggle>
|
|
80
|
-
|
|
80
|
+
<atomic-sort-dropdown>
|
|
81
81
|
<atomic-sort-expression label="relevance" expression="relevancy"></atomic-sort-expression>
|
|
82
|
-
|
|
83
|
-
</atomic-sort-dropdown> -->
|
|
82
|
+
</atomic-sort-dropdown>
|
|
84
83
|
<atomic-did-you-mean></atomic-did-you-mean>
|
|
85
84
|
</atomic-layout-section>
|
|
86
85
|
<atomic-layout-section section="results">
|
package/src/style/index.css
CHANGED
|
@@ -25,20 +25,32 @@ atomic-search-box::part(submit-icon) {
|
|
|
25
25
|
color: black;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
atomic-pager::part(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
atomic-pager::part(page-button) {
|
|
29
|
+
color: #a6a6a6;
|
|
30
|
+
border: thin solid #a6a6a6;
|
|
31
|
+
border-radius: 0px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
atomic-pager::part(page-button) {
|
|
35
|
-
color: #
|
|
34
|
+
atomic-pager::part(active-page-button) {
|
|
35
|
+
background-color: #caa144;
|
|
36
|
+
color: #000;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
atomic-pager::part(
|
|
39
|
-
|
|
39
|
+
atomic-pager::part(next-button),
|
|
40
|
+
atomic-pager::part(previous-button) {
|
|
41
|
+
color: #caa144;
|
|
42
|
+
border: thin solid #a6a6a6;
|
|
40
43
|
border-radius: 0px;
|
|
41
44
|
}
|
|
45
|
+
|
|
46
|
+
atomic-pager::part(next-button):hover,
|
|
47
|
+
atomic-pager::part(previous-button):hover,
|
|
48
|
+
atomic-pager::part(page-button):hover {
|
|
49
|
+
border-color: #caa144;
|
|
50
|
+
color: #caa144;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
atomic-modal#faq-modal::part(header-wrapper) {
|
|
43
55
|
display: grid;
|
|
44
56
|
width: 100%;
|