atriusmaps-node-sdk 3.3.898 → 3.3.900

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.
Files changed (62) hide show
  1. package/dist/cjs/nodesdk/nodeEntry.js +36 -58
  2. package/dist/cjs/package.json.js +8 -4
  3. package/dist/cjs/plugins/clientAPI/src/clientAPI.js +8 -6
  4. package/dist/cjs/plugins/dynamicPois/src/dynamicPois.js +50 -142
  5. package/dist/cjs/plugins/dynamicPois/src/processors.js +31 -53
  6. package/dist/cjs/plugins/flightStatus/src/flightDetailsMapper.js +47 -116
  7. package/dist/cjs/plugins/flightStatus/src/flightStatus.js +48 -82
  8. package/dist/cjs/plugins/flightStatus/src/utils.js +4 -14
  9. package/dist/cjs/plugins/poiDataManager/src/poiDataManager.js +77 -154
  10. package/dist/cjs/plugins/sdkServer/src/prepareSDKConfig.js +45 -76
  11. package/dist/cjs/plugins/sdkServer/src/sdkHeadless.js +70 -79
  12. package/dist/cjs/plugins/sdkServer/src/sdkServer.js +97 -147
  13. package/dist/cjs/plugins/searchService/src/flexsearchExports/lang.js +16 -190
  14. package/dist/cjs/plugins/searchService/src/flexsearchExports/simple.js +28 -35
  15. package/dist/cjs/plugins/searchService/src/poiSearch.js +10 -21
  16. package/dist/cjs/plugins/searchService/src/searchService.js +45 -147
  17. package/dist/cjs/plugins/searchService/src/searchTypeahead.js +17 -28
  18. package/dist/cjs/plugins/searchService/src/utils.js +9 -13
  19. package/dist/cjs/plugins/venueDataLoader/src/venueDataLoader.js +148 -304
  20. package/dist/cjs/plugins/venueDataLoader/src/venueLoadingUtils.js +47 -126
  21. package/dist/cjs/plugins/wayfinder/src/findRoute.js +6 -73
  22. package/dist/cjs/plugins/wayfinder/src/minPriorityQueue.js +7 -27
  23. package/dist/cjs/plugins/wayfinder/src/navGraph.js +78 -259
  24. package/dist/cjs/plugins/wayfinder/src/navGraphDebug.js +26 -57
  25. package/dist/cjs/plugins/wayfinder/src/segmentBadges.js +25 -25
  26. package/dist/cjs/plugins/wayfinder/src/segmentBuilder.js +50 -133
  27. package/dist/cjs/plugins/wayfinder/src/segmentCategories.js +29 -29
  28. package/dist/cjs/plugins/wayfinder/src/stepBuilder.js +53 -145
  29. package/dist/cjs/plugins/wayfinder/src/wayfinder.js +105 -349
  30. package/dist/cjs/src/app.js +53 -91
  31. package/dist/cjs/src/configs/postproc-mol-url-parms.js +34 -43
  32. package/dist/cjs/src/configs/postproc-stateTracking.js +1 -19
  33. package/dist/cjs/src/controller.js +4 -26
  34. package/dist/cjs/src/debugTools.js +55 -94
  35. package/dist/cjs/src/env.js +8 -19
  36. package/dist/cjs/src/extModules/bustle.js +15 -71
  37. package/dist/cjs/src/extModules/flexapi/src/help.js +7 -22
  38. package/dist/cjs/src/extModules/flexapi/src/index.js +15 -29
  39. package/dist/cjs/src/extModules/flexapi/src/validate.js +45 -93
  40. package/dist/cjs/src/extModules/geohasher.js +13 -31
  41. package/dist/cjs/src/extModules/log.js +18 -29
  42. package/dist/cjs/src/historyManager.js +4 -6
  43. package/dist/cjs/src/utils/bounds.js +2 -4
  44. package/dist/cjs/src/utils/buildStructureLookup.js +7 -7
  45. package/dist/cjs/src/utils/configUtils.js +7 -43
  46. package/dist/cjs/src/utils/date.js +5 -17
  47. package/dist/cjs/src/utils/distance.js +2 -2
  48. package/dist/cjs/src/utils/dom.js +9 -24
  49. package/dist/cjs/src/utils/funcs.js +15 -30
  50. package/dist/cjs/src/utils/geodesy.js +24 -39
  51. package/dist/cjs/src/utils/geom.js +32 -148
  52. package/dist/cjs/src/utils/i18n.js +39 -70
  53. package/dist/cjs/src/utils/isInitialState.js +7 -13
  54. package/dist/cjs/src/utils/location.js +10 -29
  55. package/dist/cjs/src/utils/observable.js +4 -29
  56. package/dist/cjs/src/utils/rand.js +9 -80
  57. package/dist/cjs/utils/constants.js +1 -1
  58. package/dist/package.json.js +1 -1
  59. package/dist/plugins/sdkServer/src/prepareSDKConfig.js +1 -1
  60. package/dist/src/utils/buildStructureLookup.js +1 -1
  61. package/dist/src/utils/date.js +1 -1
  62. package/package.json +1 -1
@@ -5,56 +5,45 @@ var utils = require('./utils.js');
5
5
 
