atriusmaps-node-sdk 3.3.346 → 3.3.348
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/nodesdk/nodeEntry.js +4 -10
- package/dist/cjs/package.json.js +31 -32
- package/dist/cjs/plugins/clientAPI/src/clientAPI.js +0 -2
- package/dist/cjs/plugins/dynamicPois/src/dynamicPois.js +7 -12
- package/dist/cjs/plugins/poiDataManager/src/poiDataManager.js +10 -16
- package/dist/cjs/plugins/sdkServer/src/sdkHeadless.js +3 -6
- package/dist/cjs/plugins/sdkServer/src/sdkServer.js +1 -3
- package/dist/cjs/plugins/searchService/src/poiSearch.js +3 -4
- package/dist/cjs/plugins/searchService/src/searchService.js +5 -11
- package/dist/cjs/plugins/searchService/src/utils.js +1 -7
- package/dist/cjs/plugins/venueDataLoader/src/venueDataLoader.js +12 -18
- package/dist/cjs/plugins/venueDataLoader/src/venueLoadingUtils.js +4 -14
- package/dist/cjs/plugins/wayfinder/src/findRoute.js +3 -6
- package/dist/cjs/plugins/wayfinder/src/navGraph.js +0 -2
- package/dist/cjs/plugins/wayfinder/src/navGraphDebug.js +3 -6
- package/dist/cjs/plugins/wayfinder/src/segmentBuilder.js +3 -6
- package/dist/cjs/plugins/wayfinder/src/stepBuilder.js +1 -1
- package/dist/cjs/plugins/wayfinder/src/wayfinder.js +9 -15
- package/dist/cjs/src/app.js +11 -37
- package/dist/cjs/src/configs/postproc-mol-url-parms.js +0 -2
- package/dist/cjs/src/configs/postproc-stateTracking.js +3 -6
- package/dist/cjs/src/configs/sdkHeadless.json.js +1 -1
- package/dist/cjs/src/controller.js +5 -10
- package/dist/cjs/src/debugTools.js +3 -4
- package/dist/cjs/src/env.js +0 -2
- package/dist/cjs/src/extModules/bustle.js +5 -10
- package/dist/cjs/src/extModules/flexapi/src/help.js +0 -2
- package/dist/cjs/src/extModules/flexapi/src/index.js +1 -5
- package/dist/cjs/src/extModules/flexapi/src/validate.js +0 -2
- package/dist/cjs/src/extModules/geohasher.js +0 -2
- package/dist/cjs/src/extModules/log.js +0 -2
- package/dist/cjs/src/historyManager.js +0 -2
- package/dist/cjs/src/utils/bounds.js +0 -2
- package/dist/cjs/src/utils/buildStructureLookup.js +3 -6
- package/dist/cjs/src/utils/configUtils.js +0 -2
- package/dist/cjs/src/utils/dom.js +1 -3
- package/dist/cjs/src/utils/funcs.js +0 -2
- package/dist/cjs/src/utils/geodesy.js +0 -2
- package/dist/cjs/src/utils/geom.js +6 -56
- package/dist/cjs/src/utils/i18n.js +2 -6
- package/dist/cjs/src/utils/location.js +0 -2
- package/dist/cjs/src/utils/rand.js +0 -2
- package/dist/package.json.js +1 -1
- package/dist/plugins/poiDataManager/src/poiDataManager.js +1 -1
- package/dist/plugins/venueDataLoader/src/venueDataLoader.js +1 -1
- package/dist/plugins/venueDataLoader/src/venueLoadingUtils.js +1 -1
- package/dist/plugins/wayfinder/src/navGraph.js +1 -1
- package/dist/plugins/wayfinder/src/stepBuilder.js +1 -1
- package/dist/plugins/wayfinder/src/wayfinder.js +1 -1
- package/dist/src/controller.js +1 -1
- package/dist/src/utils/dom.js +1 -1
- package/dist/src/utils/geom.js +1 -1
- package/package.json +10 -8
|
@@ -9,18 +9,12 @@ var _package = require('../package.json.js');
|
|
|
9
9
|
var controller = require('../src/controller.js');
|
|
10
10
|
var observable = require('../src/utils/observable.js');
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
15
|
-
var https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
|
16
|
-
var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
|
|
17
|
-
|
|
18
|
-
const version = _package["default"].version;
|
|
12
|
+
const version = _package.default.version;
|
|
19
13
|
const LIB_NAME = 'Atrius Maps JS SDK Client';
|
|
20
14
|
|
|
21
15
|
function setupFetch (config) {
|
|
22
|
-
const httpAgent = new
|
|
23
|
-
const httpsAgent = new
|
|
16
|
+
const httpAgent = new http.Agent({ keepAlive: true });
|
|
17
|
+
const httpsAgent = new https.Agent({ keepAlive: true });
|
|
24
18
|
|
|
25
19
|
// provide easy proxy handling via config.proxy in form of { host, port }
|
|
26
20
|
const proxyAgent = config.proxy ? new httpsProxyAgent.HttpsProxyAgent(`http://${config.proxy.host}:${config.proxy.port}`) : null;
|
|
@@ -28,7 +22,7 @@ function setupFetch (config) {
|
|
|
28
22
|
// Support a user defined agent - or a proxy agent - else we specify our own, forcing keepAlive to true (which is default in Node >= 19)
|
|
29
23
|
const agent = config.agent || proxyAgent || (url => url.protocol === 'http:' ? httpAgent : httpsAgent);
|
|
30
24
|
|
|
31
|
-
global.fetch = async (url, options) =>
|
|
25
|
+
global.fetch = async (url, options) => fetch(url, { ...options, agent });
|
|
32
26
|
}
|
|
33
27
|
|
|
34
28
|
// logging setup
|
package/dist/cjs/package.json.js
CHANGED
|
@@ -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.
|
|
6
|
+
var version = "3.3.348";
|
|
7
7
|
var license = "UNLICENSED";
|
|
8
8
|
var type = "module";
|
|
9
9
|
var main = "src/main.js";
|
|
@@ -20,11 +20,11 @@ var scripts = {
|
|
|
20
20
|
"cypress:a11y": "APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'",
|
|
21
21
|
"cypress:comp": "APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome",
|
|
22
22
|
"cypress:e2e": "APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",
|
|
23
|
-
e2eSDKTest: "yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",
|
|
24
23
|
demo: "cd demo/ && yarn start",
|
|
25
24
|
"e2e:comp": "cypress run --component",
|
|
26
25
|
"e2e:record": "yarn cypress run --env RECORD_MODE=true",
|
|
27
|
-
|
|
26
|
+
e2eSDKTest: "yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",
|
|
27
|
+
e2eTest: "cypress run --browser chrome",
|
|
28
28
|
goProd: "cd deploy && scripts/goProd.sh",
|
|
29
29
|
goStaging: "deploy/scripts/goStaging.sh",
|
|
30
30
|
i18nOverrides: "yarn node utils/i18nOverrideCli src/i18n src/i18n-overrides",
|
|
@@ -34,20 +34,20 @@ var scripts = {
|
|
|
34
34
|
"mol:build": "demo/startMolBuild.sh",
|
|
35
35
|
molProd: "cd deploy && yarn buildAndRunMol",
|
|
36
36
|
prepare: "husky install",
|
|
37
|
-
"test:vitest": "vitest",
|
|
38
37
|
test: "jest --no-cache --verbose",
|
|
39
38
|
"test-watch": "jest --verbose --watch",
|
|
40
|
-
"test:e2e:video": "cypress run"
|
|
39
|
+
"test:e2e:video": "cypress run",
|
|
40
|
+
"test:vitest": "vitest"
|
|
41
41
|
};
|
|
42
42
|
var browserslist = [
|
|
43
43
|
"defaults"
|
|
44
44
|
];
|
|
45
45
|
var dependencies = {
|
|
46
|
-
"@azure/event-hubs": "^5.
|
|
47
|
-
"@dnd-kit/core": "^6.0
|
|
46
|
+
"@azure/event-hubs": "^5.12.2",
|
|
47
|
+
"@dnd-kit/core": "^6.1.0",
|
|
48
48
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
49
|
-
"@dnd-kit/sortable": "^
|
|
50
|
-
"@dnd-kit/utilities": "^3.2.
|
|
49
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
50
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
51
51
|
"@john-osullivan/react-window-dynamic-fork": "^1.9.0-alpha.1",
|
|
52
52
|
"@locus-labs/mod-badge": "^0.1.102",
|
|
53
53
|
"@locus-labs/mod-default-theme": "^0.0.113",
|
|
@@ -73,9 +73,9 @@ var dependencies = {
|
|
|
73
73
|
"@locus-labs/mol-mobile-icon": "^0.1.118",
|
|
74
74
|
"@locus-labs/mol-mobile-text": "^0.1.116",
|
|
75
75
|
"@locus-labs/mol-mobile-toast": "^0.1.102",
|
|
76
|
-
"@mapbox/mapbox-gl-draw": "^1.3
|
|
76
|
+
"@mapbox/mapbox-gl-draw": "^1.4.3",
|
|
77
77
|
"@mapbox/mapbox-gl-draw-static-mode": "^1.0.1",
|
|
78
|
-
"@microsoft/applicationinsights-web": "^3.
|
|
78
|
+
"@microsoft/applicationinsights-web": "^3.3.4",
|
|
79
79
|
"@turf/circle": "^6.5.0",
|
|
80
80
|
"@turf/helpers": "^6.5.0",
|
|
81
81
|
"@turf/point-to-line-distance": "^6.5.0",
|
|
@@ -91,11 +91,11 @@ var dependencies = {
|
|
|
91
91
|
"h3-js": "^4.1.0",
|
|
92
92
|
i18next: "^20.3.4",
|
|
93
93
|
"i18next-browser-languagedetector": "^6.1.1",
|
|
94
|
-
"jest-transform-css": "
|
|
95
|
-
jsdom: "^25.0.
|
|
94
|
+
"jest-transform-css": "6.0.1",
|
|
95
|
+
jsdom: "^25.0.1",
|
|
96
96
|
jsonschema: "^1.2.6",
|
|
97
97
|
luxon: "^3.3.0",
|
|
98
|
-
"maplibre-gl": "
|
|
98
|
+
"maplibre-gl": "^4.7.1",
|
|
99
99
|
"mini-css-extract-plugin": "^1.6.0",
|
|
100
100
|
"mocha-junit-reporter": "^2.2.1",
|
|
101
101
|
mochawesome: "^7.1.3",
|
|
@@ -104,7 +104,7 @@ var dependencies = {
|
|
|
104
104
|
polished: "^4.0.2",
|
|
105
105
|
"prop-types": "^15.7.2",
|
|
106
106
|
"query-string": "^8.1.0",
|
|
107
|
-
ramda: "^0.
|
|
107
|
+
ramda: "^0.30.1",
|
|
108
108
|
react: "^17.0.2",
|
|
109
109
|
"react-compound-slider": "^3.3.1",
|
|
110
110
|
"react-dom": "^17.0.2",
|
|
@@ -124,19 +124,17 @@ var dependencies = {
|
|
|
124
124
|
"zousan-plus": "^4.0.1"
|
|
125
125
|
};
|
|
126
126
|
var devDependencies = {
|
|
127
|
-
"@applitools/eyes-cypress": "^3.
|
|
128
|
-
"@babel/core": "^7.
|
|
129
|
-
"@babel/eslint-parser": "^7.
|
|
130
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
127
|
+
"@applitools/eyes-cypress": "^3.47.0",
|
|
128
|
+
"@babel/core": "^7.26.0",
|
|
129
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
130
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
131
131
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
132
|
-
"@babel/plugin-syntax-import-assertions": "^7.
|
|
133
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
134
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
135
|
-
"@babel/preset-env": "^7.
|
|
136
|
-
"@babel/preset-react": "^7.
|
|
137
|
-
"@
|
|
138
|
-
"@percy/cypress": "^3.1.0",
|
|
139
|
-
"@testing-library/jest-dom": "^6.5.0",
|
|
132
|
+
"@babel/plugin-syntax-import-assertions": "^7.26.0",
|
|
133
|
+
"@babel/plugin-transform-modules-commonjs": "^7.25.9",
|
|
134
|
+
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
135
|
+
"@babel/preset-env": "^7.26.0",
|
|
136
|
+
"@babel/preset-react": "^7.25.9",
|
|
137
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
140
138
|
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
141
139
|
"@typescript-eslint/parser": "^7.13.0",
|
|
142
140
|
"babel-jest": "^27.0.6",
|
|
@@ -163,7 +161,8 @@ var devDependencies = {
|
|
|
163
161
|
"fetch-mock-jest": "^1.3.0",
|
|
164
162
|
glob: "^10.3.3",
|
|
165
163
|
husky: "^6.0.0",
|
|
166
|
-
jest: "
|
|
164
|
+
jest: "29.7.0",
|
|
165
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
167
166
|
"lint-staged": "^11.0.1",
|
|
168
167
|
"node-fetch": "^2.6.0",
|
|
169
168
|
"null-loader": "^4.0.1",
|
|
@@ -172,9 +171,9 @@ var devDependencies = {
|
|
|
172
171
|
"start-server-and-test": "^2.0.0",
|
|
173
172
|
typescript: "^5.4.5",
|
|
174
173
|
vite: "^4.3.9",
|
|
175
|
-
vitest: "^2.
|
|
176
|
-
webpack: "^5.
|
|
177
|
-
"webpack-merge": "^
|
|
174
|
+
vitest: "^2.1.5",
|
|
175
|
+
webpack: "^5.96.1",
|
|
176
|
+
"webpack-merge": "^6.0.1"
|
|
178
177
|
};
|
|
179
178
|
var packageManager = "yarn@4.3.1";
|
|
180
179
|
var engines = {
|
|
@@ -205,7 +204,7 @@ var pkg = {
|
|
|
205
204
|
};
|
|
206
205
|
|
|
207
206
|
exports.browserslist = browserslist;
|
|
208
|
-
exports
|
|
207
|
+
exports.default = pkg;
|
|
209
208
|
exports.dependencies = dependencies;
|
|
210
209
|
exports.devDependencies = devDependencies;
|
|
211
210
|
exports.engines = engines;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var Zousan = require('zousan');
|
|
7
5
|
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
function _interopNamespace(e) {
|
|
11
|
-
if (e && e.__esModule) return e;
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
12
7
|
var n = Object.create(null);
|
|
13
8
|
if (e) {
|
|
14
9
|
Object.keys(e).forEach(function (k) {
|
|
@@ -21,12 +16,11 @@ function _interopNamespace(e) {
|
|
|
21
16
|
}
|
|
22
17
|
});
|
|
23
18
|
}
|
|
24
|
-
n
|
|
19
|
+
n.default = e;
|
|
25
20
|
return Object.freeze(n);
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
var R__namespace = /*#__PURE__*/
|
|
29
|
-
var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
|
|
23
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
30
24
|
|
|
31
25
|
/*
|
|
32
26
|
This service obtains dynamic POI data from our own backend REST API service.
|
|
@@ -53,11 +47,12 @@ var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
|
|
|
53
47
|
lastUpdated: timestamp of last update (as sent by server)
|
|
54
48
|
*/
|
|
55
49
|
|
|
50
|
+
|
|
56
51
|
const REFRESH_FREQUENCY = 1000 * 30; // every 30 seconds
|
|
57
52
|
|
|
58
53
|
function create (app, config) {
|
|
59
|
-
let dataLoadedProm = new
|
|
60
|
-
const dynamicDataNotPending = new
|
|
54
|
+
let dataLoadedProm = new Zousan();
|
|
55
|
+
const dynamicDataNotPending = new Zousan();
|
|
61
56
|
|
|
62
57
|
const T = app.gt();
|
|
63
58
|
|
|
@@ -209,7 +204,7 @@ function create (app, config) {
|
|
|
209
204
|
|
|
210
205
|
app.bus.on('venueData/venueDataLoaded', ({ venueData }) => {
|
|
211
206
|
if (dataLoadedProm.v) // non-standard - indicates promise has been resolved...
|
|
212
|
-
dataLoadedProm =
|
|
207
|
+
dataLoadedProm = Zousan.resolve(venueData);
|
|
213
208
|
else
|
|
214
209
|
dataLoadedProm.resolve(venueData);
|
|
215
210
|
});
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var Zousan = require('zousan');
|
|
7
5
|
var buildStructureLookup = require('../../../src/utils/buildStructureLookup.js');
|
|
8
6
|
var configUtils = require('../../../src/utils/configUtils.js');
|
|
9
7
|
var i18n = require('../../../src/utils/i18n.js');
|
|
10
8
|
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
function _interopNamespace(e) {
|
|
14
|
-
if (e && e.__esModule) return e;
|
|
9
|
+
function _interopNamespaceDefault(e) {
|
|
15
10
|
var n = Object.create(null);
|
|
16
11
|
if (e) {
|
|
17
12
|
Object.keys(e).forEach(function (k) {
|
|
@@ -24,12 +19,11 @@ function _interopNamespace(e) {
|
|
|
24
19
|
}
|
|
25
20
|
});
|
|
26
21
|
}
|
|
27
|
-
n
|
|
22
|
+
n.default = e;
|
|
28
23
|
return Object.freeze(n);
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
var R__namespace = /*#__PURE__*/
|
|
32
|
-
var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
|
|
26
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
33
27
|
|
|
34
28
|
async function create (app, config) {
|
|
35
29
|
const log = app.log.sublog('poiDataManager');
|
|
@@ -37,7 +31,7 @@ async function create (app, config) {
|
|
|
37
31
|
app.bus.send('venueData/loadPoiData');
|
|
38
32
|
};
|
|
39
33
|
|
|
40
|
-
let poisLoaded = new
|
|
34
|
+
let poisLoaded = new Zousan();
|
|
41
35
|
|
|
42
36
|
const fixPositionInfo = (poi, structuresLookup) => {
|
|
43
37
|
const { position } = poi;
|
|
@@ -89,7 +83,7 @@ async function create (app, config) {
|
|
|
89
83
|
|
|
90
84
|
const getRoomId = R__namespace.pipe(
|
|
91
85
|
R__namespace.propOr([], 'externalIds'),
|
|
92
|
-
R__namespace.find(R__namespace.propEq('
|
|
86
|
+
R__namespace.find(R__namespace.propEq('roomId', 'type')),
|
|
93
87
|
R__namespace.prop('id'),
|
|
94
88
|
R__namespace.unless(R__namespace.isNil, R__namespace.tail)
|
|
95
89
|
);
|
|
@@ -174,7 +168,7 @@ async function create (app, config) {
|
|
|
174
168
|
});
|
|
175
169
|
|
|
176
170
|
app.bus.on('poi/getByFloorId', async ({ floorId }) => poisLoaded.then(
|
|
177
|
-
R__namespace.pickBy(R__namespace.pathEq(['position', 'floorId']
|
|
171
|
+
R__namespace.pickBy(R__namespace.pathEq(floorId, ['position', 'floorId']))));
|
|
178
172
|
|
|
179
173
|
app.bus.on('poi/getByCategoryId', async ({ categoryId }) => {
|
|
180
174
|
// returns true for exact category matches or parent category matches
|
|
@@ -207,7 +201,7 @@ async function create (app, config) {
|
|
|
207
201
|
const queueSubtypes = queueTypes[queueType];
|
|
208
202
|
const primaryCheckpointId = R__namespace.path(checkpointPath, currentPoi);
|
|
209
203
|
return securityPois
|
|
210
|
-
.filter(R__namespace.pathEq(
|
|
204
|
+
.filter(R__namespace.pathEq(primaryCheckpointId, checkpointPath)) // filter only connected security checkpoints
|
|
211
205
|
.filter(poi => poi.poiId !== currentPoi.poiId) // skip current poi
|
|
212
206
|
.map(poi => {
|
|
213
207
|
const laneId = R__namespace.path(['queue', 'queueSubtype'], poi);
|
|
@@ -225,7 +219,7 @@ async function create (app, config) {
|
|
|
225
219
|
};
|
|
226
220
|
|
|
227
221
|
const getLaneData = laneId => R__namespace.pipe(
|
|
228
|
-
R__namespace.find(R__namespace.propEq('id'
|
|
222
|
+
R__namespace.find(R__namespace.propEq(laneId, 'id')),
|
|
229
223
|
ensureDefined(`No queue found with ID: ${laneId}`),
|
|
230
224
|
R__namespace.pick(['displayText', 'imageId'])
|
|
231
225
|
);
|
|
@@ -241,7 +235,7 @@ async function create (app, config) {
|
|
|
241
235
|
if (!R__namespace.length(poi.images)) {
|
|
242
236
|
poi.images = [];
|
|
243
237
|
} else if (!poi.images[0].startsWith('https:')) { // then images are not yet transformed
|
|
244
|
-
poi.images = await
|
|
238
|
+
poi.images = await Zousan.all(
|
|
245
239
|
poi.images.map(imageName =>
|
|
246
240
|
app.bus.get('venueData/getPoiImageUrl', { imageName, size: `${Math.round(351 * dpr)}x${Math.round(197 * dpr)}` })));
|
|
247
241
|
}
|
|
@@ -253,7 +247,7 @@ async function create (app, config) {
|
|
|
253
247
|
app.bus.on('poi/getAllCategories', async () => poisLoaded.then(getUniqueCategories));
|
|
254
248
|
|
|
255
249
|
app.bus.on('venueData/loadNewVenue', () => {
|
|
256
|
-
poisLoaded = new
|
|
250
|
+
poisLoaded = new Zousan();
|
|
257
251
|
init();
|
|
258
252
|
});
|
|
259
253
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var location = require('../../../src/utils/location.js');
|
|
7
5
|
|
|
8
|
-
function
|
|
9
|
-
if (e && e.__esModule) return e;
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
10
7
|
var n = Object.create(null);
|
|
11
8
|
if (e) {
|
|
12
9
|
Object.keys(e).forEach(function (k) {
|
|
@@ -19,11 +16,11 @@ function _interopNamespace(e) {
|
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
}
|
|
22
|
-
n
|
|
19
|
+
n.default = e;
|
|
23
20
|
return Object.freeze(n);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
|
-
var R__namespace = /*#__PURE__*/
|
|
23
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
27
24
|
|
|
28
25
|
const headlessCommands = [
|
|
29
26
|
{ command: 'destroy' },
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var geom = require('../../../src/utils/geom.js');
|
|
6
4
|
var observable = require('../../../src/utils/observable.js');
|
|
7
5
|
var sdkHeadless = require('./sdkHeadless.js');
|
|
8
6
|
|
|
9
|
-
function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null,
|
|
7
|
+
function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null, default: e }); }
|
|
10
8
|
|
|
11
9
|
let removePreviousListener = null;
|
|
12
10
|
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
var R = require('ramda');
|
|
4
4
|
var utils = require('./utils.js');
|
|
5
5
|
|
|
6
|
-
function
|
|
7
|
-
if (e && e.__esModule) return e;
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
8
7
|
var n = Object.create(null);
|
|
9
8
|
if (e) {
|
|
10
9
|
Object.keys(e).forEach(function (k) {
|
|
@@ -17,11 +16,11 @@ function _interopNamespace(e) {
|
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
|
-
n
|
|
19
|
+
n.default = e;
|
|
21
20
|
return Object.freeze(n);
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
var R__namespace = /*#__PURE__*/
|
|
23
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
25
24
|
|
|
26
25
|
const DEFAULT_RESULTS_LIMIT = 5000;
|
|
27
26
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var Zousan = require('zousan');
|
|
7
5
|
var configUtils = require('../../../src/utils/configUtils.js');
|
|
@@ -9,10 +7,7 @@ var rand = require('../../../src/utils/rand.js');
|
|
|
9
7
|
var poiSearch = require('./poiSearch.js');
|
|
10
8
|
var searchTypeahead = require('./searchTypeahead.js');
|
|
11
9
|
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
16
11
|
var n = Object.create(null);
|
|
17
12
|
if (e) {
|
|
18
13
|
Object.keys(e).forEach(function (k) {
|
|
@@ -25,18 +20,17 @@ function _interopNamespace(e) {
|
|
|
25
20
|
}
|
|
26
21
|
});
|
|
27
22
|
}
|
|
28
|
-
n
|
|
23
|
+
n.default = e;
|
|
29
24
|
return Object.freeze(n);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
var R__namespace = /*#__PURE__*/
|
|
33
|
-
var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
|
|
27
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
34
28
|
|
|
35
29
|
function create (app, config) {
|
|
36
30
|
const state = {
|
|
37
31
|
poiSearch: null,
|
|
38
32
|
typeahead: null,
|
|
39
|
-
indexesCreated: new
|
|
33
|
+
indexesCreated: new Zousan(), // re-initialize this when changing venues
|
|
40
34
|
defaultSearchTerms: null,
|
|
41
35
|
specialQueryTerms: {}
|
|
42
36
|
};
|
|
@@ -225,7 +219,7 @@ function create (app, config) {
|
|
|
225
219
|
* Resets plugin state.
|
|
226
220
|
*/
|
|
227
221
|
app.bus.on('venueData/loadNewVenue', () => {
|
|
228
|
-
state.indexesCreated = new
|
|
222
|
+
state.indexesCreated = new Zousan();
|
|
229
223
|
init();
|
|
230
224
|
});
|
|
231
225
|
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var FlexSearch = require('flexsearch');
|
|
6
4
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var FlexSearch__default = /*#__PURE__*/_interopDefaultLegacy(FlexSearch);
|
|
10
|
-
|
|
11
5
|
const NON_ASCII_LANGUAGES = ['ko', 'ja', 'zh-Hans', 'zh-Hant'];
|
|
12
6
|
|
|
13
7
|
const getFlexSearchInstance = ({ lang, type = 'standard' }) => {
|
|
@@ -26,7 +20,7 @@ const getFlexSearchInstance = ({ lang, type = 'standard' }) => {
|
|
|
26
20
|
if (NON_ASCII_LANGUAGES.includes(lang))
|
|
27
21
|
options.tokenize = 'full';
|
|
28
22
|
|
|
29
|
-
return new
|
|
23
|
+
return new FlexSearch.Index(options)
|
|
30
24
|
};
|
|
31
25
|
|
|
32
26
|
exports.getFlexSearchInstance = getFlexSearchInstance;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var Zousan = require('zousan');
|
|
7
5
|
var venueLoadingUtils = require('./venueLoadingUtils.js');
|
|
8
6
|
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
13
8
|
var n = Object.create(null);
|
|
14
9
|
if (e) {
|
|
15
10
|
Object.keys(e).forEach(function (k) {
|
|
@@ -22,19 +17,18 @@ function _interopNamespace(e) {
|
|
|
22
17
|
}
|
|
23
18
|
});
|
|
24
19
|
}
|
|
25
|
-
n
|
|
20
|
+
n.default = e;
|
|
26
21
|
return Object.freeze(n);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
|
-
var R__namespace = /*#__PURE__*/
|
|
30
|
-
var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
|
|
24
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
31
25
|
|
|
32
26
|
const USE_AUTH_WHEN_NOT_PROD_STAGE = false; // turning this off for now (per Jessica request)
|
|
33
27
|
|
|
34
28
|
async function create (app, config) {
|
|
35
29
|
const log = app.log.sublog('venueDataLoader');
|
|
36
|
-
let venueDataLoaded = new
|
|
37
|
-
let mapDataLoaded = new
|
|
30
|
+
let venueDataLoaded = new Zousan();
|
|
31
|
+
let mapDataLoaded = new Zousan();
|
|
38
32
|
|
|
39
33
|
const getDefaultStructureId = venueData =>
|
|
40
34
|
venueData.defaultStructureId ||
|
|
@@ -99,7 +93,7 @@ async function create (app, config) {
|
|
|
99
93
|
|
|
100
94
|
function getDefaultOrdinal (venueData) {
|
|
101
95
|
const defaultStructureId = getDefaultStructureId(venueData);
|
|
102
|
-
const defaultStructure = Object.values(venueData.structures).find(R__namespace.propEq('id'
|
|
96
|
+
const defaultStructure = Object.values(venueData.structures).find(R__namespace.propEq(defaultStructureId, 'id'));
|
|
103
97
|
return defaultStructure.levels[defaultStructure.defaultLevelId].ordinal
|
|
104
98
|
}
|
|
105
99
|
|
|
@@ -203,7 +197,7 @@ async function create (app, config) {
|
|
|
203
197
|
R__namespace.map(venueData.fetchJson),
|
|
204
198
|
R__namespace.map(R__namespace.andThen(featureJSON =>
|
|
205
199
|
[featureJSON.id, enrichFeaturesForLevel(featureJSON.id, featureJSON.features, venueData.id, venueData.structures)])),
|
|
206
|
-
promises =>
|
|
200
|
+
promises => Zousan.all(promises),
|
|
207
201
|
R__namespace.andThen(R__namespace.fromPairs)
|
|
208
202
|
)(venueData)
|
|
209
203
|
}
|
|
@@ -354,8 +348,8 @@ async function create (app, config) {
|
|
|
354
348
|
app.bus.on('venueData/loadNewVenue', async ({ venueId, accountId, assetStage = config.assetStage }) => {
|
|
355
349
|
venueDataLoaded.reject(new Error('loadNewVenue called - previous loading ignored'));
|
|
356
350
|
mapDataLoaded.reject(new Error('loadNewVenue called - previous loading ignored'));
|
|
357
|
-
venueDataLoaded = new
|
|
358
|
-
mapDataLoaded = new
|
|
351
|
+
venueDataLoaded = new Zousan();
|
|
352
|
+
mapDataLoaded = new Zousan();
|
|
359
353
|
loadVenueData({ ...config, venueId, accountId, assetStage }, [])
|
|
360
354
|
.then(notifyState);
|
|
361
355
|
});
|
|
@@ -438,11 +432,11 @@ async function create (app, config) {
|
|
|
438
432
|
|
|
439
433
|
const runTest = async ({ testRoutine, reset = false, venueData = null }) => {
|
|
440
434
|
if (reset || venueData) {
|
|
441
|
-
venueDataLoaded = new
|
|
442
|
-
mapDataLoaded = new
|
|
435
|
+
venueDataLoaded = new Zousan();
|
|
436
|
+
mapDataLoaded = new Zousan();
|
|
443
437
|
}
|
|
444
438
|
if (venueData)
|
|
445
|
-
venueDataLoaded =
|
|
439
|
+
venueDataLoaded = Zousan.resolve(venueData);
|
|
446
440
|
|
|
447
441
|
await testRoutine();
|
|
448
442
|
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var bounds = require('../../../src/utils/bounds.js');
|
|
7
5
|
var configUtils = require('../../../src/utils/configUtils.js');
|
|
8
6
|
|
|
9
|
-
function
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
11
8
|
var n = Object.create(null);
|
|
12
9
|
if (e) {
|
|
13
10
|
Object.keys(e).forEach(function (k) {
|
|
@@ -20,21 +17,14 @@ function _interopNamespace(e) {
|
|
|
20
17
|
}
|
|
21
18
|
});
|
|
22
19
|
}
|
|
23
|
-
n
|
|
20
|
+
n.default = e;
|
|
24
21
|
return Object.freeze(n);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
var R__namespace = /*#__PURE__*/
|
|
24
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
28
25
|
|
|
29
26
|
const fetchURL = async (token, url) => {
|
|
30
|
-
|
|
31
|
-
return fetch(url, {
|
|
32
|
-
headers: {
|
|
33
|
-
Authorization: token
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
} else
|
|
37
|
-
return fetch(url)
|
|
27
|
+
return fetch(url)
|
|
38
28
|
};
|
|
39
29
|
|
|
40
30
|
const createFetchJson = (token) => url => fetchURL(token, url).then(response => response.json());
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
var wayfinder = require('./wayfinder.js');
|
|
7
5
|
|
|
8
|
-
function
|
|
9
|
-
if (e && e.__esModule) return e;
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
10
7
|
var n = Object.create(null);
|
|
11
8
|
if (e) {
|
|
12
9
|
Object.keys(e).forEach(function (k) {
|
|
@@ -19,11 +16,11 @@ function _interopNamespace(e) {
|
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
}
|
|
22
|
-
n
|
|
19
|
+
n.default = e;
|
|
23
20
|
return Object.freeze(n);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
|
-
var R__namespace = /*#__PURE__*/
|
|
23
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
27
24
|
|
|
28
25
|
const getEdgeTo = dst => node => R__namespace.find(e => e.dst === dst, node.edges);
|
|
29
26
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var R = require('ramda');
|
|
6
4
|
|
|
7
|
-
function
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
9
6
|
var n = Object.create(null);
|
|
10
7
|
if (e) {
|
|
11
8
|
Object.keys(e).forEach(function (k) {
|
|
@@ -18,11 +15,11 @@ function _interopNamespace(e) {
|
|
|
18
15
|
}
|
|
19
16
|
});
|
|
20
17
|
}
|
|
21
|
-
n
|
|
18
|
+
n.default = e;
|
|
22
19
|
return Object.freeze(n);
|
|
23
20
|
}
|
|
24
21
|
|
|
25
|
-
var R__namespace = /*#__PURE__*/
|
|
22
|
+
var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
|
|
26
23
|
|
|
27
24
|
/**
|
|
28
25
|
* Visits all nodes (breadth-first) from the nodes2visit
|