@colijnit/homedecorator 261.20.8 → 261.20.10

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.
@@ -44,6 +44,8 @@ canvas {
44
44
  }
45
45
 
46
46
  .hint {
47
+ pointer-events: all;
48
+ cursor: pointer;
47
49
  position: absolute;
48
50
  bottom: 20px;
49
51
  left: 50%;
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, Pipe, Component, Inject, Input, HostBinding, Optional, ViewChild, EventEmitter, ElementRef, Output, Directive, ChangeDetectionStrategy, ViewEncapsulation, HostListener, SkipSelf, Self, NgModule, NO_ERRORS_SCHEMA, forwardRef } from '@angular/core';
3
3
  import * as THREE from 'three';
4
4
  import { Vector2, Mesh, Object3D, PointLight, Matrix4, Box3, Vector3, Euler, BoxGeometry, MeshBasicMaterial, Scene, LinearSRGBColorSpace, SRGBColorSpace, AxesHelper, Group, BufferGeometry, Float32BufferAttribute, Line, LineBasicMaterial, CylinderGeometry, EquirectangularReflectionMapping, Material as Material$1, Texture as Texture$1, Source, EventDispatcher, Color, PerspectiveCamera, Quaternion, PlaneGeometry, DoubleSide, MeshStandardMaterial, RingGeometry, MathUtils, Raycaster, DataTexture, UnsignedByteType, LinearFilter, Shape, SphereGeometry, PCFSoftShadowMap, ShadowMaterial, LightProbe, DirectionalLight, MeshPhongMaterial, BackSide, FrontSide, NoToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, CustomToneMapping, NeutralToneMapping, BasicShadowMap, PCFShadowMap, VSMShadowMap, OrthographicCamera, WebGLRenderer, TextureLoader, EllipseCurve, ArcCurve, NearestFilter, MeshPhysicalMaterial, Path, ShapeGeometry, ConeGeometry, ObjectLoader, Light, Camera as Camera$1, RepeatWrapping, SpotLight, AmbientLight, HemisphereLight, AdditiveBlending, LineSegments, EdgesGeometry, CircleGeometry, ExtrudeGeometry, InstancedMesh, Clock, AnimationMixer, AnimationClip, BufferAttribute, NoColorSpace, ArrowHelper as ArrowHelper$1, UVMapping, CubeReflectionMapping, CubeRefractionMapping, EquirectangularRefractionMapping, CubeUVReflectionMapping, NearestMipmapNearestFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipMapLinearFilter, LinearMipmapNearestFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipMapLinearFilter, AlphaFormat, RGBAFormat, DepthFormat, DepthStencilFormat, RedFormat, RedIntegerFormat, RGFormat, RGIntegerFormat, RGBAIntegerFormat, ByteType, ShortType, UnsignedShortType, IntType, UnsignedIntType, FloatType, HalfFloatType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedInt248Type, ClampToEdgeWrapping, MirroredRepeatWrapping, ZeroFactor, OneFactor, SrcColorFactor, OneMinusSrcColorFactor, SrcAlphaFactor, OneMinusSrcAlphaFactor, DstAlphaFactor, OneMinusDstAlphaFactor, DstColorFactor, OneMinusDstColorFactor, AddEquation, SubtractEquation, ReverseSubtractEquation, MinEquation, MaxEquation, NoBlending, NormalBlending, SubtractiveBlending, MultiplyBlending, CustomBlending, TangentSpaceNormalMap, ObjectSpaceNormalMap, ZeroStencilOp, KeepStencilOp, ReplaceStencilOp, IncrementStencilOp, DecrementStencilOp, IncrementWrapStencilOp, DecrementWrapStencilOp, InvertStencilOp, NeverStencilFunc, LessStencilFunc, EqualStencilFunc, LessEqualStencilFunc, GreaterStencilFunc, NotEqualStencilFunc, GreaterEqualStencilFunc, AlwaysStencilFunc, SpotLightHelper, DirectionalLightHelper, HemisphereLightHelper, PointLightHelper, GridHelper, PMREMGenerator, BoxHelper } from 'three';
