@smarterplan/ngx-smarterplan-locations 0.0.21 → 0.1.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.
Files changed (35) hide show
  1. package/esm2020/lib/components/detail-location/detail-location.component.mjs +3 -3
  2. package/esm2020/lib/components/form-location/form-location.component.mjs +3 -3
  3. package/esm2020/lib/components/images/images.component.mjs +3 -3
  4. package/esm2020/lib/components/locations/locations.component.mjs +3 -3
  5. package/esm2020/lib/components/locations/map/map-popup/map-popup.component.mjs +1 -1
  6. package/esm2020/lib/components/locations/map/map.component.mjs +1 -1
  7. package/esm2020/lib/components/plans/calibration/calibration.component.mjs +3 -3
  8. package/esm2020/lib/components/plans/edit-plan/edit-plan.component.mjs +3 -3
  9. package/esm2020/lib/components/plans/plans.component.mjs +3 -3
  10. package/esm2020/lib/components/tab-navigation/tab-navigation.component.mjs +1 -1
  11. package/esm2020/lib/components/visits/visits.component.mjs +3 -3
  12. package/esm2020/lib/components/zones/add-zone/add-zone.component.mjs +52 -111
  13. package/esm2020/lib/components/zones/zones.component.mjs +13 -9
  14. package/esm2020/lib/helper.service.mjs +97 -2
  15. package/esm2020/lib/ngx-smarterplan-locations.module.mjs +2 -2
  16. package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs +157 -118
  17. package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
  18. package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs +157 -116
  19. package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
  20. package/lib/components/detail-location/detail-location.component.d.ts +1 -1
  21. package/lib/components/form-location/form-location.component.d.ts +1 -1
  22. package/lib/components/images/images.component.d.ts +1 -1
  23. package/lib/components/locations/locations.component.d.ts +1 -1
  24. package/lib/components/locations/map/map-popup/map-popup.component.d.ts +1 -1
  25. package/lib/components/locations/map/map.component.d.ts +1 -1
  26. package/lib/components/plans/calibration/calibration.component.d.ts +1 -1
  27. package/lib/components/plans/edit-plan/edit-plan.component.d.ts +1 -1
  28. package/lib/components/plans/plans.component.d.ts +1 -1
  29. package/lib/components/tab-navigation/tab-navigation.component.d.ts +1 -1
  30. package/lib/components/visits/visits.component.d.ts +1 -1
  31. package/lib/components/zones/add-zone/add-zone.component.d.ts +8 -30
  32. package/lib/components/zones/zones.component.d.ts +2 -2
  33. package/lib/helper.service.d.ts +39 -0
  34. package/lib/ngx-smarterplan-locations.module.d.ts +1 -1
  35. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Component, Output, Input, ViewChild, HostListener, NgModule } from '@angular/core';
3
- import * as i2 from 'ngx-smarterplan-core';
4
- import { enumToArray, LevelStatus, uploadFileToS3, deleteFromS3, PropertyType, getSignedImageUrlForSpace, SearchObjectType, SpaceStatus, getMetaForImage, getSignedFile, downloadFileAsObject, downloadBlob, CaptureViewer, showScanPointsOnPlanInDiv, getCoefficientsForImage, wait, InventoryStatus, sortAlphabeticallyOnName, NgxSmarterplanCoreModule } from 'ngx-smarterplan-core';
3
+ import * as i2 from '@smarterplan/ngx-smarterplan-core';
4
+ import { enumToArray, LevelStatus, uploadFileToS3, deleteFromS3, PropertyType, getSignedImageUrlForSpace, SearchObjectType, SpaceStatus, getMetaForImage, getSignedFile, downloadFileAsObject, downloadBlob, CaptureViewer, showScanPointsOnPlanInDiv, getCoefficientsForImage, wait, InventoryStatus, sortAlphabeticallyOnName, NgxSmarterplanCoreModule } from '@smarterplan/ngx-smarterplan-core';
5
5
  import * as i1 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
7
  import * as i5 from '@angular/common';
@@ -1593,6 +1593,103 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
1593
1593
  args: ["content", { static: false }]
1594
1594
  }] } });
1595
1595
 
