@coveops/abi 0.5.1 → 0.6.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/dist/abi/abi.css +1 -1
- package/dist/abi/abi.esm.js +1 -1
- package/dist/abi/images/Default.png +0 -0
- package/dist/abi/images/Documents.png +0 -0
- package/dist/abi/images/FAQ.png +0 -0
- package/dist/abi/images/Images.png +0 -0
- package/dist/abi/images/Link.png +0 -0
- package/dist/abi/images/Movies.png +0 -0
- package/dist/abi/images/ProcessPeople.png +0 -0
- package/dist/abi/index.esm.js +1 -1
- package/dist/abi/p-1cbc472e.entry.js +1 -0
- package/dist/abi/{p-b62c5f66.entry.js → p-24a5774b.entry.js} +1 -1
- package/dist/abi/p-3d7bc0f4.entry.js +1 -0
- package/dist/bundle/index.css +1 -1
- package/dist/bundle/index.html +3 -4
- package/dist/bundle/index.js +448 -290
- package/dist/cjs/faq-popup-component.cjs.entry.js +8 -0
- package/dist/cjs/index.cjs.js +12 -1
- package/dist/cjs/results-manager.cjs.entry.js +10 -10
- package/dist/cjs/strip-html-component.cjs.entry.js +1 -1
- package/dist/collection/components/faq-popup-component/faq-popup-component.css +0 -12
- package/dist/collection/components/faq-popup-component/faq-popup-component.js +8 -0
- package/dist/collection/components/strip-html-component/strip-html-component.js +1 -1
- package/dist/collection/images/Default.png +0 -0
- package/dist/collection/images/Documents.png +0 -0
- package/dist/collection/images/FAQ.png +0 -0
- package/dist/collection/images/Images.png +0 -0
- package/dist/collection/images/Link.png +0 -0
- package/dist/collection/images/Movies.png +0 -0
- package/dist/collection/images/ProcessPeople.png +0 -0
- package/dist/collection/index.js +11 -0
- package/dist/components/index.js +31 -12
- package/dist/esm/faq-popup-component.entry.js +8 -0
- package/dist/esm/index.js +12 -1
- package/dist/esm/results-manager.entry.js +10 -10
- package/dist/esm/strip-html-component.entry.js +1 -1
- package/package.json +1 -1
- package/src/components/faq-popup-component/faq-popup-component.css +0 -12
- package/src/components/faq-popup-component/faq-popup-component.tsx +12 -0
- package/src/components/results-manager/AppTemplate.html +18 -12
- package/src/components/results-manager/DocumentsTemplate.html +63 -27
- package/src/components/results-manager/ELearningTemplate.html +23 -14
- package/src/components/results-manager/FAQTemplate.html +48 -30
- package/src/components/results-manager/KATemplate.html +42 -27
- package/src/components/results-manager/MediaTemplate.html +26 -16
- package/src/components/results-manager/PeopleTemplate.html +13 -8
- package/src/components/results-manager/QuickLinksTemplate.html +14 -14
- package/src/components/results-manager/SitePagesTemplate.html +40 -18
- package/src/components/results-manager/template-1.html +21 -22
- package/src/components/strip-html-component/strip-html-component.tsx +1 -1
- package/src/images/Default.png +0 -0
- package/src/images/Documents.png +0 -0
- package/src/images/FAQ.png +0 -0
- package/src/images/Images.png +0 -0
- package/src/images/Link.png +0 -0
- package/src/images/Movies.png +0 -0
- package/src/images/ProcessPeople.png +0 -0
- package/src/index.ts +11 -0
- package/src/pages/index.html +3 -4
- package/src/style/index.css +24 -9
- package/stencil.config.ts +5 -0
- package/dist/abi/p-5a5f74eb.entry.js +0 -1
- package/dist/abi/p-f23dd119.entry.js +0 -1
|
@@ -25,6 +25,9 @@ const FaqPopupComponent = class {
|
|
|
25
25
|
this.bindings = await index$1.initializeBindings(this.host);
|
|
26
26
|
this.result = await resultTemplateDecorators881a4c8e.resultContext(this.host);
|
|
27
27
|
this.modalElement = (_a = this.bindings) === null || _a === void 0 ? void 0 : _a.interfaceElement.querySelector('#faq-modal');
|
|
28
|
+
if (this.result && localStorage.getItem(`visited-${this.result.title}`)) {
|
|
29
|
+
this.host.classList.add('visited-title');
|
|
30
|
+
}
|
|
28
31
|
}
|
|
29
32
|
catch (error) {
|
|
30
33
|
console.error(error);
|
|
@@ -73,6 +76,11 @@ const FaqPopupComponent = class {
|
|
|
73
76
|
bodySlot.appendChild(linkElement);
|
|
74
77
|
this.modalElement.querySelector('#faq-modal-close').addEventListener('click', this.closeFAQModal);
|
|
75
78
|
this.modalElement.setAttribute('is-open', 'true');
|
|
79
|
+
if (this.result) {
|
|
80
|
+
localStorage.setItem(`visited-${this.result.title}`, 'true');
|
|
81
|
+
}
|
|
82
|
+
// Add the class to change color
|
|
83
|
+
this.host.classList.add('visited-title');
|
|
76
84
|
}
|
|
77
85
|
render() {
|
|
78
86
|
if (!this.result) {
|
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
|
}
|