atriusmaps-node-sdk 3.3.241 → 3.3.243

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var name = "web-engine";
6
- var version = "3.3.241";
6
+ var version = "3.3.243";
7
7
  var license = "UNLICENSED";
8
8
  var type = "module";
9
9
  var main = "src/main.js";
@@ -59,6 +59,8 @@ function create (app, config) {
59
59
  let dataLoadedProm = new Zousan__default["default"]();
60
60
  const dynamicDataNotPending = new Zousan__default["default"]();
61
61
 
62
+ const T = app.gt();
63
+
62
64
  const init = async () => {
63
65
  const urlBaseNew = config.urlBase || 'https://rest.locuslabs.com/v3';
64
66
  const urlBase = config.urlBaseV1 || config.urlBase || 'https://rest.locuslabs.com/v1';
@@ -159,7 +161,7 @@ function create (app, config) {
159
161
  const label = labels[id];
160
162
  if (dynamicData) { // should we only show this message when "timeIsReal" is true?
161
163
  const { queueTime, isTemporarilyClosed } = dynamicData;
162
- const secondaryText = isTemporarilyClosed ? '(closed)' : `(${queueTime} minute wait)`;
164
+ const secondaryText = isTemporarilyClosed ? T('ui:Closed') : T('ui:_xx_ minute wait', { count: queueTime });
163
165
  feature.properties.text = `${label}\n${secondaryText}`;
164
166
  }
165
167
  return feature
@@ -1 +1 @@
1
- var e="web-engine",s="3.3.241",o="UNLICENSED",l="module",t="src/main.js",r=["demo","deploy","nodesdk","pagesSrc","src/extModules/flexapi"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:a11y":"APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'","cypress:comp":"APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome","cypress:e2e":"APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",demo:"cd demo/ && yarn start","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eTest:"percy exec -- cypress run --browser chrome",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",lint:"eslint . --max-warnings=0",mod:"demo/startMod.sh",mol:"demo/startMol.sh",molProd:"cd deploy && yarn buildAndRunMol",mos:"demo/startMos.sh",prepare:"husky install",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:e2e:video":"cypress run"},n=["defaults"],c={"@azure/event-hubs":"^5.6.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@john-osullivan/react-window-dynamic-fork":"^1.9.0-alpha.1","@locus-labs/mod-badge":"^0.1.102","@locus-labs/mod-default-theme":"^0.0.113","@locus-labs/mod-footer":"^0.0.111","@locus-labs/mod-header":"^0.0.105","@locus-labs/mod-location-marker":"^0.0.104","@locus-labs/mod-map-legend":"^0.0.104","@locus-labs/mod-offscreen-indicator":"^0.0.104","@locus-labs/mod-pin":"^0.0.104","@locus-labs/mod-qr-code-card":"^0.0.104","@locus-labs/mod-qr-code-window":"^0.0.105","@locus-labs/mod-walk-time-matrix":"^0.0.103","@locus-labs/mol-desktop-building-level-selector":"^0.1.108","@locus-labs/mol-desktop-compass":"^0.1.120","@locus-labs/mol-desktop-default-theme":"^0.2.105","@locus-labs/mol-desktop-icon":"^0.1.131","@locus-labs/mol-desktop-logo":"^0.1.101","@locus-labs/mol-desktop-map-nav-button":"^0.1.130","@locus-labs/mol-desktop-submenu":"^0.1.124","@locus-labs/mol-desktop-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.134","@locus-labs/mol-mobile-floating-action-button":"^0.0.117","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.3.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.1.2","@turf/circle":"^6.5.0","@turf/helpers":"^6.5.0","@turf/point-to-line-distance":"^6.5.0","@vitejs/plugin-react":"^4.0.1",IObject:"^0.7.2","axe-core":"^4.9.0","crypto-browserify":"^3.12.0","cypress-axe":"^1.5.0","file-loader":"^6.2.0",flexsearch:"^0.7.31","h3-js":"^4.1.0",i18next:"^20.3.4","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"4.0.1",jsonschema:"^1.2.6",luxon:"^3.3.0","maplibre-gl":"~2.1.9","mini-css-extract-plugin":"^1.6.0","node-polyfill-webpack-plugin":"^1.1.4","path-browserify":"^1.0.1",polished:"^4.0.2","prop-types":"^15.7.2","query-string":"^8.1.0",ramda:"^0.28.0",react:"^17.0.2","react-compound-slider":"^3.3.1","react-dom":"^17.0.2","react-json-editor-ajrm":"^2.5.13","react-qr-svg":"^2.2.1","react-svg":"^16.1.29","react-tageditor":"^0.2.3","react-virtualized-auto-sizer":"^1.0.2","smoothscroll-polyfill":"^0.4.4","styled-components":"5.1.0","styled-normalize":"^8.0.6","throttle-debounce":"^3.0.1",trackjs:"^3.7.4","ua-parser-js":"^0.7.23",uuid:"3.3.2",zousan:"^3.0.1","zousan-plus":"^4.0.1"},i={"@applitools/eyes-cypress":"^3.44.0","@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.20.0","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.14.8","@babel/preset-react":"^7.8.3","@percy/cli":"^1.0.0-beta.60","@percy/cypress":"^3.1.0","babel-eslint":"^10.0.1","babel-jest":"^27.0.6","babel-loader":"^8.2.2","babel-plugin-inline-json-import":"^0.3.2","babel-plugin-module-resolver":"^5.0.0","babel-polyfill":"^6.26.0","chai-colors":"^1.0.1","css-loader":"^5.2.4",cypress:"^12.17.2","cypress-browser-permissions":"^1.1.0","cypress-real-events":"^1.11.0","cypress-wait-until":"^1.7.1",eslint:"^7.4.0","eslint-config-standard":"^16.0.3","eslint-plugin-cypress":"^2.11.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jest":"^24.3.6","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-react":"^7.12.4","eslint-plugin-standard":"^5.0.0","fetch-mock-jest":"^1.3.0",glob:"^10.3.3",husky:"^6.0.0",jest:"27.5.1","lint-staged":"^11.0.1","node-fetch":"^2.6.0","null-loader":"^4.0.1","start-server-and-test":"^2.0.0",vite:"^4.3.9",webpack:"^5.84.1","webpack-merge":"^5.8.0"},p="yarn@4.0.2",d={node:">=20"},m={name:e,version:s,private:!0,license:o,type:l,main:t,workspaces:r,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:n,dependencies:c,devDependencies:i,packageManager:p,engines:d};export{n as browserslist,m as default,c as dependencies,i as devDependencies,d as engines,o as license,t as main,e as name,p as packageManager,a as scripts,l as type,s as version,r as workspaces};
1
+ var e="web-engine",s="3.3.243",o="UNLICENSED",l="module",t="src/main.js",r=["demo","deploy","nodesdk","pagesSrc","src/extModules/flexapi"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:a11y":"APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'","cypress:comp":"APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome","cypress:e2e":"APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",demo:"cd demo/ && yarn start","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eTest:"percy exec -- cypress run --browser chrome",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",lint:"eslint . --max-warnings=0",mod:"demo/startMod.sh",mol:"demo/startMol.sh",molProd:"cd deploy && yarn buildAndRunMol",mos:"demo/startMos.sh",prepare:"husky install",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:e2e:video":"cypress run"},n=["defaults"],c={"@azure/event-hubs":"^5.6.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@john-osullivan/react-window-dynamic-fork":"^1.9.0-alpha.1","@locus-labs/mod-badge":"^0.1.102","@locus-labs/mod-default-theme":"^0.0.113","@locus-labs/mod-footer":"^0.0.111","@locus-labs/mod-header":"^0.0.105","@locus-labs/mod-location-marker":"^0.0.104","@locus-labs/mod-map-legend":"^0.0.104","@locus-labs/mod-offscreen-indicator":"^0.0.104","@locus-labs/mod-pin":"^0.0.104","@locus-labs/mod-qr-code-card":"^0.0.104","@locus-labs/mod-qr-code-window":"^0.0.105","@locus-labs/mod-walk-time-matrix":"^0.0.103","@locus-labs/mol-desktop-building-level-selector":"^0.1.108","@locus-labs/mol-desktop-compass":"^0.1.120","@locus-labs/mol-desktop-default-theme":"^0.2.105","@locus-labs/mol-desktop-icon":"^0.1.131","@locus-labs/mol-desktop-logo":"^0.1.101","@locus-labs/mol-desktop-map-nav-button":"^0.1.130","@locus-labs/mol-desktop-submenu":"^0.1.124","@locus-labs/mol-desktop-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.134","@locus-labs/mol-mobile-floating-action-button":"^0.0.117","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.3.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.1.2","@turf/circle":"^6.5.0","@turf/helpers":"^6.5.0","@turf/point-to-line-distance":"^6.5.0","@vitejs/plugin-react":"^4.0.1",IObject:"^0.7.2","axe-core":"^4.9.0","crypto-browserify":"^3.12.0","cypress-axe":"^1.5.0","file-loader":"^6.2.0",flexsearch:"^0.7.31","h3-js":"^4.1.0",i18next:"^20.3.4","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"4.0.1",jsonschema:"^1.2.6",luxon:"^3.3.0","maplibre-gl":"~2.1.9","mini-css-extract-plugin":"^1.6.0","node-polyfill-webpack-plugin":"^1.1.4","path-browserify":"^1.0.1",polished:"^4.0.2","prop-types":"^15.7.2","query-string":"^8.1.0",ramda:"^0.28.0",react:"^17.0.2","react-compound-slider":"^3.3.1","react-dom":"^17.0.2","react-json-editor-ajrm":"^2.5.13","react-qr-svg":"^2.2.1","react-svg":"^16.1.29","react-tageditor":"^0.2.3","react-virtualized-auto-sizer":"^1.0.2","smoothscroll-polyfill":"^0.4.4","styled-components":"5.1.0","styled-normalize":"^8.0.6","throttle-debounce":"^3.0.1",trackjs:"^3.7.4","ua-parser-js":"^0.7.23",uuid:"3.3.2",zousan:"^3.0.1","zousan-plus":"^4.0.1"},i={"@applitools/eyes-cypress":"^3.44.0","@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.20.0","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.14.8","@babel/preset-react":"^7.8.3","@percy/cli":"^1.0.0-beta.60","@percy/cypress":"^3.1.0","babel-eslint":"^10.0.1","babel-jest":"^27.0.6","babel-loader":"^8.2.2","babel-plugin-inline-json-import":"^0.3.2","babel-plugin-module-resolver":"^5.0.0","babel-polyfill":"^6.26.0","chai-colors":"^1.0.1","css-loader":"^5.2.4",cypress:"^12.17.2","cypress-browser-permissions":"^1.1.0","cypress-real-events":"^1.11.0","cypress-wait-until":"^1.7.1",eslint:"^7.4.0","eslint-config-standard":"^16.0.3","eslint-plugin-cypress":"^2.11.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jest":"^24.3.6","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-react":"^7.12.4","eslint-plugin-standard":"^5.0.0","fetch-mock-jest":"^1.3.0",glob:"^10.3.3",husky:"^6.0.0",jest:"27.5.1","lint-staged":"^11.0.1","node-fetch":"^2.6.0","null-loader":"^4.0.1","start-server-and-test":"^2.0.0",vite:"^4.3.9",webpack:"^5.84.1","webpack-merge":"^5.8.0"},p="yarn@4.0.2",d={node:">=20"},m={name:e,version:s,private:!0,license:o,type:l,main:t,workspaces:r,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:n,dependencies:c,devDependencies:i,packageManager:p,engines:d};export{n as browserslist,m as default,c as dependencies,i as devDependencies,d as engines,o as license,t as main,e as name,p as packageManager,a as scripts,l as type,s as version,r as workspaces};
@@ -1 +1 @@
1
- import*as e from"ramda";import t from"zousan";function a(a,s){let n=new t;const i=new t;function o(...e){r(...e),m(...e)}function r(t,s){const n=e.pipe(e.filter((e=>"parking"===e.category)),e.map((a=>{const s=a.dynamicAttributes;if(!s)throw Error(`No dynamicAttributes defined for parking POI ${a.poiId}`);return{...(t-a.timestamp)/1e3<s["parking.timeToLive"]?e.pick(["lotStatus","rateDay","rateHour","timeIsReal","timeToTerminal1","timeToTerminal2"],a):{lotStatus:s["parking.default"],rateDay:"$ -",rateHour:"$ -",timeIsReal:!1},lastUpdated:a.timestamp,lotName:a.lotName}})))(s);a.bus.send("poi/setDynamicData",{plugin:"parking",idValuesMap:n})}const u=async e=>{const t={};for(const s of e){const e=await a.bus.get("poi/getById",{id:s});e&&(t[s]=e.name)}return t},c=(e,t)=>a=>{const s=a.properties.id,n=e[s],i=t[s];if(n){const{queueTime:e,isTemporarilyClosed:t}=n,s=t?"(closed)":`(${e} minute wait)`;a.properties.text=`${i}\n${s}`}return a};async function p(t,s){const n=e.pipe(e.map((e=>[e.poiId,l(t,e)])),e.fromPairs)(s);a.bus.send("poi/setDynamicData",{plugin:"security",idValuesMap:n});const i=await u(Object.keys(n));a.bus.send("map/mutateFeature",{functor:c(n,i)})}const l=(e,t)=>({queueTime:t.queueTime,isTemporarilyClosed:t.isTemporarilyClosed,timeIsReal:!t.isQueueTimeDefault&&t.expiration>e,lastUpdated:e});function m(t,s){const n=["dynamicData","openClosed"],i=e.filter(e.hasPath(n),s),o=e.map(e.path(n),i);if(!e.all(e.both(e.has("isOpen"),e.has("expiration")),e.values(o)))throw Error("Open Closed poi status is malformed.");{const s=e.pipe(e.prop("expiration"),e.lt(t)),n=e.filter(s,o);a.bus.send("poi/setDynamicData",{plugin:"open-closed-status",idValuesMap:n})}}return a.bus.on("venueData/venueDataLoaded",(({venueData:e})=>{n.v?n=t.resolve(e):n.resolve(e)})),a.bus.on("system/readywhenyouare",(()=>i)),{init:async()=>{const e=s.urlBase||"https://rest.locuslabs.com/v3",t=s.urlBaseV1||s.urlBase||"https://rest.locuslabs.com/v1",r=a.config.plugins.venueDataLoader.accountId;async function u(){return n.then((e=>{let a=`${t}/venue/${e.id}/account/${r}/get-all-dynamic-pois/`;return(t.startsWith("./")||t.endsWith(".json"))&&(a=t),a}))}const c=async()=>n.then((t=>e.startsWith("./")||e.endsWith(".json")?e:`${e}/venueId/${t.id}/accountId/${r}/get-dynamic-queue-times/`)),l=async()=>{Promise.all([u().then(fetch).then((e=>e.json())).then((e=>o(Date.now(),e))),c().then(fetch).then((e=>e.json())).then((e=>p(Date.now(),e)))]).then((()=>i.resolve(!0))).catch((e=>{console.error(e),i.resolve(!0)}))},m=await a.bus.get("venueData/getQueueTypes");m.SecurityLane&&m.SecurityLane.length?n.then(l).then((()=>setInterval(l,3e4))):i.resolve(!0)},internal:{mutateSecurityCheckpointLabel:c,processSecurityWaitTimes:p,processParkingPOIS:r,processOpenClosedPois:m,processDynamicPois:o}}}export{a as create};
1
+ import*as e from"ramda";import t from"zousan";function a(a,s){let n=new t;const i=new t,o=a.gt();function r(...e){u(...e),d(...e)}function u(t,s){const n=e.pipe(e.filter((e=>"parking"===e.category)),e.map((a=>{const s=a.dynamicAttributes;if(!s)throw Error(`No dynamicAttributes defined for parking POI ${a.poiId}`);return{...(t-a.timestamp)/1e3<s["parking.timeToLive"]?e.pick(["lotStatus","rateDay","rateHour","timeIsReal","timeToTerminal1","timeToTerminal2"],a):{lotStatus:s["parking.default"],rateDay:"$ -",rateHour:"$ -",timeIsReal:!1},lastUpdated:a.timestamp,lotName:a.lotName}})))(s);a.bus.send("poi/setDynamicData",{plugin:"parking",idValuesMap:n})}const c=async e=>{const t={};for(const s of e){const e=await a.bus.get("poi/getById",{id:s});e&&(t[s]=e.name)}return t},p=(e,t)=>a=>{const s=a.properties.id,n=e[s],i=t[s];if(n){const{queueTime:e,isTemporarilyClosed:t}=n,s=t?o("ui:Closed"):o("ui:_xx_ minute wait",{count:e});a.properties.text=`${i}\n${s}`}return a};async function l(t,s){const n=e.pipe(e.map((e=>[e.poiId,m(t,e)])),e.fromPairs)(s);a.bus.send("poi/setDynamicData",{plugin:"security",idValuesMap:n});const i=await c(Object.keys(n));a.bus.send("map/mutateFeature",{functor:p(n,i)})}const m=(e,t)=>({queueTime:t.queueTime,isTemporarilyClosed:t.isTemporarilyClosed,timeIsReal:!t.isQueueTimeDefault&&t.expiration>e,lastUpdated:e});function d(t,s){const n=["dynamicData","openClosed"],i=e.filter(e.hasPath(n),s),o=e.map(e.path(n),i);if(!e.all(e.both(e.has("isOpen"),e.has("expiration")),e.values(o)))throw Error("Open Closed poi status is malformed.");{const s=e.pipe(e.prop("expiration"),e.lt(t)),n=e.filter(s,o);a.bus.send("poi/setDynamicData",{plugin:"open-closed-status",idValuesMap:n})}}return a.bus.on("venueData/venueDataLoaded",(({venueData:e})=>{n.v?n=t.resolve(e):n.resolve(e)})),a.bus.on("system/readywhenyouare",(()=>i)),{init:async()=>{const e=s.urlBase||"https://rest.locuslabs.com/v3",t=s.urlBaseV1||s.urlBase||"https://rest.locuslabs.com/v1",o=a.config.plugins.venueDataLoader.accountId;async function u(){return n.then((e=>{let a=`${t}/venue/${e.id}/account/${o}/get-all-dynamic-pois/`;return(t.startsWith("./")||t.endsWith(".json"))&&(a=t),a}))}const c=async()=>n.then((t=>e.startsWith("./")||e.endsWith(".json")?e:`${e}/venueId/${t.id}/accountId/${o}/get-dynamic-queue-times/`)),p=async()=>{Promise.all([u().then(fetch).then((e=>e.json())).then((e=>r(Date.now(),e))),c().then(fetch).then((e=>e.json())).then((e=>l(Date.now(),e)))]).then((()=>i.resolve(!0))).catch((e=>{console.error(e),i.resolve(!0)}))},m=await a.bus.get("venueData/getQueueTypes");m.SecurityLane&&m.SecurityLane.length?n.then(p).then((()=>setInterval(p,3e4))):i.resolve(!0)},internal:{mutateSecurityCheckpointLabel:p,processSecurityWaitTimes:l,processParkingPOIS:u,processOpenClosedPois:d,processDynamicPois:r}}}export{a as create};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atriusmaps-node-sdk",
3
- "version": "3.3.241",
3
+ "version": "3.3.243",
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
6
  "map",