@roomle/embedding-lib 8.2.0-alpha.7 → 8.2.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.
- package/docs/md/web/embedding/CHANGELOG.md +116 -9
- package/package.json +1 -1
- package/roomle-embedding-lib.js +41 -44
- package/roomle-embedding-lib.min.js +37 -40
|
@@ -1,27 +1,134 @@
|
|
|
1
|
-
## 8.2.0
|
|
1
|
+
## 8.2.0 (2026-10-21)
|
|
2
2
|
|
|
3
|
+
* Merge branch 'master' into chore/refactor-requestAnimationFrame-setAnimationLoop ([015ad1f](https://github.com/roomle-dev/roomle-ui/commit/015ad1f))
|
|
4
|
+
* Merge branch 'master' into feat/enable-initialFloorMaterial-for-sky-mode ([5f84c75](https://github.com/roomle-dev/roomle-ui/commit/5f84c75))
|
|
5
|
+
* Merge branch 'master' into feat/hi-row-edit-commands-RML-18045 ([027f076](https://github.com/roomle-dev/roomle-ui/commit/027f076))
|
|
6
|
+
* Merge branch 'master' into feat/hi-row-edit-commands-RML-18045 ([1a3749e](https://github.com/roomle-dev/roomle-ui/commit/1a3749e))
|
|
7
|
+
* Merge branch 'master' into feat/hi-row-edit-commands-RML-18045 ([d5effc9](https://github.com/roomle-dev/roomle-ui/commit/d5effc9))
|
|
8
|
+
* Merge branch 'master' into feat/hi-row-edit-commands-RML-18045 ([f250c65](https://github.com/roomle-dev/roomle-ui/commit/f250c65))
|
|
9
|
+
* Merge branch 'master' into feat/line-of-sight-placement-RML-17963 ([19bb8b6](https://github.com/roomle-dev/roomle-ui/commit/19bb8b6))
|
|
10
|
+
* Merge branch 'master' into feat/planner-esc-deselect-RML-18071 ([702bba6](https://github.com/roomle-dev/roomle-ui/commit/702bba6))
|
|
11
|
+
* Merge branch 'master' into fix/dont-overwrite-shadow-casting ([f7ae3bf](https://github.com/roomle-dev/roomle-ui/commit/f7ae3bf))
|
|
12
|
+
* Merge branch 'master' into fix/dont-overwrite-shadow-casting ([b703f04](https://github.com/roomle-dev/roomle-ui/commit/b703f04))
|
|
13
|
+
* Merge branch 'master' into fix/firefox-dragging-in-hi ([70ce163](https://github.com/roomle-dev/roomle-ui/commit/70ce163))
|
|
3
14
|
* Merge branch 'master' into fix/hi-mcp-api-and-tools ([df80bd5](https://github.com/roomle-dev/roomle-ui/commit/df80bd5))
|
|
4
15
|
* Merge branch 'master' into fix/hi-mcp-api-and-tools ([ae2cdff](https://github.com/roomle-dev/roomle-ui/commit/ae2cdff))
|
|
16
|
+
* Merge branch 'master' into fix/hide-only-components-cut-by-camera ([370eda1](https://github.com/roomle-dev/roomle-ui/commit/370eda1))
|
|
17
|
+
* Merge branch 'master' into fix/hide-only-components-cut-by-camera ([5440884](https://github.com/roomle-dev/roomle-ui/commit/5440884))
|
|
18
|
+
* Merge branch 'master' into fix/rapi-v3-endpoints-RML-17813 ([e6a2bed](https://github.com/roomle-dev/roomle-ui/commit/e6a2bed))
|
|
19
|
+
* Merge branch 'master' into fix/rapi-v3-endpoints-RML-17813 ([fbe2ba5](https://github.com/roomle-dev/roomle-ui/commit/fbe2ba5))
|
|
20
|
+
* Merge branch 'master' into fix/rapi-v3-endpoints-RML-17813 ([54ffcd9](https://github.com/roomle-dev/roomle-ui/commit/54ffcd9))
|
|
21
|
+
* Merge branch 'master' into fix/rapi-v3-endpoints-RML-17813 ([7020caf](https://github.com/roomle-dev/roomle-ui/commit/7020caf))
|
|
22
|
+
* Merge branch 'master' into fix/rapi-v3-per-endpoint-RML-17813 ([a222f8a](https://github.com/roomle-dev/roomle-ui/commit/a222f8a))
|
|
23
|
+
* Merge branch 'master' into fix/stale-selection-ui ([0ac9d1c](https://github.com/roomle-dev/roomle-ui/commit/0ac9d1c))
|
|
24
|
+
* Merge branch 'master' into fix/stale-selection-ui ([1d33e0f](https://github.com/roomle-dev/roomle-ui/commit/1d33e0f))
|
|
25
|
+
* Merge branch 'master' into fix/stale-selection-ui ([e39eb93](https://github.com/roomle-dev/roomle-ui/commit/e39eb93))
|
|
26
|
+
* Merge branch 'master' into fix/vertical-wall-direction-RML-18048 ([504b00c](https://github.com/roomle-dev/roomle-ui/commit/504b00c))
|
|
27
|
+
* Merge pull request #3034 from roomle-dev/fix/hide-only-components-cut-by-camera ([be0cecf](https://github.com/roomle-dev/roomle-ui/commit/be0cecf)), closes [#3034](https://github.com/roomle-dev/roomle-ui/issues/3034)
|
|
28
|
+
* Merge pull request #3048 from roomle-dev/fix/rapi-v3-endpoints-RML-17813 ([28fd759](https://github.com/roomle-dev/roomle-ui/commit/28fd759)), closes [#3048](https://github.com/roomle-dev/roomle-ui/issues/3048)
|
|
29
|
+
* Merge pull request #3070 from roomle-dev/fix/stale-selection-ui ([730c6fd](https://github.com/roomle-dev/roomle-ui/commit/730c6fd)), closes [#3070](https://github.com/roomle-dev/roomle-ui/issues/3070)
|
|
30
|
+
* Merge pull request #3073 from roomle-dev/fix/dont-overwrite-shadow-casting ([7b348c7](https://github.com/roomle-dev/roomle-ui/commit/7b348c7)), closes [#3073](https://github.com/roomle-dev/roomle-ui/issues/3073)
|
|
31
|
+
* Merge pull request #3077 from roomle-dev/innovation/curved-walls-poc-ui ([32d10ab](https://github.com/roomle-dev/roomle-ui/commit/32d10ab)), closes [#3077](https://github.com/roomle-dev/roomle-ui/issues/3077)
|
|
32
|
+
* Merge pull request #3079 from roomle-dev/feat/enable-initialFloorMaterial-for-sky-mode ([6f21e11](https://github.com/roomle-dev/roomle-ui/commit/6f21e11)), closes [#3079](https://github.com/roomle-dev/roomle-ui/issues/3079)
|
|
33
|
+
* Merge pull request #3081 from roomle-dev/release/test ([e3565df](https://github.com/roomle-dev/roomle-ui/commit/e3565df)), closes [#3081](https://github.com/roomle-dev/roomle-ui/issues/3081)
|
|
34
|
+
* Merge pull request #3082 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.1 ([e4d2ca0](https://github.com/roomle-dev/roomle-ui/commit/e4d2ca0)), closes [#3082](https://github.com/roomle-dev/roomle-ui/issues/3082)
|
|
35
|
+
* Merge pull request #3083 from roomle-dev/feat/line-of-sight-placement-RML-17963 ([d5c0712](https://github.com/roomle-dev/roomle-ui/commit/d5c0712)), closes [#3083](https://github.com/roomle-dev/roomle-ui/issues/3083)
|
|
36
|
+
* Merge pull request #3084 from roomle-dev/fix/vertical-wall-direction-RML-18048 ([5003b90](https://github.com/roomle-dev/roomle-ui/commit/5003b90)), closes [#3084](https://github.com/roomle-dev/roomle-ui/issues/3084)
|
|
37
|
+
* Merge pull request #3085 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.2 ([165a71e](https://github.com/roomle-dev/roomle-ui/commit/165a71e)), closes [#3085](https://github.com/roomle-dev/roomle-ui/issues/3085)
|
|
38
|
+
* Merge pull request #3086 from roomle-dev/chore/refactor-requestAnimationFrame-setAnimationLoop ([267e55c](https://github.com/roomle-dev/roomle-ui/commit/267e55c)), closes [#3086](https://github.com/roomle-dev/roomle-ui/issues/3086)
|
|
39
|
+
* Merge pull request #3087 from roomle-dev/feat/hi-row-edit-commands-RML-18045 ([7cf9966](https://github.com/roomle-dev/roomle-ui/commit/7cf9966)), closes [#3087](https://github.com/roomle-dev/roomle-ui/issues/3087)
|
|
40
|
+
* Merge pull request #3088 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.3 ([602aa05](https://github.com/roomle-dev/roomle-ui/commit/602aa05)), closes [#3088](https://github.com/roomle-dev/roomle-ui/issues/3088)
|
|
41
|
+
* Merge pull request #3089 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.4 ([812707c](https://github.com/roomle-dev/roomle-ui/commit/812707c)), closes [#3089](https://github.com/roomle-dev/roomle-ui/issues/3089)
|
|
42
|
+
* Merge pull request #3090 from roomle-dev/fix/resolve-duplicate-docking-vector-names-RML-18054 ([93bb768](https://github.com/roomle-dev/roomle-ui/commit/93bb768)), closes [#3090](https://github.com/roomle-dev/roomle-ui/issues/3090)
|
|
43
|
+
* Merge pull request #3091 from roomle-dev/fix/firefox-dragging-in-hi ([2fbd6c7](https://github.com/roomle-dev/roomle-ui/commit/2fbd6c7)), closes [#3091](https://github.com/roomle-dev/roomle-ui/issues/3091)
|
|
44
|
+
* Merge pull request #3094 from roomle-dev/fix/collapsed-view-not-keeping-icon-sizes ([5a0251f](https://github.com/roomle-dev/roomle-ui/commit/5a0251f)), closes [#3094](https://github.com/roomle-dev/roomle-ui/issues/3094)
|
|
45
|
+
* Merge pull request #3095 from roomle-dev/fix/rapi-v3-per-endpoint-RML-17813 ([cb52906](https://github.com/roomle-dev/roomle-ui/commit/cb52906)), closes [#3095](https://github.com/roomle-dev/roomle-ui/issues/3095)
|
|
46
|
+
* Merge pull request #3098 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.5 ([ca068de](https://github.com/roomle-dev/roomle-ui/commit/ca068de)), closes [#3098](https://github.com/roomle-dev/roomle-ui/issues/3098)
|
|
47
|
+
* Merge pull request #3100 from roomle-dev/fix/interior-lights-shader-fix ([f86b483](https://github.com/roomle-dev/roomle-ui/commit/f86b483)), closes [#3100](https://github.com/roomle-dev/roomle-ui/issues/3100)
|
|
5
48
|
* Merge pull request #3101 from roomle-dev/fix/hi-mcp-api-and-tools ([4963a40](https://github.com/roomle-dev/roomle-ui/commit/4963a40)), closes [#3101](https://github.com/roomle-dev/roomle-ui/issues/3101)
|
|
49
|
+
* Merge pull request #3103 from roomle-dev/fix/embedding-lib-size-limit-RML-17813 ([92c9539](https://github.com/roomle-dev/roomle-ui/commit/92c9539)), closes [#3103](https://github.com/roomle-dev/roomle-ui/issues/3103)
|
|
50
|
+
* Merge pull request #3106 from roomle-dev/feat/planner-esc-deselect-RML-18071 ([82e8b56](https://github.com/roomle-dev/roomle-ui/commit/82e8b56)), closes [#3106](https://github.com/roomle-dev/roomle-ui/issues/3106)
|
|
51
|
+
* Merge pull request #3109 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.6 ([2fb7c23](https://github.com/roomle-dev/roomle-ui/commit/2fb7c23)), closes [#3109](https://github.com/roomle-dev/roomle-ui/issues/3109)
|
|
52
|
+
* Merge pull request #3111 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.7 ([e83e0a5](https://github.com/roomle-dev/roomle-ui/commit/e83e0a5)), closes [#3111](https://github.com/roomle-dev/roomle-ui/issues/3111)
|
|
6
53
|
* Merge pull request #3112 from roomle-dev/feat/delete-external-object-sub-article-RML-18144 ([93ef7b6](https://github.com/roomle-dev/roomle-ui/commit/93ef7b6)), closes [#3112](https://github.com/roomle-dev/roomle-ui/issues/3112)
|
|
7
54
|
* Merge pull request #3116 from roomle-dev/chore/hi-tools-split-RML-18145 ([d861c79](https://github.com/roomle-dev/roomle-ui/commit/d861c79)), closes [#3116](https://github.com/roomle-dev/roomle-ui/issues/3116)
|
|
8
55
|
* Merge pull request #3120 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.8 ([d26f38b](https://github.com/roomle-dev/roomle-ui/commit/d26f38b)), closes [#3120](https://github.com/roomle-dev/roomle-ui/issues/3120)
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* refactor: split the pos group helpers by domain ([492c528](https://github.com/roomle-dev/roomle-ui/commit/492c528))
|
|
56
|
+
* Merge pull request #3131 from roomle-dev/chore/rapi-v2-fallback ([a2d87cc](https://github.com/roomle-dev/roomle-ui/commit/a2d87cc)), closes [#3131](https://github.com/roomle-dev/roomle-ui/issues/3131)
|
|
57
|
+
* Merge pull request #3135 from roomle-dev/hotfix/rapi-v2-fallback-release ([620b91f](https://github.com/roomle-dev/roomle-ui/commit/620b91f)), closes [#3135](https://github.com/roomle-dev/roomle-ui/issues/3135)
|
|
58
|
+
* Potential fix for pull request finding 'Visibility cleanup incorrectly deselects the current plan el ([905b327](https://github.com/roomle-dev/roomle-ui/commit/905b327))
|
|
59
|
+
* fix: address review comments on PR #3048 ([b9f2f95](https://github.com/roomle-dev/roomle-ui/commit/b9f2f95)), closes [#3048](https://github.com/roomle-dev/roomle-ui/issues/3048)
|
|
60
|
+
* fix: address review comments on PR #3048 ([a003d76](https://github.com/roomle-dev/roomle-ui/commit/a003d76)), closes [#3048](https://github.com/roomle-dev/roomle-ui/issues/3048)
|
|
61
|
+
* fix: address review comments on PR #3095 ([f679cf3](https://github.com/roomle-dev/roomle-ui/commit/f679cf3)), closes [#3095](https://github.com/roomle-dev/roomle-ui/issues/3095)
|
|
62
|
+
* fix: address the review of the row edit commands ([65b13c5](https://github.com/roomle-dev/roomle-ui/commit/65b13c5))
|
|
17
63
|
* fix: await attribute planning updates before returning groups ([dc96fa1](https://github.com/roomle-dev/roomle-ui/commit/dc96fa1))
|
|
64
|
+
* fix: commit setWallCurve immediately and assert curved wall positions ([8841fa9](https://github.com/roomle-dev/roomle-ui/commit/8841fa9))
|
|
65
|
+
* fix(rapi): default to v2 and switch to v3 only for endpoints RAPI v3 serves ([5b352b7](https://github.com/roomle-dev/roomle-ui/commit/5b352b7))
|
|
66
|
+
* fix(planner): deselect on ESC in 2D while wall drawing mode is enabled ([0749782](https://github.com/roomle-dev/roomle-ui/commit/0749782))
|
|
67
|
+
* fix(planner): deselect on ESC keydown so closing a dimension input keeps the selection ([d912cc4](https://github.com/roomle-dev/roomle-ui/commit/d912cc4))
|
|
68
|
+
* fix: dock hi roots at the outermost of several docking vectors with one name ([5d00e65](https://github.com/roomle-dev/roomle-ui/commit/5d00e65))
|
|
69
|
+
* fix: dont overwrite shadow casting (for transmissive materials) ([e8cf054](https://github.com/roomle-dev/roomle-ui/commit/e8cf054))
|
|
70
|
+
* fix: drop the docking to a deleted root module ([20d95fa](https://github.com/roomle-dev/roomle-ui/commit/20d95fa))
|
|
71
|
+
* fix: element dragin not working on firefox ([af91650](https://github.com/roomle-dev/roomle-ui/commit/af91650))
|
|
72
|
+
* fix(planner): hide only the configuration components cut by the camera ([928d107](https://github.com/roomle-dev/roomle-ui/commit/928d107))
|
|
18
73
|
* fix: identify articles in row removal corrections ([b09c1ca](https://github.com/roomle-dev/roomle-ui/commit/b09c1ca))
|
|
74
|
+
* fix(planner): keep camera-cut visibility off the render loop's allocation path ([4bbf5ce](https://github.com/roomle-dev/roomle-ui/commit/4bbf5ce))
|
|
75
|
+
* fix(planner): keep selected wall side for vertical 2d wall measurements ([d051b46](https://github.com/roomle-dev/roomle-ui/commit/d051b46))
|
|
19
76
|
* fix: keep the offset in the mirrored hi docking entry ([83d5ab1](https://github.com/roomle-dev/roomle-ui/commit/83d5ab1))
|
|
77
|
+
* fix: make sure to fall back to layer_0 panel ([f6ac5f1](https://github.com/roomle-dev/roomle-ui/commit/f6ac5f1))
|
|
78
|
+
* fix: migrate rapi endpoints to v3 ([eaf226d](https://github.com/roomle-dev/roomle-ui/commit/eaf226d))
|
|
20
79
|
* fix: name the hi group settings and give a new root module its neighbour's attributes ([e55be7a](https://github.com/roomle-dev/roomle-ui/commit/e55be7a))
|
|
21
80
|
* fix: name the unit above that a kept unit overlaps after a remove ([c8fb936](https://github.com/roomle-dev/roomle-ui/commit/c8fb936))
|
|
22
81
|
* fix: preserve compound room contour subpaths in hi walls ([f1dc5fd](https://github.com/roomle-dev/roomle-ui/commit/f1dc5fd))
|
|
82
|
+
* fix: preserve icon size on grid view collapse ([0269eac](https://github.com/roomle-dev/roomle-ui/commit/0269eac))
|
|
83
|
+
* fix(embedding): raise embedding lib file size limit to 16 kb ([0f8fd5e](https://github.com/roomle-dev/roomle-ui/commit/0f8fd5e))
|
|
84
|
+
* fix: read item dimensions from fields RAPI v3 still returns ([c845f66](https://github.com/roomle-dev/roomle-ui/commit/c845f66))
|
|
85
|
+
* fix(rapi): release temporary RAPI v2 fallback ([c37a192](https://github.com/roomle-dev/roomle-ui/commit/c37a192)), closes [#3131](https://github.com/roomle-dev/roomle-ui/issues/3131)
|
|
86
|
+
* fix: remove a corner article of an hi group by turning one leg ([41bbb0c](https://github.com/roomle-dev/roomle-ui/commit/41bbb0c))
|
|
87
|
+
* fix(rapi): resolve configurator url version and proxy both RAPI versions in sdk dev server ([b262ce1](https://github.com/roomle-dev/roomle-ui/commit/b262ce1))
|
|
88
|
+
* fix: resolve item tags through the tag relation on RAPI v3 ([19b7fba](https://github.com/roomle-dev/roomle-ui/commit/19b7fba))
|
|
23
89
|
* fix: set an hi root module attribute on its sub modules that carry it ([328dea0](https://github.com/roomle-dev/roomle-ui/commit/328dea0))
|
|
24
90
|
* fix: set changed attributes on the root modules the library can calculate ([fda0053](https://github.com/roomle-dev/roomle-ui/commit/fda0053))
|
|
25
91
|
* fix: set no attribute when a failed root module fails again without the values ([dbb1534](https://github.com/roomle-dev/roomle-ui/commit/dbb1534))
|
|
26
92
|
* fix: set no attribute when a failed root module fails again without the values ([1359dcf](https://github.com/roomle-dev/roomle-ui/commit/1359dcf))
|
|
93
|
+
* fix: update e2e tests ([30df3f9](https://github.com/roomle-dev/roomle-ui/commit/30df3f9))
|
|
94
|
+
* test: cover the resolution of duplicate back docking vectors ([1ebf183](https://github.com/roomle-dev/roomle-ui/commit/1ebf183))
|
|
95
|
+
* test: expect v3 default rapi url in embedding utils ([934f2b4](https://github.com/roomle-dev/roomle-ui/commit/934f2b4))
|
|
96
|
+
* test: freeze the v3 twin of usm:suspension_file_drawer ([331c689](https://github.com/roomle-dev/roomle-ui/commit/331c689))
|
|
97
|
+
* test: keep mocking RAPI v2 for the published embedding libs ([c11f727](https://github.com/roomle-dev/roomle-ui/commit/c11f727))
|
|
98
|
+
* test(planner): keep selection when keys are released on tab visibility change ([85ccf08](https://github.com/roomle-dev/roomle-ui/commit/85ccf08))
|
|
99
|
+
* test: re-key the RAPI mocks for the v3 endpoints ([8654475](https://github.com/roomle-dev/roomle-ui/commit/8654475))
|
|
100
|
+
* test: re-key the RAPI mocks the lookup table did not cover ([9a2344f](https://github.com/roomle-dev/roomle-ui/commit/9a2344f))
|
|
101
|
+
* test(e2e): restore v2 RAPI mocks for v3 paths ([8bd1087](https://github.com/roomle-dev/roomle-ui/commit/8bd1087))
|
|
27
102
|
* test: shorten glue-logic-test without losing a test or an assertion ([0fbb334](https://github.com/roomle-dev/roomle-ui/commit/0fbb334))
|
|
103
|
+
* chore: fix a similar case where gridviews are open and elements are deselected, update e2e tests ([adc48b1](https://github.com/roomle-dev/roomle-ui/commit/adc48b1))
|
|
104
|
+
* chore: format test file with prettier ([e250150](https://github.com/roomle-dev/roomle-ui/commit/e250150))
|
|
105
|
+
* chore: point the remaining example RAPI urls to v3 ([00d058b](https://github.com/roomle-dev/roomle-ui/commit/00d058b))
|
|
106
|
+
* chore: remove old lighting shader patch ([0f7694f](https://github.com/roomle-dev/roomle-ui/commit/0f7694f))
|
|
107
|
+
* chore: temporarily route all RAPI requests to v2 via RAPI_V3_ENABLED flag ([3b891a2](https://github.com/roomle-dev/roomle-ui/commit/3b891a2))
|
|
108
|
+
* feat: add a curved walls proof of concept to the wall drawer ([9c43118](https://github.com/roomle-dev/roomle-ui/commit/9c43118))
|
|
109
|
+
* feat(sdk): add deleteExternalObjectSubArticle planner api ([3d4f7dc](https://github.com/roomle-dev/roomle-ui/commit/3d4f7dc))
|
|
110
|
+
* feat: add the hi group operation change-attributes ([3a1ea13](https://github.com/roomle-dev/roomle-ui/commit/3a1ea13))
|
|
111
|
+
* feat: add the obstacles section to the plan context ([c8f61d0](https://github.com/roomle-dev/roomle-ui/commit/c8f61d0))
|
|
112
|
+
* feat(planner): deselect selected plan element on ESC ([7574626](https://github.com/roomle-dev/roomle-ui/commit/7574626))
|
|
113
|
+
* feat: enable initialFloorMaterial for planner in sky mode ([6611345](https://github.com/roomle-dev/roomle-ui/commit/6611345))
|
|
114
|
+
* feat: insert, remove and swap root modules of a group ([ff972b3](https://github.com/roomle-dev/roomle-ui/commit/ff972b3))
|
|
115
|
+
* feat: place doors, windows and wall-mounted objects on the wall in view when inserted ([576fcf5](https://github.com/roomle-dev/roomle-ui/commit/576fcf5))
|
|
116
|
+
* feat: read the obstacle map of the plan ([c6d274f](https://github.com/roomle-dev/roomle-ui/commit/c6d274f))
|
|
117
|
+
* feat(core): upgrade to version 3.1.0-alpha.1 ([85ac13f](https://github.com/roomle-dev/roomle-ui/commit/85ac13f))
|
|
118
|
+
* feat(core): upgrade to version 3.1.0-alpha.2 ([9fce3c6](https://github.com/roomle-dev/roomle-ui/commit/9fce3c6))
|
|
119
|
+
* feat(core): upgrade to version 3.1.0-alpha.3 ([89fa844](https://github.com/roomle-dev/roomle-ui/commit/89fa844))
|
|
120
|
+
* feat(core): upgrade to version 3.1.0-alpha.4 ([d2b46b2](https://github.com/roomle-dev/roomle-ui/commit/d2b46b2))
|
|
121
|
+
* feat(core): upgrade to version 3.1.0-alpha.5 ([3d1fcc4](https://github.com/roomle-dev/roomle-ui/commit/3d1fcc4))
|
|
122
|
+
* feat(core): upgrade to version 3.1.0-alpha.6 ([87df3ca](https://github.com/roomle-dev/roomle-ui/commit/87df3ca))
|
|
123
|
+
* feat(core): upgrade to version 3.1.0-alpha.7 ([f359fb5](https://github.com/roomle-dev/roomle-ui/commit/f359fb5))
|
|
124
|
+
* feat(core): upgrade to version 3.1.0-alpha.8 ([6a11237](https://github.com/roomle-dev/roomle-ui/commit/6a11237))
|
|
125
|
+
* feat: use setAnimationLoop instead of requestAnimationFrame and add inspector textures + add flag to ([b47e110](https://github.com/roomle-dev/roomle-ui/commit/b47e110))
|
|
126
|
+
* refactor: assemble the hi plan context in hi-plan-context ([9bde9aa](https://github.com/roomle-dev/roomle-ui/commit/9bde9aa))
|
|
127
|
+
* refactor: drop the underscore of the glue logic members hi tools uses ([381f4b9](https://github.com/roomle-dev/roomle-ui/commit/381f4b9))
|
|
128
|
+
* refactor: move the docking helpers shared by glue logic and hi tools ([d495fab](https://github.com/roomle-dev/roomle-ui/commit/d495fab))
|
|
129
|
+
* refactor: move the hi mcp api implementation into hi-tools ([ff26809](https://github.com/roomle-dev/roomle-ui/commit/ff26809))
|
|
130
|
+
* refactor: share the rearranged load of swapRootModule ([385a642](https://github.com/roomle-dev/roomle-ui/commit/385a642))
|
|
131
|
+
* refactor: split the pos group helpers by domain ([492c528](https://github.com/roomle-dev/roomle-ui/commit/492c528))
|
|
132
|
+
* docs: correct comment on why RAPI v2 stays mocked in e2e helper ([02a5881](https://github.com/roomle-dev/roomle-ui/commit/02a5881))
|
|
133
|
+
* docs: make the Docker Playwright instructions work ([9a1c358](https://github.com/roomle-dev/roomle-ui/commit/9a1c358))
|
|
134
|
+
* style: format rapi access ([fb8def8](https://github.com/roomle-dev/roomle-ui/commit/fb8def8))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "8.2.0
|
|
3
|
+
"version": "8.2.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
|
@@ -139,7 +139,7 @@ var t = class {
|
|
|
139
139
|
let t = l(u);
|
|
140
140
|
t.locale ||= e(null, !0), t.id === "(idle)" && delete t.id;
|
|
141
141
|
let n = i();
|
|
142
|
-
return n && a(n) && (t.configuratorId = "demoConfigurator"), t.customApiUrl =
|
|
142
|
+
return n && a(n) && (t.configuratorId = "demoConfigurator"), t.customApiUrl = void 0, t.emails = !1, t;
|
|
143
143
|
}, h = "<CONF_ID>", g = "#CONFIGURATIONID#", _ = (e) => {
|
|
144
144
|
let t = e.featureFlags;
|
|
145
145
|
if (!t || typeof t != "object" || Array.isArray(t)) return;
|
|
@@ -225,14 +225,11 @@ var t = class {
|
|
|
225
225
|
resolve: e,
|
|
226
226
|
reject: t
|
|
227
227
|
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
let n = T(t) ? "v3" : "v2";
|
|
234
|
-
return e.replace(w, "/" + n) + t;
|
|
235
|
-
}, D = {
|
|
228
|
+
};
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region packages/common/src/utils/rapi-version.ts
|
|
231
|
+
(/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
|
|
232
|
+
var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t, T = {
|
|
236
233
|
SDK: "extended",
|
|
237
234
|
CONFIGURATOR_SDK: "configurator",
|
|
238
235
|
CALLBACKS: "callbacks",
|
|
@@ -240,22 +237,22 @@ var t = class {
|
|
|
240
237
|
ANALYTICS: "analytics",
|
|
241
238
|
GLOBAL: "global",
|
|
242
239
|
RAPI: "rapi"
|
|
243
|
-
},
|
|
240
|
+
}, E = ".", D = T.SDK + "." + T.CALLBACKS, O = {
|
|
244
241
|
REQUEST_BOOT: "requestBoot",
|
|
245
242
|
SETUP: "setup",
|
|
246
243
|
WEBSITE_READY: "websiteReady"
|
|
247
|
-
},
|
|
244
|
+
}, k = {
|
|
248
245
|
GET_METHODS: "getMethods",
|
|
249
246
|
RETURN_METHODS: "returnMethods",
|
|
250
247
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
251
248
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
252
|
-
},
|
|
249
|
+
}, A = ["constructor", "callbacks"], j = (e) => e[0] !== "_" && !A.includes(e), M = (e, t, n = !1) => {
|
|
253
250
|
if (!e) return [];
|
|
254
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
255
|
-
return r.filter(
|
|
256
|
-
},
|
|
251
|
+
let r = Object.getOwnPropertyNames(e), i = n ? T.CALLBACKS + "." : "";
|
|
252
|
+
return r.filter(j).map((e) => t + "." + i + e);
|
|
253
|
+
}, N = async (e, t) => {
|
|
257
254
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
258
|
-
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i =
|
|
255
|
+
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = w(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
|
|
259
256
|
method: "GET",
|
|
260
257
|
headers: new Headers({
|
|
261
258
|
apiKey: "roomle_portal_v2",
|
|
@@ -270,7 +267,7 @@ var t = class {
|
|
|
270
267
|
cache: "default"
|
|
271
268
|
}), { configurator: s } = await (await fetch(o)).json();
|
|
272
269
|
return s;
|
|
273
|
-
},
|
|
270
|
+
}, P = "data-rml-interaction-container", F = (e, t, n) => {
|
|
274
271
|
let r = null;
|
|
275
272
|
Object.defineProperty(e, t, {
|
|
276
273
|
get() {
|
|
@@ -280,16 +277,16 @@ var t = class {
|
|
|
280
277
|
e?.mute ? r = e.value : (console.warn("You override Roomle defined behaviour. To disalbe this warning pass in an object with the following properties"), console.warn("{ mute: true, value: () => void }"), r = e);
|
|
281
278
|
}
|
|
282
279
|
});
|
|
283
|
-
},
|
|
284
|
-
e && setTimeout(() => e.style.setProperty(
|
|
285
|
-
},
|
|
280
|
+
}, I = () => window.innerHeight * .01 + "px", L = (e) => {
|
|
281
|
+
e && setTimeout(() => e.style.setProperty(B, I()), 0);
|
|
282
|
+
}, R = "rml-styles", z = 450, B = "--rml-full-height", V = {
|
|
286
283
|
CONTAINER: "rml-container",
|
|
287
284
|
FILL: "rml-fill",
|
|
288
285
|
POSITION: "rml-pos",
|
|
289
286
|
TRANSITION: "rml-transition",
|
|
290
287
|
ANDROID_HEIGHT: "rml-android-height",
|
|
291
288
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
292
|
-
},
|
|
289
|
+
}, H = /* @__PURE__ */ new Map(), U = class extends x {
|
|
293
290
|
static createPlanner(e, t, n, r = []) {
|
|
294
291
|
return this._create(e, t, n, r);
|
|
295
292
|
}
|
|
@@ -298,10 +295,10 @@ var t = class {
|
|
|
298
295
|
r.viewName = e;
|
|
299
296
|
let { resolve: i, promise: a } = S(), { resolve: o, promise: s } = S(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
300
297
|
switch (e) {
|
|
301
|
-
case
|
|
298
|
+
case k.REGISTER_CUSTOM_VIEW_DONE:
|
|
302
299
|
i();
|
|
303
300
|
break;
|
|
304
|
-
case
|
|
301
|
+
case k.RETURN_METHODS:
|
|
305
302
|
r.handleSetup(t[0]), o();
|
|
306
303
|
break;
|
|
307
304
|
default: if (r.isSetupDone) return r.executeMessage({
|
|
@@ -312,7 +309,7 @@ var t = class {
|
|
|
312
309
|
});
|
|
313
310
|
r.setMessageHandler(c);
|
|
314
311
|
let l = [e];
|
|
315
|
-
return c.sendMessage(
|
|
312
|
+
return c.sendMessage(k.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(k.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
|
|
316
313
|
}
|
|
317
314
|
static createConfigurator(e, t, n, r = []) {
|
|
318
315
|
return this._create(e, t, n, r);
|
|
@@ -328,7 +325,7 @@ var t = class {
|
|
|
328
325
|
try {
|
|
329
326
|
let a = d(n), s = m();
|
|
330
327
|
v(s);
|
|
331
|
-
let c = await
|
|
328
|
+
let c = await N(e, o(s, a));
|
|
332
329
|
n = y(c, a);
|
|
333
330
|
let l = new this(c, t, n, r, i);
|
|
334
331
|
return await Promise.allSettled(l.pluginsLoaded), l;
|
|
@@ -344,51 +341,51 @@ var t = class {
|
|
|
344
341
|
_iframe;
|
|
345
342
|
constructor(e, n, r, i, a) {
|
|
346
343
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
347
|
-
if (
|
|
348
|
-
if (!document.getElementById(
|
|
344
|
+
if (H.has(n)) throw Error("There is already an instance on this DOM element");
|
|
345
|
+
if (!document.getElementById(R)) {
|
|
349
346
|
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
350
|
-
t.type = "text/css", t.id =
|
|
351
|
-
let n = "transition:all ease-in-out " +
|
|
347
|
+
t.type = "text/css", t.id = R;
|
|
348
|
+
let n = "transition:all ease-in-out " + z + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = I();
|
|
352
349
|
t.innerHTML = `
|
|
353
|
-
.${
|
|
354
|
-
.${
|
|
355
|
-
.${
|
|
356
|
-
.${
|
|
357
|
-
.${
|
|
358
|
-
.${
|
|
350
|
+
.${V.CONTAINER}{${B}:${a};}
|
|
351
|
+
.${V.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
|
|
352
|
+
.${V.TRANSITION}{${i}}
|
|
353
|
+
.${V.FILL}{width:100%;height:100%;opacity:1}
|
|
354
|
+
.${V.ANDROID_HEIGHT}{height:calc(var(${B},1vh)*100)}
|
|
355
|
+
.${V.OVERFLOW_HIDDEN}{overflow:hidden}
|
|
359
356
|
`, document.head.appendChild(t);
|
|
360
357
|
}
|
|
361
358
|
this._executeMessage = this._executeMessage.bind(this);
|
|
362
359
|
let o = new t("website", window, null, this._executeMessage);
|
|
363
360
|
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), b() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
364
361
|
let s = this._createIframe();
|
|
365
|
-
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe),
|
|
362
|
+
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), H.set(n, !0);
|
|
366
363
|
}
|
|
367
364
|
teardown() {
|
|
368
|
-
this._container &&
|
|
365
|
+
this._container && H.delete(this._container);
|
|
369
366
|
let e = this._container.querySelector("iframe");
|
|
370
367
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
371
368
|
}
|
|
372
369
|
_createIframe() {
|
|
373
370
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
374
|
-
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(
|
|
371
|
+
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(V.CONTAINER), e.classList.add(V.FILL), e;
|
|
375
372
|
}
|
|
376
373
|
_onResize() {
|
|
377
|
-
|
|
374
|
+
L(this._iframe);
|
|
378
375
|
}
|
|
379
376
|
_onUseFullPage() {
|
|
380
|
-
this._iframe.classList.add(
|
|
377
|
+
this._iframe.classList.add(V.POSITION), document.documentElement.classList.add(V.OVERFLOW_HIDDEN), window.document.body.classList.add(V.OVERFLOW_HIDDEN), b() && (L(this._iframe), this._iframe.classList.add(V.ANDROID_HEIGHT));
|
|
381
378
|
}
|
|
382
379
|
_onBackToWebsite() {
|
|
383
|
-
this._iframe.classList.remove(
|
|
380
|
+
this._iframe.classList.remove(V.POSITION), this._iframe.classList.remove(V.ANDROID_HEIGHT), document.documentElement.classList.remove(V.OVERFLOW_HIDDEN), window.document.body.classList.remove(V.OVERFLOW_HIDDEN);
|
|
384
381
|
}
|
|
385
382
|
_executeMessage({ message: e, args: t }, n) {
|
|
386
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
383
|
+
if (n.source && n.source === this._iframe?.contentWindow) return e === O.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === O.SETUP ? (this.handleSetup(t[0]), F(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), F(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
|
|
387
384
|
if (!this._messageHandler) {
|
|
388
385
|
console.error("MessageHandler not set");
|
|
389
386
|
return;
|
|
390
387
|
}
|
|
391
|
-
this._messageHandler.sendMessage(
|
|
388
|
+
this._messageHandler.sendMessage(O.WEBSITE_READY);
|
|
392
389
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
393
390
|
message: e,
|
|
394
391
|
args: t
|
|
@@ -396,4 +393,4 @@ var t = class {
|
|
|
396
393
|
}
|
|
397
394
|
};
|
|
398
395
|
//#endregion
|
|
399
|
-
export {
|
|
396
|
+
export { O as HANDSHAKE_MESSAGES, P as INTERACTION_CONTAINER_SELECTOR, T as NAMESPACE, E as NAMESPACE_SEPARATOR, D as SDK_CALLBACK, k as WELL_KNOWN_MESSAGES, U as default, N as getConfiguratorSettings, M as getMethodNames, j as isExposable };
|
|
@@ -134,7 +134,7 @@ var t = class {
|
|
|
134
134
|
return r && ((e) => {
|
|
135
135
|
let t = /* @__PURE__ */ new RegExp(/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/);
|
|
136
136
|
return !!(n.includes(e) || t.test(e) || e.endsWith("roomle.com") || e.endsWith("gitlab.io") || e.endsWith("gitlab.com"));
|
|
137
|
-
})(r) && (t.configuratorId = "demoConfigurator"), t.customApiUrl =
|
|
137
|
+
})(r) && (t.configuratorId = "demoConfigurator"), t.customApiUrl = void 0, t.emails = !1, t;
|
|
138
138
|
}, d = (e) => {
|
|
139
139
|
e.featureFlags ||= {}, typeof e.featureFlags.realPartList != "boolean" && (e.featureFlags.realPartList = !0), typeof e.featureFlags.globalCallbacks != "boolean" && (e.featureFlags.globalCallbacks = !0), typeof e.featureFlags.mocAr != "boolean" && (e.featureFlags.mocAr = !1);
|
|
140
140
|
}, f = () => /(android)/i.test(navigator.userAgent), p = class {
|
|
@@ -206,7 +206,9 @@ var t = class {
|
|
|
206
206
|
resolve: e,
|
|
207
207
|
reject: t
|
|
208
208
|
};
|
|
209
|
-
}
|
|
209
|
+
};
|
|
210
|
+
(/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
|
|
211
|
+
var h = /\/v[23]\/?$/, g = {
|
|
210
212
|
SDK: "extended",
|
|
211
213
|
CONFIGURATOR_SDK: "configurator",
|
|
212
214
|
CALLBACKS: "callbacks",
|
|
@@ -214,29 +216,24 @@ var t = class {
|
|
|
214
216
|
ANALYTICS: "analytics",
|
|
215
217
|
GLOBAL: "global",
|
|
216
218
|
RAPI: "rapi"
|
|
217
|
-
},
|
|
219
|
+
}, _ = ".", v = g.SDK + "." + g.CALLBACKS, y = {
|
|
218
220
|
REQUEST_BOOT: "requestBoot",
|
|
219
221
|
SETUP: "setup",
|
|
220
222
|
WEBSITE_READY: "websiteReady"
|
|
221
|
-
},
|
|
223
|
+
}, b = {
|
|
222
224
|
GET_METHODS: "getMethods",
|
|
223
225
|
RETURN_METHODS: "returnMethods",
|
|
224
226
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
225
227
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
226
|
-
},
|
|
228
|
+
}, x = ["constructor", "callbacks"], S = (e) => e[0] !== "_" && !x.includes(e), C = (e, t, n = !1) => {
|
|
227
229
|
if (!e) return [];
|
|
228
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
229
|
-
return r.filter(
|
|
230
|
-
},
|
|
230
|
+
let r = Object.getOwnPropertyNames(e), i = n ? g.CALLBACKS + "." : "";
|
|
231
|
+
return r.filter(S).map((e) => t + "." + i + e);
|
|
232
|
+
}, w = async (e, t) => {
|
|
231
233
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
232
|
-
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
let t = e.split("?")[0];
|
|
236
|
-
return h.some((e) => e.test(t));
|
|
237
|
-
})(t) ? "v3" : "v2";
|
|
238
|
-
return e.replace(g, "/" + n) + t;
|
|
239
|
-
})(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
|
|
234
|
+
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = (a = n, o = "/configurators/" + e, h.test(a) ? a.replace(h, "/v2") + o : a + o);
|
|
235
|
+
var a, o;
|
|
236
|
+
let s = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), c = new Request(i, {
|
|
240
237
|
method: "GET",
|
|
241
238
|
headers: new Headers({
|
|
242
239
|
apiKey: "roomle_portal_v2",
|
|
@@ -244,14 +241,14 @@ var t = class {
|
|
|
244
241
|
locale: "en",
|
|
245
242
|
language: "en",
|
|
246
243
|
device: 1,
|
|
247
|
-
token:
|
|
244
|
+
token: s,
|
|
248
245
|
platform: "web"
|
|
249
246
|
}),
|
|
250
247
|
mode: "cors",
|
|
251
248
|
cache: "default"
|
|
252
|
-
}), { configurator:
|
|
253
|
-
return
|
|
254
|
-
},
|
|
249
|
+
}), { configurator: l } = await (await fetch(c)).json();
|
|
250
|
+
return l;
|
|
251
|
+
}, T = "data-rml-interaction-container", E = (e, t, n) => {
|
|
255
252
|
let r = null;
|
|
256
253
|
Object.defineProperty(e, t, {
|
|
257
254
|
get: () => r || n,
|
|
@@ -259,9 +256,9 @@ var t = class {
|
|
|
259
256
|
r = e?.mute ? e.value : e;
|
|
260
257
|
}
|
|
261
258
|
});
|
|
262
|
-
},
|
|
263
|
-
e && setTimeout(() => e.style.setProperty(
|
|
264
|
-
},
|
|
259
|
+
}, D = () => .01 * window.innerHeight + "px", O = (e) => {
|
|
260
|
+
e && setTimeout(() => e.style.setProperty(A, D()), 0);
|
|
261
|
+
}, k = "rml-styles", A = "--rml-full-height", j = "rml-container", M = "rml-fill", N = "rml-pos", P = "rml-android-height", F = "rml-overflow-hidden", I = /* @__PURE__ */ new Map(), L = class extends p {
|
|
265
262
|
static createPlanner(e, t, n, r = []) {
|
|
266
263
|
return this._create(e, t, n, r);
|
|
267
264
|
}
|
|
@@ -270,10 +267,10 @@ var t = class {
|
|
|
270
267
|
r.viewName = e;
|
|
271
268
|
let { resolve: i, promise: a } = m(), { resolve: o, promise: s } = m(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
272
269
|
switch (e) {
|
|
273
|
-
case
|
|
270
|
+
case b.REGISTER_CUSTOM_VIEW_DONE:
|
|
274
271
|
i();
|
|
275
272
|
break;
|
|
276
|
-
case
|
|
273
|
+
case b.RETURN_METHODS:
|
|
277
274
|
r.handleSetup(t[0]), o();
|
|
278
275
|
break;
|
|
279
276
|
default: if (r.isSetupDone) return r.executeMessage({
|
|
@@ -284,7 +281,7 @@ var t = class {
|
|
|
284
281
|
});
|
|
285
282
|
r.setMessageHandler(c);
|
|
286
283
|
let l = [e];
|
|
287
|
-
return c.sendMessage(
|
|
284
|
+
return c.sendMessage(b.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(b.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
|
|
288
285
|
}
|
|
289
286
|
static createConfigurator(e, t, n, r = []) {
|
|
290
287
|
return this._create(e, t, n, r);
|
|
@@ -300,7 +297,7 @@ var t = class {
|
|
|
300
297
|
try {
|
|
301
298
|
let s = ((e) => (l(e), e?.customApiUrl && (e.customApiUrl = decodeURIComponent(e.customApiUrl)), e.shareUrl && (e.deeplink = e.shareUrl.replace("<CONF_ID>", "#CONFIGURATIONID#")), e))(n), c = u();
|
|
302
299
|
d(c);
|
|
303
|
-
let f = await
|
|
300
|
+
let f = await w(e, r(c, s));
|
|
304
301
|
n = ((e, t) => {
|
|
305
302
|
let n = o(t), i = u();
|
|
306
303
|
d(i);
|
|
@@ -326,44 +323,44 @@ var t = class {
|
|
|
326
323
|
_iframe;
|
|
327
324
|
constructor(e, n, r, i, a) {
|
|
328
325
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
329
|
-
if (
|
|
330
|
-
if (!document.getElementById(
|
|
326
|
+
if (I.has(n)) throw Error("There is already an instance on this DOM element");
|
|
327
|
+
if (!document.getElementById(k)) {
|
|
331
328
|
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
332
|
-
t.type = "text/css", t.id =
|
|
329
|
+
t.type = "text/css", t.id = k;
|
|
333
330
|
let n = "transition:all ease-in-out 450ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e + (t + n), "") + n;
|
|
334
|
-
t.innerHTML = `\n .${
|
|
331
|
+
t.innerHTML = `\n .${j}{${A}:${D()};}\n .${N}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${M}{width:100%;height:100%;opacity:1}\n .${P}{height:calc(var(${A},1vh)*100)}\n .${F}{overflow:hidden}\n `, document.head.appendChild(t);
|
|
335
332
|
}
|
|
336
333
|
this._executeMessage = this._executeMessage.bind(this);
|
|
337
334
|
let o = new t("website", window, null, this._executeMessage);
|
|
338
335
|
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), f() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
339
336
|
let s = this._createIframe();
|
|
340
|
-
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe),
|
|
337
|
+
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), I.set(n, !0);
|
|
341
338
|
}
|
|
342
339
|
teardown() {
|
|
343
|
-
this._container &&
|
|
340
|
+
this._container && I.delete(this._container);
|
|
344
341
|
let e = this._container.querySelector("iframe");
|
|
345
342
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
346
343
|
}
|
|
347
344
|
_createIframe() {
|
|
348
345
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
349
|
-
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(
|
|
346
|
+
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(j), e.classList.add(M), e;
|
|
350
347
|
}
|
|
351
348
|
_onResize() {
|
|
352
|
-
|
|
349
|
+
O(this._iframe);
|
|
353
350
|
}
|
|
354
351
|
_onUseFullPage() {
|
|
355
|
-
this._iframe.classList.add(
|
|
352
|
+
this._iframe.classList.add(N), document.documentElement.classList.add(F), window.document.body.classList.add(F), f() && (O(this._iframe), this._iframe.classList.add(P));
|
|
356
353
|
}
|
|
357
354
|
_onBackToWebsite() {
|
|
358
|
-
this._iframe.classList.remove(
|
|
355
|
+
this._iframe.classList.remove(N), this._iframe.classList.remove(P), document.documentElement.classList.remove(F), window.document.body.classList.remove(F);
|
|
359
356
|
}
|
|
360
357
|
_executeMessage({ message: e, args: t }, n) {
|
|
361
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
362
|
-
this._messageHandler && this._messageHandler.sendMessage(
|
|
358
|
+
if (n.source && n.source === this._iframe?.contentWindow) return e === y.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : Promise.resolve({ error: "MessageHandler not set" }) : e === y.SETUP ? (this.handleSetup(t[0]), E(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), E(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
|
|
359
|
+
this._messageHandler && this._messageHandler.sendMessage(y.WEBSITE_READY);
|
|
363
360
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
364
361
|
message: e,
|
|
365
362
|
args: t
|
|
366
363
|
});
|
|
367
364
|
}
|
|
368
365
|
};
|
|
369
|
-
export {
|
|
366
|
+
export { y as HANDSHAKE_MESSAGES, T as INTERACTION_CONTAINER_SELECTOR, g as NAMESPACE, _ as NAMESPACE_SEPARATOR, v as SDK_CALLBACK, b as WELL_KNOWN_MESSAGES, L as default, w as getConfiguratorSettings, C as getMethodNames, S as isExposable };
|