@roomle/embedding-lib 4.22.0-alpha.2 → 4.22.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/interfaces/types.uiinitdata.md +68 -57
- package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +8 -1
- package/package.json +1 -1
- package/roomle-configurator-api.cjs.js +1 -1
- package/roomle-configurator-api.cjs.min.js +1 -1
- package/roomle-configurator-api.es.js +1 -1
- package/roomle-configurator-api.es.min.js +1 -1
- package/roomle-configurator-api.js +1 -1
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
- [alwaysUseCache](types.uiinitdata.md#alwaysusecache)
|
|
22
22
|
- [api](types.uiinitdata.md#api)
|
|
23
23
|
- [applyCurrentGlobalParameters](types.uiinitdata.md#applycurrentglobalparameters)
|
|
24
|
-
- [autoQuality](types.uiinitdata.md#autoquality)
|
|
25
24
|
- [bananaForScale](types.uiinitdata.md#bananaforscale)
|
|
26
25
|
- [buttons](types.uiinitdata.md#buttons)
|
|
27
26
|
- [cameraRestriction](types.uiinitdata.md#camerarestriction)
|
|
@@ -34,6 +33,7 @@
|
|
|
34
33
|
- [dls](types.uiinitdata.md#dls)
|
|
35
34
|
- [edit](types.uiinitdata.md#edit)
|
|
36
35
|
- [emails](types.uiinitdata.md#emails)
|
|
36
|
+
- [enableHD](types.uiinitdata.md#enablehd)
|
|
37
37
|
- [featureFlags](types.uiinitdata.md#featureflags)
|
|
38
38
|
- [floorMaterialsTag](types.uiinitdata.md#floormaterialstag)
|
|
39
39
|
- [gaConsent](types.uiinitdata.md#gaconsent)
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
- [precisionInch](types.uiinitdata.md#precisioninch)
|
|
63
63
|
- [preloadHint](types.uiinitdata.md#preloadhint)
|
|
64
64
|
- [preloadId](types.uiinitdata.md#preloadid)
|
|
65
|
+
- [retina](types.uiinitdata.md#retina)
|
|
65
66
|
- [shareUrl](types.uiinitdata.md#shareurl)
|
|
66
67
|
- [showArButton](types.uiinitdata.md#showarbutton)
|
|
67
68
|
- [showInfos](types.uiinitdata.md#showinfos)
|
|
@@ -92,7 +93,7 @@ Enable service worker which tracks performance and request size (content, materi
|
|
|
92
93
|
|
|
93
94
|
Inherited from: InitDataDefinition.\_measureTraffic
|
|
94
95
|
|
|
95
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
96
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:167
|
|
96
97
|
|
|
97
98
|
___
|
|
98
99
|
|
|
@@ -106,7 +107,7 @@ This has to be scripted. For more information ask your Roomle contact.
|
|
|
106
107
|
|
|
107
108
|
Inherited from: InitDataDefinition.addOnSpots
|
|
108
109
|
|
|
109
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
110
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:191
|
|
110
111
|
|
|
111
112
|
___
|
|
112
113
|
|
|
@@ -149,22 +150,6 @@ Defined in: src/configurator/embedding/types.ts:128
|
|
|
149
150
|
|
|
150
151
|
___
|
|
151
152
|
|
|
152
|
-
### autoQuality
|
|
153
|
-
|
|
154
|
-
• `Optional` **autoQuality**: *boolean*
|
|
155
|
-
|
|
156
|
-
If set to true the configurator will make sure every device has great user experience with fluid frame rate.
|
|
157
|
-
If set to false the configurator will always show the highest quality possible.
|
|
158
|
-
That could lead to stutter and other problems on low-end devices. We advise you to only turn off "autoQuality" if you really know what you are doing.
|
|
159
|
-
default: true
|
|
160
|
-
usage: autoQuality=false
|
|
161
|
-
|
|
162
|
-
Inherited from: InitDataDefinition.autoQuality
|
|
163
|
-
|
|
164
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:66
|
|
165
|
-
|
|
166
|
-
___
|
|
167
|
-
|
|
168
153
|
### bananaForScale
|
|
169
154
|
|
|
170
155
|
• `Optional` **bananaForScale**: *boolean*
|
|
@@ -173,7 +158,7 @@ Easter Egg
|
|
|
173
158
|
|
|
174
159
|
Inherited from: InitDataDefinition.bananaForScale
|
|
175
160
|
|
|
176
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
161
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:250
|
|
177
162
|
|
|
178
163
|
___
|
|
179
164
|
|
|
@@ -213,7 +198,7 @@ usage: cameraRestriction=45
|
|
|
213
198
|
|
|
214
199
|
Inherited from: InitDataDefinition.cameraRestriction
|
|
215
200
|
|
|
216
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
201
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:224
|
|
217
202
|
|
|
218
203
|
___
|
|
219
204
|
|
|
@@ -227,7 +212,7 @@ usage: cameraSpacing=100
|
|
|
227
212
|
|
|
228
213
|
Inherited from: InitDataDefinition.cameraSpacing
|
|
229
214
|
|
|
230
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
215
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:276
|
|
231
216
|
|
|
232
217
|
___
|
|
233
218
|
|
|
@@ -248,7 +233,7 @@ Can be used to personalize colors used in the 3D scene
|
|
|
248
233
|
|
|
249
234
|
Inherited from: InitDataDefinition.colors
|
|
250
235
|
|
|
251
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
236
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:70
|
|
252
237
|
|
|
253
238
|
___
|
|
254
239
|
|
|
@@ -290,7 +275,7 @@ This flag enables:
|
|
|
290
275
|
|
|
291
276
|
Inherited from: InitDataDefinition.debug
|
|
292
277
|
|
|
293
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
278
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:173
|
|
294
279
|
|
|
295
280
|
___
|
|
296
281
|
|
|
@@ -318,7 +303,7 @@ Check lights in {@link SceneSettings} for an example.
|
|
|
318
303
|
|
|
319
304
|
Inherited from: InitDataDefinition.dls
|
|
320
305
|
|
|
321
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
306
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:207
|
|
322
307
|
|
|
323
308
|
___
|
|
324
309
|
|
|
@@ -331,7 +316,7 @@ If set to true the plan can be edited.
|
|
|
331
316
|
|
|
332
317
|
Inherited from: InitDataDefinition.edit
|
|
333
318
|
|
|
334
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
319
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:290
|
|
335
320
|
|
|
336
321
|
___
|
|
337
322
|
|
|
@@ -346,6 +331,19 @@ Defined in: src/configurator/embedding/types.ts:86
|
|
|
346
331
|
|
|
347
332
|
___
|
|
348
333
|
|
|
334
|
+
### enableHD
|
|
335
|
+
|
|
336
|
+
• `Optional` **enableHD**: *boolean*
|
|
337
|
+
|
|
338
|
+
**`deprecated`**
|
|
339
|
+
Enable high quality rendering
|
|
340
|
+
|
|
341
|
+
Inherited from: InitDataDefinition.enableHD
|
|
342
|
+
|
|
343
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:68
|
|
344
|
+
|
|
345
|
+
___
|
|
346
|
+
|
|
349
347
|
### featureFlags
|
|
350
348
|
|
|
351
349
|
• `Optional` **featureFlags**: FeatureFlags
|
|
@@ -366,7 +364,7 @@ ___
|
|
|
366
364
|
|
|
367
365
|
Inherited from: InitDataDefinition.floorMaterialsTag
|
|
368
366
|
|
|
369
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
367
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:212
|
|
370
368
|
|
|
371
369
|
___
|
|
372
370
|
|
|
@@ -401,7 +399,7 @@ Item id: usm:frame
|
|
|
401
399
|
|
|
402
400
|
Inherited from: InitDataDefinition.id
|
|
403
401
|
|
|
404
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
402
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:83
|
|
405
403
|
|
|
406
404
|
___
|
|
407
405
|
|
|
@@ -414,7 +412,7 @@ For different options see {@link EnvironmentSetting}
|
|
|
414
412
|
|
|
415
413
|
Inherited from: InitDataDefinition.initialFloorMaterial
|
|
416
414
|
|
|
417
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
415
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:201
|
|
418
416
|
|
|
419
417
|
___
|
|
420
418
|
|
|
@@ -428,7 +426,7 @@ In the new configurator UI this is determined automatically based on the id.
|
|
|
428
426
|
|
|
429
427
|
Inherited from: InitDataDefinition.isItem
|
|
430
428
|
|
|
431
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
429
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:76
|
|
432
430
|
|
|
433
431
|
___
|
|
434
432
|
|
|
@@ -450,7 +448,7 @@ ___
|
|
|
450
448
|
|
|
451
449
|
Inherited from: InitDataDefinition.ls
|
|
452
450
|
|
|
453
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
451
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:208
|
|
454
452
|
|
|
455
453
|
___
|
|
456
454
|
|
|
@@ -464,7 +462,7 @@ usage: maxHorizontalCameraAngle=45
|
|
|
464
462
|
|
|
465
463
|
Inherited from: InitDataDefinition.maxHorizontalCameraAngle
|
|
466
464
|
|
|
467
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
465
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:248
|
|
468
466
|
|
|
469
467
|
___
|
|
470
468
|
|
|
@@ -478,7 +476,7 @@ usage: maxVerticalCameraAngle=45
|
|
|
478
476
|
|
|
479
477
|
Inherited from: InitDataDefinition.maxVerticalCameraAngle
|
|
480
478
|
|
|
481
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
479
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:236
|
|
482
480
|
|
|
483
481
|
___
|
|
484
482
|
|
|
@@ -491,7 +489,7 @@ ___
|
|
|
491
489
|
|
|
492
490
|
Inherited from: InitDataDefinition.meshSelection
|
|
493
491
|
|
|
494
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
492
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:160
|
|
495
493
|
|
|
496
494
|
___
|
|
497
495
|
|
|
@@ -505,7 +503,7 @@ usage: minHorizontalCameraAngle=45
|
|
|
505
503
|
|
|
506
504
|
Inherited from: InitDataDefinition.minHorizontalCameraAngle
|
|
507
505
|
|
|
508
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
506
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:242
|
|
509
507
|
|
|
510
508
|
___
|
|
511
509
|
|
|
@@ -519,7 +517,7 @@ usage: minVerticalCameraAngle=45
|
|
|
519
517
|
|
|
520
518
|
Inherited from: InitDataDefinition.minVerticalCameraAngle
|
|
521
519
|
|
|
522
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
520
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:230
|
|
523
521
|
|
|
524
522
|
___
|
|
525
523
|
|
|
@@ -547,7 +545,7 @@ This means:
|
|
|
547
545
|
|
|
548
546
|
Inherited from: InitDataDefinition.moc
|
|
549
547
|
|
|
550
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
548
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:298
|
|
551
549
|
|
|
552
550
|
___
|
|
553
551
|
|
|
@@ -562,7 +560,7 @@ options: 2D, 3D, FP
|
|
|
562
560
|
|
|
563
561
|
Inherited from: InitDataDefinition.mode
|
|
564
562
|
|
|
565
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
563
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:285
|
|
566
564
|
|
|
567
565
|
___
|
|
568
566
|
|
|
@@ -575,7 +573,7 @@ Download all necessary files to run the configurator in offline mode
|
|
|
575
573
|
|
|
576
574
|
Inherited from: InitDataDefinition.offlineSync
|
|
577
575
|
|
|
578
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
576
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:185
|
|
579
577
|
|
|
580
578
|
___
|
|
581
579
|
|
|
@@ -590,7 +588,7 @@ This value is overridden in the new configurator UI.
|
|
|
590
588
|
|
|
591
589
|
Inherited from: InitDataDefinition.offset
|
|
592
590
|
|
|
593
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
591
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:150
|
|
594
592
|
|
|
595
593
|
___
|
|
596
594
|
|
|
@@ -655,7 +653,7 @@ If set to true we show a plus in the addon preview boxes.
|
|
|
655
653
|
|
|
656
654
|
Inherited from: InitDataDefinition.plusInPreview
|
|
657
655
|
|
|
658
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
656
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:196
|
|
659
657
|
|
|
660
658
|
___
|
|
661
659
|
|
|
@@ -671,7 +669,7 @@ For example:
|
|
|
671
669
|
|
|
672
670
|
Inherited from: InitDataDefinition.precisionCm
|
|
673
671
|
|
|
674
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
672
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:120
|
|
675
673
|
|
|
676
674
|
___
|
|
677
675
|
|
|
@@ -687,7 +685,7 @@ For example:
|
|
|
687
685
|
|
|
688
686
|
Inherited from: InitDataDefinition.precisionInch
|
|
689
687
|
|
|
690
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
688
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:112
|
|
691
689
|
|
|
692
690
|
___
|
|
693
691
|
|
|
@@ -704,7 +702,7 @@ Will no longer be used in the new configurator UI.
|
|
|
704
702
|
|
|
705
703
|
Inherited from: InitDataDefinition.preloadHint
|
|
706
704
|
|
|
707
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
705
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:143
|
|
708
706
|
|
|
709
707
|
___
|
|
710
708
|
|
|
@@ -721,7 +719,20 @@ Will no longer be used in the new configurator UI.
|
|
|
721
719
|
|
|
722
720
|
Inherited from: InitDataDefinition.preloadId
|
|
723
721
|
|
|
724
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
722
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:91
|
|
723
|
+
|
|
724
|
+
___
|
|
725
|
+
|
|
726
|
+
### retina
|
|
727
|
+
|
|
728
|
+
• `Optional` **retina**: *boolean*
|
|
729
|
+
|
|
730
|
+
**`deprecated`**
|
|
731
|
+
Always use max resolution (device pixel ratio) available
|
|
732
|
+
|
|
733
|
+
Inherited from: InitDataDefinition.retina
|
|
734
|
+
|
|
735
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:63
|
|
725
736
|
|
|
726
737
|
___
|
|
727
738
|
|
|
@@ -746,7 +757,7 @@ In the new configurator UI this is in the configurator settings object called bu
|
|
|
746
757
|
|
|
747
758
|
Inherited from: InitDataDefinition.showArButton
|
|
748
759
|
|
|
749
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
760
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:97
|
|
750
761
|
|
|
751
762
|
___
|
|
752
763
|
|
|
@@ -759,7 +770,7 @@ Shows partlist if there are no prices
|
|
|
759
770
|
|
|
760
771
|
Inherited from: InitDataDefinition.showInfos
|
|
761
772
|
|
|
762
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
773
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:261
|
|
763
774
|
|
|
764
775
|
___
|
|
765
776
|
|
|
@@ -772,7 +783,7 @@ Show price label using prices from configuration script
|
|
|
772
783
|
|
|
773
784
|
Inherited from: InitDataDefinition.showPrice
|
|
774
785
|
|
|
775
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
786
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:266
|
|
776
787
|
|
|
777
788
|
___
|
|
778
789
|
|
|
@@ -793,7 +804,7 @@ Add a tag id which is used to show different variations when opening the configu
|
|
|
793
804
|
|
|
794
805
|
Inherited from: InitDataDefinition.startTag
|
|
795
806
|
|
|
796
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
807
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:155
|
|
797
808
|
|
|
798
809
|
___
|
|
799
810
|
|
|
@@ -805,7 +816,7 @@ if set to true it shows a little overlay with performance stats
|
|
|
805
816
|
|
|
806
817
|
Inherited from: InitDataDefinition.stats
|
|
807
818
|
|
|
808
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
819
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:162
|
|
809
820
|
|
|
810
821
|
___
|
|
811
822
|
|
|
@@ -842,7 +853,7 @@ usage: transparentHighlighting=true
|
|
|
842
853
|
|
|
843
854
|
Inherited from: InitDataDefinition.transparentHighlighting
|
|
844
855
|
|
|
845
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
856
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:256
|
|
846
857
|
|
|
847
858
|
___
|
|
848
859
|
|
|
@@ -854,7 +865,7 @@ Add a tag id which is used to show different variations for the current item/con
|
|
|
854
865
|
|
|
855
866
|
Inherited from: InitDataDefinition.typeChangeTag
|
|
856
867
|
|
|
857
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
868
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:135
|
|
858
869
|
|
|
859
870
|
___
|
|
860
871
|
|
|
@@ -867,7 +878,7 @@ Options: 'cm', 'mm', 'inchfeet'
|
|
|
867
878
|
|
|
868
879
|
Inherited from: InitDataDefinition.unit
|
|
869
880
|
|
|
870
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
881
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:125
|
|
871
882
|
|
|
872
883
|
___
|
|
873
884
|
|
|
@@ -883,7 +894,7 @@ Options:
|
|
|
883
894
|
|
|
884
895
|
Inherited from: InitDataDefinition.unitStringType
|
|
885
896
|
|
|
886
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
897
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:133
|
|
887
898
|
|
|
888
899
|
___
|
|
889
900
|
|
|
@@ -904,7 +915,7 @@ For more information ask your Roomle contact.
|
|
|
904
915
|
|
|
905
916
|
Inherited from: InitDataDefinition.usePriceService
|
|
906
917
|
|
|
907
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
918
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:178
|
|
908
919
|
|
|
909
920
|
___
|
|
910
921
|
|
|
@@ -920,7 +931,7 @@ Only used for trade show demos.
|
|
|
920
931
|
|
|
921
932
|
Inherited from: InitDataDefinition.useRoomlePrice
|
|
922
933
|
|
|
923
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
934
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:104
|
|
924
935
|
|
|
925
936
|
___
|
|
926
937
|
|
|
@@ -954,4 +965,4 @@ usage: zoomDistance=3
|
|
|
954
965
|
|
|
955
966
|
Inherited from: InitDataDefinition.zoomDistance
|
|
956
967
|
|
|
957
|
-
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:
|
|
968
|
+
Defined in: node_modules/@roomle/web-sdk/lib/definitions/common-core/src/utils/shims.d.ts:218
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
## [4.22.0
|
|
1
|
+
## [4.22.0](https://gitlab.com/roomle/web/roomle-ui/compare/embedding-v4.21.0...embedding-v4.22.0) (2021-10-12)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
+
* upgrade SDK to version 2.18.0-alpha.1 ([b2a47cd](https://gitlab.com/roomle/web/roomle-ui/commit/b2a47cd12dea5f46ccc8fae658ee2e3cefad8578))
|
|
7
|
+
* upgrade SDK to version 2.18.0-alpha.2 ([d1d1b13](https://gitlab.com/roomle/web/roomle-ui/commit/d1d1b1364b6e4710f8591be55f9261d55d1dfd49))
|
|
6
8
|
* **SDK:** upgrade to version 2.18.0 ([7100c2a](https://gitlab.com/roomle/web/roomle-ui/commit/7100c2a480d2ab707a74bf24673fc687559f750c))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove unused drag end event for possible children ([7a9c9c6](https://gitlab.com/roomle/web/roomle-ui/commit/7a9c9c65779cfdec49d7547dfb3f79e9042ede2a))
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@roomle/embedding-lib","version":"4.22.0
|
|
1
|
+
{"name":"@roomle/embedding-lib","version":"4.22.0","main":"roomle-configurator-api.es.min.js","types":"types/index.d.ts","author":"Roomle Development","dependencies":{"@roomle/web-sdk":"2.18.0"},"devDependencies":{"@semantic-release/changelog":"^5.0.1","@semantic-release/exec":"^5.0.0","conventional-changelog-conventionalcommits":"^4.2.3","semantic-release":"^17.0.7"},"scripts":{"release":"semantic-release"},"description":"This is a small library which can be used to communicate with the Roomle Configurator","repository":{"type":"git","url":"git+https://github.com/roomle-build/npm-packages.git"},"publishConfig":{"access":"public"},"license":"MIT"}
|
|
@@ -307,7 +307,7 @@ const getFallbackInitData = () => {
|
|
|
307
307
|
if (hostname && isDemoHostname(hostname)) {
|
|
308
308
|
fallbackInitData.configuratorId = 'demoConfigurator';
|
|
309
309
|
}
|
|
310
|
-
fallbackInitData.customApiUrl = 'https://
|
|
310
|
+
fallbackInitData.customApiUrl = 'https://www.roomle.com/api/v2';
|
|
311
311
|
fallbackInitData.emails = false;
|
|
312
312
|
return fallbackInitData;
|
|
313
313
|
};
|
|
@@ -1 +1 @@
|
|
|
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=(t,r)=>{for(const s in r)try{r[s].constructor===Object?t[s]=e(t[s],r[s]):t[s]=r[s]}catch(e){t[s]=r[s]}return t},r=["127.0.0.1","localhost","0.0.0.0"],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)}})},
|
|
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=(t,r)=>{for(const s in r)try{r[s].constructor===Object?t[s]=e(t[s],r[s]):t[s]=r[s]}catch(e){t[s]=r[s]}return t},r=["127.0.0.1","localhost","0.0.0.0"],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._=this._.bind(this),this.J=new t("website",window,null,this.N),this.S=i,this.g.appendChild(n),this.P=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=e((()=>{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 e=(()=>{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 e&&(t=>!!r.includes(t)||!!t.endsWith("roomle.com")||!(!t.endsWith("gitlab.io")&&!t.endsWith("gitlab.com")))(e)&&(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,r)=>{r.configuratorId=t.id;const s=t.settings||{};return!r.overrideTenant&&t.tenant&&(r.overrideTenant=t.tenant),((t,r)=>{const s=JSON.parse(JSON.stringify(t));return e(s,r)})(s,r)})(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.P)}O(){this.P.classList.add("rml-pos"),document.documentElement.classList.add("rml-overflow-hidden"),window.document.body.classList.add("rml-overflow-hidden"),o()&&(a(this.P),this.P.classList.add("rml-android-height"))}_(){this.P.classList.remove("rml-pos"),this.P.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.P)||void 0===s?void 0:s.contentWindow))return;if("requestBoot"===t)return this.J.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.J.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._),this.S(this),setTimeout(()=>this.J.sendMessage("websiteReady"),0),Promise.resolve({result:null})}const i=t.split("."),o=i[0],l=i[1],a=3===i.length?i[2]:null;return a&&this[o][l][a]?(this[o][l][a](...e),Promise.resolve({result:null})):Promise.reject('Message "'+t+'" is unkown')}};
|
|
@@ -305,7 +305,7 @@ const getFallbackInitData = () => {
|
|
|
305
305
|
if (hostname && isDemoHostname(hostname)) {
|
|
306
306
|
fallbackInitData.configuratorId = 'demoConfigurator';
|
|
307
307
|
}
|
|
308
|
-
fallbackInitData.customApiUrl = 'https://
|
|
308
|
+
fallbackInitData.customApiUrl = 'https://www.roomle.com/api/v2';
|
|
309
309
|
fallbackInitData.emails = false;
|
|
310
310
|
return fallbackInitData;
|
|
311
311
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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=(t,r)=>{for(const s in r)try{r[s].constructor===Object?t[s]=e(t[s],r[s]):t[s]=r[s]}catch(e){t[s]=r[s]}return t},r=["127.0.0.1","localhost","0.0.0.0"],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)}})},a=()=>.01*window.innerHeight+"px",l=t=>{t&&setTimeout(()=>t.style.setProperty(h,a()),0)},h="--rml-full-height",c=new Map;export default 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=a();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._=this._.bind(this),this.J=new t("website",window,null,this.N),this.S=i,this.g.appendChild(n),this.P=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(a,l)=>{try{const l=e((()=>{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 e=(()=>{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 e&&(t=>!!r.includes(t)||!!t.endsWith("roomle.com")||!(!t.endsWith("gitlab.io")&&!t.endsWith("gitlab.com")))(e)&&(t.configuratorId="demoConfigurator"),t.customApiUrl="https://
|
|
1
|
+
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=(t,r)=>{for(const s in r)try{r[s].constructor===Object?t[s]=e(t[s],r[s]):t[s]=r[s]}catch(e){t[s]=r[s]}return t},r=["127.0.0.1","localhost","0.0.0.0"],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)}})},a=()=>.01*window.innerHeight+"px",l=t=>{t&&setTimeout(()=>t.style.setProperty(h,a()),0)},h="--rml-full-height",c=new Map;export default 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=a();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._=this._.bind(this),this.J=new t("website",window,null,this.N),this.S=i,this.g.appendChild(n),this.P=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(a,l)=>{try{const l=e((()=>{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 e=(()=>{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 e&&(t=>!!r.includes(t)||!!t.endsWith("roomle.com")||!(!t.endsWith("gitlab.io")&&!t.endsWith("gitlab.com")))(e)&&(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));l.featureFlags||(l.featureFlags={}),"boolean"!=typeof l.featureFlags.realPartList&&(l.featureFlags.realPartList=!0),"boolean"!=typeof l.featureFlags.globalCallbacks&&(l.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"}),a=await fetch(n),{configurator:l}=await a.json();return l})(t,l);return n=((t,r)=>{r.configuratorId=t.id;const s=t.settings||{};return!r.overrideTenant&&t.tenant&&(r.overrideTenant=t.tenant),((t,r)=>{const s=JSON.parse(JSON.stringify(t));return e(s,r)})(s,r)})(h,l),new this(h,o,n,a)}catch(t){return l(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(){l(this.P)}O(){this.P.classList.add("rml-pos"),document.documentElement.classList.add("rml-overflow-hidden"),window.document.body.classList.add("rml-overflow-hidden"),o()&&(l(this.P),this.P.classList.add("rml-android-height"))}_(){this.P.classList.remove("rml-pos"),this.P.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.P)||void 0===s?void 0:s.contentWindow))return;if("requestBoot"===t)return this.J.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.J.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._),this.S(this),setTimeout(()=>this.J.sendMessage("websiteReady"),0),Promise.resolve({result:null})}const i=t.split("."),o=i[0],a=i[1],l=3===i.length?i[2]:null;return l&&this[o][a][l]?(this[o][a][l](...e),Promise.resolve({result:null})):Promise.reject('Message "'+t+'" is unkown')}}
|
|
@@ -305,7 +305,7 @@ const getFallbackInitData = () => {
|
|
|
305
305
|
if (hostname && isDemoHostname(hostname)) {
|
|
306
306
|
fallbackInitData.configuratorId = 'demoConfigurator';
|
|
307
307
|
}
|
|
308
|
-
fallbackInitData.customApiUrl = 'https://
|
|
308
|
+
fallbackInitData.customApiUrl = 'https://www.roomle.com/api/v2';
|
|
309
309
|
fallbackInitData.emails = false;
|
|
310
310
|
return fallbackInitData;
|
|
311
311
|
};
|