5
- import { BehaviorSubject, Subject, Observable, throwError, ReplaySubject, combineLatest, filter as filter$1, from } from 'rxjs';
5
+ import { BehaviorSubject, Subject, Observable, throwError, ReplaySubject, combineLatest, filter as filter$1, take as take$1, from } from 'rxjs';
6
6
  import * as TWEEN from '@tweenjs/tween.js';
7
7
  import { Selection } from '@colijnit/configuratorapi/build/model/selection';
8
8
  import { HdecoPositioning } from '@colijnit/configuratorapi/build/enum/hdeco-positioning.enum';
@@ -23421,7 +23421,7 @@ class SceneEventService {
23421
23421
  this._eventService = _eventService;
23422
23422
  this._wallService = _wallService;
23423
23423
  this._configurationService = _configurationService;
23424
- this.intersectOffsetForWalls = 20;
23424
+ this.intersectOffsetForWalls = 0.1;
23425
23425
  this.longTouchDuration = 600;
23426
23426
  this.rotateNoDrag = false;
23427
23427
  this._mousePosition = new Vector2();
@@ -23841,8 +23841,7 @@ class SceneEventService {
23841
23841
  const intersects = this._getIntersections(this._mousePosition, this._itemService.getObjectPlanes(), { onlyVisible: true, includeFloors: false });
23842
23842
  const wallIntersect = this._wallIntersection(this._mousePosition);
23843
23843
  // object intersection is prioritized
23844
- if (intersects.length > 0 &&
23845
- ((wallIntersect && wallIntersect.distance + this.intersectOffsetForWalls > intersects[0].distance) || !wallIntersect)) {
23844
+ if (intersects.length > 0 && !this._behindWall(intersects[0], wallIntersect)) {
23846
23845
  this._toggleRotationHudIntersection(false);
23847
23846
  this._setIntersectedObject(intersects[0].object);
23848
23847
  }
@@ -23852,7 +23851,7 @@ class SceneEventService {
23852
23851
  if (snapperArea === null) {
23853
23852
  // check if intersects with configurable floor
23854
23853
  const floorIntersects = this._getIntersections(this._mousePosition, this._itemService.getObjectPlanes(), { onlyVisible: true, includeFloor: true, onlyConfigurableFloors: true });
23855
- if (floorIntersects.length > 0) {
23854
+ if (floorIntersects.length > 0 && !this._behindWall(floorIntersects[0], wallIntersect)) {
23856
23855
  this._toggleRotationHudIntersection(false);
23857
23856
  this._setIntersectedObject(floorIntersects[0].object);
23858
23857
  }
@@ -23869,6 +23868,9 @@ class SceneEventService {
23869
23868
  }
23870
23869
  }
23871
23870
  }
23871
+ _behindWall(intersection, wallIntersection) {
23872
+ return wallIntersection && intersection && wallIntersection.distance + this.intersectOffsetForWalls < intersection.distance;
23873
+ }
23872
23874
  // returns the first intersection object
23873
23875
  _itemIntersection(vec2, item) {
23874
23876
  let intersections = null;
@@ -36502,7 +36504,7 @@ class FloorplannerComponent {
36502
36504
  this._resetDrawing();
36503
36505
  this._coordinatesService.resetViewScale();
36504
36506
  this.resizeView();
36505
- this._setDefaultMode();
36507
+ this.setDefaultMode();
36506
36508
  this._coordinatesService.resetOrigin();
36507
36509
  this._requestDraw();
36508
36510
  }
@@ -36540,7 +36542,7 @@ class FloorplannerComponent {
36540
36542
  this.selectedMode = mode;
36541
36543
  // this.setMode(mode);
36542
36544
  }
36543
- _setDefaultMode() {
36545
+ setDefaultMode() {
36544
36546
  this._resetDrawing();
36545
36547
  // this.setMode(this.selectedMode);
36546
36548
  this.modeService.resetToSelectedMode();
@@ -36563,6 +36565,7 @@ class FloorplannerComponent {
36563
36565
  this._mouseDownPosition.copy(RelativePositionUtils.GetClientMousePosition(event));
36564
36566
  const hasActive = this._activeWall || this._activeCorner || this._activeItem;
36565
36567
  if (event.button === 2) {
36568
+ this.setDefaultMode();
36566
36569
  this._modeBeforeRightMouseMove = this.mode;
36567
36570
  this.mode = FloorplannerMode.CameraMoving;
36568
36571
  return;
@@ -36619,7 +36622,7 @@ class FloorplannerComponent {
36619
36622
  // detect mouseClick
36620
36623
  if (!this._hasMouseMoved(event)) {
36621
36624
  if (this._mouseClickHandled(event)) {
36622
- this._setDefaultMode();
36625
+ this.setDefaultMode();
36623
36626
  }
36624
36627
  }
36625
36628
  // moving
@@ -36637,7 +36640,7 @@ class FloorplannerComponent {
36637
36640
  this.mode = this._modeBeforeRightMouseMove;
36638
36641
  }
36639
36642
  else {
36640
- this._setDefaultMode();
36643
+ this.setDefaultMode();
36641
36644
  }
36642
36645
  }
36643
36646
  this._requestDraw();
@@ -36664,7 +36667,7 @@ class FloorplannerComponent {
36664
36667
  this._handleDrawingMouseUp();
36665
36668
  }
36666
36669
  if (this.mode === FloorplannerMode.CameraMove || this.mode === FloorplannerMode.CameraMoving) {
36667
- this._setDefaultMode();
36670
+ this.setDefaultMode();
36668
36671
  }
36669
36672
  this._requestDraw();
36670
36673
  }
@@ -36802,7 +36805,7 @@ class FloorplannerComponent {
36802
36805
  // end panning
36803
36806
  if (this.mode === FloorplannerMode.CameraMove ||
36804
36807
  this.mode === FloorplannerMode.CameraMoving) {
36805
- this._setDefaultMode();
36808
+ this.setDefaultMode();
36806
36809
  }
36807
36810
  }
36808
36811
  handleTouchEnd(event) {
@@ -36813,7 +36816,7 @@ class FloorplannerComponent {
36813
36816
  // end panning
36814
36817
  if (this.mode === FloorplannerMode.CameraMove ||
36815
36818
  this.mode === FloorplannerMode.CameraMoving) {
36816
- this._setDefaultMode();
36819
+ this.setDefaultMode();
36817
36820
  }
36818
36821
  }
36819
36822
  }
@@ -36858,7 +36861,7 @@ class FloorplannerComponent {
36858
36861
  switch (event.keyCode) {
36859
36862
  case Key.Esc:
36860
36863
  case Key.Space:
36861
- this._setDefaultMode();
36864
+ this.setDefaultMode();
36862
36865
  break;
36863
36866
  case Key.Delete:
36864
36867
  this._removeWall();
@@ -37036,7 +37039,7 @@ class FloorplannerComponent {
37036
37039
  else {
37037
37040
  this._selectFloor(event, this._bluePrintService.overlappedFloor(this._mouseX, this._mouseY));
37038
37041
  }
37039
- this._setDefaultMode();
37042
+ this.setDefaultMode();
37040
37043
  return true;
37041
37044
  }
37042
37045
  this._unselect();
@@ -37058,7 +37061,7 @@ class FloorplannerComponent {
37058
37061
  }
37059
37062
  _selectWall(event, wall) {
37060
37063
  this._selectedWall = wall;
37061
- this.selectedWallChange.next({ event: event, wall: this._selectedWall });
37064
+ this.selectedWallChange.next({ event: event, wall: this._selectedWall, front: true });
37062
37065
  this._requestDraw();
37063
37066
  }
37064
37067
  _selectCorner(event, corner) {
@@ -37083,7 +37086,7 @@ class FloorplannerComponent {
37083
37086
  if (this._lastMouseUpTimestamp &&
37084
37087
  currentTimestamp < this._lastMouseUpTimestamp + doubleClickDurationMs) {
37085
37088
  this._lastMouseUpTimestamp = null;
37086
- this._setDefaultMode();
37089
+ this.setDefaultMode();
37087
37090
  }
37088
37091
  else {
37089
37092
  this._lastMouseUpTimestamp = currentTimestamp;
@@ -37136,7 +37139,7 @@ class FloorplannerComponent {
37136
37139
  }
37137
37140
  const newNumRooms = this._bluePrintService.getRooms() ? this._bluePrintService.getRooms().length : 0;
37138
37141
  if (newNumRooms > prevNumRooms) {
37139
- this._setDefaultMode();
37142
+ this.setDefaultMode();
37140
37143
  }
37141
37144
  else {
37142
37145
  this._lastNode = corner;
@@ -37298,7 +37301,7 @@ class FloorplannerComponent {
37298
37301
  </mat-button-toggle>
37299
37302
  </div>
37300
37303
  @if (mode === floorplannerMode.Drawing) {
37301
- <div class="hint" (click)="changeFloorplannerMode(floorplannerMode.Draw)">
37304
+ <div class="hint" (click)="setDefaultMode()">
37302
37305
  {{ 'CLICK_HERE_TO_EXIT_DRAWING_MODE_OR_PRESS_THE_ESC_KEY' | localize }}
37303
37306
  </div>
37304
37307
  }
@@ -37308,7 +37311,7 @@ class FloorplannerComponent {
37308
37311
  {{ 'TAB_ANYWHERE_TO_START' | localize }}
37309
37312
  </div>
37310
37313
  }
37311
- `, isInline: true, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"], dependencies: [{ kind: "directive", type: i10.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i10.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: WallLengthInputComponent, selector: "wall-length-input" }, { kind: "pipe", type: LocalizePipe, name: "localize" }] }); }
37314
+ `, isInline: true, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{pointer-events:all;cursor:pointer;position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"], dependencies: [{ kind: "directive", type: i10.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i10.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: WallLengthInputComponent, selector: "wall-length-input" }, { kind: "pipe", type: LocalizePipe, name: "localize" }] }); }
37312
37315
  }
37313
37316
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FloorplannerComponent, decorators: [{
37314
37317
  type: Component,
@@ -37371,7 +37374,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
37371
37374
  </mat-button-toggle>
37372
37375
  </div>
37373
37376
  @if (mode === floorplannerMode.Drawing) {
37374
- <div class="hint" (click)="changeFloorplannerMode(floorplannerMode.Draw)">
37377
+ <div class="hint" (click)="setDefaultMode()">
37375
37378
  {{ 'CLICK_HERE_TO_EXIT_DRAWING_MODE_OR_PRESS_THE_ESC_KEY' | localize }}
37376
37379
  </div>
37377
37380
  }
@@ -37381,7 +37384,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
37381
37384
  {{ 'TAB_ANYWHERE_TO_START' | localize }}
37382
37385
  </div>
37383
37386
  }
37384
- `, standalone: false, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"] }]
37387
+ `, standalone: false, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{pointer-events:all;cursor:pointer;position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"] }]
37385
37388
  }], ctorParameters: () => [{ type: HomedecoratorIconCacheService }, { type: FloorplanModeService }, { type: MessageBusService }, { type: ConfigurationService }, { type: ViewModeService }, { type: BluePrintService }, { type: HomedecoratorSettingsService }, { type: FloorplanCoordinatesService }, { type: FloorplanRenderService }], propDecorators: { canvasElement: [{
37386
37389
  type: ViewChild,
37387
37390
  args: ['floorplannerCanvas', { read: ElementRef, static: true }]
@@ -38478,12 +38481,7 @@ class TextureEditorComponent {
38478
38481
  }
38479
38482
  async initializeTexture() {
38480
38483
  let texture;
38481
- if (this.texturePlane && this.texturePlane.getTexture() !== undefined) {
38482
- texture = this.texturePlane.getTexture();
38483
- }
38484
- else {
38485
- texture = this.plainTexture;
38486
- }
38484
+ texture = this.texturePlane ? this.texturePlane : this.plainTexture;
38487
38485
  if (texture) {
38488
38486
  await this._loadTextureData(texture, false);
38489
38487
  }
@@ -39840,8 +39838,8 @@ class AppearanceSectionComponent {
39840
39838
  this.selectedTabIndex = index;
39841
39839
  }
39842
39840
  loadTexture() {
39843
- const texture = this.texturePlane ? this.texturePlane.getTexture() : this.plainTexture;
39844
- const color = this.texturePlane ? this.texturePlane.getColor() : this.color;
39841
+ const texture = this.texturePlane ? this.texturePlane : this.plainTexture;
39842
+ const color = this.texturePlane && this.texturePlane.color ? parseInt(this.texturePlane.color, 0) : this.color;
39845
39843
  this.updateColor(color, { update3d: false });
39846
39844
  this.updateTexture(texture, { update3d: false });
39847
39845
  }
@@ -39877,8 +39875,8 @@ class AppearanceSectionComponent {
39877
39875
  this.texture = texture;
39878
39876
  if (update3d) {
39879
39877
  this.setTexture.emit(this.texture);
39880
- if (this.texturePlane) {
39881
- this.color = this.texturePlane.getColor();
39878
+ if (this.texturePlane && this.texturePlane.color) {
39879
+ this.color = parseInt(this.texturePlane.color, 0);
39882
39880
  }
39883
39881
  }
39884
39882
  }
@@ -39889,8 +39887,8 @@ class AppearanceSectionComponent {
39889
39887
  this.texture = null;
39890
39888
  if (update3d) {
39891
39889
  this.setTexture.emit(this.texture);
39892
- if (this.texturePlane) {
39893
- this.color = this.texturePlane.getColor();
39890
+ if (this.texturePlane && this.texturePlane.color) {
39891
+ this.color = parseInt(this.texturePlane.color, 0);
39894
39892
  }
39895
39893
  }
39896
39894
  }
@@ -44391,10 +44389,15 @@ class ThreedselectorComponent {
44391
44389
  this._loadedFromPreset = false;
44392
44390
  this._loadedFromProject = false;
44393
44391
  this._loadedShouldCopyInstance = false;
44392
+ this._userActionNeeded = false;
44394
44393
  this._presetsService.register(this);
44395
44394
  }
44396
44395
  ngOnInit() {
44397
44396
  this._subs.push(this._appEventService.answerCountReceived.subscribe((answerCount) => this._handleAnswerCountReceived(answerCount)), this._messageBus.subscribe(MessageType.LoadIOneFurnitureIntoSceneBySKU, ({ sku, settings, position }) => this._handleLoadIOneFurnitureIntoSceneBySKU(sku, settings, position)), this._messageBus.subscribe(MessageType.CopyIOneFurnitureIntoSceneBySKU, (original) => this._handleCopyIOneFurnitureIntoSceneBySKU(original)), this._configuratorEventService.buildFinished.subscribe((result) => {
44397
+ if (this._userActionNeeded) {
44398
+ this._resetConfigurator(true);
44399
+ this._userActionNeeded = false;
44400
+ }
44398
44401
  this.handleBuildResult(result);
44399
44402
  }), this._buildFurnitureService.currentActiveService.configureModeChanged.subscribe(configuringModeChange => this._handleConfigureModeChange(configuringModeChange)), this._buildFurnitureService.currentActiveService.toggleSelectedElement.subscribe((element) => this._selectedElementToggle(element)), this._buildFurnitureService.currentActiveService.buildFinished.subscribe((result) => this._handleBuildFinished(result)), this._buildFurnitureService.currentActiveService.answerSelected.subscribe((result) => this._answerSelected(result)), this._sceneService.onAfterRender.subscribe(() => this._handleRender()),
44400
44403
  // this._appService.skuSet.subscribe(sku => this._handleSkuSet(sku)),
@@ -44596,7 +44599,7 @@ class ThreedselectorComponent {
44596
44599
  this._sceneService.needsRender = true;
44597
44600
  }
44598
44601
  else if (result.resultType === ResultType.NeedsUserInput) {
44599
- // this._configuringService.isConfiguring = true;
44602
+ return; // wait for configuration to finish
44600
44603
  }
44601
44604
  else if (result.resultType === ResultType.BuildFromScratch) {
44602
44605
  // if (this._loadedFromPreset) { // start configuring when loading is done
@@ -44744,6 +44747,48 @@ class ThreedselectorComponent {
44744
44747
  this.loadConfigurator = true;
44745
44748
  }
44746
44749
  }
44750
+ async handleLoadIOneFurnitureIntoSceneByPreset(sku, instanceId, settings) {
44751
+ const toast = new Toast();
44752
+ toast.message = 'MODEL_LOADING';
44753
+ this._toastService.showToast(toast);
44754
+ const article = await this._loadFurnitureService.currentActiveService.loadArticle(sku);
44755
+ let position = this._bluePrintService.getCenter();
44756
+ const draggedData = {
44757
+ name: sku,
44758
+ constructFn: async (pos) => this.configureFurnitureFromPreset(sku, instanceId, settings),
44759
+ type: itemTypeFromPlacement(article.placement),
44760
+ iOne: true
44761
+ };
44762
+ this._messageBus.emit(MessageType.SetDrag, draggedData);
44763
+ this._messageBus.emit(MessageType.StartDrag, position);
44764
+ }
44765
+ async configureFurnitureFromPreset(sku, instanceId, settings) {
44766
+ this._resetConfigurator();
44767
+ this.firstBuild = true;
44768
+ const configuratorSettings = this._settingsService.settings.projectSettings ?
44769
+ this._settingsService.settings.projectSettings : this._settingsService.settings;
44770
+ const configuratorSettingsClone = Object.assign({}, configuratorSettings);
44771
+ const configuratorExternalSourceId = settings && settings.externalSourceId ? settings.externalSourceId : undefined;
44772
+ if (configuratorExternalSourceId) {
44773
+ configuratorSettingsClone.externalSourceId = configuratorExternalSourceId;
44774
+ configuratorSettingsClone.username = settings.username;
44775
+ configuratorSettingsClone.password = settings.password;
44776
+ configuratorSettingsClone.url = settings.url;
44777
+ configuratorSettingsClone.version = settings.version;
44778
+ configuratorSettingsClone.schema = settings.schema;
44779
+ configuratorSettingsClone.mainUrl = settings.url;
44780
+ configuratorSettingsClone.mainSchema = settings.schema;
44781
+ configuratorSettingsClone.mainVersion = settings.version;
44782
+ // Set here to just save it, when it comes back from the configurator, we need to add it to the metadata.
44783
+ this._externalSourceData = settings;
44784
+ }
44785
+ this._configuringService.scene = this._sceneService.scene;
44786
+ this._initConfigurator(configuratorSettingsClone, sku, !!configuratorExternalSourceId, instanceId);
44787
+ this._startPosition = this._bluePrintService.getCenter();
44788
+ this.loadConfigurator = true;
44789
+ this._changeDetector.detectChanges();
44790
+ return this._waitForBuildToFinish();
44791
+ }
44747
44792
  _initConfigurator(settings, sku, external, instanceId) {
44748
44793
  this.configuratorSettings = this._prepareSettings(settings, external);
44749
44794
  this.configuratorSku = sku;
@@ -44759,18 +44804,29 @@ class ThreedselectorComponent {
44759
44804
  }
44760
44805
  return settings;
44761
44806
  }
44762
- _resetConfigurator() {
44763
- this.currentMetadata = undefined;
44764
- this.configuratorSettings = undefined;
44765
- this.configuratorSku = undefined;
44766
- this.configuratorInstanceId = undefined;
44767
- this.loadConfigurator = false;
44807
+ _shouldResetConfigurator(result) {
44808
+ return result && result.resultType !== ResultType.NeedsUserInput;
44809
+ }
44810
+ _resetConfigurator(reset = true) {
44811
+ if (reset) {
44812
+ this.currentMetadata = undefined;
44813
+ this.configuratorSettings = undefined;
44814
+ this.configuratorSku = undefined;
44815
+ this.configuratorInstanceId = undefined;
44816
+ this.loadConfigurator = false;
44817
+ }
44768
44818
  this.firstBuild = false;
44769
44819
  }
44770
44820
  _waitForBuildToFinish() {
44771
44821
  return new Promise((resolve, reject) => {
44772
- this._configuratorEventService.buildFinished.pipe(filter$1(value => value !== undefined && value !== null), take(1)).subscribe((result) => {
44773
- this._resetConfigurator();
44822
+ this._configuratorEventService.buildFinished.pipe(filter$1(value => value !== undefined && value !== null), take$1(1)).subscribe((result) => {
44823
+ if (this._shouldResetConfigurator(result)) {
44824
+ this._resetConfigurator(true);
44825
+ }
44826
+ else {
44827
+ this._resetConfigurator(false);
44828
+ this._userActionNeeded = true;
44829
+ }
44774
44830
  resolve(this.handleBuildResult(result));
44775
44831
  });
44776
44832
  });
@@ -45465,6 +45521,7 @@ class ThreedselectorComponent {
45465
45521
  const type = itemTypeFromPlacement(result.placement);
45466
45522
  result.position = isFloorType(type) ? this._bluePrintService.getRoomCenter() : new Vector3();
45467
45523
  result.originalMetadata = {
45524
+ itemIdentifier: data.itemIdentifier,
45468
45525
  itemName: data.object.name,
45469
45526
  itemType: type,
45470
45527
  configurable: false,
@@ -45473,16 +45530,16 @@ class ThreedselectorComponent {
45473
45530
  // scale?: Vector3;
45474
45531
  // centerPivot?: boolean;
45475
45532
  thirdPartyModel: true,
45476
- // canElevate?: boolean;
45533
+ canElevate: data.stackable,
45477
45534
  // modelUrl?: string;
45478
- // scalable?: boolean;
45535
+ scalable: data.scalable,
45536
+ canScaleX: data.scalable,
45537
+ canScaleY: data.scalable,
45538
+ canScaleZ: data.scalable,
45479
45539
  // elevation?: number;
45480
45540
  // elevationFixed?: boolean;
45481
- // elevationAdjustable?: boolean;
45482
- canScaleX: true,
45483
- canScaleY: true,
45484
- canScaleZ: true,
45485
- colorable: true
45541
+ elevationAdjustable: data.heightAdjustable,
45542
+ colorable: data.colorable
45486
45543
  };
45487
45544
  this.handleBuildResult(result);
45488
45545
  }
@@ -48594,7 +48651,6 @@ class HomedecoratorComponent {
48594
48651
  [purchaseFilterOrders]="purchaseFilterOrders"
48595
48652
  [logisticsFilterOrders]="logisticsFilterOrders"
48596
48653
  ></rp-product-catalog>
48597
- <co-lite-selector></co-lite-selector>
48598
48654
  <rp-help></rp-help>
48599
48655
  </rp-loading-overlay>
48600
48656
  </div>
@@ -48613,7 +48669,7 @@ class HomedecoratorComponent {
48613
48669
  </div>
48614
48670
  }
48615
48671
  }
48616
- `, isInline: true, dependencies: [{ kind: "component", type: ProgressBarComponent, selector: "progress-bar" }, { kind: "component", type: LoadingOverlayComponent, selector: "rp-loading-overlay" }, { kind: "component", type: HdLoaderComponent, selector: "rp-loader", inputs: ["show"] }, { kind: "component", type: Core3dComponent, selector: "rp-core3d" }, { kind: "component", type: RoomPlannerComponent, selector: "rp-room-planner", inputs: ["isLoading"], outputs: ["done", "showPlugin", "focusControls"] }, { kind: "component", type: FurnitureManagerComponent, selector: "rp-furniture-manager" }, { kind: "component", type: PresetsComponent, selector: "rp-presets", inputs: ["openNewRoomDialog"] }, { kind: "component", type: ThreedselectorComponent, selector: "rp-threedselector", inputs: ["selections"], outputs: ["customizeButtonClicked"] }, { kind: "component", type: ToolbarComponent, selector: "rp-toolbar", inputs: ["shareButton"], outputs: ["externalSave", "externalOpen"] }, { kind: "component", type: ProductCatalogComponent, selector: "rp-product-catalog", inputs: ["generalFilterOrders", "purchaseFilterOrders", "logisticsFilterOrders"] }, { kind: "component", type: HelpComponent, selector: "rp-help" }, { kind: "component", type: i27.LiteSelectorComponent, selector: "co-lite-selector", inputs: ["show", "showLabel", "canClose", "animateSlideout", "customDimensions"], outputs: ["showChange", "answerChosen"] }], encapsulation: i0.ViewEncapsulation.None }); }
48672
+ `, isInline: true, dependencies: [{ kind: "component", type: ProgressBarComponent, selector: "progress-bar" }, { kind: "component", type: LoadingOverlayComponent, selector: "rp-loading-overlay" }, { kind: "component", type: HdLoaderComponent, selector: "rp-loader", inputs: ["show"] }, { kind: "component", type: Core3dComponent, selector: "rp-core3d" }, { kind: "component", type: RoomPlannerComponent, selector: "rp-room-planner", inputs: ["isLoading"], outputs: ["done", "showPlugin", "focusControls"] }, { kind: "component", type: FurnitureManagerComponent, selector: "rp-furniture-manager" }, { kind: "component", type: PresetsComponent, selector: "rp-presets", inputs: ["openNewRoomDialog"] }, { kind: "component", type: ThreedselectorComponent, selector: "rp-threedselector", inputs: ["selections"], outputs: ["customizeButtonClicked"] }, { kind: "component", type: ToolbarComponent, selector: "rp-toolbar", inputs: ["shareButton"], outputs: ["externalSave", "externalOpen"] }, { kind: "component", type: ProductCatalogComponent, selector: "rp-product-catalog", inputs: ["generalFilterOrders", "purchaseFilterOrders", "logisticsFilterOrders"] }, { kind: "component", type: HelpComponent, selector: "rp-help" }], encapsulation: i0.ViewEncapsulation.None }); }
48617
48673
  }
48618
48674
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HomedecoratorComponent, decorators: [{
48619
48675
  type: Component,
@@ -48640,7 +48696,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
48640
48696
  [purchaseFilterOrders]="purchaseFilterOrders"
48641
48697
  [logisticsFilterOrders]="logisticsFilterOrders"
48642
48698
  ></rp-product-catalog>
48643
- <co-lite-selector></co-lite-selector>
48644
48699
  <rp-help></rp-help>
48645
48700
  </rp-loading-overlay>
48646
48701
  </div>