@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.
@@ -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-39c8295a.js');
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
  };