@roomle/embedding-lib 6.5.0-alpha.3 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,26 +1,81 @@
|
|
|
1
|
-
## 6.5.0
|
|
1
|
+
## 6.5.0 (2026-03-25)
|
|
2
2
|
|
|
3
|
+
* Initial plan ([8186de5](https://github.com/roomle-dev/roomle-ui/commit/8186de5))
|
|
3
4
|
* Initial plan ([82067d7](https://github.com/roomle-dev/roomle-ui/commit/82067d7))
|
|
5
|
+
* Merge branch 'feat/add-flag-for-mesh-raycasting' of github.com:roomle-dev/roomle-ui into feat/add-fl ([f625052](https://github.com/roomle-dev/roomle-ui/commit/f625052))
|
|
6
|
+
* Merge branch 'master' into chore/build-examples-alpha-stage ([b6e6487](https://github.com/roomle-dev/roomle-ui/commit/b6e6487))
|
|
7
|
+
* Merge branch 'master' into chore/build-examples-alpha-stage ([829fe56](https://github.com/roomle-dev/roomle-ui/commit/829fe56))
|
|
8
|
+
* Merge branch 'master' into copilot/fix-buttons-partlist-planner-issue ([7286159](https://github.com/roomle-dev/roomle-ui/commit/7286159))
|
|
4
9
|
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([0a53891](https://github.com/roomle-dev/roomle-ui/commit/0a53891))
|
|
5
10
|
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([4d5ab99](https://github.com/roomle-dev/roomle-ui/commit/4d5ab99))
|
|
6
11
|
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([b288d9b](https://github.com/roomle-dev/roomle-ui/commit/b288d9b))
|
|
7
12
|
* Merge branch 'master' into copilot/upgrade-web-sdk-to-strict-null-checks ([ca2799c](https://github.com/roomle-dev/roomle-ui/commit/ca2799c))
|
|
13
|
+
* Merge branch 'master' into docs/pos-group ([2515b0a](https://github.com/roomle-dev/roomle-ui/commit/2515b0a))
|
|
14
|
+
* Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([b0ceb0e](https://github.com/roomle-dev/roomle-ui/commit/b0ceb0e))
|
|
15
|
+
* Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([f0820ff](https://github.com/roomle-dev/roomle-ui/commit/f0820ff))
|
|
16
|
+
* Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([18399be](https://github.com/roomle-dev/roomle-ui/commit/18399be))
|
|
17
|
+
* Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([194a955](https://github.com/roomle-dev/roomle-ui/commit/194a955))
|
|
18
|
+
* Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([678d0b4](https://github.com/roomle-dev/roomle-ui/commit/678d0b4))
|
|
19
|
+
* Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([cb1a6e5](https://github.com/roomle-dev/roomle-ui/commit/cb1a6e5))
|
|
20
|
+
* Merge branch 'master' into fix/close-icon-on-mobile-RML-16254 ([ca6c9a7](https://github.com/roomle-dev/roomle-ui/commit/ca6c9a7))
|
|
21
|
+
* Merge branch 'master' into fix/close-icon-on-mobile-RML-16254 ([5f6f231](https://github.com/roomle-dev/roomle-ui/commit/5f6f231))
|
|
22
|
+
* Merge branch 'master' into fix/decimal-range-parameter-RML-16233 ([0c2f781](https://github.com/roomle-dev/roomle-ui/commit/0c2f781))
|
|
23
|
+
* Merge branch 'master' into fix/decimal-range-parameter-RML-16233 ([66ef3cd](https://github.com/roomle-dev/roomle-ui/commit/66ef3cd))
|
|
24
|
+
* Merge branch 'master' into fix/hi-examples-use-server-proxy ([5d66de7](https://github.com/roomle-dev/roomle-ui/commit/5d66de7))
|
|
25
|
+
* Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([39e60d1](https://github.com/roomle-dev/roomle-ui/commit/39e60d1))
|
|
26
|
+
* Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([de2a680](https://github.com/roomle-dev/roomle-ui/commit/de2a680))
|
|
27
|
+
* Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([1dd07a3](https://github.com/roomle-dev/roomle-ui/commit/1dd07a3))
|
|
28
|
+
* Merge branch 'master' into fix/override-translations-RML-16228 ([5c313ee](https://github.com/roomle-dev/roomle-ui/commit/5c313ee))
|
|
29
|
+
* Merge branch 'master' into fix/override-translations-RML-16228 ([e16c840](https://github.com/roomle-dev/roomle-ui/commit/e16c840))
|
|
30
|
+
* Merge branch 'master' into fix/product-dimension-after-update ([7611522](https://github.com/roomle-dev/roomle-ui/commit/7611522))
|
|
31
|
+
* Merge branch 'master' into fix/product-dimension-after-update ([6d049b2](https://github.com/roomle-dev/roomle-ui/commit/6d049b2))
|
|
32
|
+
* Merge branch 'master' into fix/product-dimension-after-update ([ee8d143](https://github.com/roomle-dev/roomle-ui/commit/ee8d143))
|
|
8
33
|
* Merge branch 'master' into fix/set-only-selected-floor-color ([ae946c7](https://github.com/roomle-dev/roomle-ui/commit/ae946c7))
|
|
34
|
+
* Merge branch 'master' into upgraded-by-ci/core-2.72.0-alpha.8 ([eb1c734](https://github.com/roomle-dev/roomle-ui/commit/eb1c734))
|
|
9
35
|
* Merge pull request #2346 from roomle-dev/fix/drag-fade ([1426d41](https://github.com/roomle-dev/roomle-ui/commit/1426d41)), closes [#2346](https://github.com/roomle-dev/roomle-ui/issues/2346)
|
|
10
36
|
* Merge pull request #2365 from roomle-dev/copilot/upgrade-web-sdk-to-strict-null-checks ([18e45eb](https://github.com/roomle-dev/roomle-ui/commit/18e45eb)), closes [#2365](https://github.com/roomle-dev/roomle-ui/issues/2365)
|
|
11
37
|
* Merge pull request #2373 from roomle-dev/refactor/typed-event-dispatcher-map ([5d50308](https://github.com/roomle-dev/roomle-ui/commit/5d50308)), closes [#2373](https://github.com/roomle-dev/roomle-ui/issues/2373)
|
|
38
|
+
* Merge pull request #2383 from roomle-dev/copilot/fix-buttons-partlist-planner-issue ([de1229c](https://github.com/roomle-dev/roomle-ui/commit/de1229c)), closes [#2383](https://github.com/roomle-dev/roomle-ui/issues/2383)
|
|
39
|
+
* Merge pull request #2384 from roomle-dev/docs/pos-group ([f4c6a77](https://github.com/roomle-dev/roomle-ui/commit/f4c6a77)), closes [#2384](https://github.com/roomle-dev/roomle-ui/issues/2384)
|
|
40
|
+
* Merge pull request #2385 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.3 ([71b0d74](https://github.com/roomle-dev/roomle-ui/commit/71b0d74)), closes [#2385](https://github.com/roomle-dev/roomle-ui/issues/2385)
|
|
41
|
+
* Merge pull request #2386 from roomle-dev/fix/override-translations-RML-16228 ([f919a0f](https://github.com/roomle-dev/roomle-ui/commit/f919a0f)), closes [#2386](https://github.com/roomle-dev/roomle-ui/issues/2386)
|
|
42
|
+
* Merge pull request #2387 from roomle-dev/fix/decimal-range-parameter-RML-16233 ([0096766](https://github.com/roomle-dev/roomle-ui/commit/0096766)), closes [#2387](https://github.com/roomle-dev/roomle-ui/issues/2387)
|
|
43
|
+
* Merge pull request #2388 from roomle-dev/fix/move-wall-nodes-RML-16252 ([7a8b6fa](https://github.com/roomle-dev/roomle-ui/commit/7a8b6fa)), closes [#2388](https://github.com/roomle-dev/roomle-ui/issues/2388)
|
|
44
|
+
* Merge pull request #2389 from roomle-dev/fix/radio-toggle-icon-centering-RML-16207 ([6ad4b4a](https://github.com/roomle-dev/roomle-ui/commit/6ad4b4a)), closes [#2389](https://github.com/roomle-dev/roomle-ui/issues/2389)
|
|
45
|
+
* Merge pull request #2390 from roomle-dev/fix/missing-param-lbal ([7c9cc59](https://github.com/roomle-dev/roomle-ui/commit/7c9cc59)), closes [#2390](https://github.com/roomle-dev/roomle-ui/issues/2390)
|
|
12
46
|
* Merge pull request #2391 from roomle-dev/fix/set-only-selected-floor-color ([c59f3fe](https://github.com/roomle-dev/roomle-ui/commit/c59f3fe)), closes [#2391](https://github.com/roomle-dev/roomle-ui/issues/2391)
|
|
47
|
+
* Merge pull request #2392 from roomle-dev/fix/product-dimension-after-update ([d76eaf2](https://github.com/roomle-dev/roomle-ui/commit/d76eaf2)), closes [#2392](https://github.com/roomle-dev/roomle-ui/issues/2392)
|
|
48
|
+
* Merge pull request #2393 from roomle-dev/ci/cancel-duplicate-ci-workflow-run ([bee772f](https://github.com/roomle-dev/roomle-ui/commit/bee772f)), closes [#2393](https://github.com/roomle-dev/roomle-ui/issues/2393)
|
|
49
|
+
* Merge pull request #2395 from roomle-dev/fix/close-icon-on-mobile-RML-16254 ([2430c73](https://github.com/roomle-dev/roomle-ui/commit/2430c73)), closes [#2395](https://github.com/roomle-dev/roomle-ui/issues/2395)
|
|
50
|
+
* Merge pull request #2396 from roomle-dev/feat/add-flag-for-mesh-raycasting ([0d803d0](https://github.com/roomle-dev/roomle-ui/commit/0d803d0)), closes [#2396](https://github.com/roomle-dev/roomle-ui/issues/2396)
|
|
51
|
+
* Merge pull request #2397 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.4 ([2ac6965](https://github.com/roomle-dev/roomle-ui/commit/2ac6965)), closes [#2397](https://github.com/roomle-dev/roomle-ui/issues/2397)
|
|
52
|
+
* Merge pull request #2398 from roomle-dev/fix/2-level-catalog-with-custom-data-structure-RML-16263 ([33ba6a7](https://github.com/roomle-dev/roomle-ui/commit/33ba6a7)), closes [#2398](https://github.com/roomle-dev/roomle-ui/issues/2398)
|
|
53
|
+
* Merge pull request #2401 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.5 ([e8e14bd](https://github.com/roomle-dev/roomle-ui/commit/e8e14bd)), closes [#2401](https://github.com/roomle-dev/roomle-ui/issues/2401)
|
|
54
|
+
* Merge pull request #2402 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.6 ([2aac90d](https://github.com/roomle-dev/roomle-ui/commit/2aac90d)), closes [#2402](https://github.com/roomle-dev/roomle-ui/issues/2402)
|
|
55
|
+
* Merge pull request #2403 from roomle-dev/chore/build-examples-alpha-stage ([e15ac89](https://github.com/roomle-dev/roomle-ui/commit/e15ac89)), closes [#2403](https://github.com/roomle-dev/roomle-ui/issues/2403)
|
|
56
|
+
* Merge pull request #2404 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.8 ([f334468](https://github.com/roomle-dev/roomle-ui/commit/f334468)), closes [#2404](https://github.com/roomle-dev/roomle-ui/issues/2404)
|
|
57
|
+
* Merge pull request #2405 from roomle-dev/fix/hi-examples-use-server-proxy ([cc41244](https://github.com/roomle-dev/roomle-ui/commit/cc41244)), closes [#2405](https://github.com/roomle-dev/roomle-ui/issues/2405)
|
|
58
|
+
* Merge pull request #2406 from roomle-dev/fix/mapping-data-on-level1 ([7d63c9d](https://github.com/roomle-dev/roomle-ui/commit/7d63c9d)), closes [#2406](https://github.com/roomle-dev/roomle-ui/issues/2406)
|
|
13
59
|
* Merge pull request #2407 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.9 ([58cd87d](https://github.com/roomle-dev/roomle-ui/commit/58cd87d)), closes [#2407](https://github.com/roomle-dev/roomle-ui/issues/2407)
|
|
14
60
|
* Merge pull request #2410 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.10 ([735c63a](https://github.com/roomle-dev/roomle-ui/commit/735c63a)), closes [#2410](https://github.com/roomle-dev/roomle-ui/issues/2410)
|
|
15
61
|
* Merge pull request #2411 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.11 ([58ea7bf](https://github.com/roomle-dev/roomle-ui/commit/58ea7bf)), closes [#2411](https://github.com/roomle-dev/roomle-ui/issues/2411)
|
|
16
62
|
* Merge pull request #2414 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.12 ([ef98f78](https://github.com/roomle-dev/roomle-ui/commit/ef98f78)), closes [#2414](https://github.com/roomle-dev/roomle-ui/issues/2414)
|
|
63
|
+
* feat(sdk): add a new flag to enable raycasting based on meshes ([834f18c](https://github.com/roomle-dev/roomle-ui/commit/834f18c))
|
|
17
64
|
* feat: core api - childObjectLevel ([ed3cc0d](https://github.com/roomle-dev/roomle-ui/commit/ed3cc0d))
|
|
18
65
|
* feat(core): upgrade to version 2.72.0-alpha.10 ([f890cee](https://github.com/roomle-dev/roomle-ui/commit/f890cee))
|
|
19
66
|
* feat(core): upgrade to version 2.72.0-alpha.11 ([c186968](https://github.com/roomle-dev/roomle-ui/commit/c186968))
|
|
20
67
|
* feat(core): upgrade to version 2.72.0-alpha.12 ([75998c7](https://github.com/roomle-dev/roomle-ui/commit/75998c7))
|
|
68
|
+
* feat(core): upgrade to version 2.72.0-alpha.3 ([d6e47ab](https://github.com/roomle-dev/roomle-ui/commit/d6e47ab))
|
|
69
|
+
* feat(core): upgrade to version 2.72.0-alpha.4 ([70c7364](https://github.com/roomle-dev/roomle-ui/commit/70c7364))
|
|
70
|
+
* feat(core): upgrade to version 2.72.0-alpha.5 ([1b7e291](https://github.com/roomle-dev/roomle-ui/commit/1b7e291))
|
|
71
|
+
* feat(core): upgrade to version 2.72.0-alpha.6 ([0547814](https://github.com/roomle-dev/roomle-ui/commit/0547814))
|
|
72
|
+
* feat(core): upgrade to version 2.72.0-alpha.8 ([b6e2e73](https://github.com/roomle-dev/roomle-ui/commit/b6e2e73))
|
|
21
73
|
* feat(core): upgrade to version 2.72.0-alpha.9 ([77da101](https://github.com/roomle-dev/roomle-ui/commit/77da101))
|
|
74
|
+
* chore: adapt test ([138e2dd](https://github.com/roomle-dev/roomle-ui/commit/138e2dd))
|
|
75
|
+
* chore: add any cast to test ([14589f3](https://github.com/roomle-dev/roomle-ui/commit/14589f3))
|
|
22
76
|
* chore: add docs ([2e7ba8b](https://github.com/roomle-dev/roomle-ui/commit/2e7ba8b))
|
|
23
77
|
* chore: add long press for mobile ([b9345c5](https://github.com/roomle-dev/roomle-ui/commit/b9345c5))
|
|
78
|
+
* chore: build embedding examples for alpha stage deployment ([5028db6](https://github.com/roomle-dev/roomle-ui/commit/5028db6))
|
|
24
79
|
* chore: code review ([71c8ecd](https://github.com/roomle-dev/roomle-ui/commit/71c8ecd))
|
|
25
80
|
* chore: fadein out on grid view ([50bb0d6](https://github.com/roomle-dev/roomle-ui/commit/50bb0d6))
|
|
26
81
|
* chore: fix for mobile drag in HI ([a12120c](https://github.com/roomle-dev/roomle-ui/commit/a12120c))
|
|
@@ -31,19 +86,29 @@
|
|
|
31
86
|
* chore: lint ([f604576](https://github.com/roomle-dev/roomle-ui/commit/f604576))
|
|
32
87
|
* chore: merge master ([edf059b](https://github.com/roomle-dev/roomle-ui/commit/edf059b))
|
|
33
88
|
* chore: merge master into strict-null-checks branch ([f152002](https://github.com/roomle-dev/roomle-ui/commit/f152002))
|
|
89
|
+
* chore: set missing param label ([7a50f5e](https://github.com/roomle-dev/roomle-ui/commit/7a50f5e))
|
|
34
90
|
* chore: start Phase 3 strict null checks migration for common-core ([aa975a0](https://github.com/roomle-dev/roomle-ui/commit/aa975a0))
|
|
35
91
|
* chore: strictNullChecks Phase 3a — DI, utils, services, input ([ab55f13](https://github.com/roomle-dev/roomle-ui/commit/ab55f13))
|
|
36
92
|
* chore: trigger CI ([3dcc2a6](https://github.com/roomle-dev/roomle-ui/commit/3dcc2a6))
|
|
93
|
+
* chore: use default annotation for meshRaycasting ([0ebe749](https://github.com/roomle-dev/roomle-ui/commit/0ebe749))
|
|
37
94
|
* chore: working drag-in fade out ([04c0f22](https://github.com/roomle-dev/roomle-ui/commit/04c0f22))
|
|
38
95
|
* fix(web-sdk): address PR feedback and CI regressions ([a62e799](https://github.com/roomle-dev/roomle-ui/commit/a62e799))
|
|
39
96
|
* fix: address remaining review comments on PR #2365 ([279c7b6](https://github.com/roomle-dev/roomle-ui/commit/279c7b6)), closes [#2365](https://github.com/roomle-dev/roomle-ui/issues/2365)
|
|
40
97
|
* fix: address review comments on PR #2373 ([9a9827b](https://github.com/roomle-dev/roomle-ui/commit/9a9827b)), closes [#2373](https://github.com/roomle-dev/roomle-ui/issues/2373)
|
|
41
98
|
* fix: address review feedback — revert problematic fallbacks, fix null handling ([f6d7bb6](https://github.com/roomle-dev/roomle-ui/commit/f6d7bb6))
|
|
99
|
+
* fix: apply locale fallback to translation overrides for BCP-47 locales ([40c45df](https://github.com/roomle-dev/roomle-ui/commit/40c45df))
|
|
100
|
+
* fix: apply precisionInch to unit=inch (not only inchfeet) ([1f60382](https://github.com/roomle-dev/roomle-ui/commit/1f60382))
|
|
42
101
|
* fix: better positioning of spawned in elements ([bd7ebf9](https://github.com/roomle-dev/roomle-ui/commit/bd7ebf9))
|
|
102
|
+
* fix(design-system): center icon in circle radio toggle by removing SVG descender gap ([f5914b8](https://github.com/roomle-dev/roomle-ui/commit/f5914b8))
|
|
103
|
+
* fix: check all items for pipe-delimited detection, not just the first ([28a3781](https://github.com/roomle-dev/roomle-ui/commit/28a3781))
|
|
43
104
|
* fix: correct cast from KeyboardEvent to MouseEvent in _onMouseDown ([2b4ca5c](https://github.com/roomle-dev/roomle-ui/commit/2b4ca5c))
|
|
44
105
|
* fix: do not add new undo step ([0e8d78c](https://github.com/roomle-dev/roomle-ui/commit/0e8d78c))
|
|
106
|
+
* fix: formatting issues ([860c8da](https://github.com/roomle-dev/roomle-ui/commit/860c8da))
|
|
45
107
|
* fix: from custom overlay dragging working again ([7f37a35](https://github.com/roomle-dev/roomle-ui/commit/7f37a35))
|
|
46
108
|
* fix: harden DI lookup and light cache access ([843eee9](https://github.com/roomle-dev/roomle-ui/commit/843eee9))
|
|
109
|
+
* fix: hide close button in bottom bar when not inside embedding iframe ([8d06d0d](https://github.com/roomle-dev/roomle-ui/commit/8d06d0d))
|
|
110
|
+
* fix: hide product list drawer and fallback to room drawer when partlist_planner is false ([4197db3](https://github.com/roomle-dev/roomle-ui/commit/4197db3))
|
|
111
|
+
* fix: hide product-list-button when partlist_planner is false and fix prettier ([bf759f1](https://github.com/roomle-dev/roomle-ui/commit/bf759f1))
|
|
47
112
|
* fix: mobile external catalog dragging ([4f20d23](https://github.com/roomle-dev/roomle-ui/commit/4f20d23))
|
|
48
113
|
* fix: only set color of the selected floor in planner ([b92ef5b](https://github.com/roomle-dev/roomle-ui/commit/b92ef5b))
|
|
49
114
|
* fix: resolve strictNullChecks errors in cameracontrol directory ([1038f20](https://github.com/roomle-dev/roomle-ui/commit/1038f20))
|
|
@@ -56,16 +121,31 @@
|
|
|
56
121
|
* fix: resolve strictNullChecks errors in services/ files ([1e4356a](https://github.com/roomle-dev/roomle-ui/commit/1e4356a))
|
|
57
122
|
* fix: resolve strictNullChecks errors in single-promise-factory.ts ([b98f80f](https://github.com/roomle-dev/roomle-ui/commit/b98f80f))
|
|
58
123
|
* fix: resolve strictNullChecks errors in threejs-utils.ts ([e131748](https://github.com/roomle-dev/roomle-ui/commit/e131748))
|
|
124
|
+
* fix: respect buttons.partlist_planner option in Room Designer ([a2e230a](https://github.com/roomle-dev/roomle-ui/commit/a2e230a))
|
|
59
125
|
* fix: revert Main.lookup to not throw on null (test regression) ([05793dc](https://github.com/roomle-dev/roomle-ui/commit/05793dc))
|
|
126
|
+
* fix: set VITE_USE_SERVER for HI example builds on stages ([6003ec2](https://github.com/roomle-dev/roomle-ui/commit/6003ec2))
|
|
127
|
+
* fix: skip pipe-delimited transform when enableTwoLevelCatalog is off ([cb33d55](https://github.com/roomle-dev/roomle-ui/commit/cb33d55))
|
|
128
|
+
* fix: upload all example HTML files with no-cache headers ([4f76de7](https://github.com/roomle-dev/roomle-ui/commit/4f76de7))
|
|
129
|
+
* fix: use moveElementToIn2d for wall nodes in 2D mode ([cfc80c1](https://github.com/roomle-dev/roomle-ui/commit/cfc80c1))
|
|
60
130
|
* style: format merge resolution ([1253cf0](https://github.com/roomle-dev/roomle-ui/commit/1253cf0))
|
|
61
131
|
* refactor: add typed CameraEventMap for CameraControl ([b49f7ce](https://github.com/roomle-dev/roomle-ui/commit/b49f7ce))
|
|
132
|
+
* refactor: check meshRaycasting flag directly in event handler ([b855952](https://github.com/roomle-dev/roomle-ui/commit/b855952))
|
|
62
133
|
* refactor: extract factory functions and remove redundant type annotations ([bc09eac](https://github.com/roomle-dev/roomle-ui/commit/bc09eac))
|
|
63
134
|
* refactor: move ghost image creation into composable ([ffa9803](https://github.com/roomle-dev/roomle-ui/commit/ffa9803))
|
|
135
|
+
* refactor: reduce duplicate code in test ([315731c](https://github.com/roomle-dev/roomle-ui/commit/315731c))
|
|
64
136
|
* refactor: remove unnecessary jsdoc and use pointerEvent factory in tests ([4e4630a](https://github.com/roomle-dev/roomle-ui/commit/4e4630a))
|
|
65
137
|
* refactor: simplify EventDispatcher generics and add code guidelines ([a5833a0](https://github.com/roomle-dev/roomle-ui/commit/a5833a0))
|
|
66
138
|
* refactor: typed EventMap for EventDispatcher and InputEvent ([eef56b3](https://github.com/roomle-dev/roomle-ui/commit/eef56b3))
|
|
139
|
+
* refactor: use isInch() in init to avoid duplicated condition ([74831a6](https://github.com/roomle-dev/roomle-ui/commit/74831a6))
|
|
67
140
|
* refactor: use typed inputListener helper and rename factories to createPointerEvent/createKeyboardEv ([769ccb5](https://github.com/roomle-dev/roomle-ui/commit/769ccb5))
|
|
68
141
|
* refactor: working from-website dragin on mobile ([92545de](https://github.com/roomle-dev/roomle-ui/commit/92545de))
|
|
142
|
+
* test: add missing usePurchasableCount mock to factory2 ([f68fead](https://github.com/roomle-dev/roomle-ui/commit/f68fead))
|
|
143
|
+
* test: adjust test to refactored scene event handler ([741af22](https://github.com/roomle-dev/roomle-ui/commit/741af22))
|
|
144
|
+
* test: check that product dimensions are updated after update event ([c478418](https://github.com/roomle-dev/roomle-ui/commit/c478418))
|
|
69
145
|
* test: update playwright tests, because of HI properties ([49bb60f](https://github.com/roomle-dev/roomle-ui/commit/49bb60f))
|
|
146
|
+
* test: verify that addComponentHandlers is called for meshes when meshRaycasting=true ([b36382d](https://github.com/roomle-dev/roomle-ui/commit/b36382d))
|
|
70
147
|
* docs: add Symbol guideline for opaque identifiers and follow-up for refactoring ([066a0cb](https://github.com/roomle-dev/roomle-ui/commit/066a0cb))
|
|
148
|
+
* docs: PosGroup data structure ([71958b0](https://github.com/roomle-dev/roomle-ui/commit/71958b0))
|
|
71
149
|
* docs: update TypeScript guidelines — prefer union types, no enums in new code ([6fc4a54](https://github.com/roomle-dev/roomle-ui/commit/6fc4a54))
|
|
150
|
+
* ci: cancel in progress workflow runs if newer one gets triggered ([7860c41](https://github.com/roomle-dev/roomle-ui/commit/7860c41))
|
|
151
|
+
* wip: use core bound value for product dimensions ([7ff89ba](https://github.com/roomle-dev/roomle-ui/commit/7ff89ba))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "6.5.0
|
|
3
|
+
"version": "6.5.0",
|
|
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
|
@@ -192,7 +192,7 @@ const G = (s) => JSON.parse(JSON.stringify(s)), J = {
|
|
|
192
192
|
const s = G(J);
|
|
193
193
|
s.locale || (s.locale = P(null, !0)), s.id === V && delete s.id;
|
|
194
194
|
const e = U();
|
|
195
|
-
return e && k(e) && (s.configuratorId = "demoConfigurator"), s.customApiUrl =
|
|
195
|
+
return e && k(e) && (s.configuratorId = "demoConfigurator"), s.customApiUrl = void 0, s.emails = !1, s;
|
|
196
196
|
}, Y = "<CONF_ID>", q = "#CONFIGURATIONID#", Q = (s) => {
|
|
197
197
|
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
198
|
}, M = () => /(android)/i.test(navigator.userAgent);
|
|
@@ -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="https://rubens.alpha.roomle.com/api/v2",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)=>{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};
|