@mapxus/mapxus-map-jp 10.0.0 → 10.0.1

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/utils.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("@mapxus/mapxus-auth-jp"),R="10.0.0",v={version:R},c=v.version,D="https://map-api.mapxus.co.jp/bms",I=10,A=1;var m={value:()=>{}};function _(){for(var t=0,n=arguments.length,e={},i;t<n;++t){if(!(i=arguments[t]+"")||i in e||/[\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new u(e)}function u(t){this._=t}function w(t,n){return t.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0&&(i=e.slice(s+1),e=e.slice(0,s)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}u.prototype=_.prototype={constructor:u,on:function(t,n){var e=this._,i=w(t+"",e),s,o=-1,E=i.length;if(arguments.length<2){for(;++o<E;)if((s=(t=i[o]).type)&&(s=H(e[s],t.name)))return s;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<E;)if(s=(t=i[o]).type)e[s]=p(e[s],t.name,n);else if(n==null)for(s in e)e[s]=p(e[s],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new u(t)},call:function(t,n){if((s=arguments.length-2)>0)for(var e=new Array(s),i=0,s,o;i<s;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,s=o.length;i<s;++i)o[i].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],s=0,o=i.length;s<o;++s)i[s].value.apply(n,e)}};function H(t,n){for(var e=0,i=t.length,s;e<i;++e)if((s=t[e]).name===n)return s.value}function p(t,n,e){for(var i=0,s=t.length;i<s;++i)if(t[i].name===n){t[i]=m,t=t.slice(0,i).concat(t.slice(i+1));break}return e!=null&&t.push({name:n,value:e}),t}class l{static instance;_globalDispatcher;_httpSession;_theme=null;_isSDKInitialized=!1;constructor(){}static getInstance(){return l.instance||(l.instance=new l),l.instance}setGlobalDispatcher(n){this._globalDispatcher=n}getGlobalDispatcher(){return this._globalDispatcher}async getHttpSession(){return this._httpSession||(this.registerSDK(),this._httpSession=await h.HTTPSession.create(h.SDKName.MapSDK,h.base64Encode(`version-${c}`)),this._httpSession.setBaseURL(D),this._httpSession.setRetryConfig(3)),this._httpSession}registerSDK(){this._isSDKInitialized||(this._isSDKInitialized=!0,h.reportLog(`${h.SDKName.MapSDK} initialized`))}get theme(){return this._theme}setTheme(n){this._theme=n}clear(){this._httpSession.destroy(),this._globalDispatcher=null,l.instance=null}}const S=["unauthorized","initError"],a=globalThis,f=_(...S);l.getInstance().setGlobalDispatcher(f);a.MapxusMapEvents=a.MapxusMapEvents||{};a.MapxusMapEvents.on=function(t,n){return f.on(t,n),{off:()=>f.on(t,null)}};var r=(t=>(t.ENGLISH="en",t.CHINESE_SIMPLIFIED="zh-Hans",t.CHINESE_TRADITIONAL="zh-Hant",t.CHINESE_TRADITIONAL_TW="zh-Hant-TW",t.JAPANESE="ja",t.KOREAN="ko",t.FILIPINO="fil",t.INDONESIAN="id",t.PORTUGUESE="pt",t.THAI="th",t.VIETNAMESE="vi",t.ARABIC="ar",t))(r||{});function T(t){let n=null;return d(t)?n=r.ENGLISH:M(t)?n=r.CHINESE_SIMPLIFIED:K(t)?n=r.CHINESE_TRADITIONAL:L(t)?n=r.CHINESE_TRADITIONAL_TW:F(t)?n=r.JAPANESE:$(t)?n=r.KOREAN:b(t)?n=r.FILIPINO:z(t)?n=r.INDONESIAN:G(t)?n=r.PORTUGUESE:B(t)?n=r.THAI:P(t)?n=r.VIETNAMESE:C(t)&&(n=r.ARABIC),n}function d(t){return/^en(-(US|GB|AU))?$/.test(t)}function M(t){return/^zh(-(Hans|CN))?$/.test(t)}function K(t){return/^zh-(Hant|HK|MO)$/.test(t)}function L(t){return t==="zh-TW"}function F(t){return/^ja(-JP)?$/.test(t)}function $(t){return/^ko(-KR)?$/.test(t)}function b(t){return/^(fil|tl)(-PH)?$/.test(t)}function z(t){return/^id(-ID)?$/.test(t)}function G(t){return/^pt(-(BR|PT))?$/.test(t)}function B(t){return/^th(-TH)?$/.test(t)}function P(t){return/^vi(-VN)?$/.test(t)}function C(t){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(t)}const N="reserve_mapxus-level-fill",O="reserve_mapxus-shared-level-fill",U={convertBrowserLangToPresetLang:T,VERSION:c,OFFSET:I,PAGE:A,ERRORS:S,ASSISTANT_LAYER_INDOOR_FLOORS:N,ASSISTANT_LAYER_SHARED_FLOORS:O};exports.ASSISTANT_LAYER_INDOOR_FLOORS=N;exports.ASSISTANT_LAYER_SHARED_FLOORS=O;exports.ERRORS=S;exports.OFFSET=I;exports.PAGE=A;exports.VERSION=c;exports.convertBrowserLangToPresetLang=T;exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("d3-dispatch"),n=require("@mapxus/mapxus-auth-jp"),p="10.0.1",T={version:p},S=T.version,f="https://map-api.mapxus.co.jp/bms",l=10,E=1;class e{static instance;_globalDispatcher;_httpSession;_theme=null;_isSDKInitialized=!1;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}setGlobalDispatcher(s){this._globalDispatcher=s}getGlobalDispatcher(){return this._globalDispatcher}async getHttpSession(){return this._httpSession||(this.registerSDK(),this._httpSession=await n.HTTPSession.create(n.SDKName.MapSDK,n.base64Encode(`version-${S}`)),this._httpSession.setBaseURL(f),this._httpSession.setRetryConfig(3)),this._httpSession}registerSDK(){this._isSDKInitialized||(this._isSDKInitialized=!0,n.reportLog(`${n.SDKName.MapSDK} initialized`))}get theme(){return this._theme}setTheme(s){this._theme=s}clear(){this._httpSession.destroy(),this._globalDispatcher=null,e.instance=null}}const c=["unauthorized","initError"],r=globalThis,o=A.dispatch(...c);e.getInstance().setGlobalDispatcher(o);r.MapxusMapEvents=r.MapxusMapEvents||{};r.MapxusMapEvents.on=function(t,s){return o.on(t,s),{off:()=>o.on(t,null)}};var i=(t=>(t.ENGLISH="en",t.CHINESE_SIMPLIFIED="zh-Hans",t.CHINESE_TRADITIONAL="zh-Hant",t.CHINESE_TRADITIONAL_TW="zh-Hant-TW",t.JAPANESE="ja",t.KOREAN="ko",t.FILIPINO="fil",t.INDONESIAN="id",t.PORTUGUESE="pt",t.THAI="th",t.VIETNAMESE="vi",t.ARABIC="ar",t))(i||{});function I(t){let s=null;return u(t)?s=i.ENGLISH:N(t)?s=i.CHINESE_SIMPLIFIED:_(t)?s=i.CHINESE_TRADITIONAL:O(t)?s=i.CHINESE_TRADITIONAL_TW:R(t)?s=i.JAPANESE:D(t)?s=i.KOREAN:H(t)?s=i.FILIPINO:d(t)?s=i.INDONESIAN:M(t)?s=i.PORTUGUESE:m(t)?s=i.THAI:v(t)?s=i.VIETNAMESE:K(t)&&(s=i.ARABIC),s}function u(t){return/^en(-(US|GB|AU))?$/.test(t)}function N(t){return/^zh(-(Hans|CN))?$/.test(t)}function _(t){return/^zh-(Hant|HK|MO)$/.test(t)}function O(t){return t==="zh-TW"}function R(t){return/^ja(-JP)?$/.test(t)}function D(t){return/^ko(-KR)?$/.test(t)}function H(t){return/^(fil|tl)(-PH)?$/.test(t)}function d(t){return/^id(-ID)?$/.test(t)}function M(t){return/^pt(-(BR|PT))?$/.test(t)}function m(t){return/^th(-TH)?$/.test(t)}function v(t){return/^vi(-VN)?$/.test(t)}function K(t){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(t)}const h="reserve_mapxus-level-fill",a="reserve_mapxus-shared-level-fill",L={convertBrowserLangToPresetLang:I,VERSION:S,OFFSET:l,PAGE:E,ERRORS:c,ASSISTANT_LAYER_INDOOR_FLOORS:h,ASSISTANT_LAYER_SHARED_FLOORS:a};exports.ASSISTANT_LAYER_INDOOR_FLOORS=h;exports.ASSISTANT_LAYER_SHARED_FLOORS=a;exports.ERRORS=c;exports.OFFSET=l;exports.PAGE=E;exports.VERSION=S;exports.convertBrowserLangToPresetLang=I;exports.default=L;
package/es/index.d.ts CHANGED
@@ -849,10 +849,7 @@ declare class Map$1 implements IMapxusMap {
849
849
  private _dispatch;
850
850
  private _fitBounds;
851
851
  private _history;
852
- private _debounceHTTPErrorHandler;
853
852
  private _transformRequestHandler;
854
- private _tokenRefreshingPromise;
855
- private _cancelTokenChangedListener;
856
853
  isDestroyed: boolean;
857
854
  /** @deprecated Use "outdoorClickSelection" instead */
858
855
  switchOutdoor: SwitchOutdoorHandler;
@@ -864,13 +861,17 @@ declare class Map$1 implements IMapxusMap {
864
861
  floorSelector: FloorSelectorHandler;
865
862
  constructor(options: IMapOption);
866
863
  /**
867
- * This function will be called once the indoor source loaded.
864
+ * Set a callback that fires once indoor map has finished rendering.
868
865
  * @param callback
869
866
  */
870
867
  renderComplete(callback: VoidFunction): void;
868
+ /**
869
+ * Set a callback that fires once map instance is destroyed.
870
+ * @param callback
871
+ */
871
872
  destroyed(callback: VoidFunction): void;
872
873
  /**
873
- * For transforming the request parameters of style resources before the map makes a request. Should be called before map.renderComplete().
874
+ * Transform the request options of style resources.
874
875
  * @param handler {maplibregl.RequestTransformFunction}
875
876
  */
876
877
  setTransformRequest(handler: maplibregl$1.RequestTransformFunction): void;
@@ -913,6 +914,11 @@ declare class Map$1 implements IMapxusMap {
913
914
  * @param shown
914
915
  */
915
916
  setOutdoorMapShown(shown: boolean): void;
917
+ /**
918
+ * Query indoor features by screen point({x, y}).
919
+ * @param point
920
+ * @returns
921
+ */
916
922
  queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
917
923
  /**
918
924
  * Get features from bbox by coordinates [and ordinal].
@@ -1612,7 +1618,6 @@ export declare class Poi {
1612
1618
  private _queryIndoorFeaturesByFloor;
1613
1619
  }
1614
1620
  export declare class VenuesService {
1615
- private _api;
1616
1621
  constructor();
1617
1622
  /**
1618
1623
  * Search venues by ids.
@@ -1639,7 +1644,6 @@ export declare class VenuesService {
1639
1644
  private _filterVenueProperties;
1640
1645
  }
1641
1646
  export declare class BuildingsService {
1642
- private _api;
1643
1647
  constructor();
1644
1648
  /**
1645
1649
  * Search buildings by id[s].
@@ -1670,8 +1674,6 @@ export declare class BuildingsService {
1670
1674
  private _filterBuildingProperties;
1671
1675
  }
1672
1676
  export declare class PoisService {
1673
- private _poisApi;
1674
- private _categoriesGroupApi;
1675
1677
  constructor();
1676
1678
  /**
1677
1679
  * Search POIs by id[s].
@@ -1726,7 +1728,6 @@ export declare class PoisService {
1726
1728
  private _filterPoiProperties;
1727
1729
  }
1728
1730
  export declare class RouteService {
1729
- private _api;
1730
1731
  constructor();
1731
1732
  /**
1732
1733
  * Search the route of two or more points.