@roomle/embedding-lib 4.33.0-alpha.3 → 4.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
- package/docs/api/classes/exposed_api.ExposedApi.md +11 -11
- package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +7 -7
- package/docs/api/classes/roomle_configurator_api.default.md +9 -9
- package/docs/api/enums/types.UI_BUTTON.md +62 -18
- package/docs/api/interfaces/exposed_callbacks.Labels.md +2 -2
- package/docs/api/interfaces/exposed_callbacks.Price.md +2 -2
- package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +4 -4
- package/docs/api/interfaces/types.ConfiguratorSettings.md +5 -5
- package/docs/api/interfaces/types.EmbeddingSkin.md +5 -5
- package/docs/api/interfaces/types.UiInitData.md +37 -71
- package/docs/api/modules/roomle_configurator_api.md +3 -3
- package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +32 -7
- package/package.json +2 -2
- package/roomle-configurator-api.cjs.js +33 -76
- package/roomle-configurator-api.cjs.min.js +1 -1
- package/roomle-configurator-api.es.js +33 -76
- package/roomle-configurator-api.es.min.js +1 -1
- package/roomle-configurator-api.js +33 -76
- package/types/index.d.ts +368 -280
- package/types/src/common/business-logic/event-bus.d.ts +5 -0
- package/types/src/{configurator → common}/components/collection-view/-utils/types.d.ts +3 -3
- package/types/src/common/store/collection-view-state.d.ts +3 -2
- package/types/src/common/store/index.d.ts +16 -5
- package/types/src/common/utils/helper.d.ts +0 -20
- package/types/src/common/utils/merge.d.ts +16 -0
- package/types/src/common/utils/parameters.d.ts +2 -2
- package/types/src/common/utils/share.d.ts +1 -0
- package/types/src/common/utils/types.d.ts +2 -0
- package/types/src/common/utils/variants.d.ts +3 -0
- package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +3 -3
- package/types/src/configurator/embedding/roomle-configurator-api.d.ts +6 -6
- package/types/src/configurator/embedding/types.d.ts +8 -1
- package/types/src/configurator/store/ui-state.d.ts +14 -6
- package/types/src/planner/business-logic/pre-defined-rooms.d.ts +2 -0
- package/types/src/planner/business-logic/rooms.d.ts +12 -0
- package/types/src/planner/store/planner-core-data.d.ts +21 -0
- package/types/src/planner/store/planner-ui-state.d.ts +22 -7
- package/types/src/planner/utils/planner-sidebar.d.ts +21 -0
- package/types/tests/helpers/data/items.d.ts +90 -0
- package/types/tests/helpers/data/plan.d.ts +224 -0
- package/types/tests/helpers/mocks/localize.d.ts +1 -1
- package/types/tests/helpers/mocks/store.d.ts +2 -1
- package/types/tests/integration/{configurator/components/overlays/part-list/PartListPrint.spec.d.ts → common/components/BottomButtons.spec.d.ts} +0 -0
- package/types/tests/integration/{configurator/components/overlays/part-list/PartListRow.spec.d.ts → common/components/IconButton.spec.d.ts} +0 -0
- package/types/tests/integration/common/components/part-list/part-list/PartListPrint.spec.d.ts +1 -0
- package/types/tests/integration/common/components/part-list/part-list/PartListRow.spec.d.ts +1 -0
- package/types/tests/integration/configurator/components/overlays/PartList.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/CatalogTrigger.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/ProductListButton.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/SampleRooms.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/overlays/product-list/ProductListEntry.spec.d.ts +1 -0
- package/types/tests/unit/common/business-logic/event-bus.spec.d.ts +1 -0
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
### Properties
|
|
18
18
|
|
|
19
19
|
- [\_measureTraffic](types.UiInitData.md#_measuretraffic)
|
|
20
|
-
- [addOnSpots](types.UiInitData.md#addonspots)
|
|
21
20
|
- [alwaysUseCache](types.UiInitData.md#alwaysusecache)
|
|
22
21
|
- [api](types.UiInitData.md#api)
|
|
23
22
|
- [applyCurrentGlobalParameters](types.UiInitData.md#applycurrentglobalparameters)
|
|
@@ -58,7 +57,6 @@
|
|
|
58
57
|
- [overrideRapi](types.UiInitData.md#overriderapi)
|
|
59
58
|
- [overrideServerUrl](types.UiInitData.md#overrideserverurl)
|
|
60
59
|
- [overrideTenant](types.UiInitData.md#overridetenant)
|
|
61
|
-
- [plusInPreview](types.UiInitData.md#plusinpreview)
|
|
62
60
|
- [precisionCm](types.UiInitData.md#precisioncm)
|
|
63
61
|
- [precisionInch](types.UiInitData.md#precisioninch)
|
|
64
62
|
- [preloadHint](types.UiInitData.md#preloadhint)
|
|
@@ -101,24 +99,6 @@ node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:16
|
|
|
101
99
|
|
|
102
100
|
___
|
|
103
101
|
|
|
104
|
-
### addOnSpots
|
|
105
|
-
|
|
106
|
-
• `Optional` **addOnSpots**: false \| true
|
|
107
|
-
|
|
108
|
-
**`deprecated`**
|
|
109
|
-
If set to true we are showing plus icon where addons can be added.
|
|
110
|
-
This has to be scripted. For more information ask your Roomle contact.
|
|
111
|
-
|
|
112
|
-
#### Inherited from
|
|
113
|
-
|
|
114
|
-
InitDataDefinition.addOnSpots
|
|
115
|
-
|
|
116
|
-
#### Defined in
|
|
117
|
-
|
|
118
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:194
|
|
119
|
-
|
|
120
|
-
___
|
|
121
|
-
|
|
122
102
|
### alwaysUseCache
|
|
123
103
|
|
|
124
104
|
• `Optional` **alwaysUseCache**: false \| true
|
|
@@ -147,7 +127,7 @@ to view 3d content. Imagine it then as a <img> tag for 3d content
|
|
|
147
127
|
|
|
148
128
|
#### Defined in
|
|
149
129
|
|
|
150
|
-
[src/configurator/embedding/types.ts:
|
|
130
|
+
[src/configurator/embedding/types.ts:90](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L90)
|
|
151
131
|
|
|
152
132
|
___
|
|
153
133
|
|
|
@@ -164,7 +144,7 @@ InitDataDefinition.applyCurrentGlobalParameters
|
|
|
164
144
|
|
|
165
145
|
#### Defined in
|
|
166
146
|
|
|
167
|
-
[src/configurator/embedding/types.ts:
|
|
147
|
+
[src/configurator/embedding/types.ts:137](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L137)
|
|
168
148
|
|
|
169
149
|
___
|
|
170
150
|
|
|
@@ -200,7 +180,7 @@ InitDataDefinition.bananaForScale
|
|
|
200
180
|
|
|
201
181
|
#### Defined in
|
|
202
182
|
|
|
203
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
183
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:242
|
|
204
184
|
|
|
205
185
|
___
|
|
206
186
|
|
|
@@ -212,6 +192,8 @@ ___
|
|
|
212
192
|
|
|
213
193
|
| Name | Type |
|
|
214
194
|
| :------ | :------ |
|
|
195
|
+
| `2dview?` | false \| true |
|
|
196
|
+
| `add_room?` | false \| true |
|
|
215
197
|
| `addons?` | false \| true |
|
|
216
198
|
| `ar?` | false \| true |
|
|
217
199
|
| `dimensions?` | false \| true |
|
|
@@ -219,6 +201,7 @@ ___
|
|
|
219
201
|
| `fullscreen?` | false \| true |
|
|
220
202
|
| `multiselect?` | false \| true |
|
|
221
203
|
| `partlist?` | false \| true |
|
|
204
|
+
| `partlist_planner?` | false \| true |
|
|
222
205
|
| `pauseconfigure?` | false \| true |
|
|
223
206
|
| `redo?` | false \| true |
|
|
224
207
|
| `renderimage?` | false \| true |
|
|
@@ -231,7 +214,7 @@ ___
|
|
|
231
214
|
|
|
232
215
|
#### Defined in
|
|
233
216
|
|
|
234
|
-
[src/configurator/embedding/types.ts:
|
|
217
|
+
[src/configurator/embedding/types.ts:39](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L39)
|
|
235
218
|
|
|
236
219
|
___
|
|
237
220
|
|
|
@@ -249,7 +232,7 @@ InitDataDefinition.cameraRestriction
|
|
|
249
232
|
|
|
250
233
|
#### Defined in
|
|
251
234
|
|
|
252
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
235
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:216
|
|
253
236
|
|
|
254
237
|
___
|
|
255
238
|
|
|
@@ -267,7 +250,7 @@ InitDataDefinition.cameraSpacing
|
|
|
267
250
|
|
|
268
251
|
#### Defined in
|
|
269
252
|
|
|
270
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
253
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:268
|
|
271
254
|
|
|
272
255
|
___
|
|
273
256
|
|
|
@@ -362,7 +345,7 @@ usage: http://www.example.com/configurator?id=#CONFIGURATIONID#
|
|
|
362
345
|
|
|
363
346
|
#### Defined in
|
|
364
347
|
|
|
365
|
-
[src/configurator/embedding/types.ts:
|
|
348
|
+
[src/configurator/embedding/types.ts:77](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L77)
|
|
366
349
|
|
|
367
350
|
___
|
|
368
351
|
|
|
@@ -397,7 +380,7 @@ InitDataDefinition.dls
|
|
|
397
380
|
|
|
398
381
|
#### Defined in
|
|
399
382
|
|
|
400
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
383
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:199
|
|
401
384
|
|
|
402
385
|
___
|
|
403
386
|
|
|
@@ -414,7 +397,7 @@ InitDataDefinition.edit
|
|
|
414
397
|
|
|
415
398
|
#### Defined in
|
|
416
399
|
|
|
417
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
400
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:287
|
|
418
401
|
|
|
419
402
|
___
|
|
420
403
|
|
|
@@ -427,7 +410,7 @@ an e-mail
|
|
|
427
410
|
|
|
428
411
|
#### Defined in
|
|
429
412
|
|
|
430
|
-
[src/configurator/embedding/types.ts:
|
|
413
|
+
[src/configurator/embedding/types.ts:95](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L95)
|
|
431
414
|
|
|
432
415
|
___
|
|
433
416
|
|
|
@@ -441,7 +424,7 @@ so that we can ensure a smooth transition between different versions of our conf
|
|
|
441
424
|
|
|
442
425
|
#### Defined in
|
|
443
426
|
|
|
444
|
-
[src/configurator/embedding/types.ts:
|
|
427
|
+
[src/configurator/embedding/types.ts:111](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L111)
|
|
445
428
|
|
|
446
429
|
___
|
|
447
430
|
|
|
@@ -457,7 +440,7 @@ InitDataDefinition.floorMaterialsTag
|
|
|
457
440
|
|
|
458
441
|
#### Defined in
|
|
459
442
|
|
|
460
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
443
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:204
|
|
461
444
|
|
|
462
445
|
___
|
|
463
446
|
|
|
@@ -469,7 +452,7 @@ set this flag to false if the user did not give the consent to Analytics
|
|
|
469
452
|
|
|
470
453
|
#### Defined in
|
|
471
454
|
|
|
472
|
-
[src/configurator/embedding/types.ts:
|
|
455
|
+
[src/configurator/embedding/types.ts:115](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L115)
|
|
473
456
|
|
|
474
457
|
___
|
|
475
458
|
|
|
@@ -481,7 +464,7 @@ set this flag to true if you want to group the part list by main components
|
|
|
481
464
|
|
|
482
465
|
#### Defined in
|
|
483
466
|
|
|
484
|
-
[src/configurator/embedding/types.ts:
|
|
467
|
+
[src/configurator/embedding/types.ts:105](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L105)
|
|
485
468
|
|
|
486
469
|
___
|
|
487
470
|
|
|
@@ -517,7 +500,7 @@ InitDataDefinition.initialFloorMaterial
|
|
|
517
500
|
|
|
518
501
|
#### Defined in
|
|
519
502
|
|
|
520
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
503
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:193
|
|
521
504
|
|
|
522
505
|
___
|
|
523
506
|
|
|
@@ -565,7 +548,7 @@ InitDataDefinition.ls
|
|
|
565
548
|
|
|
566
549
|
#### Defined in
|
|
567
550
|
|
|
568
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
551
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:200
|
|
569
552
|
|
|
570
553
|
___
|
|
571
554
|
|
|
@@ -583,7 +566,7 @@ InitDataDefinition.maxHorizontalCameraAngle
|
|
|
583
566
|
|
|
584
567
|
#### Defined in
|
|
585
568
|
|
|
586
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
569
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:240
|
|
587
570
|
|
|
588
571
|
___
|
|
589
572
|
|
|
@@ -601,7 +584,7 @@ InitDataDefinition.maxVerticalCameraAngle
|
|
|
601
584
|
|
|
602
585
|
#### Defined in
|
|
603
586
|
|
|
604
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
587
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:228
|
|
605
588
|
|
|
606
589
|
___
|
|
607
590
|
|
|
@@ -636,7 +619,7 @@ InitDataDefinition.minHorizontalCameraAngle
|
|
|
636
619
|
|
|
637
620
|
#### Defined in
|
|
638
621
|
|
|
639
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
622
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:234
|
|
640
623
|
|
|
641
624
|
___
|
|
642
625
|
|
|
@@ -654,7 +637,7 @@ InitDataDefinition.minVerticalCameraAngle
|
|
|
654
637
|
|
|
655
638
|
#### Defined in
|
|
656
639
|
|
|
657
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
640
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:222
|
|
658
641
|
|
|
659
642
|
___
|
|
660
643
|
|
|
@@ -668,7 +651,7 @@ small div
|
|
|
668
651
|
|
|
669
652
|
#### Defined in
|
|
670
653
|
|
|
671
|
-
[src/configurator/embedding/types.ts:
|
|
654
|
+
[src/configurator/embedding/types.ts:101](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L101)
|
|
672
655
|
|
|
673
656
|
___
|
|
674
657
|
|
|
@@ -688,7 +671,7 @@ InitDataDefinition.moc
|
|
|
688
671
|
|
|
689
672
|
#### Defined in
|
|
690
673
|
|
|
691
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
674
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:295
|
|
692
675
|
|
|
693
676
|
___
|
|
694
677
|
|
|
@@ -707,7 +690,7 @@ InitDataDefinition.mode
|
|
|
707
690
|
|
|
708
691
|
#### Defined in
|
|
709
692
|
|
|
710
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
693
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:282
|
|
711
694
|
|
|
712
695
|
___
|
|
713
696
|
|
|
@@ -789,7 +772,7 @@ ___
|
|
|
789
772
|
|
|
790
773
|
#### Defined in
|
|
791
774
|
|
|
792
|
-
[src/configurator/embedding/types.ts:
|
|
775
|
+
[src/configurator/embedding/types.ts:63](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L63)
|
|
793
776
|
|
|
794
777
|
___
|
|
795
778
|
|
|
@@ -813,23 +796,6 @@ node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:23
|
|
|
813
796
|
|
|
814
797
|
___
|
|
815
798
|
|
|
816
|
-
### plusInPreview
|
|
817
|
-
|
|
818
|
-
• `Optional` **plusInPreview**: false \| true
|
|
819
|
-
|
|
820
|
-
**`deprecated`**
|
|
821
|
-
If set to true we show a plus in the addon preview boxes.
|
|
822
|
-
|
|
823
|
-
#### Inherited from
|
|
824
|
-
|
|
825
|
-
InitDataDefinition.plusInPreview
|
|
826
|
-
|
|
827
|
-
#### Defined in
|
|
828
|
-
|
|
829
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:199
|
|
830
|
-
|
|
831
|
-
___
|
|
832
|
-
|
|
833
799
|
### precisionCm
|
|
834
800
|
|
|
835
801
|
• `Optional` **precisionCm**: `string`
|
|
@@ -921,7 +887,7 @@ for details see deeplink, the only change is that the placeholder is <CONF_ID> h
|
|
|
921
887
|
|
|
922
888
|
#### Defined in
|
|
923
889
|
|
|
924
|
-
[src/configurator/embedding/types.ts:
|
|
890
|
+
[src/configurator/embedding/types.ts:68](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L68)
|
|
925
891
|
|
|
926
892
|
___
|
|
927
893
|
|
|
@@ -956,7 +922,7 @@ InitDataDefinition.showInfos
|
|
|
956
922
|
|
|
957
923
|
#### Defined in
|
|
958
924
|
|
|
959
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
925
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:253
|
|
960
926
|
|
|
961
927
|
___
|
|
962
928
|
|
|
@@ -973,7 +939,7 @@ InitDataDefinition.showPrice
|
|
|
973
939
|
|
|
974
940
|
#### Defined in
|
|
975
941
|
|
|
976
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
942
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:258
|
|
977
943
|
|
|
978
944
|
___
|
|
979
945
|
|
|
@@ -983,7 +949,7 @@ ___
|
|
|
983
949
|
|
|
984
950
|
#### Defined in
|
|
985
951
|
|
|
986
|
-
[src/configurator/embedding/types.ts:
|
|
952
|
+
[src/configurator/embedding/types.ts:60](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L60)
|
|
987
953
|
|
|
988
954
|
___
|
|
989
955
|
|
|
@@ -1041,7 +1007,7 @@ You can find all labels here: [Base.json](../../../ui/base.json)
|
|
|
1041
1007
|
|
|
1042
1008
|
#### Defined in
|
|
1043
1009
|
|
|
1044
|
-
[src/configurator/embedding/types.ts:
|
|
1010
|
+
[src/configurator/embedding/types.ts:132](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L132)
|
|
1045
1011
|
|
|
1046
1012
|
___
|
|
1047
1013
|
|
|
@@ -1059,7 +1025,7 @@ InitDataDefinition.transparentHighlighting
|
|
|
1059
1025
|
|
|
1060
1026
|
#### Defined in
|
|
1061
1027
|
|
|
1062
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
1028
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:248
|
|
1063
1029
|
|
|
1064
1030
|
___
|
|
1065
1031
|
|
|
@@ -1122,7 +1088,7 @@ ___
|
|
|
1122
1088
|
|
|
1123
1089
|
#### Defined in
|
|
1124
1090
|
|
|
1125
|
-
[src/configurator/embedding/types.ts:
|
|
1091
|
+
[src/configurator/embedding/types.ts:62](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L62)
|
|
1126
1092
|
|
|
1127
1093
|
___
|
|
1128
1094
|
|
|
@@ -1173,7 +1139,7 @@ usm:frame is loaded all the items from the tag "DB_Start_ohne_Element" are now s
|
|
|
1173
1139
|
|
|
1174
1140
|
#### Defined in
|
|
1175
1141
|
|
|
1176
|
-
[src/configurator/embedding/types.ts:
|
|
1142
|
+
[src/configurator/embedding/types.ts:84](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L84)
|
|
1177
1143
|
|
|
1178
1144
|
___
|
|
1179
1145
|
|
|
@@ -1183,7 +1149,7 @@ ___
|
|
|
1183
1149
|
|
|
1184
1150
|
#### Defined in
|
|
1185
1151
|
|
|
1186
|
-
[src/configurator/embedding/types.ts:
|
|
1152
|
+
[src/configurator/embedding/types.ts:61](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/types.ts#L61)
|
|
1187
1153
|
|
|
1188
1154
|
___
|
|
1189
1155
|
|
|
@@ -1201,4 +1167,4 @@ InitDataDefinition.zoomDistance
|
|
|
1201
1167
|
|
|
1202
1168
|
#### Defined in
|
|
1203
1169
|
|
|
1204
|
-
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
1170
|
+
node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:210
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
#### Defined in
|
|
28
28
|
|
|
29
|
-
[src/configurator/embedding/roomle-configurator-api.ts:
|
|
29
|
+
[src/configurator/embedding/roomle-configurator-api.ts:70](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/roomle-configurator-api.ts#L70)
|
|
30
30
|
|
|
31
31
|
___
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ ___
|
|
|
36
36
|
|
|
37
37
|
#### Defined in
|
|
38
38
|
|
|
39
|
-
[src/configurator/embedding/roomle-configurator-api.ts:
|
|
39
|
+
[src/configurator/embedding/roomle-configurator-api.ts:72](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/roomle-configurator-api.ts#L72)
|
|
40
40
|
|
|
41
41
|
___
|
|
42
42
|
|
|
@@ -46,4 +46,4 @@ ___
|
|
|
46
46
|
|
|
47
47
|
#### Defined in
|
|
48
48
|
|
|
49
|
-
[src/configurator/embedding/roomle-configurator-api.ts:
|
|
49
|
+
[src/configurator/embedding/roomle-configurator-api.ts:71](https://gitlab.com/roomle/web/roomle-ui/-/blob/81cb0139/src/configurator/embedding/roomle-configurator-api.ts#L71)
|
|
@@ -1,15 +1,40 @@
|
|
|
1
|
-
## [4.
|
|
1
|
+
## [4.35.0](https://gitlab.com/roomle/web/roomle-ui/compare/embedding-v4.34.0...embedding-v4.35.0) (2022-05-24)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* add fullscreen modus on mobile planner too ([db76d7b](https://gitlab.com/roomle/web/roomle-ui/commit/db76d7b7539e268f1d81d3ec1f26556d04770e74))
|
|
7
|
+
* add right behaviour for fullscreen modus on mobile ([a8329bf](https://gitlab.com/roomle/web/roomle-ui/commit/a8329bf60bd9eb9f824fd18b4fd55232dc4f2ddf))
|
|
8
|
+
* adding fullscreen as default view on mobile ([93bb33e](https://gitlab.com/roomle/web/roomle-ui/commit/93bb33e86a8cc0b1a2065bf98ab359d4906827c0))
|
|
9
|
+
* implement event bus in planner product list and part list ([1385fca](https://gitlab.com/roomle/web/roomle-ui/commit/1385fca6fd2c93ae4cd4fe22114fa2c6f9205ef1))
|
|
10
|
+
* implement generic overlay for planner sidebar ([6ddadef](https://gitlab.com/roomle/web/roomle-ui/commit/6ddadefac7a07ea0cdb8b4ffa0fb0da1c999643c))
|
|
11
|
+
* remove automatically generated walls before adding new walls ([d3a1f6c](https://gitlab.com/roomle/web/roomle-ui/commit/d3a1f6c9d9cc87474fa85946467145a6d418d516))
|
|
12
|
+
* **SDK:** upgrade to version 2.32.0 ([6acb7d4](https://gitlab.com/roomle/web/roomle-ui/commit/6acb7d4b1277ecb381a42db7791c40b49021380f))
|
|
13
|
+
* **SDK:** upgrade to version 2.32.0-alpha.1 ([d0541af](https://gitlab.com/roomle/web/roomle-ui/commit/d0541afb0953d9069a7d3dfc2ad820e207757ad6))
|
|
14
|
+
* **SDK:** upgrade to version 2.32.0-alpha.2 ([7cd8cc7](https://gitlab.com/roomle/web/roomle-ui/commit/7cd8cc7424210cadc984beeb1acfaeacfe7061bf))
|
|
15
|
+
* **SDK:** upgrade to version 2.32.0-alpha.3 ([59618bc](https://gitlab.com/roomle/web/roomle-ui/commit/59618bc09047e0753da95534331214b85e5838c2))
|
|
7
16
|
|
|
8
17
|
|
|
9
18
|
### Bug Fixes
|
|
10
19
|
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
20
|
+
* add deselect button action on interaction container toggle ([d4648f9](https://gitlab.com/roomle/web/roomle-ui/commit/d4648f9b845d868d9ff154f6bf52ee830a814709))
|
|
21
|
+
* bug if expand catalog ([3f3d4f7](https://gitlab.com/roomle/web/roomle-ui/commit/3f3d4f794719bcca714a085880f79fe8b29f4972))
|
|
22
|
+
* deselect sidebar action buttons if toggle interaction menu ([bf5cc92](https://gitlab.com/roomle/web/roomle-ui/commit/bf5cc9207175739796c9cb802895796f5b62a1a6))
|
|
23
|
+
* display catalog trigger only when there is a catalog available ([ed073e3](https://gitlab.com/roomle/web/roomle-ui/commit/ed073e3b890ba6c1373e88e73d7e9c433eafb21c))
|
|
24
|
+
* eslint errors ([a0d4573](https://gitlab.com/roomle/web/roomle-ui/commit/a0d4573e8d93400f6375a3551b5fcfe5c7c60a6c))
|
|
25
|
+
* failing tests ([fd49e17](https://gitlab.com/roomle/web/roomle-ui/commit/fd49e17b92148cbae8a9d3a04f2d25450304e428))
|
|
26
|
+
* failing tests ([b445959](https://gitlab.com/roomle/web/roomle-ui/commit/b445959f477df554c0b9ce722bc1dbd7116d253c))
|
|
27
|
+
* if click catalog trigger, other buttons should not be active anymore ([a499cd2](https://gitlab.com/roomle/web/roomle-ui/commit/a499cd299429ffc204733619d629d7e7ee20b49b))
|
|
28
|
+
* if expand catalog, it should not clear add rooms ([21eb4b0](https://gitlab.com/roomle/web/roomle-ui/commit/21eb4b0cef76472d5fcac3873729340c2c5e8400))
|
|
29
|
+
* if trigger toggle product list and part list should be closed ([711e357](https://gitlab.com/roomle/web/roomle-ui/commit/711e357c2db2175b2dcccdb3c5053ff648dfcfc8))
|
|
30
|
+
* interaction container exposes eventBus ([d2e1a7b](https://gitlab.com/roomle/web/roomle-ui/commit/d2e1a7ba77074a63fe2a6e8238665d8cba08c57f))
|
|
31
|
+
* resolves RML-4018 ([1d3601d](https://gitlab.com/roomle/web/roomle-ui/commit/1d3601d4c94fdfd2bd1b401924541430f127ef97))
|
|
32
|
+
* save lastWalls in store so that they are not lost when the component is destroyed ([0229f4b](https://gitlab.com/roomle/web/roomle-ui/commit/0229f4befa82119c90bce7e50c4ee536d601dda5))
|
|
33
|
+
* should not expand interaction container on mobile when sample rooms is toggled ([9e3608b](https://gitlab.com/roomle/web/roomle-ui/commit/9e3608b0883edcb00e61d21eb046171c94ab821a))
|
|
34
|
+
* show close button of standalone views only on desktop ([34ba73f](https://gitlab.com/roomle/web/roomle-ui/commit/34ba73f728eb58ecab1022b755f3c1885485b913))
|
|
35
|
+
* show part list button properly in moc ([88084a4](https://gitlab.com/roomle/web/roomle-ui/commit/88084a49c58698a4894dbd58b0d946df7f723756))
|
|
36
|
+
* toggle work also on mobile ([dab5f1c](https://gitlab.com/roomle/web/roomle-ui/commit/dab5f1c5fc7e9a6a2ab7f87c9b6503489c7c1aa6))
|
|
37
|
+
* transform add product button to a a toggle button which does not hide ([d91295e](https://gitlab.com/roomle/web/roomle-ui/commit/d91295ee56aa26c2934d4c5ea861daeb98ae2fb8))
|
|
38
|
+
* ts-lint warnings ([b02659e](https://gitlab.com/roomle/web/roomle-ui/commit/b02659eeaf1b8db76f1f1654fce9c860f7a6f6c3))
|
|
39
|
+
* use plannerUiState instead of only state only ([52d6076](https://gitlab.com/roomle/web/roomle-ui/commit/52d6076b5f24679b7ed8f45dd32b2c95819a62c8))
|
|
40
|
+
* when toggle sidebar, catalog trigger should also be enabled again ([b98c712](https://gitlab.com/roomle/web/roomle-ui/commit/b98c712ee4407cda56942001e12acba4dedd569d))
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/embedding-lib",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.35.0",
|
|
4
4
|
"main": "roomle-configurator-api.es.min.js",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"author": "Roomle Development",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@roomle/web-sdk": "2.
|
|
8
|
+
"@roomle/web-sdk": "2.32.0"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@semantic-release/changelog": "^5.0.1",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('@/common/styles/Global.module.scss');
|
|
4
|
-
|
|
5
3
|
class MessageHandler {
|
|
6
4
|
constructor(side, incomingMessageBus, outgoingMessageBus, messageExecution) {
|
|
7
5
|
this._outgoingMessageBus = null;
|
|
@@ -164,50 +162,36 @@ const isInIframe = () => {
|
|
|
164
162
|
}
|
|
165
163
|
};
|
|
166
164
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
})(GA_ACTION_TYPE || (GA_ACTION_TYPE = {}));
|
|
198
|
-
var CUSTOM_ACTION_TYPE;
|
|
199
|
-
(function (CUSTOM_ACTION_TYPE) {
|
|
200
|
-
CUSTOM_ACTION_TYPE["TRACK_TIMING"] = "track_timing";
|
|
201
|
-
})(CUSTOM_ACTION_TYPE || (CUSTOM_ACTION_TYPE = {}));
|
|
202
|
-
var GA_CATEGORY;
|
|
203
|
-
(function (GA_CATEGORY) {
|
|
204
|
-
GA_CATEGORY["ERROR"] = "Error";
|
|
205
|
-
GA_CATEGORY["NAVIGATION_TIMING"] = "Navigation Timing";
|
|
206
|
-
GA_CATEGORY["TIMING"] = "Timing";
|
|
207
|
-
GA_CATEGORY["INTERACTION"] = "Interaction";
|
|
208
|
-
GA_CATEGORY["TRACKING"] = "Tracking";
|
|
209
|
-
GA_CATEGORY["DEPRECATION"] = "Deprecation";
|
|
210
|
-
})(GA_CATEGORY || (GA_CATEGORY = {}));
|
|
165
|
+
const NAMES_FOR_LOCALHOST = [
|
|
166
|
+
'127.0.0.1',
|
|
167
|
+
'localhost',
|
|
168
|
+
'0.0.0.0',
|
|
169
|
+
];
|
|
170
|
+
const getHostname = () => {
|
|
171
|
+
const isIframe = isInIframe();
|
|
172
|
+
let url = window.location.href;
|
|
173
|
+
if (isIframe) {
|
|
174
|
+
if (!document.referrer) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
url = document.referrer;
|
|
178
|
+
}
|
|
179
|
+
const { hostname } = new URL(url);
|
|
180
|
+
return hostname;
|
|
181
|
+
};
|
|
182
|
+
const isDemoHostname = (hostname) => {
|
|
183
|
+
if (NAMES_FOR_LOCALHOST.includes(hostname)) {
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
if (hostname.endsWith('roomle.com')) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
// exception for CI builds
|
|
190
|
+
if (hostname.endsWith('gitlab.io') || hostname.endsWith('gitlab.com')) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
return false;
|
|
194
|
+
};
|
|
211
195
|
|
|
212
196
|
/**
|
|
213
197
|
* Recursively merge properties of two objects.
|
|
@@ -245,36 +229,6 @@ const deepMerge = (obj1, obj2) => {
|
|
|
245
229
|
}
|
|
246
230
|
}
|
|
247
231
|
return obj1;
|
|
248
|
-
};
|
|
249
|
-
const NAMES_FOR_LOCALHOST = [
|
|
250
|
-
'127.0.0.1',
|
|
251
|
-
'localhost',
|
|
252
|
-
'0.0.0.0',
|
|
253
|
-
];
|
|
254
|
-
const getHostname = () => {
|
|
255
|
-
const isIframe = isInIframe();
|
|
256
|
-
let url = window.location.href;
|
|
257
|
-
if (isIframe) {
|
|
258
|
-
if (!document.referrer) {
|
|
259
|
-
return null;
|
|
260
|
-
}
|
|
261
|
-
url = document.referrer;
|
|
262
|
-
}
|
|
263
|
-
const { hostname } = new URL(url);
|
|
264
|
-
return hostname;
|
|
265
|
-
};
|
|
266
|
-
const isDemoHostname = (hostname) => {
|
|
267
|
-
if (NAMES_FOR_LOCALHOST.includes(hostname)) {
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
if (hostname.endsWith('roomle.com')) {
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
// exception for CI builds
|
|
274
|
-
if (hostname.endsWith('gitlab.io') || hostname.endsWith('gitlab.com')) {
|
|
275
|
-
return true;
|
|
276
|
-
}
|
|
277
|
-
return false;
|
|
278
232
|
};
|
|
279
233
|
|
|
280
234
|
const BROWSER_LANGUAGE_PROPERTY_KEYS_KNOWN = ['language', 'browserLanguage', 'userLanguage', 'systemLanguage'];
|
|
@@ -361,6 +315,9 @@ const getFallbackInitData = () => {
|
|
|
361
315
|
const LEGACY_SHARE_PLACEHOLDER = '<CONF_ID>';
|
|
362
316
|
const SHARE_PLACEHOLDER = '#CONFIGURATIONID#';
|
|
363
317
|
|
|
318
|
+
// see why: so#/58065241/10800831
|
|
319
|
+
const isAndroid = () => /(android)/i.test(navigator.userAgent);
|
|
320
|
+
|
|
364
321
|
const setDefaultBehaviour = (object, callbackName, defaultBehaviour) => {
|
|
365
322
|
let customBehaviour = null;
|
|
366
323
|
Object.defineProperty(object, callbackName, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";class t{constructor(t,e,r,s){this.t=null,this.s=null,this.i=t,this.o=e,this.t=r,this.s=s,this.o.addEventListener("message",this.l.bind(this))}setOutgoingMessageBus(t){this.t=t}setMessageExecution(t){this.s=t}sendMessage(t,e=[]){return new Promise((r,s)=>{const i=new MessageChannel;i.port1.onmessage=t=>{if(!t||!t.data)return i.port1.close(),i.port2.close(),s(new Error(this.i+" received message but response can not be interpreted"));let e;try{e=JSON.parse(t.data)}catch(t){return i.port1.close(),i.port2.close(),this.h(t),s(t)}e.error?s(e.error):void 0!==e.result?r(e.result):r(),i.port1.close(),i.port2.close()};let o="";try{o=JSON.stringify({message:t,args:e})}catch(t){return s(new Error(this.i+": can not create command because it is not JSON.stringify able"))}if(!this.t)return s(new Error(this.i+": outgoing bus not set yet"));this.t.postMessage(o,"*",[i.port2])})}l(t){const e=t.ports&&Array.isArray(t.ports)&&t.ports.length>0?t.ports[0]:null;if(t.data&&e)try{const r=JSON.parse(t.data);if(!this.s)return e.postMessage(JSON.stringify({error:this.i+" is not ready to handle messages"}));Array.isArray(r.args)||(r.args=[r.args]);const s=this.s(r,t);if(void 0===s)return;s.then((t={})=>{let r=void 0,s=void 0;"object"==typeof t&&null!==t&&(r=t.error,s=t.result),r?e.postMessage(JSON.stringify({error:r})):void 0!==s?e.postMessage(JSON.stringify({result:s})):e.postMessage(JSON.stringify({result:t}))},t=>{e.postMessage(JSON.stringify({error:this.h(t)}))})}catch(t){e.postMessage(JSON.stringify({error:this.h(t)}))}}h(t){if("string"==typeof t){const e=this.i+": "+t;return console.error(e),e}return t.message=this.i+": "+t.message,console.error(t),t.message}}const e=["127.0.0.1","localhost","0.0.0.0"],r=(t,e)=>{for(const s in e)try{e[s].constructor===Object?t[s]=r(t[s],e[s]):t[s]=e[s]}catch(r){t[s]=e[s]}return t},s=["language","browserLanguage","userLanguage","systemLanguage"],i=t=>{if(!t)return;const e=Object.keys(t);for(const r of e){const e=t[r];if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return i(e);if(Array.isArray(e)){for(const t of e)i(t);return}"true"!==e&&"false"!==e||(t[r]="true"===e)}},o=()=>/(android)/i.test(navigator.userAgent),n=(t,e,r)=>{let s=null;Object.defineProperty(t,e,{get:()=>s||r,set(t){(null==t?void 0:t.mute)?s=t.value:(console.warn("You override Roomle defined behaviour. To disalbe this warning pass in an object with the following properties"),console.warn("{ mute: true, value: () => void }"),s=t)}})},l=()=>.01*window.innerHeight+"px",a=t=>{t&&setTimeout(()=>t.style.setProperty(h,l()),0)},h="--rml-full-height",c=new Map;module.exports=class{constructor(e,r,s,i){if(this.ui={callbacks:null},this.extended={callbacks:null},this.analytics={callbacks:{}},this.global={callbacks:{}},this.u={},!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(r))throw new Error("There is already an instance on this DOM element");if(!document.getElementById("rml-styles")){const t=s.zIndex||9999999,e=document.createElement("style");e.type="text/css",e.id="rml-styles";const r="transition:all ease-in-out 450ms;",i=["-webkit-","-o-"].reduce((t,e)=>t+(e+r),"")+r,o=l();e.innerHTML=`\n .rml-container{${h}:${o};}\n .rml-pos{position:fixed;top:0;left:0;z-index:${t};opacity:0}\n .rml-transition{${i}}\n .rml-fill{width:100%;height:100%;opacity:1}\n .rml-android-height{height:calc(var(${h},1vh)*100)}\n .rml-overflow-hidden{overflow:hidden}\n `,document.head.appendChild(e)}this.m=this.m.bind(this),o()&&window.addEventListener("resize",this.m),this.g=r,this.u=s,this.p=e;const n=this.v();this.O=this.O.bind(this),this.N=this.N.bind(this),this.P=this.P.bind(this),this._=new t("website",window,null,this.N),this.J=i,this.g.appendChild(n),this.S=n,c.set(r,!0)}static createPlanner(t,e,r){return this.k(t,e,r)}static createConfigurator(t,e,r){return this.k(t,e,r)}static create(t,e,r){return this.k(t,e,r)}static createViewer(t,e,r){return this.k(t,e,r)}static k(t,o,n){return new Promise(async(l,a)=>{try{const a=r((()=>{const t={};t.locale||(t.locale=((t=null)=>{const e=window.navigator;if(t)return t.substr(0,2);if(Array.isArray(e.languages)&&e.languages.length>0)return e.languages[0].substr(0,2);for(let t=0,r=s.length;t<r;t++){const r=e[s[t]];if(r)return r.substr(0,2)}return"en"})()),"(idle)"===t.id&&delete t.id;const r=(()=>{const t=(()=>{try{return window.self!==window.top}catch(t){return!0}})();let e=window.location.href;if(t){if(!document.referrer)return null;e=document.referrer}const{hostname:r}=new URL(e);return r})();return r&&(t=>!!e.includes(t)||!!t.endsWith("roomle.com")||!(!t.endsWith("gitlab.io")&&!t.endsWith("gitlab.com")))(r)&&(t.configuratorId="demoConfigurator"),t.customApiUrl="https://www.roomle.com/api/v2",t.emails=!1,t})(),(t=>(i(t),(null==t?void 0:t.customApiUrl)&&(t.customApiUrl=decodeURIComponent(t.customApiUrl)),t.shareUrl&&(t.deeplink=t.shareUrl.replace("<CONF_ID>","#CONFIGURATIONID#")),t))(n));a.featureFlags||(a.featureFlags={}),"boolean"!=typeof a.featureFlags.realPartList&&(a.featureFlags.realPartList=!0),"boolean"!=typeof a.featureFlags.globalCallbacks&&(a.featureFlags.globalCallbacks=!0);const h=await(async(t,e)=>{if("string"!=typeof t)throw new Error('Configurator ID is not a string type: "'+typeof t+'"');const r=e.customApiUrl?e.customApiUrl:"https://api.roomle.com/v2",s=e.overrideTenant||9,i=r+"/configurators/"+t,o="03-"+window.btoa((new Date).toISOString()+";anonymous;roomle_portal_v2"),n=new Request(i,{method:"GET",headers:new Headers({apiKey:"roomle_portal_v2",currentTenant:s,locale:"en",language:"en",device:1,token:o,platform:"web"}),mode:"cors",cache:"default"}),l=await fetch(n),{configurator:a}=await l.json();return a})(t,a);return n=((t,e)=>{e.configuratorId=t.id;const s=t.settings||{};return!e.overrideTenant&&t.tenant&&(e.overrideTenant=t.tenant),((t,e)=>{const s=JSON.parse(JSON.stringify(t));return r(s,e)})(s,e)})(h,a),new this(h,o,n,l)}catch(t){return a(t)}})}teardown(){this.g&&c.delete(this.g);const t=this.g.querySelector("iframe");t&&this.g.removeChild(t),window.removeEventListener("resize",this.m)}v(){var t;const e=document.createElement("iframe");let r=(null===(t=this.p)||void 0===t?void 0:t.url)||"https://www.roomle.com/t/cp/";return this.u.useLocalRoomle&&(r=location.href.replace("embedding.html","")),location.href.includes("roomle.gitlab.io")&&(r=location.href.replace("embedding.html","index.html")),this.u.overrideServerUrl&&(r=this.u.overrideServerUrl),e.src=r,e.classList.add("rml-container"),e.classList.add("rml-fill"),e}m(){a(this.S)}O(){this.S.classList.add("rml-pos"),document.documentElement.classList.add("rml-overflow-hidden"),window.document.body.classList.add("rml-overflow-hidden"),o()&&(a(this.S),this.S.classList.add("rml-android-height"))}P(){this.S.classList.remove("rml-pos"),this.S.classList.remove("rml-android-height"),document.documentElement.classList.remove("rml-overflow-hidden"),window.document.body.classList.remove("rml-overflow-hidden")}N({message:t,args:e},r){var s;if(!r.source)return;if(r.source!==(null===(s=this.S)||void 0===s?void 0:s.contentWindow))return;if("requestBoot"===t)return this._.setOutgoingMessageBus(r.source),Promise.resolve({result:this.u});if("setup"===t){const{methods:t,callbacks:r}=e[0];return t.forEach(t=>{const e=t.split("."),r=e[0],s=e[1];this[r]||(this[r]={}),this[r][s]=function(){return this._.sendMessage(t,[...arguments])}.bind(this)}),r.forEach(t=>{const e=t.split("."),r=e[0],s=e[1],i=e[2];this[r]||(this[r]={}),this[r][s]||(this[r][s]={}),this[r][s][i]=()=>{}}),n(this.ui.callbacks,"onUseFullPage",this.O),n(this.ui.callbacks,"onBackToWebsite",this.P),this.J(this),setTimeout(()=>this._.sendMessage("websiteReady"),0),Promise.resolve({result:null})}const i=t.split("."),o=i[0],l=i[1],a=3===i.length?i[2]:null;if(a&&this[o][l][a]){const t=this[o][l][a](...e);return t instanceof Promise?t.then(t=>({result:t})):void 0!==t?Promise.resolve({result:t}):Promise.resolve({result:null})}return Promise.reject('Message "'+t+'" is unkown')}};
|