@coveops/abi 0.1.0 → 0.2.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-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 +27 -27
- 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/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 +73 -66
- package/dist/esm/faq-popup-component.entry.js +11 -4
- package/dist/esm/{index-9483cecb.js → index-77ebb3d5.js} +61 -1
- 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/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-e5564016.entry.js +0 -50
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            import { r as registerInstance, h, g as getElement, H as Host } from './index-51334f26.js';
         | 
| 2 | 
            -
            import { b as buildCustomEvent, c as closest, i as initializeBindings } from './index- | 
| 2 | 
            +
            import { b as buildCustomEvent, c as closest, i as initializeBindings, F as Fde } from './index-77ebb3d5.js';
         | 
| 3 3 |  | 
| 4 4 | 
             
            class MissingResultParentError extends Error {
         | 
| 5 5 | 
             
              constructor(elementName) {
         | 
| @@ -47,15 +47,22 @@ const FaqPopupComponent = class { | |
| 47 47 | 
             
                  this.bindings = await initializeBindings(this.host);
         | 
| 48 48 | 
             
                  this.result = await resultContext(this.host);
         | 
| 49 49 | 
             
                  this.modalElement = (_a = this.bindings) === null || _a === void 0 ? void 0 : _a.interfaceElement.querySelector('#faq-modal');
         | 
| 50 | 
            -
                  console.log("this.result", this.result, this.modalElement, this.bindings);
         | 
| 51 50 | 
             
                }
         | 
| 52 51 | 
             
                catch (error) {
         | 
| 53 52 | 
             
                  console.error(error);
         | 
| 54 53 | 
             
                  this.host.remove();
         | 
| 55 54 | 
             
                }
         | 
| 56 55 | 
             
              }
         | 
| 57 | 
            -
              openFAQModal() {
         | 
| 56 | 
            +
              openFAQModal(result) {
         | 
| 58 57 | 
             
                var _a, _b, _c, _d;
         | 
| 58 | 
            +
                if (this.bindings) {
         | 
| 59 | 
            +
                  const { logClickEvent } = Fde(this.bindings.engine);
         | 
| 60 | 
            +
                  const logClickPayload = {
         | 
| 61 | 
            +
                    evt: 'documentQuickview',
         | 
| 62 | 
            +
                    result: result,
         | 
| 63 | 
            +
                  };
         | 
| 64 | 
            +
                  this.bindings.engine.dispatch(logClickEvent(logClickPayload));
         | 
| 65 | 
            +
                }
         | 
| 59 66 | 
             
                this.modalElement.source = this.host;
         | 
| 60 67 | 
             
                this.modalElement.querySelector('[slot=header]').children[0].innerHTML = 'Question: ' + (((_a = this.result) === null || _a === void 0 ? void 0 : _a.title) || '');
         | 
| 61 68 | 
             
                // Get the body slot
         | 
| @@ -93,7 +100,7 @@ const FaqPopupComponent = class { | |
| 93 100 | 
             
                if (!this.result) {
         | 
| 94 101 | 
             
                  return;
         | 
| 95 102 | 
             
                }
         | 
| 96 | 
            -
                return (h(Host, { className: "clickable-host", onClick: () => this.openFAQModal() }, this.result.title));
         | 
| 103 | 
            +
                return (h(Host, { className: "clickable-host", onClick: () => this.openFAQModal(this.result) }, this.result.title));
         | 
| 97 104 | 
             
              }
         | 
| 98 105 | 
             
              get host() { return getElement(this); }
         | 
| 99 106 | 
             
            };
         |