@realsee/dnalogel 3.12.0 → 3.12.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.
@@ -14,7 +14,7 @@ let b = class {
14
14
  /**
15
15
  * @realsee/dnalogel 版本号
16
16
  */
17
- i(this, "VERSION", "3.12.0");
17
+ i(this, "VERSION", "3.12.1");
18
18
  i(this, "five");
19
19
  /**
20
20
  * @description: 插件事件钩子
@@ -2,16 +2,16 @@ var g = Object.defineProperty, w = Object.defineProperties;
2
2
  var v = Object.getOwnPropertyDescriptors;
3
3
  var b = Object.getOwnPropertySymbols;
4
4
  var A = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
5
- var u = (r, i, t) => i in r ? g(r, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[i] = t, p = (r, i) => {
6
- for (var t in i || (i = {}))
7
- A.call(i, t) && u(r, t, i[t]);
5
+ var u = (r, e, t) => e in r ? g(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, p = (r, e) => {
6
+ for (var t in e || (e = {}))
7
+ A.call(e, t) && u(r, t, e[t]);
8
8
  if (b)
9
- for (var t of b(i))
10
- S.call(i, t) && u(r, t, i[t]);
9
+ for (var t of b(e))
10
+ S.call(e, t) && u(r, t, e[t]);
11
11
  return r;
12
- }, f = (r, i) => w(r, v(i));
13
- var o = (r, i, t) => (u(r, typeof i != "symbol" ? i + "" : i, t), t);
14
- var c = (r, i, t) => new Promise((e, s) => {
12
+ }, f = (r, e) => w(r, v(e));
13
+ var o = (r, e, t) => (u(r, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var c = (r, e, t) => new Promise((i, s) => {
15
15
  var a = (n) => {
16
16
  try {
17
17
  d(t.next(n));
@@ -24,8 +24,8 @@ var c = (r, i, t) => new Promise((e, s) => {
24
24
  } catch (l) {
25
25
  s(l);
26
26
  }
27
- }, d = (n) => n.done ? e(n.value) : Promise.resolve(n.value).then(a, h);
28
- d((t = t.apply(r, i)).next());
27
+ }, d = (n) => n.done ? i(n.value) : Promise.resolve(n.value).then(a, h);
28
+ d((t = t.apply(r, e)).next());
29
29
  });
30
30
  import _ from "./Components/Main.js";
31
31
  import { equal as y } from "../../shared-utils/equal.js";
@@ -70,7 +70,7 @@ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
70
70
  import "../../shared-utils/url/absoluteUrl.js";
71
71
  import "../Assets/floorplanExtraObject.js";
72
72
  class mt extends O {
73
- constructor(t, e) {
73
+ constructor(t, i) {
74
74
  super(t);
75
75
  // =============== public properties =================
76
76
  o(this, "name", "panoFloorplanRadarPlugin");
@@ -96,8 +96,8 @@ class mt extends O {
96
96
  });
97
97
  o(this, "_disable", (t) => {
98
98
  var s;
99
- const { userAction: e } = t;
100
- (s = this.app) == null || s.$destroy(), this.app = void 0, this.hooks.emit("disable", { userAction: e });
99
+ const { userAction: i } = t;
100
+ (s = this.app) == null || s.$destroy(), this.app = void 0, this.hooks.emit("disable", { userAction: i });
101
101
  });
102
102
  this.five = t;
103
103
  const s = {
@@ -105,49 +105,49 @@ class mt extends O {
105
105
  highlightEnable: !0,
106
106
  cameraImageUrl: D,
107
107
  missingFloorImageUrl: this.staticPrefix + "/release/web/saas/missing-floor.d687a5ed.png"
108
- }, a = p(p({}, s), e == null ? void 0 : e.configs);
109
- this.state = { enabled: !0, visible: !0, config: a }, e != null && e.wrapper && console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"), typeof (e == null ? void 0 : e.wrapper) == "string" ? this.wrapperSelector = e.wrapper : (e == null ? void 0 : e.wrapper) instanceof Element && (this.wrapper = e.wrapper), t.once("dispose", this.dispose);
108
+ }, a = p(p({}, s), i == null ? void 0 : i.configs);
109
+ this.state = { enabled: !0, visible: !0, config: a }, i != null && i.wrapper && console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"), typeof (i == null ? void 0 : i.wrapper) == "string" ? this.wrapperSelector = i.wrapper : (i == null ? void 0 : i.wrapper) instanceof Element && (this.wrapper = i.wrapper), t.once("dispose", this.dispose);
110
110
  }
111
- load(t, e, s = !0) {
111
+ load(t, i, s = !0) {
112
112
  return c(this, null, function* () {
113
113
  function a(l) {
114
114
  return Object.prototype.hasOwnProperty.apply(l, ["version"]);
115
115
  }
116
116
  const h = JSON.parse(JSON.stringify(t)), d = a(h) ? h.data : h, n = this.data;
117
- this.data = yield m(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, n), e && this.updateState(e, s), this.render();
117
+ this.data = yield m(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, n), i && this.updateState(i, s), this.render();
118
118
  });
119
119
  }
120
120
  show() {
121
121
  return c(this, arguments, function* (t = {}) {
122
122
  if (this.state.visible)
123
123
  return;
124
- const e = t.userAction !== void 0 ? t.userAction : !0;
125
- this.updateState({ visible: !0 }, e), this._show({ userAction: e });
124
+ const i = t.userAction !== void 0 ? t.userAction : !0;
125
+ this.updateState({ visible: !0 }, i), this._show({ userAction: i });
126
126
  });
127
127
  }
128
128
  hide() {
129
129
  return c(this, arguments, function* (t = {}) {
130
130
  if (!this.state.visible)
131
131
  return;
132
- const e = t.userAction !== void 0 ? t.userAction : !0;
133
- this.updateState({ visible: !1 }, e), this._hide({ userAction: e });
132
+ const i = t.userAction !== void 0 ? t.userAction : !0;
133
+ this.updateState({ visible: !1 }, i), this._hide({ userAction: i });
134
134
  });
135
135
  }
136
136
  enable(t = {}) {
137
137
  if (this.state.enabled)
138
138
  return;
139
- const e = t.userAction !== void 0 ? t.userAction : !0;
140
- this.updateState({ enabled: !0 }, t.userAction || e), this._enable({ userAction: e });
139
+ const i = t.userAction !== void 0 ? t.userAction : !0;
140
+ this.updateState({ enabled: !0 }, t.userAction || i), this._enable({ userAction: i });
141
141
  }
142
142
  disable(t = {}) {
143
143
  if (!this.state.enabled)
144
144
  return;
145
- const e = t.userAction !== void 0 ? t.userAction : !0;
146
- this.updateState({ enabled: !1 }, t.userAction || e), this._disable({ userAction: e });
145
+ const i = t.userAction !== void 0 ? t.userAction : !0;
146
+ this.updateState({ enabled: !1 }, t.userAction || i), this._disable({ userAction: i });
147
147
  }
148
148
  /** 更改插件 State */
149
- setState(t, e = {}) {
150
- const s = this.state, a = e.userAction !== void 0 ? e.userAction : !0;
149
+ setState(t, i = {}) {
150
+ const s = this.state, a = i.userAction !== void 0 ? i.userAction : !0;
151
151
  if (this.updateState(t, a), t.enabled !== void 0 && s.enabled !== t.enabled) {
152
152
  const h = { userAction: a };
153
153
  t.enabled ? this._enable(h) : this._disable(h);
@@ -159,10 +159,10 @@ class mt extends O {
159
159
  }
160
160
  /** 把插件的渲染DOM插入到对应的容器中去 */
161
161
  appendTo(t) {
162
- this.wrapper = t, this.render();
162
+ this.wrapper !== t && this.app && (this.app.$destroy(), this.app = void 0), this.wrapper = t, this.render();
163
163
  }
164
- changeConfigs(t, e = !0) {
165
- this.setState({ config: t }, { userAction: e }), this.render();
164
+ changeConfigs(t, i = !0) {
165
+ this.setState({ config: t }, { userAction: i }), this.render();
166
166
  }
167
167
  setExtraObjectsWith3DPositions(t) {
168
168
  this.data && (this.extraObjects = x(t, this.five, this.data), this.render());
@@ -173,31 +173,31 @@ class mt extends O {
173
173
  });
174
174
  }
175
175
  _enable(t) {
176
- const { userAction: e } = t;
177
- this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e });
176
+ const { userAction: i } = t;
177
+ this.hooks.emit("enable", { userAction: i }), this.state.visible && this._show({ userAction: i });
178
178
  }
179
179
  _show(t) {
180
180
  if (this.disposed || !this.state.enabled)
181
181
  return;
182
- const { userAction: e } = t;
183
- this.hooks.emit("show", { userAction: e }), this.render();
182
+ const { userAction: i } = t;
183
+ this.hooks.emit("show", { userAction: i }), this.render();
184
184
  }
185
185
  _hide(t) {
186
186
  if (this.disposed || !this.state.enabled)
187
187
  return;
188
- const { userAction: e } = t;
189
- this.hooks.emit("hide", { userAction: e }), this.render();
188
+ const { userAction: i } = t;
189
+ this.hooks.emit("hide", { userAction: i }), this.render();
190
190
  }
191
- updateState(t, e) {
191
+ updateState(t, i) {
192
192
  const s = this.state, a = t.config ? p(p({}, s.config), t.config) : s.config;
193
- this.state = f(p(p({}, this.state), t), { config: a }), !y(this.state, s, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: e });
193
+ this.state = f(p(p({}, this.state), t), { config: a }), !y(this.state, s, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: i });
194
194
  }
195
195
  render() {
196
196
  if (this.disposed || !this.state.enabled)
197
197
  return;
198
198
  if (!this.wrapper && this.wrapperSelector) {
199
- const e = document.querySelector(this.wrapperSelector);
200
- this.wrapper = e;
199
+ const i = document.querySelector(this.wrapperSelector);
200
+ this.wrapper = i;
201
201
  }
202
202
  if (!this.data || !this.wrapper)
203
203
  return;
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.12.0",
3
+ "%c %c@realsee/dnalogel %cv3.12.1",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
8
8
  "description": "如视 VR 看房插件合集",
9
9
  "private": false,
10
- "version": "3.12.0",
10
+ "version": "3.12.1",
11
11
  "license": "SEE LICENSE IN TERMS.txt",
12
12
  "scripts": {
13
13
  "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",