@mapxus/mapxus-map-jp 8.3.0 → 8.5.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.
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
9
+
10
+ /*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
11
+
12
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
13
+
14
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
package/es/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export declare enum PresetLanguage {
15
15
  ENGLISH = "en",
16
16
  CHINESE_SIMPLIFIED = "zh-Hans",
17
17
  CHINESE_TRADITIONAL = "zh-Hant",
18
+ CHINESE_TRADITIONAL_TW = "zh-Hant-TW",
18
19
  JAPANESE = "ja",
19
20
  KOREAN = "ko",
20
21
  FILIPINO = "fil",
@@ -36,7 +37,7 @@ export declare enum ThemeType {
36
37
  MAPXUS_DEFAULT = "mapxus_default"
37
38
  }
38
39
  export declare enum AccessControlOrigin {
39
- Self = "self",
40
+ Access = "access_control",
40
41
  Map = "map"
41
42
  }
42
43
  export interface IBbox {
@@ -148,10 +149,20 @@ export interface ISelectedBuildingBorderStyle {
148
149
  lineColor?: string;
149
150
  lineOpacity?: number;
150
151
  }
151
- export interface IMapOption {
152
+ export interface IPlatformCommon {
153
+ sdkVersion: string;
154
+ identifier: string;
155
+ }
156
+ export interface IPlatformIos extends IPlatformCommon {
157
+ bundleId: string;
158
+ }
159
+ export interface IPlatformAndroid extends IPlatformCommon {
160
+ sha1: string;
161
+ packageName: string;
162
+ }
163
+ export type TPlatform = IPlatformIos | IPlatformAndroid;
164
+ export interface IMapOtherOptions {
152
165
  map: maplibregl$1.Map;
153
- appId: string;
154
- secret: string;
155
166
  floorSelectorEnabled?: boolean;
156
167
  buildingSelectorEnabled?: boolean;
157
168
  /**
@@ -208,6 +219,28 @@ export interface IMapOption {
208
219
  transformRequest?: maplibregl$1.RequestTransformFunction | null;
209
220
  mapxusLogoEnabled?: boolean;
210
221
  }
222
+ export interface IMapAccessWithAppId {
223
+ appId: string;
224
+ secret: string;
225
+ /**
226
+ * get accessToken of the specific platform(ios or android), optional, default is web
227
+ * @private
228
+ */
229
+ platform?: TPlatform;
230
+ }
231
+ export interface ITokenResponse {
232
+ accessToken: string;
233
+ /** timestamp */
234
+ expiredTime: number;
235
+ identifier?: string;
236
+ sdkVersion?: string;
237
+ }
238
+ export type TAccessTokenGetter = () => Promise<ITokenResponse>;
239
+ export interface IMapAccessWithToken {
240
+ getTokenAsync: TAccessTokenGetter;
241
+ }
242
+ export type TMapKeys = IMapAccessWithAppId | IMapAccessWithToken;
243
+ export type IMapOption = IMapOtherOptions & TMapKeys;
211
244
  export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
