@roomle/embedding-lib 6.5.0 → 6.6.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/docs/md/web/embedding/CHANGELOG.md +186 -150
- package/package.json +1 -1
- package/roomle-embedding-lib.js +191 -184
- package/roomle-embedding-lib.min.js +1 -1
|
@@ -1,151 +1,187 @@
|
|
|
1
|
-
## 6.
|
|
1
|
+
## 6.6.0-alpha.1 (2026-04-01)
|
|
2
2
|
|
|
3
|
-
* Initial plan ([
|
|
4
|
-
* Initial plan ([
|
|
5
|
-
*
|
|
6
|
-
* Merge branch 'master' into chore/
|
|
7
|
-
* Merge branch 'master' into
|
|
8
|
-
* Merge branch 'master' into copilot/
|
|
9
|
-
* Merge branch 'master' into copilot/
|
|
10
|
-
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([
|
|
11
|
-
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([
|
|
12
|
-
* Merge branch 'master' into copilot/upgrade-web-sdk-
|
|
13
|
-
* Merge branch 'master' into
|
|
14
|
-
* Merge branch 'master' into feat/
|
|
15
|
-
* Merge branch 'master' into feat/
|
|
16
|
-
* Merge branch 'master' into feat/
|
|
17
|
-
* Merge branch 'master' into
|
|
18
|
-
* Merge branch 'master' into
|
|
19
|
-
* Merge branch 'master' into
|
|
20
|
-
* Merge branch 'master' into
|
|
21
|
-
* Merge branch 'master' into
|
|
22
|
-
* Merge branch 'master' into
|
|
23
|
-
* Merge branch 'master' into fix/
|
|
24
|
-
* Merge branch 'master' into fix/
|
|
25
|
-
* Merge branch 'master' into fix/
|
|
26
|
-
* Merge branch 'master' into fix/
|
|
27
|
-
* Merge branch 'master' into fix/
|
|
28
|
-
* Merge branch 'master' into fix/
|
|
29
|
-
* Merge branch 'master' into fix/
|
|
30
|
-
* Merge branch 'master' into fix/
|
|
31
|
-
* Merge branch 'master' into fix/
|
|
32
|
-
* Merge branch 'master' into fix/
|
|
33
|
-
* Merge branch 'master' into fix/
|
|
34
|
-
* Merge branch 'master' into
|
|
35
|
-
* Merge
|
|
36
|
-
* Merge
|
|
37
|
-
* Merge
|
|
38
|
-
* Merge pull request #
|
|
39
|
-
* Merge pull request #
|
|
40
|
-
* Merge pull request #
|
|
41
|
-
* Merge pull request #
|
|
42
|
-
* Merge pull request #
|
|
43
|
-
* Merge pull request #
|
|
44
|
-
* Merge pull request #
|
|
45
|
-
* Merge pull request #
|
|
46
|
-
* Merge pull request #
|
|
47
|
-
* Merge pull request #
|
|
48
|
-
* Merge pull request #
|
|
49
|
-
* Merge pull request #
|
|
50
|
-
* Merge pull request #
|
|
51
|
-
* Merge pull request #
|
|
52
|
-
* Merge pull request #
|
|
53
|
-
* Merge pull request #
|
|
54
|
-
* Merge pull request #
|
|
55
|
-
* Merge pull request #
|
|
56
|
-
* Merge pull request #
|
|
57
|
-
* Merge pull request #
|
|
58
|
-
* Merge pull request #
|
|
59
|
-
* Merge pull request #
|
|
60
|
-
* Merge pull request #
|
|
61
|
-
* Merge pull request #
|
|
62
|
-
* Merge pull request #
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* feat(core)
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
3
|
+
* Initial plan ([c221a59](https://github.com/roomle-dev/roomle-ui/commit/c221a59))
|
|
4
|
+
* Initial plan ([3be9f24](https://github.com/roomle-dev/roomle-ui/commit/3be9f24))
|
|
5
|
+
* Initial plan ([3c0082b](https://github.com/roomle-dev/roomle-ui/commit/3c0082b))
|
|
6
|
+
* Merge branch 'master' into chore/remove-interior-lights-feature-flag ([6f2af50](https://github.com/roomle-dev/roomle-ui/commit/6f2af50))
|
|
7
|
+
* Merge branch 'master' into ci/update-github-actions ([3554c89](https://github.com/roomle-dev/roomle-ui/commit/3554c89))
|
|
8
|
+
* Merge branch 'master' into copilot/strict-null-checks-phase-3b-rapi-access ([3127c9b](https://github.com/roomle-dev/roomle-ui/commit/3127c9b))
|
|
9
|
+
* Merge branch 'master' into copilot/strict-null-checks-phase-4 ([17e4b52](https://github.com/roomle-dev/roomle-ui/commit/17e4b52))
|
|
10
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([f6f18db](https://github.com/roomle-dev/roomle-ui/commit/f6f18db))
|
|
11
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([f7227b4](https://github.com/roomle-dev/roomle-ui/commit/f7227b4))
|
|
12
|
+
* Merge branch 'master' into copilot/upgrade-web-sdk-typescript-strict-null-checks ([a1e1db9](https://github.com/roomle-dev/roomle-ui/commit/a1e1db9))
|
|
13
|
+
* Merge branch 'master' into feat(core)/upgrade-to-version-2.73.0-alpha.9 ([0b8df89](https://github.com/roomle-dev/roomle-ui/commit/0b8df89))
|
|
14
|
+
* Merge branch 'master' into feat/new-measurements ([97a9908](https://github.com/roomle-dev/roomle-ui/commit/97a9908))
|
|
15
|
+
* Merge branch 'master' into feat/new-measurements ([ce88e77](https://github.com/roomle-dev/roomle-ui/commit/ce88e77))
|
|
16
|
+
* Merge branch 'master' into feat/new-measurements ([b5f3d86](https://github.com/roomle-dev/roomle-ui/commit/b5f3d86))
|
|
17
|
+
* Merge branch 'master' into feat/threejs183 ([18f9fcc](https://github.com/roomle-dev/roomle-ui/commit/18f9fcc))
|
|
18
|
+
* Merge branch 'master' into feat/threejs183 ([48f5b55](https://github.com/roomle-dev/roomle-ui/commit/48f5b55))
|
|
19
|
+
* Merge branch 'master' into feat/types-qa-known-breaks-allowlist-RML-16355 ([8d7ab5e](https://github.com/roomle-dev/roomle-ui/commit/8d7ab5e))
|
|
20
|
+
* Merge branch 'master' into feat/types-qa-known-breaks-allowlist-RML-16355 ([63b34f7](https://github.com/roomle-dev/roomle-ui/commit/63b34f7))
|
|
21
|
+
* Merge branch 'master' into feat/types-qa-known-breaks-allowlist-RML-16355 ([8cd1f7d](https://github.com/roomle-dev/roomle-ui/commit/8cd1f7d))
|
|
22
|
+
* Merge branch 'master' into feat/types-qa-known-breaks-allowlist-RML-16355 ([28ad8a7](https://github.com/roomle-dev/roomle-ui/commit/28ad8a7))
|
|
23
|
+
* Merge branch 'master' into fix/catalogRootTags-url-order-sort-RML-16333 ([66bbc34](https://github.com/roomle-dev/roomle-ui/commit/66bbc34))
|
|
24
|
+
* Merge branch 'master' into fix/catalogRootTags-url-order-sort-RML-16333 ([adff8ec](https://github.com/roomle-dev/roomle-ui/commit/adff8ec))
|
|
25
|
+
* Merge branch 'master' into fix/catalogRootTags-url-order-sort-RML-16333 ([ec2f0af](https://github.com/roomle-dev/roomle-ui/commit/ec2f0af))
|
|
26
|
+
* Merge branch 'master' into fix/console-error ([8aa3851](https://github.com/roomle-dev/roomle-ui/commit/8aa3851))
|
|
27
|
+
* Merge branch 'master' into fix/console-error ([b1f4779](https://github.com/roomle-dev/roomle-ui/commit/b1f4779))
|
|
28
|
+
* Merge branch 'master' into fix/element-preview-mobile-overflow-RML-16256 ([abf8736](https://github.com/roomle-dev/roomle-ui/commit/abf8736))
|
|
29
|
+
* Merge branch 'master' into fix/element-preview-mobile-overflow-RML-16256 ([ca211fa](https://github.com/roomle-dev/roomle-ui/commit/ca211fa))
|
|
30
|
+
* Merge branch 'master' into fix/merge-undo-redo ([2817a1f](https://github.com/roomle-dev/roomle-ui/commit/2817a1f))
|
|
31
|
+
* Merge branch 'master' into fix/Parametergroup-problem-RML-16304 ([9d9b462](https://github.com/roomle-dev/roomle-ui/commit/9d9b462))
|
|
32
|
+
* Merge branch 'master' into fix/scrolling-chain-RML-16303 ([632acfa](https://github.com/roomle-dev/roomle-ui/commit/632acfa))
|
|
33
|
+
* Merge branch 'master' into fix/sort-for-level1-RML-16400 ([ef9a540](https://github.com/roomle-dev/roomle-ui/commit/ef9a540))
|
|
34
|
+
* Merge branch 'master' into fix/undo-redo ([41224ee](https://github.com/roomle-dev/roomle-ui/commit/41224ee))
|
|
35
|
+
* Merge branch 'master' into fix/wrong-parameter-label-RML-16109 ([069aaf0](https://github.com/roomle-dev/roomle-ui/commit/069aaf0))
|
|
36
|
+
* Merge branch 'master' into fix/wrong-parameter-label-RML-16109 ([9f6fb91](https://github.com/roomle-dev/roomle-ui/commit/9f6fb91))
|
|
37
|
+
* Merge branch 'master' into fix/zoom-factor-switch-to-3d ([e811498](https://github.com/roomle-dev/roomle-ui/commit/e811498))
|
|
38
|
+
* Merge pull request #2399 from roomle-dev/fix/element-preview-mobile-overflow-RML-16256 ([947f71e](https://github.com/roomle-dev/roomle-ui/commit/947f71e)), closes [#2399](https://github.com/roomle-dev/roomle-ui/issues/2399)
|
|
39
|
+
* Merge pull request #2400 from roomle-dev/feat/new-measurements ([8c7bb10](https://github.com/roomle-dev/roomle-ui/commit/8c7bb10)), closes [#2400](https://github.com/roomle-dev/roomle-ui/issues/2400)
|
|
40
|
+
* Merge pull request #2412 from roomle-dev/fix/undo-redo ([540fc45](https://github.com/roomle-dev/roomle-ui/commit/540fc45)), closes [#2412](https://github.com/roomle-dev/roomle-ui/issues/2412)
|
|
41
|
+
* Merge pull request #2413 from roomle-dev/fix/console-error ([0ddff1f](https://github.com/roomle-dev/roomle-ui/commit/0ddff1f)), closes [#2413](https://github.com/roomle-dev/roomle-ui/issues/2413)
|
|
42
|
+
* Merge pull request #2416 from roomle-dev/fix/article-label-and-image ([1a30ac2](https://github.com/roomle-dev/roomle-ui/commit/1a30ac2)), closes [#2416](https://github.com/roomle-dev/roomle-ui/issues/2416)
|
|
43
|
+
* Merge pull request #2418 from roomle-dev/copilot/upgrade-web-sdk-to-strict-null-checks ([a753cdd](https://github.com/roomle-dev/roomle-ui/commit/a753cdd)), closes [#2418](https://github.com/roomle-dev/roomle-ui/issues/2418)
|
|
44
|
+
* Merge pull request #2419 from roomle-dev/fix/scrolling-chain-RML-16303 ([6de078e](https://github.com/roomle-dev/roomle-ui/commit/6de078e)), closes [#2419](https://github.com/roomle-dev/roomle-ui/issues/2419)
|
|
45
|
+
* Merge pull request #2420 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.13 ([52f2f2d](https://github.com/roomle-dev/roomle-ui/commit/52f2f2d)), closes [#2420](https://github.com/roomle-dev/roomle-ui/issues/2420)
|
|
46
|
+
* Merge pull request #2421 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.14 ([5b8b082](https://github.com/roomle-dev/roomle-ui/commit/5b8b082)), closes [#2421](https://github.com/roomle-dev/roomle-ui/issues/2421)
|
|
47
|
+
* Merge pull request #2424 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.1 ([7af2303](https://github.com/roomle-dev/roomle-ui/commit/7af2303)), closes [#2424](https://github.com/roomle-dev/roomle-ui/issues/2424)
|
|
48
|
+
* Merge pull request #2425 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.2 ([4fc863d](https://github.com/roomle-dev/roomle-ui/commit/4fc863d)), closes [#2425](https://github.com/roomle-dev/roomle-ui/issues/2425)
|
|
49
|
+
* Merge pull request #2426 from roomle-dev/fix/hi-dragging-objects-disconnect ([b3a22d5](https://github.com/roomle-dev/roomle-ui/commit/b3a22d5)), closes [#2426](https://github.com/roomle-dev/roomle-ui/issues/2426)
|
|
50
|
+
* Merge pull request #2427 from roomle-dev/copilot/upgrade-web-sdk-to-strict-null-checks ([a518325](https://github.com/roomle-dev/roomle-ui/commit/a518325)), closes [#2427](https://github.com/roomle-dev/roomle-ui/issues/2427)
|
|
51
|
+
* Merge pull request #2428 from roomle-dev/copilot/strict-null-checks-phase-3b-rapi-access ([63e0ee7](https://github.com/roomle-dev/roomle-ui/commit/63e0ee7)), closes [#2428](https://github.com/roomle-dev/roomle-ui/issues/2428)
|
|
52
|
+
* Merge pull request #2429 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.3 ([c615525](https://github.com/roomle-dev/roomle-ui/commit/c615525)), closes [#2429](https://github.com/roomle-dev/roomle-ui/issues/2429)
|
|
53
|
+
* Merge pull request #2430 from roomle-dev/fix/catalogRootTags-url-order-sort-RML-16333 ([40ffb54](https://github.com/roomle-dev/roomle-ui/commit/40ffb54)), closes [#2430](https://github.com/roomle-dev/roomle-ui/issues/2430)
|
|
54
|
+
* Merge pull request #2431 from roomle-dev/fix/Parametergroup-problem-RML-16304 ([f3f4030](https://github.com/roomle-dev/roomle-ui/commit/f3f4030)), closes [#2431](https://github.com/roomle-dev/roomle-ui/issues/2431)
|
|
55
|
+
* Merge pull request #2432 from roomle-dev/fix/reEnableDimensionsOnUndoRedo ([a664cc2](https://github.com/roomle-dev/roomle-ui/commit/a664cc2)), closes [#2432](https://github.com/roomle-dev/roomle-ui/issues/2432)
|
|
56
|
+
* Merge pull request #2433 from roomle-dev/copilot/strict-null-checks-phase-4 ([9ef4db3](https://github.com/roomle-dev/roomle-ui/commit/9ef4db3)), closes [#2433](https://github.com/roomle-dev/roomle-ui/issues/2433)
|
|
57
|
+
* Merge pull request #2434 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.4 ([3aa67d3](https://github.com/roomle-dev/roomle-ui/commit/3aa67d3)), closes [#2434](https://github.com/roomle-dev/roomle-ui/issues/2434)
|
|
58
|
+
* Merge pull request #2435 from roomle-dev/feat/types-qa-known-breaks-allowlist-RML-16355 ([39ba5a7](https://github.com/roomle-dev/roomle-ui/commit/39ba5a7)), closes [#2435](https://github.com/roomle-dev/roomle-ui/issues/2435)
|
|
59
|
+
* Merge pull request #2436 from roomle-dev/fix/zoom-factor-switch-to-3d ([1f36f01](https://github.com/roomle-dev/roomle-ui/commit/1f36f01)), closes [#2436](https://github.com/roomle-dev/roomle-ui/issues/2436)
|
|
60
|
+
* Merge pull request #2437 from roomle-dev/copilot/upgrade-web-sdk-typescript-strict-null-checks ([bbb4fa9](https://github.com/roomle-dev/roomle-ui/commit/bbb4fa9)), closes [#2437](https://github.com/roomle-dev/roomle-ui/issues/2437)
|
|
61
|
+
* Merge pull request #2438 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.5 ([02103b9](https://github.com/roomle-dev/roomle-ui/commit/02103b9)), closes [#2438](https://github.com/roomle-dev/roomle-ui/issues/2438)
|
|
62
|
+
* Merge pull request #2439 from roomle-dev/fix/merge-undo-redo ([f2321c9](https://github.com/roomle-dev/roomle-ui/commit/f2321c9)), closes [#2439](https://github.com/roomle-dev/roomle-ui/issues/2439)
|
|
63
|
+
* Merge pull request #2440 from roomle-dev/ci/update-github-actions ([aabb054](https://github.com/roomle-dev/roomle-ui/commit/aabb054)), closes [#2440](https://github.com/roomle-dev/roomle-ui/issues/2440)
|
|
64
|
+
* Merge pull request #2442 from roomle-dev/feat/threejs183 ([9f50705](https://github.com/roomle-dev/roomle-ui/commit/9f50705)), closes [#2442](https://github.com/roomle-dev/roomle-ui/issues/2442)
|
|
65
|
+
* Merge pull request #2443 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.6 ([c5a4748](https://github.com/roomle-dev/roomle-ui/commit/c5a4748)), closes [#2443](https://github.com/roomle-dev/roomle-ui/issues/2443)
|
|
66
|
+
* Merge pull request #2445 from roomle-dev/chore/hi-example-embedding-id ([0e28d01](https://github.com/roomle-dev/roomle-ui/commit/0e28d01)), closes [#2445](https://github.com/roomle-dev/roomle-ui/issues/2445)
|
|
67
|
+
* Merge pull request #2446 from roomle-dev/fix/wrong-parameter-label-RML-16109 ([1b8078f](https://github.com/roomle-dev/roomle-ui/commit/1b8078f)), closes [#2446](https://github.com/roomle-dev/roomle-ui/issues/2446)
|
|
68
|
+
* Merge pull request #2447 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.7 ([561e3f4](https://github.com/roomle-dev/roomle-ui/commit/561e3f4)), closes [#2447](https://github.com/roomle-dev/roomle-ui/issues/2447)
|
|
69
|
+
* Merge pull request #2448 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.8 ([1c5d292](https://github.com/roomle-dev/roomle-ui/commit/1c5d292)), closes [#2448](https://github.com/roomle-dev/roomle-ui/issues/2448)
|
|
70
|
+
* Merge pull request #2449 from roomle-dev/fix/bottom-bar-hidden-height-2 ([4acc6e1](https://github.com/roomle-dev/roomle-ui/commit/4acc6e1)), closes [#2449](https://github.com/roomle-dev/roomle-ui/issues/2449)
|
|
71
|
+
* Merge pull request #2450 from roomle-dev/feat(core)/upgrade-to-version-2.73.0-alpha.9 ([347ac4d](https://github.com/roomle-dev/roomle-ui/commit/347ac4d)), closes [#2450](https://github.com/roomle-dev/roomle-ui/issues/2450)
|
|
72
|
+
* Merge pull request #2452 from roomle-dev/fix/sort-for-level1-RML-16400 ([ec0b355](https://github.com/roomle-dev/roomle-ui/commit/ec0b355)), closes [#2452](https://github.com/roomle-dev/roomle-ui/issues/2452)
|
|
73
|
+
* Merge pull request #2453 from roomle-dev/chore/remove-interior-lights-feature-flag ([0906c96](https://github.com/roomle-dev/roomle-ui/commit/0906c96)), closes [#2453](https://github.com/roomle-dev/roomle-ui/issues/2453)
|
|
74
|
+
* Merge pull request #2454 from roomle-dev/fix/init-data-merge-priority-RML-16406 ([502df53](https://github.com/roomle-dev/roomle-ui/commit/502df53)), closes [#2454](https://github.com/roomle-dev/roomle-ui/issues/2454)
|
|
75
|
+
* Merge pull request #2455 from roomle-dev/fix/drawing ([dad2ffa](https://github.com/roomle-dev/roomle-ui/commit/dad2ffa)), closes [#2455](https://github.com/roomle-dev/roomle-ui/issues/2455)
|
|
76
|
+
* Merge pull request #2456 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.10 ([ae0b458](https://github.com/roomle-dev/roomle-ui/commit/ae0b458)), closes [#2456](https://github.com/roomle-dev/roomle-ui/issues/2456)
|
|
77
|
+
* Merge pull request #2458 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.11 ([53c3717](https://github.com/roomle-dev/roomle-ui/commit/53c3717)), closes [#2458](https://github.com/roomle-dev/roomle-ui/issues/2458)
|
|
78
|
+
* Merge pull request #2460 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.12 ([9a77dec](https://github.com/roomle-dev/roomle-ui/commit/9a77dec)), closes [#2460](https://github.com/roomle-dev/roomle-ui/issues/2460)
|
|
79
|
+
* Merge pull request #2461 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.13 ([5558900](https://github.com/roomle-dev/roomle-ui/commit/5558900)), closes [#2461](https://github.com/roomle-dev/roomle-ui/issues/2461)
|
|
80
|
+
* Merge pull request #2462 from roomle-dev/copilot/upgrade-web-sdk-to-strict-null-checks-again ([d3bbaef](https://github.com/roomle-dev/roomle-ui/commit/d3bbaef)), closes [#2462](https://github.com/roomle-dev/roomle-ui/issues/2462)
|
|
81
|
+
* Merge pull request #2464 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.14 ([d24183e](https://github.com/roomle-dev/roomle-ui/commit/d24183e)), closes [#2464](https://github.com/roomle-dev/roomle-ui/issues/2464)
|
|
82
|
+
* Merge pull request #2465 from roomle-dev/upgraded-by-ci/core-2.73.0-alpha.15 ([e63db31](https://github.com/roomle-dev/roomle-ui/commit/e63db31)), closes [#2465](https://github.com/roomle-dev/roomle-ui/issues/2465)
|
|
83
|
+
* Potential fix for pull request finding ([742bc50](https://github.com/roomle-dev/roomle-ui/commit/742bc50))
|
|
84
|
+
* feat: add e2e test for interactive component dimensioning ([eeaceff](https://github.com/roomle-dev/roomle-ui/commit/eeaceff))
|
|
85
|
+
* feat(types-qa): add known breaks allowlist with expiry enforcement ([e177d56](https://github.com/roomle-dev/roomle-ui/commit/e177d56))
|
|
86
|
+
* feat: add user rights to single object configurator example ([c18bacd](https://github.com/roomle-dev/roomle-ui/commit/c18bacd))
|
|
87
|
+
* feat: core api - mergedWidthDrag ([6c6fafa](https://github.com/roomle-dev/roomle-ui/commit/6c6fafa))
|
|
88
|
+
* feat: core api - object custom label ([a9761ec](https://github.com/roomle-dev/roomle-ui/commit/a9761ec))
|
|
89
|
+
* feat: new system for measurements/dimensioning/component-dimensioning ([0431958](https://github.com/roomle-dev/roomle-ui/commit/0431958))
|
|
90
|
+
* feat: upgrade threejs version to 183 ([03b6f70](https://github.com/roomle-dev/roomle-ui/commit/03b6f70))
|
|
91
|
+
* feat(core): upgrade to version 2.72.0-alpha.13 ([b511150](https://github.com/roomle-dev/roomle-ui/commit/b511150))
|
|
92
|
+
* feat(core): upgrade to version 2.72.0-alpha.14 ([9172fa9](https://github.com/roomle-dev/roomle-ui/commit/9172fa9))
|
|
93
|
+
* feat(core): upgrade to version 2.73.0-alpha.10 ([ab4f25e](https://github.com/roomle-dev/roomle-ui/commit/ab4f25e))
|
|
94
|
+
* feat(core): upgrade to version 2.73.0-alpha.11 ([916f201](https://github.com/roomle-dev/roomle-ui/commit/916f201))
|
|
95
|
+
* feat(core): upgrade to version 2.73.0-alpha.12 ([3e664ee](https://github.com/roomle-dev/roomle-ui/commit/3e664ee))
|
|
96
|
+
* feat(core): upgrade to version 2.73.0-alpha.13 ([e455f65](https://github.com/roomle-dev/roomle-ui/commit/e455f65))
|
|
97
|
+
* feat(core): upgrade to version 2.73.0-alpha.14 ([fb71ddc](https://github.com/roomle-dev/roomle-ui/commit/fb71ddc))
|
|
98
|
+
* feat(core): upgrade to version 2.73.0-alpha.15 ([01b8905](https://github.com/roomle-dev/roomle-ui/commit/01b8905))
|
|
99
|
+
* feat(core): upgrade to version 2.73.0-alpha.1 ([030d0c3](https://github.com/roomle-dev/roomle-ui/commit/030d0c3))
|
|
100
|
+
* feat(core): upgrade to version 2.73.0-alpha.2 ([bde2c7e](https://github.com/roomle-dev/roomle-ui/commit/bde2c7e))
|
|
101
|
+
* feat(core): upgrade to version 2.73.0-alpha.3 ([ddbd82d](https://github.com/roomle-dev/roomle-ui/commit/ddbd82d))
|
|
102
|
+
* feat(core): upgrade to version 2.73.0-alpha.4 ([36eeed0](https://github.com/roomle-dev/roomle-ui/commit/36eeed0))
|
|
103
|
+
* feat(core): upgrade to version 2.73.0-alpha.5 ([a964a2c](https://github.com/roomle-dev/roomle-ui/commit/a964a2c))
|
|
104
|
+
* feat(core): upgrade to version 2.73.0-alpha.6 ([a9186f4](https://github.com/roomle-dev/roomle-ui/commit/a9186f4))
|
|
105
|
+
* feat(core): upgrade to version 2.73.0-alpha.7 ([fefaee8](https://github.com/roomle-dev/roomle-ui/commit/fefaee8))
|
|
106
|
+
* feat(core): upgrade to version 2.73.0-alpha.8 ([ff4efeb](https://github.com/roomle-dev/roomle-ui/commit/ff4efeb))
|
|
107
|
+
* feat(core): upgrade to version 2.73.0-alpha.9 ([ff4d194](https://github.com/roomle-dev/roomle-ui/commit/ff4d194))
|
|
108
|
+
* chore: add docs about _getById returning Promise.resolve in error case ([ed2ec00](https://github.com/roomle-dev/roomle-ui/commit/ed2ec00))
|
|
109
|
+
* chore: add tests ([9f5ba2b](https://github.com/roomle-dev/roomle-ui/commit/9f5ba2b))
|
|
110
|
+
* chore: avoid non-null assertion operator ([d9d9945](https://github.com/roomle-dev/roomle-ui/commit/d9d9945))
|
|
111
|
+
* chore: do formatting ([a0c2c4f](https://github.com/roomle-dev/roomle-ui/commit/a0c2c4f))
|
|
112
|
+
* chore: embedding id for hi example ([124107f](https://github.com/roomle-dev/roomle-ui/commit/124107f))
|
|
113
|
+
* chore: finally correct package-lock ([9ce0265](https://github.com/roomle-dev/roomle-ui/commit/9ce0265))
|
|
114
|
+
* chore: fix failing test ([39e3d28](https://github.com/roomle-dev/roomle-ui/commit/39e3d28))
|
|
115
|
+
* chore(web-sdk): fix strictNullChecks errors in scene-manager, roomle-component-factory, configurator ([4011a42](https://github.com/roomle-dev/roomle-ui/commit/4011a42))
|
|
116
|
+
* chore(web-sdk): fix strictNullChecks errors in simpler common-core files ([ba79d63](https://github.com/roomle-dev/roomle-ui/commit/ba79d63))
|
|
117
|
+
* chore: get the environment map working ([4414331](https://github.com/roomle-dev/roomle-ui/commit/4414331))
|
|
118
|
+
* chore: initial plan for strictNullChecks phase 3b ([f5f9e07](https://github.com/roomle-dev/roomle-ui/commit/f5f9e07))
|
|
119
|
+
* chore: lint ([ef40185](https://github.com/roomle-dev/roomle-ui/commit/ef40185))
|
|
120
|
+
* chore: manual fixes ([0f54f5e](https://github.com/roomle-dev/roomle-ui/commit/0f54f5e))
|
|
121
|
+
* chore: move completed plan to done folder ([6e1f343](https://github.com/roomle-dev/roomle-ui/commit/6e1f343))
|
|
122
|
+
* chore: move the sidebar labels out of the component to keep consistent ([fe72579](https://github.com/roomle-dev/roomle-ui/commit/fe72579))
|
|
123
|
+
* chore: new prompts ([37600f9](https://github.com/roomle-dev/roomle-ui/commit/37600f9))
|
|
124
|
+
* chore: remove inert debug scaffolding from fetchSortedItems ([cbffefe](https://github.com/roomle-dev/roomle-ui/commit/cbffefe))
|
|
125
|
+
* chore: remove temporary id on css2dRenderer ([e616768](https://github.com/roomle-dev/roomle-ui/commit/e616768))
|
|
126
|
+
* chore: restore correct version of package-lock.json ([5484030](https://github.com/roomle-dev/roomle-ui/commit/5484030))
|
|
127
|
+
* chore: small adaptations, cleanup, fix unit tests ([677194b](https://github.com/roomle-dev/roomle-ui/commit/677194b))
|
|
128
|
+
* chore: small fixes and cleanup ([ed24ff4](https://github.com/roomle-dev/roomle-ui/commit/ed24ff4))
|
|
129
|
+
* chore(web-sdk): strictNullChecks phase 3b — rapi-access ([8f8933c](https://github.com/roomle-dev/roomle-ui/commit/8f8933c))
|
|
130
|
+
* chore(web-sdk): strictNullChecks phase 4 — complete common-core and typings ([d2189c1](https://github.com/roomle-dev/roomle-ui/commit/d2189c1))
|
|
131
|
+
* chore(web-sdk): strictNullChecks phase 4 — partial common-core fixes (16 errors resolved) ([26a5f8c](https://github.com/roomle-dev/roomle-ui/commit/26a5f8c))
|
|
132
|
+
* fix: add a case to make the RSW content full height when bottom bar is disabled ([03ff800](https://github.com/roomle-dev/roomle-ui/commit/03ff800))
|
|
133
|
+
* fix: add initialized check to css2drenderer.setsize ([5a9400e](https://github.com/roomle-dev/roomle-ui/commit/5a9400e))
|
|
134
|
+
* fix: address copilot PR feedback for catalog ordering ([88d53b1](https://github.com/roomle-dev/roomle-ui/commit/88d53b1))
|
|
135
|
+
* fix: address pr comments, fix non-1 dpr rendering ([f4fbafe](https://github.com/roomle-dev/roomle-ui/commit/f4fbafe))
|
|
136
|
+
* fix(web-sdk): address PR review comments ([56d6e2b](https://github.com/roomle-dev/roomle-ui/commit/56d6e2b))
|
|
137
|
+
* fix(web-sdk): address remaining review comments on PR #2433 ([6f50313](https://github.com/roomle-dev/roomle-ui/commit/6f50313)), closes [#2433](https://github.com/roomle-dev/roomle-ui/issues/2433)
|
|
138
|
+
* fix: address review comments on PR #2428 ([a089938](https://github.com/roomle-dev/roomle-ui/commit/a089938)), closes [#2428](https://github.com/roomle-dev/roomle-ui/issues/2428)
|
|
139
|
+
* fix(web-sdk): address review comments on PR #2433 ([3fa0f5d](https://github.com/roomle-dev/roomle-ui/commit/3fa0f5d)), closes [#2433](https://github.com/roomle-dev/roomle-ui/issues/2433)
|
|
140
|
+
* fix: address review findings on strictNullChecks phase 3 ([4166a38](https://github.com/roomle-dev/roomle-ui/commit/4166a38))
|
|
141
|
+
* fix: apply sort connection on level 1 catalog tags and items ([e987df1](https://github.com/roomle-dev/roomle-ui/commit/e987df1))
|
|
142
|
+
* fix(mobile): clip element-preview overflow in mobile catalog sidebar ([c04d063](https://github.com/roomle-dev/roomle-ui/commit/c04d063))
|
|
143
|
+
* fix(web-sdk): complete remaining Phase 4 common-core strictNullChecks fixes ([3a975fa](https://github.com/roomle-dev/roomle-ui/commit/3a975fa))
|
|
144
|
+
* fix: copilot code review - make _insertObject private ([66bfcbf](https://github.com/roomle-dev/roomle-ui/commit/66bfcbf))
|
|
145
|
+
* fix(embedding): correct init-data merge priority in embedding API ([39055da](https://github.com/roomle-dev/roomle-ui/commit/39055da))
|
|
146
|
+
* fix: distinguish between merge with drag and merge on action for undo/redo ([669ed7e](https://github.com/roomle-dev/roomle-ui/commit/669ed7e))
|
|
147
|
+
* fix: do not request rapi item from undefined id ([e985263](https://github.com/roomle-dev/roomle-ui/commit/e985263))
|
|
148
|
+
* fix: do not start or end an interaction while drawing ([e4f52c2](https://github.com/roomle-dev/roomle-ui/commit/e4f52c2))
|
|
149
|
+
* fix: fix minor issue on bounding box unit test ([f5ac978](https://github.com/roomle-dev/roomle-ui/commit/f5ac978))
|
|
150
|
+
* fix: hi dragging objects to disconnect ([80c5dc6](https://github.com/roomle-dev/roomle-ui/commit/80c5dc6))
|
|
151
|
+
* fix(configurator): keep addon-only groups in local context ([26a8c74](https://github.com/roomle-dev/roomle-ui/commit/26a8c74))
|
|
152
|
+
* fix: kernel types ([83e9ca9](https://github.com/roomle-dev/roomle-ui/commit/83e9ca9))
|
|
153
|
+
* fix: more stable removal of all children loop in html util class ([bae9ad8](https://github.com/roomle-dev/roomle-ui/commit/bae9ad8))
|
|
154
|
+
* fix: pass required camera argument to PointLightShadow constructor ([977785e](https://github.com/roomle-dev/roomle-ui/commit/977785e))
|
|
155
|
+
* fix: preserve catalog order when multiple catalogRootTag entries are specified (RML-16333) ([4ba2551](https://github.com/roomle-dev/roomle-ui/commit/4ba2551))
|
|
156
|
+
* fix: preserve URL root-tag order for two-level catalog pills ([1a96ca4](https://github.com/roomle-dev/roomle-ui/commit/1a96ca4))
|
|
157
|
+
* fix(mobile): propagate tab-content height to CollapsedView chain ([5c3ff85](https://github.com/roomle-dev/roomle-ui/commit/5c3ff85))
|
|
158
|
+
* fix: re-enable dimensions on undo/redo ([211ab42](https://github.com/roomle-dev/roomle-ui/commit/211ab42))
|
|
159
|
+
* fix: remove flickering on selection ([32686a1](https://github.com/roomle-dev/roomle-ui/commit/32686a1))
|
|
160
|
+
* fix: report all failure categories together and add code field for precision matching ([7ea6da3](https://github.com/roomle-dev/roomle-ui/commit/7ea6da3))
|
|
161
|
+
* fix: resolve strictNullChecks errors in common-core mock files ([2375537](https://github.com/roomle-dev/roomle-ui/commit/2375537))
|
|
162
|
+
* fix: resolve strictNullChecks errors in configurator-kernel-access.ts ([79d2822](https://github.com/roomle-dev/roomle-ui/commit/79d2822))
|
|
163
|
+
* fix: resolve strictNullChecks errors in input-manager.ts ([a06ab8e](https://github.com/roomle-dev/roomle-ui/commit/a06ab8e))
|
|
164
|
+
* fix: resolve strictNullChecks errors in roomle-sdk.ts ([610b611](https://github.com/roomle-dev/roomle-ui/commit/610b611))
|
|
165
|
+
* fix: resolve strictNullChecks errors in view-model files ([2543734](https://github.com/roomle-dev/roomle-ui/commit/2543734))
|
|
166
|
+
* fix: restore package-lock.json, align waiter resolve cast with widened type ([bac0d67](https://github.com/roomle-dev/roomle-ui/commit/bac0d67))
|
|
167
|
+
* fix: revert single-level catalog back to non-connection sort ([37583c6](https://github.com/roomle-dev/roomle-ui/commit/37583c6))
|
|
168
|
+
* fix: scrolling chain between iframe and the host page and make it consistent across browsers ([34d5c28](https://github.com/roomle-dev/roomle-ui/commit/34d5c28))
|
|
169
|
+
* fix: set the zoom factor when switching from 2D to 3D ([eaa3e62](https://github.com/roomle-dev/roomle-ui/commit/eaa3e62))
|
|
170
|
+
* fix: show correct parameter label in expanded grid view ([7b2b7b7](https://github.com/roomle-dev/roomle-ui/commit/7b2b7b7))
|
|
171
|
+
* fix: try to fix the background issue on Mobile Chrome ([9d95f72](https://github.com/roomle-dev/roomle-ui/commit/9d95f72))
|
|
172
|
+
* fix: undo/redo on swap external object ([0d0767a](https://github.com/roomle-dev/roomle-ui/commit/0d0767a))
|
|
173
|
+
* fix: update callback types to accept null, fix test failures, update progress ([4d6650d](https://github.com/roomle-dev/roomle-ui/commit/4d6650d))
|
|
174
|
+
* fix: update root module properties when loading an external object from plan ([89ecef7](https://github.com/roomle-dev/roomle-ui/commit/89ecef7))
|
|
175
|
+
* fix: use css ([4421313](https://github.com/roomle-dev/roomle-ui/commit/4421313))
|
|
176
|
+
* fix(web-sdk): use optional chaining for dataTransfer to handle undefined ([cff371a](https://github.com/roomle-dev/roomle-ui/commit/cff371a))
|
|
177
|
+
* fix: use static item label if external object label is missing ([92b98b0](https://github.com/roomle-dev/roomle-ui/commit/92b98b0))
|
|
178
|
+
* fix: use UTC consistently in getExpiryDate ([a2afaac](https://github.com/roomle-dev/roomle-ui/commit/a2afaac))
|
|
179
|
+
* refactor(embedding): extract mergeEmbeddingInitData utility ([078c4a0](https://github.com/roomle-dev/roomle-ui/commit/078c4a0))
|
|
180
|
+
* refactor: move lighting setting into own component ([14a950d](https://github.com/roomle-dev/roomle-ui/commit/14a950d))
|
|
181
|
+
* docs: add init-data merge priority documentation ([95ff48e](https://github.com/roomle-dev/roomle-ui/commit/95ff48e))
|
|
182
|
+
* docs: add more docs ([60b0926](https://github.com/roomle-dev/roomle-ui/commit/60b0926))
|
|
183
|
+
* revert: remove unrelated PointLightShadow change from this branch ([1b8ef21](https://github.com/roomle-dev/roomle-ui/commit/1b8ef21))
|
|
184
|
+
* test: add test for multi-catalog sort order with enableTwoLevelCatalog=false ([964016a](https://github.com/roomle-dev/roomle-ui/commit/964016a))
|
|
185
|
+
* test: fix fail tests ([a45f067](https://github.com/roomle-dev/roomle-ui/commit/a45f067))
|
|
186
|
+
* ci: update github actions to latest versions ([f9f3e20](https://github.com/roomle-dev/roomle-ui/commit/f9f3e20))
|
|
187
|
+
* style: apply prettier formatting ([47e55c0](https://github.com/roomle-dev/roomle-ui/commit/47e55c0))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0-alpha.1",
|
|
4
4
|
"description": "This is a small library which can be used to communicate with the Roomle Configurator. ES modules only (browser-compatible).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./roomle-embedding-lib.js",
|
package/roomle-embedding-lib.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { expose as
|
|
2
|
-
import { g as
|
|
3
|
-
import { c as
|
|
4
|
-
class
|
|
1
|
+
import { expose as x } from "./comlink-BAiXCcU9.mjs";
|
|
2
|
+
import { g as U } from "./browser-CUgD7zyH.mjs";
|
|
3
|
+
import { c as k } from "./utils-Dav4kGNW.mjs";
|
|
4
|
+
class A {
|
|
5
5
|
_side;
|
|
6
6
|
// for better debugging (who handles message? iframe or website?)
|
|
7
7
|
_incomingMessageBus = null;
|
|
8
8
|
_outgoingMessageBus = null;
|
|
9
9
|
_execMessage = null;
|
|
10
|
-
constructor(e,
|
|
11
|
-
this._side = e, this._incomingMessageBus =
|
|
10
|
+
constructor(e, r, t, o) {
|
|
11
|
+
this._side = e, this._incomingMessageBus = r, this._outgoingMessageBus = t, this._execMessage = o, this._incomingMessageBus && this._incomingMessageBus.addEventListener(
|
|
12
12
|
"message",
|
|
13
13
|
this._handleMessage.bind(this)
|
|
14
14
|
);
|
|
@@ -19,29 +19,29 @@ class S {
|
|
|
19
19
|
setMessageExecution(e) {
|
|
20
20
|
this._execMessage = e;
|
|
21
21
|
}
|
|
22
|
-
sendMessage(e,
|
|
23
|
-
return new Promise((
|
|
22
|
+
sendMessage(e, r = []) {
|
|
23
|
+
return new Promise((t, o) => {
|
|
24
24
|
if (this._incomingMessageBus === this._outgoingMessageBus)
|
|
25
|
-
return
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
if (!
|
|
29
|
-
return
|
|
25
|
+
return t(void 0);
|
|
26
|
+
const n = new MessageChannel();
|
|
27
|
+
n.port1.onmessage = (i) => {
|
|
28
|
+
if (!i || !i.data)
|
|
29
|
+
return n.port1.close(), n.port2.close(), o(
|
|
30
30
|
new Error(
|
|
31
31
|
this._side + " received message but response can not be interpreted"
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
34
|
let l;
|
|
35
35
|
try {
|
|
36
|
-
l = JSON.parse(
|
|
36
|
+
l = JSON.parse(i.data);
|
|
37
37
|
} catch (u) {
|
|
38
|
-
return
|
|
38
|
+
return n.port1.close(), n.port2.close(), this._prepareError(u), o(u);
|
|
39
39
|
}
|
|
40
|
-
l.error ? o(l.error) : l.result !== void 0 ?
|
|
40
|
+
l.error ? o(l.error) : l.result !== void 0 ? t(l.result) : t(void 0), n.port1.close(), n.port2.close();
|
|
41
41
|
};
|
|
42
42
|
let a = "";
|
|
43
43
|
try {
|
|
44
|
-
a = JSON.stringify({ message: e, args:
|
|
44
|
+
a = JSON.stringify({ message: e, args: r });
|
|
45
45
|
} catch {
|
|
46
46
|
return o(
|
|
47
47
|
new Error(
|
|
@@ -52,95 +52,95 @@ class S {
|
|
|
52
52
|
if (!this._outgoingMessageBus)
|
|
53
53
|
return o(new Error(this._side + ": outgoing bus not set yet"));
|
|
54
54
|
this._outgoingMessageBus.postMessage(a, "*", [
|
|
55
|
-
|
|
55
|
+
n.port2
|
|
56
56
|
]);
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
_handleMessage(e) {
|
|
60
|
-
const
|
|
61
|
-
if (e.data && (typeof e.data == "string" || e.data.type !== "connect_hi") &&
|
|
60
|
+
const r = e.ports && Array.isArray(e.ports) && e.ports.length > 0 ? e.ports[0] : null;
|
|
61
|
+
if (e.data && (typeof e.data == "string" || e.data.type !== "connect_hi") && r)
|
|
62
62
|
try {
|
|
63
|
-
const
|
|
63
|
+
const t = JSON.parse(e.data);
|
|
64
64
|
if (!this._execMessage)
|
|
65
|
-
return
|
|
65
|
+
return r.postMessage(
|
|
66
66
|
JSON.stringify({
|
|
67
67
|
error: this._side + " is not ready to handle messages"
|
|
68
68
|
})
|
|
69
69
|
);
|
|
70
|
-
Array.isArray(
|
|
71
|
-
const o = this._execMessage(
|
|
70
|
+
Array.isArray(t.args) || (t.args = [t.args]);
|
|
71
|
+
const o = this._execMessage(t, e);
|
|
72
72
|
if (o === void 0)
|
|
73
73
|
return;
|
|
74
74
|
o.then(
|
|
75
|
-
(
|
|
76
|
-
let a,
|
|
77
|
-
typeof
|
|
75
|
+
(n = {}) => {
|
|
76
|
+
let a, i;
|
|
77
|
+
typeof n == "object" && n !== null && (a = n.error, i = n.result), a ? r.postMessage(
|
|
78
78
|
JSON.stringify({ error: a })
|
|
79
|
-
) :
|
|
80
|
-
JSON.stringify({ result: n })
|
|
81
|
-
) : t.postMessage(
|
|
79
|
+
) : i !== void 0 ? r.postMessage(
|
|
82
80
|
JSON.stringify({ result: i })
|
|
81
|
+
) : r.postMessage(
|
|
82
|
+
JSON.stringify({ result: n })
|
|
83
83
|
);
|
|
84
84
|
},
|
|
85
|
-
(
|
|
86
|
-
|
|
85
|
+
(n) => {
|
|
86
|
+
r.postMessage(
|
|
87
87
|
JSON.stringify({
|
|
88
|
-
error: this._prepareError(
|
|
88
|
+
error: this._prepareError(n)
|
|
89
89
|
})
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
|
-
} catch (
|
|
94
|
-
|
|
93
|
+
} catch (t) {
|
|
94
|
+
r.postMessage(
|
|
95
95
|
JSON.stringify({
|
|
96
|
-
error: this._prepareError(
|
|
96
|
+
error: this._prepareError(t)
|
|
97
97
|
})
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
_prepareError(e) {
|
|
102
102
|
if (typeof e == "string") {
|
|
103
|
-
const
|
|
104
|
-
return console.error(
|
|
103
|
+
const r = this._side + ": " + e;
|
|
104
|
+
return console.error(r), r;
|
|
105
105
|
}
|
|
106
106
|
return e.message = this._side + ": " + e.message, console.error(e), e.message;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const W = () => {
|
|
110
110
|
try {
|
|
111
111
|
return window.self !== window.top;
|
|
112
112
|
} catch {
|
|
113
113
|
return !0;
|
|
114
114
|
}
|
|
115
|
-
},
|
|
116
|
-
const s =
|
|
115
|
+
}, G = ["127.0.0.1", "localhost", "0.0.0.0"], J = () => {
|
|
116
|
+
const s = W();
|
|
117
117
|
let e = window.location.href;
|
|
118
118
|
if (s) {
|
|
119
119
|
if (!document.referrer)
|
|
120
120
|
return null;
|
|
121
121
|
e = document.referrer;
|
|
122
122
|
}
|
|
123
|
-
const { hostname:
|
|
124
|
-
return
|
|
125
|
-
},
|
|
123
|
+
const { hostname: r } = new URL(e);
|
|
124
|
+
return r;
|
|
125
|
+
}, V = (s) => {
|
|
126
126
|
const e = new RegExp(
|
|
127
127
|
/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/
|
|
128
128
|
);
|
|
129
|
-
return !!(
|
|
130
|
-
},
|
|
131
|
-
const
|
|
132
|
-
return
|
|
133
|
-
},
|
|
134
|
-
for (const
|
|
129
|
+
return !!(G.includes(s) || e.test(s) || s.endsWith("roomle.com") || s.endsWith("gitlab.io") || s.endsWith("gitlab.com"));
|
|
130
|
+
}, E = (s, e) => {
|
|
131
|
+
const r = JSON.parse(JSON.stringify(s));
|
|
132
|
+
return b(r, e);
|
|
133
|
+
}, b = (s, e) => {
|
|
134
|
+
for (const r in e)
|
|
135
135
|
try {
|
|
136
|
-
e[
|
|
136
|
+
e[r].constructor === Object ? s[r] = b(s[r], e[r]) : s[r] = e[r];
|
|
137
137
|
} catch {
|
|
138
|
-
s[
|
|
138
|
+
s[r] = e[r];
|
|
139
139
|
}
|
|
140
140
|
return s;
|
|
141
141
|
};
|
|
142
|
-
var
|
|
143
|
-
const
|
|
142
|
+
var L = /* @__PURE__ */ ((s) => (s.BOTTOM_BAR = "bottom_bar", s.PARTLIST_BOUNDS = "partlist_bounds", s.INTERACTION_NOTES = "interaction_notes", s.PARAMETER_GROUPS = "parameter_groups", s))(L || {});
|
|
143
|
+
const H = (s) => JSON.parse(JSON.stringify(s)), K = {
|
|
144
144
|
mobileLandscape: !0,
|
|
145
145
|
floorMaterialRootTag: "materials_root",
|
|
146
146
|
buttons: {
|
|
@@ -151,7 +151,7 @@ const G = (s) => JSON.parse(JSON.stringify(s)), J = {
|
|
|
151
151
|
partlist_print: !0
|
|
152
152
|
},
|
|
153
153
|
elements: {
|
|
154
|
-
[
|
|
154
|
+
[L.INTERACTION_NOTES]: !0
|
|
155
155
|
},
|
|
156
156
|
helpcenter: {
|
|
157
157
|
roomdesigner: !0,
|
|
@@ -170,33 +170,37 @@ const G = (s) => JSON.parse(JSON.stringify(s)), J = {
|
|
|
170
170
|
},
|
|
171
171
|
rotationSnapDegrees: 10,
|
|
172
172
|
interactionsCollapsed: !1
|
|
173
|
-
},
|
|
173
|
+
}, $ = "(idle)", z = (s) => (w(s), s?.customApiUrl && (s.customApiUrl = decodeURIComponent(s.customApiUrl)), s.shareUrl && (s.deeplink = s.shareUrl.replace(
|
|
174
174
|
Y,
|
|
175
175
|
q
|
|
176
|
-
)), s),
|
|
176
|
+
)), s), w = (s) => {
|
|
177
177
|
if (!s)
|
|
178
178
|
return;
|
|
179
179
|
const e = Object.keys(s);
|
|
180
|
-
for (const
|
|
181
|
-
const
|
|
182
|
-
if (!Array.isArray(
|
|
183
|
-
for (const o of
|
|
184
|
-
|
|
185
|
-
(
|
|
180
|
+
for (const r of e) {
|
|
181
|
+
const t = s[r];
|
|
182
|
+
if (!Array.isArray(t) && typeof t == "object" && t !== null && w(t), Array.isArray(t))
|
|
183
|
+
for (const o of t)
|
|
184
|
+
w(o);
|
|
185
|
+
(t === "true" || t === "false") && (s[r] = t === "true");
|
|
186
186
|
}
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
s.locale || (s.locale = P(null, !0)), s.id === V && delete s.id;
|
|
194
|
-
const e = U();
|
|
195
|
-
return e && k(e) && (s.configuratorId = "demoConfigurator"), s.customApiUrl = void 0, s.emails = !1, s;
|
|
196
|
-
}, Y = "<CONF_ID>", q = "#CONFIGURATIONID#", Q = (s) => {
|
|
187
|
+
}, C = () => {
|
|
188
|
+
const s = H(K);
|
|
189
|
+
s.locale || (s.locale = U(null, !0)), s.id === $ && delete s.id;
|
|
190
|
+
const e = J();
|
|
191
|
+
return e && V(e) && (s.configuratorId = "demoConfigurator"), s.customApiUrl = "https://rubens.alpha.roomle.com/api/v2", s.emails = !1, s;
|
|
192
|
+
}, Y = "<CONF_ID>", q = "#CONFIGURATIONID#", v = (s) => {
|
|
197
193
|
s.featureFlags || (s.featureFlags = {}), typeof s.featureFlags.realPartList != "boolean" && (s.featureFlags.realPartList = !0), typeof s.featureFlags.globalCallbacks != "boolean" && (s.featureFlags.globalCallbacks = !0), typeof s.featureFlags.mocAr != "boolean" && (s.featureFlags.mocAr = !1);
|
|
198
|
-
},
|
|
199
|
-
|
|
194
|
+
}, Q = (s, e) => {
|
|
195
|
+
const r = H(e), t = C();
|
|
196
|
+
v(t);
|
|
197
|
+
const o = s.settings || {}, n = E(
|
|
198
|
+
E(t, o),
|
|
199
|
+
r
|
|
200
|
+
);
|
|
201
|
+
return n.configuratorId = s.id, !n.overrideTenant && s.tenant && (n.overrideTenant = s.tenant), n;
|
|
202
|
+
}, I = () => /(android)/i.test(navigator.userAgent);
|
|
203
|
+
class M {
|
|
200
204
|
_messageHandler = null;
|
|
201
205
|
isSetupDone = !1;
|
|
202
206
|
viewName = "main";
|
|
@@ -224,74 +228,74 @@ class T {
|
|
|
224
228
|
this._messageHandler = e;
|
|
225
229
|
}
|
|
226
230
|
handleSetup(e) {
|
|
227
|
-
const { methods:
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
this[a] || (this[a] = {}), this[a][
|
|
231
|
+
const { methods: r, callbacks: t } = e;
|
|
232
|
+
r.forEach((o) => {
|
|
233
|
+
const n = o.split(h), a = n[0], i = n[1];
|
|
234
|
+
this[a] || (this[a] = {}), this[a][i] = (function() {
|
|
231
235
|
if (!this._messageHandler) {
|
|
232
236
|
console.error("MessageHandler not set");
|
|
233
237
|
return;
|
|
234
238
|
}
|
|
235
239
|
return this._messageHandler.sendMessage(o, [...arguments]);
|
|
236
240
|
}).bind(this);
|
|
237
|
-
}),
|
|
238
|
-
const
|
|
239
|
-
this[a] || (this[a] = {}), this[a][
|
|
241
|
+
}), t.forEach((o) => {
|
|
242
|
+
const n = o.split(h), a = n[0], i = n[1], l = n[2];
|
|
243
|
+
this[a] || (this[a] = {}), this[a][i] || (this[a][i] = {}), this[a][i][l] = () => {
|
|
240
244
|
};
|
|
241
245
|
}), this.isSetupDone = !0;
|
|
242
246
|
}
|
|
243
|
-
executeMessage({ message: e, args:
|
|
244
|
-
const
|
|
245
|
-
if (a && this[o][
|
|
246
|
-
const
|
|
247
|
-
...
|
|
247
|
+
executeMessage({ message: e, args: r }) {
|
|
248
|
+
const t = e.split(h), o = t[0], n = t[1], a = t.length === 3 ? t[2] : null;
|
|
249
|
+
if (a && this[o][n][a]) {
|
|
250
|
+
const i = this[o][n][a](
|
|
251
|
+
...r
|
|
248
252
|
);
|
|
249
|
-
return
|
|
253
|
+
return i instanceof Promise ? i.then((l) => ({ result: l })) : i !== void 0 ? Promise.resolve({ result: i }) : Promise.resolve({ result: null });
|
|
250
254
|
}
|
|
251
255
|
return Promise.reject('Message "' + e + '" is unkown');
|
|
252
256
|
}
|
|
253
|
-
setupPlugins(e,
|
|
257
|
+
setupPlugins(e, r, t = "website") {
|
|
254
258
|
for (const o of e)
|
|
255
259
|
typeof o == "string" && o === "dragIn" ? this.pluginsLoaded.push(
|
|
256
|
-
new Promise((
|
|
260
|
+
new Promise((n, a) => {
|
|
257
261
|
try {
|
|
258
|
-
import("./embedding-plugins-DqMSzAJe.mjs").then((
|
|
259
|
-
const l = new
|
|
262
|
+
import("./embedding-plugins-DqMSzAJe.mjs").then((i) => i.l).then(({ DragIn: i }) => {
|
|
263
|
+
const l = new i(this.ui, r, t, this.viewName);
|
|
260
264
|
l.init().then(() => {
|
|
261
|
-
this.plugins.dragIn = l,
|
|
265
|
+
this.plugins.dragIn = l, n();
|
|
262
266
|
}, a);
|
|
263
267
|
});
|
|
264
|
-
} catch (
|
|
265
|
-
a(
|
|
268
|
+
} catch (i) {
|
|
269
|
+
a(i);
|
|
266
270
|
}
|
|
267
271
|
})
|
|
268
272
|
) : o.name && o.loader && this.pluginsLoaded.push(
|
|
269
|
-
new Promise((
|
|
273
|
+
new Promise((n, a) => {
|
|
270
274
|
try {
|
|
271
|
-
o.loader().then((
|
|
272
|
-
const l = new
|
|
275
|
+
o.loader().then((i) => {
|
|
276
|
+
const l = new i(
|
|
273
277
|
this.ui,
|
|
274
|
-
t,
|
|
275
278
|
r,
|
|
279
|
+
t,
|
|
276
280
|
this.viewName
|
|
277
281
|
);
|
|
278
282
|
l.init().then(() => {
|
|
279
|
-
this.plugins[o.name] = l,
|
|
283
|
+
this.plugins[o.name] = l, n();
|
|
280
284
|
}, a);
|
|
281
285
|
});
|
|
282
|
-
} catch (
|
|
283
|
-
a(
|
|
286
|
+
} catch (i) {
|
|
287
|
+
a(i);
|
|
284
288
|
}
|
|
285
289
|
})
|
|
286
290
|
);
|
|
287
291
|
}
|
|
288
292
|
}
|
|
289
|
-
const
|
|
293
|
+
const T = () => {
|
|
290
294
|
let s, e;
|
|
291
|
-
return { promise: new Promise((
|
|
292
|
-
s =
|
|
295
|
+
return { promise: new Promise((t, o) => {
|
|
296
|
+
s = t, e = o;
|
|
293
297
|
}), resolve: s, reject: e };
|
|
294
|
-
},
|
|
298
|
+
}, O = {
|
|
295
299
|
SDK: "extended",
|
|
296
300
|
CONFIGURATOR_SDK: "configurator",
|
|
297
301
|
CALLBACKS: "callbacks",
|
|
@@ -299,7 +303,7 @@ const I = () => {
|
|
|
299
303
|
ANALYTICS: "analytics",
|
|
300
304
|
GLOBAL: "global",
|
|
301
305
|
RAPI: "rapi"
|
|
302
|
-
}, h = ".", oe =
|
|
306
|
+
}, h = ".", oe = O.SDK + h + O.CALLBACKS, p = {
|
|
303
307
|
REQUEST_BOOT: "requestBoot",
|
|
304
308
|
SETUP: "setup",
|
|
305
309
|
WEBSITE_READY: "websiteReady"
|
|
@@ -308,20 +312,20 @@ const I = () => {
|
|
|
308
312
|
RETURN_METHODS: "returnMethods",
|
|
309
313
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
310
314
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
311
|
-
}, X = ["constructor", "callbacks"], Z = (s) => s[0] !== "_" && !X.includes(s),
|
|
315
|
+
}, X = ["constructor", "callbacks"], Z = (s) => s[0] !== "_" && !X.includes(s), ne = (s, e, r = !1) => {
|
|
312
316
|
if (!s)
|
|
313
317
|
return [];
|
|
314
|
-
const
|
|
315
|
-
return
|
|
318
|
+
const t = Object.getOwnPropertyNames(s), o = r ? O.CALLBACKS + h : "";
|
|
319
|
+
return t.filter(Z).map((n) => e + h + o + n);
|
|
316
320
|
}, j = async (s, e) => {
|
|
317
321
|
if (typeof s != "string")
|
|
318
322
|
throw new Error(
|
|
319
323
|
'Configurator ID is not a string type: "' + typeof s + '"'
|
|
320
324
|
);
|
|
321
|
-
const
|
|
325
|
+
const r = e.customApiUrl ? e.customApiUrl : "https://api.roomle.com/v2", t = e.overrideTenant || 9, o = r + "/configurators/" + s, n = "roomle_portal_v2", a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;" + n), i = () => {
|
|
322
326
|
const g = {
|
|
323
|
-
apiKey:
|
|
324
|
-
currentTenant:
|
|
327
|
+
apiKey: n,
|
|
328
|
+
currentTenant: t,
|
|
325
329
|
locale: "en",
|
|
326
330
|
language: "en",
|
|
327
331
|
device: 1,
|
|
@@ -331,29 +335,29 @@ const I = () => {
|
|
|
331
335
|
return new Headers(g);
|
|
332
336
|
}, l = new Request(o, {
|
|
333
337
|
method: "GET",
|
|
334
|
-
headers:
|
|
338
|
+
headers: i(),
|
|
335
339
|
mode: "cors",
|
|
336
340
|
cache: "default"
|
|
337
341
|
}), u = await fetch(l), { configurator: d } = await u.json();
|
|
338
342
|
return d;
|
|
339
|
-
},
|
|
340
|
-
let
|
|
343
|
+
}, ie = "data-rml-interaction-container", R = (s, e, r) => {
|
|
344
|
+
let t = null;
|
|
341
345
|
Object.defineProperty(s, e, {
|
|
342
346
|
get() {
|
|
343
|
-
return
|
|
347
|
+
return t || r;
|
|
344
348
|
},
|
|
345
349
|
set(o) {
|
|
346
|
-
o?.mute ?
|
|
350
|
+
o?.mute ? t = o.value : (console.warn(
|
|
347
351
|
"You override Roomle defined behaviour. To disalbe this warning pass in an object with the following properties"
|
|
348
|
-
), console.warn("{ mute: true, value: () => void }"),
|
|
352
|
+
), console.warn("{ mute: true, value: () => void }"), t = o);
|
|
349
353
|
}
|
|
350
354
|
});
|
|
351
|
-
},
|
|
355
|
+
}, D = () => window.innerHeight * 0.01 + "px", y = (s) => {
|
|
352
356
|
s && setTimeout(
|
|
353
|
-
() => s.style.setProperty(
|
|
357
|
+
() => s.style.setProperty(S, D()),
|
|
354
358
|
0
|
|
355
359
|
);
|
|
356
|
-
}, N = "rml-styles", ee = 450,
|
|
360
|
+
}, N = "rml-styles", ee = 450, S = "--rml-full-height", c = {
|
|
357
361
|
CONTAINER: "rml-container",
|
|
358
362
|
FILL: "rml-fill",
|
|
359
363
|
POSITION: "rml-pos",
|
|
@@ -361,19 +365,19 @@ const I = () => {
|
|
|
361
365
|
ANDROID_HEIGHT: "rml-android-height",
|
|
362
366
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
363
367
|
}, _ = /* @__PURE__ */ new Map();
|
|
364
|
-
class ae extends
|
|
365
|
-
static createPlanner(e,
|
|
368
|
+
class ae extends M {
|
|
369
|
+
static createPlanner(e, r, t, o = []) {
|
|
366
370
|
return this._create(
|
|
367
371
|
e,
|
|
368
|
-
t,
|
|
369
372
|
r,
|
|
373
|
+
t,
|
|
370
374
|
o
|
|
371
375
|
);
|
|
372
376
|
}
|
|
373
|
-
static async connect(e,
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
const { resolve: o, promise:
|
|
377
|
+
static async connect(e, r = []) {
|
|
378
|
+
const t = new M();
|
|
379
|
+
t.viewName = e;
|
|
380
|
+
const { resolve: o, promise: n } = T(), { resolve: a, promise: i } = T(), l = ({
|
|
377
381
|
message: g,
|
|
378
382
|
args: m
|
|
379
383
|
}) => {
|
|
@@ -382,28 +386,28 @@ class ae extends T {
|
|
|
382
386
|
o();
|
|
383
387
|
break;
|
|
384
388
|
case f.RETURN_METHODS:
|
|
385
|
-
|
|
389
|
+
t.handleSetup(m[0]), a();
|
|
386
390
|
break;
|
|
387
391
|
default:
|
|
388
|
-
if (
|
|
389
|
-
return
|
|
392
|
+
if (t.isSetupDone)
|
|
393
|
+
return t.executeMessage({ message: g, args: m });
|
|
390
394
|
}
|
|
391
|
-
}, u = new
|
|
395
|
+
}, u = new A(
|
|
392
396
|
"custom-view-" + e,
|
|
393
397
|
window,
|
|
394
398
|
window.parent,
|
|
395
399
|
l
|
|
396
400
|
);
|
|
397
|
-
|
|
401
|
+
t.setMessageHandler(u);
|
|
398
402
|
const d = [e];
|
|
399
403
|
return u.sendMessage(
|
|
400
404
|
f.REGISTER_CUSTOM_VIEW,
|
|
401
405
|
d
|
|
402
|
-
), await
|
|
403
|
-
|
|
406
|
+
), await n, u.sendMessage(f.GET_METHODS, d), await i, t.setupPlugins(
|
|
407
|
+
r,
|
|
404
408
|
document.body,
|
|
405
409
|
"custom-view"
|
|
406
|
-
), await Promise.allSettled(
|
|
410
|
+
), await Promise.allSettled(t.pluginsLoaded), t;
|
|
407
411
|
}
|
|
408
412
|
/**
|
|
409
413
|
* Method to create a new instance of a Roomle Configurator
|
|
@@ -411,11 +415,11 @@ class ae extends T {
|
|
|
411
415
|
* @param container DOM container in which the configurator should be placed
|
|
412
416
|
* @param initData settings with which the configurator should be started
|
|
413
417
|
*/
|
|
414
|
-
static createConfigurator(e,
|
|
418
|
+
static createConfigurator(e, r, t, o = []) {
|
|
415
419
|
return this._create(
|
|
416
420
|
e,
|
|
417
|
-
t,
|
|
418
421
|
r,
|
|
422
|
+
t,
|
|
419
423
|
o
|
|
420
424
|
);
|
|
421
425
|
}
|
|
@@ -426,11 +430,11 @@ class ae extends T {
|
|
|
426
430
|
* @param container DOM container in which the configurator should be placed
|
|
427
431
|
* @param initData settings with which the configurator should be started
|
|
428
432
|
*/
|
|
429
|
-
static create(e,
|
|
433
|
+
static create(e, r, t, o) {
|
|
430
434
|
return this._create(
|
|
431
435
|
e,
|
|
432
|
-
t,
|
|
433
436
|
r,
|
|
437
|
+
t,
|
|
434
438
|
o
|
|
435
439
|
);
|
|
436
440
|
}
|
|
@@ -440,11 +444,11 @@ class ae extends T {
|
|
|
440
444
|
* @param container DOM container in which the configurator should be placed
|
|
441
445
|
* @param initData settings with which the configurator should be started
|
|
442
446
|
*/
|
|
443
|
-
static createViewer(e,
|
|
447
|
+
static createViewer(e, r, t, o = []) {
|
|
444
448
|
return this._create(
|
|
445
449
|
e,
|
|
446
|
-
t,
|
|
447
450
|
r,
|
|
451
|
+
t,
|
|
448
452
|
o
|
|
449
453
|
);
|
|
450
454
|
}
|
|
@@ -453,36 +457,39 @@ class ae extends T {
|
|
|
453
457
|
console.warn(
|
|
454
458
|
`[DEPRECATED] RoomleEmbeddingApi.setupHi() is deprecated and will be removed.
|
|
455
459
|
Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryIdOrOptions, callbacks);`
|
|
456
|
-
), this.hiMessageHandler && window.removeEventListener("message", this.hiMessageHandler), this.hiMessageHandler = (
|
|
457
|
-
if (
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
+
), this.hiMessageHandler && window.removeEventListener("message", this.hiMessageHandler), this.hiMessageHandler = (r) => {
|
|
461
|
+
if (r.data.type === "connect_hi" && r.data.port) {
|
|
462
|
+
const t = r.data.port;
|
|
463
|
+
t.start?.(), x(k(e), t);
|
|
460
464
|
}
|
|
461
465
|
}, window.addEventListener("message", this.hiMessageHandler);
|
|
462
466
|
}
|
|
463
|
-
static async _create(e,
|
|
464
|
-
return new Promise(async (
|
|
467
|
+
static async _create(e, r, t, o) {
|
|
468
|
+
return new Promise(async (n, a) => {
|
|
465
469
|
try {
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
470
|
+
const i = z(t), l = C();
|
|
471
|
+
v(l);
|
|
472
|
+
const u = E(
|
|
473
|
+
l,
|
|
474
|
+
i
|
|
475
|
+
), d = await j(
|
|
472
476
|
e,
|
|
473
|
-
|
|
477
|
+
u
|
|
474
478
|
);
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
+
t = Q(
|
|
480
|
+
d,
|
|
481
|
+
i
|
|
482
|
+
);
|
|
483
|
+
const g = new this(
|
|
484
|
+
d,
|
|
479
485
|
r,
|
|
486
|
+
t,
|
|
480
487
|
o,
|
|
481
|
-
|
|
488
|
+
n
|
|
482
489
|
);
|
|
483
|
-
return await Promise.allSettled(
|
|
484
|
-
} catch (
|
|
485
|
-
return a(
|
|
490
|
+
return await Promise.allSettled(g.pluginsLoaded), g;
|
|
491
|
+
} catch (i) {
|
|
492
|
+
return a(i);
|
|
486
493
|
}
|
|
487
494
|
});
|
|
488
495
|
}
|
|
@@ -491,39 +498,39 @@ Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryId
|
|
|
491
498
|
_configuratorSettings;
|
|
492
499
|
_initData = {};
|
|
493
500
|
_iframe;
|
|
494
|
-
constructor(e,
|
|
501
|
+
constructor(e, r, t, o, n) {
|
|
495
502
|
if (super(), !e || typeof e.id != "string")
|
|
496
503
|
throw new Error(
|
|
497
504
|
"Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person"
|
|
498
505
|
);
|
|
499
|
-
if (_.has(
|
|
506
|
+
if (_.has(r))
|
|
500
507
|
throw new Error("There is already an instance on this DOM element");
|
|
501
508
|
if (!!!document.getElementById(N)) {
|
|
502
|
-
const u =
|
|
509
|
+
const u = t.zIndex || 9999999, d = document.createElement("style");
|
|
503
510
|
d.type = "text/css", d.id = N;
|
|
504
511
|
const g = "transition:all ease-in-out " + ee + "ms;", m = ["-webkit-", "-o-"].reduce(
|
|
505
|
-
(
|
|
512
|
+
(F, B) => F += B + g,
|
|
506
513
|
""
|
|
507
|
-
) + g,
|
|
514
|
+
) + g, P = D();
|
|
508
515
|
d.innerHTML = `
|
|
509
|
-
.${c.CONTAINER}{${
|
|
516
|
+
.${c.CONTAINER}{${S}:${P};}
|
|
510
517
|
.${c.POSITION}{position:fixed;top:0;left:0;z-index:${u};opacity:0}
|
|
511
518
|
.${c.TRANSITION}{${m}}
|
|
512
519
|
.${c.FILL}{width:100%;height:100%;opacity:1}
|
|
513
|
-
.${c.ANDROID_HEIGHT}{height:calc(var(${
|
|
520
|
+
.${c.ANDROID_HEIGHT}{height:calc(var(${S},1vh)*100)}
|
|
514
521
|
.${c.OVERFLOW_HIDDEN}{overflow:hidden}
|
|
515
522
|
`, document.head.appendChild(d);
|
|
516
523
|
}
|
|
517
524
|
this._executeMessage = this._executeMessage.bind(this);
|
|
518
|
-
const
|
|
525
|
+
const i = new A(
|
|
519
526
|
"website",
|
|
520
527
|
window,
|
|
521
528
|
null,
|
|
522
529
|
this._executeMessage
|
|
523
530
|
);
|
|
524
|
-
this.setMessageHandler(
|
|
531
|
+
this.setMessageHandler(i), this._onResize = this._onResize.bind(this), I() && window.addEventListener("resize", this._onResize), this._container = r, this._initData = t, this._configuratorSettings = e;
|
|
525
532
|
const l = this._createIframe();
|
|
526
|
-
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe =
|
|
533
|
+
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = n, this._container.appendChild(l), this._iframe = l, this.setupPlugins(o, this._iframe), _.set(r, !0);
|
|
527
534
|
}
|
|
528
535
|
teardown() {
|
|
529
536
|
this._container && _.delete(this._container);
|
|
@@ -532,21 +539,21 @@ Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryId
|
|
|
532
539
|
}
|
|
533
540
|
_createIframe() {
|
|
534
541
|
const e = document.createElement("iframe");
|
|
535
|
-
let
|
|
536
|
-
return this._initData.useLocalRoomle && (
|
|
542
|
+
let r = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
543
|
+
return this._initData.useLocalRoomle && (r = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (r = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (r = this._initData.overrideServerUrl), e.src = r, e.classList.add(c.CONTAINER), e.classList.add(c.FILL), e;
|
|
537
544
|
}
|
|
538
545
|
_onResize() {
|
|
539
546
|
y(this._iframe);
|
|
540
547
|
}
|
|
541
548
|
_onUseFullPage() {
|
|
542
|
-
this._iframe.classList.add(c.POSITION), document.documentElement.classList.add(c.OVERFLOW_HIDDEN), window.document.body.classList.add(c.OVERFLOW_HIDDEN),
|
|
549
|
+
this._iframe.classList.add(c.POSITION), document.documentElement.classList.add(c.OVERFLOW_HIDDEN), window.document.body.classList.add(c.OVERFLOW_HIDDEN), I() && (y(this._iframe), this._iframe.classList.add(c.ANDROID_HEIGHT));
|
|
543
550
|
}
|
|
544
551
|
_onBackToWebsite() {
|
|
545
552
|
this._iframe.classList.remove(c.POSITION), this._iframe.classList.remove(c.ANDROID_HEIGHT), document.documentElement.classList.remove(c.OVERFLOW_HIDDEN), window.document.body.classList.remove(c.OVERFLOW_HIDDEN);
|
|
546
553
|
}
|
|
547
|
-
_executeMessage({ message: e, args:
|
|
548
|
-
if (
|
|
549
|
-
return e === p.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(
|
|
554
|
+
_executeMessage({ message: e, args: r }, t) {
|
|
555
|
+
if (t.source && t.source === this._iframe?.contentWindow)
|
|
556
|
+
return e === p.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(t.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === p.SETUP ? (this.handleSetup(r[0]), R(
|
|
550
557
|
this.ui.callbacks,
|
|
551
558
|
"onUseFullPage",
|
|
552
559
|
this._onUseFullPage
|
|
@@ -560,18 +567,18 @@ Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryId
|
|
|
560
567
|
return;
|
|
561
568
|
}
|
|
562
569
|
this._messageHandler.sendMessage(p.WEBSITE_READY);
|
|
563
|
-
}, 0), Promise.resolve({ result: null })) : this.executeMessage({ message: e, args:
|
|
570
|
+
}, 0), Promise.resolve({ result: null })) : this.executeMessage({ message: e, args: r });
|
|
564
571
|
}
|
|
565
572
|
}
|
|
566
573
|
export {
|
|
567
574
|
p as HANDSHAKE_MESSAGES,
|
|
568
|
-
|
|
569
|
-
|
|
575
|
+
ie as INTERACTION_CONTAINER_SELECTOR,
|
|
576
|
+
O as NAMESPACE,
|
|
570
577
|
h as NAMESPACE_SEPARATOR,
|
|
571
578
|
oe as SDK_CALLBACK,
|
|
572
579
|
f as WELL_KNOWN_MESSAGES,
|
|
573
580
|
ae as default,
|
|
574
581
|
j as getConfiguratorSettings,
|
|
575
|
-
|
|
582
|
+
ne as getMethodNames,
|
|
576
583
|
Z as isExposable
|
|
577
584
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expose as e}from"./comlink-CmT64Qi3.mjs";import{g as t}from"./browser-BhHw2H1M.mjs";import{c as s}from"./utils-BqTPLNLs.mjs";class r{_side;_incomingMessageBus=null;_outgoingMessageBus=null;_execMessage=null;constructor(e,t,s,r){this._side=e,this._incomingMessageBus=t,this._outgoingMessageBus=s,this._execMessage=r,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(e){this._outgoingMessageBus=e}setMessageExecution(e){this._execMessage=e}sendMessage(e,t=[]){return new Promise((s,r)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return s(void 0);const i=new MessageChannel;i.port1.onmessage=e=>{if(!e||!e.data)return i.port1.close(),i.port2.close(),r(new Error(this._side+" received message but response can not be interpreted"));let t;try{t=JSON.parse(e.data)}catch(e){return i.port1.close(),i.port2.close(),this._prepareError(e),r(e)}t.error?r(t.error):void 0!==t.result?s(t.result):s(void 0),i.port1.close(),i.port2.close()};let a="";try{a=JSON.stringify({message:e,args:t})}catch{return r(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return r(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(a,"*",[i.port2])})}_handleMessage(e){const t=e.ports&&Array.isArray(e.ports)&&e.ports.length>0?e.ports[0]:null;if(e.data&&("string"==typeof e.data||"connect_hi"!==e.data.type)&&t)try{const s=JSON.parse(e.data);if(!this._execMessage)return t.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(s.args)||(s.args=[s.args]);const r=this._execMessage(s,e);if(void 0===r)return;r.then((e={})=>{let s,r;"object"==typeof e&&null!==e&&(s=e.error,r=e.result),s?t.postMessage(JSON.stringify({error:s})):void 0!==r?t.postMessage(JSON.stringify({result:r})):t.postMessage(JSON.stringify({result:e}))},e=>{t.postMessage(JSON.stringify({error:this._prepareError(e)}))})}catch(e){t.postMessage(JSON.stringify({error:this._prepareError(e)}))}}_prepareError(e){return"string"==typeof e?this._side+": "+e:(e.message=this._side+": "+e.message,e.message)}}const i=["127.0.0.1","localhost","0.0.0.0"],a=(e,t)=>{for(const s in t)try{t[s].constructor===Object?e[s]=a(e[s],t[s]):e[s]=t[s]}catch{e[s]=t[s]}return e};var n=(e=>(e.BOTTOM_BAR="bottom_bar",e.PARTLIST_BOUNDS="partlist_bounds",e.INTERACTION_NOTES="interaction_notes",e.PARAMETER_GROUPS="parameter_groups",e))(n||{});const o={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[n.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!0,enableTwoLevelCatalog:!1,webGpu:!1,localExport3d:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},l=e=>{if(!e)return;const t=Object.keys(e);for(const s of t){const t=e[s];if(!Array.isArray(t)&&"object"==typeof t&&null!==t&&l(t),Array.isArray(t))for(const e of t)l(e);("true"===t||"false"===t)&&(e[s]="true"===t)}},c=()=>/(android)/i.test(navigator.userAgent);class u{_messageHandler=null;isSetupDone=!1;viewName="main";plugins={};pluginsLoaded=[];ui={callbacks:null};extended={callbacks:null};configurator={callbacks:null};analytics={callbacks:{}};rapi={callbacks:{}};global={callbacks:{}};setMessageHandler(e){this._messageHandler=e}handleSetup(e){const{methods:t,callbacks:s}=e;t.forEach(e=>{const t=e.split(h),s=t[0],r=t[1];this[s]||(this[s]={}),this[s][r]=function(){if(this._messageHandler)return this._messageHandler.sendMessage(e,[...arguments])}.bind(this)}),s.forEach(e=>{const t=e.split(h),s=t[0],r=t[1],i=t[2];this[s]||(this[s]={}),this[s][r]||(this[s][r]={}),this[s][r][i]=()=>{}}),this.isSetupDone=!0}executeMessage({message:e,args:t}){const s=e.split(h),r=s[0],i=s[1],a=3===s.length?s[2]:null;if(a&&this[r][i][a]){const e=this[r][i][a](...t);return e instanceof Promise?e.then(e=>({result:e})):void 0!==e?Promise.resolve({result:e}):Promise.resolve({result:null})}return Promise.reject('Message "'+e+'" is unkown')}setupPlugins(e,t,s="website"){for(const r of e)"string"==typeof r&&"dragIn"===r?this.pluginsLoaded.push(new Promise((e,r)=>{try{import("./embedding-plugins-DLVs7ER4.mjs").then(e=>e.l).then(({DragIn:i})=>{const a=new i(this.ui,t,s,this.viewName);a.init().then(()=>{this.plugins.dragIn=a,e()},r)})}catch(e){r(e)}})):r.name&&r.loader&&this.pluginsLoaded.push(new Promise((e,i)=>{try{r.loader().then(a=>{const n=new a(this.ui,t,s,this.viewName);n.init().then(()=>{this.plugins[r.name]=n,e()},i)})}catch(e){i(e)}}))}}const d=()=>{let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}},g={SDK:"extended",CONFIGURATOR_SDK:"configurator",CALLBACKS:"callbacks",UI:"ui",ANALYTICS:"analytics",GLOBAL:"global",RAPI:"rapi"},h=".",m=g.SDK+h+g.CALLBACKS,p={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},_={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},f=["constructor","callbacks"],w=e=>"_"!==e[0]&&!f.includes(e),E=(e,t,s=!1)=>{if(!e)return[];const r=Object.getOwnPropertyNames(e),i=s?g.CALLBACKS+h:"";return r.filter(w).map(e=>t+h+i+e)},S=async(e,t)=>{if("string"!=typeof e)throw new Error('Configurator ID is not a string type: "'+typeof e+'"');const s=t.customApiUrl?t.customApiUrl:"https://api.roomle.com/v2",r=t.overrideTenant||9,i=s+"/configurators/"+e,a="roomle_portal_v2",n="03-"+window.btoa((new Date).toISOString()+";anonymous;"+a),o=new Request(i,{method:"GET",headers:new Headers({apiKey:a,currentTenant:r,locale:"en",language:"en",device:1,token:n,platform:"web"}),mode:"cors",cache:"default"}),l=await fetch(o),{configurator:c}=await l.json();return c},M="data-rml-interaction-container",b=(e,t,s)=>{let r=null;Object.defineProperty(e,t,{get:()=>r||s,set(e){r=e?.mute?e.value:e}})},y=()=>.01*window.innerHeight+"px",T=e=>{e&&setTimeout(()=>e.style.setProperty(v,y()),0)},O="rml-styles",v="--rml-full-height",A="rml-container",N="rml-fill",R="rml-pos",I="rml-android-height",L="rml-overflow-hidden",C=new Map;class P extends u{static createPlanner(e,t,s,r=[]){return this._create(e,t,s,r)}static async connect(e,t=[]){const s=new u;s.viewName=e;const{resolve:i,promise:a}=d(),{resolve:n,promise:o}=d(),l=new r("custom-view-"+e,window,window.parent,({message:e,args:t})=>{switch(e){case _.REGISTER_CUSTOM_VIEW_DONE:i();break;case _.RETURN_METHODS:s.handleSetup(t[0]),n();break;default:if(s.isSetupDone)return s.executeMessage({message:e,args:t})}});s.setMessageHandler(l);const c=[e];return l.sendMessage(_.REGISTER_CUSTOM_VIEW,c),await a,l.sendMessage(_.GET_METHODS,c),await o,s.setupPlugins(t,document.body,"custom-view"),await Promise.allSettled(s.pluginsLoaded),s}static createConfigurator(e,t,s,r=[]){return this._create(e,t,s,r)}static create(e,t,s,r){return this._create(e,t,s,r)}static createViewer(e,t,s,r=[]){return this._create(e,t,s,r)}static hiMessageHandler=null;static setupHi(t){this.hiMessageHandler&&window.removeEventListener("message",this.hiMessageHandler),this.hiMessageHandler=r=>{if("connect_hi"===r.data.type&&r.data.port){const i=r.data.port;i.start?.(),e(s(t),i)}},window.addEventListener("message",this.hiMessageHandler)}static async _create(e,s,r,n){return new Promise(async(c,u)=>{try{const u=a((()=>{const e=(e=>JSON.parse(JSON.stringify(e)))(o);e.locale||(e.locale=t(null,!0)),"(idle)"===e.id&&delete e.id;const s=(()=>{const e=(()=>{try{return window.self!==window.top}catch{return!0}})();let t=window.location.href;if(e){if(!document.referrer)return null;t=document.referrer}const{hostname:s}=new URL(t);return s})();return s&&(e=>{const t=new RegExp(/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/);return!!(i.includes(e)||t.test(e)||e.endsWith("roomle.com")||e.endsWith("gitlab.io")||e.endsWith("gitlab.com"))})(s)&&(e.configuratorId="demoConfigurator"),e.customApiUrl=void 0,e.emails=!1,e})(),(l(d=r),d?.customApiUrl&&(d.customApiUrl=decodeURIComponent(d.customApiUrl)),d.shareUrl&&(d.deeplink=d.shareUrl.replace("<CONF_ID>","#CONFIGURATIONID#")),d));(e=>{e.featureFlags||(e.featureFlags={}),"boolean"!=typeof e.featureFlags.realPartList&&(e.featureFlags.realPartList=!0),"boolean"!=typeof e.featureFlags.globalCallbacks&&(e.featureFlags.globalCallbacks=!0),"boolean"!=typeof e.featureFlags.mocAr&&(e.featureFlags.mocAr=!1)})(u);const g=await S(e,u);r=((e,t)=>{t.configuratorId=e.id;const s=e.settings||{};return!t.overrideTenant&&e.tenant&&(t.overrideTenant=e.tenant),((e,t)=>{const s=JSON.parse(JSON.stringify(e));return a(s,t)})(s,t)})(g,u);const h=new this(g,s,r,n,c);return await Promise.allSettled(h.pluginsLoaded),h}catch(e){return u(e)}var d})}_waitForIframe;_container;_configuratorSettings;_initData={};_iframe;constructor(e,t,s,i,a){if(super(),!e||"string"!=typeof e.id)throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(C.has(t))throw new Error("There is already an instance on this DOM element");if(!document.getElementById(O)){const e=s.zIndex||9999999,t=document.createElement("style");t.type="text/css",t.id=O;const r="transition:all ease-in-out 450ms;",i=["-webkit-","-o-"].reduce((e,t)=>e+(t+r),"")+r,a=y();t.innerHTML=`\n .${A}{${v}:${a};}\n .${R}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${N}{width:100%;height:100%;opacity:1}\n .${I}{height:calc(var(${v},1vh)*100)}\n .${L}{overflow:hidden}\n `,document.head.appendChild(t)}this._executeMessage=this._executeMessage.bind(this);const n=new r("website",window,null,this._executeMessage);this.setMessageHandler(n),this._onResize=this._onResize.bind(this),c()&&window.addEventListener("resize",this._onResize),this._container=t,this._initData=s,this._configuratorSettings=e;const o=this._createIframe();this._onUseFullPage=this._onUseFullPage.bind(this),this._onBackToWebsite=this._onBackToWebsite.bind(this),this._waitForIframe=a,this._container.appendChild(o),this._iframe=o,this.setupPlugins(i,this._iframe),C.set(t,!0)}teardown(){this._container&&C.delete(this._container);const e=this._container.querySelector("iframe");e&&this._container.removeChild(e),window.removeEventListener("resize",this._onResize)}_createIframe(){const e=document.createElement("iframe");let t=this._configuratorSettings?.url||"https://www.roomle.com/t/cp/";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(A),e.classList.add(N),e}_onResize(){T(this._iframe)}_onUseFullPage(){this._iframe.classList.add(R),document.documentElement.classList.add(L),window.document.body.classList.add(L),c()&&(T(this._iframe),this._iframe.classList.add(I))}_onBackToWebsite(){this._iframe.classList.remove(R),this._iframe.classList.remove(I),document.documentElement.classList.remove(L),window.document.body.classList.remove(L)}_executeMessage({message:e,args:t},s){if(s.source&&s.source===this._iframe?.contentWindow)return e===p.REQUEST_BOOT?this._messageHandler?(this._messageHandler.setOutgoingMessageBus(s.source),Promise.resolve({result:this._initData})):Promise.resolve({error:"MessageHandler not set"}):e===p.SETUP?(this.handleSetup(t[0]),b(this.ui.callbacks,"onUseFullPage",this._onUseFullPage),b(this.ui.callbacks,"onBackToWebsite",this._onBackToWebsite),this._waitForIframe(this),setTimeout(()=>{this._messageHandler&&this._messageHandler.sendMessage(p.WEBSITE_READY)},0),Promise.resolve({result:null})):this.executeMessage({message:e,args:t})}}export{p as HANDSHAKE_MESSAGES,M as INTERACTION_CONTAINER_SELECTOR,g as NAMESPACE,h as NAMESPACE_SEPARATOR,m as SDK_CALLBACK,_ as WELL_KNOWN_MESSAGES,P as default,S as getConfiguratorSettings,E as getMethodNames,w as isExposable};
|
|
1
|
+
import{expose as e}from"./comlink-CmT64Qi3.mjs";import{g as t}from"./browser-BhHw2H1M.mjs";import{c as s}from"./utils-BqTPLNLs.mjs";class r{_side;_incomingMessageBus=null;_outgoingMessageBus=null;_execMessage=null;constructor(e,t,s,r){this._side=e,this._incomingMessageBus=t,this._outgoingMessageBus=s,this._execMessage=r,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(e){this._outgoingMessageBus=e}setMessageExecution(e){this._execMessage=e}sendMessage(e,t=[]){return new Promise((s,r)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return s(void 0);const i=new MessageChannel;i.port1.onmessage=e=>{if(!e||!e.data)return i.port1.close(),i.port2.close(),r(new Error(this._side+" received message but response can not be interpreted"));let t;try{t=JSON.parse(e.data)}catch(e){return i.port1.close(),i.port2.close(),this._prepareError(e),r(e)}t.error?r(t.error):void 0!==t.result?s(t.result):s(void 0),i.port1.close(),i.port2.close()};let a="";try{a=JSON.stringify({message:e,args:t})}catch{return r(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return r(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(a,"*",[i.port2])})}_handleMessage(e){const t=e.ports&&Array.isArray(e.ports)&&e.ports.length>0?e.ports[0]:null;if(e.data&&("string"==typeof e.data||"connect_hi"!==e.data.type)&&t)try{const s=JSON.parse(e.data);if(!this._execMessage)return t.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(s.args)||(s.args=[s.args]);const r=this._execMessage(s,e);if(void 0===r)return;r.then((e={})=>{let s,r;"object"==typeof e&&null!==e&&(s=e.error,r=e.result),s?t.postMessage(JSON.stringify({error:s})):void 0!==r?t.postMessage(JSON.stringify({result:r})):t.postMessage(JSON.stringify({result:e}))},e=>{t.postMessage(JSON.stringify({error:this._prepareError(e)}))})}catch(e){t.postMessage(JSON.stringify({error:this._prepareError(e)}))}}_prepareError(e){return"string"==typeof e?this._side+": "+e:(e.message=this._side+": "+e.message,e.message)}}const i=["127.0.0.1","localhost","0.0.0.0"],a=(e,t)=>{const s=JSON.parse(JSON.stringify(e));return n(s,t)},n=(e,t)=>{for(const s in t)try{t[s].constructor===Object?e[s]=n(e[s],t[s]):e[s]=t[s]}catch{e[s]=t[s]}return e};var o=(e=>(e.BOTTOM_BAR="bottom_bar",e.PARTLIST_BOUNDS="partlist_bounds",e.INTERACTION_NOTES="interaction_notes",e.PARAMETER_GROUPS="parameter_groups",e))(o||{});const l=e=>JSON.parse(JSON.stringify(e)),c={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[o.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!0,enableTwoLevelCatalog:!1,webGpu:!1,localExport3d:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},u=e=>{if(!e)return;const t=Object.keys(e);for(const s of t){const t=e[s];if(!Array.isArray(t)&&"object"==typeof t&&null!==t&&u(t),Array.isArray(t))for(const e of t)u(e);("true"===t||"false"===t)&&(e[s]="true"===t)}},d=()=>{const e=l(c);e.locale||(e.locale=t(null,!0)),"(idle)"===e.id&&delete e.id;const s=(()=>{const e=(()=>{try{return window.self!==window.top}catch{return!0}})();let t=window.location.href;if(e){if(!document.referrer)return null;t=document.referrer}const{hostname:s}=new URL(t);return s})();return s&&(e=>{const t=new RegExp(/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/);return!!(i.includes(e)||t.test(e)||e.endsWith("roomle.com")||e.endsWith("gitlab.io")||e.endsWith("gitlab.com"))})(s)&&(e.configuratorId="demoConfigurator"),e.customApiUrl="https://rubens.alpha.roomle.com/api/v2",e.emails=!1,e},g=e=>{e.featureFlags||(e.featureFlags={}),"boolean"!=typeof e.featureFlags.realPartList&&(e.featureFlags.realPartList=!0),"boolean"!=typeof e.featureFlags.globalCallbacks&&(e.featureFlags.globalCallbacks=!0),"boolean"!=typeof e.featureFlags.mocAr&&(e.featureFlags.mocAr=!1)},h=()=>/(android)/i.test(navigator.userAgent);class m{_messageHandler=null;isSetupDone=!1;viewName="main";plugins={};pluginsLoaded=[];ui={callbacks:null};extended={callbacks:null};configurator={callbacks:null};analytics={callbacks:{}};rapi={callbacks:{}};global={callbacks:{}};setMessageHandler(e){this._messageHandler=e}handleSetup(e){const{methods:t,callbacks:s}=e;t.forEach(e=>{const t=e.split(f),s=t[0],r=t[1];this[s]||(this[s]={}),this[s][r]=function(){if(this._messageHandler)return this._messageHandler.sendMessage(e,[...arguments])}.bind(this)}),s.forEach(e=>{const t=e.split(f),s=t[0],r=t[1],i=t[2];this[s]||(this[s]={}),this[s][r]||(this[s][r]={}),this[s][r][i]=()=>{}}),this.isSetupDone=!0}executeMessage({message:e,args:t}){const s=e.split(f),r=s[0],i=s[1],a=3===s.length?s[2]:null;if(a&&this[r][i][a]){const e=this[r][i][a](...t);return e instanceof Promise?e.then(e=>({result:e})):void 0!==e?Promise.resolve({result:e}):Promise.resolve({result:null})}return Promise.reject('Message "'+e+'" is unkown')}setupPlugins(e,t,s="website"){for(const r of e)"string"==typeof r&&"dragIn"===r?this.pluginsLoaded.push(new Promise((e,r)=>{try{import("./embedding-plugins-DLVs7ER4.mjs").then(e=>e.l).then(({DragIn:i})=>{const a=new i(this.ui,t,s,this.viewName);a.init().then(()=>{this.plugins.dragIn=a,e()},r)})}catch(e){r(e)}})):r.name&&r.loader&&this.pluginsLoaded.push(new Promise((e,i)=>{try{r.loader().then(a=>{const n=new a(this.ui,t,s,this.viewName);n.init().then(()=>{this.plugins[r.name]=n,e()},i)})}catch(e){i(e)}}))}}const p=()=>{let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}},_={SDK:"extended",CONFIGURATOR_SDK:"configurator",CALLBACKS:"callbacks",UI:"ui",ANALYTICS:"analytics",GLOBAL:"global",RAPI:"rapi"},f=".",w=_.SDK+f+_.CALLBACKS,E={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},S={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},M=["constructor","callbacks"],b=e=>"_"!==e[0]&&!M.includes(e),y=(e,t,s=!1)=>{if(!e)return[];const r=Object.getOwnPropertyNames(e),i=s?_.CALLBACKS+f:"";return r.filter(b).map(e=>t+f+i+e)},T=async(e,t)=>{if("string"!=typeof e)throw new Error('Configurator ID is not a string type: "'+typeof e+'"');const s=t.customApiUrl?t.customApiUrl:"https://api.roomle.com/v2",r=t.overrideTenant||9,i=s+"/configurators/"+e,a="roomle_portal_v2",n="03-"+window.btoa((new Date).toISOString()+";anonymous;"+a),o=new Request(i,{method:"GET",headers:new Headers({apiKey:a,currentTenant:r,locale:"en",language:"en",device:1,token:n,platform:"web"}),mode:"cors",cache:"default"}),l=await fetch(o),{configurator:c}=await l.json();return c},O="data-rml-interaction-container",v=(e,t,s)=>{let r=null;Object.defineProperty(e,t,{get:()=>r||s,set(e){r=e?.mute?e.value:e}})},A=()=>.01*window.innerHeight+"px",N=e=>{e&&setTimeout(()=>e.style.setProperty(I,A()),0)},R="rml-styles",I="--rml-full-height",L="rml-container",C="rml-fill",P="rml-pos",B="rml-android-height",D="rml-overflow-hidden",U=new Map;class H extends m{static createPlanner(e,t,s,r=[]){return this._create(e,t,s,r)}static async connect(e,t=[]){const s=new m;s.viewName=e;const{resolve:i,promise:a}=p(),{resolve:n,promise:o}=p(),l=new r("custom-view-"+e,window,window.parent,({message:e,args:t})=>{switch(e){case S.REGISTER_CUSTOM_VIEW_DONE:i();break;case S.RETURN_METHODS:s.handleSetup(t[0]),n();break;default:if(s.isSetupDone)return s.executeMessage({message:e,args:t})}});s.setMessageHandler(l);const c=[e];return l.sendMessage(S.REGISTER_CUSTOM_VIEW,c),await a,l.sendMessage(S.GET_METHODS,c),await o,s.setupPlugins(t,document.body,"custom-view"),await Promise.allSettled(s.pluginsLoaded),s}static createConfigurator(e,t,s,r=[]){return this._create(e,t,s,r)}static create(e,t,s,r){return this._create(e,t,s,r)}static createViewer(e,t,s,r=[]){return this._create(e,t,s,r)}static hiMessageHandler=null;static setupHi(t){this.hiMessageHandler&&window.removeEventListener("message",this.hiMessageHandler),this.hiMessageHandler=r=>{if("connect_hi"===r.data.type&&r.data.port){const i=r.data.port;i.start?.(),e(s(t),i)}},window.addEventListener("message",this.hiMessageHandler)}static async _create(e,t,s,r){return new Promise(async(i,n)=>{try{const n=(u(o=s),o?.customApiUrl&&(o.customApiUrl=decodeURIComponent(o.customApiUrl)),o.shareUrl&&(o.deeplink=o.shareUrl.replace("<CONF_ID>","#CONFIGURATIONID#")),o),c=d();g(c);const h=a(c,n),m=await T(e,h);s=((e,t)=>{const s=l(t),r=d();g(r);const i=e.settings||{},n=a(a(r,i),s);return n.configuratorId=e.id,!n.overrideTenant&&e.tenant&&(n.overrideTenant=e.tenant),n})(m,n);const p=new this(m,t,s,r,i);return await Promise.allSettled(p.pluginsLoaded),p}catch(e){return n(e)}var o})}_waitForIframe;_container;_configuratorSettings;_initData={};_iframe;constructor(e,t,s,i,a){if(super(),!e||"string"!=typeof e.id)throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(U.has(t))throw new Error("There is already an instance on this DOM element");if(!document.getElementById(R)){const e=s.zIndex||9999999,t=document.createElement("style");t.type="text/css",t.id=R;const r="transition:all ease-in-out 450ms;",i=["-webkit-","-o-"].reduce((e,t)=>e+(t+r),"")+r,a=A();t.innerHTML=`\n .${L}{${I}:${a};}\n .${P}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${C}{width:100%;height:100%;opacity:1}\n .${B}{height:calc(var(${I},1vh)*100)}\n .${D}{overflow:hidden}\n `,document.head.appendChild(t)}this._executeMessage=this._executeMessage.bind(this);const n=new r("website",window,null,this._executeMessage);this.setMessageHandler(n),this._onResize=this._onResize.bind(this),h()&&window.addEventListener("resize",this._onResize),this._container=t,this._initData=s,this._configuratorSettings=e;const o=this._createIframe();this._onUseFullPage=this._onUseFullPage.bind(this),this._onBackToWebsite=this._onBackToWebsite.bind(this),this._waitForIframe=a,this._container.appendChild(o),this._iframe=o,this.setupPlugins(i,this._iframe),U.set(t,!0)}teardown(){this._container&&U.delete(this._container);const e=this._container.querySelector("iframe");e&&this._container.removeChild(e),window.removeEventListener("resize",this._onResize)}_createIframe(){const e=document.createElement("iframe");let t=this._configuratorSettings?.url||"https://www.roomle.com/t/cp/";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(L),e.classList.add(C),e}_onResize(){N(this._iframe)}_onUseFullPage(){this._iframe.classList.add(P),document.documentElement.classList.add(D),window.document.body.classList.add(D),h()&&(N(this._iframe),this._iframe.classList.add(B))}_onBackToWebsite(){this._iframe.classList.remove(P),this._iframe.classList.remove(B),document.documentElement.classList.remove(D),window.document.body.classList.remove(D)}_executeMessage({message:e,args:t},s){if(s.source&&s.source===this._iframe?.contentWindow)return e===E.REQUEST_BOOT?this._messageHandler?(this._messageHandler.setOutgoingMessageBus(s.source),Promise.resolve({result:this._initData})):Promise.resolve({error:"MessageHandler not set"}):e===E.SETUP?(this.handleSetup(t[0]),v(this.ui.callbacks,"onUseFullPage",this._onUseFullPage),v(this.ui.callbacks,"onBackToWebsite",this._onBackToWebsite),this._waitForIframe(this),setTimeout(()=>{this._messageHandler&&this._messageHandler.sendMessage(E.WEBSITE_READY)},0),Promise.resolve({result:null})):this.executeMessage({message:e,args:t})}}export{E as HANDSHAKE_MESSAGES,O as INTERACTION_CONTAINER_SELECTOR,_ as NAMESPACE,f as NAMESPACE_SEPARATOR,w as SDK_CALLBACK,S as WELL_KNOWN_MESSAGES,H as default,T as getConfiguratorSettings,y as getMethodNames,b as isExposable};
|