@mappedin/viewer 0.56.3-e56adbe.0 → 0.57.0

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.
@@ -11,6 +11,10 @@ type SetValues<T> = Required<T>[SetKeys<T>] extends Set<infer U> ? U : never;
11
11
  * Add a value to a set property of an object, creating the set if it doesn't exist.
12
12
  */
13
13
  export declare const safeAdd: <T extends object>(object: T, key: SetKeys<T>, value: SetValues<T>) => void;
14
+ /**
15
+ * Push a value to an array in a Map, creating the array if it doesn't exist.
16
+ */
17
+ export declare const safeSet: <K, V>(map: Map<K, V[]>, key: K, value: V) => void;
14
18
  /**
15
19
  * Whether the object has an array property with a length greater than 0.
16
20
  */
@@ -8,24 +8,24 @@ type TRbushLookupProperties = {
8
8
  };
9
9
  type TProcessedPlaces = {
10
10
  places: Exclude<Place, Coordinate>[];
11
- placesById: Record<string, Exclude<Place, Coordinate>>;
12
- placesByExternalId: Record<string, Exclude<Place, Coordinate>[]>;
13
- placesByPlaceName: Record<string, Exclude<Place, Coordinate>[]>;
14
- placesByPlaceNameNormalized: Record<string, Exclude<Place, Coordinate>[]>;
15
- placesByFloorId: Record<string, Exclude<Place, Coordinate>[]>;
16
- areasByFloorId: Record<string, Area[]>;
11
+ placesById: Map<string, Exclude<Place, Coordinate>>;
12
+ placesByExternalId: Map<string, Exclude<Place, Coordinate>[]>;
13
+ placesByPlaceName: Map<string, Exclude<Place, Coordinate>[]>;
14
+ placesByPlaceNameNormalized: Map<string, Exclude<Place, Coordinate>[]>;
15
+ placesByFloorId: Map<string, Exclude<Place, Coordinate>[]>;
16
+ areasByFloorId: Map<string, Area[]>;
17
17
  placesWithMetadata: Exclude<Place, Coordinate>[];
18
- placeNamesByCategory: Record<string, string[]>;
18
+ placeNamesByCategory: Map<string, string[]>;
19
19
  geometries: Geometry[];
20
- geometriesById: Record<string, Geometry>;
20
+ geometriesById: Map<string, Geometry>;
21
21
  sortedPlaceNames: string[];
22
- floorsByNameNormalized: Record<string, Floor>;
23
- floorStacksByNameNormalized: Record<string, FloorStack>;
24
- categoriesByNameNormalized: Record<string, LocationCategory>;
25
- geometryRbushByFloorId: Record<string, RBush<Polygon, TRbushLookupProperties>>;
26
- pointRbushByFloorId: Record<string, RBush<Point, TRbushLookupProperties>>;
27
- facadesBySpaceId: Record<string, Facade>;
28
- areaDepthsById: Record<string, number>;
22
+ floorsByNameNormalized: Map<string, Floor>;
23
+ floorStacksByNameNormalized: Map<string, FloorStack>;
24
+ categoriesByNameNormalized: Map<string, LocationCategory>;
25
+ geometryRbushByFloorId: Map<string, RBush<Polygon, TRbushLookupProperties>>;
26
+ pointRbushByFloorId: Map<string, RBush<Point, TRbushLookupProperties>>;
27
+ facadesBySpaceId: Map<string, Facade>;
28
+ areaDepthsById: Map<string, number>;
29
29
  };
30
30
  /**
31
31
  * Generate a bunch of useful immutable collections from the map data.
@@ -60,24 +60,24 @@ declare class RootStore {
60
60
  * SDK data dictionaries.
61
61
  */
62
62
  readonly places: Exclude<Place, Coordinate>[];
63
- readonly placesById: Record<string, Exclude<Place, Coordinate>>;
64
- readonly placesByExternalId: Record<string, Exclude<Place, Coordinate>[]>;
65
- readonly placesByPlaceName: Record<string, Exclude<Place, Coordinate>[]>;
66
- readonly placesByPlaceNameNormalized: Record<string, Exclude<Place, Coordinate>[]>;
67
- readonly placesByFloorId: Record<string, Exclude<Place, Coordinate>[]>;
63
+ readonly placesById: Map<string, Exclude<Place, Coordinate>>;
64
+ readonly placesByExternalId: Map<string, Exclude<Place, Coordinate>[]>;
65
+ readonly placesByPlaceName: Map<string, Exclude<Place, Coordinate>[]>;
66
+ readonly placesByPlaceNameNormalized: Map<string, Exclude<Place, Coordinate>[]>;
67
+ readonly placesByFloorId: Map<string, Exclude<Place, Coordinate>[]>;
68
68
  readonly areasByFloorId: ReturnType<typeof processPlaces>['areasByFloorId'];
69
- readonly placeNamesByCategory: Record<string, string[]>;
69
+ readonly placeNamesByCategory: Map<string, string[]>;
70
70
  readonly placesWithMetadata: Exclude<Place, Coordinate>[];
71
71
  readonly geometries: Geometry[];
72
- readonly geometriesById: Record<string, Geometry>;
72
+ readonly geometriesById: Map<string, Geometry>;
73
73
  readonly sortedPlaceNames: string[];
74
- readonly floorsByNameNormalized: Record<string, Floor>;
75
- readonly floorStacksByNameNormalized: Record<string, FloorStack>;
76
- readonly categoriesByNameNormalized: Record<string, LocationCategory>;
74
+ readonly floorsByNameNormalized: Map<string, Floor>;
75
+ readonly floorStacksByNameNormalized: Map<string, FloorStack>;
76
+ readonly categoriesByNameNormalized: Map<string, LocationCategory>;
77
77
  readonly geometryRbushByFloorId: ReturnType<typeof processPlaces>['geometryRbushByFloorId'];
78
78
  readonly pointRbushByFloorId: ReturnType<typeof processPlaces>['pointRbushByFloorId'];
79
- readonly facadesBySpaceId: Record<string, Facade>;
80
- readonly areaDepthsById: Record<string, number>;
79
+ readonly facadesBySpaceId: Map<string, Facade>;
80
+ readonly areaDepthsById: Map<string, number>;
81
81
  constructor({ router, featureFlagStore, data, startupOptions, mvf, mapId, configId, configName, isMobile, isMini, theme, }: {
82
82
  router: RouterStore;
83
83
  featureFlagStore: FeatureFlagStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.56.3-e56adbe.0",
3
+ "version": "0.57.0",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",