@fluid-topics/ft-wc-utils 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.
package/build/index.d.ts CHANGED
@@ -41,4 +41,5 @@ export * from "./SearchPlaceConverter";
41
41
  export * from "./accessibility.styles";
42
42
  export * from "./ft-input";
43
43
  export * from "./directives";
44
+ export * from "./search";
44
45
  export { setVariable } from "@fluid-topics/design-system-variables";
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;
@@ -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.49",
3
+ "version": "1.3.50",
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.110",
18
+ "@fluid-topics/public-api": "1.0.110-alpha",
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": "88d74757cd8593b6cde7a28c3db66ac7eafb7073"
27
+ "gitHead": "8624905b03e700cf33965e24ed75f491d5d39141"
28
28
  }