@fluid-topics/ft-search-context 1.3.49 → 1.3.50
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { watch } from "@fluid-topics/ft-wc-utils";
|
|
1
|
+
import { accessResult, watch } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
import { FtAnalyticsEventName, FtAnalyticsPublicationType, FtSearchResultType } from "@fluid-topics/public-api";
|
|
3
3
|
import { FtAnalyticsEventsService, ftAppInfoStore } from "@fluid-topics/ft-app-context";
|
|
4
4
|
import { convertMetadataFilterToAnalyticsFacet, getAnalyticsLastUpdate } from "./utils/analytics-utils";
|
|
@@ -58,9 +58,8 @@ export class FtAnalyticsSearchEventManager {
|
|
|
58
58
|
case "ARTICLE":
|
|
59
59
|
documentType = "RESOURCE";
|
|
60
60
|
break;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
break;
|
|
61
|
+
default:
|
|
62
|
+
throw new TypeError("Unknown editorial type for map : " + map.editorialType);
|
|
64
63
|
}
|
|
65
64
|
return {
|
|
66
65
|
id: map.id,
|
|
@@ -209,12 +208,26 @@ export class FtAnalyticsSearchEventManager {
|
|
|
209
208
|
metadata: result.document.metadata,
|
|
210
209
|
mimeType: result.document.mimeType,
|
|
211
210
|
};
|
|
211
|
+
case FtSearchResultType.HTML_PACKAGE:
|
|
212
|
+
return {
|
|
213
|
+
id: result.htmlPackage.packageId,
|
|
214
|
+
title: result.htmlPackage.title,
|
|
215
|
+
type: FtAnalyticsPublicationType.HTML_PACKAGE,
|
|
216
|
+
metadata: result.htmlPackage.metadata,
|
|
217
|
+
};
|
|
218
|
+
case FtSearchResultType.HTML_PACKAGE_PAGE:
|
|
219
|
+
return {
|
|
220
|
+
id: result.htmlPackagePage.packageId,
|
|
221
|
+
title: result.htmlPackagePage.title,
|
|
222
|
+
type: FtAnalyticsPublicationType.HTML_PACKAGE,
|
|
223
|
+
metadata: result.htmlPackagePage.metadata,
|
|
224
|
+
};
|
|
212
225
|
default:
|
|
213
226
|
throw new TypeError("Unknown type " + result.type);
|
|
214
227
|
}
|
|
215
228
|
}
|
|
216
229
|
convertExternalLink(result) {
|
|
217
|
-
var _a
|
|
218
|
-
return (
|
|
230
|
+
var _a;
|
|
231
|
+
return (_a = accessResult(result)) === null || _a === void 0 ? void 0 : _a.originUrl;
|
|
219
232
|
}
|
|
220
233
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-context",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.50",
|
|
4
4
|
"description": "Context block for integrated search components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.3.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.3.50",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.3.50",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@fluid-topics/public-api": "1.0.110"
|
|
27
|
+
"@fluid-topics/public-api": "1.0.110-alpha"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "8624905b03e700cf33965e24ed75f491d5d39141"
|
|
30
30
|
}
|