@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
| @@ -21,6 +21,9 @@ const FaqPopupComponent = class { | |
| 21 21 | 
             
                  this.bindings = await initializeBindings(this.host);
         | 
| 22 22 | 
             
                  this.result = await resultContext(this.host);
         | 
| 23 23 | 
             
                  this.modalElement = (_a = this.bindings) === null || _a === void 0 ? void 0 : _a.interfaceElement.querySelector('#faq-modal');
         | 
| 24 | 
            +
                  if (this.result && localStorage.getItem(`visited-${this.result.title}`)) {
         | 
| 25 | 
            +
                    this.host.classList.add('visited-title');
         | 
| 26 | 
            +
                  }
         | 
| 24 27 | 
             
                }
         | 
| 25 28 | 
             
                catch (error) {
         | 
| 26 29 | 
             
                  console.error(error);
         | 
| @@ -69,6 +72,11 @@ const FaqPopupComponent = class { | |
| 69 72 | 
             
                bodySlot.appendChild(linkElement);
         | 
| 70 73 | 
             
                this.modalElement.querySelector('#faq-modal-close').addEventListener('click', this.closeFAQModal);
         | 
| 71 74 | 
             
                this.modalElement.setAttribute('is-open', 'true');
         | 
| 75 | 
            +
                if (this.result) {
         | 
| 76 | 
            +
                  localStorage.setItem(`visited-${this.result.title}`, 'true');
         | 
| 77 | 
            +
                }
         | 
| 78 | 
            +
                // Add the class to change color
         | 
| 79 | 
            +
                this.host.classList.add('visited-title');
         | 
| 72 80 | 
             
              }
         | 
| 73 81 | 
             
              render() {
         | 
| 74 82 | 
             
                if (!this.result) {
         | 
    
        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 | 
             
            }
         |