212
245
  export interface IMarkerOptions {
213
246
  lngLat: [
@@ -596,7 +629,7 @@ export interface IVenueSearchCustomizedOptions extends IBuildingSearchCustomized
596
629
  export declare class Indoor extends EventEmitter {
597
630
  private _map;
598
631
  private _features;
599
- private _allBuildings;
632
+ private _allBuildingsMap;
600
633
  private _curBuildingId;
601
634
  private _curBuildingFeature;
602
635
  private _ordinal;
@@ -616,7 +649,6 @@ export declare class Indoor extends EventEmitter {
616
649
  private readonly _fitBuildingBounds;
617
650
  private readonly _boundsPadding;
618
651
  private readonly _startWithIndoorView;
619
- private _maplibreMapLoaded;
620
652
  private _indoorMapLoaded;
621
653
  private readonly _isVenueMode;
622
654
  private readonly _isMaskMode;
@@ -734,14 +766,14 @@ export declare class Indoor extends EventEmitter {
734
766
  ]
735
767
  ]): void;
736
768
  selectBuildingByClickMap(point: PointLike): Promise<void>;
737
- private _loadData;
738
- private _init;
769
+ private _bindMaplibreEventListeners;
739
770
  private _clear;
740
771
  private _getIndoorFeatures;
741
772
  private _getBuildingFloorByOrdinal;
742
773
  private _isNotCurrentFeature;
743
774
  private _setOutdoorVisibility;
744
775
  private _addCustomLevelFillLayer;
776
+ private _addBuildingMaskLayer;
745
777
  private _setBuildingLineOpacity;
746
778
  private _addBuildingHighlightLayer;
747
779
  private _filterBuildingHighlight;
@@ -751,6 +783,7 @@ export declare class Indoor extends EventEmitter {
751
783
  private _getBuildingsOfBbox;
752
784
  private _copyOverlapLayers;
753
785
  private _updateFeatures;
786
+ private _updateSelectedFeatures;
754
787
  private _layerDisplayedBuildings;
755
788
  private _setDisplayedLevels;
756
789
  private _filterTiles;
@@ -761,6 +794,7 @@ export declare class Indoor extends EventEmitter {
761
794
  private _checkAndPanToBuilding;
762
795
  private _invisibleSelectedBuilding;
763
796
  private _clearTimers;
797
+ private _queryRenderedFeatures;
764
798
  }
765
799
  export declare class BuildingFilterControl implements IControl {
766
800
  private _map;
@@ -771,9 +805,12 @@ export declare class BuildingFilterControl implements IControl {
771
805
  private _$listContainer;
772
806
  private _$buildingList;
773
807
  private _listHeight;
808
+ private _language;
774
809
  private _visible;
775
810
  private _position;
776
- constructor(map: Map$1, buildingSelectorEnabled?: boolean);
811
+ private _isMobileMode;
812
+ private _isListShown;
813
+ constructor(map: any, buildingSelectorEnabled?: boolean);
777
814
  onAdd(map: maplibregl$1.Map): HTMLElement;
778
815
  onRemove(): void;
779
816
  get position(): ControlPosition;
@@ -781,7 +818,7 @@ export declare class BuildingFilterControl implements IControl {
781
818
  getDefaultPosition(): ControlPosition;
782
819
  setVisibility(isVisible: boolean): void;
783
820
  changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
784
- private _loadData;
821
+ private _bindEvents;
785
822
  private _init;
786
823
  private _refresh;
787
824
  private _load;
@@ -793,10 +830,12 @@ export declare class BuildingFilterControl implements IControl {
793
830
  private _buildingNameCreate;
794
831
  private _toggleList;
795
832
  private _buildingNameClickEvent;
796
- private _buildingToggleListEvent;
833
+ private _bindMouseOnEvents;
834
+ private _bindMobileTouchEvents;
797
835
  private _$showLayout;
798
836
  private _$hideLayout;
799
837
  private _updateBuildingListLayout;
838
+ private _detectDeviceMode;
800
839
  }
801
840
  export interface IFloorSelectorOptions {
802
841
  style?: IFloorSelectorStyle;
@@ -915,22 +954,23 @@ export declare class SwitchOutdoorHandler {
915
954
  get isEnabled(): boolean;
916
955
  }
917
956
  declare class Map$1 {
918
- private _appId;
919
957
  private _map;
920
958
  private _indoor;
921
959
  private _poi;
922
960
  private _floorsControl;
923
961
  private _buildingFilterControl;
924
962
  private _attributionControl;
925
- private _initialHiddenLayers;
926
963
  private _language;
927
964
  private _dispatch;
928
965
  private _fitBuildingBounds;
929
966
  private _history;
930
967
  private _hiddenBuildings;
931
968
  private _debounceHTTPErrorHandler;
932
- private _debounceTilesFilter;
933
969
  private _transformRequestHandler;
970
+ private _tokenRefreshingPromise;
971
+ private _request;
972
+ private _$mask;
973
+ private _cancelTokenChangedListener;
934
974
  isDestroyed: boolean;
935
975
  switchOutdoor: SwitchOutdoorHandler;
936
976
  switchBuilding: SwitchBuildingHandler;
@@ -995,9 +1035,9 @@ declare class Map$1 {
995
1035
  lng: number;
996
1036
  lat: number;
997
1037
  }, ordinal?: number): {
998
- venue: MapGeoJSONFeature;
999
- building: MapGeoJSONFeature;
1000
- level: MapGeoJSONFeature;
1038
+ venue: MapGeoJSONFeature | null;
1039
+ building: MapGeoJSONFeature | null;
1040
+ level: MapGeoJSONFeature | null;
1001
1041
  };
1002
1042
  /**
1003
1043
  * @description Query rendered features from bbox by id. One id may correspond to multiple features,
@@ -1078,6 +1118,7 @@ declare class Map$1 {
1078
1118
  * @param style {ISelectedBuildingBorderStyle | null}
1079
1119
  */
1080
1120
  setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): this;
1121
+ private _setup;
1081
1122
  private _getStyleUrl;
1082
1123
  private _setIndoorFilter;
1083
1124
  private _setStyle;
@@ -1085,8 +1126,6 @@ declare class Map$1 {
1085
1126
  private _selectPoiById;
1086
1127
  private _resourceRequestTransform;
1087
1128
  private _checkMapZoom;
1088
- private _hideIndoorLayers;
1089
- private _showIndoorLayers;
1090
1129
  private _updatePermission;
1091
1130
  private _selectCenterBuilding;
1092
1131
  /**
@@ -1094,6 +1133,10 @@ declare class Map$1 {
1094
1133
  * @returns Map<buildingId, buildingFeature>
1095
1134
  */
1096
1135
  private _getCenterBuildingsMap;
1136
+ private _bindMapClickListener;
1137
+ private _bindTokenChangedListener;
1138
+ private _handleSearchError;
1139
+ private _setMaskEnabled;
1097
1140
  private _destroy;
1098
1141
  }
1099
1142
  export declare class Marker {
@@ -1387,7 +1430,7 @@ export declare class AccessControl extends EventEmitter {
1387
1430
  isClosed: boolean;
1388
1431
  private _timeoutId;
1389
1432
  private _isInitialized;
1390
- private readonly _initializationPromise;
1433
+ private _initializationPromise;
1391
1434
  private _tokenManager;
1392
1435
  private readonly _from;
1393
1436
  constructor(appId: string, secret: string, origin?: AccessControlOrigin);
@@ -1401,6 +1444,10 @@ export declare class AccessControl extends EventEmitter {
1401
1444
  * Destroy the access_control instance, stop updating token.
1402
1445
  */
1403
1446
  close(): void;
1447
+ /**
1448
+ * For machine sleep for a long time, timer doesn't work, the token may be expired, so you can force update the token.
1449
+ */
1450
+ forceUpdateToken(): void;
1404
1451
  private _initToken;
1405
1452
  private _loopUpdateToken;
1406
1453
  }
@@ -1565,7 +1612,33 @@ export declare const PAGE: number;
1565
1612
  * @param language {string} window.navigator.language
1566
1613
  */
1567
1614
  export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
1615
+ /**
1616
+ * Get access token
1617
+ * @param appId
1618
+ * @param secret
1619
+ * @param platform get accessToken of the specific platform(ios or android), optional
1620
+ * @param origin the reference of appId, optional
1621
+ * @returns {accessToken: string; expiresIn: number;} expiresIn means the valid time of accessToken
1622
+ */
1623
+ export declare function getAccessToken(appId: string, secret: string, platform?: TPlatform, origin?: string): Promise<{
1624
+ accessToken: string;
1625
+ expiredTime: number;
1626
+ }>;
1568
1627
  export declare function getIdentifier(): Promise<string>;
1628
+ export declare function setGetTokenAsync(fn: TAccessTokenGetter): void;
1629
+ export declare function setupTokenManager(): Promise<void>;
1630
+ export type InputProduct = "UI_SDK" | "ANYWHERE";
1631
+ /**
1632
+ * @private
1633
+ * This method is internal and should not be exposed in the documentation.
1634
+ */
1635
+ export declare const __internal: {
1636
+ [x: symbol]: (names: InputProduct[]) => void;
1637
+ };
1638
+ export declare const ERRORS: readonly [
1639
+ "unauthorized",
1640
+ "initError"
1641
+ ];
1569
1642
  export declare const VERSION: string;
1570
1643
 
1571
1644
  export {