1596
+ function isInPolygon(p, polygon) {
1597
+ let isInside = false;
1598
+ let minX = polygon[0].x;
1599
+ let maxX = polygon[0].x;
1600
+ let minY = polygon[0].y;
1601
+ let maxY = polygon[0].y;
1602
+ for (let n = 1; n < polygon.length; n++) {
1603
+ const q = polygon[n];
1604
+ minX = Math.min(q.x, minX);
1605
+ maxX = Math.max(q.x, maxX);
1606
+ minY = Math.min(q.y, minY);
1607
+ maxY = Math.max(q.y, maxY);
1608
+ }
1609
+ if (p.x < minX || p.x > maxX || p.y < minY || p.y > maxY) {
1610
+ return false;
1611
+ }
1612
+ for (let index = 0, index_ = polygon.length - 1; index < polygon.length; index_ = index++) {
1613
+ if (polygon[index].y > p.y !== polygon[index_].y > p.y &&
1614
+ p.x <
1615
+ ((polygon[index_].x - polygon[index].x) *
1616
+ (p.y - polygon[index].y)) /
1617
+ (polygon[index_].y - polygon[index].y) +
1618
+ polygon[index].x) {
1619
+ isInside = !isInside;
1620
+ }
1621
+ }
1622
+ return isInside;
1623
+ }
1624
+ function rotate(point, center, angle) {
1625
+ let xM;
1626
+ let yM;
1627
+ let x;
1628
+ let y;
1629
+ angle *= Math.PI / 180;
1630
+ xM = point.x - center.x;
1631
+ yM = point.y - center.y;
1632
+ x = xM * Math.cos(angle) + yM * Math.sin(angle) + center.x;
1633
+ y = -xM * Math.sin(angle) + yM * Math.cos(angle) + center.y;
1634
+ return { x: Math.round(x), y: Math.round(y) };
1635
+ }
1636
+ /**
1637
+ * Check if an HtmlElement is inside a selection
1638
+ * @param button HTMLElement
1639
+ * @param selection
1640
+ * @returns true if the element is inside the selection, false otherwise
1641
+ */
1642
+ function buttonIsInSelection(button, selection) {
1643
+ const bounds = button.getBoundingClientRect();
1644
+ return (bounds.bottom > selection.top &&
1645
+ bounds.top < selection.top + selection.height &&
1646
+ bounds.right > selection.left &&
1647
+ bounds.left < selection.left + selection.width);
1648
+ }
1649
+ /**
1650
+ * Styles the button that represents a sweep on the plan: green-added to zone, red -not added
1651
+ * @param button HTMLButtonElement, button on the plan,
1652
+ * @param isAdded boolean, if the sweep added to the zone
1653
+ */
1654
+ function styleButton(button, isAdded = false) {
1655
+ button.style.backgroundImage = isAdded
1656
+ ? `url("https://api.iconify.design/mdi:adjust.svg?color=green&height=17&width=17")`
1657
+ : `url("https://api.iconify.design/mdi:close-circle-outline.svg?color=red&height=17&width=17")`;
1658
+ button.style.backgroundColor = "transparent";
1659
+ button.style.position = "absolute";
1660
+ button.style.border = "none";
1661
+ button.style.width = "17px";
1662
+ button.style.height = "17px";
1663
+ button.disabled = false;
1664
+ button.type = "button";
1665
+ }
1666
+ /**
1667
+ * Check if sweep (button) is chosen; it is reprsented by image style "mdi:adjust"
1668
+ * @param button HTMLElement
1669
+ * @returns boolean, if button was selected
1670
+ */
1671
+ function buttonIsChosen(button) {
1672
+ return button.style.backgroundImage.includes("adjust");
1673
+ }
1674
+ /**
1675
+ * Visually change the state of a scan button, a selected button is blue
1676
+ * @param button HTMLElement
1677
+ * @param selected if true the button will be blue, otherwise it will red or green
1678
+ */
1679
+ function setVisuallySelected(button, selected) {
1680
+ if (selected) {
1681
+ /** Color in blue */
1682
+ button.style.backgroundImage = button.style.backgroundImage
1683
+ .replace("red", "blue")
1684
+ .replace("green", "blue");
1685
+ }
1686
+ else {
1687
+ /** Get back in red or green */
1688
+ const color = buttonIsChosen(button) ? "green" : "red";
1689
+ button.style.backgroundImage = button.style.backgroundImage.replace("blue", color);
1690
+ }
1691
+ }
1692
+
1596
1693
  class CarouselComponent {
1597
1694
  constructor() {
1598
1695
  this.currentScan = new EventEmitter();
@@ -1716,6 +1813,7 @@ class AddZoneComponent {
1716
1813
  /** Scan buttons that are in the current selection */
1717
1814
  this.buttonsInSelection = [];
1718
1815
  this.zoneIsMatterportFloor = false;
1816
+ this.multipleFloors = false;
1719
1817
  }
1720
1818
  ngOnInit() {
1721
1819
  this.parentZones = this.zones.filter((zone) => zone.layer && zone.layer.name === "FLOOR");
@@ -1747,6 +1845,8 @@ class AddZoneComponent {
1747
1845
  this.isMuseumVisit = this.zoneEdit.isMuseumVisitZone
1748
1846
  ? this.zoneEdit.isMuseumVisitZone
1749
1847
  : false;
1848
+ this.multipleFloors = this.zoneEdit.isMultipleFloorZone ? this.zoneEdit.isMuseumVisitZone
1849
+ : false;
1750
1850
  this.zoneForm = this.fb.group({
1751
1851
  id: this.zoneEdit.id,
1752
1852
  name: [this.zoneEdit.name, [Validators.required]],
@@ -1757,9 +1857,10 @@ class AddZoneComponent {
1757
1857
  newLayer: null,
1758
1858
  isMuseumVisitZone: this.isMuseumVisit,
1759
1859
  });
1860
+ this.onChangeMultipleFloors();
1760
1861
  }
1761
1862
  else {
1762
- const mainZone = this.zones.find((z) => !z.parentID);
1863
+ const mainZone = this.getDefaultZone();
1763
1864
  this.zoneForm = this.fb.group({
1764
1865
  name: [
1765
1866
  this.newZoneData ? this.newZoneData.name : "",
@@ -1781,7 +1882,7 @@ class AddZoneComponent {
1781
1882
  if (!this.zoneForm.valid) {
1782
1883
  return;
1783
1884
  }
1784
- const formValue = this.zoneForm.value;
1885
+ const formValue = this.zoneForm.getRawValue(); //because we need values of disables controls as well
1785
1886
  if (formValue.newLayer) {
1786
1887
  await this.createLayer(formValue.newLayer).then((layer) => {
1787
1888
  formValue.layerID = layer.id;
@@ -1798,6 +1899,7 @@ class AddZoneComponent {
1798
1899
  layerID: formValue.layerID,
1799
1900
  parentID: formValue.parentID,
1800
1901
  isMuseumVisitZone: this.isMuseumVisit,
1902
+ isMultipleFloorZone: this.multipleFloors,
1801
1903
  sweepIDs: [],
1802
1904
  };
1803
1905
  try {
@@ -1808,14 +1910,12 @@ class AddZoneComponent {
1808
1910
  zoneUpdate.sweepIDs = this.zoneEdit.sweepIDs;
1809
1911
  zoneUpdate.id = formValue.id;
1810
1912
  await this.setSweepsAndNodeForZoneInput(zoneUpdate);
1811
- console.log(zoneUpdate);
1812
1913
  await this.zoneService.updateZone(zoneUpdate);
1813
1914
  this.zoneEdit = null;
1814
1915
  this.updatedZone.emit(zoneUpdate.id);
1815
1916
  }
1816
1917
  else {
1817
1918
  await this.setSweepsAndNodeForZoneInput(zoneInput);
1818
- // console.log(zoneInput);
1819
1919
  await this.zoneService
1820
1920
  .create(zoneInput)
1821
1921
  .then(zoneCreated => {
@@ -1915,7 +2015,9 @@ class AddZoneComponent {
1915
2015
  return Promise.resolve();
1916
2016
  }
1917
2017
  async onPlanClick(plan = this.chosenPlan) {
1918
- this.chosenScansOnPlan = [];
2018
+ if (!this.multipleFloors) {
2019
+ this.chosenScansOnPlan = [];
2020
+ }
1919
2021
  this.chosenPlan = plan;
1920
2022
  this.clearDivPlan();
1921
2023
  this.addScanPoints();
@@ -1931,11 +2033,13 @@ class AddZoneComponent {
1931
2033
  if (this.navIDsZoneEdit.length > 0 &&
1932
2034
  this.navIDsZoneEdit.includes(element.id) // button id is the navigation(not graph!) ids
1933
2035
  ) {
1934
- this.styleButton(element, true);
1935
- this.chosenScansOnPlan.push(element.id);
2036
+ styleButton(element, true);
2037
+ if (!this.chosenScansOnPlan.includes(element.id)) {
2038
+ this.chosenScansOnPlan.push(element.id);
2039
+ }
1936
2040
  }
1937
2041
  else {
1938
- this.styleButton(element);
2042
+ styleButton(element);
1939
2043
  }
1940
2044
  element.addEventListener("click", (event) => this.onButtonScanClicked(event.target));
1941
2045
  }
@@ -1953,10 +2057,10 @@ class AddZoneComponent {
1953
2057
  * @param button
1954
2058
  */
1955
2059
  onButtonScanClicked(button) {
1956
- button.style.backgroundImage = this.buttonIsChosen(button)
2060
+ button.style.backgroundImage = buttonIsChosen(button)
1957
2061
  ? `url("https://api.iconify.design/mdi:close-circle-outline.svg?color=red&height=17&width=17")`
1958
2062
  : `url("https://api.iconify.design/mdi:adjust.svg?color=green&height=17&width=17")`;
1959
- if (this.buttonIsChosen(button)) {
2063
+ if (buttonIsChosen(button)) {
1960
2064
  if (!this.chosenScansOnPlan.includes(button.id)) {
1961
2065
  this.chosenScansOnPlan.push(button.id);
1962
2066
  }
@@ -1966,21 +2070,6 @@ class AddZoneComponent {
1966
2070
  this.chosenScansOnPlan.splice(index, 1);
1967
2071
  }
1968
2072
  }
1969
- styleButton(button, isAdded = false) {
1970
- button.style.backgroundImage = isAdded
1971
- ? `url("https://api.iconify.design/mdi:adjust.svg?color=green&height=17&width=17")`
1972
- : `url("https://api.iconify.design/mdi:close-circle-outline.svg?color=red&height=17&width=17")`;
1973
- button.style.backgroundColor = "transparent";
1974
- button.style.position = "absolute";
1975
- button.style.border = "none";
1976
- button.style.width = "17px";
1977
- button.style.height = "17px";
1978
- button.disabled = false;
1979
- button.type = "button";
1980
- }
1981
- buttonIsChosen(button) {
1982
- return button.style.backgroundImage.includes("adjust");
1983
- }
1984
2073
  clearDivPlan() {
1985
2074
  if (this.divPlan)
1986
2075
  this.divPlan.innerHTML = "";
@@ -1991,6 +2080,7 @@ class AddZoneComponent {
1991
2080
  this.onPlanClick();
1992
2081
  }, 500);
1993
2082
  }
2083
+ /** Function if we are coming for svg editor workflow */
1994
2084
  setScanByDraw(navigations) {
1995
2085
  return new Promise(async (resolve) => {
1996
2086
  const rect = {
@@ -2025,7 +2115,7 @@ class AddZoneComponent {
2025
2115
  let navX = (calibrage.offsetX + position.x * calibrage.x) / coeffX;
2026
2116
  let navY = (calibrage.offsetY + position.z * calibrage.y) / coeffY;
2027
2117
  if (element.angle) {
2028
- const rotatePos = this.rotate({ x: navX, y: navY }, { x: element.cx, y: element.cy }, element.angle);
2118
+ const rotatePos = rotate({ x: navX, y: navY }, { x: element.cx, y: element.cy }, element.angle);
2029
2119
  navX = rotatePos.x;
2030
2120
  navY = rotatePos.y;
2031
2121
  }
@@ -2048,7 +2138,7 @@ class AddZoneComponent {
2048
2138
  let navX = (calibrage.offsetX + position.x * calibrage.x) / coeffX;
2049
2139
  let navY = (calibrage.offsetY + position.z * calibrage.y) / coeffY;
2050
2140
  if (element.angle) {
2051
- const rotatePos = this.rotate({ x: navX, y: navY }, { x: element.cx, y: element.cy }, element.angle);
2141
+ const rotatePos = rotate({ x: navX, y: navY }, { x: element.cx, y: element.cy }, element.angle);
2052
2142
  navX = rotatePos.x;
2053
2143
  navY = rotatePos.y;
2054
2144
  }
@@ -2075,67 +2165,12 @@ class AddZoneComponent {
2075
2165
  // element.angle,
2076
2166
  // );
2077
2167
  // }
2078
- if ((await this.isInPolygon(p, element.segList)) &&
2168
+ if (isInPolygon(p, element.segList) &&
2079
2169
  !this.navIDsZoneEdit.includes(navigation.id)) {
2080
2170
  this.navIDsZoneEdit.push(navigation.id);
2081
2171
  }
2082
2172
  });
2083
2173
  }
2084
- async isInPolygon(p, polygon) {
2085
- return new Promise((resolve) => {
2086
- let isInside = false;
2087
- let minX = polygon[0].x;
2088
- let maxX = polygon[0].x;
2089
- let minY = polygon[0].y;
2090
- let maxY = polygon[0].y;
2091
- for (let n = 1; n < polygon.length; n++) {
2092
- const q = polygon[n];
2093
- minX = Math.min(q.x, minX);
2094
- maxX = Math.max(q.x, maxX);
2095
- minY = Math.min(q.y, minY);
2096
- maxY = Math.max(q.y, maxY);
2097
- }
2098
- if (p.x < minX || p.x > maxX || p.y < minY || p.y > maxY) {
2099
- resolve(false);
2100
- }
2101
- for (let index = 0, index_ = polygon.length - 1; index < polygon.length; index_ = index++) {
2102
- if (polygon[index].y > p.y !== polygon[index_].y > p.y &&
2103
- p.x <
2104
- ((polygon[index_].x - polygon[index].x) *
2105
- (p.y - polygon[index].y)) /
2106
- (polygon[index_].y - polygon[index].y) +
2107
- polygon[index].x) {
2108
- isInside = !isInside;
2109
- }
2110
- }
2111
- resolve(isInside);
2112
- });
2113
- }
2114
- rotate(point, center, angle) {
2115
- let xM;
2116
- let yM;
2117
- let x;
2118
- let y;
2119
- angle *= Math.PI / 180;
2120
- xM = point.x - center.x;
2121
- yM = point.y - center.y;
2122
- x = xM * Math.cos(angle) + yM * Math.sin(angle) + center.x;
2123
- y = -xM * Math.sin(angle) + yM * Math.cos(angle) + center.y;
2124
- return { x: Math.round(x), y: Math.round(y) };
2125
- }
2126
- /**
2127
- * Check if an HtmlElement is inside a selection
2128
- * @param button HTMLElement
2129
- * @param selection
2130
- * @returns true if the element is inside the selection, false otherwise
2131
- */
2132
- buttonIsInSelection(button, selection) {
2133
- const bounds = button.getBoundingClientRect();
2134
- return (bounds.bottom > selection.top &&
2135
- bounds.top < selection.top + selection.height &&
2136
- bounds.right > selection.left &&
2137
- bounds.left < selection.left + selection.width);
2138
- }
2139
2174
  /**
2140
2175
  * Trigger each by the selectionComponent when selection change
2141
2176
  * Update the current selected scan buttons
@@ -2146,7 +2181,7 @@ class AddZoneComponent {
2146
2181
  const newSelectedButtons = [];
2147
2182
  /** For each button, decide whether will be add to selected list or unselected list */
2148
2183
  for (const button of this.buttonElements) {
2149
- const isSelected = this.buttonIsInSelection(button, selection);
2184
+ const isSelected = buttonIsInSelection(button, selection);
2150
2185
  if (this.buttonsInSelection.includes(button)) {
2151
2186
  /** If the button is already in the selected list, we check if it should be unselect */
2152
2187
  if (!isSelected) {
@@ -2159,11 +2194,11 @@ class AddZoneComponent {
2159
2194
  }
2160
2195
  /** Visually Update unselected list */
2161
2196
  for (const button of unselectedButtons) {
2162
- this.setVisuallySelected(button, false);
2197
+ setVisuallySelected(button, false);
2163
2198
  }
2164
2199
  /** Visually Update selected list */
2165
2200
  for (const button of newSelectedButtons) {
2166
- this.setVisuallySelected(button, true);
2201
+ setVisuallySelected(button, true);
2167
2202
  }
2168
2203
  /** Remove unselected list */
2169
2204
  this.buttonsInSelection = this.buttonsInSelection.filter((button) => {
@@ -2175,24 +2210,6 @@ class AddZoneComponent {
2175
2210
  ...newSelectedButtons,
2176
2211
  ];
2177
2212
  }
2178
- /**
2179
- * Visually change the state of a scan button, a selected button is blue
2180
- * @param button
2181
- * @param selected if true the button will be blue, otherwise it will red or green
2182
- */
2183
- setVisuallySelected(button, selected) {
2184
- if (selected) {
2185
- /** Color in blue */
2186
- button.style.backgroundImage = button.style.backgroundImage
2187
- .replace("red", "blue")
2188
- .replace("green", "blue");
2189
- }
2190
- else {
2191
- /** Get back in red or green */
2192
- const color = this.buttonIsChosen(button) ? "green" : "red";
2193
- button.style.backgroundImage = button.style.backgroundImage.replace("blue", color);
2194
- }
2195
- }
2196
2213
  /**
2197
2214
  * Trigger when the user click to add the selected scans
2198
2215
  */
@@ -2221,7 +2238,7 @@ class AddZoneComponent {
2221
2238
  onSelectAll() {
2222
2239
  this.buttonsInSelection = [...this.buttonElements];
2223
2240
  for (const button of this.buttonsInSelection) {
2224
- this.setVisuallySelected(button, true);
2241
+ setVisuallySelected(button, true);
2225
2242
  }
2226
2243
  }
2227
2244
  /**
@@ -2238,18 +2255,38 @@ class AddZoneComponent {
2238
2255
  * Adds all sweeps of the space
2239
2256
  */
2240
2257
  onAddAll() {
2241
- const defaultZone = this.zones.find((zone) => zone.layer && zone.layer.name === "BUILDING" && zone.sweepIDs);
2258
+ const defaultZone = this.getDefaultZone();
2242
2259
  if (defaultZone) {
2243
2260
  this.chosenScansOnPlan = defaultZone.sweepIDs;
2244
2261
  this.zoneForm.get("parentID").setValue(defaultZone.id);
2262
+ this.zoneForm.get("parentID").disable();
2263
+ this.multipleFloors = true;
2264
+ }
2265
+ }
2266
+ getDefaultZone() {
2267
+ return this.zones.find((zone) => zone.layer && zone.layer.name === "BUILDING" && zone.sweepIDs);
2268
+ }
2269
+ /**
2270
+ * Multiple floors
2271
+ */
2272
+ onChangeMultipleFloors() {
2273
+ if (this.multipleFloors) {
2274
+ const defaultZone = this.getDefaultZone();
2275
+ if (defaultZone) {
2276
+ this.zoneForm.get("parentID").setValue(defaultZone.id);
2277
+ this.zoneForm.get("parentID").disable();
2278
+ }
2279
+ }
2280
+ else {
2281
+ this.zoneForm.get("parentID").enable();
2245
2282
  }
2246
2283
  }
2247
2284
  }
2248
2285
  AddZoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AddZoneComponent, deps: [{ token: i1$2.FormBuilder }, { token: i2.ZoneService }, { token: i2.LayerService }, { token: i2.BaseUserService }, { token: i2.NavigationService }, { token: i2.PlanService }], target: i0.ɵɵFactoryTarget.Component });
2249
- AddZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AddZoneComponent, selector: "lib-add-zone", inputs: { zoneEdit: "zoneEdit", spaceID: "spaceID", images360: "images360", navigationIDs: "navigationIDs", zones: "zones", newZoneData: "newZoneData", chosenPlan: "chosenPlan", isMuseumVisit: "isMuseumVisit", defaultZone: "defaultZone" }, outputs: { updatedZone: "updatedZone" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row\" *ngIf=\"zoneForm\">\r\n <div class=\"col-7\">\r\n <form (ngSubmit)=\"onSubmitZone()\" [formGroup]=\"zoneForm\">\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Name' | translate}} *</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" [class.is-invalid]=\"name.invalid && isSubmitted\" required\r\n formControlName=\"name\">\r\n <div class=\"invalid-feedback\">\r\n {{'A name is required' | translate}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!isMuseumVisit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Type of zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"layerID\">\r\n <option value=\"null\" selected disabled hidden> {{ zoneEdit && zoneEdit.layer ?\r\n zoneEdit.layer.name : 'Choose type'}}</option>\r\n <option *ngFor=\"let layer of layers\" [value]=\"layer.id\">\r\n {{ layer.name }}\r\n </option>\r\n </select>\r\n <p class=\"mt-1 new-type-text\">{{'or add new type of zone' | translate }}</p>\r\n <input type=\"text\" class=\"form-control new-type-input\" formControlName=\"newLayer\">\r\n </div>\r\n </div>\r\n <!--If Editing Zone possibility to assign it to museum itinerary-->\r\n <div class=\"mb-3 row\" *ngIf=\"zoneEdit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{ 'Museum Itinerary' | translate }}</label>\r\n <div class=\"col-sm-10\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"isMuseumVisit\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Surface' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" formControlName=\"surface\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Parent zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"parentID\">\r\n <option *ngFor=\"let zone of parentZones\" [ngValue]=\"zone.id\">\r\n {{ zone.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" style=\"max-height: 200px; overflow: auto;\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Scan Points' | translate}}</label>\r\n <!-- <p class=\"col-sm-2\" *ngIf=\"zoneEdit\">{{ zoneEdit.sweepIDs.length }} scans</p> -->\r\n <p class=\"col\" *ngIf=\"chosenScansOnPlan.length === 0 && chosenScans.length === 0\">\r\n {{'No scan points chosen' | translate}}</p>\r\n <div class=\"col-sm-5\" *ngIf=\"chosenScansOnPlan && chosenScansOnPlan.length > 0\">\r\n <p>{{ chosenScansOnPlan.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScansOnPlan\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ scan | slice:0:8 }}</p>\r\n <div (click)=\"onRemoveScanPlan(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-5\" *ngIf=\"carouselIsVisible && chosenScans && chosenScans.length > 0\">\r\n <p>{{ chosenScans.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScans\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ images360[scan].filename }}</p>\r\n <div (click)=\"onRemoveScanImage(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" [disabled]=\"!plans\"\r\n (click)=\"togglePlan()\">{{'Choose scan points on plan' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"toggleCarousel()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Choose scan points from gallery' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddAll()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Add all scans of this space' | translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3 col-form-label\">{{'No visible scan points' | translate}}</label>\r\n <div class=\"col-sm-3\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"noScanPoints\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"carouselIsVisible\" class=\"mb-2\">\r\n <lib-carousel *ngIf=\"images360 && images360.length > 0\" [images]=\"images360\"\r\n (currentScan)=\"currentScanShowing=$event\"></lib-carousel>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2 mt-3\"\r\n (click)=\"onAddScan()\">{{'Add to zone' | translate}}</button>\r\n </div>\r\n <div ngbDropdown class=\"row d-inline-block me-3\" *ngIf=\"fromPlan\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\"\r\n ngbDropdownToggle>{{chosenPlan ?\r\n chosenPlan.name : ('Choose Plan' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button type=\"button\" ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\"\r\n [disabled]=\"!plan.calibration\">{{ plan.name }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-1\" *ngIf=\"fromPlan\">\r\n <lib-selection class=\"col-md-8\" (onSelectionChanged)=\"onSelectionChanged($event)\">\r\n <div class=\"selectZone\" oncontextmenu=\"return false;\">\r\n <div class=\"row\">\r\n <div style=\"overflow: hidden;width:100%;\">\r\n <div style=\"height: 400px; width: 100%;\" id=\"planDiv\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </lib-selection>\r\n\r\n <div class=\"col-md-4 scanTool\" *ngIf=\"buttonElements.length > 0\">\r\n <div class=\"row mb-5 d-inline-block\">\r\n <h2>Selection tool</h2>\r\n <div class=\"protip\">Hold right click and move your cursor to select multiple scans.</div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <div class=\"col-3\" style=\"padding:0px\">\r\n <label class=\"tool-label\" for=\"scanSize\">Scan size</label>\r\n </div>\r\n <div class=\"col-9\">\r\n <input type=\"range\" class=\"form-range\" min=\"0.001\" max=\"5\" step=\"0.01\" value=\"1\"\r\n id=\"scanSize\" (input)=\"onChangeScanSize($event)\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onSelectAll()\">Select all scans</button>\r\n </div>\r\n\r\n <div *ngIf=\"buttonsInSelection.length > 0\" class=\"row editSelected\">\r\n <span class=\"tool-label\">Edit selected scans : </span>\r\n <button type=\"button\" class=\"btn btn-primary ms-3 me-2\" (click)=\"onSelectionAdd()\">Add</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onSelectionRemove()\">Remove</button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\">\r\n <button type=\"submit\" class=\"btn btn-outline-primary rounded-pill me-2\">{{'Save' | translate}}</button>\r\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-outline-primary rounded-pill me-2\">\r\n {{'Cancel' | translate}}</button>\r\n </div>\r\n </form>\r\n </div>\r\n</div>", styles: [".form-range{width:100%}.scanTool{padding-left:50px;padding-right:50px}h2{color:var(--smarterplan-primary)}.protip{color:gray}.tool-label{font-size:1.3rem}.selectZone{background-color:gray;border-radius:1rem;overflow:hidden}.col-form-label{margin-bottom:1rem}.btn-outline-primary{min-width:200px;margin-bottom:1rem;margin-right:1rem}.new-type-input{margin-bottom:1rem}.new-type-text{margin-bottom:.5rem}\n"], components: [{ type: CarouselComponent, selector: "lib-carousel", inputs: ["images"], outputs: ["currentScan"] }, { type: SelectionComponent, selector: "lib-selection", outputs: ["onSelectionChanged"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "translate": i3.TranslatePipe, "slice": i5.SlicePipe } });
2286
+ AddZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AddZoneComponent, selector: "lib-add-zone", inputs: { zoneEdit: "zoneEdit", spaceID: "spaceID", images360: "images360", navigationIDs: "navigationIDs", zones: "zones", newZoneData: "newZoneData", chosenPlan: "chosenPlan", isMuseumVisit: "isMuseumVisit", defaultZone: "defaultZone" }, outputs: { updatedZone: "updatedZone" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"main-container\" *ngIf=\"zoneForm\">\r\n <div class=\"col-7\">\r\n <form (ngSubmit)=\"onSubmitZone()\" [formGroup]=\"zoneForm\">\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Name' | translate}} *</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" required formControlName=\"name\">\r\n <!-- <div class=\"invalid-feedback\">\r\n {{'A name is required' | translate}}\r\n </div> -->\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!isMuseumVisit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Type of zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"layerID\">\r\n <option value=\"null\" selected disabled hidden> {{ zoneEdit && zoneEdit.layer ?\r\n zoneEdit.layer.name : 'Choose type'}}</option>\r\n <option *ngFor=\"let layer of layers\" [value]=\"layer.id\">\r\n {{ layer.name }}\r\n </option>\r\n </select>\r\n <p class=\"mt-1 new-type-text\">{{'or add new type of zone' | translate }}</p>\r\n <input type=\"text\" class=\"form-control new-type-input\" formControlName=\"newLayer\">\r\n </div>\r\n </div>\r\n <!--If Editing Zone possibility to assign it to museum itinerary-->\r\n <div class=\"mb-3 row\" *ngIf=\"zoneEdit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{ 'Museum Itinerary' | translate }}</label>\r\n <div class=\"col-sm-10\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"isMuseumVisit\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{ 'Multiple Floors' | translate }}</label>\r\n <div class=\"col-sm-10\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"multipleFloors\" \r\n (change)=\"onChangeMultipleFloors()\" [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Surface' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" formControlName=\"surface\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Parent zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"parentID\">\r\n <option *ngFor=\"let zone of parentZones\" [ngValue]=\"zone.id\">\r\n {{ zone.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" style=\"max-height: 200px; overflow: auto;\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Scan Points' | translate}}</label>\r\n <!-- <p class=\"col-sm-2\" *ngIf=\"zoneEdit\">{{ zoneEdit.sweepIDs.length }} scans</p> -->\r\n <p class=\"col\" *ngIf=\"chosenScansOnPlan.length === 0 && chosenScans.length === 0\">\r\n {{'No scan points chosen' | translate}}</p>\r\n <div class=\"col-sm-5\" *ngIf=\"chosenScansOnPlan && chosenScansOnPlan.length > 0\">\r\n <p>{{ chosenScansOnPlan.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScansOnPlan\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ scan | slice:0:8 }}</p>\r\n <div (click)=\"onRemoveScanPlan(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-5\" *ngIf=\"carouselIsVisible && chosenScans && chosenScans.length > 0\">\r\n <p>{{ chosenScans.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScans\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ images360[scan].filename }}</p>\r\n <div (click)=\"onRemoveScanImage(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-3 mt-3\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" [disabled]=\"!plans\"\r\n (click)=\"togglePlan()\">{{'Choose scan points on plan' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"toggleCarousel()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Choose scan points from gallery' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddAll()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Add all scans of this space' | translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3 col-form-label\">{{'No visible scan points' | translate}}</label>\r\n <div class=\"col-sm-3\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"noScanPoints\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"carouselIsVisible\" class=\"mb-2\">\r\n <lib-carousel *ngIf=\"images360 && images360.length > 0\" [images]=\"images360\"\r\n (currentScan)=\"currentScanShowing=$event\"></lib-carousel>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2 mt-3\"\r\n (click)=\"onAddScan()\">{{'Add to zone' | translate}}</button>\r\n </div>\r\n <div ngbDropdown class=\"row d-inline-block me-3\" *ngIf=\"fromPlan\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\"\r\n ngbDropdownToggle>{{chosenPlan ?\r\n chosenPlan.name : ('Choose Plan' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button type=\"button\" ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\"\r\n [disabled]=\"!plan.calibration\">{{ plan.name }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n\r\n <div class=\"mt-3\">\r\n <button type=\"submit\" class=\"btn btn-outline-primary rounded-pill me-2\">{{'Save' | translate}}</button>\r\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-outline-primary rounded-pill me-2\">\r\n {{'Cancel' | translate}}</button>\r\n </div>\r\n </form>\r\n </div>\r\n <div class=\"edit-plan\" *ngIf=\"fromPlan\">\r\n <lib-selection class=\"col-md-8\" (onSelectionChanged)=\"onSelectionChanged($event)\">\r\n <div class=\"selectZone\" oncontextmenu=\"return false;\">\r\n <div class=\"row\">\r\n <div style=\"overflow: hidden;width:100%;\">\r\n <div style=\"height: 400px; width: 100%;\" id=\"planDiv\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </lib-selection>\r\n\r\n <div class=\"col-md-4 scanTool\" *ngIf=\"buttonElements.length > 0\">\r\n <div class=\"row mb-4 d-inline-block\">\r\n <h2>{{'selectTool.title' | translate}}</h2>\r\n <div class=\"protip\">{{'selectTool.tip' | translate}}.</div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <div class=\"col-3\" style=\"padding:0px\">\r\n <label class=\"tool-label\" for=\"scanSize\">{{'selectTool.size' | translate}}</label>\r\n </div>\r\n <div class=\"col-9\">\r\n <input type=\"range\" class=\"form-range\" min=\"0.001\" max=\"5\" step=\"0.01\" value=\"1\"\r\n id=\"scanSize\" (input)=\"onChangeScanSize($event)\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <button type=\"button\" class=\"btn btn-primary rounded-pill\" (click)=\"onSelectAll()\">{{'selectTool.selectAll' | translate}}</button>\r\n </div>\r\n\r\n <div *ngIf=\"buttonsInSelection.length > 0\" class=\"edit-selected\">\r\n <span class=\"tool-label\">{{'selectTool.edit' | translate}} : </span>\r\n <div class=\"row\">\r\n <button type=\"button\" class=\"btn rounded-pill btn-primary ms-3 me-2\" (click)=\"onSelectionAdd()\">{{'Add' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-primary rounded-pill\" (click)=\"onSelectionRemove()\">{{'Remove' | translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".main-container{display:flex;flex-direction:column}.edit-plan{display:flex;margin:8px 0}.form-range{width:100%}.scanTool{margin:0px 1rem}h2{color:var(--smarterplan-primary);padding:0}.protip{color:gray;padding:0}.tool-label{font-size:1rem}.selectZone{background-color:gray;border-radius:1rem;overflow:hidden}.edit-selected{display:flex;flex-direction:column}.col-form-label{margin-bottom:1rem}.btn-outline-primary{min-width:200px;margin-bottom:1rem;margin-right:1rem}.new-type-input{margin-bottom:1rem}.new-type-text{margin-bottom:.5rem}.row{margin:0}\n"], components: [{ type: CarouselComponent, selector: "lib-carousel", inputs: ["images"], outputs: ["currentScan"] }, { type: SelectionComponent, selector: "lib-selection", outputs: ["onSelectionChanged"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "translate": i3.TranslatePipe, "slice": i5.SlicePipe } });
2250
2287
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AddZoneComponent, decorators: [{
2251
2288
  type: Component,
2252
- args: [{ selector: 'lib-add-zone', template: "<div class=\"row\" *ngIf=\"zoneForm\">\r\n <div class=\"col-7\">\r\n <form (ngSubmit)=\"onSubmitZone()\" [formGroup]=\"zoneForm\">\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Name' | translate}} *</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" [class.is-invalid]=\"name.invalid && isSubmitted\" required\r\n formControlName=\"name\">\r\n <div class=\"invalid-feedback\">\r\n {{'A name is required' | translate}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!isMuseumVisit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Type of zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"layerID\">\r\n <option value=\"null\" selected disabled hidden> {{ zoneEdit && zoneEdit.layer ?\r\n zoneEdit.layer.name : 'Choose type'}}</option>\r\n <option *ngFor=\"let layer of layers\" [value]=\"layer.id\">\r\n {{ layer.name }}\r\n </option>\r\n </select>\r\n <p class=\"mt-1 new-type-text\">{{'or add new type of zone' | translate }}</p>\r\n <input type=\"text\" class=\"form-control new-type-input\" formControlName=\"newLayer\">\r\n </div>\r\n </div>\r\n <!--If Editing Zone possibility to assign it to museum itinerary-->\r\n <div class=\"mb-3 row\" *ngIf=\"zoneEdit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{ 'Museum Itinerary' | translate }}</label>\r\n <div class=\"col-sm-10\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"isMuseumVisit\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Surface' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" formControlName=\"surface\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Parent zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"parentID\">\r\n <option *ngFor=\"let zone of parentZones\" [ngValue]=\"zone.id\">\r\n {{ zone.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" style=\"max-height: 200px; overflow: auto;\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Scan Points' | translate}}</label>\r\n <!-- <p class=\"col-sm-2\" *ngIf=\"zoneEdit\">{{ zoneEdit.sweepIDs.length }} scans</p> -->\r\n <p class=\"col\" *ngIf=\"chosenScansOnPlan.length === 0 && chosenScans.length === 0\">\r\n {{'No scan points chosen' | translate}}</p>\r\n <div class=\"col-sm-5\" *ngIf=\"chosenScansOnPlan && chosenScansOnPlan.length > 0\">\r\n <p>{{ chosenScansOnPlan.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScansOnPlan\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ scan | slice:0:8 }}</p>\r\n <div (click)=\"onRemoveScanPlan(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-5\" *ngIf=\"carouselIsVisible && chosenScans && chosenScans.length > 0\">\r\n <p>{{ chosenScans.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScans\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ images360[scan].filename }}</p>\r\n <div (click)=\"onRemoveScanImage(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" [disabled]=\"!plans\"\r\n (click)=\"togglePlan()\">{{'Choose scan points on plan' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"toggleCarousel()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Choose scan points from gallery' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddAll()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Add all scans of this space' | translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3 col-form-label\">{{'No visible scan points' | translate}}</label>\r\n <div class=\"col-sm-3\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"noScanPoints\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"carouselIsVisible\" class=\"mb-2\">\r\n <lib-carousel *ngIf=\"images360 && images360.length > 0\" [images]=\"images360\"\r\n (currentScan)=\"currentScanShowing=$event\"></lib-carousel>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2 mt-3\"\r\n (click)=\"onAddScan()\">{{'Add to zone' | translate}}</button>\r\n </div>\r\n <div ngbDropdown class=\"row d-inline-block me-3\" *ngIf=\"fromPlan\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\"\r\n ngbDropdownToggle>{{chosenPlan ?\r\n chosenPlan.name : ('Choose Plan' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button type=\"button\" ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\"\r\n [disabled]=\"!plan.calibration\">{{ plan.name }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-1\" *ngIf=\"fromPlan\">\r\n <lib-selection class=\"col-md-8\" (onSelectionChanged)=\"onSelectionChanged($event)\">\r\n <div class=\"selectZone\" oncontextmenu=\"return false;\">\r\n <div class=\"row\">\r\n <div style=\"overflow: hidden;width:100%;\">\r\n <div style=\"height: 400px; width: 100%;\" id=\"planDiv\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </lib-selection>\r\n\r\n <div class=\"col-md-4 scanTool\" *ngIf=\"buttonElements.length > 0\">\r\n <div class=\"row mb-5 d-inline-block\">\r\n <h2>Selection tool</h2>\r\n <div class=\"protip\">Hold right click and move your cursor to select multiple scans.</div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <div class=\"col-3\" style=\"padding:0px\">\r\n <label class=\"tool-label\" for=\"scanSize\">Scan size</label>\r\n </div>\r\n <div class=\"col-9\">\r\n <input type=\"range\" class=\"form-range\" min=\"0.001\" max=\"5\" step=\"0.01\" value=\"1\"\r\n id=\"scanSize\" (input)=\"onChangeScanSize($event)\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onSelectAll()\">Select all scans</button>\r\n </div>\r\n\r\n <div *ngIf=\"buttonsInSelection.length > 0\" class=\"row editSelected\">\r\n <span class=\"tool-label\">Edit selected scans : </span>\r\n <button type=\"button\" class=\"btn btn-primary ms-3 me-2\" (click)=\"onSelectionAdd()\">Add</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onSelectionRemove()\">Remove</button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\">\r\n <button type=\"submit\" class=\"btn btn-outline-primary rounded-pill me-2\">{{'Save' | translate}}</button>\r\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-outline-primary rounded-pill me-2\">\r\n {{'Cancel' | translate}}</button>\r\n </div>\r\n </form>\r\n </div>\r\n</div>", styles: [".form-range{width:100%}.scanTool{padding-left:50px;padding-right:50px}h2{color:var(--smarterplan-primary)}.protip{color:gray}.tool-label{font-size:1.3rem}.selectZone{background-color:gray;border-radius:1rem;overflow:hidden}.col-form-label{margin-bottom:1rem}.btn-outline-primary{min-width:200px;margin-bottom:1rem;margin-right:1rem}.new-type-input{margin-bottom:1rem}.new-type-text{margin-bottom:.5rem}\n"] }]
2289
+ args: [{ selector: 'lib-add-zone', template: "<div class=\"main-container\" *ngIf=\"zoneForm\">\r\n <div class=\"col-7\">\r\n <form (ngSubmit)=\"onSubmitZone()\" [formGroup]=\"zoneForm\">\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Name' | translate}} *</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" required formControlName=\"name\">\r\n <!-- <div class=\"invalid-feedback\">\r\n {{'A name is required' | translate}}\r\n </div> -->\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!isMuseumVisit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Type of zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"layerID\">\r\n <option value=\"null\" selected disabled hidden> {{ zoneEdit && zoneEdit.layer ?\r\n zoneEdit.layer.name : 'Choose type'}}</option>\r\n <option *ngFor=\"let layer of layers\" [value]=\"layer.id\">\r\n {{ layer.name }}\r\n </option>\r\n </select>\r\n <p class=\"mt-1 new-type-text\">{{'or add new type of zone' | translate }}</p>\r\n <input type=\"text\" class=\"form-control new-type-input\" formControlName=\"newLayer\">\r\n </div>\r\n </div>\r\n <!--If Editing Zone possibility to assign it to museum itinerary-->\r\n <div class=\"mb-3 row\" *ngIf=\"zoneEdit && !zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{ 'Museum Itinerary' | translate }}</label>\r\n <div class=\"col-sm-10\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"isMuseumVisit\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{ 'Multiple Floors' | translate }}</label>\r\n <div class=\"col-sm-10\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"multipleFloors\" \r\n (change)=\"onChangeMultipleFloors()\" [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Surface' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" class=\"form-control\" formControlName=\"surface\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Parent zone' | translate}}</label>\r\n <div class=\"col-sm-10\">\r\n <select class=\"form-control\" formControlName=\"parentID\">\r\n <option *ngFor=\"let zone of parentZones\" [ngValue]=\"zone.id\">\r\n {{ zone.name }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mb-3 row\" style=\"max-height: 200px; overflow: auto;\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <label class=\"col-sm-2 col-form-label\">{{'Scan Points' | translate}}</label>\r\n <!-- <p class=\"col-sm-2\" *ngIf=\"zoneEdit\">{{ zoneEdit.sweepIDs.length }} scans</p> -->\r\n <p class=\"col\" *ngIf=\"chosenScansOnPlan.length === 0 && chosenScans.length === 0\">\r\n {{'No scan points chosen' | translate}}</p>\r\n <div class=\"col-sm-5\" *ngIf=\"chosenScansOnPlan && chosenScansOnPlan.length > 0\">\r\n <p>{{ chosenScansOnPlan.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScansOnPlan\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ scan | slice:0:8 }}</p>\r\n <div (click)=\"onRemoveScanPlan(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-5\" *ngIf=\"carouselIsVisible && chosenScans && chosenScans.length > 0\">\r\n <p>{{ chosenScans.length }} {{'scan points chosen' | translate}}</p>\r\n <div *ngFor=\"let scan of chosenScans\">\r\n <div class=\"row\">\r\n <p class=\"me-2\">{{ images360[scan].filename }}</p>\r\n <div (click)=\"onRemoveScanImage(scan)\" [style.cursor]=\"'pointer'\">\r\n <span class=\"iconify\" data-icon=\"mdi:trash-can-outline\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-3 mt-3\" *ngIf=\"!zoneIsMatterportFloor\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" [disabled]=\"!plans\"\r\n (click)=\"togglePlan()\">{{'Choose scan points on plan' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"toggleCarousel()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Choose scan points from gallery' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddAll()\"\r\n [disabled]=\"fromPlan || !images360 ||images360.length === 0\">\r\n {{'Add all scans of this space' | translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"mb-3 row\">\r\n <label class=\"col-sm-3 col-form-label\">{{'No visible scan points' | translate}}</label>\r\n <div class=\"col-sm-3\">\r\n <input class=\"checkbox-apply mt-3\" type=\"checkbox\" [(ngModel)]=\"noScanPoints\"\r\n [ngModelOptions]=\"{standalone: true}\">\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"carouselIsVisible\" class=\"mb-2\">\r\n <lib-carousel *ngIf=\"images360 && images360.length > 0\" [images]=\"images360\"\r\n (currentScan)=\"currentScanShowing=$event\"></lib-carousel>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2 mt-3\"\r\n (click)=\"onAddScan()\">{{'Add to zone' | translate}}</button>\r\n </div>\r\n <div ngbDropdown class=\"row d-inline-block me-3\" *ngIf=\"fromPlan\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-label-file rounded-pill\" id=\"dropdownBasic1\"\r\n ngbDropdownToggle>{{chosenPlan ?\r\n chosenPlan.name : ('Choose Plan' | translate) }}</button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button type=\"button\" ngbDropdownItem *ngFor=\"let plan of plans\" (click)=\"onPlanClick(plan)\"\r\n [disabled]=\"!plan.calibration\">{{ plan.name }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n\r\n <div class=\"mt-3\">\r\n <button type=\"submit\" class=\"btn btn-outline-primary rounded-pill me-2\">{{'Save' | translate}}</button>\r\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-outline-primary rounded-pill me-2\">\r\n {{'Cancel' | translate}}</button>\r\n </div>\r\n </form>\r\n </div>\r\n <div class=\"edit-plan\" *ngIf=\"fromPlan\">\r\n <lib-selection class=\"col-md-8\" (onSelectionChanged)=\"onSelectionChanged($event)\">\r\n <div class=\"selectZone\" oncontextmenu=\"return false;\">\r\n <div class=\"row\">\r\n <div style=\"overflow: hidden;width:100%;\">\r\n <div style=\"height: 400px; width: 100%;\" id=\"planDiv\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </lib-selection>\r\n\r\n <div class=\"col-md-4 scanTool\" *ngIf=\"buttonElements.length > 0\">\r\n <div class=\"row mb-4 d-inline-block\">\r\n <h2>{{'selectTool.title' | translate}}</h2>\r\n <div class=\"protip\">{{'selectTool.tip' | translate}}.</div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <div class=\"col-3\" style=\"padding:0px\">\r\n <label class=\"tool-label\" for=\"scanSize\">{{'selectTool.size' | translate}}</label>\r\n </div>\r\n <div class=\"col-9\">\r\n <input type=\"range\" class=\"form-range\" min=\"0.001\" max=\"5\" step=\"0.01\" value=\"1\"\r\n id=\"scanSize\" (input)=\"onChangeScanSize($event)\">\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-4\">\r\n <button type=\"button\" class=\"btn btn-primary rounded-pill\" (click)=\"onSelectAll()\">{{'selectTool.selectAll' | translate}}</button>\r\n </div>\r\n\r\n <div *ngIf=\"buttonsInSelection.length > 0\" class=\"edit-selected\">\r\n <span class=\"tool-label\">{{'selectTool.edit' | translate}} : </span>\r\n <div class=\"row\">\r\n <button type=\"button\" class=\"btn rounded-pill btn-primary ms-3 me-2\" (click)=\"onSelectionAdd()\">{{'Add' | translate}}</button>\r\n <button type=\"button\" class=\"btn btn-primary rounded-pill\" (click)=\"onSelectionRemove()\">{{'Remove' | translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".main-container{display:flex;flex-direction:column}.edit-plan{display:flex;margin:8px 0}.form-range{width:100%}.scanTool{margin:0px 1rem}h2{color:var(--smarterplan-primary);padding:0}.protip{color:gray;padding:0}.tool-label{font-size:1rem}.selectZone{background-color:gray;border-radius:1rem;overflow:hidden}.edit-selected{display:flex;flex-direction:column}.col-form-label{margin-bottom:1rem}.btn-outline-primary{min-width:200px;margin-bottom:1rem;margin-right:1rem}.new-type-input{margin-bottom:1rem}.new-type-text{margin-bottom:.5rem}.row{margin:0}\n"] }]
2253
2290
  }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: i2.ZoneService }, { type: i2.LayerService }, { type: i2.BaseUserService }, { type: i2.NavigationService }, { type: i2.PlanService }]; }, propDecorators: { zoneEdit: [{
2254
2291
  type: Input
2255
2292
  }], spaceID: [{
@@ -2363,6 +2400,7 @@ class ZonesComponent {
2363
2400
  async onToggleDetail(index, zone) {
2364
2401
  this.lotIndexDetails = index === this.lotIndexDetails ? -1 : index;
2365
2402
  if (this.lotIndexDetails === -1) {
2403
+ this.currentZone = null;
2366
2404
  return;
2367
2405
  }
2368
2406
  this.currentZone = zone;
@@ -2380,6 +2418,7 @@ class ZonesComponent {
2380
2418
  this.defaultShowing = false;
2381
2419
  this.floorDetails = index === this.floorDetails ? -1 : index;
2382
2420
  if (this.floorDetails === -1) {
2421
+ this.currentZone = null;
2383
2422
  return;
2384
2423
  }
2385
2424
  this.currentZone = floor;
@@ -2433,15 +2472,17 @@ class ZonesComponent {
2433
2472
  label: "New Museum Itinerary",
2434
2473
  });
2435
2474
  }
2436
- async onDelete(zone, floorID) {
2475
+ async onDelete(zone) {
2437
2476
  const message = this.translate.instant("confirm.deleteZone");
2438
2477
  // eslint-disable-next-line no-alert
2439
2478
  if (window.confirm(message)) {
2440
2479
  await this.zoneService.deleteZone(zone.id);
2441
2480
  this.allZones.splice(this.allZones.indexOf(zone), 1);
2442
- const floorZones = this.zonesMap.get(floorID);
2443
- floorZones.splice(floorZones.indexOf(zone), 1);
2444
- this.zonesMap.set(floorID, floorZones);
2481
+ if (zone.parentID && Array.from(this.zonesMap.keys()).includes(zone.parentID)) {
2482
+ const zonesForParent = this.zonesMap.get(zone.parentID);
2483
+ zonesForParent.splice(zonesForParent.indexOf(zone), 1);
2484
+ this.zonesMap.set(zone.parentID, zonesForParent);
2485
+ }
2445
2486
  }
2446
2487
  }
2447
2488
  editCompleted(event) {
@@ -2467,10 +2508,10 @@ class ZonesComponent {
2467
2508
  }
2468
2509
  }
2469
2510
  ZonesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ZonesComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.ZoneService }, { token: i2.SpaceService }, { token: i2.VisitService }, { token: i2.NavigationService }, { token: i2.BaseUserService }, { token: i2.PlanService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
2470
- ZonesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ZonesComponent, selector: "lib-zones", outputs: { updatedZone: "updatedZone" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <ul class=\"list-group list-group-flush\" *ngIf=\"!isEditingZone\">\r\n <li class=\"list-group-item default-zone-line-item\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\" *ngIf=\"defaultZone\">\r\n {{defaultZone.name}}\r\n <div class=\"default-zone-label\">{{ \"whole space\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"defaultShowing\" (click)=\"onToggleDefaultZone()\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"defaultShowing\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{currentZone.layer ?\r\n currentZone.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"currentZone.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{currentZone.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!currentZone.virtual\">{{'Scan Points' | translate}}:\r\n {{currentZone.sweepIDs ? currentZone.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n </ul>\r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == defaultZone.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">{{'Surface' | translate}},\r\n m<sup>2</sup>:\r\n {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">{{'Zone not visible in 3D visit'\r\n |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <!-- <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot, floor.id)\">{{'Delete'\r\n | translate}}</button> -->\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n \r\n <li class=\"list-group-item\" *ngFor=\"let floor of floorZones; index as index\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{floor.name}}\r\n <!-- <small>({{ lot.metadata ? ('Calibrated' | translate) : ('Not calibrated' | translate)}})</small> -->\r\n <div class=\"museum-label\" *ngIf=\"floor.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"index==floorDetails\" (click)=\"onToggleDetailFloor(index, floor)\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"index==floorDetails\"> \r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{floor.layer ?\r\n floor.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{floor.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!floor.virtual\">{{'Scan Points' | translate}}:\r\n {{floor.sweepIDs ? floor.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.virtual\">{{'Zone not visible in 3D visit' |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onEdit(floor)\">{{'Edit' |\r\n translate}}</button>\r\n \r\n <!-- List of children zones -->\r\n \r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == floor.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">{{'Surface' | translate}},\r\n m<sup>2</sup>:\r\n {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">{{'Zone not visible in 3D visit'\r\n |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot, floor.id)\">{{'Delete'\r\n | translate}}</button>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n <div *ngIf=\"!isEditingZone\">\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddLot()\">{{'Add zone' |\r\n translate}}</button>\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddMuseumZone()\"\r\n *ngIf=\"isGuide || isAdmin\">\r\n {{'Add museum itinerary' | translate}}</button>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"!isEditingZone\">\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loadingPlan\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n <div class=\"row\" style=\"overflow: hidden;\" *ngIf=\"currentZone\">\r\n <div class=\"mt-3 ms-3\" style=\"height: 500px; width: 100%;\" id=\"planDiv\" *ngIf=\"currentPlan\"></div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"!currentPlan && plans && !currentZone.virtual && !loadingPlan\">\r\n {{ 'Plan is not calibrated' | translate}}\r\n </div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"currentZone && currentZone.virtual\">\r\n {{ 'No scan points chosen' | translate}}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEditingZone\">\r\n <lib-add-zone [zoneEdit]=\"zoneForEdit\" [spaceID]=\"spaceID\" [images360]=\"images360\" [navigationIDs]=\"navigations\"\r\n [zones]=\"allZones\" [defaultZone]=\"defaultZone\" (updatedZone)=\"editCompleted($event)\" [isMuseumVisit]=\"isMuseumVisit\"></lib-add-zone>\r\n </div>\r\n </div>\r\n", styles: [".museum-label{background-color:#6f3974;font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}.default-zone-line-item{border-bottom-width:3px}.default-zone-label{background-color:var(--smarterplan-primary);font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}\n"], components: [{ type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: ["menuItems"], outputs: ["onGoBack"] }, { type: ChevronComponent, selector: "lib-chevron", inputs: ["conditionShowing"] }, { type: AddZoneComponent, selector: "lib-add-zone", inputs: ["zoneEdit", "spaceID", "images360", "navigationIDs", "zones", "newZoneData", "chosenPlan", "isMuseumVisit", "defaultZone"], outputs: ["updatedZone"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3.TranslatePipe, "keyvalue": i5.KeyValuePipe } });
2511
+ ZonesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ZonesComponent, selector: "lib-zones", outputs: { updatedZone: "updatedZone" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <ul class=\"list-group list-group-flush\" *ngIf=\"!isEditingZone\">\r\n <li class=\"list-group-item default-zone-line-item\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\" *ngIf=\"defaultZone\">\r\n {{defaultZone.name}}\r\n <div class=\"default-zone-label\">{{ \"whole space\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"defaultShowing\" (click)=\"onToggleDefaultZone()\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"defaultShowing\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{currentZone.layer ?\r\n currentZone.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"currentZone.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{currentZone.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!currentZone.virtual\">{{'Scan Points' | translate}}:\r\n {{currentZone.sweepIDs ? currentZone.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n </ul>\r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == defaultZone.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">\r\n {{'Surface' | translate}},m<sup>2</sup>: {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">\r\n {{'Zone not visible in 3D visit' | translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot)\">{{'Delete' | translate}}</button>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n \r\n <li class=\"list-group-item\" *ngFor=\"let floor of floorZones; index as index\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{floor.name}}\r\n <!-- <small>({{ lot.metadata ? ('Calibrated' | translate) : ('Not calibrated' | translate)}})</small> -->\r\n <div class=\"museum-label\" *ngIf=\"floor.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"index==floorDetails\" (click)=\"onToggleDetailFloor(index, floor)\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"index==floorDetails\"> \r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{floor.layer ?\r\n floor.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{floor.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!floor.virtual\">{{'Scan Points' | translate}}:\r\n {{floor.sweepIDs ? floor.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.virtual\">{{'Zone not visible in 3D visit' |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onEdit(floor)\">{{'Edit' |\r\n translate}}</button>\r\n \r\n <!-- List of children zones -->\r\n \r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == floor.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">{{'Surface' | translate}},\r\n m<sup>2</sup>:\r\n {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">{{'Zone not visible in 3D visit'\r\n |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot)\">{{'Delete' | translate}}</button>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n <div *ngIf=\"!isEditingZone\">\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddLot()\">{{'Add zone' |\r\n translate}}</button>\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddMuseumZone()\"\r\n *ngIf=\"isGuide || isAdmin\">\r\n {{'Add museum itinerary' | translate}}</button>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"!isEditingZone\">\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loadingPlan\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n <div class=\"row\" style=\"overflow: hidden;\" *ngIf=\"currentZone\">\r\n <div class=\"mt-3 ms-3\" style=\"height: 500px; width: 100%;\" id=\"planDiv\" *ngIf=\"currentPlan\"></div>\r\n <div *ngIf=\"!currentPlan && plans && !loadingPlan\">\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"!currentZone.virtual && !currentZone.isMultipleFloorZone\">\r\n {{ 'Plan is not calibrated' | translate}}\r\n </div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"currentZone.virtual\">\r\n {{ 'No scan points chosen' | translate}}\r\n </div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"currentZone.isMultipleFloorZone\">\r\n {{ 'The zone is on several floors' | translate}}\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEditingZone\">\r\n <lib-add-zone [zoneEdit]=\"zoneForEdit\" [spaceID]=\"spaceID\" [images360]=\"images360\" [navigationIDs]=\"navigations\"\r\n [zones]=\"allZones\" [defaultZone]=\"defaultZone\" (updatedZone)=\"editCompleted($event)\" [isMuseumVisit]=\"isMuseumVisit\"></lib-add-zone>\r\n </div>\r\n </div>\r\n", styles: [".museum-label{background-color:#6f3974;font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}.default-zone-line-item{border-bottom-width:3px}.default-zone-label{background-color:var(--smarterplan-primary);font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}\n"], components: [{ type: TabNavigationComponent, selector: "lib-tab-navigation", inputs: ["menuItems"], outputs: ["onGoBack"] }, { type: ChevronComponent, selector: "lib-chevron", inputs: ["conditionShowing"] }, { type: AddZoneComponent, selector: "lib-add-zone", inputs: ["zoneEdit", "spaceID", "images360", "navigationIDs", "zones", "newZoneData", "chosenPlan", "isMuseumVisit", "defaultZone"], outputs: ["updatedZone"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3.TranslatePipe, "keyvalue": i5.KeyValuePipe } });
2471
2512
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ZonesComponent, decorators: [{
2472
2513
  type: Component,
2473
- args: [{ selector: 'lib-zones', template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <ul class=\"list-group list-group-flush\" *ngIf=\"!isEditingZone\">\r\n <li class=\"list-group-item default-zone-line-item\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\" *ngIf=\"defaultZone\">\r\n {{defaultZone.name}}\r\n <div class=\"default-zone-label\">{{ \"whole space\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"defaultShowing\" (click)=\"onToggleDefaultZone()\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"defaultShowing\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{currentZone.layer ?\r\n currentZone.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"currentZone.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{currentZone.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!currentZone.virtual\">{{'Scan Points' | translate}}:\r\n {{currentZone.sweepIDs ? currentZone.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n </ul>\r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == defaultZone.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">{{'Surface' | translate}},\r\n m<sup>2</sup>:\r\n {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">{{'Zone not visible in 3D visit'\r\n |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <!-- <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot, floor.id)\">{{'Delete'\r\n | translate}}</button> -->\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n \r\n <li class=\"list-group-item\" *ngFor=\"let floor of floorZones; index as index\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{floor.name}}\r\n <!-- <small>({{ lot.metadata ? ('Calibrated' | translate) : ('Not calibrated' | translate)}})</small> -->\r\n <div class=\"museum-label\" *ngIf=\"floor.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"index==floorDetails\" (click)=\"onToggleDetailFloor(index, floor)\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"index==floorDetails\"> \r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{floor.layer ?\r\n floor.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{floor.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!floor.virtual\">{{'Scan Points' | translate}}:\r\n {{floor.sweepIDs ? floor.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.virtual\">{{'Zone not visible in 3D visit' |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onEdit(floor)\">{{'Edit' |\r\n translate}}</button>\r\n \r\n <!-- List of children zones -->\r\n \r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == floor.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">{{'Surface' | translate}},\r\n m<sup>2</sup>:\r\n {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">{{'Zone not visible in 3D visit'\r\n |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot, floor.id)\">{{'Delete'\r\n | translate}}</button>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n <div *ngIf=\"!isEditingZone\">\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddLot()\">{{'Add zone' |\r\n translate}}</button>\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddMuseumZone()\"\r\n *ngIf=\"isGuide || isAdmin\">\r\n {{'Add museum itinerary' | translate}}</button>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"!isEditingZone\">\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loadingPlan\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n <div class=\"row\" style=\"overflow: hidden;\" *ngIf=\"currentZone\">\r\n <div class=\"mt-3 ms-3\" style=\"height: 500px; width: 100%;\" id=\"planDiv\" *ngIf=\"currentPlan\"></div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"!currentPlan && plans && !currentZone.virtual && !loadingPlan\">\r\n {{ 'Plan is not calibrated' | translate}}\r\n </div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"currentZone && currentZone.virtual\">\r\n {{ 'No scan points chosen' | translate}}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEditingZone\">\r\n <lib-add-zone [zoneEdit]=\"zoneForEdit\" [spaceID]=\"spaceID\" [images360]=\"images360\" [navigationIDs]=\"navigations\"\r\n [zones]=\"allZones\" [defaultZone]=\"defaultZone\" (updatedZone)=\"editCompleted($event)\" [isMuseumVisit]=\"isMuseumVisit\"></lib-add-zone>\r\n </div>\r\n </div>\r\n", styles: [".museum-label{background-color:#6f3974;font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}.default-zone-line-item{border-bottom-width:3px}.default-zone-label{background-color:var(--smarterplan-primary);font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}\n"] }]
2514
+ args: [{ selector: 'lib-zones', template: "<div class=\"container-fluid\" *ngIf=\"currentSpace\">\r\n <div class=\"m-3\">\r\n <lib-tab-navigation [menuItems]='menuItems' (onGoBack)=\"onGoBack()\"></lib-tab-navigation>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <ul class=\"list-group list-group-flush\" *ngIf=\"!isEditingZone\">\r\n <li class=\"list-group-item default-zone-line-item\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\" *ngIf=\"defaultZone\">\r\n {{defaultZone.name}}\r\n <div class=\"default-zone-label\">{{ \"whole space\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"defaultShowing\" (click)=\"onToggleDefaultZone()\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"defaultShowing\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{currentZone.layer ?\r\n currentZone.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"currentZone.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{currentZone.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!currentZone.virtual\">{{'Scan Points' | translate}}:\r\n {{currentZone.sweepIDs ? currentZone.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n </ul>\r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == defaultZone.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">\r\n {{'Surface' | translate}},m<sup>2</sup>: {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">\r\n {{'Zone not visible in 3D visit' | translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot)\">{{'Delete' | translate}}</button>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n \r\n <li class=\"list-group-item\" *ngFor=\"let floor of floorZones; index as index\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{floor.name}}\r\n <!-- <small>({{ lot.metadata ? ('Calibrated' | translate) : ('Not calibrated' | translate)}})</small> -->\r\n <div class=\"museum-label\" *ngIf=\"floor.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"index==floorDetails\" (click)=\"onToggleDetailFloor(index, floor)\"></lib-chevron>\r\n </div>\r\n <div *ngIf=\"index==floorDetails\"> \r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\">{{'Type of zone' | translate}}: {{floor.layer ?\r\n floor.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.surface\">{{'Surface' | translate}}, m<sup>2</sup>:\r\n {{floor.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!floor.virtual\">{{'Scan Points' | translate}}:\r\n {{floor.sweepIDs ? floor.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"floor.virtual\">{{'Zone not visible in 3D visit' |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onEdit(floor)\">{{'Edit' |\r\n translate}}</button>\r\n \r\n <!-- List of children zones -->\r\n \r\n <div *ngFor=\"let pair of zonesMap | keyvalue\">\r\n <div *ngIf=\"pair.key == floor.id\">\r\n <h5 style=\"margin: 8px;\" *ngIf=\"pair.value.length > 0\">{{'Children zones'|translate}}</h5>\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-flush list-group-item-action\"\r\n *ngFor=\"let lot of pair.value; index as zoneIndex\">\r\n <div class=\"d-flex justify-content-between align-items-center zone-name\">\r\n {{lot.name}}\r\n <div class=\"museum-label\" *ngIf=\"lot.isMuseumVisitZone\">{{ \"itinerary\" | translate }}</div>\r\n <lib-chevron [conditionShowing]=\"zoneIndex==lotIndexDetails\" (click)=\"onToggleDetail(zoneIndex, lot)\"></lib-chevron>\r\n \r\n </div>\r\n <div *ngIf=\"zoneIndex==lotIndexDetails\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.isMuseumVisitZone\">{{'Type of zone' |\r\n translate}}: {{lot.layer ? lot.layer.name :\r\n \"No type\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.surface\">{{'Surface' | translate}},\r\n m<sup>2</sup>:\r\n {{lot.surface }}\r\n </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"!lot.virtual\">{{'Scan Points' | translate}}:\r\n {{lot.sweepIDs ? lot.sweepIDs.length : \"No scan points\" | translate}} </li>\r\n <li class=\"list-group-item bg-transparent\" *ngIf=\"lot.virtual\">{{'Zone not visible in 3D visit'\r\n |\r\n translate}}</li>\r\n </ul>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill me-2\"\r\n (click)=\"onEdit(lot)\">{{'Edit' |\r\n translate}}</button>\r\n <button type=\"button\" class=\"btn btn-outline-primary rounded-pill\"\r\n (click)=\"onDelete(lot)\">{{'Delete' | translate}}</button>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ul>\r\n \r\n <div *ngIf=\"!isEditingZone\">\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddLot()\">{{'Add zone' |\r\n translate}}</button>\r\n <button class=\"btn btn-outline-primary rounded-pill me-2\" (click)=\"onAddMuseumZone()\"\r\n *ngIf=\"isGuide || isAdmin\">\r\n {{'Add museum itinerary' | translate}}</button>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"!isEditingZone\">\r\n <div class=\"d-flex justify-content-center\" *ngIf=\"loadingPlan\">\r\n <div class=\"spinner-border\" role=\"status\">\r\n <span class=\"visually-hidden\">Loading...</span>\r\n </div>\r\n </div>\r\n <div class=\"row\" style=\"overflow: hidden;\" *ngIf=\"currentZone\">\r\n <div class=\"mt-3 ms-3\" style=\"height: 500px; width: 100%;\" id=\"planDiv\" *ngIf=\"currentPlan\"></div>\r\n <div *ngIf=\"!currentPlan && plans && !loadingPlan\">\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"!currentZone.virtual && !currentZone.isMultipleFloorZone\">\r\n {{ 'Plan is not calibrated' | translate}}\r\n </div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"currentZone.virtual\">\r\n {{ 'No scan points chosen' | translate}}\r\n </div>\r\n <div class=\"mt-3 ms-3\" id=\"no-plan\" *ngIf=\"currentZone.isMultipleFloorZone\">\r\n {{ 'The zone is on several floors' | translate}}\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEditingZone\">\r\n <lib-add-zone [zoneEdit]=\"zoneForEdit\" [spaceID]=\"spaceID\" [images360]=\"images360\" [navigationIDs]=\"navigations\"\r\n [zones]=\"allZones\" [defaultZone]=\"defaultZone\" (updatedZone)=\"editCompleted($event)\" [isMuseumVisit]=\"isMuseumVisit\"></lib-add-zone>\r\n </div>\r\n </div>\r\n", styles: [".museum-label{background-color:#6f3974;font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}.default-zone-line-item{border-bottom-width:3px}.default-zone-label{background-color:var(--smarterplan-primary);font-size:.95rem;border-radius:10px;padding:5px 10px;color:#fff;text-transform:uppercase;margin-left:auto;margin-right:8px}\n"] }]
2474
2515
  }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.ZoneService }, { type: i2.SpaceService }, { type: i2.VisitService }, { type: i2.NavigationService }, { type: i2.BaseUserService }, { type: i2.PlanService }, { type: i3.TranslateService }]; }, propDecorators: { updatedZone: [{
2475
2516
  type: Output
2476
2517
  }] } });