@coveops/abi 1.5.3 → 1.5.4
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/abi.esm.js +1 -1
- package/dist/abi/index.esm.js +1 -1
- package/dist/abi/{p-bf957ebd.entry.js → p-46d3f7f7.entry.js} +1 -1
- package/dist/bundle/index.css +1 -1
- package/dist/bundle/index.js +23 -23
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/recs-results-manager.cjs.entry.js +3 -3
- package/dist/collection/index.js +2 -2
- package/dist/components/index.js +9 -9
- package/dist/esm/index.js +6 -6
- package/dist/esm/recs-results-manager.entry.js +3 -3
- package/package.json +1 -1
- package/src/components/recs-results-manager/FaqTemplateRec.html +1 -1
- package/src/components/recs-results-manager/QuickLinksRec.html +1 -1
- package/src/components/recs-results-manager/defaultRec.html +1 -1
- package/src/index.ts +2 -2
- package/src/style/index.css +1 -0
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -10,7 +10,7 @@ async function main() {
|
|
|
10
10
|
searchBox && initStandaloneSearchBox(searchBox);
|
|
11
11
|
// const platformUrl = "https://platform.cloud.coveo.com"!;
|
|
12
12
|
// const organizationId = "anheuserbuschinbevprod"!;
|
|
13
|
-
// const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
13
|
+
// const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM"!;
|
|
14
14
|
// await searchInterface.initialize({
|
|
15
15
|
// accessToken,
|
|
16
16
|
// organizationId,
|
|
@@ -62,7 +62,7 @@ async function main() {
|
|
|
62
62
|
async function initStandaloneSearchBox(searchBox) {
|
|
63
63
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
64
64
|
const organizationId = "anheuserbuschinbevprod";
|
|
65
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
65
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
66
66
|
await searchBox.initialize({
|
|
67
67
|
accessToken,
|
|
68
68
|
organizationId,
|
|
@@ -91,7 +91,7 @@ async function initStandaloneSearchBox(searchBox) {
|
|
|
91
91
|
async function initSearch(searchInterface) {
|
|
92
92
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
93
93
|
const organizationId = "anheuserbuschinbevprod";
|
|
94
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
94
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
95
95
|
await searchInterface.initialize({
|
|
96
96
|
accessToken,
|
|
97
97
|
organizationId,
|
|
@@ -124,15 +124,15 @@ async function initSearch(searchInterface) {
|
|
|
124
124
|
async function initRecs() {
|
|
125
125
|
var _a;
|
|
126
126
|
const organizationId = "anheuserbuschinbevprod";
|
|
127
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
127
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
128
128
|
const recsInterface = document.querySelector('#recs');
|
|
129
|
-
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "
|
|
129
|
+
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "CZ");
|
|
130
130
|
await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
|
|
131
131
|
accessToken: accessToken,
|
|
132
132
|
organizationId: organizationId,
|
|
133
133
|
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
134
134
|
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "recommendations") {
|
|
135
|
-
request.url += '&viewAllContent=1';
|
|
135
|
+
//request.url += '&viewAllContent=1';
|
|
136
136
|
var body = JSON.parse(request.body);
|
|
137
137
|
body.context = {
|
|
138
138
|
"user_country": "CZ",
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-3cecd23d.js');
|
|
6
6
|
const atomic = require('./atomic-70a93c69.js');
|
|
7
7
|
|
|
8
|
-
const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top:
|
|
8
|
+
const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top: 10px !important;\n }\n</style> \n<faq-popup-component></faq-popup-component>\n<hr>\n ";
|
|
9
9
|
|
|
10
|
-
const QuickLinksRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top:
|
|
10
|
+
const QuickLinksRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top: 10px !important;\n }\n</style>\n\n\n<atomic-result-section-title>\n <atomic-result-link href-template=\"${raw.sfppcustomlinkcpplinkurlc}\"><a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n <hr>\n</atomic-result-section-title>";
|
|
11
11
|
|
|
12
|
-
const defaultRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top:
|
|
12
|
+
const defaultRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top: 10px !important;\n }\n</style>\n<atomic-result-section-title>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n <hr>\n</atomic-result-section-title>";
|
|
13
13
|
|
|
14
14
|
const RecsResultsManager = class {
|
|
15
15
|
constructor(hostRef) {
|
package/dist/collection/index.js
CHANGED
|
@@ -123,13 +123,13 @@ async function initRecs() {
|
|
|
123
123
|
const organizationId = process.env.ORGANIZATION_ID;
|
|
124
124
|
const accessToken = process.env.API_KEY;
|
|
125
125
|
const recsInterface = document.querySelector('#recs');
|
|
126
|
-
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "
|
|
126
|
+
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "CZ");
|
|
127
127
|
await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
|
|
128
128
|
accessToken: accessToken,
|
|
129
129
|
organizationId: organizationId,
|
|
130
130
|
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
131
131
|
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "recommendations") {
|
|
132
|
-
request.url += '&viewAllContent=1';
|
|
132
|
+
//request.url += '&viewAllContent=1';
|
|
133
133
|
var body = JSON.parse(request.body);
|
|
134
134
|
body.context = {
|
|
135
135
|
"user_country": "CZ",
|
package/dist/components/index.js
CHANGED
|
@@ -1132,7 +1132,7 @@ async function main() {
|
|
|
1132
1132
|
searchBox && initStandaloneSearchBox(searchBox);
|
|
1133
1133
|
// const platformUrl = "https://platform.cloud.coveo.com"!;
|
|
1134
1134
|
// const organizationId = "anheuserbuschinbevprod"!;
|
|
1135
|
-
// const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
1135
|
+
// const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM"!;
|
|
1136
1136
|
// await searchInterface.initialize({
|
|
1137
1137
|
// accessToken,
|
|
1138
1138
|
// organizationId,
|
|
@@ -1184,7 +1184,7 @@ async function main() {
|
|
|
1184
1184
|
async function initStandaloneSearchBox(searchBox) {
|
|
1185
1185
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
1186
1186
|
const organizationId = "anheuserbuschinbevprod";
|
|
1187
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
1187
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
1188
1188
|
await searchBox.initialize({
|
|
1189
1189
|
accessToken,
|
|
1190
1190
|
organizationId,
|
|
@@ -1213,7 +1213,7 @@ async function initStandaloneSearchBox(searchBox) {
|
|
|
1213
1213
|
async function initSearch(searchInterface) {
|
|
1214
1214
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
1215
1215
|
const organizationId = "anheuserbuschinbevprod";
|
|
1216
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
1216
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
1217
1217
|
await searchInterface.initialize({
|
|
1218
1218
|
accessToken,
|
|
1219
1219
|
organizationId,
|
|
@@ -1246,15 +1246,15 @@ async function initSearch(searchInterface) {
|
|
|
1246
1246
|
async function initRecs() {
|
|
1247
1247
|
var _a;
|
|
1248
1248
|
const organizationId = "anheuserbuschinbevprod";
|
|
1249
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
1249
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
1250
1250
|
const recsInterface = document.querySelector('#recs');
|
|
1251
|
-
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "
|
|
1251
|
+
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "CZ");
|
|
1252
1252
|
await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
|
|
1253
1253
|
accessToken: accessToken,
|
|
1254
1254
|
organizationId: organizationId,
|
|
1255
1255
|
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
1256
1256
|
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "recommendations") {
|
|
1257
|
-
request.url += '&viewAllContent=1';
|
|
1257
|
+
//request.url += '&viewAllContent=1';
|
|
1258
1258
|
var body = JSON.parse(request.body);
|
|
1259
1259
|
body.context = {
|
|
1260
1260
|
"user_country": "CZ",
|
|
@@ -3310,11 +3310,11 @@ const RecsInitializationHelper$1 = class extends H {
|
|
|
3310
3310
|
get host() { return this; }
|
|
3311
3311
|
};
|
|
3312
3312
|
|
|
3313
|
-
const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top:
|
|
3313
|
+
const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top: 10px !important;\n }\n</style> \n<faq-popup-component></faq-popup-component>\n<hr>\n ";
|
|
3314
3314
|
|
|
3315
|
-
const QuickLinksRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top:
|
|
3315
|
+
const QuickLinksRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top: 10px !important;\n }\n</style>\n\n\n<atomic-result-section-title>\n <atomic-result-link href-template=\"${raw.sfppcustomlinkcpplinkurlc}\"><a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n <hr>\n</atomic-result-section-title>";
|
|
3316
3316
|
|
|
3317
|
-
const defaultRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top:
|
|
3317
|
+
const defaultRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top: 10px !important;\n }\n</style>\n<atomic-result-section-title>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n <hr>\n</atomic-result-section-title>";
|
|
3318
3318
|
|
|
3319
3319
|
const RecsResultsManager$1 = class extends H {
|
|
3320
3320
|
constructor() {
|
package/dist/esm/index.js
CHANGED
|
@@ -8,7 +8,7 @@ async function main() {
|
|
|
8
8
|
searchBox && initStandaloneSearchBox(searchBox);
|
|
9
9
|
// const platformUrl = "https://platform.cloud.coveo.com"!;
|
|
10
10
|
// const organizationId = "anheuserbuschinbevprod"!;
|
|
11
|
-
// const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
11
|
+
// const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM"!;
|
|
12
12
|
// await searchInterface.initialize({
|
|
13
13
|
// accessToken,
|
|
14
14
|
// organizationId,
|
|
@@ -60,7 +60,7 @@ async function main() {
|
|
|
60
60
|
async function initStandaloneSearchBox(searchBox) {
|
|
61
61
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
62
62
|
const organizationId = "anheuserbuschinbevprod";
|
|
63
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
63
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
64
64
|
await searchBox.initialize({
|
|
65
65
|
accessToken,
|
|
66
66
|
organizationId,
|
|
@@ -89,7 +89,7 @@ async function initStandaloneSearchBox(searchBox) {
|
|
|
89
89
|
async function initSearch(searchInterface) {
|
|
90
90
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
91
91
|
const organizationId = "anheuserbuschinbevprod";
|
|
92
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
92
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
93
93
|
await searchInterface.initialize({
|
|
94
94
|
accessToken,
|
|
95
95
|
organizationId,
|
|
@@ -122,15 +122,15 @@ async function initSearch(searchInterface) {
|
|
|
122
122
|
async function initRecs() {
|
|
123
123
|
var _a;
|
|
124
124
|
const organizationId = "anheuserbuschinbevprod";
|
|
125
|
-
const accessToken = "eyJhbGciOiJIUzI1NiJ9.
|
|
125
|
+
const accessToken = "eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM";
|
|
126
126
|
const recsInterface = document.querySelector('#recs');
|
|
127
|
-
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "
|
|
127
|
+
(_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "CZ");
|
|
128
128
|
await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
|
|
129
129
|
accessToken: accessToken,
|
|
130
130
|
organizationId: organizationId,
|
|
131
131
|
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
132
132
|
if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "recommendations") {
|
|
133
|
-
request.url += '&viewAllContent=1';
|
|
133
|
+
//request.url += '&viewAllContent=1';
|
|
134
134
|
var body = JSON.parse(request.body);
|
|
135
135
|
body.context = {
|
|
136
136
|
"user_country": "CZ",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-66fdbb35.js';
|
|
2
2
|
import { a as waitForRecsAtomic } from './atomic-7b1e6d55.js';
|
|
3
3
|
|
|
4
|
-
const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top:
|
|
4
|
+
const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top: 10px !important;\n }\n</style> \n<faq-popup-component></faq-popup-component>\n<hr>\n ";
|
|
5
5
|
|
|
6
|
-
const QuickLinksRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top:
|
|
6
|
+
const QuickLinksRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top: 10px !important;\n }\n</style>\n\n\n<atomic-result-section-title>\n <atomic-result-link href-template=\"${raw.sfppcustomlinkcpplinkurlc}\"><a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n <hr>\n</atomic-result-section-title>";
|
|
7
7
|
|
|
8
|
-
const defaultRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top:
|
|
8
|
+
const defaultRec = "<style>\n atomic-result-link a {\n font-size: 1.3rem;\n color: #626971 !important;\n }\n hr {\n margin-top: 10px !important;\n }\n</style>\n<atomic-result-section-title>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n <hr>\n</atomic-result-section-title>";
|
|
9
9
|
|
|
10
10
|
const RecsResultsManager = class {
|
|
11
11
|
constructor(hostRef) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -137,13 +137,13 @@ async function initRecs() {
|
|
|
137
137
|
const accessToken = process.env.API_KEY!;
|
|
138
138
|
|
|
139
139
|
const recsInterface:HTMLAtomicRecsInterfaceElement = document.querySelector('#recs')!;
|
|
140
|
-
recsInterface.querySelector("recs-initialization-helper")?.setAttribute("user-country","
|
|
140
|
+
recsInterface.querySelector("recs-initialization-helper")?.setAttribute("user-country","CZ");
|
|
141
141
|
await recsInterface?.initialize({
|
|
142
142
|
accessToken: accessToken,
|
|
143
143
|
organizationId: organizationId,
|
|
144
144
|
preprocessRequest: (request, clientOrigin, metadata) => {
|
|
145
145
|
if(clientOrigin == "searchApiFetch" && metadata?.method == "recommendations") {
|
|
146
|
-
request.url += '&viewAllContent=1';
|
|
146
|
+
//request.url += '&viewAllContent=1';
|
|
147
147
|
var body = JSON.parse(request.body as string);
|
|
148
148
|
body.context = {
|
|
149
149
|
"user_country": "CZ",
|
package/src/style/index.css
CHANGED