@roomle/embedding-lib 4.43.0 → 5.0.1-debug.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/.releaserc.json +4 -7
- package/README.md +5 -6
- package/docs/md/web/embedding/CHANGELOG.md +8 -0
- package/{types/src/configurator/embedding/roomle-configurator-api.d.ts → index.d.ts} +26 -18
- package/package.json +27 -13
- package/roomle-embedding-lib.es.js +431 -0
- package/roomle-embedding-lib.es.min.js +8 -0
- package/roomle-embedding-lib.umd.js +8 -0
- package/roomle-embedding-lib.umd.min.js +8 -0
- package/docs/__sidebar__.json +0 -14
- package/docs/api/.nojekyll +0 -1
- package/docs/api/README.md +0 -9
- package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +0 -47
- package/docs/api/classes/exposed_api.ExposedApi.md +0 -255
- package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +0 -195
- package/docs/api/classes/roomle_configurator_api.default.md +0 -211
- package/docs/api/enums/types.UI_BUTTON.md +0 -263
- package/docs/api/interfaces/exposed_callbacks.Labels.md +0 -32
- package/docs/api/interfaces/exposed_callbacks.Price.md +0 -32
- package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +0 -58
- package/docs/api/interfaces/types.ConfiguratorSettings.md +0 -150
- package/docs/api/interfaces/types.EmbeddingSkin.md +0 -65
- package/docs/api/interfaces/types.UiInitData.md +0 -1199
- package/docs/api/interfaces/types.VariantsMap.md +0 -9
- package/docs/api/modules/exposed_analytics_callbacks.md +0 -9
- package/docs/api/modules/exposed_api.md +0 -9
- package/docs/api/modules/exposed_callbacks.md +0 -14
- package/docs/api/modules/roomle_configurator_api.md +0 -49
- package/docs/api/modules/types.md +0 -16
- package/docs/api/modules.md +0 -13
- package/docs/examples/00_init.html +0 -38
- package/docs/examples/01_small_screen.html +0 -37
- package/docs/examples/02_resize_callback.html +0 -46
- package/docs/examples/03_instant_start.html +0 -38
- package/docs/examples/04_price.html +0 -48
- package/docs/examples/05_analytics.html +0 -38
- package/docs/examples/06_skinning.html +0 -39
- package/docs/examples/07_request_product.html +0 -41
- package/docs/examples/08_variants.html +0 -36
- package/docs/examples/09_different_products.html +0 -63
- package/docs/examples/10_landing_page.html +0 -38
- package/docs/examples/11_light_settings.html +0 -126
- package/docs/examples/12_email.html +0 -36
- package/docs/examples/13_parameters.html +0 -67
- package/docs/examples/14_ga_consent.html +0 -39
- package/docs/examples/roomle-configurator-api.es.min.js +0 -586
- package/docs/hsp.md +0 -61
- package/docs/images/parts.png +0 -0
- package/docs/images/usm-frames.png +0 -0
- package/docs/integration.md +0 -1101
- package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +0 -63
- package/docs/migration-guides/v2-to-v3.md +0 -135
- package/docs/moc/index.md +0 -86
- package/docs/simple.md +0 -25
- package/roomle-configurator-api.cjs.js +0 -585
- package/roomle-configurator-api.cjs.min.js +0 -1
- package/roomle-configurator-api.es.js +0 -583
- package/roomle-configurator-api.es.min.js +0 -1
- package/roomle-configurator-api.js +0 -583
- package/types/index.d.ts +0 -1500
- package/types/src/common/business-logic/connector.d.ts +0 -8
- package/types/src/common/business-logic/event-bus.d.ts +0 -5
- package/types/src/common/components/collection-view/-utils/types.d.ts +0 -10
- package/types/src/common/plugins/analytics.d.ts +0 -11
- package/types/src/common/plugins/localize.d.ts +0 -8
- package/types/src/common/store/collection-view-state.d.ts +0 -40
- package/types/src/common/store/common-ui-state.d.ts +0 -16
- package/types/src/common/store/index.d.ts +0 -111
- package/types/src/common/translations/local-translation-source.d.ts +0 -8
- package/types/src/common/utils/access-restriction.d.ts +0 -7
- package/types/src/common/utils/ar-service.d.ts +0 -14
- package/types/src/common/utils/bezier.d.ts +0 -2
- package/types/src/common/utils/browser.d.ts +0 -3
- package/types/src/common/utils/color.d.ts +0 -2
- package/types/src/common/utils/compatibility.d.ts +0 -3
- package/types/src/common/utils/dom.d.ts +0 -15
- package/types/src/common/utils/font-size-detector.d.ts +0 -1
- package/types/src/common/utils/google-analytics.d.ts +0 -67
- package/types/src/common/utils/helper.d.ts +0 -43
- package/types/src/common/utils/iframe.d.ts +0 -3
- package/types/src/common/utils/init-data.d.ts +0 -34
- package/types/src/common/utils/merge.d.ts +0 -16
- package/types/src/common/utils/parameters.d.ts +0 -18
- package/types/src/common/utils/performance.d.ts +0 -2
- package/types/src/common/utils/plan.d.ts +0 -1
- package/types/src/common/utils/script-loader.d.ts +0 -5
- package/types/src/common/utils/share.d.ts +0 -1
- package/types/src/common/utils/touch-drag.d.ts +0 -24
- package/types/src/common/utils/types.d.ts +0 -19
- package/types/src/common/utils/user-agent.d.ts +0 -6
- package/types/src/common/utils/variants.d.ts +0 -3
- package/types/src/configurator/ar/main.d.ts +0 -1
- package/types/src/configurator/business-logic/roomle-sdk-wrapper.d.ts +0 -27
- package/types/src/configurator/business-logic/sdk-connector-configurator.d.ts +0 -29
- package/types/src/configurator/business-logic/sdk-connector.d.ts +0 -119
- package/types/src/configurator/business-logic/ui-callback.d.ts +0 -5
- package/types/src/configurator/components/-utils/overlays.d.ts +0 -43
- package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +0 -16
- package/types/src/configurator/components/utils/-utils/SceneOffsetResizer.d.ts +0 -23
- package/types/src/configurator/embedding/example/main.d.ts +0 -1
- package/types/src/configurator/embedding/exposed-analytics-callbacks.d.ts +0 -10
- package/types/src/configurator/embedding/exposed-api.d.ts +0 -90
- package/types/src/configurator/embedding/exposed-callbacks.d.ts +0 -46
- package/types/src/configurator/embedding/helper.d.ts +0 -8
- package/types/src/configurator/embedding/message-handler.d.ts +0 -31
- package/types/src/configurator/embedding/types.d.ts +0 -159
- package/types/src/configurator/embedding/utils.d.ts +0 -15
- package/types/src/configurator/plugins/embedding-callbacks-plugin.d.ts +0 -4
- package/types/src/configurator/plugins/libs-plugin.d.ts +0 -11
- package/types/src/configurator/plugins/sdk-connector-plugin.d.ts +0 -14
- package/types/src/configurator/store/core-data.d.ts +0 -34
- package/types/src/configurator/store/core-state.d.ts +0 -26
- package/types/src/configurator/store/ui-state.d.ts +0 -118
- package/types/src/main.d.ts +0 -14
- package/types/src/planner/business-logic/general-room-parameters.d.ts +0 -17
- package/types/src/planner/business-logic/pre-defined-rooms.d.ts +0 -2
- package/types/src/planner/business-logic/rooms.d.ts +0 -37
- package/types/src/planner/business-logic/sdk-connector-planner.d.ts +0 -28
- package/types/src/planner/store/planner-core-data.d.ts +0 -21
- package/types/src/planner/store/planner-ui-state.d.ts +0 -61
- package/types/src/planner/utils/interaction.d.ts +0 -3
- package/types/src/planner/utils/planner-sidebar.d.ts +0 -19
- package/types/src/viewer/business-logic/sdk-connector-viewer.d.ts +0 -18
- package/types/tests/helpers/data/base-64-images.d.ts +0 -1
- package/types/tests/helpers/data/configurator.d.ts +0 -7
- package/types/tests/helpers/data/items.d.ts +0 -208
- package/types/tests/helpers/data/materials.d.ts +0 -32
- package/types/tests/helpers/data/parameter-groups.d.ts +0 -242
- package/types/tests/helpers/data/parameters.d.ts +0 -399
- package/types/tests/helpers/data/part-list.d.ts +0 -126
- package/types/tests/helpers/data/plan.d.ts +0 -224
- package/types/tests/helpers/data/planObject.d.ts +0 -134
- package/types/tests/helpers/data/possible-children-tags.d.ts +0 -208
- package/types/tests/helpers/data/variants.d.ts +0 -60
- package/types/tests/helpers/dom.d.ts +0 -1
- package/types/tests/helpers/mocks/analytics.d.ts +0 -7
- package/types/tests/helpers/mocks/data/biohort-parameter.d.ts +0 -32
- package/types/tests/helpers/mocks/data/koinor-formia.d.ts +0 -289
- package/types/tests/helpers/mocks/embedding-callbacks.d.ts +0 -4
- package/types/tests/helpers/mocks/icon.d.ts +0 -3
- package/types/tests/helpers/mocks/localize.d.ts +0 -8
- package/types/tests/helpers/mocks/message.d.ts +0 -11
- package/types/tests/helpers/mocks/parameters.d.ts +0 -47
- package/types/tests/helpers/mocks/possible-children.d.ts +0 -596
- package/types/tests/helpers/mocks/roomle-sdk-wrapper.d.ts +0 -177
- package/types/tests/helpers/mocks/sdk-connector-configurator.d.ts +0 -13
- package/types/tests/helpers/mocks/sdk-connector-planner.d.ts +0 -13
- package/types/tests/helpers/mocks/sdk-connector.d.ts +0 -35
- package/types/tests/helpers/mocks/store.d.ts +0 -11
- package/types/tests/helpers/mocks/tag.d.ts +0 -148
- package/types/tests/helpers/utils.d.ts +0 -13
- package/types/tests/integration/common/components/ActionButtons.spec.d.ts +0 -1
- package/types/tests/integration/common/components/BottomBar.spec.d.ts +0 -1
- package/types/tests/integration/common/components/BottomButtons.spec.d.ts +0 -1
- package/types/tests/integration/common/components/IconButton.spec.d.ts +0 -1
- package/types/tests/integration/common/components/SelectionButtons.spec.d.ts +0 -1
- package/types/tests/integration/common/components/part-list/part-list/PartListPrint.spec.d.ts +0 -1
- package/types/tests/integration/common/components/part-list/part-list/PartListRow.spec.d.ts +0 -1
- package/types/tests/integration/configurator/App.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/ARButton.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/ConfiguratorMain.spec.d.ts +0 -9
- package/types/tests/integration/configurator/components/CookieBanner.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/Overlays.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/TopBar.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/ViewerMain.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/addons/AddonsTrigger.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/addons/PossibleChildren.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/collection-view/-utils/TabbedNav.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/collection-view/CollectionView.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/grid-view/-utils/CollapsedView.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/grid-view/-utils/ExpandedView.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/grid-view/-utils/GridViewElement.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/grid-view/-utils/GridViewHelper.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/grid-view/GridView.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/overlays/Export3D.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/overlays/NoDocking.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/overlays/PartList.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/overlays/SaveDraft.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/overlays/VariantWarning.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/overlays/ar/OpenARView.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/BackParameterGroupButton.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/NextParameterGroupButton.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/ParameterGroupButton.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/ParameterGroups.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/types/MaterialParameter.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/types/OptionsParameter.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/types/OptionsParameterValue.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/types/ProductVariant.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/types/RangeParameter.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/parameters/types/ThumbnailsParameter.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/BackToWebsite.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/CheckBox.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/FullscreenContainer.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/GdprEmailInput.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/HeightToggle.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/ImageWithFallback.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/InteractionContainer.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/PopUp.spec.d.ts +0 -1
- package/types/tests/integration/configurator/components/utils/ScrollHint.spec.d.ts +0 -1
- package/types/tests/integration/helper.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/CatalogTrigger.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/PlannerMain.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/PlannerSidebar.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/ProductListButton.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/SampleRooms.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/overlays/product-list/ProductListEntry.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/overlays/rooms/RoomGeneralSettings.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/overlays/rooms/RoomRangeParameter.spec.d.ts +0 -1
- package/types/tests/integration/planner/components/utils/sidebar-nav/SidebarNav.spec.d.ts +0 -1
- package/types/tests/unit/common/business-logic/event-bus.spec.d.ts +0 -1
- package/types/tests/unit/common/helper.spec.d.ts +0 -1
- package/types/tests/unit/common/translations/local-translation-source.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/ar-service.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/bezier.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/color.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/dom.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/helper.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/init-data.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/parameters.spec.d.ts +0 -1
- package/types/tests/unit/common/utils/touch-drag.spec.d.ts +0 -1
- package/types/tests/unit/configurator/business-logic/sdk-connector-configurator.spec.d.ts +0 -1
- package/types/tests/unit/configurator/business-logic/sdk-connector.spec.d.ts +0 -1
- package/types/tests/unit/configurator/components/utils/-utils/ConfiguratorResizer.spec.d.ts +0 -1
- package/types/tests/unit/configurator/components/utils/WordWrap.spec.d.ts +0 -1
- package/types/tests/unit/configurator/embedding/exposed-api.spec.d.ts +0 -1
- package/types/tests/unit/configurator/embedding/utils.spec.d.ts +0 -1
- package/types/tests/unit/configurator/store/index.spec.d.ts +0 -1
- package/types/tests/unit/planner/business-logic/sdk-connector-planner.spec.d.ts +0 -1
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<style>
|
|
4
|
-
body {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ls, .product {
|
|
11
|
-
width: 70px;
|
|
12
|
-
height: 70px;
|
|
13
|
-
margin: 10px;
|
|
14
|
-
background-color: azure;
|
|
15
|
-
border: 1px solid blue;
|
|
16
|
-
color: #090909;
|
|
17
|
-
text-align: center;
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.product {
|
|
24
|
-
width: 70px;
|
|
25
|
-
height: 70px;
|
|
26
|
-
margin: 10px;
|
|
27
|
-
background-color: rgb(232, 254, 232);
|
|
28
|
-
border: 1px solid green;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.ls div, .product div {
|
|
32
|
-
width: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.container {
|
|
36
|
-
display: flex;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#configurator-container {
|
|
40
|
-
width: 1024px;
|
|
41
|
-
height: 600px;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
44
|
-
</head>
|
|
45
|
-
|
|
46
|
-
<body>
|
|
47
|
-
<div class="container">
|
|
48
|
-
<div class="product"
|
|
49
|
-
data-roomle-id="usm:frame:1E13940F850F734EDF5ADF48191E9ACDAD93BEC0BE757F89E78807A5DA0FAD8C">
|
|
50
|
-
<div>Shelf</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="product"
|
|
53
|
-
data-roomle-id="musterring:Felicia_Sofa:7698BEE48226BBB1E0AF93F342018DC1FC269242F02D1F0C9367414A26CA3425">
|
|
54
|
-
<div>Sofa</div>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="product"
|
|
57
|
-
data-roomle-id="hussl:ST6N:C39C46D1AD6F8BC9E3F778A6F92CB017B785CE960D8D4C7146223348A9B70590">
|
|
58
|
-
<div>Chair</div>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="container">
|
|
62
|
-
<div class="ls" data-roomle-ls="sofa">
|
|
63
|
-
<div>Sofa<br>Light</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="ls" data-roomle-ls="shelf">
|
|
66
|
-
<div>Shelf<br>Light</div>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="ls" data-roomle-ls="shelf_front">
|
|
69
|
-
<div>Shelf Front<br>Light</div>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="ls" data-roomle-ls="equal">
|
|
72
|
-
<div>Equal<br>Light</div>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="ls" data-roomle-ls="camera">
|
|
75
|
-
<div>Camera<br>Light</div>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="ls" data-roomle-ls="baked">
|
|
78
|
-
<div>Baked<br>Light</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
<div id="configurator-container"></div>
|
|
82
|
-
<script src="./roomle-configurator-api.es.min.js" type="module"></script>
|
|
83
|
-
<script type="module">
|
|
84
|
-
import RoomleConfiguratorApi from './roomle-configurator-api.es.min.js';
|
|
85
|
-
|
|
86
|
-
(async () => {
|
|
87
|
-
const options = {
|
|
88
|
-
id: 'usm:frame:1E13940F850F734EDF5ADF48191E9ACDAD93BEC0BE757F89E78807A5DA0FAD8C',
|
|
89
|
-
};
|
|
90
|
-
const configurator = await RoomleConfiguratorApi.createConfigurator(
|
|
91
|
-
'demoConfigurator',
|
|
92
|
-
document.getElementById('configurator-container'),
|
|
93
|
-
options,
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
[...document.querySelectorAll('.ls')].forEach((button) => {
|
|
97
|
-
button.addEventListener('click', (productDomNode) => {
|
|
98
|
-
const target = productDomNode.target;
|
|
99
|
-
let roomleLs = target.getAttribute('data-roomle-ls') || target.parentElement.getAttribute('data-roomle-ls');
|
|
100
|
-
if (!roomleLs) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
// this is obfuscated on purpose because it uses internal API functions
|
|
104
|
-
// which are not meant to be used! This example should only demonstrate
|
|
105
|
-
// the different light settings. Sure it's easy to decode the string but
|
|
106
|
-
// please do not copy and paste the decoded code into your production app
|
|
107
|
-
// unless you know what you do :-)
|
|
108
|
-
eval(atob('Y29uZmlndXJhdG9yLmV4dGVuZGVkLmxvYWREeW5hbWljTGlnaHRTZXR0aW5nKHtsczogcm9vbWxlTHN9KQ=='));
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
[...document.querySelectorAll('.product')].forEach((button) => {
|
|
113
|
-
button.addEventListener('click', (productDomNode) => {
|
|
114
|
-
const target = productDomNode.target;
|
|
115
|
-
let roomleId = target.getAttribute('data-roomle-id') || target.parentElement.getAttribute('data-roomle-id');
|
|
116
|
-
if (!roomleId) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
configurator.ui.loadObject(roomleId);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
})();
|
|
123
|
-
let roomleId = target.getAttribute('data-roomle-id') || target.parentElement.getAttribute('data-roomle-id');
|
|
124
|
-
</script>
|
|
125
|
-
</body>
|
|
126
|
-
</html>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<style>
|
|
4
|
-
body {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
}
|
|
8
|
-
.configurator-container {
|
|
9
|
-
width: 800px;
|
|
10
|
-
height: 600px;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="configurator-container-1" class="configurator-container"></div>
|
|
17
|
-
<script src="./roomle-configurator-api.es.min.js" type="module"></script>
|
|
18
|
-
<script type="module">
|
|
19
|
-
import RoomleConfiguratorApi from './roomle-configurator-api.es.min.js';
|
|
20
|
-
(async ()=> {
|
|
21
|
-
const objectToLoadId = 'usm:frame:BB3BB3E7951BC15109B1FF86D78C95DE3FB46E9F78714C46FFA2DE91866A2C2B';
|
|
22
|
-
const configuratorId = 'demoConfigurator';
|
|
23
|
-
const domElement1 = document.getElementById('configurator-container-1');
|
|
24
|
-
const configurator1 = await RoomleConfiguratorApi.createConfigurator(
|
|
25
|
-
configuratorId,
|
|
26
|
-
domElement1,
|
|
27
|
-
{
|
|
28
|
-
id: objectToLoadId,
|
|
29
|
-
emails: true,
|
|
30
|
-
deeplink: 'https://www.roomle.com/t/cp/?id=#CONFIGURATIONID#&configuratorId=demoConfigurator'
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
})();
|
|
34
|
-
</script>
|
|
35
|
-
</body>
|
|
36
|
-
</html>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<style>
|
|
4
|
-
body {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
}
|
|
8
|
-
.configurator-container {
|
|
9
|
-
width: 800px;
|
|
10
|
-
height: 600px;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="configurator-container-1" class="configurator-container"></div>
|
|
17
|
-
<script src="./roomle-configurator-api.es.min.js" type="module"></script>
|
|
18
|
-
<script type="module">
|
|
19
|
-
import RoomleConfiguratorApi from './roomle-configurator-api.es.min.js';
|
|
20
|
-
(async ()=> {
|
|
21
|
-
const objectToLoadId = 'usm:frame:BB3BB3E7951BC15109B1FF86D78C95DE3FB46E9F78714C46FFA2DE91866A2C2B';
|
|
22
|
-
const configuratorId = 'demoConfigurator';
|
|
23
|
-
const domElement1 = document.getElementById('configurator-container-1');
|
|
24
|
-
const configurator1 = await RoomleConfiguratorApi.createConfigurator(
|
|
25
|
-
configuratorId,
|
|
26
|
-
domElement1,
|
|
27
|
-
{id: objectToLoadId}
|
|
28
|
-
);
|
|
29
|
-
const minWidth = '10rem';
|
|
30
|
-
// be aware that you use the "extended" object, this needs to be included in your licence
|
|
31
|
-
// if you are unsure please ask your Roomle Rubens Contact person
|
|
32
|
-
const params = await configurator1.extended.getParametersOfRootComponent();
|
|
33
|
-
const viewParam = params.find(({key}) => key === 'door');
|
|
34
|
-
if(!viewParam) {
|
|
35
|
-
console.warn('Configuration has no door param');
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const parent = document.querySelector('.configurator-container').parentNode;
|
|
39
|
-
if (!parent) {
|
|
40
|
-
console.warn('No Roomle Configurator found');
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const wrapper = document.createElement('div');
|
|
44
|
-
viewParam.validValues.forEach(({value,label}) => {
|
|
45
|
-
const button = document.createElement('div');
|
|
46
|
-
const span = document.createElement('span');
|
|
47
|
-
span.innerText = label;
|
|
48
|
-
|
|
49
|
-
span.classList.add('btn','btn-primary');
|
|
50
|
-
span.style.minWidth = minWidth;
|
|
51
|
-
span.style.marginBottom = '1rem';
|
|
52
|
-
button.appendChild(span);
|
|
53
|
-
// be aware that you use the "extended" object, this needs to be included in your licence
|
|
54
|
-
// if you are unsure please ask your Roomle Rubens Contact person
|
|
55
|
-
button.addEventListener('click', () => configurator1.extended.setParameterOfRootComponent(viewParam, value));
|
|
56
|
-
wrapper.appendChild(button);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
parent.style.display = 'grid';
|
|
60
|
-
parent.style.gridTemplateColumns = '1fr ' + minWidth;
|
|
61
|
-
parent.style.gridGap = '10px';
|
|
62
|
-
|
|
63
|
-
parent.appendChild(wrapper);
|
|
64
|
-
})();
|
|
65
|
-
</script>
|
|
66
|
-
</body>
|
|
67
|
-
</html>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<style>
|
|
4
|
-
body {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
}
|
|
8
|
-
.configurator-container {
|
|
9
|
-
width: 1024px;
|
|
10
|
-
height: 768px;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="configurator-container-1" class="configurator-container"></div>
|
|
17
|
-
<script src="./roomle-configurator-api.es.min.js" type="module"></script>
|
|
18
|
-
<script type="module">
|
|
19
|
-
import RoomleConfiguratorApi from './roomle-configurator-api.es.min.js';
|
|
20
|
-
(async ()=> {
|
|
21
|
-
const objectToLoadId = 'usm:frame:BB3BB3E7951BC15109B1FF86D78C95DE3FB46E9F78714C46FFA2DE91866A2C2B';
|
|
22
|
-
const configuratorId = 'demoConfigurator';
|
|
23
|
-
const domElement1 = document.getElementById('configurator-container-1');
|
|
24
|
-
const configurator1 = await RoomleConfiguratorApi.createConfigurator(
|
|
25
|
-
configuratorId,
|
|
26
|
-
domElement1,
|
|
27
|
-
{
|
|
28
|
-
id: objectToLoadId,
|
|
29
|
-
gaConsent: false
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
// simulate that the user gives consent later
|
|
33
|
-
setTimeout(()=>{
|
|
34
|
-
configurator1.ui.giveGaConsent();
|
|
35
|
-
}, 3000);
|
|
36
|
-
})();
|
|
37
|
-
</script>
|
|
38
|
-
</body>
|
|
39
|
-
</html>
|