coveo.analytics 2.23.6 → 2.23.7
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/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +855 -209
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/client/analytics.d.ts +18 -5
- package/dist/definitions/client/noopAnalytics.d.ts +7 -2
- package/dist/definitions/events.d.ts +8 -0
- package/dist/definitions/searchPage/searchPageClient.d.ts +75 -77
- package/dist/library.es.js +360 -142
- package/dist/library.js +855 -209
- package/dist/react-native.es.js +360 -142
- package/package.json +1 -1
- package/src/client/analytics.ts +75 -16
- package/src/client/noopAnalytics.ts +27 -1
- package/src/events.ts +8 -0
- package/src/searchPage/searchPageClient.spec.ts +176 -143
- package/src/searchPage/searchPageClient.ts +227 -205
package/dist/coveoua.debug.js
CHANGED
|
@@ -1319,13 +1319,14 @@
|
|
|
1319
1319
|
});
|
|
1320
1320
|
});
|
|
1321
1321
|
};
|
|
1322
|
-
CoveoAnalyticsClient.prototype.
|
|
1322
|
+
CoveoAnalyticsClient.prototype.makeEvent = function (eventType) {
|
|
1323
1323
|
var payload = [];
|
|
1324
1324
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1325
1325
|
payload[_i - 1] = arguments[_i];
|
|
1326
1326
|
}
|
|
1327
1327
|
return __awaiter(this, void 0, void 0, function () {
|
|
1328
1328
|
var _a, eventTypeToSend, parametersToSend, payloadToSend;
|
|
1329
|
+
var _this = this;
|
|
1329
1330
|
return __generator(this, function (_b) {
|
|
1330
1331
|
switch (_b.label) {
|
|
1331
1332
|
case 0:
|
|
@@ -1336,18 +1337,43 @@
|
|
|
1336
1337
|
return [4, this.resolvePayloadForParameters(eventType, parametersToSend)];
|
|
1337
1338
|
case 2:
|
|
1338
1339
|
payloadToSend = _b.sent();
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1340
|
+
return [2, {
|
|
1341
|
+
eventType: eventTypeToSend,
|
|
1342
|
+
payload: payloadToSend,
|
|
1343
|
+
log: function (remainingPayload) { return __awaiter(_this, void 0, void 0, function () {
|
|
1344
|
+
return __generator(this, function (_a) {
|
|
1345
|
+
switch (_a.label) {
|
|
1346
|
+
case 0:
|
|
1347
|
+
this.bufferedRequests.push({
|
|
1348
|
+
eventType: eventTypeToSend,
|
|
1349
|
+
payload: __assign(__assign({}, payloadToSend), remainingPayload),
|
|
1350
|
+
});
|
|
1351
|
+
return [4, Promise.all(this.afterSendHooks.map(function (hook) { return hook(eventType, __assign(__assign({}, parametersToSend), remainingPayload)); }))];
|
|
1352
|
+
case 1:
|
|
1353
|
+
_a.sent();
|
|
1354
|
+
return [4, this.deferExecution()];
|
|
1355
|
+
case 2:
|
|
1356
|
+
_a.sent();
|
|
1357
|
+
return [4, this.sendFromBufferWithFetch()];
|
|
1358
|
+
case 3: return [2, (_a.sent())];
|
|
1359
|
+
}
|
|
1360
|
+
});
|
|
1361
|
+
}); },
|
|
1362
|
+
}];
|
|
1363
|
+
}
|
|
1364
|
+
});
|
|
1365
|
+
});
|
|
1366
|
+
};
|
|
1367
|
+
CoveoAnalyticsClient.prototype.sendEvent = function (eventType) {
|
|
1368
|
+
var payload = [];
|
|
1369
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1370
|
+
payload[_i - 1] = arguments[_i];
|
|
1371
|
+
}
|
|
1372
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1373
|
+
return __generator(this, function (_a) {
|
|
1374
|
+
switch (_a.label) {
|
|
1375
|
+
case 0: return [4, this.makeEvent.apply(this, __spreadArrays([eventType], payload))];
|
|
1376
|
+
case 1: return [2, (_a.sent()).log({})];
|
|
1351
1377
|
}
|
|
1352
1378
|
});
|
|
1353
1379
|
});
|
|
@@ -1376,31 +1402,74 @@
|
|
|
1376
1402
|
CoveoAnalyticsClient.prototype.deleteHttpOnlyVisitorId = function () {
|
|
1377
1403
|
this.runtime.client.deleteHttpCookieVisitorId();
|
|
1378
1404
|
};
|
|
1379
|
-
CoveoAnalyticsClient.prototype.
|
|
1405
|
+
CoveoAnalyticsClient.prototype.makeSearchEvent = function (request) {
|
|
1380
1406
|
return __awaiter(this, void 0, void 0, function () {
|
|
1381
1407
|
return __generator(this, function (_a) {
|
|
1382
|
-
return [2, this.
|
|
1408
|
+
return [2, this.makeEvent(EventType.search, request)];
|
|
1409
|
+
});
|
|
1410
|
+
});
|
|
1411
|
+
};
|
|
1412
|
+
CoveoAnalyticsClient.prototype.sendSearchEvent = function (_a) {
|
|
1413
|
+
var searchQueryUid = _a.searchQueryUid, preparedRequest = __rest(_a, ["searchQueryUid"]);
|
|
1414
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1415
|
+
return __generator(this, function (_b) {
|
|
1416
|
+
switch (_b.label) {
|
|
1417
|
+
case 0: return [4, this.makeSearchEvent(preparedRequest)];
|
|
1418
|
+
case 1: return [2, (_b.sent()).log({ searchQueryUid: searchQueryUid })];
|
|
1419
|
+
}
|
|
1420
|
+
});
|
|
1421
|
+
});
|
|
1422
|
+
};
|
|
1423
|
+
CoveoAnalyticsClient.prototype.makeClickEvent = function (request) {
|
|
1424
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1425
|
+
return __generator(this, function (_a) {
|
|
1426
|
+
return [2, this.makeEvent(EventType.click, request)];
|
|
1427
|
+
});
|
|
1428
|
+
});
|
|
1429
|
+
};
|
|
1430
|
+
CoveoAnalyticsClient.prototype.sendClickEvent = function (_a) {
|
|
1431
|
+
var searchQueryUid = _a.searchQueryUid, preparedRequest = __rest(_a, ["searchQueryUid"]);
|
|
1432
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1433
|
+
return __generator(this, function (_b) {
|
|
1434
|
+
switch (_b.label) {
|
|
1435
|
+
case 0: return [4, this.makeClickEvent(preparedRequest)];
|
|
1436
|
+
case 1: return [2, (_b.sent()).log({ searchQueryUid: searchQueryUid })];
|
|
1437
|
+
}
|
|
1383
1438
|
});
|
|
1384
1439
|
});
|
|
1385
1440
|
};
|
|
1386
|
-
CoveoAnalyticsClient.prototype.
|
|
1441
|
+
CoveoAnalyticsClient.prototype.makeCustomEvent = function (request) {
|
|
1387
1442
|
return __awaiter(this, void 0, void 0, function () {
|
|
1388
1443
|
return __generator(this, function (_a) {
|
|
1389
|
-
return [2, this.
|
|
1444
|
+
return [2, this.makeEvent(EventType.custom, request)];
|
|
1445
|
+
});
|
|
1446
|
+
});
|
|
1447
|
+
};
|
|
1448
|
+
CoveoAnalyticsClient.prototype.sendCustomEvent = function (_a) {
|
|
1449
|
+
var lastSearchQueryUid = _a.lastSearchQueryUid, preparedRequest = __rest(_a, ["lastSearchQueryUid"]);
|
|
1450
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1451
|
+
return __generator(this, function (_b) {
|
|
1452
|
+
switch (_b.label) {
|
|
1453
|
+
case 0: return [4, this.makeCustomEvent(preparedRequest)];
|
|
1454
|
+
case 1: return [2, (_b.sent()).log({ lastSearchQueryUid: lastSearchQueryUid })];
|
|
1455
|
+
}
|
|
1390
1456
|
});
|
|
1391
1457
|
});
|
|
1392
1458
|
};
|
|
1393
|
-
CoveoAnalyticsClient.prototype.
|
|
1459
|
+
CoveoAnalyticsClient.prototype.makeViewEvent = function (request) {
|
|
1394
1460
|
return __awaiter(this, void 0, void 0, function () {
|
|
1395
1461
|
return __generator(this, function (_a) {
|
|
1396
|
-
return [2, this.
|
|
1462
|
+
return [2, this.makeEvent(EventType.view, request)];
|
|
1397
1463
|
});
|
|
1398
1464
|
});
|
|
1399
1465
|
};
|
|
1400
1466
|
CoveoAnalyticsClient.prototype.sendViewEvent = function (request) {
|
|
1401
1467
|
return __awaiter(this, void 0, void 0, function () {
|
|
1402
1468
|
return __generator(this, function (_a) {
|
|
1403
|
-
|
|
1469
|
+
switch (_a.label) {
|
|
1470
|
+
case 0: return [4, this.makeViewEvent(request)];
|
|
1471
|
+
case 1: return [2, (_a.sent()).log({})];
|
|
1472
|
+
}
|
|
1404
1473
|
});
|
|
1405
1474
|
});
|
|
1406
1475
|
};
|
|
@@ -2157,18 +2226,33 @@
|
|
|
2157
2226
|
NoopAnalytics.prototype.getParameters = function () {
|
|
2158
2227
|
return Promise.resolve();
|
|
2159
2228
|
};
|
|
2229
|
+
NoopAnalytics.prototype.makeEvent = function (eventType) {
|
|
2230
|
+
return Promise.resolve({ eventType: eventType, payload: null, log: function () { return Promise.resolve(); } });
|
|
2231
|
+
};
|
|
2160
2232
|
NoopAnalytics.prototype.sendEvent = function () {
|
|
2161
2233
|
return Promise.resolve();
|
|
2162
2234
|
};
|
|
2235
|
+
NoopAnalytics.prototype.makeSearchEvent = function () {
|
|
2236
|
+
return this.makeEvent(EventType.search);
|
|
2237
|
+
};
|
|
2163
2238
|
NoopAnalytics.prototype.sendSearchEvent = function () {
|
|
2164
2239
|
return Promise.resolve();
|
|
2165
2240
|
};
|
|
2241
|
+
NoopAnalytics.prototype.makeClickEvent = function () {
|
|
2242
|
+
return this.makeEvent(EventType.click);
|
|
2243
|
+
};
|
|
2166
2244
|
NoopAnalytics.prototype.sendClickEvent = function () {
|
|
2167
2245
|
return Promise.resolve();
|
|
2168
2246
|
};
|
|
2247
|
+
NoopAnalytics.prototype.makeCustomEvent = function () {
|
|
2248
|
+
return this.makeEvent(EventType.custom);
|
|
2249
|
+
};
|
|
2169
2250
|
NoopAnalytics.prototype.sendCustomEvent = function () {
|
|
2170
2251
|
return Promise.resolve();
|
|
2171
2252
|
};
|
|
2253
|
+
NoopAnalytics.prototype.makeViewEvent = function () {
|
|
2254
|
+
return this.makeEvent(EventType.view);
|
|
2255
|
+
};
|
|
2172
2256
|
NoopAnalytics.prototype.sendViewEvent = function () {
|
|
2173
2257
|
return Promise.resolve();
|
|
2174
2258
|
};
|
|
@@ -2240,388 +2324,826 @@
|
|
|
2240
2324
|
return this.makeSearchEvent(SearchPageEvents.interfaceLoad);
|
|
2241
2325
|
};
|
|
2242
2326
|
CoveoSearchPageClient.prototype.logInterfaceLoad = function () {
|
|
2243
|
-
return this
|
|
2327
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2328
|
+
return __generator(this, function (_a) {
|
|
2329
|
+
switch (_a.label) {
|
|
2330
|
+
case 0: return [4, this.makeInterfaceLoad()];
|
|
2331
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2332
|
+
}
|
|
2333
|
+
});
|
|
2334
|
+
});
|
|
2244
2335
|
};
|
|
2245
2336
|
CoveoSearchPageClient.prototype.makeRecommendationInterfaceLoad = function () {
|
|
2246
2337
|
return this.makeSearchEvent(SearchPageEvents.recommendationInterfaceLoad);
|
|
2247
2338
|
};
|
|
2248
2339
|
CoveoSearchPageClient.prototype.logRecommendationInterfaceLoad = function () {
|
|
2249
|
-
return this
|
|
2340
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2341
|
+
return __generator(this, function (_a) {
|
|
2342
|
+
switch (_a.label) {
|
|
2343
|
+
case 0: return [4, this.makeRecommendationInterfaceLoad()];
|
|
2344
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2345
|
+
}
|
|
2346
|
+
});
|
|
2347
|
+
});
|
|
2250
2348
|
};
|
|
2251
2349
|
CoveoSearchPageClient.prototype.makeRecommendation = function () {
|
|
2252
2350
|
return this.makeCustomEvent(SearchPageEvents.recommendation);
|
|
2253
2351
|
};
|
|
2254
2352
|
CoveoSearchPageClient.prototype.logRecommendation = function () {
|
|
2255
|
-
return this
|
|
2353
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2354
|
+
return __generator(this, function (_a) {
|
|
2355
|
+
switch (_a.label) {
|
|
2356
|
+
case 0: return [4, this.makeRecommendation()];
|
|
2357
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2358
|
+
}
|
|
2359
|
+
});
|
|
2360
|
+
});
|
|
2256
2361
|
};
|
|
2257
2362
|
CoveoSearchPageClient.prototype.makeRecommendationOpen = function (info, identifier) {
|
|
2258
2363
|
return this.makeClickEvent(SearchPageEvents.recommendationOpen, info, identifier);
|
|
2259
2364
|
};
|
|
2260
2365
|
CoveoSearchPageClient.prototype.logRecommendationOpen = function (info, identifier) {
|
|
2261
|
-
return this
|
|
2366
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2367
|
+
return __generator(this, function (_a) {
|
|
2368
|
+
switch (_a.label) {
|
|
2369
|
+
case 0: return [4, this.makeRecommendationOpen(info, identifier)];
|
|
2370
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2371
|
+
}
|
|
2372
|
+
});
|
|
2373
|
+
});
|
|
2262
2374
|
};
|
|
2263
2375
|
CoveoSearchPageClient.prototype.makeStaticFilterClearAll = function (meta) {
|
|
2264
2376
|
return this.makeSearchEvent(SearchPageEvents.staticFilterClearAll, meta);
|
|
2265
2377
|
};
|
|
2266
2378
|
CoveoSearchPageClient.prototype.logStaticFilterClearAll = function (meta) {
|
|
2267
|
-
return this
|
|
2379
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2380
|
+
return __generator(this, function (_a) {
|
|
2381
|
+
switch (_a.label) {
|
|
2382
|
+
case 0: return [4, this.makeStaticFilterClearAll(meta)];
|
|
2383
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2384
|
+
}
|
|
2385
|
+
});
|
|
2386
|
+
});
|
|
2268
2387
|
};
|
|
2269
2388
|
CoveoSearchPageClient.prototype.makeStaticFilterSelect = function (meta) {
|
|
2270
2389
|
return this.makeSearchEvent(SearchPageEvents.staticFilterSelect, meta);
|
|
2271
2390
|
};
|
|
2272
2391
|
CoveoSearchPageClient.prototype.logStaticFilterSelect = function (meta) {
|
|
2273
|
-
return this
|
|
2392
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2393
|
+
return __generator(this, function (_a) {
|
|
2394
|
+
switch (_a.label) {
|
|
2395
|
+
case 0: return [4, this.makeStaticFilterSelect(meta)];
|
|
2396
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2397
|
+
}
|
|
2398
|
+
});
|
|
2399
|
+
});
|
|
2274
2400
|
};
|
|
2275
2401
|
CoveoSearchPageClient.prototype.makeStaticFilterDeselect = function (meta) {
|
|
2276
2402
|
return this.makeSearchEvent(SearchPageEvents.staticFilterDeselect, meta);
|
|
2277
2403
|
};
|
|
2278
2404
|
CoveoSearchPageClient.prototype.logStaticFilterDeselect = function (meta) {
|
|
2279
|
-
return this
|
|
2405
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2406
|
+
return __generator(this, function (_a) {
|
|
2407
|
+
switch (_a.label) {
|
|
2408
|
+
case 0: return [4, this.makeStaticFilterDeselect(meta)];
|
|
2409
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2410
|
+
}
|
|
2411
|
+
});
|
|
2412
|
+
});
|
|
2280
2413
|
};
|
|
2281
2414
|
CoveoSearchPageClient.prototype.makeFetchMoreResults = function () {
|
|
2282
2415
|
return this.makeCustomEvent(SearchPageEvents.pagerScrolling, { type: 'getMoreResults' });
|
|
2283
2416
|
};
|
|
2284
2417
|
CoveoSearchPageClient.prototype.logFetchMoreResults = function () {
|
|
2285
|
-
return this
|
|
2418
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2419
|
+
return __generator(this, function (_a) {
|
|
2420
|
+
switch (_a.label) {
|
|
2421
|
+
case 0: return [4, this.makeFetchMoreResults()];
|
|
2422
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
});
|
|
2286
2426
|
};
|
|
2287
2427
|
CoveoSearchPageClient.prototype.makeInterfaceChange = function (metadata) {
|
|
2288
2428
|
return this.makeSearchEvent(SearchPageEvents.interfaceChange, metadata);
|
|
2289
2429
|
};
|
|
2290
2430
|
CoveoSearchPageClient.prototype.logInterfaceChange = function (metadata) {
|
|
2291
|
-
return this
|
|
2431
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2432
|
+
return __generator(this, function (_a) {
|
|
2433
|
+
switch (_a.label) {
|
|
2434
|
+
case 0: return [4, this.makeInterfaceChange(metadata)];
|
|
2435
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
});
|
|
2292
2439
|
};
|
|
2293
2440
|
CoveoSearchPageClient.prototype.makeDidYouMeanAutomatic = function () {
|
|
2294
2441
|
return this.makeSearchEvent(SearchPageEvents.didyoumeanAutomatic);
|
|
2295
2442
|
};
|
|
2296
2443
|
CoveoSearchPageClient.prototype.logDidYouMeanAutomatic = function () {
|
|
2297
|
-
return this
|
|
2444
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2445
|
+
return __generator(this, function (_a) {
|
|
2446
|
+
switch (_a.label) {
|
|
2447
|
+
case 0: return [4, this.makeDidYouMeanAutomatic()];
|
|
2448
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2449
|
+
}
|
|
2450
|
+
});
|
|
2451
|
+
});
|
|
2298
2452
|
};
|
|
2299
2453
|
CoveoSearchPageClient.prototype.makeDidYouMeanClick = function () {
|
|
2300
2454
|
return this.makeSearchEvent(SearchPageEvents.didyoumeanClick);
|
|
2301
2455
|
};
|
|
2302
2456
|
CoveoSearchPageClient.prototype.logDidYouMeanClick = function () {
|
|
2303
|
-
return this
|
|
2457
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2458
|
+
return __generator(this, function (_a) {
|
|
2459
|
+
switch (_a.label) {
|
|
2460
|
+
case 0: return [4, this.makeDidYouMeanClick()];
|
|
2461
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2462
|
+
}
|
|
2463
|
+
});
|
|
2464
|
+
});
|
|
2304
2465
|
};
|
|
2305
2466
|
CoveoSearchPageClient.prototype.makeResultsSort = function (metadata) {
|
|
2306
2467
|
return this.makeSearchEvent(SearchPageEvents.resultsSort, metadata);
|
|
2307
2468
|
};
|
|
2308
2469
|
CoveoSearchPageClient.prototype.logResultsSort = function (metadata) {
|
|
2309
|
-
return this
|
|
2470
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2471
|
+
return __generator(this, function (_a) {
|
|
2472
|
+
switch (_a.label) {
|
|
2473
|
+
case 0: return [4, this.makeResultsSort(metadata)];
|
|
2474
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2475
|
+
}
|
|
2476
|
+
});
|
|
2477
|
+
});
|
|
2310
2478
|
};
|
|
2311
2479
|
CoveoSearchPageClient.prototype.makeSearchboxSubmit = function () {
|
|
2312
2480
|
return this.makeSearchEvent(SearchPageEvents.searchboxSubmit);
|
|
2313
2481
|
};
|
|
2314
2482
|
CoveoSearchPageClient.prototype.logSearchboxSubmit = function () {
|
|
2315
|
-
return this
|
|
2483
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2484
|
+
return __generator(this, function (_a) {
|
|
2485
|
+
switch (_a.label) {
|
|
2486
|
+
case 0: return [4, this.makeSearchboxSubmit()];
|
|
2487
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2488
|
+
}
|
|
2489
|
+
});
|
|
2490
|
+
});
|
|
2316
2491
|
};
|
|
2317
2492
|
CoveoSearchPageClient.prototype.makeSearchboxClear = function () {
|
|
2318
2493
|
return this.makeSearchEvent(SearchPageEvents.searchboxClear);
|
|
2319
2494
|
};
|
|
2320
2495
|
CoveoSearchPageClient.prototype.logSearchboxClear = function () {
|
|
2321
|
-
return this
|
|
2496
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2497
|
+
return __generator(this, function (_a) {
|
|
2498
|
+
switch (_a.label) {
|
|
2499
|
+
case 0: return [4, this.makeSearchboxClear()];
|
|
2500
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2501
|
+
}
|
|
2502
|
+
});
|
|
2503
|
+
});
|
|
2322
2504
|
};
|
|
2323
2505
|
CoveoSearchPageClient.prototype.makeSearchboxAsYouType = function () {
|
|
2324
2506
|
return this.makeSearchEvent(SearchPageEvents.searchboxAsYouType);
|
|
2325
2507
|
};
|
|
2326
2508
|
CoveoSearchPageClient.prototype.logSearchboxAsYouType = function () {
|
|
2327
|
-
return this
|
|
2509
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2510
|
+
return __generator(this, function (_a) {
|
|
2511
|
+
switch (_a.label) {
|
|
2512
|
+
case 0: return [4, this.makeSearchboxAsYouType()];
|
|
2513
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2514
|
+
}
|
|
2515
|
+
});
|
|
2516
|
+
});
|
|
2328
2517
|
};
|
|
2329
2518
|
CoveoSearchPageClient.prototype.makeBreadcrumbFacet = function (metadata) {
|
|
2330
2519
|
return this.makeSearchEvent(SearchPageEvents.breadcrumbFacet, metadata);
|
|
2331
2520
|
};
|
|
2332
2521
|
CoveoSearchPageClient.prototype.logBreadcrumbFacet = function (metadata) {
|
|
2333
|
-
return this
|
|
2522
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2523
|
+
return __generator(this, function (_a) {
|
|
2524
|
+
switch (_a.label) {
|
|
2525
|
+
case 0: return [4, this.makeBreadcrumbFacet(metadata)];
|
|
2526
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2527
|
+
}
|
|
2528
|
+
});
|
|
2529
|
+
});
|
|
2334
2530
|
};
|
|
2335
2531
|
CoveoSearchPageClient.prototype.makeBreadcrumbResetAll = function () {
|
|
2336
2532
|
return this.makeSearchEvent(SearchPageEvents.breadcrumbResetAll);
|
|
2337
2533
|
};
|
|
2338
2534
|
CoveoSearchPageClient.prototype.logBreadcrumbResetAll = function () {
|
|
2339
|
-
return this
|
|
2535
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2536
|
+
return __generator(this, function (_a) {
|
|
2537
|
+
switch (_a.label) {
|
|
2538
|
+
case 0: return [4, this.makeBreadcrumbResetAll()];
|
|
2539
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2542
|
+
});
|
|
2340
2543
|
};
|
|
2341
2544
|
CoveoSearchPageClient.prototype.makeDocumentQuickview = function (info, identifier) {
|
|
2342
2545
|
return this.makeClickEvent(SearchPageEvents.documentQuickview, info, identifier);
|
|
2343
2546
|
};
|
|
2344
2547
|
CoveoSearchPageClient.prototype.logDocumentQuickview = function (info, identifier) {
|
|
2345
|
-
return this
|
|
2548
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2549
|
+
return __generator(this, function (_a) {
|
|
2550
|
+
switch (_a.label) {
|
|
2551
|
+
case 0: return [4, this.makeDocumentQuickview(info, identifier)];
|
|
2552
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2553
|
+
}
|
|
2554
|
+
});
|
|
2555
|
+
});
|
|
2346
2556
|
};
|
|
2347
2557
|
CoveoSearchPageClient.prototype.makeDocumentOpen = function (info, identifier) {
|
|
2348
2558
|
return this.makeClickEvent(SearchPageEvents.documentOpen, info, identifier);
|
|
2349
2559
|
};
|
|
2350
2560
|
CoveoSearchPageClient.prototype.logDocumentOpen = function (info, identifier) {
|
|
2351
|
-
return this
|
|
2561
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2562
|
+
return __generator(this, function (_a) {
|
|
2563
|
+
switch (_a.label) {
|
|
2564
|
+
case 0: return [4, this.makeDocumentOpen(info, identifier)];
|
|
2565
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2566
|
+
}
|
|
2567
|
+
});
|
|
2568
|
+
});
|
|
2352
2569
|
};
|
|
2353
2570
|
CoveoSearchPageClient.prototype.makeOmniboxAnalytics = function (meta) {
|
|
2354
2571
|
return this.makeSearchEvent(SearchPageEvents.omniboxAnalytics, formatOmniboxMetadata(meta));
|
|
2355
2572
|
};
|
|
2356
2573
|
CoveoSearchPageClient.prototype.logOmniboxAnalytics = function (meta) {
|
|
2357
|
-
return this
|
|
2574
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2575
|
+
return __generator(this, function (_a) {
|
|
2576
|
+
switch (_a.label) {
|
|
2577
|
+
case 0: return [4, this.makeOmniboxAnalytics(meta)];
|
|
2578
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2579
|
+
}
|
|
2580
|
+
});
|
|
2581
|
+
});
|
|
2358
2582
|
};
|
|
2359
2583
|
CoveoSearchPageClient.prototype.makeOmniboxFromLink = function (meta) {
|
|
2360
2584
|
return this.makeSearchEvent(SearchPageEvents.omniboxFromLink, formatOmniboxMetadata(meta));
|
|
2361
2585
|
};
|
|
2362
2586
|
CoveoSearchPageClient.prototype.logOmniboxFromLink = function (meta) {
|
|
2363
|
-
return this
|
|
2587
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2588
|
+
return __generator(this, function (_a) {
|
|
2589
|
+
switch (_a.label) {
|
|
2590
|
+
case 0: return [4, this.makeOmniboxFromLink(meta)];
|
|
2591
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2592
|
+
}
|
|
2593
|
+
});
|
|
2594
|
+
});
|
|
2364
2595
|
};
|
|
2365
2596
|
CoveoSearchPageClient.prototype.makeSearchFromLink = function () {
|
|
2366
2597
|
return this.makeSearchEvent(SearchPageEvents.searchFromLink);
|
|
2367
2598
|
};
|
|
2368
2599
|
CoveoSearchPageClient.prototype.logSearchFromLink = function () {
|
|
2369
|
-
return this
|
|
2600
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2601
|
+
return __generator(this, function (_a) {
|
|
2602
|
+
switch (_a.label) {
|
|
2603
|
+
case 0: return [4, this.makeSearchFromLink()];
|
|
2604
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2605
|
+
}
|
|
2606
|
+
});
|
|
2607
|
+
});
|
|
2370
2608
|
};
|
|
2371
2609
|
CoveoSearchPageClient.prototype.makeTriggerNotify = function (meta) {
|
|
2372
2610
|
return this.makeCustomEvent(SearchPageEvents.triggerNotify, meta);
|
|
2373
2611
|
};
|
|
2374
2612
|
CoveoSearchPageClient.prototype.logTriggerNotify = function (meta) {
|
|
2375
|
-
return this
|
|
2613
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2614
|
+
return __generator(this, function (_a) {
|
|
2615
|
+
switch (_a.label) {
|
|
2616
|
+
case 0: return [4, this.makeTriggerNotify(meta)];
|
|
2617
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2618
|
+
}
|
|
2619
|
+
});
|
|
2620
|
+
});
|
|
2376
2621
|
};
|
|
2377
2622
|
CoveoSearchPageClient.prototype.makeTriggerExecute = function (meta) {
|
|
2378
2623
|
return this.makeCustomEvent(SearchPageEvents.triggerExecute, meta);
|
|
2379
2624
|
};
|
|
2380
2625
|
CoveoSearchPageClient.prototype.logTriggerExecute = function (meta) {
|
|
2381
|
-
return this
|
|
2626
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2627
|
+
return __generator(this, function (_a) {
|
|
2628
|
+
switch (_a.label) {
|
|
2629
|
+
case 0: return [4, this.makeTriggerExecute(meta)];
|
|
2630
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2631
|
+
}
|
|
2632
|
+
});
|
|
2633
|
+
});
|
|
2382
2634
|
};
|
|
2383
2635
|
CoveoSearchPageClient.prototype.makeTriggerQuery = function () {
|
|
2384
2636
|
return this.makeCustomEvent(SearchPageEvents.triggerQuery, { query: this.provider.getSearchEventRequestPayload().queryText }, 'queryPipelineTriggers');
|
|
2385
2637
|
};
|
|
2386
2638
|
CoveoSearchPageClient.prototype.logTriggerQuery = function () {
|
|
2387
|
-
return this
|
|
2639
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2640
|
+
return __generator(this, function (_a) {
|
|
2641
|
+
switch (_a.label) {
|
|
2642
|
+
case 0: return [4, this.makeTriggerQuery()];
|
|
2643
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2644
|
+
}
|
|
2645
|
+
});
|
|
2646
|
+
});
|
|
2388
2647
|
};
|
|
2389
2648
|
CoveoSearchPageClient.prototype.makeUndoTriggerQuery = function (meta) {
|
|
2390
2649
|
return this.makeSearchEvent(SearchPageEvents.undoTriggerQuery, meta);
|
|
2391
2650
|
};
|
|
2392
2651
|
CoveoSearchPageClient.prototype.logUndoTriggerQuery = function (meta) {
|
|
2393
|
-
return this
|
|
2652
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2653
|
+
return __generator(this, function (_a) {
|
|
2654
|
+
switch (_a.label) {
|
|
2655
|
+
case 0: return [4, this.makeUndoTriggerQuery(meta)];
|
|
2656
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2657
|
+
}
|
|
2658
|
+
});
|
|
2659
|
+
});
|
|
2394
2660
|
};
|
|
2395
2661
|
CoveoSearchPageClient.prototype.makeTriggerRedirect = function (meta) {
|
|
2396
2662
|
return this.makeCustomEvent(SearchPageEvents.triggerRedirect, __assign(__assign({}, meta), { query: this.provider.getSearchEventRequestPayload().queryText }));
|
|
2397
2663
|
};
|
|
2398
2664
|
CoveoSearchPageClient.prototype.logTriggerRedirect = function (meta) {
|
|
2399
|
-
return this
|
|
2665
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2666
|
+
return __generator(this, function (_a) {
|
|
2667
|
+
switch (_a.label) {
|
|
2668
|
+
case 0: return [4, this.makeTriggerRedirect(meta)];
|
|
2669
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2670
|
+
}
|
|
2671
|
+
});
|
|
2672
|
+
});
|
|
2400
2673
|
};
|
|
2401
2674
|
CoveoSearchPageClient.prototype.makePagerResize = function (meta) {
|
|
2402
2675
|
return this.makeCustomEvent(SearchPageEvents.pagerResize, meta);
|
|
2403
2676
|
};
|
|
2404
2677
|
CoveoSearchPageClient.prototype.logPagerResize = function (meta) {
|
|
2405
|
-
return this
|
|
2678
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2679
|
+
return __generator(this, function (_a) {
|
|
2680
|
+
switch (_a.label) {
|
|
2681
|
+
case 0: return [4, this.makePagerResize(meta)];
|
|
2682
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
});
|
|
2406
2686
|
};
|
|
2407
2687
|
CoveoSearchPageClient.prototype.makePagerNumber = function (meta) {
|
|
2408
2688
|
return this.makeCustomEvent(SearchPageEvents.pagerNumber, meta);
|
|
2409
2689
|
};
|
|
2410
2690
|
CoveoSearchPageClient.prototype.logPagerNumber = function (meta) {
|
|
2411
|
-
return this
|
|
2691
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2692
|
+
return __generator(this, function (_a) {
|
|
2693
|
+
switch (_a.label) {
|
|
2694
|
+
case 0: return [4, this.makePagerNumber(meta)];
|
|
2695
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2696
|
+
}
|
|
2697
|
+
});
|
|
2698
|
+
});
|
|
2412
2699
|
};
|
|
2413
2700
|
CoveoSearchPageClient.prototype.makePagerNext = function (meta) {
|
|
2414
2701
|
return this.makeCustomEvent(SearchPageEvents.pagerNext, meta);
|
|
2415
2702
|
};
|
|
2416
2703
|
CoveoSearchPageClient.prototype.logPagerNext = function (meta) {
|
|
2417
|
-
return this
|
|
2704
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2705
|
+
return __generator(this, function (_a) {
|
|
2706
|
+
switch (_a.label) {
|
|
2707
|
+
case 0: return [4, this.makePagerNext(meta)];
|
|
2708
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2709
|
+
}
|
|
2710
|
+
});
|
|
2711
|
+
});
|
|
2418
2712
|
};
|
|
2419
2713
|
CoveoSearchPageClient.prototype.makePagerPrevious = function (meta) {
|
|
2420
2714
|
return this.makeCustomEvent(SearchPageEvents.pagerPrevious, meta);
|
|
2421
2715
|
};
|
|
2422
2716
|
CoveoSearchPageClient.prototype.logPagerPrevious = function (meta) {
|
|
2423
|
-
return this
|
|
2717
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2718
|
+
return __generator(this, function (_a) {
|
|
2719
|
+
switch (_a.label) {
|
|
2720
|
+
case 0: return [4, this.makePagerPrevious(meta)];
|
|
2721
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2722
|
+
}
|
|
2723
|
+
});
|
|
2724
|
+
});
|
|
2424
2725
|
};
|
|
2425
2726
|
CoveoSearchPageClient.prototype.makePagerScrolling = function () {
|
|
2426
2727
|
return this.makeCustomEvent(SearchPageEvents.pagerScrolling);
|
|
2427
2728
|
};
|
|
2428
2729
|
CoveoSearchPageClient.prototype.logPagerScrolling = function () {
|
|
2429
|
-
return this
|
|
2730
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2731
|
+
return __generator(this, function (_a) {
|
|
2732
|
+
switch (_a.label) {
|
|
2733
|
+
case 0: return [4, this.makePagerScrolling()];
|
|
2734
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2735
|
+
}
|
|
2736
|
+
});
|
|
2737
|
+
});
|
|
2430
2738
|
};
|
|
2431
2739
|
CoveoSearchPageClient.prototype.makeFacetClearAll = function (meta) {
|
|
2432
2740
|
return this.makeSearchEvent(SearchPageEvents.facetClearAll, meta);
|
|
2433
2741
|
};
|
|
2434
2742
|
CoveoSearchPageClient.prototype.logFacetClearAll = function (meta) {
|
|
2435
|
-
return this
|
|
2743
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2744
|
+
return __generator(this, function (_a) {
|
|
2745
|
+
switch (_a.label) {
|
|
2746
|
+
case 0: return [4, this.makeFacetClearAll(meta)];
|
|
2747
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2748
|
+
}
|
|
2749
|
+
});
|
|
2750
|
+
});
|
|
2436
2751
|
};
|
|
2437
2752
|
CoveoSearchPageClient.prototype.makeFacetSearch = function (meta) {
|
|
2438
2753
|
return this.makeSearchEvent(SearchPageEvents.facetSearch, meta);
|
|
2439
2754
|
};
|
|
2440
2755
|
CoveoSearchPageClient.prototype.logFacetSearch = function (meta) {
|
|
2441
|
-
return this
|
|
2756
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2757
|
+
return __generator(this, function (_a) {
|
|
2758
|
+
switch (_a.label) {
|
|
2759
|
+
case 0: return [4, this.makeFacetSearch(meta)];
|
|
2760
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2761
|
+
}
|
|
2762
|
+
});
|
|
2763
|
+
});
|
|
2442
2764
|
};
|
|
2443
2765
|
CoveoSearchPageClient.prototype.makeFacetSelect = function (meta) {
|
|
2444
2766
|
return this.makeSearchEvent(SearchPageEvents.facetSelect, meta);
|
|
2445
2767
|
};
|
|
2446
2768
|
CoveoSearchPageClient.prototype.logFacetSelect = function (meta) {
|
|
2447
|
-
return this
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2769
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2770
|
+
return __generator(this, function (_a) {
|
|
2771
|
+
switch (_a.label) {
|
|
2772
|
+
case 0: return [4, this.makeFacetSelect(meta)];
|
|
2773
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2774
|
+
}
|
|
2775
|
+
});
|
|
2776
|
+
});
|
|
2777
|
+
};
|
|
2778
|
+
CoveoSearchPageClient.prototype.makeFacetDeselect = function (meta) {
|
|
2779
|
+
return this.makeSearchEvent(SearchPageEvents.facetDeselect, meta);
|
|
2451
2780
|
};
|
|
2452
2781
|
CoveoSearchPageClient.prototype.logFacetDeselect = function (meta) {
|
|
2453
|
-
return this
|
|
2782
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2783
|
+
return __generator(this, function (_a) {
|
|
2784
|
+
switch (_a.label) {
|
|
2785
|
+
case 0: return [4, this.makeFacetDeselect(meta)];
|
|
2786
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2787
|
+
}
|
|
2788
|
+
});
|
|
2789
|
+
});
|
|
2454
2790
|
};
|
|
2455
2791
|
CoveoSearchPageClient.prototype.makeFacetExclude = function (meta) {
|
|
2456
2792
|
return this.makeSearchEvent(SearchPageEvents.facetExclude, meta);
|
|
2457
2793
|
};
|
|
2458
2794
|
CoveoSearchPageClient.prototype.logFacetExclude = function (meta) {
|
|
2459
|
-
return this
|
|
2795
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2796
|
+
return __generator(this, function (_a) {
|
|
2797
|
+
switch (_a.label) {
|
|
2798
|
+
case 0: return [4, this.makeFacetExclude(meta)];
|
|
2799
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
});
|
|
2460
2803
|
};
|
|
2461
2804
|
CoveoSearchPageClient.prototype.makeFacetUnexclude = function (meta) {
|
|
2462
2805
|
return this.makeSearchEvent(SearchPageEvents.facetUnexclude, meta);
|
|
2463
2806
|
};
|
|
2464
2807
|
CoveoSearchPageClient.prototype.logFacetUnexclude = function (meta) {
|
|
2465
|
-
return this
|
|
2808
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2809
|
+
return __generator(this, function (_a) {
|
|
2810
|
+
switch (_a.label) {
|
|
2811
|
+
case 0: return [4, this.makeFacetUnexclude(meta)];
|
|
2812
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2813
|
+
}
|
|
2814
|
+
});
|
|
2815
|
+
});
|
|
2466
2816
|
};
|
|
2467
2817
|
CoveoSearchPageClient.prototype.makeFacetSelectAll = function (meta) {
|
|
2468
2818
|
return this.makeSearchEvent(SearchPageEvents.facetSelectAll, meta);
|
|
2469
2819
|
};
|
|
2470
2820
|
CoveoSearchPageClient.prototype.logFacetSelectAll = function (meta) {
|
|
2471
|
-
return this
|
|
2821
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2822
|
+
return __generator(this, function (_a) {
|
|
2823
|
+
switch (_a.label) {
|
|
2824
|
+
case 0: return [4, this.makeFacetSelectAll(meta)];
|
|
2825
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2826
|
+
}
|
|
2827
|
+
});
|
|
2828
|
+
});
|
|
2472
2829
|
};
|
|
2473
2830
|
CoveoSearchPageClient.prototype.makeFacetUpdateSort = function (meta) {
|
|
2474
2831
|
return this.makeSearchEvent(SearchPageEvents.facetUpdateSort, meta);
|
|
2475
2832
|
};
|
|
2476
2833
|
CoveoSearchPageClient.prototype.logFacetUpdateSort = function (meta) {
|
|
2477
|
-
return this
|
|
2834
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2835
|
+
return __generator(this, function (_a) {
|
|
2836
|
+
switch (_a.label) {
|
|
2837
|
+
case 0: return [4, this.makeFacetUpdateSort(meta)];
|
|
2838
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2839
|
+
}
|
|
2840
|
+
});
|
|
2841
|
+
});
|
|
2478
2842
|
};
|
|
2479
2843
|
CoveoSearchPageClient.prototype.makeFacetShowMore = function (meta) {
|
|
2480
2844
|
return this.makeCustomEvent(SearchPageEvents.facetShowMore, meta);
|
|
2481
2845
|
};
|
|
2482
2846
|
CoveoSearchPageClient.prototype.logFacetShowMore = function (meta) {
|
|
2483
|
-
return this
|
|
2847
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2848
|
+
return __generator(this, function (_a) {
|
|
2849
|
+
switch (_a.label) {
|
|
2850
|
+
case 0: return [4, this.makeFacetShowMore(meta)];
|
|
2851
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2852
|
+
}
|
|
2853
|
+
});
|
|
2854
|
+
});
|
|
2484
2855
|
};
|
|
2485
2856
|
CoveoSearchPageClient.prototype.makeFacetShowLess = function (meta) {
|
|
2486
2857
|
return this.makeCustomEvent(SearchPageEvents.facetShowLess, meta);
|
|
2487
2858
|
};
|
|
2488
2859
|
CoveoSearchPageClient.prototype.logFacetShowLess = function (meta) {
|
|
2489
|
-
return this
|
|
2860
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2861
|
+
return __generator(this, function (_a) {
|
|
2862
|
+
switch (_a.label) {
|
|
2863
|
+
case 0: return [4, this.makeFacetShowLess(meta)];
|
|
2864
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2865
|
+
}
|
|
2866
|
+
});
|
|
2867
|
+
});
|
|
2490
2868
|
};
|
|
2491
2869
|
CoveoSearchPageClient.prototype.makeQueryError = function (meta) {
|
|
2492
2870
|
return this.makeCustomEvent(SearchPageEvents.queryError, meta);
|
|
2493
2871
|
};
|
|
2494
2872
|
CoveoSearchPageClient.prototype.logQueryError = function (meta) {
|
|
2495
|
-
return this
|
|
2873
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2874
|
+
return __generator(this, function (_a) {
|
|
2875
|
+
switch (_a.label) {
|
|
2876
|
+
case 0: return [4, this.makeQueryError(meta)];
|
|
2877
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2878
|
+
}
|
|
2879
|
+
});
|
|
2880
|
+
});
|
|
2496
2881
|
};
|
|
2497
2882
|
CoveoSearchPageClient.prototype.makeQueryErrorBack = function () {
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2883
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2884
|
+
var customEventBuilder;
|
|
2885
|
+
var _this = this;
|
|
2886
|
+
return __generator(this, function (_a) {
|
|
2887
|
+
switch (_a.label) {
|
|
2888
|
+
case 0: return [4, this.makeCustomEvent(SearchPageEvents.queryErrorBack)];
|
|
2889
|
+
case 1:
|
|
2890
|
+
customEventBuilder = _a.sent();
|
|
2891
|
+
return [2, {
|
|
2892
|
+
description: customEventBuilder.description,
|
|
2893
|
+
log: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2894
|
+
return __generator(this, function (_a) {
|
|
2895
|
+
switch (_a.label) {
|
|
2896
|
+
case 0: return [4, customEventBuilder.log({ searchUID: this.provider.getSearchUID() })];
|
|
2897
|
+
case 1:
|
|
2898
|
+
_a.sent();
|
|
2899
|
+
return [2, this.logSearchEvent(SearchPageEvents.queryErrorBack)];
|
|
2900
|
+
}
|
|
2901
|
+
});
|
|
2902
|
+
}); },
|
|
2903
|
+
}];
|
|
2904
|
+
}
|
|
2905
|
+
});
|
|
2906
|
+
});
|
|
2512
2907
|
};
|
|
2513
2908
|
CoveoSearchPageClient.prototype.logQueryErrorBack = function () {
|
|
2514
|
-
return this
|
|
2909
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2910
|
+
return __generator(this, function (_a) {
|
|
2911
|
+
switch (_a.label) {
|
|
2912
|
+
case 0: return [4, this.makeQueryErrorBack()];
|
|
2913
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2914
|
+
}
|
|
2915
|
+
});
|
|
2916
|
+
});
|
|
2515
2917
|
};
|
|
2516
2918
|
CoveoSearchPageClient.prototype.makeQueryErrorRetry = function () {
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2919
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2920
|
+
var customEventBuilder;
|
|
2921
|
+
var _this = this;
|
|
2922
|
+
return __generator(this, function (_a) {
|
|
2923
|
+
switch (_a.label) {
|
|
2924
|
+
case 0: return [4, this.makeCustomEvent(SearchPageEvents.queryErrorRetry)];
|
|
2925
|
+
case 1:
|
|
2926
|
+
customEventBuilder = _a.sent();
|
|
2927
|
+
return [2, {
|
|
2928
|
+
description: customEventBuilder.description,
|
|
2929
|
+
log: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2930
|
+
return __generator(this, function (_a) {
|
|
2931
|
+
switch (_a.label) {
|
|
2932
|
+
case 0: return [4, customEventBuilder.log({ searchUID: this.provider.getSearchUID() })];
|
|
2933
|
+
case 1:
|
|
2934
|
+
_a.sent();
|
|
2935
|
+
return [2, this.logSearchEvent(SearchPageEvents.queryErrorRetry)];
|
|
2936
|
+
}
|
|
2937
|
+
});
|
|
2938
|
+
}); },
|
|
2939
|
+
}];
|
|
2940
|
+
}
|
|
2941
|
+
});
|
|
2942
|
+
});
|
|
2531
2943
|
};
|
|
2532
2944
|
CoveoSearchPageClient.prototype.logQueryErrorRetry = function () {
|
|
2533
|
-
return this
|
|
2945
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2946
|
+
return __generator(this, function (_a) {
|
|
2947
|
+
switch (_a.label) {
|
|
2948
|
+
case 0: return [4, this.makeQueryErrorRetry()];
|
|
2949
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2950
|
+
}
|
|
2951
|
+
});
|
|
2952
|
+
});
|
|
2534
2953
|
};
|
|
2535
2954
|
CoveoSearchPageClient.prototype.makeQueryErrorClear = function () {
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2955
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2956
|
+
var customEventBuilder;
|
|
2957
|
+
var _this = this;
|
|
2958
|
+
return __generator(this, function (_a) {
|
|
2959
|
+
switch (_a.label) {
|
|
2960
|
+
case 0: return [4, this.makeCustomEvent(SearchPageEvents.queryErrorClear)];
|
|
2961
|
+
case 1:
|
|
2962
|
+
customEventBuilder = _a.sent();
|
|
2963
|
+
return [2, {
|
|
2964
|
+
description: customEventBuilder.description,
|
|
2965
|
+
log: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2966
|
+
return __generator(this, function (_a) {
|
|
2967
|
+
switch (_a.label) {
|
|
2968
|
+
case 0: return [4, customEventBuilder.log({ searchUID: this.provider.getSearchUID() })];
|
|
2969
|
+
case 1:
|
|
2970
|
+
_a.sent();
|
|
2971
|
+
return [2, this.logSearchEvent(SearchPageEvents.queryErrorClear)];
|
|
2972
|
+
}
|
|
2973
|
+
});
|
|
2974
|
+
}); },
|
|
2975
|
+
}];
|
|
2976
|
+
}
|
|
2977
|
+
});
|
|
2978
|
+
});
|
|
2550
2979
|
};
|
|
2551
2980
|
CoveoSearchPageClient.prototype.logQueryErrorClear = function () {
|
|
2552
|
-
return this
|
|
2981
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2982
|
+
return __generator(this, function (_a) {
|
|
2983
|
+
switch (_a.label) {
|
|
2984
|
+
case 0: return [4, this.makeQueryErrorClear()];
|
|
2985
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2986
|
+
}
|
|
2987
|
+
});
|
|
2988
|
+
});
|
|
2553
2989
|
};
|
|
2554
2990
|
CoveoSearchPageClient.prototype.makeLikeSmartSnippet = function () {
|
|
2555
2991
|
return this.makeCustomEvent(SearchPageEvents.likeSmartSnippet);
|
|
2556
2992
|
};
|
|
2557
2993
|
CoveoSearchPageClient.prototype.logLikeSmartSnippet = function () {
|
|
2558
|
-
return this
|
|
2994
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2995
|
+
return __generator(this, function (_a) {
|
|
2996
|
+
switch (_a.label) {
|
|
2997
|
+
case 0: return [4, this.makeLikeSmartSnippet()];
|
|
2998
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2999
|
+
}
|
|
3000
|
+
});
|
|
3001
|
+
});
|
|
2559
3002
|
};
|
|
2560
3003
|
CoveoSearchPageClient.prototype.makeDislikeSmartSnippet = function () {
|
|
2561
3004
|
return this.makeCustomEvent(SearchPageEvents.dislikeSmartSnippet);
|
|
2562
3005
|
};
|
|
2563
3006
|
CoveoSearchPageClient.prototype.logDislikeSmartSnippet = function () {
|
|
2564
|
-
return this
|
|
3007
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3008
|
+
return __generator(this, function (_a) {
|
|
3009
|
+
switch (_a.label) {
|
|
3010
|
+
case 0: return [4, this.makeDislikeSmartSnippet()];
|
|
3011
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3012
|
+
}
|
|
3013
|
+
});
|
|
3014
|
+
});
|
|
2565
3015
|
};
|
|
2566
3016
|
CoveoSearchPageClient.prototype.makeExpandSmartSnippet = function () {
|
|
2567
3017
|
return this.makeCustomEvent(SearchPageEvents.expandSmartSnippet);
|
|
2568
3018
|
};
|
|
2569
3019
|
CoveoSearchPageClient.prototype.logExpandSmartSnippet = function () {
|
|
2570
|
-
return this
|
|
3020
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3021
|
+
return __generator(this, function (_a) {
|
|
3022
|
+
switch (_a.label) {
|
|
3023
|
+
case 0: return [4, this.makeExpandSmartSnippet()];
|
|
3024
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3025
|
+
}
|
|
3026
|
+
});
|
|
3027
|
+
});
|
|
2571
3028
|
};
|
|
2572
3029
|
CoveoSearchPageClient.prototype.makeCollapseSmartSnippet = function () {
|
|
2573
3030
|
return this.makeCustomEvent(SearchPageEvents.collapseSmartSnippet);
|
|
2574
3031
|
};
|
|
2575
3032
|
CoveoSearchPageClient.prototype.logCollapseSmartSnippet = function () {
|
|
2576
|
-
return this
|
|
3033
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3034
|
+
return __generator(this, function (_a) {
|
|
3035
|
+
switch (_a.label) {
|
|
3036
|
+
case 0: return [4, this.makeCollapseSmartSnippet()];
|
|
3037
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3038
|
+
}
|
|
3039
|
+
});
|
|
3040
|
+
});
|
|
2577
3041
|
};
|
|
2578
3042
|
CoveoSearchPageClient.prototype.makeOpenSmartSnippetFeedbackModal = function () {
|
|
2579
3043
|
return this.makeCustomEvent(SearchPageEvents.openSmartSnippetFeedbackModal);
|
|
2580
3044
|
};
|
|
2581
3045
|
CoveoSearchPageClient.prototype.logOpenSmartSnippetFeedbackModal = function () {
|
|
2582
|
-
return this
|
|
3046
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3047
|
+
return __generator(this, function (_a) {
|
|
3048
|
+
switch (_a.label) {
|
|
3049
|
+
case 0: return [4, this.makeOpenSmartSnippetFeedbackModal()];
|
|
3050
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3051
|
+
}
|
|
3052
|
+
});
|
|
3053
|
+
});
|
|
2583
3054
|
};
|
|
2584
3055
|
CoveoSearchPageClient.prototype.makeCloseSmartSnippetFeedbackModal = function () {
|
|
2585
3056
|
return this.makeCustomEvent(SearchPageEvents.closeSmartSnippetFeedbackModal);
|
|
2586
3057
|
};
|
|
2587
3058
|
CoveoSearchPageClient.prototype.logCloseSmartSnippetFeedbackModal = function () {
|
|
2588
|
-
return this
|
|
3059
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3060
|
+
return __generator(this, function (_a) {
|
|
3061
|
+
switch (_a.label) {
|
|
3062
|
+
case 0: return [4, this.makeCloseSmartSnippetFeedbackModal()];
|
|
3063
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3064
|
+
}
|
|
3065
|
+
});
|
|
3066
|
+
});
|
|
2589
3067
|
};
|
|
2590
3068
|
CoveoSearchPageClient.prototype.makeSmartSnippetFeedbackReason = function (reason, details) {
|
|
2591
3069
|
return this.makeCustomEvent(SearchPageEvents.sendSmartSnippetReason, { reason: reason, details: details });
|
|
2592
3070
|
};
|
|
2593
3071
|
CoveoSearchPageClient.prototype.logSmartSnippetFeedbackReason = function (reason, details) {
|
|
2594
|
-
return this
|
|
3072
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3073
|
+
return __generator(this, function (_a) {
|
|
3074
|
+
switch (_a.label) {
|
|
3075
|
+
case 0: return [4, this.makeSmartSnippetFeedbackReason(reason, details)];
|
|
3076
|
+
case 1: return [2, (_a.sent()).log({
|
|
3077
|
+
searchUID: this.provider.getSearchUID(),
|
|
3078
|
+
})];
|
|
3079
|
+
}
|
|
3080
|
+
});
|
|
3081
|
+
});
|
|
2595
3082
|
};
|
|
2596
3083
|
CoveoSearchPageClient.prototype.makeExpandSmartSnippetSuggestion = function (snippet) {
|
|
2597
3084
|
return this.makeCustomEvent(SearchPageEvents.expandSmartSnippetSuggestion, 'documentId' in snippet ? snippet : { documentId: snippet });
|
|
2598
3085
|
};
|
|
2599
3086
|
CoveoSearchPageClient.prototype.logExpandSmartSnippetSuggestion = function (snippet) {
|
|
2600
|
-
return this
|
|
3087
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3088
|
+
return __generator(this, function (_a) {
|
|
3089
|
+
switch (_a.label) {
|
|
3090
|
+
case 0: return [4, this.makeExpandSmartSnippetSuggestion(snippet)];
|
|
3091
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3092
|
+
}
|
|
3093
|
+
});
|
|
3094
|
+
});
|
|
2601
3095
|
};
|
|
2602
3096
|
CoveoSearchPageClient.prototype.makeCollapseSmartSnippetSuggestion = function (snippet) {
|
|
2603
3097
|
return this.makeCustomEvent(SearchPageEvents.collapseSmartSnippetSuggestion, 'documentId' in snippet ? snippet : { documentId: snippet });
|
|
2604
3098
|
};
|
|
2605
3099
|
CoveoSearchPageClient.prototype.logCollapseSmartSnippetSuggestion = function (snippet) {
|
|
2606
|
-
return this
|
|
3100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3101
|
+
return __generator(this, function (_a) {
|
|
3102
|
+
switch (_a.label) {
|
|
3103
|
+
case 0: return [4, this.makeCollapseSmartSnippetSuggestion(snippet)];
|
|
3104
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3105
|
+
}
|
|
3106
|
+
});
|
|
3107
|
+
});
|
|
2607
3108
|
};
|
|
2608
3109
|
CoveoSearchPageClient.prototype.makeShowMoreSmartSnippetSuggestion = function (snippet) {
|
|
2609
3110
|
return this.makeCustomEvent(SearchPageEvents.showMoreSmartSnippetSuggestion, snippet);
|
|
2610
3111
|
};
|
|
2611
3112
|
CoveoSearchPageClient.prototype.logShowMoreSmartSnippetSuggestion = function (snippet) {
|
|
2612
|
-
return this
|
|
3113
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3114
|
+
return __generator(this, function (_a) {
|
|
3115
|
+
switch (_a.label) {
|
|
3116
|
+
case 0: return [4, this.makeShowMoreSmartSnippetSuggestion(snippet)];
|
|
3117
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3118
|
+
}
|
|
3119
|
+
});
|
|
3120
|
+
});
|
|
2613
3121
|
};
|
|
2614
3122
|
CoveoSearchPageClient.prototype.makeShowLessSmartSnippetSuggestion = function (snippet) {
|
|
2615
3123
|
return this.makeCustomEvent(SearchPageEvents.showLessSmartSnippetSuggestion, snippet);
|
|
2616
3124
|
};
|
|
2617
3125
|
CoveoSearchPageClient.prototype.logShowLessSmartSnippetSuggestion = function (snippet) {
|
|
2618
|
-
return this
|
|
3126
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3127
|
+
return __generator(this, function (_a) {
|
|
3128
|
+
switch (_a.label) {
|
|
3129
|
+
case 0: return [4, this.makeShowLessSmartSnippetSuggestion(snippet)];
|
|
3130
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3131
|
+
}
|
|
3132
|
+
});
|
|
3133
|
+
});
|
|
2619
3134
|
};
|
|
2620
3135
|
CoveoSearchPageClient.prototype.makeOpenSmartSnippetSource = function (info, identifier) {
|
|
2621
3136
|
return this.makeClickEvent(SearchPageEvents.openSmartSnippetSource, info, identifier);
|
|
2622
3137
|
};
|
|
2623
3138
|
CoveoSearchPageClient.prototype.logOpenSmartSnippetSource = function (info, identifier) {
|
|
2624
|
-
return this
|
|
3139
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3140
|
+
return __generator(this, function (_a) {
|
|
3141
|
+
switch (_a.label) {
|
|
3142
|
+
case 0: return [4, this.makeOpenSmartSnippetSource(info, identifier)];
|
|
3143
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3144
|
+
}
|
|
3145
|
+
});
|
|
3146
|
+
});
|
|
2625
3147
|
};
|
|
2626
3148
|
CoveoSearchPageClient.prototype.makeOpenSmartSnippetSuggestionSource = function (info, snippet) {
|
|
2627
3149
|
return this.makeClickEvent(SearchPageEvents.openSmartSnippetSuggestionSource, info, { contentIDKey: snippet.documentId.contentIdKey, contentIDValue: snippet.documentId.contentIdValue }, snippet);
|
|
@@ -2630,16 +3152,41 @@
|
|
|
2630
3152
|
return this.makeClickEvent(SearchPageEvents.copyToClipboard, info, identifier);
|
|
2631
3153
|
};
|
|
2632
3154
|
CoveoSearchPageClient.prototype.logCopyToClipboard = function (info, identifier) {
|
|
2633
|
-
return this
|
|
3155
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3156
|
+
return __generator(this, function (_a) {
|
|
3157
|
+
switch (_a.label) {
|
|
3158
|
+
case 0: return [4, this.makeCopyToClipboard(info, identifier)];
|
|
3159
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3160
|
+
}
|
|
3161
|
+
});
|
|
3162
|
+
});
|
|
2634
3163
|
};
|
|
2635
3164
|
CoveoSearchPageClient.prototype.logOpenSmartSnippetSuggestionSource = function (info, snippet) {
|
|
2636
|
-
return this
|
|
3165
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3166
|
+
return __generator(this, function (_a) {
|
|
3167
|
+
switch (_a.label) {
|
|
3168
|
+
case 0: return [4, this.makeOpenSmartSnippetSuggestionSource(info, snippet)];
|
|
3169
|
+
case 1: return [2, (_a.sent()).log({
|
|
3170
|
+
searchUID: this.provider.getSearchUID(),
|
|
3171
|
+
})];
|
|
3172
|
+
}
|
|
3173
|
+
});
|
|
3174
|
+
});
|
|
2637
3175
|
};
|
|
2638
3176
|
CoveoSearchPageClient.prototype.makeOpenSmartSnippetInlineLink = function (info, identifierAndLink) {
|
|
2639
3177
|
return this.makeClickEvent(SearchPageEvents.openSmartSnippetInlineLink, info, { contentIDKey: identifierAndLink.contentIDKey, contentIDValue: identifierAndLink.contentIDValue }, identifierAndLink);
|
|
2640
3178
|
};
|
|
2641
3179
|
CoveoSearchPageClient.prototype.logOpenSmartSnippetInlineLink = function (info, identifierAndLink) {
|
|
2642
|
-
return this
|
|
3180
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3181
|
+
return __generator(this, function (_a) {
|
|
3182
|
+
switch (_a.label) {
|
|
3183
|
+
case 0: return [4, this.makeOpenSmartSnippetInlineLink(info, identifierAndLink)];
|
|
3184
|
+
case 1: return [2, (_a.sent()).log({
|
|
3185
|
+
searchUID: this.provider.getSearchUID(),
|
|
3186
|
+
})];
|
|
3187
|
+
}
|
|
3188
|
+
});
|
|
3189
|
+
});
|
|
2643
3190
|
};
|
|
2644
3191
|
CoveoSearchPageClient.prototype.makeOpenSmartSnippetSuggestionInlineLink = function (info, snippetAndLink) {
|
|
2645
3192
|
return this.makeClickEvent(SearchPageEvents.openSmartSnippetSuggestionInlineLink, info, {
|
|
@@ -2648,158 +3195,257 @@
|
|
|
2648
3195
|
}, snippetAndLink);
|
|
2649
3196
|
};
|
|
2650
3197
|
CoveoSearchPageClient.prototype.logOpenSmartSnippetSuggestionInlineLink = function (info, snippetAndLink) {
|
|
2651
|
-
return this
|
|
3198
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3199
|
+
return __generator(this, function (_a) {
|
|
3200
|
+
switch (_a.label) {
|
|
3201
|
+
case 0: return [4, this.makeOpenSmartSnippetSuggestionInlineLink(info, snippetAndLink)];
|
|
3202
|
+
case 1: return [2, (_a.sent()).log({
|
|
3203
|
+
searchUID: this.provider.getSearchUID(),
|
|
3204
|
+
})];
|
|
3205
|
+
}
|
|
3206
|
+
});
|
|
3207
|
+
});
|
|
2652
3208
|
};
|
|
2653
3209
|
CoveoSearchPageClient.prototype.makeRecentQueryClick = function () {
|
|
2654
3210
|
return this.makeSearchEvent(SearchPageEvents.recentQueryClick);
|
|
2655
3211
|
};
|
|
2656
3212
|
CoveoSearchPageClient.prototype.logRecentQueryClick = function () {
|
|
2657
|
-
return this
|
|
3213
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3214
|
+
return __generator(this, function (_a) {
|
|
3215
|
+
switch (_a.label) {
|
|
3216
|
+
case 0: return [4, this.makeRecentQueryClick()];
|
|
3217
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3218
|
+
}
|
|
3219
|
+
});
|
|
3220
|
+
});
|
|
2658
3221
|
};
|
|
2659
3222
|
CoveoSearchPageClient.prototype.makeClearRecentQueries = function () {
|
|
2660
3223
|
return this.makeCustomEvent(SearchPageEvents.clearRecentQueries);
|
|
2661
3224
|
};
|
|
2662
3225
|
CoveoSearchPageClient.prototype.logClearRecentQueries = function () {
|
|
2663
|
-
return this
|
|
3226
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3227
|
+
return __generator(this, function (_a) {
|
|
3228
|
+
switch (_a.label) {
|
|
3229
|
+
case 0: return [4, this.makeClearRecentQueries()];
|
|
3230
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3231
|
+
}
|
|
3232
|
+
});
|
|
3233
|
+
});
|
|
2664
3234
|
};
|
|
2665
3235
|
CoveoSearchPageClient.prototype.makeRecentResultClick = function (info, identifier) {
|
|
2666
3236
|
return this.makeCustomEvent(SearchPageEvents.recentResultClick, { info: info, identifier: identifier });
|
|
2667
3237
|
};
|
|
2668
3238
|
CoveoSearchPageClient.prototype.logRecentResultClick = function (info, identifier) {
|
|
2669
|
-
return this
|
|
3239
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3240
|
+
return __generator(this, function (_a) {
|
|
3241
|
+
switch (_a.label) {
|
|
3242
|
+
case 0: return [4, this.makeRecentResultClick(info, identifier)];
|
|
3243
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3244
|
+
}
|
|
3245
|
+
});
|
|
3246
|
+
});
|
|
2670
3247
|
};
|
|
2671
3248
|
CoveoSearchPageClient.prototype.makeClearRecentResults = function () {
|
|
2672
3249
|
return this.makeCustomEvent(SearchPageEvents.clearRecentResults);
|
|
2673
3250
|
};
|
|
2674
3251
|
CoveoSearchPageClient.prototype.logClearRecentResults = function () {
|
|
2675
|
-
return this
|
|
3252
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3253
|
+
return __generator(this, function (_a) {
|
|
3254
|
+
switch (_a.label) {
|
|
3255
|
+
case 0: return [4, this.makeClearRecentResults()];
|
|
3256
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3257
|
+
}
|
|
3258
|
+
});
|
|
3259
|
+
});
|
|
2676
3260
|
};
|
|
2677
3261
|
CoveoSearchPageClient.prototype.makeNoResultsBack = function () {
|
|
2678
3262
|
return this.makeSearchEvent(SearchPageEvents.noResultsBack);
|
|
2679
3263
|
};
|
|
2680
3264
|
CoveoSearchPageClient.prototype.logNoResultsBack = function () {
|
|
2681
|
-
return this
|
|
3265
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3266
|
+
return __generator(this, function (_a) {
|
|
3267
|
+
switch (_a.label) {
|
|
3268
|
+
case 0: return [4, this.makeNoResultsBack()];
|
|
3269
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3270
|
+
}
|
|
3271
|
+
});
|
|
3272
|
+
});
|
|
2682
3273
|
};
|
|
2683
3274
|
CoveoSearchPageClient.prototype.makeShowMoreFoldedResults = function (info, identifier) {
|
|
2684
3275
|
return this.makeClickEvent(SearchPageEvents.showMoreFoldedResults, info, identifier);
|
|
2685
3276
|
};
|
|
2686
3277
|
CoveoSearchPageClient.prototype.logShowMoreFoldedResults = function (info, identifier) {
|
|
2687
|
-
return this
|
|
3278
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3279
|
+
return __generator(this, function (_a) {
|
|
3280
|
+
switch (_a.label) {
|
|
3281
|
+
case 0: return [4, this.makeShowMoreFoldedResults(info, identifier)];
|
|
3282
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3283
|
+
}
|
|
3284
|
+
});
|
|
3285
|
+
});
|
|
2688
3286
|
};
|
|
2689
3287
|
CoveoSearchPageClient.prototype.makeShowLessFoldedResults = function () {
|
|
2690
3288
|
return this.makeCustomEvent(SearchPageEvents.showLessFoldedResults);
|
|
2691
3289
|
};
|
|
2692
3290
|
CoveoSearchPageClient.prototype.logShowLessFoldedResults = function () {
|
|
2693
|
-
return this
|
|
3291
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3292
|
+
return __generator(this, function (_a) {
|
|
3293
|
+
switch (_a.label) {
|
|
3294
|
+
case 0: return [4, this.makeShowLessFoldedResults()];
|
|
3295
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3296
|
+
}
|
|
3297
|
+
});
|
|
3298
|
+
});
|
|
3299
|
+
};
|
|
3300
|
+
CoveoSearchPageClient.prototype.makeEventDescription = function (preparedEvent, actionCause) {
|
|
3301
|
+
var _a;
|
|
3302
|
+
return { actionCause: actionCause, customData: (_a = preparedEvent.payload) === null || _a === void 0 ? void 0 : _a.customData };
|
|
2694
3303
|
};
|
|
2695
3304
|
CoveoSearchPageClient.prototype.makeCustomEvent = function (event, metadata, eventType) {
|
|
2696
|
-
var _this = this;
|
|
2697
3305
|
if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
3306
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3307
|
+
var customData, request, _a, preparedEvent;
|
|
3308
|
+
return __generator(this, function (_b) {
|
|
3309
|
+
switch (_b.label) {
|
|
3310
|
+
case 0:
|
|
3311
|
+
this.coveoAnalyticsClient.getParameters;
|
|
3312
|
+
customData = __assign(__assign({}, this.provider.getBaseMetadata()), metadata);
|
|
3313
|
+
_a = [{}];
|
|
3314
|
+
return [4, this.getBaseEventRequest(customData)];
|
|
3315
|
+
case 1:
|
|
3316
|
+
request = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { eventType: eventType, eventValue: event }]);
|
|
3317
|
+
return [4, this.coveoAnalyticsClient.makeCustomEvent(request)];
|
|
3318
|
+
case 2:
|
|
3319
|
+
preparedEvent = _b.sent();
|
|
3320
|
+
return [2, {
|
|
3321
|
+
description: this.makeEventDescription(preparedEvent, event),
|
|
3322
|
+
log: function (_a) {
|
|
3323
|
+
var searchUID = _a.searchUID;
|
|
3324
|
+
return preparedEvent.log({ lastSearchQueryUid: searchUID });
|
|
3325
|
+
},
|
|
3326
|
+
}];
|
|
3327
|
+
}
|
|
3328
|
+
});
|
|
3329
|
+
});
|
|
2715
3330
|
};
|
|
2716
3331
|
CoveoSearchPageClient.prototype.logCustomEvent = function (event, metadata, eventType) {
|
|
2717
3332
|
if (eventType === void 0) { eventType = CustomEventsTypes[event]; }
|
|
2718
|
-
return this
|
|
3333
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3334
|
+
return __generator(this, function (_a) {
|
|
3335
|
+
switch (_a.label) {
|
|
3336
|
+
case 0: return [4, this.makeCustomEvent(event, metadata, eventType)];
|
|
3337
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
3338
|
+
}
|
|
3339
|
+
});
|
|
3340
|
+
});
|
|
2719
3341
|
};
|
|
2720
3342
|
CoveoSearchPageClient.prototype.makeCustomEventWithType = function (eventValue, eventType, metadata) {
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
3343
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3344
|
+
var customData, payload, _a, preparedEvent;
|
|
3345
|
+
return __generator(this, function (_b) {
|
|
3346
|
+
switch (_b.label) {
|
|
3347
|
+
case 0:
|
|
3348
|
+
customData = __assign(__assign({}, this.provider.getBaseMetadata()), metadata);
|
|
3349
|
+
_a = [{}];
|
|
3350
|
+
return [4, this.getBaseEventRequest(customData)];
|
|
3351
|
+
case 1:
|
|
3352
|
+
payload = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { eventType: eventType,
|
|
3353
|
+
eventValue: eventValue }]);
|
|
3354
|
+
return [4, this.coveoAnalyticsClient.makeCustomEvent(payload)];
|
|
3355
|
+
case 2:
|
|
3356
|
+
preparedEvent = _b.sent();
|
|
3357
|
+
return [2, {
|
|
3358
|
+
description: this.makeEventDescription(preparedEvent, eventValue),
|
|
3359
|
+
log: function (_a) {
|
|
3360
|
+
var searchUID = _a.searchUID;
|
|
3361
|
+
return preparedEvent.log({ lastSearchQueryUid: searchUID });
|
|
3362
|
+
},
|
|
3363
|
+
}];
|
|
3364
|
+
}
|
|
3365
|
+
});
|
|
3366
|
+
});
|
|
2740
3367
|
};
|
|
2741
3368
|
CoveoSearchPageClient.prototype.logCustomEventWithType = function (eventValue, eventType, metadata) {
|
|
2742
|
-
return this
|
|
3369
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3370
|
+
return __generator(this, function (_a) {
|
|
3371
|
+
switch (_a.label) {
|
|
3372
|
+
case 0: return [4, this.makeCustomEventWithType(eventValue, eventType, metadata)];
|
|
3373
|
+
case 1: return [2, (_a.sent()).log({
|
|
3374
|
+
searchUID: this.provider.getSearchUID(),
|
|
3375
|
+
})];
|
|
3376
|
+
}
|
|
3377
|
+
});
|
|
3378
|
+
});
|
|
2743
3379
|
};
|
|
2744
3380
|
CoveoSearchPageClient.prototype.logSearchEvent = function (event, metadata) {
|
|
2745
3381
|
return __awaiter(this, void 0, void 0, function () {
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
case
|
|
2750
|
-
_b = (_a = this.coveoAnalyticsClient).sendSearchEvent;
|
|
2751
|
-
return [4, this.getBaseSearchEventRequest(event, metadata)];
|
|
2752
|
-
case 1: return [2, _b.apply(_a, [_c.sent()])];
|
|
3382
|
+
return __generator(this, function (_a) {
|
|
3383
|
+
switch (_a.label) {
|
|
3384
|
+
case 0: return [4, this.makeSearchEvent(event, metadata)];
|
|
3385
|
+
case 1: return [2, (_a.sent()).log({ searchUID: this.provider.getSearchUID() })];
|
|
2753
3386
|
}
|
|
2754
3387
|
});
|
|
2755
3388
|
});
|
|
2756
3389
|
};
|
|
2757
|
-
CoveoSearchPageClient.prototype.makeDescription = function (actionCause, metadata) {
|
|
2758
|
-
return { actionCause: actionCause, customData: __assign(__assign({}, this.provider.getBaseMetadata()), metadata) };
|
|
2759
|
-
};
|
|
2760
3390
|
CoveoSearchPageClient.prototype.makeSearchEvent = function (event, metadata) {
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
3391
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3392
|
+
var request, preparedEvent;
|
|
3393
|
+
return __generator(this, function (_a) {
|
|
3394
|
+
switch (_a.label) {
|
|
3395
|
+
case 0: return [4, this.getBaseSearchEventRequest(event, metadata)];
|
|
3396
|
+
case 1:
|
|
3397
|
+
request = _a.sent();
|
|
3398
|
+
return [4, this.coveoAnalyticsClient.makeSearchEvent(request)];
|
|
3399
|
+
case 2:
|
|
3400
|
+
preparedEvent = _a.sent();
|
|
3401
|
+
return [2, {
|
|
3402
|
+
description: this.makeEventDescription(preparedEvent, event),
|
|
3403
|
+
log: function (_a) {
|
|
3404
|
+
var searchUID = _a.searchUID;
|
|
3405
|
+
return preparedEvent.log({ searchQueryUid: searchUID });
|
|
3406
|
+
},
|
|
3407
|
+
}];
|
|
3408
|
+
}
|
|
3409
|
+
});
|
|
3410
|
+
});
|
|
2766
3411
|
};
|
|
2767
|
-
CoveoSearchPageClient.prototype.
|
|
3412
|
+
CoveoSearchPageClient.prototype.makeClickEvent = function (event, info, identifier, metadata) {
|
|
2768
3413
|
return __awaiter(this, void 0, void 0, function () {
|
|
2769
|
-
var
|
|
3414
|
+
var request, _a, preparedEvent;
|
|
2770
3415
|
return __generator(this, function (_b) {
|
|
2771
3416
|
switch (_b.label) {
|
|
2772
3417
|
case 0:
|
|
2773
3418
|
_a = [__assign({}, info)];
|
|
2774
3419
|
return [4, this.getBaseEventRequest(__assign(__assign({}, identifier), metadata))];
|
|
2775
3420
|
case 1:
|
|
2776
|
-
|
|
2777
|
-
return [
|
|
3421
|
+
request = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), { queryPipeline: this.provider.getPipeline(), actionCause: event }]);
|
|
3422
|
+
return [4, this.coveoAnalyticsClient.makeClickEvent(request)];
|
|
3423
|
+
case 2:
|
|
3424
|
+
preparedEvent = _b.sent();
|
|
3425
|
+
return [2, {
|
|
3426
|
+
description: this.makeEventDescription(preparedEvent, event),
|
|
3427
|
+
log: function (_a) {
|
|
3428
|
+
var searchUID = _a.searchUID;
|
|
3429
|
+
return preparedEvent.log({ searchQueryUid: searchUID });
|
|
3430
|
+
},
|
|
3431
|
+
}];
|
|
2778
3432
|
}
|
|
2779
3433
|
});
|
|
2780
3434
|
});
|
|
2781
3435
|
};
|
|
2782
|
-
CoveoSearchPageClient.prototype.
|
|
2783
|
-
var _this = this;
|
|
2784
|
-
return {
|
|
2785
|
-
description: this.makeDescription(event, __assign(__assign({}, identifier), metadata)),
|
|
2786
|
-
log: function () { return _this.logClickEvent(event, info, identifier, metadata); },
|
|
2787
|
-
};
|
|
2788
|
-
};
|
|
2789
|
-
CoveoSearchPageClient.prototype.getBaseSearchEventRequest = function (event, metadata) {
|
|
3436
|
+
CoveoSearchPageClient.prototype.logClickEvent = function (event, info, identifier, metadata) {
|
|
2790
3437
|
return __awaiter(this, void 0, void 0, function () {
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
case
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), this.provider.getSearchEventRequestPayload()]), { searchQueryUid: this.provider.getSearchUID(), queryPipeline: this.provider.getPipeline(), actionCause: event }])];
|
|
3438
|
+
return __generator(this, function (_a) {
|
|
3439
|
+
switch (_a.label) {
|
|
3440
|
+
case 0: return [4, this.makeClickEvent(event, info, identifier, metadata)];
|
|
3441
|
+
case 1: return [2, (_a.sent()).log({
|
|
3442
|
+
searchUID: this.provider.getSearchUID(),
|
|
3443
|
+
})];
|
|
2798
3444
|
}
|
|
2799
3445
|
});
|
|
2800
3446
|
});
|
|
2801
3447
|
};
|
|
2802
|
-
CoveoSearchPageClient.prototype.
|
|
3448
|
+
CoveoSearchPageClient.prototype.getBaseSearchEventRequest = function (event, metadata) {
|
|
2803
3449
|
return __awaiter(this, void 0, void 0, function () {
|
|
2804
3450
|
var _a;
|
|
2805
3451
|
return __generator(this, function (_b) {
|
|
@@ -2807,7 +3453,7 @@
|
|
|
2807
3453
|
case 0:
|
|
2808
3454
|
_a = [{}];
|
|
2809
3455
|
return [4, this.getBaseEventRequest(metadata)];
|
|
2810
|
-
case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), {
|
|
3456
|
+
case 1: return [2, __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_b.sent())])), this.provider.getSearchEventRequestPayload()]), { queryPipeline: this.provider.getPipeline(), actionCause: event }])];
|
|
2811
3457
|
}
|
|
2812
3458
|
});
|
|
2813
3459
|
});
|