atriusmaps-node-sdk 3.3.1028 → 3.3.1030

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "3.3.1028";
5
+ var version = "3.3.1030";
6
6
  var pkg = {
7
7
  version: version};
8
8
 
@@ -43,7 +43,7 @@ function buildKeywordsAndIndex(pois, lang) {
43
43
  R.pluck("staticName")
44
44
  )(pois);
45
45
  const allPotentialKeywords = [...categories, ...poisKeywords, ...poiNames, ...poiStaticNames];
46
- const keywords = Array.from(/* @__PURE__ */ new Set([...allPotentialKeywords]));
46
+ const keywords = Array.from(new Set(allPotentialKeywords));
47
47
  const index = utils.getFlexSearchInstance({ lang});
48
48
  keywords.forEach((keyword, i) => index.add(i, keyword));
49
49
  return { keywords, index };
@@ -1 +1 @@
1
- var a="3.3.1028",e={version:a};export{e as default,a as version};
1
+ var a="3.3.1030",e={version:a};export{e as default,a as version};
@@ -1 +1 @@
1
- import{pipe as e,values as t,chain as r,prop as n,filter as o,pluck as a}from"ramda";import{getFlexSearchInstance as i}from"./utils.js";function s(e,t,r){const n=function(e,t){let r=e,{keywords:n,index:o}=d(e,t);const a=e=>{r=e;const a=d(e,t);n=a.keywords,o=a.index};return{search:e=>function(e,t){const r=(t??"").toLowerCase();if(!r)return e;return e.map((e,t)=>({keyword:e,index:t,tier:e.toLowerCase()===r?0:1})).sort((e,t)=>e.tier-t.tier||e.index-t.index).map(e=>e.keyword)}(o.search(e).map(e=>n[e]),e.query),add:e=>{n.push(e),o.add(n.length-1,e)},update:a,getAllPois:()=>r}}(e,r);return{query:(e,r)=>{const o=n.search({query:e,limit:r}),a=!(e.length<3)&&o.length,i=r-o.length,s=a?function(e,r){const n=t({query:e,limit:r}),o=t({query:e,suggest:!0,limit:r}),a=n.map(e=>e.poiId),i=o.filter(e=>-1===a.indexOf(e.poiId));return n.concat(i)}(e,i):[];return{keywords:o,pois:s}},addKeyword:e=>{n.add(e)},updatePOIs:e=>{const t={...n.getAllPois()};for(const r of e)t[r.poiId]=r;n.update(t)}}}function d(s,d){const c=function(e){return Object.values(e).map(e=>e.category).map(e=>e.split(".")).map(e=>e[0])}(s),u=[...c,...e(t,r(n("keywords")),o(n("isUserSearchable")),a("name"))(s),...e(t,a("name"))(s),...e(t,o(e=>e.staticName&&e.staticName!==e.name),a("staticName"))(s)],m=Array.from(new Set([...u])),l=i({lang:d});return m.forEach((e,t)=>l.add(t,e)),{keywords:m,index:l}}export{s as default};
1
+ import{pipe as e,values as t,chain as r,prop as n,filter as o,pluck as a}from"ramda";import{getFlexSearchInstance as i}from"./utils.js";function s(e,t,r){const n=function(e,t){let r=e,{keywords:n,index:o}=d(e,t);const a=e=>{r=e;const a=d(e,t);n=a.keywords,o=a.index};return{search:e=>function(e,t){const r=(t??"").toLowerCase();if(!r)return e;return e.map((e,t)=>({keyword:e,index:t,tier:e.toLowerCase()===r?0:1})).sort((e,t)=>e.tier-t.tier||e.index-t.index).map(e=>e.keyword)}(o.search(e).map(e=>n[e]),e.query),add:e=>{n.push(e),o.add(n.length-1,e)},update:a,getAllPois:()=>r}}(e,r);return{query:(e,r)=>{const o=n.search({query:e,limit:r}),a=!(e.length<3)&&o.length,i=r-o.length,s=a?function(e,r){const n=t({query:e,limit:r}),o=t({query:e,suggest:!0,limit:r}),a=n.map(e=>e.poiId),i=o.filter(e=>-1===a.indexOf(e.poiId));return n.concat(i)}(e,i):[];return{keywords:o,pois:s}},addKeyword:e=>{n.add(e)},updatePOIs:e=>{const t={...n.getAllPois()};for(const r of e)t[r.poiId]=r;n.update(t)}}}function d(s,d){const c=function(e){return Object.values(e).map(e=>e.category).map(e=>e.split(".")).map(e=>e[0])}(s),u=[...c,...e(t,r(n("keywords")),o(n("isUserSearchable")),a("name"))(s),...e(t,a("name"))(s),...e(t,o(e=>e.staticName&&e.staticName!==e.name),a("staticName"))(s)],m=Array.from(new Set(u)),l=i({lang:d});return m.forEach((e,t)=>l.add(t,e)),{keywords:m,index:l}}export{s as default};
package/package.json CHANGED
@@ -1,22 +1,27 @@
1
1
  {
2
2
  "name": "atriusmaps-node-sdk",
3
- "version": "3.3.1028",
3
+ "version": "3.3.1030",
4
4
  "description": "This project provides an API to Atrius Personal Wayfinder maps within a Node environment. See the README.md for more information",
5
5
  "keywords": [
6
- "map",
7
- "mapping",
8
- "maps",
9
- "indoor",
10
- "venue",
6
+ "acuitybrands",
7
+ "atrius",
11
8
  "geolocation",
12
9
  "geospatial",
10
+ "indoor",
13
11
  "locuslabs",
14
- "atrius",
15
- "acuitybrands"
12
+ "map",
13
+ "mapping",
14
+ "maps",
15
+ "venue"
16
16
  ],
17
17
  "license": "SEE LICENSE IN LICENSE.md",
18
18
  "author": "Glenn Crownover <crownover@locuslabs.com>",
19
+ "files": [
20
+ "dist"
21
+ ],
19
22
  "type": "module",
23
+ "main": "./dist/cjs/nodesdk/nodeEntry.js",
24
+ "module": "./lib/nodesdk/nodeEntry.js",
20
25
  "exports": {
21
26
  ".": {
22
27
  "import": "./dist/nodesdk/nodeEntry.js",
@@ -26,11 +31,6 @@
26
31
  "./package.json": "./package.json",
27
32
  "./configs/sdkHeadless.json": "./dist/src/configs/sdkHeadless.json"
28
33
  },
29
- "main": "./dist/cjs/nodesdk/nodeEntry.js",
30
- "module": "./lib/nodesdk/nodeEntry.js",
31
- "files": [
32
- "dist"
33
- ],
34
34
  "scripts": {
35
35
  "build": "rollup -c rollup.config.js && cp package-cjs.json dist/cjs/package.json",
36
36
  "prepublishOnly": "yarn build",