@roomle/embedding-lib 6.4.0-alpha.9 → 6.5.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 +75 -56
- package/hi.js +54 -48
- package/hi.min.js +1 -1
- package/package.json +1 -1
- package/packages/embedding-lib/src/hi.d.ts +2 -1
- package/packages/embedding-lib/src/homag-intelligence/hi-requests.d.ts +31 -0
- package/packages/embedding-lib/src/plugins/strategy/from-custom-view.d.ts +1 -1
- package/packages/embedding-lib/src/plugins/strategy/from-website.d.ts +1 -1
|
@@ -1,57 +1,76 @@
|
|
|
1
|
-
## 6.
|
|
1
|
+
## 6.5.0-alpha.1 (2026-03-13)
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Merge branch 'master' into feat/
|
|
12
|
-
* Merge branch 'master' into
|
|
13
|
-
* Merge branch 'master' into
|
|
14
|
-
* Merge branch 'master' into fix/
|
|
15
|
-
* Merge branch 'master' into fix/
|
|
16
|
-
* Merge branch 'master' into fix/
|
|
17
|
-
* Merge branch 'master' into fix/
|
|
18
|
-
* Merge branch 'master' into
|
|
19
|
-
* Merge branch 'master' into
|
|
20
|
-
* Merge branch 'master' into
|
|
21
|
-
* Merge
|
|
22
|
-
* Merge
|
|
23
|
-
* Merge
|
|
24
|
-
* Merge
|
|
25
|
-
* Merge
|
|
26
|
-
* Merge
|
|
27
|
-
* Merge
|
|
28
|
-
* Merge pull request #
|
|
29
|
-
* Merge pull request #
|
|
30
|
-
* Merge pull request #
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* feat(
|
|
51
|
-
* feat:
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
3
|
+
* Initial plan ([8186de5](https://github.com/roomle-dev/roomle-ui/commit/8186de5))
|
|
4
|
+
* Merge branch 'feat/add-flag-for-mesh-raycasting' of github.com:roomle-dev/roomle-ui into feat/add-fl ([f625052](https://github.com/roomle-dev/roomle-ui/commit/f625052))
|
|
5
|
+
* Merge branch 'master' into chore/build-examples-alpha-stage ([b6e6487](https://github.com/roomle-dev/roomle-ui/commit/b6e6487))
|
|
6
|
+
* Merge branch 'master' into chore/build-examples-alpha-stage ([829fe56](https://github.com/roomle-dev/roomle-ui/commit/829fe56))
|
|
7
|
+
* Merge branch 'master' into copilot/fix-buttons-partlist-planner-issue ([7286159](https://github.com/roomle-dev/roomle-ui/commit/7286159))
|
|
8
|
+
* Merge branch 'master' into docs/pos-group ([2515b0a](https://github.com/roomle-dev/roomle-ui/commit/2515b0a))
|
|
9
|
+
* Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([b0ceb0e](https://github.com/roomle-dev/roomle-ui/commit/b0ceb0e))
|
|
10
|
+
* Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([f0820ff](https://github.com/roomle-dev/roomle-ui/commit/f0820ff))
|
|
11
|
+
* Merge branch 'master' into feat/add-flag-for-mesh-raycasting ([18399be](https://github.com/roomle-dev/roomle-ui/commit/18399be))
|
|
12
|
+
* Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([194a955](https://github.com/roomle-dev/roomle-ui/commit/194a955))
|
|
13
|
+
* Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([678d0b4](https://github.com/roomle-dev/roomle-ui/commit/678d0b4))
|
|
14
|
+
* Merge branch 'master' into fix/2-level-catalog-with-custom-data-structure-RML-16263 ([cb1a6e5](https://github.com/roomle-dev/roomle-ui/commit/cb1a6e5))
|
|
15
|
+
* Merge branch 'master' into fix/close-icon-on-mobile-RML-16254 ([ca6c9a7](https://github.com/roomle-dev/roomle-ui/commit/ca6c9a7))
|
|
16
|
+
* Merge branch 'master' into fix/close-icon-on-mobile-RML-16254 ([5f6f231](https://github.com/roomle-dev/roomle-ui/commit/5f6f231))
|
|
17
|
+
* Merge branch 'master' into fix/decimal-range-parameter-RML-16233 ([0c2f781](https://github.com/roomle-dev/roomle-ui/commit/0c2f781))
|
|
18
|
+
* Merge branch 'master' into fix/decimal-range-parameter-RML-16233 ([66ef3cd](https://github.com/roomle-dev/roomle-ui/commit/66ef3cd))
|
|
19
|
+
* Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([39e60d1](https://github.com/roomle-dev/roomle-ui/commit/39e60d1))
|
|
20
|
+
* Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([de2a680](https://github.com/roomle-dev/roomle-ui/commit/de2a680))
|
|
21
|
+
* Merge branch 'master' into fix/move-wall-nodes-RML-16252 ([1dd07a3](https://github.com/roomle-dev/roomle-ui/commit/1dd07a3))
|
|
22
|
+
* Merge branch 'master' into fix/override-translations-RML-16228 ([5c313ee](https://github.com/roomle-dev/roomle-ui/commit/5c313ee))
|
|
23
|
+
* Merge branch 'master' into fix/override-translations-RML-16228 ([e16c840](https://github.com/roomle-dev/roomle-ui/commit/e16c840))
|
|
24
|
+
* Merge branch 'master' into fix/product-dimension-after-update ([7611522](https://github.com/roomle-dev/roomle-ui/commit/7611522))
|
|
25
|
+
* Merge branch 'master' into fix/product-dimension-after-update ([6d049b2](https://github.com/roomle-dev/roomle-ui/commit/6d049b2))
|
|
26
|
+
* Merge branch 'master' into fix/product-dimension-after-update ([ee8d143](https://github.com/roomle-dev/roomle-ui/commit/ee8d143))
|
|
27
|
+
* Merge branch 'master' into upgraded-by-ci/core-2.72.0-alpha.8 ([eb1c734](https://github.com/roomle-dev/roomle-ui/commit/eb1c734))
|
|
28
|
+
* Merge pull request #2383 from roomle-dev/copilot/fix-buttons-partlist-planner-issue ([de1229c](https://github.com/roomle-dev/roomle-ui/commit/de1229c)), closes [#2383](https://github.com/roomle-dev/roomle-ui/issues/2383)
|
|
29
|
+
* Merge pull request #2384 from roomle-dev/docs/pos-group ([f4c6a77](https://github.com/roomle-dev/roomle-ui/commit/f4c6a77)), closes [#2384](https://github.com/roomle-dev/roomle-ui/issues/2384)
|
|
30
|
+
* Merge pull request #2385 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.3 ([71b0d74](https://github.com/roomle-dev/roomle-ui/commit/71b0d74)), closes [#2385](https://github.com/roomle-dev/roomle-ui/issues/2385)
|
|
31
|
+
* Merge pull request #2386 from roomle-dev/fix/override-translations-RML-16228 ([f919a0f](https://github.com/roomle-dev/roomle-ui/commit/f919a0f)), closes [#2386](https://github.com/roomle-dev/roomle-ui/issues/2386)
|
|
32
|
+
* Merge pull request #2387 from roomle-dev/fix/decimal-range-parameter-RML-16233 ([0096766](https://github.com/roomle-dev/roomle-ui/commit/0096766)), closes [#2387](https://github.com/roomle-dev/roomle-ui/issues/2387)
|
|
33
|
+
* Merge pull request #2388 from roomle-dev/fix/move-wall-nodes-RML-16252 ([7a8b6fa](https://github.com/roomle-dev/roomle-ui/commit/7a8b6fa)), closes [#2388](https://github.com/roomle-dev/roomle-ui/issues/2388)
|
|
34
|
+
* Merge pull request #2389 from roomle-dev/fix/radio-toggle-icon-centering-RML-16207 ([6ad4b4a](https://github.com/roomle-dev/roomle-ui/commit/6ad4b4a)), closes [#2389](https://github.com/roomle-dev/roomle-ui/issues/2389)
|
|
35
|
+
* Merge pull request #2390 from roomle-dev/fix/missing-param-lbal ([7c9cc59](https://github.com/roomle-dev/roomle-ui/commit/7c9cc59)), closes [#2390](https://github.com/roomle-dev/roomle-ui/issues/2390)
|
|
36
|
+
* Merge pull request #2392 from roomle-dev/fix/product-dimension-after-update ([d76eaf2](https://github.com/roomle-dev/roomle-ui/commit/d76eaf2)), closes [#2392](https://github.com/roomle-dev/roomle-ui/issues/2392)
|
|
37
|
+
* Merge pull request #2393 from roomle-dev/ci/cancel-duplicate-ci-workflow-run ([bee772f](https://github.com/roomle-dev/roomle-ui/commit/bee772f)), closes [#2393](https://github.com/roomle-dev/roomle-ui/issues/2393)
|
|
38
|
+
* Merge pull request #2395 from roomle-dev/fix/close-icon-on-mobile-RML-16254 ([2430c73](https://github.com/roomle-dev/roomle-ui/commit/2430c73)), closes [#2395](https://github.com/roomle-dev/roomle-ui/issues/2395)
|
|
39
|
+
* Merge pull request #2396 from roomle-dev/feat/add-flag-for-mesh-raycasting ([0d803d0](https://github.com/roomle-dev/roomle-ui/commit/0d803d0)), closes [#2396](https://github.com/roomle-dev/roomle-ui/issues/2396)
|
|
40
|
+
* Merge pull request #2397 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.4 ([2ac6965](https://github.com/roomle-dev/roomle-ui/commit/2ac6965)), closes [#2397](https://github.com/roomle-dev/roomle-ui/issues/2397)
|
|
41
|
+
* Merge pull request #2398 from roomle-dev/fix/2-level-catalog-with-custom-data-structure-RML-16263 ([33ba6a7](https://github.com/roomle-dev/roomle-ui/commit/33ba6a7)), closes [#2398](https://github.com/roomle-dev/roomle-ui/issues/2398)
|
|
42
|
+
* Merge pull request #2401 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.5 ([e8e14bd](https://github.com/roomle-dev/roomle-ui/commit/e8e14bd)), closes [#2401](https://github.com/roomle-dev/roomle-ui/issues/2401)
|
|
43
|
+
* Merge pull request #2402 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.6 ([2aac90d](https://github.com/roomle-dev/roomle-ui/commit/2aac90d)), closes [#2402](https://github.com/roomle-dev/roomle-ui/issues/2402)
|
|
44
|
+
* Merge pull request #2403 from roomle-dev/chore/build-examples-alpha-stage ([e15ac89](https://github.com/roomle-dev/roomle-ui/commit/e15ac89)), closes [#2403](https://github.com/roomle-dev/roomle-ui/issues/2403)
|
|
45
|
+
* Merge pull request #2404 from roomle-dev/upgraded-by-ci/core-2.72.0-alpha.8 ([f334468](https://github.com/roomle-dev/roomle-ui/commit/f334468)), closes [#2404](https://github.com/roomle-dev/roomle-ui/issues/2404)
|
|
46
|
+
* feat(sdk): add a new flag to enable raycasting based on meshes ([834f18c](https://github.com/roomle-dev/roomle-ui/commit/834f18c))
|
|
47
|
+
* feat(core): upgrade to version 2.72.0-alpha.3 ([d6e47ab](https://github.com/roomle-dev/roomle-ui/commit/d6e47ab))
|
|
48
|
+
* feat(core): upgrade to version 2.72.0-alpha.4 ([70c7364](https://github.com/roomle-dev/roomle-ui/commit/70c7364))
|
|
49
|
+
* feat(core): upgrade to version 2.72.0-alpha.5 ([1b7e291](https://github.com/roomle-dev/roomle-ui/commit/1b7e291))
|
|
50
|
+
* feat(core): upgrade to version 2.72.0-alpha.6 ([0547814](https://github.com/roomle-dev/roomle-ui/commit/0547814))
|
|
51
|
+
* feat(core): upgrade to version 2.72.0-alpha.8 ([b6e2e73](https://github.com/roomle-dev/roomle-ui/commit/b6e2e73))
|
|
52
|
+
* fix: apply locale fallback to translation overrides for BCP-47 locales ([40c45df](https://github.com/roomle-dev/roomle-ui/commit/40c45df))
|
|
53
|
+
* fix: apply precisionInch to unit=inch (not only inchfeet) ([1f60382](https://github.com/roomle-dev/roomle-ui/commit/1f60382))
|
|
54
|
+
* fix(design-system): center icon in circle radio toggle by removing SVG descender gap ([f5914b8](https://github.com/roomle-dev/roomle-ui/commit/f5914b8))
|
|
55
|
+
* fix: check all items for pipe-delimited detection, not just the first ([28a3781](https://github.com/roomle-dev/roomle-ui/commit/28a3781))
|
|
56
|
+
* fix: hide close button in bottom bar when not inside embedding iframe ([8d06d0d](https://github.com/roomle-dev/roomle-ui/commit/8d06d0d))
|
|
57
|
+
* fix: hide product list drawer and fallback to room drawer when partlist_planner is false ([4197db3](https://github.com/roomle-dev/roomle-ui/commit/4197db3))
|
|
58
|
+
* fix: hide product-list-button when partlist_planner is false and fix prettier ([bf759f1](https://github.com/roomle-dev/roomle-ui/commit/bf759f1))
|
|
59
|
+
* fix: respect buttons.partlist_planner option in Room Designer ([a2e230a](https://github.com/roomle-dev/roomle-ui/commit/a2e230a))
|
|
60
|
+
* fix: upload all example HTML files with no-cache headers ([4f76de7](https://github.com/roomle-dev/roomle-ui/commit/4f76de7))
|
|
61
|
+
* fix: use moveElementToIn2d for wall nodes in 2D mode ([cfc80c1](https://github.com/roomle-dev/roomle-ui/commit/cfc80c1))
|
|
62
|
+
* chore: adapt test ([138e2dd](https://github.com/roomle-dev/roomle-ui/commit/138e2dd))
|
|
63
|
+
* chore: add any cast to test ([14589f3](https://github.com/roomle-dev/roomle-ui/commit/14589f3))
|
|
64
|
+
* chore: build embedding examples for alpha stage deployment ([5028db6](https://github.com/roomle-dev/roomle-ui/commit/5028db6))
|
|
65
|
+
* chore: set missing param label ([7a50f5e](https://github.com/roomle-dev/roomle-ui/commit/7a50f5e))
|
|
66
|
+
* chore: use default annotation for meshRaycasting ([0ebe749](https://github.com/roomle-dev/roomle-ui/commit/0ebe749))
|
|
67
|
+
* test: add missing usePurchasableCount mock to factory2 ([f68fead](https://github.com/roomle-dev/roomle-ui/commit/f68fead))
|
|
68
|
+
* test: adjust test to refactored scene event handler ([741af22](https://github.com/roomle-dev/roomle-ui/commit/741af22))
|
|
69
|
+
* test: check that product dimensions are updated after update event ([c478418](https://github.com/roomle-dev/roomle-ui/commit/c478418))
|
|
70
|
+
* test: verify that addComponentHandlers is called for meshes when meshRaycasting=true ([b36382d](https://github.com/roomle-dev/roomle-ui/commit/b36382d))
|
|
71
|
+
* refactor: check meshRaycasting flag directly in event handler ([b855952](https://github.com/roomle-dev/roomle-ui/commit/b855952))
|
|
72
|
+
* refactor: reduce duplicate code in test ([315731c](https://github.com/roomle-dev/roomle-ui/commit/315731c))
|
|
73
|
+
* refactor: use isInch() in init to avoid duplicated condition ([74831a6](https://github.com/roomle-dev/roomle-ui/commit/74831a6))
|
|
74
|
+
* ci: cancel in progress workflow runs if newer one gets triggered ([7860c41](https://github.com/roomle-dev/roomle-ui/commit/7860c41))
|
|
75
|
+
* wip: use core bound value for product dimensions ([7ff89ba](https://github.com/roomle-dev/roomle-ui/commit/7ff89ba))
|
|
76
|
+
* docs: PosGroup data structure ([71958b0](https://github.com/roomle-dev/roomle-ui/commit/71958b0))
|
package/hi.js
CHANGED
|
@@ -1,46 +1,50 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { g as
|
|
3
|
-
const
|
|
4
|
-
const t = n.serverOptions ?? {},
|
|
1
|
+
import { c as U } from "./utils-Dav4kGNW.mjs";
|
|
2
|
+
import { g as I } from "./browser-CUgD7zyH.mjs";
|
|
3
|
+
const f = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=", y = async (e, o, n, r = { property: "default" }) => {
|
|
4
|
+
const t = n.serverOptions ?? {}, s = {
|
|
5
5
|
headers: {
|
|
6
6
|
"Content-Type": o === "json" ? "application/json" : "text/plain",
|
|
7
7
|
"Access-Control-Allow-Origin": "*"
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
t.language && (
|
|
10
|
+
t.language && (s.headers["Accept-Language"] = t.language), t.authData && (s.headers.Authorization = t.authData);
|
|
11
11
|
try {
|
|
12
|
-
const a = performance.now(), { baseUrl:
|
|
13
|
-
(
|
|
14
|
-
|
|
15
|
-
),
|
|
16
|
-
if (!
|
|
17
|
-
throw console.warn(`Failed to fetch data from ${
|
|
18
|
-
`Failed to fetch data from ${e}: ${
|
|
12
|
+
const a = performance.now(), { baseUrl: p, subscriptionId: d, key: l, endpointUrl: u } = t, m = await fetch(
|
|
13
|
+
(p ?? f) + encodeURIComponent(e) + (d ? `&subscriptionId=${encodeURIComponent(d || "")}` : "") + (l ? `&apiKey=${encodeURIComponent(l)}` : "") + (u ? `&baseUrl=${encodeURIComponent(u)}` : ""),
|
|
14
|
+
s
|
|
15
|
+
), L = performance.now() - a;
|
|
16
|
+
if (!m.ok)
|
|
17
|
+
throw console.warn(`Failed to fetch data from ${r.property}`), new Error(
|
|
18
|
+
`Failed to fetch data from ${e}: ${m.statusText}`
|
|
19
19
|
);
|
|
20
|
-
return console.info(`Success to fetch data from ${
|
|
21
|
-
`The data for ${
|
|
22
|
-
),
|
|
20
|
+
return console.info(`Success to fetch data from ${r.property}`), console.info(
|
|
21
|
+
`The data for ${r.property} was fetched in ${L} milliseconds`
|
|
22
|
+
), m;
|
|
23
23
|
} catch (a) {
|
|
24
|
-
throw console.warn(`Failed to fetch data from ${
|
|
24
|
+
throw console.warn(`Failed to fetch data from ${r.property}`), console.error(a), a;
|
|
25
25
|
}
|
|
26
|
-
},
|
|
26
|
+
}, c = {
|
|
27
27
|
"e2fe8b3d-da31-4a20-92ab-ab6e3839300e": /* @__PURE__ */ new Set(["Furniture_Smith"])
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
}, j = (e, o) => {
|
|
29
|
+
c[e] || (c[e] = /* @__PURE__ */ new Set()), c[e].add(o);
|
|
30
|
+
}, R = (e, o) => {
|
|
31
|
+
c[e]?.delete(o), c[e]?.size === 0 && delete c[e];
|
|
32
|
+
}, g = (e, o) => {
|
|
33
|
+
const { libraryId: n, serverOptions: r } = e;
|
|
34
|
+
return r?.subscriptionId && c[r.subscriptionId]?.has(n) ? `api/pos/${o}?libraryId=${n}` : `api/pos/libraries/${n}/${o}`;
|
|
35
|
+
}, w = async (e) => await (await y(
|
|
36
|
+
g(e, "articles"),
|
|
33
37
|
"json",
|
|
34
38
|
e,
|
|
35
39
|
{ property: "articles" }
|
|
36
|
-
)).json(),
|
|
37
|
-
|
|
40
|
+
)).json(), h = async (e) => await (await y(
|
|
41
|
+
g(e, "masterData"),
|
|
38
42
|
"json",
|
|
39
43
|
e,
|
|
40
44
|
{ property: "masterData" }
|
|
41
45
|
)).json(), C = async (e) => {
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
const n = await (await y(
|
|
47
|
+
g(e, "calc.js"),
|
|
44
48
|
"text",
|
|
45
49
|
e,
|
|
46
50
|
{
|
|
@@ -50,27 +54,27 @@ const m = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
|
|
|
50
54
|
if (!n)
|
|
51
55
|
throw new Error("Script load error");
|
|
52
56
|
return n;
|
|
53
|
-
},
|
|
57
|
+
}, _ = (e) => ({
|
|
54
58
|
onLoadJavascript: (o) => C(e),
|
|
55
59
|
onLoadArticleCatalog: (o) => w(e),
|
|
56
|
-
onLoadMasterData: (o) =>
|
|
57
|
-
}), A = async (e, o, n,
|
|
58
|
-
const { baseUrl: t, om:
|
|
60
|
+
onLoadMasterData: (o) => h(e)
|
|
61
|
+
}), A = async (e, o, n, r = {}) => {
|
|
62
|
+
const { baseUrl: t, om: s } = e.serverOptions ?? {}, a = encodeURIComponent(s?.endpointUrl || ""), p = encodeURIComponent(s?.subscriptionId || ""), d = s?.key || "";
|
|
59
63
|
return await (await fetch(
|
|
60
|
-
(t ??
|
|
64
|
+
(t ?? f) + `${encodeURIComponent(n)}&subscriptionId=${p}&apiKey=${d}&baseUrl=${a}`,
|
|
61
65
|
{
|
|
62
66
|
method: "POST",
|
|
63
67
|
body: JSON.stringify(o),
|
|
64
68
|
headers: {
|
|
65
69
|
"Content-Type": "application/json",
|
|
66
|
-
...
|
|
70
|
+
...r
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
)).json();
|
|
70
74
|
}, E = async (e, o, n = {}) => {
|
|
71
|
-
const { baseUrl:
|
|
75
|
+
const { baseUrl: r, om: t } = e.serverOptions ?? {}, s = encodeURIComponent(t?.endpointUrl || ""), a = encodeURIComponent(t?.subscriptionId || ""), p = t?.key || "";
|
|
72
76
|
return await (await fetch(
|
|
73
|
-
(
|
|
77
|
+
(r ?? f) + `${encodeURIComponent(o)}&subscriptionId=${a}&apiKey=${p}&baseUrl=${s}`,
|
|
74
78
|
{
|
|
75
79
|
method: "GET",
|
|
76
80
|
headers: {
|
|
@@ -79,36 +83,38 @@ const m = "https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?u
|
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
)).json();
|
|
82
|
-
},
|
|
83
|
-
e.serverOptions || (e.serverOptions = {}), !e.serverOptions.language && o?.locale && (e.serverOptions.language = o.locale), e.serverOptions.language || (e.serverOptions.language =
|
|
86
|
+
}, b = (e, o) => {
|
|
87
|
+
e.serverOptions || (e.serverOptions = {}), !e.serverOptions.language && o?.locale && (e.serverOptions.language = o.locale), e.serverOptions.language || (e.serverOptions.language = I(null, !0));
|
|
84
88
|
};
|
|
85
89
|
let i = null;
|
|
86
|
-
const
|
|
90
|
+
const O = async (e, o = {}) => {
|
|
87
91
|
i && window.removeEventListener("message", i);
|
|
88
92
|
const n = typeof e == "string" ? { libraryId: e } : e;
|
|
89
|
-
o.onLoadJavascript === void 0 && (o.onLoadJavascript = (t) => C(n)), o.onLoadArticleCatalog === void 0 && (o.onLoadArticleCatalog = (t) => w(n)), o.onLoadMasterData === void 0 && (o.onLoadMasterData = (t) =>
|
|
90
|
-
const { expose:
|
|
93
|
+
o.onLoadJavascript === void 0 && (o.onLoadJavascript = (t) => C(n)), o.onLoadArticleCatalog === void 0 && (o.onLoadArticleCatalog = (t) => w(n)), o.onLoadMasterData === void 0 && (o.onLoadMasterData = (t) => h(n));
|
|
94
|
+
const { expose: r } = await import("./comlink-BAiXCcU9.mjs");
|
|
91
95
|
i = (t) => {
|
|
92
96
|
if (t.data.type === "connect_hi" && t.data.port) {
|
|
93
|
-
const
|
|
94
|
-
|
|
97
|
+
const s = t.data.port;
|
|
98
|
+
b(n, t.data.globalInitData || {}), s.start?.(), r(U(o), s);
|
|
95
99
|
}
|
|
96
100
|
}, window.addEventListener("message", i);
|
|
97
|
-
},
|
|
101
|
+
}, S = () => {
|
|
98
102
|
i && (window.removeEventListener("message", i), i = null);
|
|
99
|
-
},
|
|
103
|
+
}, H = {
|
|
100
104
|
HIDE: "hide",
|
|
101
105
|
SHOW_ATTRIBUTES: "attributes",
|
|
102
106
|
SHOW_ARTICLES: "articles"
|
|
103
107
|
};
|
|
104
108
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
H as HI_PANEL_ACTION,
|
|
110
|
+
S as cleanupHi,
|
|
111
|
+
_ as createHiLibraryCallbacks,
|
|
108
112
|
w as libLoadArticleCatalog,
|
|
109
113
|
C as libLoadCalcScript,
|
|
110
|
-
|
|
114
|
+
h as libLoadMasterData,
|
|
111
115
|
E as omGetRequest,
|
|
112
116
|
A as omPostRequest,
|
|
113
|
-
|
|
117
|
+
j as registerLegacyUrlFormat,
|
|
118
|
+
O as setupHi,
|
|
119
|
+
R as unregisterLegacyUrlFormat
|
|
114
120
|
};
|
package/hi.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./utils-BqTPLNLs.mjs";import{g as a}from"./browser-BhHw2H1M.mjs";const t="https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=",o=async(e,a,o,n={property:"default"})=>{const
|
|
1
|
+
import{c as e}from"./utils-BqTPLNLs.mjs";import{g as a}from"./browser-BhHw2H1M.mjs";const t="https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=",o=async(e,a,o,n={property:"default"})=>{const r=o.serverOptions??{},s={headers:{"Content-Type":"json"===a?"application/json":"text/plain","Access-Control-Allow-Origin":"*"}};r.language&&(s.headers["Accept-Language"]=r.language),r.authData&&(s.headers.Authorization=r.authData);try{performance.now();const{baseUrl:a,subscriptionId:o,key:n,endpointUrl:i}=r,c=await fetch((a??t)+encodeURIComponent(e)+(o?`&subscriptionId=${encodeURIComponent(o||"")}`:"")+(n?`&apiKey=${encodeURIComponent(n)}`:"")+(i?`&baseUrl=${encodeURIComponent(i)}`:""),s);if(performance.now(),!c.ok)throw new Error(`Failed to fetch data from ${e}: ${c.statusText}`);return c}catch(e){throw e}},n={"e2fe8b3d-da31-4a20-92ab-ab6e3839300e":new Set(["Furniture_Smith"])},r=(e,a)=>{n[e]||(n[e]=new Set),n[e].add(a)},s=(e,a)=>{n[e]?.delete(a),0===n[e]?.size&&delete n[e]},i=(e,a)=>{const{libraryId:t,serverOptions:o}=e;return o?.subscriptionId&&n[o.subscriptionId]?.has(t)?`api/pos/${a}?libraryId=${t}`:`api/pos/libraries/${t}/${a}`},c=async e=>await(await o(i(e,"articles"),"json",e,{property:"articles"})).json(),p=async e=>await(await o(i(e,"masterData"),"json",e,{property:"masterData"})).json(),l=async e=>{const a=await(await o(i(e,"calc.js"),"text",e,{property:"calc.js"})).text();if(!a)throw new Error("Script load error");return a},d=e=>({onLoadJavascript:a=>l(e),onLoadArticleCatalog:a=>c(e),onLoadMasterData:a=>p(e)}),u=async(e,a,o,n={})=>{const{baseUrl:r,om:s}=e.serverOptions??{},i=encodeURIComponent(s?.endpointUrl||""),c=encodeURIComponent(s?.subscriptionId||""),p=s?.key||"";return await(await fetch((r??t)+`${encodeURIComponent(o)}&subscriptionId=${c}&apiKey=${p}&baseUrl=${i}`,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json",...n}})).json()},m=async(e,a,o={})=>{const{baseUrl:n,om:r}=e.serverOptions??{},s=encodeURIComponent(r?.endpointUrl||""),i=encodeURIComponent(r?.subscriptionId||""),c=r?.key||"";return await(await fetch((n??t)+`${encodeURIComponent(a)}&subscriptionId=${i}&apiKey=${c}&baseUrl=${s}`,{method:"GET",headers:{"Content-Type":"application/json",...o}})).json()};let y=null;const w=async(t,o={})=>{y&&window.removeEventListener("message",y);const n="string"==typeof t?{libraryId:t}:t;void 0===o.onLoadJavascript&&(o.onLoadJavascript=e=>l(n)),void 0===o.onLoadArticleCatalog&&(o.onLoadArticleCatalog=e=>c(n)),void 0===o.onLoadMasterData&&(o.onLoadMasterData=e=>p(n));const{expose:r}=await import("./comlink-CmT64Qi3.mjs");y=t=>{if("connect_hi"===t.data.type&&t.data.port){const s=t.data.port;((e,t)=>{e.serverOptions||(e.serverOptions={}),!e.serverOptions.language&&t?.locale&&(e.serverOptions.language=t.locale),e.serverOptions.language||(e.serverOptions.language=a(null,!0))})(n,t.data.globalInitData||{}),s.start?.(),r(e(o),s)}},window.addEventListener("message",y)},b=()=>{y&&(window.removeEventListener("message",y),y=null)},g={HIDE:"hide",SHOW_ATTRIBUTES:"attributes",SHOW_ARTICLES:"articles"};export{g as HI_PANEL_ACTION,b as cleanupHi,d as createHiLibraryCallbacks,c as libLoadArticleCatalog,l as libLoadCalcScript,p as libLoadMasterData,m as omGetRequest,u as omPostRequest,r as registerLegacyUrlFormat,w as setupHi,s as unregisterLegacyUrlFormat};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.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",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
export { createHiLibraryCallbacks } from './homag-intelligence/hi-callbacks';
|
|
14
|
-
export { libLoadArticleCatalog, libLoadMasterData, libLoadCalcScript, } from './homag-intelligence/hi-requests';
|
|
14
|
+
export { libLoadArticleCatalog, libLoadMasterData, libLoadCalcScript, registerLegacyUrlFormat, unregisterLegacyUrlFormat, } 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 { type ExternalObjectSnapshotSaveResult, type HiContextAction, } from '../../web-sdk/packages';
|
|
17
18
|
export { HI_PANEL_ACTION, type HiPanelActionType, type HiOrderHeader, type HiOrder, type HiOrderData, type HiPriceData, type HiCallbacks, } from '../../common/src/hi/hi-types';
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
import { HomagIntelligenceInitData } from '../../../web-sdk/packages';
|
|
2
|
+
/**
|
|
3
|
+
* Register a subscription/library combination that requires the legacy
|
|
4
|
+
* TecConfig URL format.
|
|
5
|
+
*
|
|
6
|
+
* Call this **before** `setupHi` so that subsequent data fetches
|
|
7
|
+
* (`libLoadArticleCatalog`, `libLoadMasterData`, `libLoadCalcScript`)
|
|
8
|
+
* use the correct URL scheme.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { registerLegacyUrlFormat, setupHi } from '@roomle/embedding-lib/hi';
|
|
13
|
+
*
|
|
14
|
+
* registerLegacyUrlFormat('5bf5fac8-58af-4a95-a5e0-41a4dc52d5f5', 'Furniture_Smith');
|
|
15
|
+
* await setupHi(hiOptions, callbacks);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const registerLegacyUrlFormat: (subscriptionId: string, libraryId: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Unregister a subscription/library combination so it no longer uses the
|
|
21
|
+
* legacy TecConfig URL format.
|
|
22
|
+
*
|
|
23
|
+
* Useful when HOMAG migrates a subscription to the newer URL scheme.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { unregisterLegacyUrlFormat } from '@roomle/embedding-lib/hi';
|
|
28
|
+
*
|
|
29
|
+
* unregisterLegacyUrlFormat('e2fe8b3d-da31-4a20-92ab-ab6e3839300e', 'Furniture_Smith');
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const unregisterLegacyUrlFormat: (subscriptionId: string, libraryId: string) => void;
|
|
2
33
|
export declare const libLoadArticleCatalog: (hiInitData: HomagIntelligenceInitData) => Promise<any>;
|
|
3
34
|
export declare const libLoadMasterData: (hiInitData: HomagIntelligenceInitData) => Promise<any>;
|
|
4
35
|
export declare const libLoadCalcScript: (hiInitData: HomagIntelligenceInitData) => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DragInStrategy } from './types';
|
|
2
|
-
import {
|
|
2
|
+
import { ID_TYPE, RapiId } from '../../../../web-sdk/packages';
|
|
3
3
|
import { ExposedApi } from '../../../../../src/configurator/embedding/exposed-api';
|
|
4
4
|
import { DragInSettings } from '../types';
|
|
5
5
|
import { PossibleCustomViewsAndMain } from '../../../../../src/configurator/embedding/custom-views';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DragInStrategy } from './types';
|
|
2
|
-
import {
|
|
2
|
+
import { ID_TYPE, RapiId } from '../../../../web-sdk/packages';
|
|
3
3
|
import { ExposedApi } from '../../../../../src/configurator/embedding/exposed-api';
|
|
4
4
|
import { DragInOptions } from '../types';
|
|
5
5
|
import { OnBeforeUpdateDragGhost } from '../../embedding-plugins';
|