@coveops/abi 1.0.2 → 1.0.4
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/index.esm.js +1 -1
- package/dist/abi/{p-1fd19815.entry.js → p-53221f92.entry.js} +1 -1
- package/dist/abi/p-7f068cc3.entry.js +1 -0
- package/dist/abi/p-8c974da8.entry.js +1 -0
- package/dist/abi/{p-ddacae1a.js → p-b984457f.js} +2 -2
- package/dist/bundle/index.css +1 -1
- package/dist/bundle/index.html +3 -1
- package/dist/bundle/index.js +17 -17
- package/dist/cjs/faq-popup-component.cjs.entry.js +2 -4
- package/dist/cjs/{index-8f6652e1.js → index-20ac4bdb.js} +2 -1
- package/dist/cjs/index.cjs.js +4 -1
- package/dist/cjs/sample-component.cjs.entry.js +1 -1
- package/dist/cjs/standalone-searchbox-listener.cjs.entry.js +7 -6
- package/dist/collection/components/faq-popup-component/faq-popup-component.js +1 -3
- package/dist/collection/components/standalone-searchbox-listener/standalone-searchbox-listener.js +7 -6
- package/dist/collection/index.js +3 -0
- package/dist/components/index.js +12 -10
- package/dist/esm/faq-popup-component.entry.js +2 -4
- package/dist/esm/{index-886ab6f0.js → index-4e0bf5cd.js} +2 -2
- package/dist/esm/index.js +4 -1
- package/dist/esm/sample-component.entry.js +1 -1
- package/dist/esm/standalone-searchbox-listener.entry.js +7 -6
- package/package.json +1 -1
- package/src/components/faq-popup-component/faq-popup-component.tsx +1 -3
- package/src/components/standalone-searchbox-listener/standalone-searchbox-listener.tsx +5 -2
- package/src/index.ts +7 -0
- package/src/pages/index.html +3 -1
- package/src/style/index.css +23 -1
- package/dist/abi/p-50003f11.entry.js +0 -1
- package/dist/abi/p-cd8cdf0e.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ async function main() {
|
|
|
8
8
|
const searchBox = document.querySelector("#searchbox");
|
|
9
9
|
const platformUrl = "https://platform.cloud.coveo.com";
|
|
10
10
|
const organizationId = "anheuserbuschinbevprod";
|
|
11
|
-
const accessToken = "
|
|
11
|
+
const accessToken = "x7e95c452-b717-4459-a9a1-a808b74c2242";
|
|
12
12
|
await searchInterface.initialize({
|
|
13
13
|
accessToken,
|
|
14
14
|
organizationId,
|
|
@@ -26,6 +26,9 @@ async function main() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
searchInterface.executeFirstSearch();
|
|
29
|
+
searchInterface.i18n.addResourceBundle('en', 'translation', {
|
|
30
|
+
'no-results-for': 'No results for {{query}}'
|
|
31
|
+
});
|
|
29
32
|
await searchBox.initialize({
|
|
30
33
|
accessToken,
|
|
31
34
|
organizationId,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-355878fc.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-20ac4bdb.js');
|
|
7
7
|
const atomic = require('./atomic-7321a250.js');
|
|
8
8
|
require('./headless.esm-085e70ed-f2e18485.js');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-355878fc.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-20ac4bdb.js');
|
|
7
7
|
const atomic = require('./atomic-7321a250.js');
|
|
8
8
|
require('./headless.esm-085e70ed-f2e18485.js');
|
|
9
9
|
|
|
@@ -23,15 +23,16 @@ const StandaloneSearchboxListener = class {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
async handleStandaloneSearchbox(ev) {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
27
|
-
debugger;
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
28
27
|
let queryActionCreator = index$1.fce((_a = this.bindings) === null || _a === void 0 ? void 0 : _a.engine);
|
|
29
28
|
(_c = (_b = this.bindings) === null || _b === void 0 ? void 0 : _b.engine) === null || _c === void 0 ? void 0 : _c.dispatch(queryActionCreator.updateQuery({
|
|
30
29
|
q: ev.detail
|
|
31
30
|
}));
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
let paginationActionCreator = index$1.nce((_d = this.bindings) === null || _d === void 0 ? void 0 : _d.engine);
|
|
32
|
+
(_f = (_e = this.bindings) === null || _e === void 0 ? void 0 : _e.engine) === null || _f === void 0 ? void 0 : _f.dispatch(paginationActionCreator.updatePage(1));
|
|
33
|
+
let analyticsActionCreator = index$1.mde((_g = this.bindings) === null || _g === void 0 ? void 0 : _g.engine);
|
|
34
|
+
let searchActionCreator = index$1.$ce((_h = this.bindings) === null || _h === void 0 ? void 0 : _h.engine);
|
|
35
|
+
(_k = (_j = this.bindings) === null || _j === void 0 ? void 0 : _j.engine) === null || _k === void 0 ? void 0 : _k.dispatch(searchActionCreator.executeSearch(analyticsActionCreator.logSearchboxSubmit()));
|
|
35
36
|
}
|
|
36
37
|
render() {
|
|
37
38
|
return (index.h(index.Host, null));
|
|
@@ -43,7 +43,7 @@ export class FaqPopupComponent {
|
|
|
43
43
|
const tableEl = document.createElement('table');
|
|
44
44
|
const questionElement = document.createElement("tr");
|
|
45
45
|
questionElement.className = "question-row";
|
|
46
|
-
questionElement.innerHTML = '<td>Question:
|
|
46
|
+
questionElement.innerHTML = '<td>Question: <a href="https://anheuserbuschinbev.sharepoint.com" autofocus="true" style="display:none;"></a></td> <td>' + (((_a = this.result) === null || _a === void 0 ? void 0 : _a.title) || '') + '</td>'
|
|
47
47
|
+ '<div id="faq-modal-close-button"><svg width="48" height="49" viewBox="0 0 48 49" fill="black" xmlns="http://www.w3.org/2000/svg"><rect y="0.5" width="48" height="48" rx="24" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M22.5382 24.5L15 16.9618L16.4618 15.5L24 23.0382L31.5382 15.5L33 16.9618L25.4618 24.5L33 32.0382L31.5382 33.5L24 25.9618L16.4618 33.5L15 32.0382L22.5382 24.5Z" fill="#17171A"/></svg></div>';
|
|
48
48
|
tableEl.appendChild(questionElement);
|
|
49
49
|
const answerElement = document.createElement('tr');
|
|
@@ -53,7 +53,6 @@ export class FaqPopupComponent {
|
|
|
53
53
|
answerElement.appendChild(answerTitleElement);
|
|
54
54
|
// Create a new element to contain the answer content
|
|
55
55
|
const answerContentElement = document.createElement('td');
|
|
56
|
-
debugger;
|
|
57
56
|
if ((_c = (_b = this.result) === null || _b === void 0 ? void 0 : _b.raw) === null || _c === void 0 ? void 0 : _c.answer) {
|
|
58
57
|
let value = (_e = (_d = this.result) === null || _d === void 0 ? void 0 : _d.raw) === null || _e === void 0 ? void 0 : _e.answer;
|
|
59
58
|
try {
|
|
@@ -61,7 +60,6 @@ export class FaqPopupComponent {
|
|
|
61
60
|
var html = '';
|
|
62
61
|
Array.from(els.children).forEach(el => {
|
|
63
62
|
var _a;
|
|
64
|
-
debugger;
|
|
65
63
|
el.querySelectorAll('a').forEach(a => {
|
|
66
64
|
if (a.href.startsWith(window.location.origin) && a.href.indexOf('/sites/') > -1) {
|
|
67
65
|
a.href = a.href.replace(window.location.origin, 'https://anheuserbuschinbev.sharepoint.com');
|
package/dist/collection/components/standalone-searchbox-listener/standalone-searchbox-listener.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { initializeBindings } from "@coveo/atomic";
|
|
2
2
|
import { Component, Element, h, Host, Listen } from "@stencil/core";
|
|
3
3
|
import { waitForAtomic } from "../../utils/atomic";
|
|
4
|
-
import { loadQueryActions, loadSearchActions, loadSearchAnalyticsActions } from "@coveo/headless";
|
|
4
|
+
import { loadPaginationActions, loadQueryActions, loadSearchActions, loadSearchAnalyticsActions } from "@coveo/headless";
|
|
5
5
|
export class StandaloneSearchboxListener {
|
|
6
6
|
async connectedCallback() {
|
|
7
7
|
try {
|
|
@@ -13,15 +13,16 @@ export class StandaloneSearchboxListener {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
async handleStandaloneSearchbox(ev) {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
17
|
-
debugger;
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
18
17
|
let queryActionCreator = loadQueryActions((_a = this.bindings) === null || _a === void 0 ? void 0 : _a.engine);
|
|
19
18
|
(_c = (_b = this.bindings) === null || _b === void 0 ? void 0 : _b.engine) === null || _c === void 0 ? void 0 : _c.dispatch(queryActionCreator.updateQuery({
|
|
20
19
|
q: ev.detail
|
|
21
20
|
}));
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
let paginationActionCreator = loadPaginationActions((_d = this.bindings) === null || _d === void 0 ? void 0 : _d.engine);
|
|
22
|
+
(_f = (_e = this.bindings) === null || _e === void 0 ? void 0 : _e.engine) === null || _f === void 0 ? void 0 : _f.dispatch(paginationActionCreator.updatePage(1));
|
|
23
|
+
let analyticsActionCreator = loadSearchAnalyticsActions((_g = this.bindings) === null || _g === void 0 ? void 0 : _g.engine);
|
|
24
|
+
let searchActionCreator = loadSearchActions((_h = this.bindings) === null || _h === void 0 ? void 0 : _h.engine);
|
|
25
|
+
(_k = (_j = this.bindings) === null || _j === void 0 ? void 0 : _j.engine) === null || _k === void 0 ? void 0 : _k.dispatch(searchActionCreator.executeSearch(analyticsActionCreator.logSearchboxSubmit()));
|
|
25
26
|
}
|
|
26
27
|
render() {
|
|
27
28
|
return (h(Host, null));
|
package/dist/collection/index.js
CHANGED
|
@@ -23,6 +23,9 @@ async function main() {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
searchInterface.executeFirstSearch();
|
|
26
|
+
searchInterface.i18n.addResourceBundle('en', 'translation', {
|
|
27
|
+
'no-results-for': 'No results for {{query}}'
|
|
28
|
+
});
|
|
26
29
|
await searchBox.initialize({
|
|
27
30
|
accessToken,
|
|
28
31
|
organizationId,
|