@coveops/abi 0.1.0 → 0.3.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.esm.js +1 -1
- package/dist/abi/p-27bd9f1c.entry.js +1 -0
- package/dist/abi/p-63fd8dcd.js +66 -0
- package/dist/abi/p-e04b6a2c.entry.js +1 -0
- package/dist/abi/p-fc39046e.entry.js +1 -0
- package/dist/bundle/index.html +1 -1
- package/dist/bundle/index.js +252 -93
- package/dist/cjs/faq-popup-component.cjs.entry.js +11 -4
- package/dist/cjs/{index-39c8295a.js → index-daa118f5.js} +63 -0
- package/dist/cjs/results-manager.cjs.entry.js +10 -10
- package/dist/cjs/sample-component.cjs.entry.js +3 -63
- package/dist/collection/components/faq-popup-component/faq-popup-component.js +11 -3
- package/dist/components/index.js +83 -76
- package/dist/esm/faq-popup-component.entry.js +11 -4
- package/dist/esm/{index-9483cecb.js → index-77ebb3d5.js} +61 -1
- package/dist/esm/results-manager.entry.js +10 -10
- package/dist/esm/sample-component.entry.js +1 -61
- package/package.json +2 -2
- package/src/components/faq-popup-component/faq-popup-component.tsx +14 -3
- package/src/components/results-manager/AppTemplate.html +9 -2
- package/src/components/results-manager/DocumentsTemplate.html +23 -4
- package/src/components/results-manager/ELearningTemplate.html +15 -4
- package/src/components/results-manager/FAQTemplate.html +15 -3
- package/src/components/results-manager/KATemplate.html +51 -13
- package/src/components/results-manager/MediaTemplate.html +1 -1
- package/src/components/results-manager/PeopleTemplate.html +4 -2
- package/src/components/results-manager/QuickLinksTemplate.html +35 -26
- package/src/components/results-manager/SitePagesTemplate.html +40 -7
- package/src/components/results-manager/template-1.html +35 -6
- package/src/pages/index.html +1 -1
- package/dist/abi/p-424e40eb.entry.js +0 -1
- package/dist/abi/p-4da5a336.js +0 -18
- package/dist/abi/p-941f664c.entry.js +0 -1
- package/dist/abi/p-e5564016.entry.js +0 -50
| @@ -1,4 +1,5 @@ | |
| 1 1 | 
             
            import { Component, h, Element, State, Host } from "@stencil/core";
         | 
| 2 | 
            +
            import { loadGenericAnalyticsActions } from '@coveo/headless';
         | 
| 2 3 | 
             
            import { resultContext, initializeBindings } from "@coveo/atomic";
         | 
| 3 4 | 
             
            export class FaqPopupComponent {
         | 
| 4 5 | 
             
              constructor() {
         | 
| @@ -15,15 +16,22 @@ export class FaqPopupComponent { | |
| 15 16 | 
             
                  this.bindings = await initializeBindings(this.host);
         | 
| 16 17 | 
             
                  this.result = await resultContext(this.host);
         | 
| 17 18 | 
             
                  this.modalElement = (_a = this.bindings) === null || _a === void 0 ? void 0 : _a.interfaceElement.querySelector('#faq-modal');
         | 
| 18 | 
            -
                  console.log("this.result", this.result, this.modalElement, this.bindings);
         | 
| 19 19 | 
             
                }
         | 
| 20 20 | 
             
                catch (error) {
         | 
| 21 21 | 
             
                  console.error(error);
         | 
| 22 22 | 
             
                  this.host.remove();
         | 
| 23 23 | 
             
                }
         | 
| 24 24 | 
             
              }
         | 
| 25 | 
            -
              openFAQModal() {
         | 
| 25 | 
            +
              openFAQModal(result) {
         | 
| 26 26 | 
             
                var _a, _b, _c, _d;
         | 
| 27 | 
            +
                if (this.bindings) {
         | 
| 28 | 
            +
                  const { logClickEvent } = loadGenericAnalyticsActions(this.bindings.engine);
         | 
| 29 | 
            +
                  const logClickPayload = {
         | 
| 30 | 
            +
                    evt: 'documentQuickview',
         | 
| 31 | 
            +
                    result: result,
         | 
| 32 | 
            +
                  };
         | 
| 33 | 
            +
                  this.bindings.engine.dispatch(logClickEvent(logClickPayload));
         | 
| 34 | 
            +
                }
         | 
| 27 35 | 
             
                this.modalElement.source = this.host;
         | 
| 28 36 | 
             
                this.modalElement.querySelector('[slot=header]').children[0].innerHTML = 'Question: ' + (((_a = this.result) === null || _a === void 0 ? void 0 : _a.title) || '');
         | 
| 29 37 | 
             
                // Get the body slot
         | 
| @@ -61,7 +69,7 @@ export class FaqPopupComponent { | |
| 61 69 | 
             
                if (!this.result) {
         | 
| 62 70 | 
             
                  return;
         | 
| 63 71 | 
             
                }
         | 
| 64 | 
            -
                return (h(Host, { className: "clickable-host", onClick: () => this.openFAQModal() }, this.result.title));
         | 
| 72 | 
            +
                return (h(Host, { className: "clickable-host", onClick: () => this.openFAQModal(this.result) }, this.result.title));
         | 
| 65 73 | 
             
              }
         | 
| 66 74 | 
             
              static get is() { return "faq-popup-component"; }
         | 
| 67 75 | 
             
              static get encapsulation() { return "shadow"; }
         |