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.
- package/dist/cjs/nodesdk/nodeEntry.js +36 -58
- package/dist/cjs/package.json.js +8 -4
- package/dist/cjs/plugins/clientAPI/src/clientAPI.js +8 -6
- package/dist/cjs/plugins/dynamicPois/src/dynamicPois.js +50 -142
- package/dist/cjs/plugins/dynamicPois/src/processors.js +31 -53
- package/dist/cjs/plugins/flightStatus/src/flightDetailsMapper.js +47 -116
- package/dist/cjs/plugins/flightStatus/src/flightStatus.js +48 -82
- package/dist/cjs/plugins/flightStatus/src/utils.js +4 -14
- package/dist/cjs/plugins/poiDataManager/src/poiDataManager.js +77 -154
- package/dist/cjs/plugins/sdkServer/src/prepareSDKConfig.js +45 -76
- package/dist/cjs/plugins/sdkServer/src/sdkHeadless.js +70 -79
- package/dist/cjs/plugins/sdkServer/src/sdkServer.js +97 -147
- package/dist/cjs/plugins/searchService/src/flexsearchExports/lang.js +16 -190
- package/dist/cjs/plugins/searchService/src/flexsearchExports/simple.js +28 -35
- package/dist/cjs/plugins/searchService/src/poiSearch.js +10 -21
- package/dist/cjs/plugins/searchService/src/searchService.js +45 -147
- package/dist/cjs/plugins/searchService/src/searchTypeahead.js +17 -28
- package/dist/cjs/plugins/searchService/src/utils.js +9 -13
- package/dist/cjs/plugins/venueDataLoader/src/venueDataLoader.js +148 -304
- package/dist/cjs/plugins/venueDataLoader/src/venueLoadingUtils.js +47 -126
- package/dist/cjs/plugins/wayfinder/src/findRoute.js +6 -73
- package/dist/cjs/plugins/wayfinder/src/minPriorityQueue.js +7 -27
- package/dist/cjs/plugins/wayfinder/src/navGraph.js +78 -259
- package/dist/cjs/plugins/wayfinder/src/navGraphDebug.js +26 -57
- package/dist/cjs/plugins/wayfinder/src/segmentBadges.js +25 -25
- package/dist/cjs/plugins/wayfinder/src/segmentBuilder.js +50 -133
- package/dist/cjs/plugins/wayfinder/src/segmentCategories.js +29 -29
- package/dist/cjs/plugins/wayfinder/src/stepBuilder.js +53 -145
- package/dist/cjs/plugins/wayfinder/src/wayfinder.js +105 -349
- package/dist/cjs/src/app.js +53 -91
- package/dist/cjs/src/configs/postproc-mol-url-parms.js +34 -43
- package/dist/cjs/src/configs/postproc-stateTracking.js +1 -19
- package/dist/cjs/src/controller.js +4 -26
- package/dist/cjs/src/debugTools.js +55 -94
- package/dist/cjs/src/env.js +8 -19
- package/dist/cjs/src/extModules/bustle.js +15 -71
- package/dist/cjs/src/extModules/flexapi/src/help.js +7 -22
- package/dist/cjs/src/extModules/flexapi/src/index.js +15 -29
- package/dist/cjs/src/extModules/flexapi/src/validate.js +45 -93
- package/dist/cjs/src/extModules/geohasher.js +13 -31
- package/dist/cjs/src/extModules/log.js +18 -29
- package/dist/cjs/src/historyManager.js +4 -6
- package/dist/cjs/src/utils/bounds.js +2 -4
- package/dist/cjs/src/utils/buildStructureLookup.js +7 -7
- package/dist/cjs/src/utils/configUtils.js +7 -43
- package/dist/cjs/src/utils/date.js +5 -17
- package/dist/cjs/src/utils/distance.js +2 -2
- package/dist/cjs/src/utils/dom.js +9 -24
- package/dist/cjs/src/utils/funcs.js +15 -30
- package/dist/cjs/src/utils/geodesy.js +24 -39
- package/dist/cjs/src/utils/geom.js +32 -148
- package/dist/cjs/src/utils/i18n.js +39 -70
- package/dist/cjs/src/utils/isInitialState.js +7 -13
- package/dist/cjs/src/utils/location.js +10 -29
- package/dist/cjs/src/utils/observable.js +4 -29
- package/dist/cjs/src/utils/rand.js +9 -80
- package/dist/cjs/utils/constants.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/plugins/sdkServer/src/prepareSDKConfig.js +1 -1
- package/dist/src/utils/buildStructureLookup.js +1 -1
- package/dist/src/utils/date.js +1 -1
- package/package.json +1 -1
|
@@ -2,40 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
var geom = require('./geom.js');
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Allows for flexibility in the manner in which you specify a location. This may call to getVenueData, so you should not
|
|
7
|
-
* call this function until you are in the init stage of your plugin, to ensure the venueDataLoader plugin has had a chance
|
|
8
|
-
* to register its getVenueData listener.
|
|
9
|
-
*
|
|
10
|
-
* @param {Object} app The app object
|
|
11
|
-
* @param {Object} location A location in the map, which can be a {poid} or {lat,lng,ord} or {lat,lng,ordinal} or {lat,lng,floorId}
|
|
12
|
-
* @returns an Endpoint { lat, lng, ordinal, floorId, title }
|
|
13
|
-
*/
|
|
14
5
|
async function locationToEndpoint(app, location) {
|
|
15
6
|
if (location.poiId) {
|
|
16
|
-
return app.bus.get(
|
|
17
|
-
ep: location.poiId
|
|
7
|
+
return app.bus.get("wayfinder/getNavigationEndpoint", {
|
|
8
|
+
ep: location.poiId
|
|
18
9
|
});
|
|
19
10
|
}
|
|
20
|
-
|
|
21
|
-
const { lat, lng, ord, title = '' } = location;
|
|
11
|
+
const { lat, lng, ord, title = "" } = location;
|
|
22
12
|
let { ordinal, floorId, structureId } = location;
|
|
23
|
-
|
|
24
13
|
if (lat == null || lng == null) {
|
|
25
|
-
throw Error(
|
|
14
|
+
throw Error("To obtain a location, you must provide a lat,lng or a poiId");
|
|
26
15
|
}
|
|
27
|
-
|
|
28
|
-
if (ordinal === undefined && ord !== undefined) {
|
|
16
|
+
if (ordinal === void 0 && ord !== void 0) {
|
|
29
17
|
ordinal = ord;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Now lets normalize the return structure - determine ordinal, floorId and structureId
|
|
18
|
+
}
|
|
33
19
|
const structures = await getStructures(app);
|
|
34
|
-
|
|
35
20
|
if (ordinal == null) {
|
|
36
|
-
if (floorId == null)
|
|
37
|
-
|
|
38
|
-
throw Error('Call to locationToEndpoint with no ordinal and no floorId');
|
|
21
|
+
if (floorId == null) {
|
|
22
|
+
throw Error("Call to locationToEndpoint with no ordinal and no floorId");
|
|
39
23
|
} else {
|
|
40
24
|
const floor = geom.getFloor(structures, floorId);
|
|
41
25
|
if (!floor) {
|
|
@@ -45,21 +29,18 @@ async function locationToEndpoint(app, location) {
|
|
|
45
29
|
}
|
|
46
30
|
} else {
|
|
47
31
|
if (floorId == null) {
|
|
48
|
-
const mapviewBBox = await app.bus.get(
|
|
32
|
+
const mapviewBBox = await app.bus.get("map/getViewBBox");
|
|
49
33
|
const { structure, floor } = geom.getStructureAndFloorAtPoint(structures, lat, lng, ordinal, mapviewBBox, true);
|
|
50
34
|
floorId = floor?.id;
|
|
51
35
|
structureId = structure?.id;
|
|
52
36
|
}
|
|
53
37
|
}
|
|
54
|
-
|
|
55
38
|
if (floorId != null && structureId == null) {
|
|
56
39
|
structureId = geom.getStructureForFloorId(structures, floorId)?.id;
|
|
57
40
|
}
|
|
58
|
-
|
|
59
41
|
return { lat, lng, floorId, ordinal, title, structureId };
|
|
60
42
|
}
|
|
61
|
-
|
|
62
|
-
const getStructures = async app => app.bus.get('venueData/getVenueData').then(vd => vd.structures);
|
|
43
|
+
const getStructures = async (app) => app.bus.get("venueData/getVenueData").then((vd) => vd.structures);
|
|
63
44
|
|
|
64
45
|
exports.getStructures = getStructures;
|
|
65
46
|
exports.locationToEndpoint = locationToEndpoint;
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
function fire(...args) {
|
|
4
4
|
const ob = this._observers;
|
|
5
|
-
|
|
6
5
|
if (!ob) {
|
|
7
|
-
return
|
|
6
|
+
return void 0;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
for (let x = 0; x < ob.length; x++) {
|
|
11
9
|
try {
|
|
12
10
|
ob[x].apply(this, args);
|
|
@@ -14,72 +12,49 @@ function fire(...args) {
|
|
|
14
12
|
console.error(err);
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
return this;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
function observe(cb) {
|
|
22
18
|
if (!this._observers) {
|
|
23
19
|
this._observers = [];
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
this._observers.push(cb);
|
|
27
|
-
|
|
28
22
|
return {
|
|
29
23
|
detach: detach.bind(this, cb),
|
|
30
|
-
ob: this
|
|
24
|
+
ob: this
|
|
31
25
|
};
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
function detach(cb) {
|
|
35
28
|
this._observers.splice(this._observers.indexOf(cb), 1);
|
|
36
29
|
}
|
|
37
|
-
|
|
38
|
-
// Returns a new derivitive observer that fires events when the observed object fires iff
|
|
39
|
-
// the event passes the predicate function specified here.
|
|
40
30
|
function filter(fn) {
|
|
41
31
|
const o2 = create();
|
|
42
|
-
|
|
43
|
-
this.observe(function (...args) {
|
|
32
|
+
this.observe(function(...args) {
|
|
44
33
|
if (fn.apply(this, args)) {
|
|
45
34
|
o2.fire(...args);
|
|
46
35
|
}
|
|
47
36
|
});
|
|
48
|
-
|
|
49
37
|
return o2;
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
// When first argument denotes an event name, this is a convenience
|
|
53
|
-
// method to filter by that name
|
|
54
39
|
function filterByName(eventName) {
|
|
55
|
-
return filter.call(this, function
|
|
40
|
+
return filter.call(this, function(name) {
|
|
56
41
|
return eventName === name;
|
|
57
42
|
});
|
|
58
43
|
}
|
|
59
|
-
|
|
60
|
-
// Filters on equivilence of first argument (often the event name) and observes
|
|
61
|
-
// the result - calling the callback function when triggered
|
|
62
44
|
function on(value, cb) {
|
|
63
45
|
return filterByName.call(this, value).observe(cb);
|
|
64
46
|
}
|
|
65
|
-
|
|
66
47
|
const observable = { detach, filter, fire, observe, on };
|
|
67
|
-
|
|
68
|
-
// extend `to` argument with properties from `from`
|
|
69
|
-
// [short version]
|
|
70
48
|
function extend(to, from) {
|
|
71
49
|
for (const prop in from) {
|
|
72
50
|
to[prop] = from[prop];
|
|
73
51
|
}
|
|
74
|
-
|
|
75
52
|
return to;
|
|
76
53
|
}
|
|
77
|
-
|
|
78
54
|
function create(ob) {
|
|
79
55
|
if (ob) {
|
|
80
56
|
return extend(ob, observable);
|
|
81
57
|
}
|
|
82
|
-
|
|
83
58
|
return Object.create(observable);
|
|
84
59
|
}
|
|
85
60
|
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// Simple seedable random number generator - NOT cryptographicaly secure!
|
|
4
3
|
function mulberry32(seed) {
|
|
5
|
-
return function
|
|
6
|
-
let t =
|
|
7
|
-
t = Math.imul(t ^
|
|
8
|
-
t ^= t + Math.imul(t ^
|
|
9
|
-
return ((t ^
|
|
4
|
+
return function() {
|
|
5
|
+
let t = seed += 1831565813;
|
|
6
|
+
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
7
|
+
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
8
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
// ONLY use this for making tests deterministic - otherwise its a bad practice
|
|
14
|
-
const random = undefined?.MODE === 'test' ? mulberry32(12345678) : Math.random;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Returns a random integer between the min and max values. Can also
|
|
18
|
-
* be called with a single value which becomes the max and min is set to 0.
|
|
19
|
-
* @param {integer} min minimum integer value to return (inclusive)
|
|
20
|
-
* @param {integer} max maximum integer value to return (exclusive)
|
|
21
|
-
* @returns random integer between min and max.
|
|
22
|
-
*/
|
|
11
|
+
const random = undefined?.MODE === "test" ? mulberry32(12345678) : Math.random;
|
|
23
12
|
const rand = (min, max) => {
|
|
24
13
|
if (max == null) {
|
|
25
14
|
max = min;
|
|
@@ -27,23 +16,6 @@ const rand = (min, max) => {
|
|
|
27
16
|
}
|
|
28
17
|
return Math.floor(random() * (max - min) + min);
|
|
29
18
|
};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Returns a random list of length `size` with unique integers from 0 to `max` - 1.
|
|
33
|
-
*
|
|
34
|
-
* No number will repeat. If `size > max`, it is clamped to `max`.
|
|
35
|
-
* If `max` is not provided, it defaults to `size`, resulting in a random shuffle of [0..size-1].
|
|
36
|
-
*
|
|
37
|
-
* This is useful for randomly selecting a subset of indices or shuffling a range.
|
|
38
|
-
*
|
|
39
|
-
* For example:
|
|
40
|
-
* randomSet(3, 5) → [3, 2, 0]
|
|
41
|
-
* randomSet(5) → [1, 4, 0, 3, 2] // full shuffle of 0..4
|
|
42
|
-
*
|
|
43
|
-
* @param {number} size - Number of unique values to return
|
|
44
|
-
* @param {number} [max] - Range upper bound (exclusive); defaults to `size`
|
|
45
|
-
* @returns {number[]} An array of unique random integers from 0 to max-1
|
|
46
|
-
*/
|
|
47
19
|
function randomSet(size, max) {
|
|
48
20
|
if (!max) {
|
|
49
21
|
max = size;
|
|
@@ -51,18 +23,11 @@ function randomSet(size, max) {
|
|
|
51
23
|
if (size > max) {
|
|
52
24
|
size = max;
|
|
53
25
|
}
|
|
54
|
-
|
|
55
26
|
const result = [];
|
|
56
|
-
|
|
57
|
-
// Threshold for choosing sparse vs dense algorithm
|
|
58
|
-
// If we're selecting less than 30% of the range, collisions are rare
|
|
59
27
|
const SPARSITY_THRESHOLD = 0.3;
|
|
60
28
|
const isSparse = size / max < SPARSITY_THRESHOLD;
|
|
61
|
-
|
|
62
29
|
if (isSparse) {
|
|
63
|
-
|
|
64
|
-
// Fast when the number of needed values is small relative to the range
|
|
65
|
-
const seen = new Set();
|
|
30
|
+
const seen = /* @__PURE__ */ new Set();
|
|
66
31
|
while (result.length < size) {
|
|
67
32
|
const i = rand(max);
|
|
68
33
|
if (!seen.has(i)) {
|
|
@@ -71,53 +36,17 @@ function randomSet(size, max) {
|
|
|
71
36
|
}
|
|
72
37
|
}
|
|
73
38
|
} else {
|
|
74
|
-
// Dense strategy: partial in-place Fisher-Yates shuffle
|
|
75
|
-
// More efficient when selecting a large portion of the range
|
|
76
39
|
const source = Array.from({ length: max }, (_, i) => i);
|
|
77
|
-
|
|
78
40
|
for (let i = 0; i < size; i++) {
|
|
79
|
-
// Select a random index in the shrinking source array
|
|
80
41
|
const index = rand(max - i);
|
|
81
|
-
|
|
82
|
-
// Add the selected value to the result
|
|
83
42
|
result.push(source[index]);
|
|
84
|
-
|
|
85
|
-
// Move the last unchosen item into the chosen spot to "remove" it
|
|
86
43
|
source[index] = source[max - i - 1];
|
|
87
44
|
}
|
|
88
45
|
}
|
|
89
|
-
|
|
90
46
|
return result;
|
|
91
47
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* Given a source array and an array of indices, return a new array
|
|
95
|
-
* containing the source elements at the specified indices.
|
|
96
|
-
*
|
|
97
|
-
* @param {Array} array - The source array
|
|
98
|
-
* @param {number[]} map - Array of indices to pull from the source
|
|
99
|
-
* @returns {Array} - Mapped array
|
|
100
|
-
*/
|
|
101
|
-
const getMappedArray = (array, map) => map.map(i => array[i]);
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Returns a new array containing the elements of the input array in random order.
|
|
105
|
-
* Original array is not modified.
|
|
106
|
-
*
|
|
107
|
-
* @param {Array} array - The array to shuffle
|
|
108
|
-
* @returns {Array} - A new randomized array
|
|
109
|
-
*/
|
|
110
|
-
const randomizeArray = array => getMappedArray(array, randomSet(array.length));
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Returns a random selection of `num` elements from the array, in random order.
|
|
114
|
-
* Original array is not modified. If `num` is not specified, returns a single random item.
|
|
115
|
-
* If `num > array.length`, it is clamped to the array length.
|
|
116
|
-
*
|
|
117
|
-
* @param {Array} array - The array to sample from
|
|
118
|
-
* @param {number} [num=1] - Number of items to pick
|
|
119
|
-
* @returns {Array} - Randomly selected items
|
|
120
|
-
*/
|
|
48
|
+
const getMappedArray = (array, map) => map.map((i) => array[i]);
|
|
49
|
+
const randomizeArray = (array) => getMappedArray(array, randomSet(array.length));
|
|
121
50
|
const arrayPick = (array, num = 1) => getMappedArray(array, randomSet(num, array.length));
|
|
122
51
|
|
|
123
52
|
exports.arrayPick = arrayPick;
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t="web-engine",e="3.3.
|
|
1
|
+
var t="web-engine",e="3.3.900",s="UNLICENSED",r="module",o="src/main.ts",i=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],a={"build-storybook":"storybook build",colors:"cat utils/colors1.txt && node utils/processColors.ts | pbcopy && cat utils/colors2.txt",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",storybook:"storybook dev -p 6006",test:"vitest run --project unit","test-watch":"vitest --watch","test:comp":"vitest run --project browser","test:comp:ci":"vitest run --project browser --reporter=dot","test:comp:ui":"VITE_COMP_UI=1 vitest --project browser --ui --browser.headless=false","test:all":"yarn lint && yarn format:check && yarn test && yarn playwright:ci","test:mod":"playwright test --config=playwright.mod.config.ts",typecheck:"tsc -p tsconfig.checkjs.json","typecheck:strict":"tsc -p tsconfig.strict.json"},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","@mapbox/mapbox-gl-draw":"^1.5.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.6","@styled-system/prop-types":"^5.1.5","@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","@zumer/snapdom":"^2.9.0","axe-core":"^4.10.3",browserslist:"^4.27.0","crypto-browserify":"^3.12.1",dompurify:"^3.3.3","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^26.0.0","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","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","styled-system":"^5.1.5","styled-tools":"^1.7.2","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.46.8","@axe-core/playwright":"^4.10.2","@azure/identity":"^4.13.0","@azure/playwright":"^1.0.0","@playwright/test":"~1.59.1","@rollup/plugin-typescript":"^12.3.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/dom":"^10.4.1","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.3.0","@testing-library/user-event":"^14.5.2","@types/luxon":"^3.7.2","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","@typescript-eslint/eslint-plugin":"^8.26.1","@typescript-eslint/parser":"^8.26.1","@vitest/browser":"4.1.6","@vitest/browser-playwright":"4.1.6","@vitest/ui":"4.1.6","css-loader":"^7.1.2",eslint:"^8.57.1","eslint-config-prettier":"^10.1.8","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-playwright":"^2.2.2","eslint-plugin-react":"^7.37.4","eslint-plugin-vitest":"^0.5.4","fetch-mock":"^12.6.0",glob:"^11.0.1",husky:"^9.1.7","lint-staged":"^16.4.0","node-fetch":"^2.7.0",nx:"19.8.14","nx-remotecache-azure":"^19.0.0","os-browserify":"^0.3.0",prettier:"^3.8.3","rollup-plugin-esbuild":"^6.2.1","start-server-and-test":"^2.0.11",storybook:"^8.6.15",typescript:"^5.8.2",vite:"^7.3.2",vitest:"^4.1.8","webpack-merge":"^6.0.1"},p="yarn@4.13.0",d={node:"24.x"},y={},u={name:t,version:e,private:!0,license:s,type:r,main:o,workspaces:i,scripts:a,"lint-staged":{"*.{js,ts,tsx}":["eslint --fix","prettier --check"],"*.{json,md,css,ts,tsx,jsx}":["prettier --check"],"src/i18n/**/*.json":["node utils/sort-json.ts","prettier --write"]},browserslist:l,dependencies:n,devDependencies:c,packageManager:p,engines:d,nx:y};export{l as browserslist,u as default,n as dependencies,c as devDependencies,d as engines,s as license,o as main,t as name,y as nx,p as packageManager,a as scripts,r as type,e as version,i as workspaces};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b64DecodeUnicode as e,filterOb as i}from"../../../src/utils/funcs.js";import{setDeepLinksForParms as n}from"../../../src/configs/postproc-mol-url-parms.js";import{setStateFromStateString as o}from"../../../src/configs/postproc-stateTracking.js";function t(t){const{name:a,debug:r,headless:l,theme:c,defaultSearchTerms:p,venueId:u,accountId:d,poiCategories:g,preserveStateInURL:h,supportURLDeepLinks:m,initState:f,deepLinkParms:S,uiHide:v,renderDiv:k,parentConfig:L,desktopViewMinWidth:P,forceDesktop:w,hostAppId:A,hostAppVersion:V,hostAppProperties:b,logFilter:y,searchPlaceholder:D,dataFetch:I,engineName:Z,dynamicPoisUrlBaseV1:j,plugins:F,analytics2ActiveFlag:C,enablePoiSelection:O,showSurround:R,minZoom:T,maxZoom:U,noLangOptions:x,pinnedLocation:M,pinnedLocationZoom:W,pinnedLocationFocusAtStart:z,pinnedLocationBearing:B,pinnedLocationPitch:H}=t,E=L?[L]:l?["sdkHeadless"]:["sdkVisual"],N=(e,i)=>e&&e.length>i?e.substring(0,i):e,X={name:a,engineName:Z,extends:E,debug:r,logFilter:y,theme:c,uiHide:v,renderDiv:k,configPostProc:[],plugins:{venueDataLoader:{dataFetch:I,venueId:u,accountId:d},sdkServer:{headless:l},analytics2:{hostAppId:(
|
|
1
|
+
import{b64DecodeUnicode as e,filterOb as i}from"../../../src/utils/funcs.js";import{setDeepLinksForParms as n}from"../../../src/configs/postproc-mol-url-parms.js";import{setStateFromStateString as o}from"../../../src/configs/postproc-stateTracking.js";function t(t){const{name:a,debug:r,headless:l,theme:c,defaultSearchTerms:p,venueId:u,accountId:d,poiCategories:g,preserveStateInURL:h,supportURLDeepLinks:m,initState:f,deepLinkParms:S,uiHide:v,renderDiv:k,parentConfig:L,desktopViewMinWidth:P,forceDesktop:w,hostAppId:A,hostAppVersion:V,hostAppProperties:b,logFilter:y,searchPlaceholder:D,dataFetch:I,engineName:Z,dynamicPoisUrlBaseV1:j,plugins:F,analytics2ActiveFlag:C,enablePoiSelection:O,showSurround:R,minZoom:T,maxZoom:U,noLangOptions:x,pinnedLocation:M,pinnedLocationZoom:W,pinnedLocationFocusAtStart:z,pinnedLocationBearing:B,pinnedLocationPitch:H}=t,E=L?[L]:l?["sdkHeadless"]:["sdkVisual"],N=(e,i)=>e&&e.length>i?e.substring(0,i):e,X={name:a,engineName:Z,extends:E,debug:r,logFilter:y,theme:c,uiHide:v,renderDiv:k,configPostProc:[],plugins:{venueDataLoader:{dataFetch:I,venueId:u,accountId:d},sdkServer:{headless:l},analytics2:{hostAppId:(q=A,q?N(q.toString(),128):void 0),hostAppVersion:(_=V,_?N(_.toString(),128):void 0),hostAppProperties:(e=>{if(!e||"object"!=typeof e)return;const i={},n=Object.keys(e);return n.length>10&&(n.length=10),n.forEach(n=>{let o=N(n.toString().replaceAll(/[^a-zA-Z0-9_]/g,""),128);o.match(/^[a-zA-Z]+/)||(o="X"+o);let t=e[n];null==t&&(t=""),t=N(t.toString(),128),i[o]=t}),i})(b)}},uuid:"undefined"!=typeof document&&document&&document.location?document.location.host:"unknown"};var _,q;void 0!==C&&(X.plugins.analytics2.active=C);const G=(e,i)=>void 0!==i?{[e]:i}:{};return l||(X.plugins["online/headerOnline"]={searchPlaceholder:D},X.plugins.mapRenderer={...G("enablePoiSelection",O),surroundConfig:R?{}:null,viewLimits:{...G("maxZoom",U),...G("minZoom",T)}},X.plugins.userMenu={noLangOptions:x},M&&(X.plugins["online/pinnedLocation"]={location:M,zoom:W,focusAtStart:z,bearing:B,pitch:H})),X.plugins.searchService=p?{defaultSearchTerms:p}:{},s(t,"defaultSearchTerms",X.plugins.searchService),E.includes("sdkVisual")&&(X.plugins["online/homeView"]=g?{poiCategories:g}:{},s(t,"poiCategories",X.plugins["online/homeView"])),F&&(F.draw&&(X.plugins.draw=F.draw),F.flightStatus&&(X.plugins.flightStatus=F.flightStatus,X.plugins["online/flightDetails"]={},X.plugins["online/flightDetailsSearch"]={})),h&&(X.configPostProc.push("stateTracking"),X.plugins.deepLinking={trackURL:!0}),m&&X.configPostProc.push("mol-url-parms"),f&&o(X,e(f),!0),S&&n(X,new URLSearchParams(S),!0),void 0!==P&&(X.desktopViewMinWidth=P),w&&(X.desktopViewMinWidth=0),j&&(X.plugins.dynamicPois={urlBaseV1:j}),i((e,i)=>void 0!==i,X)}function s(e,i,n){Object.keys(e).filter(e=>e.startsWith(i+"-")).forEach(i=>n[i]=e[i])}export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"ramda";const r=r=>{const
|
|
1
|
+
import*as o from"ramda";const r=r=>{const l=o.mergeAll(r.map(o.prop("levels"))),e=o=>l[o],d=o.pipe(e,o.prop("ordinal")),p=l=>o.find(o=>o.levels&&o.levels[l])(r);return{floorIdToOrdinal:d,floorIdToFloor:e,floorIdToStructureId:o=>p(o)?.id,floorIdToStructure:p}};export{r as buildStructuresLookup};
|
package/dist/src/utils/date.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DateTime as e}from"luxon";const o=(o,t="en")=>(o instanceof Date&&(o=e(o)),"is"===t&&(t="ca"),o.setLocale(t).toLocaleString(e.TIME_SIMPLE)),t=e=>Math.ceil(e/60/1e3);export{o as formatTime,t as msToMin};
|
|
1
|
+
import{DateTime as e}from"luxon";const o=(o,t="en")=>(o instanceof Date&&(o=e.fromJSDate(o)),"is"===t&&(t="ca"),o.setLocale(t).toLocaleString(e.TIME_SIMPLE)),t=e=>Math.ceil(e/60/1e3);export{o as formatTime,t as msToMin};
|
package/package.json
CHANGED