@mapxus/mapxus-map-jp 9.2.0 → 10.0.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,165 @@
1
+ import { HTTPSession as p, SDKName as u, base64Encode as I, reportLog as A } from "@mapxus/mapxus-auth-jp";
2
+ var _ = { value: () => {
3
+ } };
4
+ function S() {
5
+ for (var t = 0, n = arguments.length, s = {}, i; t < n; ++t) {
6
+ if (!(i = arguments[t] + "") || i in s || /[\s.]/.test(i)) throw new Error("illegal type: " + i);
7
+ s[i] = [];
8
+ }
9
+ return new a(s);
10
+ }
11
+ function a(t) {
12
+ this._ = t;
13
+ }
14
+ function T(t, n) {
15
+ return t.trim().split(/^|\s+/).map(function(s) {
16
+ var i = "", e = s.indexOf(".");
17
+ if (e >= 0 && (i = s.slice(e + 1), s = s.slice(0, e)), s && !n.hasOwnProperty(s)) throw new Error("unknown type: " + s);
18
+ return { type: s, name: i };
19
+ });
20
+ }
21
+ a.prototype = S.prototype = {
22
+ constructor: a,
23
+ on: function(t, n) {
24
+ var s = this._, i = T(t + "", s), e, o = -1, c = i.length;
25
+ if (arguments.length < 2) {
26
+ for (; ++o < c; ) if ((e = (t = i[o]).type) && (e = N(s[e], t.name))) return e;
27
+ return;
28
+ }
29
+ if (n != null && typeof n != "function") throw new Error("invalid callback: " + n);
30
+ for (; ++o < c; )
31
+ if (e = (t = i[o]).type) s[e] = E(s[e], t.name, n);
32
+ else if (n == null) for (e in s) s[e] = E(s[e], t.name, null);
33
+ return this;
34
+ },
35
+ copy: function() {
36
+ var t = {}, n = this._;
37
+ for (var s in n) t[s] = n[s].slice();
38
+ return new a(t);
39
+ },
40
+ call: function(t, n) {
41
+ if ((e = arguments.length - 2) > 0) for (var s = new Array(e), i = 0, e, o; i < e; ++i) s[i] = arguments[i + 2];
42
+ if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
43
+ for (o = this._[t], i = 0, e = o.length; i < e; ++i) o[i].value.apply(n, s);
44
+ },
45
+ apply: function(t, n, s) {
46
+ if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
47
+ for (var i = this._[t], e = 0, o = i.length; e < o; ++e) i[e].value.apply(n, s);
48
+ }
49
+ };
50
+ function N(t, n) {
51
+ for (var s = 0, i = t.length, e; s < i; ++s)
52
+ if ((e = t[s]).name === n)
53
+ return e.value;
54
+ }
55
+ function E(t, n, s) {
56
+ for (var i = 0, e = t.length; i < e; ++i)
57
+ if (t[i].name === n) {
58
+ t[i] = _, t = t.slice(0, i).concat(t.slice(i + 1));
59
+ break;
60
+ }
61
+ return s != null && t.push({ name: n, value: s }), t;
62
+ }
63
+ const v = "10.0.0", O = {
64
+ version: v
65
+ }, D = O.version, m = "https://map-api.mapxus.co.jp/bms", U = 10, P = 1;
66
+ class l {
67
+ static instance;
68
+ _globalDispatcher;
69
+ _httpSession;
70
+ _theme = null;
71
+ _isSDKInitialized = !1;
72
+ constructor() {
73
+ }
74
+ static getInstance() {
75
+ return l.instance || (l.instance = new l()), l.instance;
76
+ }
77
+ setGlobalDispatcher(n) {
78
+ this._globalDispatcher = n;
79
+ }
80
+ getGlobalDispatcher() {
81
+ return this._globalDispatcher;
82
+ }
83
+ async getHttpSession() {
84
+ return this._httpSession || (this.registerSDK(), this._httpSession = await p.create(
85
+ u.MapSDK,
86
+ I(`version-${D}`)
87
+ ), this._httpSession.setBaseURL(m), this._httpSession.setRetryConfig(3)), this._httpSession;
88
+ }
89
+ registerSDK() {
90
+ this._isSDKInitialized || (this._isSDKInitialized = !0, A(`${u.MapSDK} initialized`));
91
+ }
92
+ get theme() {
93
+ return this._theme;
94
+ }
95
+ setTheme(n) {
96
+ this._theme = n;
97
+ }
98
+ clear() {
99
+ this._httpSession.destroy(), this._globalDispatcher = null, l.instance = null;
100
+ }
101
+ }
102
+ const R = ["unauthorized", "initError"], h = globalThis, f = S(...R);
103
+ l.getInstance().setGlobalDispatcher(f);
104
+ h.MapxusMapEvents = h.MapxusMapEvents || {};
105
+ h.MapxusMapEvents.on = function(t, n) {
106
+ return f.on(t, n), { off: () => f.on(t, null) };
107
+ };
108
+ const y = "reserve_mapxus-level-fill", V = "reserve_mapxus-shared-level-fill", W = "reserve_mapxus-building-fill";
109
+ var r = /* @__PURE__ */ ((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 || {});
110
+ function Y(t) {
111
+ let n = null;
112
+ return w(t) ? n = r.ENGLISH : H(t) ? n = r.CHINESE_SIMPLIFIED : d(t) ? n = r.CHINESE_TRADITIONAL : M(t) ? n = r.CHINESE_TRADITIONAL_TW : K(t) ? n = r.JAPANESE : $(t) ? n = r.KOREAN : b(t) ? n = r.FILIPINO : L(t) ? n = r.INDONESIAN : z(t) ? n = r.PORTUGUESE : B(t) ? n = r.THAI : G(t) ? n = r.VIETNAMESE : C(t) && (n = r.ARABIC), n;
113
+ }
114
+ function w(t) {
115
+ return /^en(-(US|GB|AU))?$/.test(t);
116
+ }
117
+ function H(t) {
118
+ return /^zh(-(Hans|CN))?$/.test(t);
119
+ }
120
+ function d(t) {
121
+ return /^zh-(Hant|HK|MO)$/.test(t);
122
+ }
123
+ function M(t) {
124
+ return t === "zh-TW";
125
+ }
126
+ function K(t) {
127
+ return /^ja(-JP)?$/.test(t);
128
+ }
129
+ function $(t) {
130
+ return /^ko(-KR)?$/.test(t);
131
+ }
132
+ function b(t) {
133
+ return /^(fil|tl)(-PH)?$/.test(t);
134
+ }
135
+ function L(t) {
136
+ return /^id(-ID)?$/.test(t);
137
+ }
138
+ function z(t) {
139
+ return /^pt(-(BR|PT))?$/.test(t);
140
+ }
141
+ function B(t) {
142
+ return /^th(-TH)?$/.test(t);
143
+ }
144
+ function G(t) {
145
+ return /^vi(-VN)?$/.test(t);
146
+ }
147
+ function C(t) {
148
+ return /^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(
149
+ t
150
+ );
151
+ }
152
+ export {
153
+ y as A,
154
+ m as B,
155
+ l as C,
156
+ R as E,
157
+ U as O,
158
+ r as P,
159
+ D as V,
160
+ P as a,
161
+ V as b,
162
+ Y as c,
163
+ S as d,
164
+ W as e
165
+ };
package/es/style.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ declare module "@mapxus-private/mapxus-map/style" {
2
+ const content: string;
3
+ export default content;
4
+ }
@@ -0,0 +1,49 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ export declare const VERSION: string;
4
+ export declare const OFFSET: number;
5
+ export declare const PAGE: number;
6
+ export declare const ERRORS: readonly [
7
+ "unauthorized",
8
+ "initError"
9
+ ];
10
+ declare enum PresetLanguage {
11
+ ENGLISH = "en",
12
+ CHINESE_SIMPLIFIED = "zh-Hans",
13
+ CHINESE_TRADITIONAL = "zh-Hant",
14
+ CHINESE_TRADITIONAL_TW = "zh-Hant-TW",
15
+ JAPANESE = "ja",
16
+ KOREAN = "ko",
17
+ FILIPINO = "fil",
18
+ INDONESIAN = "id",
19
+ PORTUGUESE = "pt",
20
+ THAI = "th",
21
+ VIETNAMESE = "vi",
22
+ ARABIC = "ar"
23
+ }
24
+ /**
25
+ * Convert browser language to preset language
26
+ * @param language {string} window.navigator.language
27
+ */
28
+ export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
29
+ export interface IMapxusUtils {
30
+ convertBrowserLangToPresetLang: (lang: string) => PresetLanguage | null;
31
+ VERSION: string;
32
+ OFFSET: number;
33
+ PAGE: number;
34
+ ERRORS: readonly [
35
+ "unauthorized",
36
+ "initError"
37
+ ];
38
+ ASSISTANT_LAYER_INDOOR_FLOORS: string;
39
+ ASSISTANT_LAYER_SHARED_FLOORS: string;
40
+ }
41
+ export declare const ASSISTANT_LAYER_INDOOR_FLOORS = "reserve_mapxus-level-fill";
42
+ export declare const ASSISTANT_LAYER_SHARED_FLOORS = "reserve_mapxus-shared-level-fill";
43
+ declare const mapxusUtils: IMapxusUtils;
44
+
45
+ export {
46
+ mapxusUtils as default,
47
+ };
48
+
49
+ export {};
@@ -1,36 +1,20 @@
1
- import { p as o, d as r, C as c, _ as p, b as i, A as S, a as l, O as u, s as A, g as E, h as O, j as g, c as R } from "../context-DcBNN51L.mjs";
2
- const T = o.version, e = ["unauthorized", "initError"], s = globalThis, a = r(...e);
3
- c.getInstance().setGlobalDispatcher(a);
4
- s.MapxusMapEvents = s.MapxusMapEvents || {};
5
- s.MapxusMapEvents.on = function(t, n) {
6
- return a.on(t, n), { off: () => a.on(t, null) };
7
- };
8
- const f = {
9
- convertBrowserLangToPresetLang: R,
10
- getAccessToken: g,
11
- getIdentifier: O,
12
- setGetTokenAsync: E,
13
- setupTokenManager: A,
14
- VERSION: T,
15
- OFFSET: u,
16
- PAGE: l,
17
- ERRORS: e,
18
- ASSISTANT_LAYER_INDOOR_FLOORS: S,
19
- ASSISTANT_LAYER_SHARED_FLOORS: i,
20
- __internal: p
1
+ import { b as a, A as s, E as S, a as O, O as R, V as A, c as E } from "../languages-C5nRc9Ll.mjs";
2
+ const r = {
3
+ convertBrowserLangToPresetLang: E,
4
+ VERSION: A,
5
+ OFFSET: R,
6
+ PAGE: O,
7
+ ERRORS: S,
8
+ ASSISTANT_LAYER_INDOOR_FLOORS: s,
9
+ ASSISTANT_LAYER_SHARED_FLOORS: a
21
10
  };
22
11
  export {
23
- S as ASSISTANT_LAYER_INDOOR_FLOORS,
24
- i as ASSISTANT_LAYER_SHARED_FLOORS,
25
- e as ERRORS,
26
- u as OFFSET,
27
- l as PAGE,
28
- T as VERSION,
29
- p as __internal,
30
- R as convertBrowserLangToPresetLang,
31
- f as default,
32
- g as getAccessToken,
33
- O as getIdentifier,
34
- E as setGetTokenAsync,
35
- A as setupTokenManager
12
+ s as ASSISTANT_LAYER_INDOOR_FLOORS,
13
+ a as ASSISTANT_LAYER_SHARED_FLOORS,
14
+ S as ERRORS,
15
+ R as OFFSET,
16
+ O as PAGE,
17
+ A as VERSION,
18
+ E as convertBrowserLangToPresetLang,
19
+ r as default
36
20
  };
package/package.json CHANGED
@@ -1,21 +1,27 @@
1
1
  {
2
2
  "name": "@mapxus/mapxus-map-jp",
3
- "version": "9.2.0",
3
+ "version": "10.0.0",
4
4
  "description": "mapxus map web sdk - kawasaki-prod",
5
5
  "main": "dist/utils.cjs",
6
6
  "unpkg": "dist/index.umd.js",
7
7
  "module": "es/index.mjs",
8
- "typings": "es/index.d.ts",
8
+ "types": "es/index.d.ts",
9
9
  "style": "dist/index.css",
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./es/index.mjs",
13
- "types": "./es/index.d.ts"
12
+ "types": "./es/index.d.ts",
13
+ "import": "./es/index.mjs"
14
14
  },
15
15
  "./utils": {
16
+ "types": "./es/utils/index.d.ts",
16
17
  "import": "./es/utils/index.mjs",
17
- "types": "./es/index.d.ts"
18
- }
18
+ "require": "./dist/utils.cjs"
19
+ },
20
+ "./style": {
21
+ "types": "./es/style.d.ts",
22
+ "default": "./dist/index.css"
23
+ },
24
+ "./dist/index.css": "./dist/index.css"
19
25
  },
20
26
  "files": [
21
27
  "dist",
@@ -32,15 +38,12 @@
32
38
  "author": "Maphive Technology Limited",
33
39
  "license": "BSD-3-Clause",
34
40
  "peerDependencies": {
41
+ "@mapxus/mapxus-auth-jp": "~0.0.1",
35
42
  "maplibre-gl": "^5.2.0"
36
43
  },
37
44
  "dependencies": {
38
- "@fingerprintjs/fingerprintjs": "^4.6.1",
39
- "axios": "^1.6.8",
40
- "buffer": "^6.0.3",
41
45
  "d3-dispatch": "^3.0.1",
42
- "eciesjs": "^0.4.14",
43
- "jwt-decode": "^4.0.0",
46
+ "geojson": "^0.5.0",
44
47
  "lodash-es": "^4.17.21",
45
48
  "tiny-emitter": "^2.1.0"
46
49
  }