@roomle/embedding-lib 5.34.0-debug.4 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/md/web/embedding/CHANGELOG.md +225 -1
- package/hi.js +22 -17
- package/hi.min.js +1 -1
- package/package.json +1 -1
- package/packages/embedding-lib/src/hi.d.ts +1 -0
- package/packages/embedding-lib/src/homag-intelligence/hi-callbacks.d.ts +1 -1
- package/packages/embedding-lib/src/homag-intelligence/hi-setup.d.ts +1 -1
- package/packages/embedding-lib/src/roomle-embedding-lib.d.ts +1 -1
- package/roomle-embedding-lib.js +13 -12
- package/roomle-embedding-lib.min.js +1 -1
- package/packages/embedding-lib/src/types.d.ts +0 -91
|
@@ -1,3 +1,227 @@
|
|
|
1
|
-
##
|
|
1
|
+
## 6.0.0-alpha.1 (2026-01-08)
|
|
2
2
|
|
|
3
|
+
* Apply suggestion from @Copilot ([780b8de](https://github.com/roomle-dev/roomle-ui/commit/780b8de))
|
|
4
|
+
* Apply suggestion from @tschoartschi ([de7a735](https://github.com/roomle-dev/roomle-ui/commit/de7a735))
|
|
5
|
+
* Apply suggestions from code review ([a4025d2](https://github.com/roomle-dev/roomle-ui/commit/a4025d2))
|
|
6
|
+
* docs!: @roomle/web-sdk now exports TypeScript types from a single entry point ([a546bf0](https://github.com/roomle-dev/roomle-ui/commit/a546bf0))
|
|
7
|
+
* Merge branch 'feat/embedding-lib-exports' of github.com:roomle-dev/roomle-ui into feat/embedding-lib ([0c9be8e](https://github.com/roomle-dev/roomle-ui/commit/0c9be8e))
|
|
8
|
+
* Merge branch 'feat/use-correct-version-of-vite-plugin-dts' into ci/test ([5735f7c](https://github.com/roomle-dev/roomle-ui/commit/5735f7c))
|
|
9
|
+
* Merge branch 'master' into chore/tidy-up-glue-logic-api ([d1db7d2](https://github.com/roomle-dev/roomle-ui/commit/d1db7d2))
|
|
10
|
+
* Merge branch 'master' into chore/tidy-up-glue-logic-api ([e2e695a](https://github.com/roomle-dev/roomle-ui/commit/e2e695a))
|
|
11
|
+
* Merge branch 'master' into chore/tidy-up-glue-logic-api ([febfa52](https://github.com/roomle-dev/roomle-ui/commit/febfa52))
|
|
12
|
+
* Merge branch 'master' into docs/add-migration-guides-RML-15708 ([3a37b2f](https://github.com/roomle-dev/roomle-ui/commit/3a37b2f))
|
|
13
|
+
* Merge branch 'master' into docs/add-migration-guides-RML-15708 ([a9cd472](https://github.com/roomle-dev/roomle-ui/commit/a9cd472))
|
|
14
|
+
* Merge branch 'master' into docs/add-migration-guides-RML-15708 ([e65dd8f](https://github.com/roomle-dev/roomle-ui/commit/e65dd8f))
|
|
15
|
+
* Merge branch 'master' into feat/build-step-examples-RML-15712 ([26fb23d](https://github.com/roomle-dev/roomle-ui/commit/26fb23d))
|
|
16
|
+
* Merge branch 'master' into feat/embedding-lib-exports ([faab691](https://github.com/roomle-dev/roomle-ui/commit/faab691))
|
|
17
|
+
* Merge branch 'master' into feat/embedding-lib-exports ([72ab3e0](https://github.com/roomle-dev/roomle-ui/commit/72ab3e0))
|
|
18
|
+
* Merge branch 'master' into feat/embedding-lib-exports-v2 ([03a5a3f](https://github.com/roomle-dev/roomle-ui/commit/03a5a3f))
|
|
19
|
+
* Merge branch 'master' into feat/hi-3d-export ([191d503](https://github.com/roomle-dev/roomle-ui/commit/191d503))
|
|
20
|
+
* Merge branch 'master' into feat/hi-3d-export ([459d4eb](https://github.com/roomle-dev/roomle-ui/commit/459d4eb))
|
|
21
|
+
* Merge branch 'master' into feat/hi-order-export ([696c03d](https://github.com/roomle-dev/roomle-ui/commit/696c03d))
|
|
22
|
+
* Merge branch 'master' into feat/hi-order-export ([2bf17e2](https://github.com/roomle-dev/roomle-ui/commit/2bf17e2))
|
|
23
|
+
* Merge branch 'master' into feat/hi-order-export ([637924c](https://github.com/roomle-dev/roomle-ui/commit/637924c))
|
|
24
|
+
* Merge branch 'master' into feat/hi-validate-attribute-options ([4abc759](https://github.com/roomle-dev/roomle-ui/commit/4abc759))
|
|
25
|
+
* Merge branch 'master' into feat/hi-validate-attribute-options ([2d77cfe](https://github.com/roomle-dev/roomle-ui/commit/2d77cfe))
|
|
26
|
+
* Merge branch 'master' into feat/hi-validate-attribute-options ([25cdf7d](https://github.com/roomle-dev/roomle-ui/commit/25cdf7d))
|
|
27
|
+
* Merge branch 'master' into feat/hi-validate-attribute-options ([47189a6](https://github.com/roomle-dev/roomle-ui/commit/47189a6))
|
|
28
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([eedd11e](https://github.com/roomle-dev/roomle-ui/commit/eedd11e))
|
|
29
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([2cc42ac](https://github.com/roomle-dev/roomle-ui/commit/2cc42ac))
|
|
30
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([be17f58](https://github.com/roomle-dev/roomle-ui/commit/be17f58))
|
|
31
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([445b103](https://github.com/roomle-dev/roomle-ui/commit/445b103))
|
|
32
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([139086b](https://github.com/roomle-dev/roomle-ui/commit/139086b))
|
|
33
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([bb14505](https://github.com/roomle-dev/roomle-ui/commit/bb14505))
|
|
34
|
+
* Merge branch 'master' into feat/integrate-types-qa-into-ci-RML-15421 ([3bfdd2a](https://github.com/roomle-dev/roomle-ui/commit/3bfdd2a))
|
|
35
|
+
* Merge branch 'master' into fix/allow-custom-supademo-tuts ([e63bba0](https://github.com/roomle-dev/roomle-ui/commit/e63bba0))
|
|
36
|
+
* Merge branch 'master' into fix/allow-custom-supademo-tuts ([e7024a6](https://github.com/roomle-dev/roomle-ui/commit/e7024a6))
|
|
37
|
+
* Merge branch 'master' into fix/exception ([b1bdcec](https://github.com/roomle-dev/roomle-ui/commit/b1bdcec))
|
|
38
|
+
* Merge branch 'master' into fix/multi-seelction ([15b73aa](https://github.com/roomle-dev/roomle-ui/commit/15b73aa))
|
|
39
|
+
* Merge branch 'master' into fix/multi-seelction ([d909b84](https://github.com/roomle-dev/roomle-ui/commit/d909b84))
|
|
40
|
+
* Merge branch 'master' into fix/multi-seelction ([560e13a](https://github.com/roomle-dev/roomle-ui/commit/560e13a))
|
|
41
|
+
* Merge branch 'master' into refactor/place-order ([ca42890](https://github.com/roomle-dev/roomle-ui/commit/ca42890))
|
|
42
|
+
* Merge branch 'master' into refactor/place-order ([3b3d844](https://github.com/roomle-dev/roomle-ui/commit/3b3d844))
|
|
43
|
+
* Merge branch 'master' into refactor/place-order ([502b876](https://github.com/roomle-dev/roomle-ui/commit/502b876))
|
|
44
|
+
* Merge branch 'master' into style/sidebar-action-button-redesign ([be917e4](https://github.com/roomle-dev/roomle-ui/commit/be917e4))
|
|
45
|
+
* Merge branch 'master' into style/sidebar-action-button-redesign ([964a237](https://github.com/roomle-dev/roomle-ui/commit/964a237))
|
|
46
|
+
* Merge branch 'master' into style/sidebar-action-button-redesign ([e708b81](https://github.com/roomle-dev/roomle-ui/commit/e708b81))
|
|
47
|
+
* Merge branch 'master' into style/sidebar-action-button-redesign ([286475b](https://github.com/roomle-dev/roomle-ui/commit/286475b))
|
|
48
|
+
* Merge branch 'refactor/place-order' of github.com:roomle-dev/roomle-ui into refactor/place-order ([c4a8c47](https://github.com/roomle-dev/roomle-ui/commit/c4a8c47))
|
|
49
|
+
* Merge pull request #2084 from roomle-dev/style/sidebar-action-button-redesign ([a6092f7](https://github.com/roomle-dev/roomle-ui/commit/a6092f7)), closes [#2084](https://github.com/roomle-dev/roomle-ui/issues/2084)
|
|
50
|
+
* Merge pull request #2098 from roomle-dev/feat/build-step-examples-RML-15712 ([ffaf9e2](https://github.com/roomle-dev/roomle-ui/commit/ffaf9e2)), closes [#2098](https://github.com/roomle-dev/roomle-ui/issues/2098)
|
|
51
|
+
* Merge pull request #2101 from roomle-dev/feat/hi-order-export ([3d8bef3](https://github.com/roomle-dev/roomle-ui/commit/3d8bef3)), closes [#2101](https://github.com/roomle-dev/roomle-ui/issues/2101)
|
|
52
|
+
* Merge pull request #2102 from roomle-dev/feat/integrate-types-qa-into-ci-RML-15421 ([ba5555a](https://github.com/roomle-dev/roomle-ui/commit/ba5555a)), closes [#2102](https://github.com/roomle-dev/roomle-ui/issues/2102)
|
|
53
|
+
* Merge pull request #2103 from roomle-dev/upgraded-by-ci/core-2.66.0-alpha.2 ([6ece73e](https://github.com/roomle-dev/roomle-ui/commit/6ece73e)), closes [#2103](https://github.com/roomle-dev/roomle-ui/issues/2103)
|
|
54
|
+
* Merge pull request #2106 from roomle-dev/upgraded-by-ci/core-2.66.0-alpha.3 ([02a575d](https://github.com/roomle-dev/roomle-ui/commit/02a575d)), closes [#2106](https://github.com/roomle-dev/roomle-ui/issues/2106)
|
|
55
|
+
* Merge pull request #2107 from roomle-dev/upgraded-by-ci/core-2.66.0 ([416b94b](https://github.com/roomle-dev/roomle-ui/commit/416b94b)), closes [#2107](https://github.com/roomle-dev/roomle-ui/issues/2107)
|
|
56
|
+
* Merge pull request #2110 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.1 ([94fac39](https://github.com/roomle-dev/roomle-ui/commit/94fac39)), closes [#2110](https://github.com/roomle-dev/roomle-ui/issues/2110)
|
|
57
|
+
* Merge pull request #2111 from roomle-dev/chore/tidy-up-glue-logic-api ([d51e83a](https://github.com/roomle-dev/roomle-ui/commit/d51e83a)), closes [#2111](https://github.com/roomle-dev/roomle-ui/issues/2111)
|
|
58
|
+
* Merge pull request #2112 from roomle-dev/feat/hi-validate-attribute-options ([0002459](https://github.com/roomle-dev/roomle-ui/commit/0002459)), closes [#2112](https://github.com/roomle-dev/roomle-ui/issues/2112)
|
|
59
|
+
* Merge pull request #2113 from roomle-dev/feat/embedding-lib-exports-suggestion-2 ([7075571](https://github.com/roomle-dev/roomle-ui/commit/7075571)), closes [#2113](https://github.com/roomle-dev/roomle-ui/issues/2113)
|
|
60
|
+
* Merge pull request #2114 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.2 ([91afdc5](https://github.com/roomle-dev/roomle-ui/commit/91afdc5)), closes [#2114](https://github.com/roomle-dev/roomle-ui/issues/2114)
|
|
61
|
+
* Merge pull request #2115 from roomle-dev/chore/lint-errors ([4e34c28](https://github.com/roomle-dev/roomle-ui/commit/4e34c28)), closes [#2115](https://github.com/roomle-dev/roomle-ui/issues/2115)
|
|
62
|
+
* Merge pull request #2116 from roomle-dev/docs/add-migration-guides-RML-15708 ([b2b084b](https://github.com/roomle-dev/roomle-ui/commit/b2b084b)), closes [#2116](https://github.com/roomle-dev/roomle-ui/issues/2116)
|
|
63
|
+
* Merge pull request #2117 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.3 ([7be8480](https://github.com/roomle-dev/roomle-ui/commit/7be8480)), closes [#2117](https://github.com/roomle-dev/roomle-ui/issues/2117)
|
|
64
|
+
* Merge pull request #2118 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.4 ([7bb9f9d](https://github.com/roomle-dev/roomle-ui/commit/7bb9f9d)), closes [#2118](https://github.com/roomle-dev/roomle-ui/issues/2118)
|
|
65
|
+
* Merge pull request #2119 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.5 ([2b93abb](https://github.com/roomle-dev/roomle-ui/commit/2b93abb)), closes [#2119](https://github.com/roomle-dev/roomle-ui/issues/2119)
|
|
66
|
+
* Merge pull request #2120 from roomle-dev/fix/multi-seelction ([f0c0b53](https://github.com/roomle-dev/roomle-ui/commit/f0c0b53)), closes [#2120](https://github.com/roomle-dev/roomle-ui/issues/2120)
|
|
67
|
+
* Merge pull request #2122 from roomle-dev/feat/hf-hi-room-information ([093a236](https://github.com/roomle-dev/roomle-ui/commit/093a236)), closes [#2122](https://github.com/roomle-dev/roomle-ui/issues/2122)
|
|
68
|
+
* Merge pull request #2124 from roomle-dev/refactor/place-order ([76bdbb7](https://github.com/roomle-dev/roomle-ui/commit/76bdbb7)), closes [#2124](https://github.com/roomle-dev/roomle-ui/issues/2124)
|
|
69
|
+
* Merge pull request #2125 from roomle-dev/fix/oidc-auth-for-npm-RML-15792 ([62b9db4](https://github.com/roomle-dev/roomle-ui/commit/62b9db4)), closes [#2125](https://github.com/roomle-dev/roomle-ui/issues/2125)
|
|
70
|
+
* Merge pull request #2126 from roomle-dev/chore/package-lock ([915321d](https://github.com/roomle-dev/roomle-ui/commit/915321d)), closes [#2126](https://github.com/roomle-dev/roomle-ui/issues/2126)
|
|
71
|
+
* Merge pull request #2127 from roomle-dev/fix/exception ([203c752](https://github.com/roomle-dev/roomle-ui/commit/203c752)), closes [#2127](https://github.com/roomle-dev/roomle-ui/issues/2127)
|
|
72
|
+
* Merge pull request #2128 from roomle-dev/chore/fix-embedding-type-problems ([aed8a9a](https://github.com/roomle-dev/roomle-ui/commit/aed8a9a)), closes [#2128](https://github.com/roomle-dev/roomle-ui/issues/2128)
|
|
73
|
+
* Merge pull request #2129 from roomle-dev/fix/npm-release-with-oidc-token ([106d576](https://github.com/roomle-dev/roomle-ui/commit/106d576)), closes [#2129](https://github.com/roomle-dev/roomle-ui/issues/2129)
|
|
74
|
+
* Merge pull request #2130 from roomle-dev/feat/embedding-lib-exports-v2 ([517ccde](https://github.com/roomle-dev/roomle-ui/commit/517ccde)), closes [#2130](https://github.com/roomle-dev/roomle-ui/issues/2130)
|
|
75
|
+
* Merge pull request #2131 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.6 ([a15bdc0](https://github.com/roomle-dev/roomle-ui/commit/a15bdc0)), closes [#2131](https://github.com/roomle-dev/roomle-ui/issues/2131)
|
|
76
|
+
* Merge pull request #2133 from roomle-dev/upgraded-by-ci/core-2.67.0-alpha.7 ([d590fed](https://github.com/roomle-dev/roomle-ui/commit/d590fed)), closes [#2133](https://github.com/roomle-dev/roomle-ui/issues/2133)
|
|
77
|
+
* Merge pull request #2134 from roomle-dev/feat/hi-3d-export ([4559b23](https://github.com/roomle-dev/roomle-ui/commit/4559b23)), closes [#2134](https://github.com/roomle-dev/roomle-ui/issues/2134)
|
|
78
|
+
* Merge pull request #2135 from roomle-dev/fix/allow-custom-supademo-tuts ([c60b54e](https://github.com/roomle-dev/roomle-ui/commit/c60b54e)), closes [#2135](https://github.com/roomle-dev/roomle-ui/issues/2135)
|
|
79
|
+
* Merge pull request #2139 from roomle-dev/fix/sdk-release ([36cecaf](https://github.com/roomle-dev/roomle-ui/commit/36cecaf)), closes [#2139](https://github.com/roomle-dev/roomle-ui/issues/2139)
|
|
80
|
+
* Merge pull request #2140 from roomle-dev/refactor/place-order ([6540d7c](https://github.com/roomle-dev/roomle-ui/commit/6540d7c)), closes [#2140](https://github.com/roomle-dev/roomle-ui/issues/2140)
|
|
81
|
+
* Update packages/embedding-lib/README.md ([ca78974](https://github.com/roomle-dev/roomle-ui/commit/ca78974))
|
|
82
|
+
* Update packages/embedding-lib/src/examples/ext-catalog.ts ([3c8fd44](https://github.com/roomle-dev/roomle-ui/commit/3c8fd44))
|
|
83
|
+
* Update packages/embedding-lib/src/examples/utils/query-params.ts ([52177b2](https://github.com/roomle-dev/roomle-ui/commit/52177b2))
|
|
84
|
+
* Update packages/embedding-lib/src/examples/utils/server-url.ts ([ef6327d](https://github.com/roomle-dev/roomle-ui/commit/ef6327d))
|
|
85
|
+
* fix: add Types QA check to package.json ([84637f6](https://github.com/roomle-dev/roomle-ui/commit/84637f6))
|
|
86
|
+
* fix: broken test ([f86350a](https://github.com/roomle-dev/roomle-ui/commit/f86350a))
|
|
87
|
+
* fix: correct package-lock ([9549e7e](https://github.com/roomle-dev/roomle-ui/commit/9549e7e))
|
|
88
|
+
* fix: correct package-lock ([ed10ed7](https://github.com/roomle-dev/roomle-ui/commit/ed10ed7))
|
|
3
89
|
* fix: correct package.json ([3896adc](https://github.com/roomle-dev/roomle-ui/commit/3896adc))
|
|
90
|
+
* fix: correct package.json entries ([8158c41](https://github.com/roomle-dev/roomle-ui/commit/8158c41))
|
|
91
|
+
* fix: detect supademo link pattern, even with custom domain ([da52633](https://github.com/roomle-dev/roomle-ui/commit/da52633))
|
|
92
|
+
* fix: do not show delete button if all root modules are selected ([eb0abcd](https://github.com/roomle-dev/roomle-ui/commit/eb0abcd))
|
|
93
|
+
* fix: failing playwright tests ([bf66eb4](https://github.com/roomle-dev/roomle-ui/commit/bf66eb4))
|
|
94
|
+
* fix: failing test ([ddf58c5](https://github.com/roomle-dev/roomle-ui/commit/ddf58c5))
|
|
95
|
+
* fix: make it work ([c53c838](https://github.com/roomle-dev/roomle-ui/commit/c53c838))
|
|
96
|
+
* fix: make tests work ([e84ea45](https://github.com/roomle-dev/roomle-ui/commit/e84ea45))
|
|
97
|
+
* fix: make things work ([8820bf2](https://github.com/roomle-dev/roomle-ui/commit/8820bf2))
|
|
98
|
+
* fix: multiselection event data ([aedf480](https://github.com/roomle-dev/roomle-ui/commit/aedf480))
|
|
99
|
+
* fix: package lock ([7908b7a](https://github.com/roomle-dev/roomle-ui/commit/7908b7a))
|
|
100
|
+
* fix: pass room information to getOrderData ([0770775](https://github.com/roomle-dev/roomle-ui/commit/0770775))
|
|
101
|
+
* fix: potential fix for sdk builds ([1230f9c](https://github.com/roomle-dev/roomle-ui/commit/1230f9c))
|
|
102
|
+
* fix: remove prettier errors ([ea1ac6c](https://github.com/roomle-dev/roomle-ui/commit/ea1ac6c))
|
|
103
|
+
* fix: remove type problems. Again we hit an issue with vite-plugin-dts and the underlying api-extract ([7cbda6c](https://github.com/roomle-dev/roomle-ui/commit/7cbda6c))
|
|
104
|
+
* fix: request order data with and without price ([4b07d02](https://github.com/roomle-dev/roomle-ui/commit/4b07d02))
|
|
105
|
+
* fix: save artifact ([5cb00da](https://github.com/roomle-dev/roomle-ui/commit/5cb00da))
|
|
106
|
+
* fix: switch back to --global so that is runs properly ([a94abf1](https://github.com/roomle-dev/roomle-ui/commit/a94abf1))
|
|
107
|
+
* fix: test and lint should work ([2c84943](https://github.com/roomle-dev/roomle-ui/commit/2c84943))
|
|
108
|
+
* fix: try to fix failing test ([d699130](https://github.com/roomle-dev/roomle-ui/commit/d699130))
|
|
109
|
+
* fix: try to fix flaky test ([765437c](https://github.com/roomle-dev/roomle-ui/commit/765437c))
|
|
110
|
+
* fix: try to fix git clone on CI ([077556b](https://github.com/roomle-dev/roomle-ui/commit/077556b))
|
|
111
|
+
* fix: try to make it run ([9c5c8f8](https://github.com/roomle-dev/roomle-ui/commit/9c5c8f8))
|
|
112
|
+
* fix: try to make it run ([c33d7dc](https://github.com/roomle-dev/roomle-ui/commit/c33d7dc))
|
|
113
|
+
* fix: try to make it work ([367daa2](https://github.com/roomle-dev/roomle-ui/commit/367daa2))
|
|
114
|
+
* fix: try to make it work on CI ([44bd05d](https://github.com/roomle-dev/roomle-ui/commit/44bd05d))
|
|
115
|
+
* fix: undefined property exception in configurator ([58f641b](https://github.com/roomle-dev/roomle-ui/commit/58f641b))
|
|
116
|
+
* chore: add better eslint rules ([316e1e2](https://github.com/roomle-dev/roomle-ui/commit/316e1e2))
|
|
117
|
+
* chore: add cross-env as devDependency, but had to do it manually because `@oxlint/linux-x64-gnu` bre ([88d912f](https://github.com/roomle-dev/roomle-ui/commit/88d912f))
|
|
118
|
+
* chore: add env variable ([9fa5d1e](https://github.com/roomle-dev/roomle-ui/commit/9fa5d1e))
|
|
119
|
+
* chore: add things from code review ([51d5b2a](https://github.com/roomle-dev/roomle-ui/commit/51d5b2a))
|
|
120
|
+
* chore: add to the CI workflow ([e777ee6](https://github.com/roomle-dev/roomle-ui/commit/e777ee6))
|
|
121
|
+
* chore: adjust docs path ([6c2b018](https://github.com/roomle-dev/roomle-ui/commit/6c2b018))
|
|
122
|
+
* chore: adjust paths and so on ([14d3a6f](https://github.com/roomle-dev/roomle-ui/commit/14d3a6f))
|
|
123
|
+
* chore(code-review): adjust paths in docs as mentioned by CoPilot and Dash ([2b12b56](https://github.com/roomle-dev/roomle-ui/commit/2b12b56))
|
|
124
|
+
* chore: adjust to new structure that is needed due to PR2130: ([c9a3308](https://github.com/roomle-dev/roomle-ui/commit/c9a3308))
|
|
125
|
+
* chore: adjust to new stuff ([8cdbebf](https://github.com/roomle-dev/roomle-ui/commit/8cdbebf))
|
|
126
|
+
* chore: allow breaking change indicator in commit messages ([26a4b04](https://github.com/roomle-dev/roomle-ui/commit/26a4b04))
|
|
127
|
+
* chore: another idea ([69da390](https://github.com/roomle-dev/roomle-ui/commit/69da390))
|
|
128
|
+
* chore: apply code review ([837f420](https://github.com/roomle-dev/roomle-ui/commit/837f420))
|
|
129
|
+
* chore: apply suggestions from code review ([f6378a5](https://github.com/roomle-dev/roomle-ui/commit/f6378a5))
|
|
130
|
+
* chore: before AI ([107509c](https://github.com/roomle-dev/roomle-ui/commit/107509c))
|
|
131
|
+
* chore: better docs ([99daf2b](https://github.com/roomle-dev/roomle-ui/commit/99daf2b))
|
|
132
|
+
* chore: code reviews suggestions ([3f864ff](https://github.com/roomle-dev/roomle-ui/commit/3f864ff))
|
|
133
|
+
* chore: commit before AI does stuff ([c873c5a](https://github.com/roomle-dev/roomle-ui/commit/c873c5a))
|
|
134
|
+
* chore: correct formatting ([8c0db08](https://github.com/roomle-dev/roomle-ui/commit/8c0db08))
|
|
135
|
+
* chore: correct package-lock ([57e000b](https://github.com/roomle-dev/roomle-ui/commit/57e000b))
|
|
136
|
+
* chore: fix embedding lint problems ([9921196](https://github.com/roomle-dev/roomle-ui/commit/9921196))
|
|
137
|
+
* chore: fix failing tests ([5e784f1](https://github.com/roomle-dev/roomle-ui/commit/5e784f1))
|
|
138
|
+
* chore: fix flakey test ([70ba151](https://github.com/roomle-dev/roomle-ui/commit/70ba151))
|
|
139
|
+
* chore: fix ts ([e29d87f](https://github.com/roomle-dev/roomle-ui/commit/e29d87f))
|
|
140
|
+
* chore: fix type issue ([da701e3](https://github.com/roomle-dev/roomle-ui/commit/da701e3))
|
|
141
|
+
* chore: get git clone to work ([fc42fa1](https://github.com/roomle-dev/roomle-ui/commit/fc42fa1))
|
|
142
|
+
* chore: hi order types and interfaces ([1333a8d](https://github.com/roomle-dev/roomle-ui/commit/1333a8d))
|
|
143
|
+
* chore: lint ([e4f5f2a](https://github.com/roomle-dev/roomle-ui/commit/e4f5f2a))
|
|
144
|
+
* chore: lint ([441b65f](https://github.com/roomle-dev/roomle-ui/commit/441b65f))
|
|
145
|
+
* chore(wip): make it more correct ([f8196d6](https://github.com/roomle-dev/roomle-ui/commit/f8196d6))
|
|
146
|
+
* chore: make less changes ([b2115bf](https://github.com/roomle-dev/roomle-ui/commit/b2115bf))
|
|
147
|
+
* chore: merge master ([e9f662f](https://github.com/roomle-dev/roomle-ui/commit/e9f662f))
|
|
148
|
+
* chore: more docs ([8a78f5c](https://github.com/roomle-dev/roomle-ui/commit/8a78f5c))
|
|
149
|
+
* chore: move actions into product settings info section ([0cc0bf3](https://github.com/roomle-dev/roomle-ui/commit/0cc0bf3))
|
|
150
|
+
* chore: only build SDK once ([6cbb599](https://github.com/roomle-dev/roomle-ui/commit/6cbb599))
|
|
151
|
+
* chore: remove comments ([5342d02](https://github.com/roomle-dev/roomle-ui/commit/5342d02))
|
|
152
|
+
* chore: remove deprecated hi settings ([9ae82c2](https://github.com/roomle-dev/roomle-ui/commit/9ae82c2))
|
|
153
|
+
* chore: remove lint errors ([7775e9f](https://github.com/roomle-dev/roomle-ui/commit/7775e9f))
|
|
154
|
+
* chore(code-review): remove out dated to do ([241ef52](https://github.com/roomle-dev/roomle-ui/commit/241ef52))
|
|
155
|
+
* chore: remove too much docs ([a2db53c](https://github.com/roomle-dev/roomle-ui/commit/a2db53c))
|
|
156
|
+
* chore: try more fine grained git command ([f507d1b](https://github.com/roomle-dev/roomle-ui/commit/f507d1b))
|
|
157
|
+
* chore(wip): update formatting ([5feebc7](https://github.com/roomle-dev/roomle-ui/commit/5feebc7))
|
|
158
|
+
* chore: update translations ([365ca58](https://github.com/roomle-dev/roomle-ui/commit/365ca58))
|
|
159
|
+
* chore: upgrade node to 24.12.0, npm to 11.6.2, semantic-release to 25.0.2 ([ac082d3](https://github.com/roomle-dev/roomle-ui/commit/ac082d3))
|
|
160
|
+
* chore: use new setupHi ([5087543](https://github.com/roomle-dev/roomle-ui/commit/5087543))
|
|
161
|
+
* docs: getParametersOfComponent migration ([a8583f9](https://github.com/roomle-dev/roomle-ui/commit/a8583f9))
|
|
162
|
+
* docs: HI api "sendToOM" ([b49081f](https://github.com/roomle-dev/roomle-ui/commit/b49081f))
|
|
163
|
+
* docs: improve deprecation warning ([a1f73fa](https://github.com/roomle-dev/roomle-ui/commit/a1f73fa))
|
|
164
|
+
* docs: refine docu ([db89b59](https://github.com/roomle-dev/roomle-ui/commit/db89b59))
|
|
165
|
+
* feat: add check for specific version ([448422d](https://github.com/roomle-dev/roomle-ui/commit/448422d))
|
|
166
|
+
* feat: add feature flag for local 3d export ([05da022](https://github.com/roomle-dev/roomle-ui/commit/05da022))
|
|
167
|
+
* feat: core api rootModuleIds ([0917197](https://github.com/roomle-dev/roomle-ui/commit/0917197))
|
|
168
|
+
* feat: create a build step for examples ([d725c64](https://github.com/roomle-dev/roomle-ui/commit/d725c64))
|
|
169
|
+
* feat: embedding lib hi exports ([0521bf8](https://github.com/roomle-dev/roomle-ui/commit/0521bf8))
|
|
170
|
+
* feat: optional hi order header for placeOrder and fetchPrice ([f050ee7](https://github.com/roomle-dev/roomle-ui/commit/f050ee7))
|
|
171
|
+
* feat(core): upgrade to version 2.66.0-alpha.2 ([28cdd2d](https://github.com/roomle-dev/roomle-ui/commit/28cdd2d))
|
|
172
|
+
* feat(core): upgrade to version 2.66.0-alpha.3 ([3de1d4a](https://github.com/roomle-dev/roomle-ui/commit/3de1d4a))
|
|
173
|
+
* feat(core): upgrade to version 2.66.0 ([da53848](https://github.com/roomle-dev/roomle-ui/commit/da53848))
|
|
174
|
+
* feat(core): upgrade to version 2.67.0-alpha.1 ([f8af01a](https://github.com/roomle-dev/roomle-ui/commit/f8af01a))
|
|
175
|
+
* feat(core): upgrade to version 2.67.0-alpha.2 ([eba64c3](https://github.com/roomle-dev/roomle-ui/commit/eba64c3))
|
|
176
|
+
* feat(core): upgrade to version 2.67.0-alpha.3 ([d2fe8b4](https://github.com/roomle-dev/roomle-ui/commit/d2fe8b4))
|
|
177
|
+
* feat(core): upgrade to version 2.67.0-alpha.4 ([f4f7e23](https://github.com/roomle-dev/roomle-ui/commit/f4f7e23))
|
|
178
|
+
* feat(core): upgrade to version 2.67.0-alpha.5 ([2282bfc](https://github.com/roomle-dev/roomle-ui/commit/2282bfc))
|
|
179
|
+
* feat(core): upgrade to version 2.67.0-alpha.6 ([223ea5e](https://github.com/roomle-dev/roomle-ui/commit/223ea5e))
|
|
180
|
+
* feat(core): upgrade to version 2.67.0-alpha.7 ([c0e5ce9](https://github.com/roomle-dev/roomle-ui/commit/c0e5ce9))
|
|
181
|
+
* feat: validate hi attribute options ([b948473](https://github.com/roomle-dev/roomle-ui/commit/b948473))
|
|
182
|
+
* cd: add check if package.json exists ([e023e6e](https://github.com/roomle-dev/roomle-ui/commit/e023e6e))
|
|
183
|
+
* cd: release debug version to verify publishing works ([1173b19](https://github.com/roomle-dev/roomle-ui/commit/1173b19))
|
|
184
|
+
* cd: remove dry-run flag ([c42e057](https://github.com/roomle-dev/roomle-ui/commit/c42e057))
|
|
185
|
+
* cd: run release embedding lib in dry-run mode ([2221bb4](https://github.com/roomle-dev/roomle-ui/commit/2221bb4))
|
|
186
|
+
* cd: test eslint-plugin-roomle release ([1642b74](https://github.com/roomle-dev/roomle-ui/commit/1642b74))
|
|
187
|
+
* cd: use embedding pre-release branch as trigger ([d133026](https://github.com/roomle-dev/roomle-ui/commit/d133026))
|
|
188
|
+
* cd: use github hosted runner to allow npm oidc token auth ([ac66586](https://github.com/roomle-dev/roomle-ui/commit/ac66586))
|
|
189
|
+
* style: fix formatting ([b929262](https://github.com/roomle-dev/roomle-ui/commit/b929262))
|
|
190
|
+
* style: redesign sidebar actions buttons ([d234d4c](https://github.com/roomle-dev/roomle-ui/commit/d234d4c))
|
|
191
|
+
* style: reorganize product info div ([f78e895](https://github.com/roomle-dev/roomle-ui/commit/f78e895))
|
|
192
|
+
* ci: add fetch_head option ([aa4dd85](https://github.com/roomle-dev/roomle-ui/commit/aa4dd85))
|
|
193
|
+
* ci: fix git url, set provenance to false ([f1e66fc](https://github.com/roomle-dev/roomle-ui/commit/f1e66fc))
|
|
194
|
+
* ci: install root dependencies, enable dry-run mode, remove unused gcloud auth ([3ad31f3](https://github.com/roomle-dev/roomle-ui/commit/3ad31f3))
|
|
195
|
+
* ci: re-use the types-qa tag ([79f5734](https://github.com/roomle-dev/roomle-ui/commit/79f5734))
|
|
196
|
+
* ci: remove git config command ([9a25526](https://github.com/roomle-dev/roomle-ui/commit/9a25526))
|
|
197
|
+
* ci: remove npm token ([8a9f4ef](https://github.com/roomle-dev/roomle-ui/commit/8a9f4ef))
|
|
198
|
+
* ci: remove unused @semantic-release/exec ([9ea9bfb](https://github.com/roomle-dev/roomle-ui/commit/9ea9bfb))
|
|
199
|
+
* ci: revert out-commented steps ([c252ce7](https://github.com/roomle-dev/roomle-ui/commit/c252ce7))
|
|
200
|
+
* ci: use github hosted runners, autoformat workflow file ([5b4776b](https://github.com/roomle-dev/roomle-ui/commit/5b4776b))
|
|
201
|
+
* refactor: fix formatting ([d73c522](https://github.com/roomle-dev/roomle-ui/commit/d73c522))
|
|
202
|
+
* refactor: removed deprecated hi api ([6bdff41](https://github.com/roomle-dev/roomle-ui/commit/6bdff41))
|
|
203
|
+
* refactor: removed deprecated hi callbacks ([599e3b7](https://github.com/roomle-dev/roomle-ui/commit/599e3b7))
|
|
204
|
+
* refactor: tidy-up fetch hi order data with price ([ef6732e](https://github.com/roomle-dev/roomle-ui/commit/ef6732e))
|
|
205
|
+
* refactor: tidy-up save and collect hi order data ([376f345](https://github.com/roomle-dev/roomle-ui/commit/376f345))
|
|
206
|
+
* test: placeOrder and fetchPrice ([4522a1d](https://github.com/roomle-dev/roomle-ui/commit/4522a1d))
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### BREAKING CHANGE
|
|
210
|
+
|
|
211
|
+
* @roomle/web-sdk now exports TypeScript types from a single entry point
|
|
212
|
+
this means that imports of the SDK change from deeply nested import paths to just the main
|
|
213
|
+
file. This means the following changes
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
// **Before (v2.x):**
|
|
217
|
+
import { type PlanElementViewModel } from '@roomle/web-sdk/common-core/src/view-model/plan-element-view-model';
|
|
218
|
+
import type { WallDimensionTransferable } from '@roomle/web-sdk/planner-core/src/view-model/wall-plan-element-view-model';
|
|
219
|
+
|
|
220
|
+
// **After (v3.0.0):**
|
|
221
|
+
import type {
|
|
222
|
+
PlanElementViewModel,
|
|
223
|
+
WallDimensionTransferable
|
|
224
|
+
} from '@roomle/web-sdk';
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
For more details see: packages/web-sdk/MIGRATION-v2-to-v3.md
|
package/hi.js
CHANGED
|
@@ -32,12 +32,12 @@ const u = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
|
|
|
32
32
|
"json",
|
|
33
33
|
o,
|
|
34
34
|
{ property: "articles" }
|
|
35
|
-
)).json(),
|
|
35
|
+
)).json(), I = async (o) => await (await y(
|
|
36
36
|
f(o, "masterData"),
|
|
37
37
|
"json",
|
|
38
38
|
o,
|
|
39
39
|
{ property: "masterData" }
|
|
40
|
-
)).json(),
|
|
40
|
+
)).json(), h = async (o) => {
|
|
41
41
|
let t = await (await y(
|
|
42
42
|
f(o, "calc.js"),
|
|
43
43
|
"text",
|
|
@@ -49,11 +49,11 @@ const u = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
|
|
|
49
49
|
if (!t)
|
|
50
50
|
throw new Error("Script load error");
|
|
51
51
|
return t;
|
|
52
|
-
},
|
|
53
|
-
onLoadJavascript: (e) =>
|
|
52
|
+
}, T = (o) => ({
|
|
53
|
+
onLoadJavascript: (e) => h(o),
|
|
54
54
|
onLoadArticleCatalog: (e) => w(o),
|
|
55
|
-
onLoadMasterData: (e) =>
|
|
56
|
-
}),
|
|
55
|
+
onLoadMasterData: (e) => I(o)
|
|
56
|
+
}), j = async (o, e, t, s = {}) => {
|
|
57
57
|
const { baseUrl: n, om: r } = o.serverOptions ?? {}, a = encodeURIComponent(r?.endpointUrl || ""), c = encodeURIComponent(r?.subscriptionId || ""), p = r?.key || "";
|
|
58
58
|
return await (await fetch(
|
|
59
59
|
(n ?? u) + `${encodeURIComponent(t)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${a}`,
|
|
@@ -66,7 +66,7 @@ const u = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
)).json();
|
|
69
|
-
},
|
|
69
|
+
}, g = async (o, e, t = {}) => {
|
|
70
70
|
const { baseUrl: s, om: n } = o.serverOptions ?? {}, r = encodeURIComponent(n?.endpointUrl || ""), a = encodeURIComponent(n?.subscriptionId || ""), c = n?.key || "";
|
|
71
71
|
return await (await fetch(
|
|
72
72
|
(s ?? u) + `${encodeURIComponent(e)}&subscriptionId=${a}&apiKey=${c}&baseUrl=${r}`,
|
|
@@ -80,10 +80,10 @@ const u = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
|
|
|
80
80
|
)).json();
|
|
81
81
|
};
|
|
82
82
|
let i = null;
|
|
83
|
-
const
|
|
83
|
+
const A = async (o, e = {}) => {
|
|
84
84
|
i && window.removeEventListener("message", i);
|
|
85
85
|
const t = typeof o == "string" ? { libraryId: o } : o;
|
|
86
|
-
e.onLoadJavascript === void 0 && (e.onLoadJavascript = (n) =>
|
|
86
|
+
e.onLoadJavascript === void 0 && (e.onLoadJavascript = (n) => h(t)), e.onLoadArticleCatalog === void 0 && (e.onLoadArticleCatalog = (n) => w(t)), e.onLoadMasterData === void 0 && (e.onLoadMasterData = (n) => I(t));
|
|
87
87
|
const { expose: s } = await import("./comlink-BAiXCcU9.mjs");
|
|
88
88
|
i = (n) => {
|
|
89
89
|
if (n.data.type === "connect_hi" && n.data.port) {
|
|
@@ -91,16 +91,21 @@ const T = async (o, e = {}) => {
|
|
|
91
91
|
r.start?.(), s(b(e), r);
|
|
92
92
|
}
|
|
93
93
|
}, window.addEventListener("message", i);
|
|
94
|
-
},
|
|
94
|
+
}, E = () => {
|
|
95
95
|
i && (window.removeEventListener("message", i), i = null);
|
|
96
|
+
}, _ = {
|
|
97
|
+
HIDE: "hide",
|
|
98
|
+
SHOW_ATTRIBUTES: "attributes",
|
|
99
|
+
SHOW_ARTICLES: "articles"
|
|
96
100
|
};
|
|
97
101
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
_ as HI_PANEL_ACTION,
|
|
103
|
+
E as cleanupHi,
|
|
104
|
+
T as createHiLibraryCallbacks,
|
|
100
105
|
w as libLoadArticleCatalog,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
h as libLoadCalcScript,
|
|
107
|
+
I as libLoadMasterData,
|
|
108
|
+
g as omGetRequest,
|
|
109
|
+
j as omPostRequest,
|
|
110
|
+
A as setupHi
|
|
106
111
|
};
|
package/hi.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./utils-uEcN1DUR.mjs";const t="https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=",a=async(e,a,o,n={property:"default"})=>{const s=o.serverOptions??{},r={headers:{"Content-Type":"json"===a?"application/json":"text/plain","Access-Control-Allow-Origin":"*"}};s.language&&(r.headers["Accept-Language"]=s.language);try{performance.now();const{baseUrl:a,subscriptionId:o,key:n,endpointUrl:i}=s,c=await fetch((a??t)+encodeURIComponent(e)+`&subscriptionId=${encodeURIComponent(o||"")}`+(n?`&apiKey=${encodeURIComponent(n)}`:"")+(i?`&baseUrl=${encodeURIComponent(i)}`:""),r);if(performance.now(),!c.ok)throw new Error(`Failed to fetch data from ${e}: ${c.statusText}`);return c}catch(e){throw e}},o={"e2fe8b3d-da31-4a20-92ab-ab6e3839300e":new Set(["Furniture_Smith"])},n=(e,t)=>{const{libraryId:a,serverOptions:n}=e;return n?.subscriptionId&&o[n.subscriptionId]?.has(a)?`api/pos/${t}?libraryId=${a}`:`api/pos/libraries/${a}/${t}`},s=async e=>await(await a(n(e,"articles"),"json",e,{property:"articles"})).json(),r=async e=>await(await a(n(e,"masterData"),"json",e,{property:"masterData"})).json(),i=async e=>{let t=await(await a(n(e,"calc.js"),"text",e,{property:"calc.js"})).text();if(!t)throw new Error("Script load error");return t},c=e=>({onLoadJavascript:t=>i(e),onLoadArticleCatalog:t=>s(e),onLoadMasterData:t=>r(e)}),p=async(e,a,o,n={})=>{const{baseUrl:s,om:r}=e.serverOptions??{},i=encodeURIComponent(r?.endpointUrl||""),c=encodeURIComponent(r?.subscriptionId||""),p=r?.key||"";return await(await fetch((s??t)+`${encodeURIComponent(o)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${i}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json",...n}})).json()},d=async(e,a,o={})=>{const{baseUrl:n,om:s}=e.serverOptions??{},r=encodeURIComponent(s?.endpointUrl||""),i=encodeURIComponent(s?.subscriptionId||""),c=s?.key||"";return await(await fetch((n??t)+`${encodeURIComponent(a)}&subscriptionId=${i}&apiKey=${c}&baseUrl=${r}`,{method:"GET",headers:{"Content-Type":"application/json",...o}})).json()};let l=null;const m=async(t,a={})=>{l&&window.removeEventListener("message",l);const o="string"==typeof t?{libraryId:t}:t;void 0===a.onLoadJavascript&&(a.onLoadJavascript=e=>i(o)),void 0===a.onLoadArticleCatalog&&(a.onLoadArticleCatalog=e=>s(o)),void 0===a.onLoadMasterData&&(a.onLoadMasterData=e=>r(o));const{expose:n}=await import("./comlink-CmT64Qi3.mjs");l=t=>{if("connect_hi"===t.data.type&&t.data.port){const o=t.data.port;o.start?.(),n(e(a),o)}},window.addEventListener("message",l)},u=()=>{l&&(window.removeEventListener("message",l),l=null)};export{u as cleanupHi,c as createHiLibraryCallbacks,s as libLoadArticleCatalog,i as libLoadCalcScript,r as libLoadMasterData,d as omGetRequest,p as omPostRequest,m as setupHi};
|
|
1
|
+
import{c as e}from"./utils-uEcN1DUR.mjs";const t="https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=",a=async(e,a,o,n={property:"default"})=>{const s=o.serverOptions??{},r={headers:{"Content-Type":"json"===a?"application/json":"text/plain","Access-Control-Allow-Origin":"*"}};s.language&&(r.headers["Accept-Language"]=s.language);try{performance.now();const{baseUrl:a,subscriptionId:o,key:n,endpointUrl:i}=s,c=await fetch((a??t)+encodeURIComponent(e)+`&subscriptionId=${encodeURIComponent(o||"")}`+(n?`&apiKey=${encodeURIComponent(n)}`:"")+(i?`&baseUrl=${encodeURIComponent(i)}`:""),r);if(performance.now(),!c.ok)throw new Error(`Failed to fetch data from ${e}: ${c.statusText}`);return c}catch(e){throw e}},o={"e2fe8b3d-da31-4a20-92ab-ab6e3839300e":new Set(["Furniture_Smith"])},n=(e,t)=>{const{libraryId:a,serverOptions:n}=e;return n?.subscriptionId&&o[n.subscriptionId]?.has(a)?`api/pos/${t}?libraryId=${a}`:`api/pos/libraries/${a}/${t}`},s=async e=>await(await a(n(e,"articles"),"json",e,{property:"articles"})).json(),r=async e=>await(await a(n(e,"masterData"),"json",e,{property:"masterData"})).json(),i=async e=>{let t=await(await a(n(e,"calc.js"),"text",e,{property:"calc.js"})).text();if(!t)throw new Error("Script load error");return t},c=e=>({onLoadJavascript:t=>i(e),onLoadArticleCatalog:t=>s(e),onLoadMasterData:t=>r(e)}),p=async(e,a,o,n={})=>{const{baseUrl:s,om:r}=e.serverOptions??{},i=encodeURIComponent(r?.endpointUrl||""),c=encodeURIComponent(r?.subscriptionId||""),p=r?.key||"";return await(await fetch((s??t)+`${encodeURIComponent(o)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${i}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json",...n}})).json()},d=async(e,a,o={})=>{const{baseUrl:n,om:s}=e.serverOptions??{},r=encodeURIComponent(s?.endpointUrl||""),i=encodeURIComponent(s?.subscriptionId||""),c=s?.key||"";return await(await fetch((n??t)+`${encodeURIComponent(a)}&subscriptionId=${i}&apiKey=${c}&baseUrl=${r}`,{method:"GET",headers:{"Content-Type":"application/json",...o}})).json()};let l=null;const m=async(t,a={})=>{l&&window.removeEventListener("message",l);const o="string"==typeof t?{libraryId:t}:t;void 0===a.onLoadJavascript&&(a.onLoadJavascript=e=>i(o)),void 0===a.onLoadArticleCatalog&&(a.onLoadArticleCatalog=e=>s(o)),void 0===a.onLoadMasterData&&(a.onLoadMasterData=e=>r(o));const{expose:n}=await import("./comlink-CmT64Qi3.mjs");l=t=>{if("connect_hi"===t.data.type&&t.data.port){const o=t.data.port;o.start?.(),n(e(a),o)}},window.addEventListener("message",l)},u=()=>{l&&(window.removeEventListener("message",l),l=null)},y={HIDE:"hide",SHOW_ATTRIBUTES:"attributes",SHOW_ARTICLES:"articles"};export{y as HI_PANEL_ACTION,u as cleanupHi,c as createHiLibraryCallbacks,s as libLoadArticleCatalog,i as libLoadCalcScript,r as libLoadMasterData,d as omGetRequest,p as omPostRequest,m as setupHi};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.1",
|
|
4
4
|
"description": "This is a small library which can be used to communicate with the Roomle Configurator. ES modules only (browser-compatible).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./roomle-embedding-lib.js",
|
|
@@ -14,3 +14,4 @@ export { createHiLibraryCallbacks } from './homag-intelligence/hi-callbacks';
|
|
|
14
14
|
export { libLoadArticleCatalog, libLoadMasterData, libLoadCalcScript, } from './homag-intelligence/hi-requests';
|
|
15
15
|
export { omPostRequest, omGetRequest, } from './homag-intelligence/hi-order-manager';
|
|
16
16
|
export { setupHi, cleanupHi } from './homag-intelligence/hi-setup';
|
|
17
|
+
export { HI_PANEL_ACTION, type HiPanelActionType, type HiOrderHeader, type HiOrder, type HiOrderData, type HiPriceData, type HiCallbacks, } from '../../common/src/hi/hi-types';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HomagIntelligenceInitData } from '../../../web-sdk/packages';
|
|
2
|
-
import { HiCallbacks } from '
|
|
2
|
+
import { HiCallbacks } from '../../../common/src/hi/hi-types';
|
|
3
3
|
export declare const createHiLibraryCallbacks: (hiInitData: HomagIntelligenceInitData) => HiCallbacks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HiCallbacks } from '
|
|
1
|
+
import { HiCallbacks } from '../../../common/src/hi/hi-types';
|
|
2
2
|
import { HomagIntelligenceInitData } from '../../../web-sdk/packages';
|
|
3
3
|
export declare const setupHi: (libraryIdOrOptions: HomagIntelligenceInitData | string, callbacks?: Partial<HiCallbacks>) => Promise<void>;
|
|
4
4
|
export declare const cleanupHi: () => void;
|
|
@@ -3,7 +3,7 @@ import { PossibleCustomViews } from '../../../src/configurator/embedding/custom-
|
|
|
3
3
|
import { ConfiguratorUiCallbacks, RoomleConfigurator, RoomleGLBViewer, RoomlePlanner } from '../../web-sdk/packages';
|
|
4
4
|
import { DragIn } from './plugins/drag-in';
|
|
5
5
|
import { Connector, RoomleEmbeddingApiKeys } from './connector';
|
|
6
|
-
import { HiCallbacks } from '
|
|
6
|
+
import { HiCallbacks } from '../../common/src/hi/hi-types';
|
|
7
7
|
export declare const NAMESPACE: {
|
|
8
8
|
[key: string]: keyof RoomleEmbeddingApiKeys | 'callbacks';
|
|
9
9
|
};
|
package/roomle-embedding-lib.js
CHANGED
|
@@ -150,7 +150,7 @@ const F = () => {
|
|
|
150
150
|
}
|
|
151
151
|
return s;
|
|
152
152
|
};
|
|
153
|
-
var
|
|
153
|
+
var L = /* @__PURE__ */ ((s) => (s.BOTTOM_BAR = "bottom_bar", s.PARTLIST_BOUNDS = "partlist_bounds", s.INTERACTION_NOTES = "interaction_notes", s.PARAMETER_GROUPS = "parameter_groups", s))(L || {});
|
|
154
154
|
const J = (s) => JSON.parse(JSON.stringify(s)), K = {
|
|
155
155
|
mobileLandscape: !0,
|
|
156
156
|
floorMaterialRootTag: "materials_root",
|
|
@@ -162,7 +162,7 @@ const J = (s) => JSON.parse(JSON.stringify(s)), K = {
|
|
|
162
162
|
partlist_print: !0
|
|
163
163
|
},
|
|
164
164
|
elements: {
|
|
165
|
-
[
|
|
165
|
+
[L.INTERACTION_NOTES]: !0
|
|
166
166
|
},
|
|
167
167
|
helpcenter: {
|
|
168
168
|
roomdesigner: !0,
|
|
@@ -176,7 +176,8 @@ const J = (s) => JSON.parse(JSON.stringify(s)), K = {
|
|
|
176
176
|
wallAutoHeight: !1,
|
|
177
177
|
openCloseAnimation: !0,
|
|
178
178
|
enableTwoLevelCatalog: !1,
|
|
179
|
-
webGpu: !1
|
|
179
|
+
webGpu: !1,
|
|
180
|
+
localExport3d: !1
|
|
180
181
|
},
|
|
181
182
|
rotationSnapDegrees: 10,
|
|
182
183
|
interactionsCollapsed: !1
|
|
@@ -206,7 +207,7 @@ const J = (s) => JSON.parse(JSON.stringify(s)), K = {
|
|
|
206
207
|
}, q = "<CONF_ID>", Q = "#CONFIGURATIONID#", X = (s) => {
|
|
207
208
|
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);
|
|
208
209
|
}, M = () => /(android)/i.test(navigator.userAgent);
|
|
209
|
-
class
|
|
210
|
+
class y {
|
|
210
211
|
_messageHandler = null;
|
|
211
212
|
isSetupDone = !1;
|
|
212
213
|
viewName = "main";
|
|
@@ -296,7 +297,7 @@ class R {
|
|
|
296
297
|
);
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
|
-
const
|
|
300
|
+
const R = () => {
|
|
300
301
|
let s, e;
|
|
301
302
|
return { promise: new Promise((r, o) => {
|
|
302
303
|
s = r, e = o;
|
|
@@ -363,7 +364,7 @@ const y = () => {
|
|
|
363
364
|
() => s.style.setProperty(O, H()),
|
|
364
365
|
0
|
|
365
366
|
);
|
|
366
|
-
},
|
|
367
|
+
}, b = "rml-styles", se = 450, O = "--rml-full-height", c = {
|
|
367
368
|
CONTAINER: "rml-container",
|
|
368
369
|
FILL: "rml-fill",
|
|
369
370
|
POSITION: "rml-pos",
|
|
@@ -371,7 +372,7 @@ const y = () => {
|
|
|
371
372
|
ANDROID_HEIGHT: "rml-android-height",
|
|
372
373
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
373
374
|
}, _ = /* @__PURE__ */ new Map();
|
|
374
|
-
class ae extends
|
|
375
|
+
class ae extends y {
|
|
375
376
|
static createPlanner(e, t, r, o = []) {
|
|
376
377
|
return this._create(
|
|
377
378
|
e,
|
|
@@ -381,9 +382,9 @@ class ae extends R {
|
|
|
381
382
|
);
|
|
382
383
|
}
|
|
383
384
|
static async connect(e, t = []) {
|
|
384
|
-
const r = new
|
|
385
|
+
const r = new y();
|
|
385
386
|
r.viewName = e;
|
|
386
|
-
const { resolve: o, promise: n } =
|
|
387
|
+
const { resolve: o, promise: n } = R(), { resolve: a, promise: i } = R(), l = ({
|
|
387
388
|
message: g,
|
|
388
389
|
args: m
|
|
389
390
|
}) => {
|
|
@@ -462,7 +463,7 @@ class ae extends R {
|
|
|
462
463
|
static setupHi(e) {
|
|
463
464
|
console.warn(
|
|
464
465
|
`[DEPRECATED] RoomleEmbeddingApi.setupHi() is deprecated and will be removed.
|
|
465
|
-
Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(callbacks);`
|
|
466
|
+
Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryIdOrOptions, callbacks);`
|
|
466
467
|
), this.hiMessageHandler && window.removeEventListener("message", this.hiMessageHandler), this.hiMessageHandler = (t) => {
|
|
467
468
|
if (t.data.type === "connect_hi" && t.data.port) {
|
|
468
469
|
const r = t.data.port;
|
|
@@ -508,9 +509,9 @@ Migration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(callbacks
|
|
|
508
509
|
);
|
|
509
510
|
if (_.has(t))
|
|
510
511
|
throw new Error("There is already an instance on this DOM element");
|
|
511
|
-
if (!!!document.getElementById(
|
|
512
|
+
if (!!!document.getElementById(b)) {
|
|
512
513
|
const u = r.zIndex || 9999999, d = document.createElement("style");
|
|
513
|
-
d.type = "text/css", d.id =
|
|
514
|
+
d.type = "text/css", d.id = b;
|
|
514
515
|
const g = "transition:all ease-in-out " + se + "ms;", m = ["-webkit-", "-o-"].reduce(
|
|
515
516
|
(v, P) => v += P + g,
|
|
516
517
|
""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expose as e}from"./comlink-CmT64Qi3.mjs";import{c as t}from"./utils-uEcN1DUR.mjs";class s{_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 r=["127.0.0.1","localhost","0.0.0.0"],i=["language","browserLanguage","userLanguage","systemLanguage"],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},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-DePKqSKW.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 g=()=>{let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}},d={SDK:"extended",CONFIGURATOR_SDK:"configurator",CALLBACKS:"callbacks",UI:"ui",ANALYTICS:"analytics",GLOBAL:"global",RAPI:"rapi"},h=".",m=d.SDK+h+d.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?d.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},b="data-rml-interaction-container",y=(e,t,s)=>{let r=null;Object.defineProperty(e,t,{get:()=>r||s,set(e){r=e?.mute?e.value:e}})},M=()=>.01*window.innerHeight+"px",T=e=>{e&&setTimeout(()=>e.style.setProperty(A,M()),0)},v="rml-styles",A="--rml-full-height",O="rml-container",L="rml-fill",N="rml-pos",I="rml-android-height",R="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 r=new u;r.viewName=e;const{resolve:i,promise:a}=g(),{resolve:n,promise:o}=g(),l=new s("custom-view-"+e,window,window.parent,({message:e,args:t})=>{switch(e){case _.REGISTER_CUSTOM_VIEW_DONE:i();break;case _.RETURN_METHODS:r.handleSetup(t[0]),n();break;default:if(r.isSetupDone)return r.executeMessage({message:e,args:t})}});r.setMessageHandler(l);const c=[e];return l.sendMessage(_.REGISTER_CUSTOM_VIEW,c),await a,l.sendMessage(_.GET_METHODS,c),await o,r.setupPlugins(t,document.body,"custom-view"),await Promise.allSettled(r.pluginsLoaded),r}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(s){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(t(s),i)}},window.addEventListener("message",this.hiMessageHandler)}static async _create(e,t,s,n){return new Promise(async(c,u)=>{try{const u=a((()=>{const e=(e=>JSON.parse(JSON.stringify(e)))(o);e.locale||(e.locale=((e=null)=>{const t=window.navigator;if(e)return e.substr(0,2);if(Array.isArray(t.languages)&&t.languages.length>0)return t.languages[0].substr(0,2);for(let e=0,s=i.length;e<s;e++){const s=t[i[e]];if(s)return s.substr(0,2)}return"en"})()),"(idle)"===e.id&&delete e.id;const t=(()=>{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 t&&(e=>!!(r.includes(e)||e.endsWith("roomle.com")||e.endsWith("gitlab.io")||e.endsWith("gitlab.com")))(t)&&(e.configuratorId="demoConfigurator"),e.customApiUrl=void 0,e.emails=!1,e})(),(l(g=s),g?.customApiUrl&&(g.customApiUrl=decodeURIComponent(g.customApiUrl)),g.shareUrl&&(g.deeplink=g.shareUrl.replace("<CONF_ID>","#CONFIGURATIONID#")),g));(e=>{e.featureFlags||(e.featureFlags={}),"boolean"!=typeof e.featureFlags.realPartList&&(e.featureFlags.realPartList=!0),"boolean"!=typeof e.featureFlags.globalCallbacks&&(e.featureFlags.globalCallbacks=!0),"boolean"!=typeof e.featureFlags.mocAr&&(e.featureFlags.mocAr=!1)})(u);const d=await S(e,u);s=((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)})(d,u);const h=new this(d,t,s,n,c);return await Promise.allSettled(h.pluginsLoaded),h}catch(e){return u(e)}var g})}_waitForIframe;_container;_configuratorSettings;_initData={};_iframe;constructor(e,t,r,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(v)){const e=r.zIndex||9999999,t=document.createElement("style");t.type="text/css",t.id=v;const s="transition:all ease-in-out 450ms;",i=["-webkit-","-o-"].reduce((e,t)=>e+(t+s),"")+s,a=M();t.innerHTML=`\n .${O}{${A}:${a};}\n .${N}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${L}{width:100%;height:100%;opacity:1}\n .${I}{height:calc(var(${A},1vh)*100)}\n .${R}{overflow:hidden}\n `,document.head.appendChild(t)}this._executeMessage=this._executeMessage.bind(this);const n=new s("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=r,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(O),e.classList.add(L),e}_onResize(){T(this._iframe)}_onUseFullPage(){this._iframe.classList.add(N),document.documentElement.classList.add(R),window.document.body.classList.add(R),c()&&(T(this._iframe),this._iframe.classList.add(I))}_onBackToWebsite(){this._iframe.classList.remove(N),this._iframe.classList.remove(I),document.documentElement.classList.remove(R),window.document.body.classList.remove(R)}_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]),y(this.ui.callbacks,"onUseFullPage",this._onUseFullPage),y(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,b as INTERACTION_CONTAINER_SELECTOR,d 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{c as t}from"./utils-uEcN1DUR.mjs";class s{_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 r=["127.0.0.1","localhost","0.0.0.0"],i=["language","browserLanguage","userLanguage","systemLanguage"],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-DePKqSKW.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 g=()=>{let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}},d={SDK:"extended",CONFIGURATOR_SDK:"configurator",CALLBACKS:"callbacks",UI:"ui",ANALYTICS:"analytics",GLOBAL:"global",RAPI:"rapi"},h=".",m=d.SDK+h+d.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?d.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},b="data-rml-interaction-container",y=(e,t,s)=>{let r=null;Object.defineProperty(e,t,{get:()=>r||s,set(e){r=e?.mute?e.value:e}})},M=()=>.01*window.innerHeight+"px",T=e=>{e&&setTimeout(()=>e.style.setProperty(A,M()),0)},v="rml-styles",A="--rml-full-height",O="rml-container",L="rml-fill",N="rml-pos",I="rml-android-height",R="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 r=new u;r.viewName=e;const{resolve:i,promise:a}=g(),{resolve:n,promise:o}=g(),l=new s("custom-view-"+e,window,window.parent,({message:e,args:t})=>{switch(e){case _.REGISTER_CUSTOM_VIEW_DONE:i();break;case _.RETURN_METHODS:r.handleSetup(t[0]),n();break;default:if(r.isSetupDone)return r.executeMessage({message:e,args:t})}});r.setMessageHandler(l);const c=[e];return l.sendMessage(_.REGISTER_CUSTOM_VIEW,c),await a,l.sendMessage(_.GET_METHODS,c),await o,r.setupPlugins(t,document.body,"custom-view"),await Promise.allSettled(r.pluginsLoaded),r}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(s){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(t(s),i)}},window.addEventListener("message",this.hiMessageHandler)}static async _create(e,t,s,n){return new Promise(async(c,u)=>{try{const u=a((()=>{const e=(e=>JSON.parse(JSON.stringify(e)))(o);e.locale||(e.locale=((e=null)=>{const t=window.navigator;if(e)return e.substr(0,2);if(Array.isArray(t.languages)&&t.languages.length>0)return t.languages[0].substr(0,2);for(let e=0,s=i.length;e<s;e++){const s=t[i[e]];if(s)return s.substr(0,2)}return"en"})()),"(idle)"===e.id&&delete e.id;const t=(()=>{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 t&&(e=>!!(r.includes(e)||e.endsWith("roomle.com")||e.endsWith("gitlab.io")||e.endsWith("gitlab.com")))(t)&&(e.configuratorId="demoConfigurator"),e.customApiUrl=void 0,e.emails=!1,e})(),(l(g=s),g?.customApiUrl&&(g.customApiUrl=decodeURIComponent(g.customApiUrl)),g.shareUrl&&(g.deeplink=g.shareUrl.replace("<CONF_ID>","#CONFIGURATIONID#")),g));(e=>{e.featureFlags||(e.featureFlags={}),"boolean"!=typeof e.featureFlags.realPartList&&(e.featureFlags.realPartList=!0),"boolean"!=typeof e.featureFlags.globalCallbacks&&(e.featureFlags.globalCallbacks=!0),"boolean"!=typeof e.featureFlags.mocAr&&(e.featureFlags.mocAr=!1)})(u);const d=await S(e,u);s=((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)})(d,u);const h=new this(d,t,s,n,c);return await Promise.allSettled(h.pluginsLoaded),h}catch(e){return u(e)}var g})}_waitForIframe;_container;_configuratorSettings;_initData={};_iframe;constructor(e,t,r,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(v)){const e=r.zIndex||9999999,t=document.createElement("style");t.type="text/css",t.id=v;const s="transition:all ease-in-out 450ms;",i=["-webkit-","-o-"].reduce((e,t)=>e+(t+s),"")+s,a=M();t.innerHTML=`\n .${O}{${A}:${a};}\n .${N}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${L}{width:100%;height:100%;opacity:1}\n .${I}{height:calc(var(${A},1vh)*100)}\n .${R}{overflow:hidden}\n `,document.head.appendChild(t)}this._executeMessage=this._executeMessage.bind(this);const n=new s("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=r,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(O),e.classList.add(L),e}_onResize(){T(this._iframe)}_onUseFullPage(){this._iframe.classList.add(N),document.documentElement.classList.add(R),window.document.body.classList.add(R),c()&&(T(this._iframe),this._iframe.classList.add(I))}_onBackToWebsite(){this._iframe.classList.remove(N),this._iframe.classList.remove(I),document.documentElement.classList.remove(R),window.document.body.classList.remove(R)}_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]),y(this.ui.callbacks,"onUseFullPage",this._onUseFullPage),y(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,b as INTERACTION_CONTAINER_SELECTOR,d 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,91 +0,0 @@
|
|
|
1
|
-
import { MasterData, PosGroup, PosSaveData } from '../../web-sdk/packages';
|
|
2
|
-
export declare const HI_PANEL_ACTION: {
|
|
3
|
-
readonly HIDE: "hide";
|
|
4
|
-
readonly SHOW_ATTRIBUTES: "attributes";
|
|
5
|
-
readonly SHOW_ARTICLES: "articles";
|
|
6
|
-
};
|
|
7
|
-
export type HiPanelActionType = (typeof HI_PANEL_ACTION)[keyof typeof HI_PANEL_ACTION];
|
|
8
|
-
export interface HiCallbacks {
|
|
9
|
-
/**
|
|
10
|
-
* Requests the calculation script for the given library ID.
|
|
11
|
-
* @param libraryId the ID of the library for which the calculation script is requested
|
|
12
|
-
* @returns the calculation script as a string
|
|
13
|
-
*/
|
|
14
|
-
onLoadJavascript: (libraryId: string) => Promise<string>;
|
|
15
|
-
/**
|
|
16
|
-
* Requests the master data for the given library ID.
|
|
17
|
-
* @param libraryId the ID of the library for which the master data is requested
|
|
18
|
-
* @returns the master data as a Promise
|
|
19
|
-
*/
|
|
20
|
-
onLoadMasterData: (libraryId: string) => Promise<MasterData>;
|
|
21
|
-
/**
|
|
22
|
-
* Requests the article catalog for the given library ID.
|
|
23
|
-
* @param libraryId the ID of the library for which the article catalog is requested
|
|
24
|
-
* @returns the article catalog as a Promise
|
|
25
|
-
*/
|
|
26
|
-
onLoadArticleCatalog: (libraryId: string) => Promise<any>;
|
|
27
|
-
/**
|
|
28
|
-
* Notifies the host application that a price calculation should be performed.
|
|
29
|
-
* @param posGroups all groups in the plan
|
|
30
|
-
*/
|
|
31
|
-
onPriceCalc?: (posGroups: PosGroup[]) => Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Retrieves the current external load data which has to be used to replace the existing groups in the plan.
|
|
34
|
-
* @returns load data or null if no replacement is needed
|
|
35
|
-
*/
|
|
36
|
-
onGetSavedPosGroupData?: () => Promise<PosSaveData | null>;
|
|
37
|
-
/**
|
|
38
|
-
* "onCompletelyLoaded" is invoked when the groups in the plan are completely loaded.
|
|
39
|
-
*/
|
|
40
|
-
onPosGroupsCompletelyLoaded?: () => void;
|
|
41
|
-
/**
|
|
42
|
-
* "onPosGroupAdded" is invoked when a new group was created. (e.g. duplicate object)
|
|
43
|
-
* @param groupData The new group data JSON.
|
|
44
|
-
*/
|
|
45
|
-
onPosGroupAdded?: (posGroups: PosGroup[]) => Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* "onPosGroupChanged" is invoked when a new group was modified and recalculated. (e.g. split, merge, change, attribute)
|
|
48
|
-
*
|
|
49
|
-
* @param groupData The new group data JSON.
|
|
50
|
-
*/
|
|
51
|
-
onPosGroupChanged?: (posGroups: PosGroup[]) => Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* "onPosGroupDeleted" is invoked when a group was delete. (e.g. delete button in scene)
|
|
54
|
-
* @param groupData The ID of the group which was deleted.
|
|
55
|
-
*/
|
|
56
|
-
onPosGroupDeleted?: (posGroupIds: string[]) => Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* "onShowHidePanel" is invoked when a the content of the side panel should be changed or hidden.
|
|
59
|
-
* @param panel The panel to show or hide.
|
|
60
|
-
* @param posGroupId Optional ID of the selected group in case of SHOW_ATTRIBUTES.
|
|
61
|
-
* @param rootModuleId Optional ID of the selected root module in case of SHOW_ATTRIBUTES.
|
|
62
|
-
* @param subModuleId Optional ID of the selected sub module in case of SHOW_ATTRIBUTES.
|
|
63
|
-
*/
|
|
64
|
-
onShowHidePanel?: (panel: HiPanelActionType, posGroupId?: string, rootModuleId?: string, subModuleId?: string) => void;
|
|
65
|
-
/**
|
|
66
|
-
* "onSelectModule" is invoked when a the selected object in the scene was changed.
|
|
67
|
-
* @param posGroupId ID of the selected group
|
|
68
|
-
* @param rootModuleId ID of the selected root module
|
|
69
|
-
* @param subModuleId Optional id of the selected sub module
|
|
70
|
-
*/
|
|
71
|
-
onSelectModule?: (posGroupId: string, rootModuleId: string, subModuleId?: string) => void;
|
|
72
|
-
/**
|
|
73
|
-
* Request the price for the given order data.
|
|
74
|
-
* @param orderData order data
|
|
75
|
-
* @returns price data
|
|
76
|
-
*/
|
|
77
|
-
onFetchPrice?: (orderData: any) => Promise<any>;
|
|
78
|
-
/**
|
|
79
|
-
* "onPlaceOrder" is invoked when the user wants to place an order.
|
|
80
|
-
* You can use this to send the order data to Order Manager or to a 3rd party service.
|
|
81
|
-
* @param orderData
|
|
82
|
-
*/
|
|
83
|
-
onPlaceOrder?: (orderData: any) => Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
* "onLogMessage" is invoked when the Homag Intelligence library wants to log a message.
|
|
86
|
-
* You can use this to log messages in your own UI.
|
|
87
|
-
* @param area
|
|
88
|
-
* @param message
|
|
89
|
-
*/
|
|
90
|
-
onLogMessage?: (area: string, message: string) => void;
|
|
91
|
-
}
|