@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
| @@ -3,7 +3,7 @@ | |
| 3 3 | 
             
            Object.defineProperty(exports, '__esModule', { value: true });
         | 
| 4 4 |  | 
| 5 5 | 
             
            const index$1 = require('./index-bea59ea1.js');
         | 
| 6 | 
            -
            const index = require('./index- | 
| 6 | 
            +
            const index = require('./index-daa118f5.js');
         | 
| 7 7 |  | 
| 8 8 | 
             
            class MissingResultParentError extends Error {
         | 
| 9 9 | 
             
              constructor(elementName) {
         | 
| @@ -51,15 +51,22 @@ const FaqPopupComponent = class { | |
| 51 51 | 
             
                  this.bindings = await index.initializeBindings(this.host);
         | 
| 52 52 | 
             
                  this.result = await resultContext(this.host);
         | 
| 53 53 | 
             
                  this.modalElement = (_a = this.bindings) === null || _a === void 0 ? void 0 : _a.interfaceElement.querySelector('#faq-modal');
         | 
| 54 | 
            -
                  console.log("this.result", this.result, this.modalElement, this.bindings);
         | 
| 55 54 | 
             
                }
         | 
| 56 55 | 
             
                catch (error) {
         | 
| 57 56 | 
             
                  console.error(error);
         | 
| 58 57 | 
             
                  this.host.remove();
         | 
| 59 58 | 
             
                }
         | 
| 60 59 | 
             
              }
         | 
| 61 | 
            -
              openFAQModal() {
         | 
| 60 | 
            +
              openFAQModal(result) {
         | 
| 62 61 | 
             
                var _a, _b, _c, _d;
         | 
| 62 | 
            +
                if (this.bindings) {
         | 
| 63 | 
            +
                  const { logClickEvent } = index.Fde(this.bindings.engine);
         | 
| 64 | 
            +
                  const logClickPayload = {
         | 
| 65 | 
            +
                    evt: 'documentQuickview',
         | 
| 66 | 
            +
                    result: result,
         | 
| 67 | 
            +
                  };
         | 
| 68 | 
            +
                  this.bindings.engine.dispatch(logClickEvent(logClickPayload));
         | 
| 69 | 
            +
                }
         | 
| 63 70 | 
             
                this.modalElement.source = this.host;
         | 
| 64 71 | 
             
                this.modalElement.querySelector('[slot=header]').children[0].innerHTML = 'Question: ' + (((_a = this.result) === null || _a === void 0 ? void 0 : _a.title) || '');
         | 
| 65 72 | 
             
                // Get the body slot
         | 
| @@ -97,7 +104,7 @@ const FaqPopupComponent = class { | |
| 97 104 | 
             
                if (!this.result) {
         | 
| 98 105 | 
             
                  return;
         | 
| 99 106 | 
             
                }
         | 
| 100 | 
            -
                return (index$1.h(index$1.Host, { className: "clickable-host", onClick: () => this.openFAQModal() }, this.result.title));
         | 
| 107 | 
            +
                return (index$1.h(index$1.Host, { className: "clickable-host", onClick: () => this.openFAQModal(this.result) }, this.result.title));
         | 
| 101 108 | 
             
              }
         | 
| 102 109 | 
             
              get host() { return index$1.getElement(this); }
         | 
| 103 110 | 
             
            };
         |