becomap 1.5.69 → 1.5.70

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/lib/index.d.ts CHANGED
@@ -628,6 +628,11 @@ export interface BCRouteController {
628
628
  * this.showStep(routeStep);
629
629
  */
630
630
  showStep(step: BCRouteStep): void;
631
+ /**
632
+ * Shows the route step by its orderIndex.
633
+ * @param orderIndex - The order index of the step to display.
634
+ */
635
+ showStepByOrderIndex(orderIndex: number): void;
631
636
  /**
632
637
  * Clears the current route from the map by removing the route layer or data from the map view.
633
638
  * It relies on the routeController to manage route layers or data.
@@ -649,6 +654,16 @@ export interface BCRouteOptions {
649
654
  * @returns An array of BCRouteSegment objects representing each segment of the route, or `null` if a route cannot be generated.
650
655
  */
651
656
  export declare function getRoute(start: BCRoutable, goal: BCRoutable, waypoints?: BCRoutable[], routeOptions?: BCRouteOptions): BCRouteSegment[] | null;
657
+ /**
658
+ * Retrieves the route using location IDs for start, goal, and waypoints.
659
+ *
660
+ * @param startId - The starting location's ID.
661
+ * @param goalId - The goal location's ID.
662
+ * @param waypointIds - Optional array of waypoint location IDs.
663
+ * @param routeOptions - Optional routing options.
664
+ * @returns An array of BCRouteSegment objects or null if not found.
665
+ */
666
+ export declare function getRouteById(startId: string, goalId: string, waypointIds?: string[], routeOptions?: BCRouteOptions): BCRouteSegment[] | null;
652
667
  /**
653
668
  * Defines the events supported by the BCMapView and their corresponding arguments.
654
669
  */
@@ -799,52 +814,6 @@ export interface BCHappenings {
799
814
  */
800
815
  customFields: Record<string, any>;
801
816
  }
802
- declare enum BCQuestionType {
803
- /** Represents a multiple-choice question with a single answer. */
804
- MCQ_SINGLE_ANSWER = "MCQ_SINGLE_ANSWER",
805
- /** Represents an open-ended text response. */
806
- TEXT = "TEXT",
807
- /** Represents a numerical response. */
808
- NUMBER = "NUMBER",
809
- /** Represents a boolean (true/false) response. */
810
- BOOLEAN = "BOOLEAN"
811
- }
812
- /**
813
- * Interface representing a single survey question.
814
- */
815
- export interface BCQuestion {
816
- /**
817
- * Unique identifier for the question.
818
- */
819
- id: string;
820
- /**
821
- * The text of the question.
822
- */
823
- question: string;
824
- /**
825
- * The type of the question, as defined in BCQuestionType.
826
- */
827
- type: BCQuestionType;
828
- /**
829
- * The list of possible options for multiple-choice questions.
830
- * Should be empty or undefined for non-MCQ question types.
831
- */
832
- options?: string[];
833
- }
834
- /**
835
- * Interface representing an answer to a survey question.
836
- */
837
- export interface BCAnswer {
838
- /**
839
- * Unique identifier for the question being answered.
840
- */
841
- questionId: string;
842
- /**
843
- * The answers provided by the user.
844
- * This can be a list to accommodate multiple responses for certain question types.
845
- */
846
- answers: string[];
847
- }
848
817
  /**
849
818
  * Constructs a new MapView instance.
850
819
  *
@@ -954,6 +923,7 @@ export interface BCMapView {
954
923
  * @param floor - The floor to be selected.
955
924
  */
956
925
  selectFloor(floor: BCMapFloor): void;
926
+ selectFloorWithId(floorId: string): void;
957
927
  /**
958
928
  * Retrieves the currently selected floor.
959
929
  * @returns The currently selected floor.
@@ -991,29 +961,13 @@ export interface BCMapView {
991
961
  * @param location - The location to select.
992
962
  */
993
963
  selectLocation(location: BCLocation): void;
964
+ selectLocationWithId(locationId: string): void;
994
965
  /**
995
966
  * Retrieves all available happenings of a specific type.
996
967
  * @param type - The type of happenings to retrieve.
997
968
  * @returns An array of happenings.
998
969
  */
999
970
  getHappenings(type: BCHappeningType): BCHappenings[];
1000
- /**
1001
- * Retrieves the session ID for the current map view.
1002
- * @returns A promise that resolves to the session ID.
1003
- */
1004
- getSessionId(): Promise<string>;
1005
- /**
1006
- * Retrieves event suggestions based on user answers.
1007
- * @param sessionId - The session ID.
1008
- * @param answers - The user's answers.
1009
- * @returns A promise that resolves to a list of event IDs.
1010
- */
1011
- getEventSuggestions(sessionId: string, answers: BCAnswer[]): Promise<string[]>;
1012
- /**
1013
- * Retrieves all available questions.
1014
- * @returns An array of questions.
1015
- */
1016
- getQuestions(): BCQuestion[];
1017
971
  /**
1018
972
  * Retrieves all available amenities.
1019
973
  * @returns An array of amenities.
package/package.json CHANGED
@@ -1,72 +1,71 @@
1
- {
2
- "name": "becomap",
3
- "version": "1.5.69",
4
- "description": "we lib to display becomap",
5
- "main": "lib/becomap.js",
6
- "module": "lib/becomap.js",
7
- "types": "lib/index.d.ts",
8
- "scripts": {
9
- "test": "jest --config jestconfig.json",
10
- "start": "npm run build && npm run serve && npm run watch",
11
- "serve": "node scripts/serve.js",
12
- "build": "cross-env APP_ENV=production node scripts/build.js",
13
- "build:umd": "cross-env APP_ENV=production webpack --config webpack.umd.config.js",
14
- "watch": "webpack --watch",
15
- "format": "prettier --write \"src/**/*.ts\"",
16
- "lint": "tslint -p tsconfig.json",
17
- "proto": "./scripts/generate-proto.sh",
18
- "readproto": "cd ./proto/sample && tsc readbin.ts && node ./readbin.js && cd .. && cd .."
19
- },
20
- "keywords": [],
21
- "author": "",
22
- "license": "ISC",
23
- "devDependencies": {
24
- "@babel/core": "^7.24.7",
25
- "@babel/preset-env": "^7.24.7",
26
- "@babel/preset-typescript": "^7.24.7",
27
- "@types/jest": "^29.5.12",
28
- "@types/node": "^20.14.5",
29
- "@types/rbush": "^4.0.0",
30
- "@types/three": "^0.172.0",
31
- "@types/webpack": "^5.28.5",
32
- "babel-loader": "^9.1.3",
33
- "cross-env": "^7.0.3",
34
- "css-loader": "^7.1.2",
35
- "dotenv": "^16.4.5",
36
- "dotenv-webpack": "^8.1.0",
37
- "dts-bundle-generator": "^9.5.1",
38
- "fs-extra": "^11.2.0",
39
- "install": "^0.13.0",
40
- "javascript-obfuscator": "^4.1.1",
41
- "jest": "^29.7.0",
42
- "npm": "^10.8.1",
43
- "prettier": "^3.3.2",
44
- "rimraf": "^6.0.1",
45
- "style-loader": "^4.0.0",
46
- "terser-webpack-plugin": "^5.3.10",
47
- "ts-jest": "^29.1.5",
48
- "ts-loader": "^9.5.1",
49
- "ts-proto": "^2.2.3",
50
- "tslint": "^6.1.3",
51
- "tslint-config-prettier": "^1.18.0",
52
- "typescript": "^5.5.3",
53
- "webpack": "^5.92.1",
54
- "webpack-cli": "^5.1.4",
55
- "webpack-dev-server": "^5.0.4",
56
- "webpack-obfuscator": "^3.5.1"
57
- },
58
- "dependencies": {
59
- "@turf/turf": "^7.1.0",
60
- "@types/polylabel": "^1.1.3",
61
- "axios": "^1.7.5",
62
- "html-webpack-plugin": "^5.6.3",
63
- "maplibre-gl": "^4.4.1",
64
- "polished": "^4.3.1",
65
- "polylabel": "^2.0.1",
66
- "protobufjs": "^7.4.0",
67
- "rbush": "^4.0.1",
68
- "three": "^0.172.0",
69
- "troika-three-text": "^0.52.3",
70
- "word-wrap": "^1.2.5"
71
- }
72
- }
1
+ {
2
+ "name": "becomap",
3
+ "version": "1.5.70",
4
+ "description": "we lib to display becomap",
5
+ "main": "lib/becomap.js",
6
+ "module": "lib/becomap.js",
7
+ "types": "lib/index.d.ts",
8
+ "scripts": {
9
+ "test": "jest --config jestconfig.json",
10
+ "start": "npm run build && npm run serve && npm run watch",
11
+ "serve": "node scripts/serve.js",
12
+ "build": "cross-env APP_ENV=production node scripts/build.js",
13
+ "watch": "webpack --watch",
14
+ "format": "prettier --write \"src/**/*.ts\"",
15
+ "lint": "tslint -p tsconfig.json",
16
+ "proto": "./scripts/generate-proto.sh",
17
+ "readproto": "cd ./proto/sample && tsc readbin.ts && node ./readbin.js && cd .. && cd .."
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "devDependencies": {
23
+ "@babel/core": "^7.24.7",
24
+ "@babel/preset-env": "^7.24.7",
25
+ "@babel/preset-typescript": "^7.24.7",
26
+ "@types/jest": "^29.5.12",
27
+ "@types/node": "^20.14.5",
28
+ "@types/rbush": "^4.0.0",
29
+ "@types/three": "^0.172.0",
30
+ "@types/webpack": "^5.28.5",
31
+ "babel-loader": "^9.1.3",
32
+ "cross-env": "^7.0.3",
33
+ "css-loader": "^7.1.2",
34
+ "dotenv": "^16.4.5",
35
+ "dotenv-webpack": "^8.1.0",
36
+ "dts-bundle-generator": "^9.5.1",
37
+ "fs-extra": "^11.2.0",
38
+ "install": "^0.13.0",
39
+ "javascript-obfuscator": "^4.1.1",
40
+ "jest": "^29.7.0",
41
+ "npm": "^10.8.1",
42
+ "prettier": "^3.3.2",
43
+ "rimraf": "^6.0.1",
44
+ "style-loader": "^4.0.0",
45
+ "terser-webpack-plugin": "^5.3.10",
46
+ "ts-jest": "^29.1.5",
47
+ "ts-loader": "^9.5.1",
48
+ "ts-proto": "^2.2.3",
49
+ "tslint": "^6.1.3",
50
+ "tslint-config-prettier": "^1.18.0",
51
+ "typescript": "^5.5.3",
52
+ "webpack": "^5.92.1",
53
+ "webpack-cli": "^5.1.4",
54
+ "webpack-dev-server": "^5.0.4",
55
+ "webpack-obfuscator": "^3.5.1"
56
+ },
57
+ "dependencies": {
58
+ "@turf/turf": "^7.1.0",
59
+ "@types/polylabel": "^1.1.3",
60
+ "axios": "^1.7.5",
61
+ "html-webpack-plugin": "^5.6.3",
62
+ "maplibre-gl": "^4.4.1",
63
+ "polished": "^4.3.1",
64
+ "polylabel": "^2.0.1",
65
+ "protobufjs": "^7.4.0",
66
+ "rbush": "^4.0.1",
67
+ "three": "^0.172.0",
68
+ "troika-three-text": "^0.52.3",
69
+ "word-wrap": "^1.2.5"
70
+ }
71
+ }