@fluid-topics/ft-wc-utils 1.3.49 → 1.3.51
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/build/ClusteringHelper.js +25 -25
- package/build/globals.min.js +14 -14
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -0
- package/build/search.d.ts +5 -0
- package/build/search.js +12 -0
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import * as SameWindowStorageEvent from "./SameWindowStorageEvent";
|
|
|
36
36
|
import * as FluidTopicsA11yEvents from "./a11y/FluidTopicsA11yEvents";
|
|
37
37
|
import * as FluidTopicsA11yHints from "./a11y/FluidTopicsA11yHints";
|
|
38
38
|
import { screenReaderStyles } from "./accessibility.styles";
|
|
39
|
+
import * as search from "./search";
|
|
39
40
|
export const isSafari = (navigator.vendor && !!navigator.vendor.match(/apple/i))
|
|
40
41
|
|| ((_c = (_b = (_a = window.safari) === null || _a === void 0 ? void 0 : _a.pushNotification) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : "") === "[object SafariRemoteNotification]";
|
|
41
42
|
export const isTouchScreen = (("ontouchstart" in window)
|
|
@@ -79,6 +80,7 @@ window.ftGlobals = (_d = window.ftGlobals) !== null && _d !== void 0 ? _d : {
|
|
|
79
80
|
...ScopedRegistryLitElement,
|
|
80
81
|
...shadowQuerySelector,
|
|
81
82
|
...SearchPlaceConverter,
|
|
83
|
+
...search,
|
|
82
84
|
isSafari,
|
|
83
85
|
isTouchScreen,
|
|
84
86
|
setVariable,
|
|
@@ -116,4 +118,5 @@ export * from "./SearchPlaceConverter";
|
|
|
116
118
|
export * from "./accessibility.styles";
|
|
117
119
|
export * from "./ft-input";
|
|
118
120
|
export * from "./directives";
|
|
121
|
+
export * from "./search";
|
|
119
122
|
export { setVariable } from "@fluid-topics/design-system-variables";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FtSearchResultClusterEntry, FtSearchResultHtmlPackage, FtSearchResultHtmlPackagePage, FtSearchResultMap, FtSearchResultTopic, FtSearchResultUnstructuredDocument } from "@fluid-topics/public-api";
|
|
2
|
+
export type FtSearchResultMixin = FtSearchResultMap | FtSearchResultTopic | FtSearchResultUnstructuredDocument | FtSearchResultHtmlPackage | FtSearchResultHtmlPackagePage;
|
|
3
|
+
export declare function accessResult(result?: FtSearchResultClusterEntry): FtSearchResultMixin | undefined;
|
|
4
|
+
export declare function accessResultId(result?: FtSearchResultClusterEntry): string | undefined;
|
|
5
|
+
export declare function accessResultUrl(result?: FtSearchResultClusterEntry): string | undefined;
|
package/build/search.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function accessResult(result) {
|
|
2
|
+
var _a, _b, _c, _d;
|
|
3
|
+
return (_d = (_c = (_b = (_a = result === null || result === void 0 ? void 0 : result.map) !== null && _a !== void 0 ? _a : result === null || result === void 0 ? void 0 : result.topic) !== null && _b !== void 0 ? _b : result === null || result === void 0 ? void 0 : result.document) !== null && _c !== void 0 ? _c : result === null || result === void 0 ? void 0 : result.htmlPackage) !== null && _d !== void 0 ? _d : result === null || result === void 0 ? void 0 : result.htmlPackagePage;
|
|
4
|
+
}
|
|
5
|
+
export function accessResultId(result) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
7
|
+
return (_h = (_f = (_d = (_b = (_a = result === null || result === void 0 ? void 0 : result.map) === null || _a === void 0 ? void 0 : _a.mapId) !== null && _b !== void 0 ? _b : (_c = result === null || result === void 0 ? void 0 : result.topic) === null || _c === void 0 ? void 0 : _c.tocId) !== null && _d !== void 0 ? _d : (_e = result === null || result === void 0 ? void 0 : result.document) === null || _e === void 0 ? void 0 : _e.documentId) !== null && _f !== void 0 ? _f : (_g = result === null || result === void 0 ? void 0 : result.htmlPackage) === null || _g === void 0 ? void 0 : _g.packageId) !== null && _h !== void 0 ? _h : (_j = result === null || result === void 0 ? void 0 : result.htmlPackagePage) === null || _j === void 0 ? void 0 : _j.contentId;
|
|
8
|
+
}
|
|
9
|
+
export function accessResultUrl(result) {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
11
|
+
return (_h = (_f = (_d = (_b = (_a = result === null || result === void 0 ? void 0 : result.map) === null || _a === void 0 ? void 0 : _a.readerUrl) !== null && _b !== void 0 ? _b : (_c = result === null || result === void 0 ? void 0 : result.topic) === null || _c === void 0 ? void 0 : _c.readerUrl) !== null && _d !== void 0 ? _d : (_e = result === null || result === void 0 ? void 0 : result.document) === null || _e === void 0 ? void 0 : _e.viewerUrl) !== null && _f !== void 0 ? _f : (_g = result === null || result === void 0 ? void 0 : result.htmlPackage) === null || _g === void 0 ? void 0 : _g.viewerUrl) !== null && _h !== void 0 ? _h : (_j = result === null || result === void 0 ? void 0 : result.htmlPackagePage) === null || _j === void 0 ? void 0 : _j.viewerUrl;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-wc-utils",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.51",
|
|
4
4
|
"description": "Internal web components tools",
|
|
5
5
|
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@floating-ui/dom": "1.5.3",
|
|
17
17
|
"@fluid-topics/design-system-variables": "2.53.1",
|
|
18
|
-
"@fluid-topics/public-api": "1.0.
|
|
18
|
+
"@fluid-topics/public-api": "1.0.112",
|
|
19
19
|
"@reduxjs/toolkit": "1.9.5",
|
|
20
20
|
"@types/mark.js": "8.11.12",
|
|
21
21
|
"@webcomponents/scoped-custom-element-registry": "0.0.9",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"mark.js": "8.11.1",
|
|
25
25
|
"moment": "2.29.4"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "02e21de480825149da06349c73a08934a05c3a65"
|
|
28
28
|
}
|