@roomle/embedding-lib 7.3.0-alpha.3 → 8.0.0-alpha.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/comlink-B2Kj_5Ge.mjs +206 -0
- package/comlink-B5lV2OWp.mjs +226 -0
- package/docs/md/web/embedding/CHANGELOG.md +62 -13
- package/{drag-ghost-DqF-SGUQ.mjs → drag-ghost-BxqPJdhq.mjs} +1 -1
- package/{drag-ghost-Rbgko27K.mjs → drag-ghost-CDFtC1pd.mjs} +1 -1
- package/{drag-in-DDGopCLr.mjs → drag-in-CV1E-DO6.mjs} +15 -9
- package/{drag-in-BCnrHxxt.mjs → drag-in-ClPpCYyi.mjs} +20 -14
- package/embedding-plugins.js +1 -1
- package/embedding-plugins.min.js +1 -1
- package/{from-custom-view-BxJkoaTB.mjs → from-custom-view-Q9A-J7qV.mjs} +31 -31
- package/{from-custom-view-CbO74qvE.mjs → from-custom-view-Sx6P6iDI.mjs} +30 -30
- package/{from-website-W-UZ3lee.mjs → from-website-BmCO2xli.mjs} +23 -23
- package/{from-website-D07qrmeq.mjs → from-website-DZJy_l42.mjs} +23 -23
- package/hi.js +3 -3
- package/hi.min.js +3 -3
- package/package.json +1 -1
- package/packages/embedding-lib/src/roomle-embedding-lib.d.ts +0 -3
- package/roomle-embedding-lib.js +83 -94
- package/roomle-embedding-lib.min.js +75 -86
- package/comlink-BipJ8Ikr.mjs +0 -237
- package/comlink-Dds_bpug.mjs +0 -220
- package/rolldown-runtime-C-QNzSnW.mjs +0 -11
- package/rolldown-runtime-C017PlDO.mjs +0 -9
- /package/{browser-DRgK3Fk8.mjs → browser-BxG7yIaK.mjs} +0 -0
- /package/{browser-C_Dfiou7.mjs → browser-CW9o-dtT.mjs} +0 -0
- /package/{utils-i2eOrtnv.mjs → utils-DxJ3PcKe.mjs} +0 -0
- /package/{utils-Co3lE-Ji.mjs → utils-wJ80awOA.mjs} +0 -0
package/roomle-embedding-lib.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./browser-C_Dfiou7.mjs";
|
|
3
|
-
import { t as n } from "./utils-i2eOrtnv.mjs";
|
|
1
|
+
import { t as e } from "./browser-CW9o-dtT.mjs";
|
|
4
2
|
//#region packages/common/src/utils/message-handler.ts
|
|
5
|
-
var
|
|
3
|
+
var t = class {
|
|
6
4
|
_side;
|
|
7
5
|
_incomingMessageBus = null;
|
|
8
6
|
_outgoingMessageBus = null;
|
|
@@ -68,37 +66,37 @@ var r = class {
|
|
|
68
66
|
}
|
|
69
67
|
return e.message = this._side + ": " + e.message, console.error(e), e.message;
|
|
70
68
|
}
|
|
71
|
-
},
|
|
69
|
+
}, n = () => {
|
|
72
70
|
try {
|
|
73
71
|
return window.self !== window.top;
|
|
74
72
|
} catch {
|
|
75
73
|
return !0;
|
|
76
74
|
}
|
|
77
|
-
},
|
|
75
|
+
}, r = [
|
|
78
76
|
"127.0.0.1",
|
|
79
77
|
"localhost",
|
|
80
78
|
"0.0.0.0"
|
|
81
|
-
],
|
|
82
|
-
let e =
|
|
79
|
+
], i = () => {
|
|
80
|
+
let e = n(), t = window.location.href;
|
|
83
81
|
if (e) {
|
|
84
82
|
if (!document.referrer) return null;
|
|
85
83
|
t = document.referrer;
|
|
86
84
|
}
|
|
87
|
-
let { hostname:
|
|
88
|
-
return
|
|
89
|
-
},
|
|
85
|
+
let { hostname: r } = new URL(t);
|
|
86
|
+
return r;
|
|
87
|
+
}, a = (e) => {
|
|
90
88
|
let t = /* @__PURE__ */ new RegExp(/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/);
|
|
91
|
-
return !!(
|
|
92
|
-
},
|
|
89
|
+
return !!(r.includes(e) || t.test(e) || e.endsWith("roomle.com") || e.endsWith("gitlab.io") || e.endsWith("gitlab.com"));
|
|
90
|
+
}, o = (e, t) => s(JSON.parse(JSON.stringify(e)), t), s = (e, t) => {
|
|
93
91
|
for (let n in t) try {
|
|
94
|
-
t[n].constructor === Object ? e[n] =
|
|
92
|
+
t[n].constructor === Object ? e[n] = s(e[n], t[n]) : e[n] = t[n];
|
|
95
93
|
} catch {
|
|
96
94
|
e[n] = t[n];
|
|
97
95
|
}
|
|
98
96
|
return e;
|
|
99
|
-
},
|
|
97
|
+
}, c = /* @__PURE__ */ function(e) {
|
|
100
98
|
return e.BOTTOM_BAR = "bottom_bar", e.PARTLIST_BOUNDS = "partlist_bounds", e.INTERACTION_NOTES = "interaction_notes", e.PARAMETER_GROUPS = "parameter_groups", e;
|
|
101
|
-
}({}),
|
|
99
|
+
}({}), l = (e) => JSON.parse(JSON.stringify(e)), u = {
|
|
102
100
|
mobileLandscape: !0,
|
|
103
101
|
floorMaterialRootTag: "materials_root",
|
|
104
102
|
buttons: {
|
|
@@ -108,7 +106,7 @@ var r = class {
|
|
|
108
106
|
load_product: !0,
|
|
109
107
|
partlist_print: !0
|
|
110
108
|
},
|
|
111
|
-
elements: { [
|
|
109
|
+
elements: { [c.INTERACTION_NOTES]: !0 },
|
|
112
110
|
helpcenter: {
|
|
113
111
|
roomdesigner: !0,
|
|
114
112
|
configurator: !1,
|
|
@@ -127,32 +125,32 @@ var r = class {
|
|
|
127
125
|
},
|
|
128
126
|
rotationSnapDegrees: 10,
|
|
129
127
|
interactionsCollapsed: !1
|
|
130
|
-
},
|
|
128
|
+
}, d = (e) => (p(e), e?.customApiUrl && (e.customApiUrl = decodeURIComponent(e.customApiUrl)), e.shareUrl && (e.deeplink = e.shareUrl.replace(h, g)), e), f = (e) => e.trim() !== "" && Number.isFinite(Number(e.trim())), p = (e) => {
|
|
131
129
|
if (!e || typeof e != "object") return;
|
|
132
130
|
let t = Object.keys(e);
|
|
133
131
|
for (let n of t) {
|
|
134
132
|
let t = e[n];
|
|
135
|
-
if (!Array.isArray(t) && typeof t == "object" && t &&
|
|
136
|
-
t === "true" || t === "false" ? e[n] = t === "true" : typeof t == "string" &&
|
|
133
|
+
if (!Array.isArray(t) && typeof t == "object" && t && p(t), Array.isArray(t)) for (let e of t) p(e);
|
|
134
|
+
t === "true" || t === "false" ? e[n] = t === "true" : typeof t == "string" && f(t) && (e[n] = Number(t));
|
|
137
135
|
}
|
|
138
|
-
},
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
let n =
|
|
142
|
-
return n &&
|
|
143
|
-
},
|
|
136
|
+
}, m = () => {
|
|
137
|
+
let t = l(u);
|
|
138
|
+
t.locale ||= e(null, !0), t.id === "(idle)" && delete t.id;
|
|
139
|
+
let n = i();
|
|
140
|
+
return n && a(n) && (t.configuratorId = "demoConfigurator"), t.customApiUrl = "https://rubens.alpha.roomle.com/api/v2", t.emails = !1, t;
|
|
141
|
+
}, h = "<CONF_ID>", g = "#CONFIGURATIONID#", _ = (e) => {
|
|
144
142
|
let t = e.featureFlags;
|
|
145
143
|
if (!t || typeof t != "object" || Array.isArray(t)) return;
|
|
146
144
|
let n = t;
|
|
147
145
|
"enableTwoLevelCatalog" in n && typeof n.enableTwoLevelCatalog == "boolean" && (e.enableTwoLevelCatalog === !1 || e.enableTwoLevelCatalog === void 0) && (e.enableTwoLevelCatalog = n.enableTwoLevelCatalog), "webGpu" in n && typeof n.webGpu == "boolean" && (e.webGpu === !1 || e.webGpu === void 0) && (e.webGpu = n.webGpu);
|
|
148
|
-
},
|
|
146
|
+
}, v = (e) => {
|
|
149
147
|
e.featureFlags ||= {}, typeof e.featureFlags.realPartList != "boolean" && (e.featureFlags.realPartList = !0), typeof e.featureFlags.globalCallbacks != "boolean" && (e.featureFlags.globalCallbacks = !0), typeof e.featureFlags.mocAr != "boolean" && (e.featureFlags.mocAr = !1);
|
|
150
|
-
},
|
|
151
|
-
let n =
|
|
152
|
-
|
|
153
|
-
let i =
|
|
154
|
-
return i.configuratorId = e.id, !i.overrideTenant && e.tenant && (i.overrideTenant = e.tenant),
|
|
155
|
-
},
|
|
148
|
+
}, y = (e, t) => {
|
|
149
|
+
let n = l(t), r = m();
|
|
150
|
+
v(r);
|
|
151
|
+
let i = o(o(r, e.settings || {}), n);
|
|
152
|
+
return i.configuratorId = e.id, !i.overrideTenant && e.tenant && (i.overrideTenant = e.tenant), _(i), i;
|
|
153
|
+
}, b = () => /(android)/i.test(navigator.userAgent), x = class {
|
|
156
154
|
_messageHandler = null;
|
|
157
155
|
isSetupDone = !1;
|
|
158
156
|
viewName = "main";
|
|
@@ -194,7 +192,7 @@ var r = class {
|
|
|
194
192
|
setupPlugins(e, t, n = "website") {
|
|
195
193
|
for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
|
|
196
194
|
try {
|
|
197
|
-
import("./drag-in-
|
|
195
|
+
import("./drag-in-ClPpCYyi.mjs").then((e) => e.n).then(({ DragIn: i }) => {
|
|
198
196
|
let a = new i(this.ui, t, n, this.viewName);
|
|
199
197
|
a.init().then(() => {
|
|
200
198
|
this.plugins.dragIn = a, e();
|
|
@@ -216,7 +214,7 @@ var r = class {
|
|
|
216
214
|
}
|
|
217
215
|
}));
|
|
218
216
|
}
|
|
219
|
-
},
|
|
217
|
+
}, S = () => {
|
|
220
218
|
let e, t;
|
|
221
219
|
return {
|
|
222
220
|
promise: new Promise((n, r) => {
|
|
@@ -225,7 +223,7 @@ var r = class {
|
|
|
225
223
|
resolve: e,
|
|
226
224
|
reject: t
|
|
227
225
|
};
|
|
228
|
-
},
|
|
226
|
+
}, C = {
|
|
229
227
|
SDK: "extended",
|
|
230
228
|
CONFIGURATOR_SDK: "configurator",
|
|
231
229
|
CALLBACKS: "callbacks",
|
|
@@ -233,20 +231,20 @@ var r = class {
|
|
|
233
231
|
ANALYTICS: "analytics",
|
|
234
232
|
GLOBAL: "global",
|
|
235
233
|
RAPI: "rapi"
|
|
236
|
-
},
|
|
234
|
+
}, w = ".", T = C.SDK + "." + C.CALLBACKS, E = {
|
|
237
235
|
REQUEST_BOOT: "requestBoot",
|
|
238
236
|
SETUP: "setup",
|
|
239
237
|
WEBSITE_READY: "websiteReady"
|
|
240
|
-
},
|
|
238
|
+
}, D = {
|
|
241
239
|
GET_METHODS: "getMethods",
|
|
242
240
|
RETURN_METHODS: "returnMethods",
|
|
243
241
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
244
242
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
245
|
-
},
|
|
243
|
+
}, O = ["constructor", "callbacks"], k = (e) => e[0] !== "_" && !O.includes(e), A = (e, t, n = !1) => {
|
|
246
244
|
if (!e) return [];
|
|
247
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
248
|
-
return r.filter(
|
|
249
|
-
},
|
|
245
|
+
let r = Object.getOwnPropertyNames(e), i = n ? C.CALLBACKS + "." : "";
|
|
246
|
+
return r.filter(k).map((e) => t + "." + i + e);
|
|
247
|
+
}, j = async (e, t) => {
|
|
250
248
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
251
249
|
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = n + "/configurators/" + e, a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
|
|
252
250
|
method: "GET",
|
|
@@ -263,7 +261,7 @@ var r = class {
|
|
|
263
261
|
cache: "default"
|
|
264
262
|
}), { configurator: s } = await (await fetch(o)).json();
|
|
265
263
|
return s;
|
|
266
|
-
},
|
|
264
|
+
}, M = "data-rml-interaction-container", N = (e, t, n) => {
|
|
267
265
|
let r = null;
|
|
268
266
|
Object.defineProperty(e, t, {
|
|
269
267
|
get() {
|
|
@@ -273,39 +271,39 @@ var r = class {
|
|
|
273
271
|
e?.mute ? r = e.value : (console.warn("You override Roomle defined behaviour. To disalbe this warning pass in an object with the following properties"), console.warn("{ mute: true, value: () => void }"), r = e);
|
|
274
272
|
}
|
|
275
273
|
});
|
|
276
|
-
},
|
|
277
|
-
e && setTimeout(() => e.style.setProperty(
|
|
278
|
-
},
|
|
274
|
+
}, P = () => window.innerHeight * .01 + "px", F = (e) => {
|
|
275
|
+
e && setTimeout(() => e.style.setProperty(R, P()), 0);
|
|
276
|
+
}, I = "rml-styles", L = 450, R = "--rml-full-height", z = {
|
|
279
277
|
CONTAINER: "rml-container",
|
|
280
278
|
FILL: "rml-fill",
|
|
281
279
|
POSITION: "rml-pos",
|
|
282
280
|
TRANSITION: "rml-transition",
|
|
283
281
|
ANDROID_HEIGHT: "rml-android-height",
|
|
284
282
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
285
|
-
},
|
|
283
|
+
}, B = /* @__PURE__ */ new Map(), V = class extends x {
|
|
286
284
|
static createPlanner(e, t, n, r = []) {
|
|
287
285
|
return this._create(e, t, n, r);
|
|
288
286
|
}
|
|
289
|
-
static async connect(e,
|
|
290
|
-
let
|
|
291
|
-
|
|
292
|
-
let { resolve: i, promise: a } =
|
|
287
|
+
static async connect(e, n = []) {
|
|
288
|
+
let r = new x();
|
|
289
|
+
r.viewName = e;
|
|
290
|
+
let { resolve: i, promise: a } = S(), { resolve: o, promise: s } = S(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
293
291
|
switch (e) {
|
|
294
|
-
case
|
|
292
|
+
case D.REGISTER_CUSTOM_VIEW_DONE:
|
|
295
293
|
i();
|
|
296
294
|
break;
|
|
297
|
-
case
|
|
298
|
-
|
|
295
|
+
case D.RETURN_METHODS:
|
|
296
|
+
r.handleSetup(t[0]), o();
|
|
299
297
|
break;
|
|
300
|
-
default: if (
|
|
298
|
+
default: if (r.isSetupDone) return r.executeMessage({
|
|
301
299
|
message: e,
|
|
302
300
|
args: t
|
|
303
301
|
});
|
|
304
302
|
}
|
|
305
303
|
});
|
|
306
|
-
|
|
304
|
+
r.setMessageHandler(c);
|
|
307
305
|
let l = [e];
|
|
308
|
-
return c.sendMessage(
|
|
306
|
+
return c.sendMessage(D.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(D.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
|
|
309
307
|
}
|
|
310
308
|
static createConfigurator(e, t, n, r = []) {
|
|
311
309
|
return this._create(e, t, n, r);
|
|
@@ -316,23 +314,14 @@ var r = class {
|
|
|
316
314
|
static createViewer(e, t, n, r = []) {
|
|
317
315
|
return this._create(e, t, n, r);
|
|
318
316
|
}
|
|
319
|
-
static hiMessageHandler = null;
|
|
320
|
-
static setupHi(t) {
|
|
321
|
-
console.warn("[DEPRECATED] RoomleEmbeddingApi.setupHi() is deprecated and will be removed.\nMigration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryIdOrOptions, callbacks);"), this.hiMessageHandler && window.removeEventListener("message", this.hiMessageHandler), this.hiMessageHandler = (r) => {
|
|
322
|
-
if (r.data.type === "connect_hi" && r.data.port) {
|
|
323
|
-
let i = r.data.port;
|
|
324
|
-
i.start?.(), e(n(t), i);
|
|
325
|
-
}
|
|
326
|
-
}, window.addEventListener("message", this.hiMessageHandler);
|
|
327
|
-
}
|
|
328
317
|
static async _create(e, t, n, r) {
|
|
329
318
|
return new Promise(async (i, a) => {
|
|
330
319
|
try {
|
|
331
|
-
let a =
|
|
332
|
-
|
|
333
|
-
let
|
|
334
|
-
n =
|
|
335
|
-
let l = new this(
|
|
320
|
+
let a = d(n), s = m();
|
|
321
|
+
v(s);
|
|
322
|
+
let c = await j(e, o(s, a));
|
|
323
|
+
n = y(c, a);
|
|
324
|
+
let l = new this(c, t, n, r, i);
|
|
336
325
|
return await Promise.allSettled(l.pluginsLoaded), l;
|
|
337
326
|
} catch (e) {
|
|
338
327
|
return a(e);
|
|
@@ -344,53 +333,53 @@ var r = class {
|
|
|
344
333
|
_configuratorSettings;
|
|
345
334
|
_initData = {};
|
|
346
335
|
_iframe;
|
|
347
|
-
constructor(e,
|
|
336
|
+
constructor(e, n, r, i, a) {
|
|
348
337
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
349
|
-
if (
|
|
350
|
-
if (!document.getElementById(
|
|
351
|
-
let e =
|
|
352
|
-
t.type = "text/css", t.id =
|
|
353
|
-
let
|
|
338
|
+
if (B.has(n)) throw Error("There is already an instance on this DOM element");
|
|
339
|
+
if (!document.getElementById(I)) {
|
|
340
|
+
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
341
|
+
t.type = "text/css", t.id = I;
|
|
342
|
+
let n = "transition:all ease-in-out " + L + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = P();
|
|
354
343
|
t.innerHTML = `
|
|
355
|
-
.${
|
|
356
|
-
.${
|
|
357
|
-
.${
|
|
358
|
-
.${
|
|
359
|
-
.${
|
|
360
|
-
.${
|
|
344
|
+
.${z.CONTAINER}{${R}:${a};}
|
|
345
|
+
.${z.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
|
|
346
|
+
.${z.TRANSITION}{${i}}
|
|
347
|
+
.${z.FILL}{width:100%;height:100%;opacity:1}
|
|
348
|
+
.${z.ANDROID_HEIGHT}{height:calc(var(${R},1vh)*100)}
|
|
349
|
+
.${z.OVERFLOW_HIDDEN}{overflow:hidden}
|
|
361
350
|
`, document.head.appendChild(t);
|
|
362
351
|
}
|
|
363
352
|
this._executeMessage = this._executeMessage.bind(this);
|
|
364
|
-
let o = new
|
|
365
|
-
this.setMessageHandler(o), this._onResize = this._onResize.bind(this),
|
|
353
|
+
let o = new t("website", window, null, this._executeMessage);
|
|
354
|
+
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), b() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
366
355
|
let s = this._createIframe();
|
|
367
|
-
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe),
|
|
356
|
+
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), B.set(n, !0);
|
|
368
357
|
}
|
|
369
358
|
teardown() {
|
|
370
|
-
this._container &&
|
|
359
|
+
this._container && B.delete(this._container);
|
|
371
360
|
let e = this._container.querySelector("iframe");
|
|
372
361
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
373
362
|
}
|
|
374
363
|
_createIframe() {
|
|
375
364
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
376
|
-
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(
|
|
365
|
+
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(z.CONTAINER), e.classList.add(z.FILL), e;
|
|
377
366
|
}
|
|
378
367
|
_onResize() {
|
|
379
|
-
|
|
368
|
+
F(this._iframe);
|
|
380
369
|
}
|
|
381
370
|
_onUseFullPage() {
|
|
382
|
-
this._iframe.classList.add(
|
|
371
|
+
this._iframe.classList.add(z.POSITION), document.documentElement.classList.add(z.OVERFLOW_HIDDEN), window.document.body.classList.add(z.OVERFLOW_HIDDEN), b() && (F(this._iframe), this._iframe.classList.add(z.ANDROID_HEIGHT));
|
|
383
372
|
}
|
|
384
373
|
_onBackToWebsite() {
|
|
385
|
-
this._iframe.classList.remove(
|
|
374
|
+
this._iframe.classList.remove(z.POSITION), this._iframe.classList.remove(z.ANDROID_HEIGHT), document.documentElement.classList.remove(z.OVERFLOW_HIDDEN), window.document.body.classList.remove(z.OVERFLOW_HIDDEN);
|
|
386
375
|
}
|
|
387
376
|
_executeMessage({ message: e, args: t }, n) {
|
|
388
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
377
|
+
if (n.source && n.source === this._iframe?.contentWindow) return e === E.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === E.SETUP ? (this.handleSetup(t[0]), N(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), N(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
|
|
389
378
|
if (!this._messageHandler) {
|
|
390
379
|
console.error("MessageHandler not set");
|
|
391
380
|
return;
|
|
392
381
|
}
|
|
393
|
-
this._messageHandler.sendMessage(
|
|
382
|
+
this._messageHandler.sendMessage(E.WEBSITE_READY);
|
|
394
383
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
395
384
|
message: e,
|
|
396
385
|
args: t
|
|
@@ -398,4 +387,4 @@ var r = class {
|
|
|
398
387
|
}
|
|
399
388
|
};
|
|
400
389
|
//#endregion
|
|
401
|
-
export {
|
|
390
|
+
export { E as HANDSHAKE_MESSAGES, M as INTERACTION_CONTAINER_SELECTOR, C as NAMESPACE, w as NAMESPACE_SEPARATOR, T as SDK_CALLBACK, D as WELL_KNOWN_MESSAGES, V as default, j as getConfiguratorSettings, A as getMethodNames, k as isExposable };
|