6
6
  function createSearchTypeahead(pois, poiSearch, lang) {
7
7
  const suggestedKeywordsSearch = createSuggestedKeywordsSearch(pois, lang);
8
-
9
- function queryPois(query, limit) {
10
- const matches = poiSearch({ query, limit });
11
- const withSuggestions = poiSearch({ query, suggest: true, limit });
12
- const matchedIds = matches.map(poi => poi.poiId);
13
- const filteredSuggestions = withSuggestions.filter(poi => matchedIds.indexOf(poi.poiId) === -1);
8
+ function queryPois(query2, limit) {
9
+ const matches = poiSearch({ query: query2, limit });
10
+ const withSuggestions = poiSearch({ query: query2, suggest: true, limit });
11
+ const matchedIds = matches.map((poi) => poi.poiId);
12
+ const filteredSuggestions = withSuggestions.filter((poi) => matchedIds.indexOf(poi.poiId) === -1);
14
13
  return matches.concat(filteredSuggestions);
15
14
  }
16
-
17
- const query = (query, limit) => {
18
- const suggestedKeywords = suggestedKeywordsSearch.search({ query, limit });
19
- const queryLengthUnderLimit = query.length < 3;
15
+ const query = (query2, limit) => {
16
+ const suggestedKeywords = suggestedKeywordsSearch.search({ query: query2, limit });
17
+ const queryLengthUnderLimit = query2.length < 3;
20
18
  const shouldQueryPois = !queryLengthUnderLimit && suggestedKeywords.length;
21
19
  const poisLimit = limit - suggestedKeywords.length;
22
- const pois = shouldQueryPois ? queryPois(query, poisLimit) : [];
23
- return { keywords: suggestedKeywords, pois };
20
+ const pois2 = shouldQueryPois ? queryPois(query2, poisLimit) : [];
21
+ return { keywords: suggestedKeywords, pois: pois2 };
24
22
  };
25
-
26
- const addKeyword = keyword => {
23
+ const addKeyword = (keyword) => {
27
24
  suggestedKeywordsSearch.add(keyword);
28
25
  };
29
-
30
26
  return { query, addKeyword };
31
27
  }
32
-
33
28
  function createSuggestedKeywordsSearch(pois, lang) {
34
29
  const categories = extractParentCategories(pois);
35
- const poisKeywords = R.pipe(R.values, R.chain(R.prop('keywords')), R.filter(R.prop('isUserSearchable')), R.pluck('name'))(pois);
30
+ const poisKeywords = R.pipe(R.values, R.chain(R.prop("keywords")), R.filter(R.prop("isUserSearchable")), R.pluck("name"))(pois);
36
31
  const allPotentialKeywords = [...categories, ...poisKeywords];
37
- const keywords = Array.from(new Set([...allPotentialKeywords]));
32
+ const keywords = Array.from(/* @__PURE__ */ new Set([...allPotentialKeywords]));
38
33
  const index = utils.getFlexSearchInstance({ lang});
39
-
40
34
  keywords.forEach((keyword, i) => index.add(i, keyword));
41
-
42
- const search = queryParams => {
35
+ const search = (queryParams) => {
43
36
  const ids = index.search(queryParams);
44
- return ids.map(index => keywords[index]);
37
+ return ids.map((index2) => keywords[index2]);
45
38
  };
46
- const add = newKeyword => {
39
+ const add = (newKeyword) => {
47
40
  keywords.push(newKeyword);
48
41
  index.add(keywords.length - 1, newKeyword);
49
42
  };
50
43
  return { search, add };
51
44
  }
52
-
53
45
  function extractParentCategories(pois) {
54
- return Object.values(pois)
55
- .map(poi => poi.category)
56
- .map(fullCategory => fullCategory.split('.'))
57
- .map(subcategories => subcategories[0]);
46
+ return Object.values(pois).map((poi) => poi.category).map((fullCategory) => fullCategory.split(".")).map((subcategories) => subcategories[0]);
58
47
  }
59
48
 
60
49
  module.exports = createSearchTypeahead;
@@ -3,26 +3,22 @@
3
3
  var FlexSearch = require('flexsearch');
4
4
  var simple = require('./flexsearchExports/simple.js');
5
5
 
6
- const NON_ASCII_LANGUAGES = ['ko', 'ja', 'zh-Hans', 'zh-Hant'];
7
-
6
+ const NON_ASCII_LANGUAGES = ["ko", "ja", "zh-Hans", "zh-Hant"];
8
7
  const getFlexSearchInstance = ({ lang }) => {
9
8
  const options = {
10
- tokenize: 'reverse',
11
- rtl: lang === 'ar', // only for arabic
9
+ tokenize: "reverse",
10
+ rtl: lang === "ar",
11
+ // only for arabic
12
12
  stemmer: {
13
- s: '',
14
- es: '',
15
- ies: 'y',
13
+ s: "",
14
+ es: "",
15
+ ies: "y"
16
16
  },
17
- encode: simple.encode,
17
+ encode: simple.encode
18
18
  };
19
-
20
- // Use the full tokenizer for non-ASCII languages and for standard searching
21
- // but use "forward" for typeahead
22
19
  if (NON_ASCII_LANGUAGES.includes(lang)) {
23
- options.tokenize = 'full';
20
+ options.tokenize = "full";
24
21
  }
25
-
26
22
  return new FlexSearch.Index(options);
27
23
  };
28
24