atriusmaps-node-sdk 3.3.798 → 3.3.799
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/dist/cjs/package.json.js
CHANGED
|
@@ -223,8 +223,7 @@ function getPrimaryText(segments, index, startName, destinationName, floorIdToNa
|
|
|
223
223
|
case segmentCategories.WALKING_TO_SECURITY_CHECKPOINT: {
|
|
224
224
|
const lookAheadWaypoints = segments[index + 1].waypoints;
|
|
225
225
|
const laneName = getSecurityLaneName(queueTypes, lookAheadWaypoints);
|
|
226
|
-
const
|
|
227
|
-
const securityLane = laneName ? `${laneName} ${translated}` : null; // add translation
|
|
226
|
+
const securityLane = laneName ? T(`wayfinder:Security Lane`, { laneName }) : null;
|
|
228
227
|
|
|
229
228
|
const poiTitle = getClosestSecurityPoiTitle(lookAheadWaypoints, securityPois);
|
|
230
229
|
const displayName = securityLane || poiTitle; // Use laneName if defined; otherwise, poiTitle
|
|
@@ -234,8 +233,7 @@ function getPrimaryText(segments, index, startName, destinationName, floorIdToNa
|
|
|
234
233
|
return T(`wayfinder:${segments[index + 1].type}`);
|
|
235
234
|
case segmentCategories.SECURITY_CHECKPOINT: {
|
|
236
235
|
const laneName = getSecurityLaneName(queueTypes, segment.waypoints);
|
|
237
|
-
const
|
|
238
|
-
const securityLane = laneName ? `${laneName} ${translated}` : null;
|
|
236
|
+
const securityLane = laneName ? T(`wayfinder:Security Lane`, { laneName }) : null;
|
|
239
237
|
const poiTitle = getClosestSecurityPoiTitle(segment.waypoints, securityPois);
|
|
240
238
|
const displayName = securityLane || poiTitle; // Use securityLane if defined; otherwise, poiTitle
|
|
241
239
|
return displayName || getLevelName(segment, floorIdToNameMap);
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="web-engine",t="3.3.
|
|
1
|
+
var e="web-engine",t="3.3.799",s="UNLICENSED",r="module",o="src/main.js",i=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:comp":"cypress open --component --browser chrome","cypress:comp:ci":"cypress run --component",demo:"cd demo/ && yarn start",dev:"yarn mol e2e","format:check":"yarn prettier . --check","format:fix":"yarn prettier . --write",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh","icons:convert":"node scripts/convertSvgToJsx.mjs",lint:"eslint . --ext .js,.jsx,.ts,.tsx",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol","playwright:ci":"yarn playwright test --grep-invert sdk","playwright:ci:failed":"yarn playwright test --last-failed --grep-invert sdk","playwright:sdk":"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./test/sdk && npx http-server' 8080 'yarn playwright test sdk --ui'","playwright:ui":"yarn playwright test --ui --grep-invert sdk",prepare:"husky",test:"vitest run","test-watch":"vitest --watch","test:all":"yarn lint && yarn format:check && yarn test && yarn cypress:comp:ci && yarn playwright:ci","test:mod":"playwright test --config=playwright.mod.config.ts",typecheck:"tsc -p tsconfig.checkjs.json",storybook:"storybook dev -p 6006","build-storybook":"storybook build"},l=["defaults"],n={"@azure/event-hubs":"^5.12.2","@csstools/normalize.css":"^11.0.1","@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@locus-labs/mod-badge":"^0.1.102","@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","@mapbox/mapbox-gl-draw":"^1.5.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.6","@turf/area":"^7.2.0","@turf/bbox-clip":"^7.2.0","@turf/bbox-polygon":"^7.2.0","@turf/bearing":"^7.2.0","@turf/circle":"^7.2.0","@turf/helpers":"^7.2.0","@turf/point-to-line-distance":"^7.2.0","@vitejs/plugin-react":"^5.2.0","axe-core":"^4.10.3",browserslist:"^4.27.0","crypto-browserify":"^3.12.1","cypress-multi-reporters":"^2.0.5","cypress-real-events":"^1.14.0",dompurify:"^3.3.3","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^20.6.1","i18next-browser-languagedetector":"^6.1.1",jsdom:"^25.0.1",jsonschema:"^1.5.0",luxon:"^3.5.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^2.9.2","mocha-junit-reporter":"^2.2.1",mochawesome:"^7.1.3","node-polyfill-webpack-plugin":"^4.1.0","path-browserify":"^1.0.1",pmtiles:"^4.4.0","prop-types":"^15.8.1","qrcode.react":"^4.2.0",ramda:"^0.30.1",react:"^19.2.4","react-compound-slider":"^3.4.0","react-dom":"^19.2.4","react-json-editor-ajrm":"^2.5.14","react-svg":"^16.3.0","react-virtualized-auto-sizer":"^1.0.25","react-window":"^1.8.11","smoothscroll-polyfill":"^0.4.4","styled-components":"^6.1.15","styled-normalize":"^8.1.1","throttle-debounce":"^5.0.2",trackjs:"^3.10.4","ua-parser-js":"^0.7.40",uuid:"11.1.0",zousan:"^3.0.1","zousan-plus":"^4.0.1"},c={"@applitools/eyes-playwright":"^1.44.1","@axe-core/playwright":"^4.10.2","@azure/identity":"^4.13.0","@azure/playwright":"^1.0.0","@babel/core":"^7.26.10","@babel/eslint-parser":"^7.26.10","@babel/plugin-syntax-import-assertions":"^7.26.0","@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@playwright/test":"^1.56.0","@storybook/addon-essentials":"^8.6.15","@storybook/blocks":"^8.6.15","@storybook/react":"^8.6.15","@storybook/react-vite":"^8.6.15","@testing-library/jest-dom":"^6.6.3","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","@typescript-eslint/eslint-plugin":"^8.26.1","@typescript-eslint/parser":"^8.26.1","chai-colors":"^1.0.1","css-loader":"^7.1.2",cypress:"^15.0.0","cypress-wait-until":"^3.0.2",eslint:"^8.57.1","eslint-config-prettier":"^10.1.8","eslint-config-standard":"^17.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-import-resolver-typescript":"^3.9.1","eslint-plugin-cypress":"^2.15.2","eslint-plugin-import":"^2.31.0","eslint-plugin-n":"^17.16.2","eslint-plugin-node":"^11.1.0","eslint-plugin-playwright":"^2.2.2","eslint-plugin-promise":"^5.2.0","eslint-plugin-react":"^7.37.4","eslint-plugin-standard":"^5.0.0","eslint-plugin-vitest":"^0.5.4","fetch-mock":"^12.6.0",glob:"^11.0.1",husky:"^9.1.7","lint-staged":"^15.5.0","node-fetch":"^2.7.0","null-loader":"^4.0.1",nx:"19.8.14","nx-remotecache-azure":"^19.0.0","os-browserify":"^0.3.0",prettier:"3.7.4","start-server-and-test":"^2.0.11",storybook:"^8.6.15",typescript:"^5.8.2",vite:"^7.3.2",vitest:"^4.1.2","webpack-merge":"^6.0.1"},p="yarn@4.13.0",d={node:"24.x"},y={},m={name:e,version:t,private:!0,license:s,type:r,main:o,workspaces:i,scripts:a,"lint-staged":{"*.js":["eslint --fix","prettier --check"],"*.{json,md,css,ts,tsx,jsx}":["prettier --check"]},browserslist:l,dependencies:n,devDependencies:c,packageManager:p,engines:d,nx:y};export{l as browserslist,m as default,n as dependencies,c as devDependencies,d as engines,s as license,o as main,e as name,y as nx,p as packageManager,a as scripts,r as type,t as version,i as workspaces};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bearing as e}from"@turf/bearing";import{point as t}from"@turf/helpers";import{compose as r,not as n,includes as a,__ as s,toLower as i,prop as o,find as c,drop as u,last as _,propEq as T}from"ramda";import{findBoundsOfWaypoints as A}from"../../../src/utils/bounds.js";import{metersToYards as S}from"../../../src/utils/distance.js";import{bearingToDirection as d,distance as R}from"../../../src/utils/geodesy.js";import E from"./segmentBadges.js";import I from"./segmentCategories.js";function O(r,n="",a="",s,i,c={},u,_=[],T){return r.map((u,R)=>{const O=N("securityWaitTimes")(u.waypoints),f=O&&!O.isTemporarilyClosed?O.queueTime:Math.round(function(e){if(1===e.length)return e[0].eta;return e.map(o("eta")).slice(1).reduce((e,t)=>e+t,0)}(u.waypoints)),L=Math.round(function(e){if(1===e.length)return e[0].distance;return e.map(e=>e.distance).slice(1).reduce((e,t)=>e+t,0)}(u.waypoints)),P="yards"===T?S(L):L,W=function(e){switch(e){case I.START:return E.START;case I.WALKING_TO_END:return E.END;case I.ELEVATOR:return E.ELEVATOR;case I.ELEVATOR_UP:return E.ELEVATOR_UP;case I.ELEVATOR_DOWN:return E.ELEVATOR_DOWN;case I.STAIRS:return E.STAIRS;case I.STAIRS_UP:return E.STAIRS_UP;case I.STAIRS_DOWN:return E.STAIRS_DOWN;case I.ACCESSIBLE_STAIRS:return E.ACCESSIBLE_STAIRS;case I.ACCESSIBLE_STAIRS_UP:return E.ACCESSIBLE_STAIRS_UP;case I.ACCESSIBLE_STAIRS_DOWN:return E.ACCESSIBLE_STAIRS_DOWN;case I.ESCALATOR:return E.ESCALATOR;case I.ESCALATOR_UP:return E.ESCALATOR_UP;case I.ESCALATOR_DOWN:return E.ESCALATOR_DOWN;case I.WALKING_TO_PORTAL:case I.WALK:case I.WALK_DOWN:case I.WALK_UP:return E.WALK;case I.TRAIN:return E.TRAIN;case I.TRAIN_UP:return E.TRAIN_UP;case I.TRAIN_DOWN:return E.TRAIN_DOWN;case I.BUS:return E.BUS;case I.BUS_UP:return E.BUS_UP;case I.BUS_DOWN:return E.BUS_DOWN;case I.SECURITY_CHECKPOINT:return E.SECURITY_CHECKPOINT;case I.RAMP:return E.RAMP;case I.RAMP_UP:return E.RAMP_UP;case I.RAMP_DOWN:return E.RAMP_DOWN;default:return E.WALK}}(u.segmentCategory),U=function(e,t){let r;switch(e){case I.START:r=0;break;case I.WALKING_TO_END:r=t.length-1;break;case I.WALKING_TO_PORTAL:r=Math.min(t.length-1,Math.ceil(t.length/2));break;default:r=t.length-1}return t[r].position}(u.segmentCategory,u.waypoints),D=(({waypoints:r},n)=>{const[a]=r,s=r[r.length-1],i=t([a.position.lng,a.position.lat]),o=t([s.position.lng,s.position.lat]),c=e(i,o);return d(c,n)})(u,i),g=function(e,t,r,n,a,s,i,o){const c=e[t];switch(c.segmentCategory){case I.START:return
|
|
1
|
+
import{bearing as e}from"@turf/bearing";import{point as t}from"@turf/helpers";import{compose as r,not as n,includes as a,__ as s,toLower as i,prop as o,find as c,drop as u,last as _,propEq as T}from"ramda";import{findBoundsOfWaypoints as A}from"../../../src/utils/bounds.js";import{metersToYards as S}from"../../../src/utils/distance.js";import{bearingToDirection as d,distance as R}from"../../../src/utils/geodesy.js";import E from"./segmentBadges.js";import I from"./segmentCategories.js";function O(r,n="",a="",s,i,c={},u,_=[],T){return r.map((u,R)=>{const O=N("securityWaitTimes")(u.waypoints),f=O&&!O.isTemporarilyClosed?O.queueTime:Math.round(function(e){if(1===e.length)return e[0].eta;return e.map(o("eta")).slice(1).reduce((e,t)=>e+t,0)}(u.waypoints)),L=Math.round(function(e){if(1===e.length)return e[0].distance;return e.map(e=>e.distance).slice(1).reduce((e,t)=>e+t,0)}(u.waypoints)),P="yards"===T?S(L):L,W=function(e){switch(e){case I.START:return E.START;case I.WALKING_TO_END:return E.END;case I.ELEVATOR:return E.ELEVATOR;case I.ELEVATOR_UP:return E.ELEVATOR_UP;case I.ELEVATOR_DOWN:return E.ELEVATOR_DOWN;case I.STAIRS:return E.STAIRS;case I.STAIRS_UP:return E.STAIRS_UP;case I.STAIRS_DOWN:return E.STAIRS_DOWN;case I.ACCESSIBLE_STAIRS:return E.ACCESSIBLE_STAIRS;case I.ACCESSIBLE_STAIRS_UP:return E.ACCESSIBLE_STAIRS_UP;case I.ACCESSIBLE_STAIRS_DOWN:return E.ACCESSIBLE_STAIRS_DOWN;case I.ESCALATOR:return E.ESCALATOR;case I.ESCALATOR_UP:return E.ESCALATOR_UP;case I.ESCALATOR_DOWN:return E.ESCALATOR_DOWN;case I.WALKING_TO_PORTAL:case I.WALK:case I.WALK_DOWN:case I.WALK_UP:return E.WALK;case I.TRAIN:return E.TRAIN;case I.TRAIN_UP:return E.TRAIN_UP;case I.TRAIN_DOWN:return E.TRAIN_DOWN;case I.BUS:return E.BUS;case I.BUS_UP:return E.BUS_UP;case I.BUS_DOWN:return E.BUS_DOWN;case I.SECURITY_CHECKPOINT:return E.SECURITY_CHECKPOINT;case I.RAMP:return E.RAMP;case I.RAMP_UP:return E.RAMP_UP;case I.RAMP_DOWN:return E.RAMP_DOWN;default:return E.WALK}}(u.segmentCategory),U=function(e,t){let r;switch(e){case I.START:r=0;break;case I.WALKING_TO_END:r=t.length-1;break;case I.WALKING_TO_PORTAL:r=Math.min(t.length-1,Math.ceil(t.length/2));break;default:r=t.length-1}return t[r].position}(u.segmentCategory,u.waypoints),D=(({waypoints:r},n)=>{const[a]=r,s=r[r.length-1],i=t([a.position.lng,a.position.lat]),o=t([s.position.lng,s.position.lat]),c=e(i,o);return d(c,n)})(u,i),g=function(e,t,r,n,a,s,i,o){const c=e[t];switch(c.segmentCategory){case I.START:return l(c.waypoints[0].position,r);case I.WALKING_TO_END:return l(c.waypoints[c.waypoints.length-1].position,n);case I.WALKING_TO_SECURITY_CHECKPOINT:{const r=e[t+1].waypoints,n=m(o,r),a=n?s("wayfinder:Security Lane",{laneName:n}):null,u=w(r,i);return a||u||s(`wayfinder:${c.type}`)}case I.WALKING_TO_PORTAL:return s(`wayfinder:${e[t+1].type}`);case I.SECURITY_CHECKPOINT:{const e=m(o,c.waypoints),t=e?s("wayfinder:Security Lane",{laneName:e}):null,r=w(c.waypoints,i);return t||r||y(c,a)}case I.ELEVATOR:case I.ELEVATOR_DOWN:case I.ELEVATOR_UP:case I.ESCALATOR:case I.ESCALATOR_DOWN:case I.ESCALATOR_UP:case I.STAIRS:case I.STAIRS_DOWN:case I.STAIRS_UP:case I.ACCESSIBLE_STAIRS:case I.ACCESSIBLE_STAIRS_DOWN:case I.ACCESSIBLE_STAIRS_UP:return y(c,a);default:return s(`wayfinder:${c.type}`)}}(r,R,n,a,s,i,_,c),K={primaryText:g,secondaryText:p(u,f,i,!1),secondaryTextUI:p(u,f,i,!0,D,T,P),icon:W,animationAnchor:U,eta:f,distance:L,bounds:A(u.waypoints),isAccessible:C(u),securityWaitTimes:O};return u.poiId&&(K.poiId=u.poiId),K})}function l(e,t){return e.name?e.name:t}function y(e,t){return t[_(e.waypoints).position.floorId]}function p(e,t,r,n,a,s,i){const o=L(t,r),c="Proceed";switch(e.segmentCategory){case I.START:return r("wayfinder:Begin route at");case I.ELEVATOR:return r("wayfinder:Take elevator to");case I.ELEVATOR_UP:return r("wayfinder:Take elevator up to");case I.ELEVATOR_DOWN:return r("wayfinder:Take elevator down to");case I.STAIRS:return r("wayfinder:Take stairs to");case I.STAIRS_UP:return r("wayfinder:Take stairs up to");case I.STAIRS_DOWN:return r("wayfinder:Take stairs down to");case I.ACCESSIBLE_STAIRS:return r("wayfinder:Take accessible stairs to");case I.ACCESSIBLE_STAIRS_UP:return r("wayfinder:Take accessible stairs up to");case I.ACCESSIBLE_STAIRS_DOWN:return r("wayfinder:Take accessible stairs down to");case I.ESCALATOR:return r("wayfinder:Take escalator to");case I.ESCALATOR_UP:return r("wayfinder:Take escalator up to");case I.ESCALATOR_DOWN:return r("wayfinder:Take escalator down to");case I.WALK:case I.WALKING_TO_SECURITY_CHECKPOINT:case I.WALKING_TO_PORTAL:case I.WALKING_TO_END:return n?f(i,s,a,r):o(`${c} <1 minute to`,`${c} xx minute to`);case I.WALK_DOWN:return o(`${c} <1 minute down to`,`${c} xx minute down to`);case I.WALK_UP:return o(`${c} <1 minute up to`,`${c} xx minute up to`);case I.TRAIN:return o("Take train <1 minute","Take train xx minute");case I.BUS:return o("Take bus <1 minute","Take bus xx minute");case I.SECURITY_CHECKPOINT:return r("wayfinder:Through");case I.RAMP:return r("wayfinder:Take ramp to");case I.RAMP_UP:return r("wayfinder:Take ramp up to");case I.RAMP_DOWN:return r("wayfinder:Take ramp down to");default:return""}}const f=(e,t,r,n)=>e>1?n("meters"===t?"wayfinder:Proceed __direction__ __count__ meter to_plural":"wayfinder:Proceed __direction__ __count__ yard to_plural",{direction:r,count:e}):e<=1?n("meters"===t?"wayfinder:Proceed __direction__ __count__ meter to":"wayfinder:Proceed __direction__ __count__ yard to",{direction:r,count:e}):void 0,L=(e,t)=>(r,n)=>0===e?t("wayfinder:"+r):t("wayfinder:"+n,{count:e}),C=r(n,a(s,["escalator","stairs"]),i,o("type")),m=(e,t)=>{const r=N("securityLane")(t);if(!r)return;const n=o(r.type,e),a=c(T(r.id,"id"),n);return o("displayText",a)},N=e=>r(o(e),c(o(e)),u(1)),w=(e,t)=>{if(!e||0===e.length)return null;const r=e[0],{lat:n,lng:a,floorId:s}=r.position,i=t.filter(e=>e.position&&e.position.floorId===s);let o=null,c=1/0;return i.forEach(e=>{const t=R(n,a,e.position.latitude,e.position.longitude);t<c&&(c=t,o=e)}),o?o.name:null};export{O as default};
|
package/package.json
CHANGED