@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.
- package/esm2020/lib/components/detail-location/detail-location.component.mjs +3 -3
- package/esm2020/lib/components/form-location/form-location.component.mjs +3 -3
- package/esm2020/lib/components/images/images.component.mjs +3 -3
- package/esm2020/lib/components/locations/locations.component.mjs +3 -3
- package/esm2020/lib/components/locations/map/map-popup/map-popup.component.mjs +1 -1
- package/esm2020/lib/components/locations/map/map.component.mjs +1 -1
- package/esm2020/lib/components/plans/calibration/calibration.component.mjs +3 -3
- package/esm2020/lib/components/plans/edit-plan/edit-plan.component.mjs +3 -3
- package/esm2020/lib/components/plans/plans.component.mjs +3 -3
- package/esm2020/lib/components/tab-navigation/tab-navigation.component.mjs +1 -1
- package/esm2020/lib/components/visits/visits.component.mjs +3 -3
- package/esm2020/lib/components/zones/add-zone/add-zone.component.mjs +52 -111
- package/esm2020/lib/components/zones/zones.component.mjs +13 -9
- package/esm2020/lib/helper.service.mjs +97 -2
- package/esm2020/lib/ngx-smarterplan-locations.module.mjs +2 -2
- package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs +157 -118
- package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs +157 -116
- package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
- package/lib/components/detail-location/detail-location.component.d.ts +1 -1
- package/lib/components/form-location/form-location.component.d.ts +1 -1
- package/lib/components/images/images.component.d.ts +1 -1
- package/lib/components/locations/locations.component.d.ts +1 -1
- package/lib/components/locations/map/map-popup/map-popup.component.d.ts +1 -1
- package/lib/components/locations/map/map.component.d.ts +1 -1
- package/lib/components/plans/calibration/calibration.component.d.ts +1 -1
- package/lib/components/plans/edit-plan/edit-plan.component.d.ts +1 -1
- package/lib/components/plans/plans.component.d.ts +1 -1
- package/lib/components/tab-navigation/tab-navigation.component.d.ts +1 -1
- package/lib/components/visits/visits.component.d.ts +1 -1
- package/lib/components/zones/add-zone/add-zone.component.d.ts +8 -30
- package/lib/components/zones/zones.component.d.ts +2 -2
- package/lib/helper.service.d.ts +39 -0
- package/lib/ngx-smarterplan-locations.module.d.ts +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
-
import { MenuItem, SpaceService, BaseUserService, NavigatorService, Space } from 'ngx-smarterplan-core';
|
|
5
|
+
import { MenuItem, SpaceService, BaseUserService, NavigatorService, Space } from '@smarterplan/ngx-smarterplan-core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DetailLocationComponent implements OnInit {
|
|
8
8
|
private route;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup, FormBuilder, AbstractControl } from '@angular/forms';
|
|
3
|
-
import { Space, LevelStatus, SpaceService, PropertyService, BaseUserService, MissionService, Layer, LayerService } from 'ngx-smarterplan-core';
|
|
3
|
+
import { Space, LevelStatus, SpaceService, PropertyService, BaseUserService, MissionService, Layer, LayerService } from '@smarterplan/ngx-smarterplan-core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FormLocationComponent implements OnInit {
|
|
6
6
|
private spaceService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { Space, Visit, MenuItem, SpaceService, VisitService, NodeService } from 'ngx-smarterplan-core';
|
|
3
|
+
import { Space, Visit, MenuItem, SpaceService, VisitService, NodeService } from '@smarterplan/ngx-smarterplan-core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ImagesComponent implements OnInit {
|
|
6
6
|
private route;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
|
-
import { LevelStatus, Space, SpaceService, BaseUserService, ViewerService, NavigationService, NavigatorService, Visit, MenuItem, SearchObjectType } from 'ngx-smarterplan-core';
|
|
4
|
+
import { LevelStatus, Space, SpaceService, BaseUserService, ViewerService, NavigationService, NavigatorService, Visit, MenuItem, SearchObjectType } from '@smarterplan/ngx-smarterplan-core';
|
|
5
5
|
import { Subscription } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class LocationsComponent implements OnInit {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NgZone, OnInit } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { Marker } from 'leaflet';
|
|
4
|
-
import { Space, Visit } from 'ngx-smarterplan-core';
|
|
4
|
+
import { Space, Visit } from '@smarterplan/ngx-smarterplan-core';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class MapPopupComponent implements OnInit {
|
|
7
7
|
private router;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentFactoryResolver, Injector, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { Space } from 'ngx-smarterplan-core';
|
|
2
|
+
import { Space } from '@smarterplan/ngx-smarterplan-core';
|
|
3
3
|
import { Map, Marker } from "leaflet";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class MapComponent implements OnChanges {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import { Zone, MenuItem, Plan, Space, Navigation, PlanService, ZoneService, SpaceService, NavigationService, MatterportImportService } from 'ngx-smarterplan-core';
|
|
4
|
+
import { Zone, MenuItem, Plan, Space, Navigation, PlanService, ZoneService, SpaceService, NavigationService, MatterportImportService } from '@smarterplan/ngx-smarterplan-core';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class CalibrationComponent implements OnInit {
|
|
7
7
|
private matterportImportService;
|
|
@@ -2,7 +2,7 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
3
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
-
import { Zone, Plan, Space, MenuItem, PlanService, ZoneService, VisitService, SpaceService } from 'ngx-smarterplan-core';
|
|
5
|
+
import { Zone, Plan, Space, MenuItem, PlanService, ZoneService, VisitService, SpaceService } from '@smarterplan/ngx-smarterplan-core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class EditPlanComponent implements OnInit {
|
|
8
8
|
private planService;
|
|
@@ -2,7 +2,7 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
3
3
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
-
import { Zone, Space, Plan, MenuItem, SpaceService, PlanService } from 'ngx-smarterplan-core';
|
|
5
|
+
import { Zone, Space, Plan, MenuItem, SpaceService, PlanService } from '@smarterplan/ngx-smarterplan-core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class PlansComponent implements OnInit {
|
|
8
8
|
private route;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
|
-
import { MenuItem } from 'ngx-smarterplan-core';
|
|
3
|
+
import { MenuItem } from '@smarterplan/ngx-smarterplan-core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TabNavigationComponent {
|
|
6
6
|
private router;
|
|
@@ -2,7 +2,7 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormGroup, FormBuilder, AbstractControl } from '@angular/forms';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
5
|
-
import { Visit, MenuItem, MatterportImportService, CaptureService, NodeService, SpaceService, VisitService } from 'ngx-smarterplan-core';
|
|
5
|
+
import { Visit, MenuItem, MatterportImportService, CaptureService, NodeService, SpaceService, VisitService } from '@smarterplan/ngx-smarterplan-core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class VisitsComponent implements OnInit {
|
|
8
8
|
private fb;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup, FormBuilder, AbstractControl } from '@angular/forms';
|
|
3
|
-
import { Zone, Plan, Layer, Navigation, ZoneService, LayerService, BaseUserService, NavigationService, PlanService } from 'ngx-smarterplan-core';
|
|
3
|
+
import { Zone, Plan, Layer, Navigation, ZoneService, LayerService, BaseUserService, NavigationService, PlanService } from '@smarterplan/ngx-smarterplan-core';
|
|
4
4
|
import { PanZoom } from 'panzoom';
|
|
5
5
|
import { Rectangle } from '../../../helper.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -47,6 +47,7 @@ export declare class AddZoneComponent implements OnInit {
|
|
|
47
47
|
/** Scan buttons that are in the current selection */
|
|
48
48
|
buttonsInSelection: HTMLButtonElement[];
|
|
49
49
|
zoneIsMatterportFloor: boolean;
|
|
50
|
+
multipleFloors: boolean;
|
|
50
51
|
constructor(fb: FormBuilder, zoneService: ZoneService, layerService: LayerService, userService: BaseUserService, navigationService: NavigationService, planService: PlanService);
|
|
51
52
|
ngOnInit(): void;
|
|
52
53
|
ngOnChanges(): void;
|
|
@@ -71,10 +72,9 @@ export declare class AddZoneComponent implements OnInit {
|
|
|
71
72
|
* @param button
|
|
72
73
|
*/
|
|
73
74
|
onButtonScanClicked(button: HTMLElement): void;
|
|
74
|
-
styleButton(button: HTMLButtonElement, isAdded?: boolean): void;
|
|
75
|
-
buttonIsChosen(button: HTMLElement): boolean;
|
|
76
75
|
clearDivPlan(): void;
|
|
77
76
|
iniPlanForDraw(): void;
|
|
77
|
+
/** Function if we are coming for svg editor workflow */
|
|
78
78
|
setScanByDraw(navigations: any[]): Promise<void>;
|
|
79
79
|
setScanInRect(coeffX: number, coeffY: number, element: {
|
|
80
80
|
angle: any;
|
|
@@ -95,39 +95,12 @@ export declare class AddZoneComponent implements OnInit {
|
|
|
95
95
|
setScanInPolygon(coeffX: number, coeffY: number, element: {
|
|
96
96
|
segList: any;
|
|
97
97
|
}, navigations: any[]): Promise<void>;
|
|
98
|
-
isInPolygon(p: {
|
|
99
|
-
x: any;
|
|
100
|
-
y: any;
|
|
101
|
-
}, polygon: string | any[]): Promise<boolean>;
|
|
102
|
-
rotate(point: {
|
|
103
|
-
x: any;
|
|
104
|
-
y: any;
|
|
105
|
-
}, center: {
|
|
106
|
-
x: any;
|
|
107
|
-
y: any;
|
|
108
|
-
}, angle: number): {
|
|
109
|
-
x: number;
|
|
110
|
-
y: number;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Check if an HtmlElement is inside a selection
|
|
114
|
-
* @param button HTMLElement
|
|
115
|
-
* @param selection
|
|
116
|
-
* @returns true if the element is inside the selection, false otherwise
|
|
117
|
-
*/
|
|
118
|
-
buttonIsInSelection(button: HTMLButtonElement, selection: Rectangle): boolean;
|
|
119
98
|
/**
|
|
120
99
|
* Trigger each by the selectionComponent when selection change
|
|
121
100
|
* Update the current selected scan buttons
|
|
122
101
|
* @param selection new selection
|
|
123
102
|
*/
|
|
124
103
|
onSelectionChanged(selection: Rectangle): void;
|
|
125
|
-
/**
|
|
126
|
-
* Visually change the state of a scan button, a selected button is blue
|
|
127
|
-
* @param button
|
|
128
|
-
* @param selected if true the button will be blue, otherwise it will red or green
|
|
129
|
-
*/
|
|
130
|
-
setVisuallySelected(button: HTMLElement, selected: boolean): void;
|
|
131
104
|
/**
|
|
132
105
|
* Trigger when the user click to add the selected scans
|
|
133
106
|
*/
|
|
@@ -149,6 +122,11 @@ export declare class AddZoneComponent implements OnInit {
|
|
|
149
122
|
* Adds all sweeps of the space
|
|
150
123
|
*/
|
|
151
124
|
onAddAll(): void;
|
|
125
|
+
getDefaultZone(): Zone;
|
|
126
|
+
/**
|
|
127
|
+
* Multiple floors
|
|
128
|
+
*/
|
|
129
|
+
onChangeMultipleFloors(): void;
|
|
152
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddZoneComponent, never>;
|
|
153
131
|
static ɵcmp: i0.ɵɵComponentDeclaration<AddZoneComponent, "lib-add-zone", never, { "zoneEdit": "zoneEdit"; "spaceID": "spaceID"; "images360": "images360"; "navigationIDs": "navigationIDs"; "zones": "zones"; "newZoneData": "newZoneData"; "chosenPlan": "chosenPlan"; "isMuseumVisit": "isMuseumVisit"; "defaultZone": "defaultZone"; }, { "updatedZone": "updatedZone"; }, never, never>;
|
|
154
132
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import {
|
|
4
|
+
import { MenuItem, ZoneService, SpaceService, VisitService, NavigationService, BaseUserService, PlanService, Navigation, Plan, Space, Zone } from '@smarterplan/ngx-smarterplan-core';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class ZonesComponent implements OnInit {
|
|
7
7
|
private route;
|
|
@@ -58,7 +58,7 @@ export declare class ZonesComponent implements OnInit {
|
|
|
58
58
|
onEdit(zone: Zone): void;
|
|
59
59
|
onAddLot(): void;
|
|
60
60
|
onAddMuseumZone(): void;
|
|
61
|
-
onDelete(zone: Zone
|
|
61
|
+
onDelete(zone: Zone): Promise<void>;
|
|
62
62
|
editCompleted(event: any): void;
|
|
63
63
|
showScanPointsOnPlan(navigations: Navigation[]): Promise<void>;
|
|
64
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZonesComponent, never>;
|
package/lib/helper.service.d.ts
CHANGED
|
@@ -4,3 +4,42 @@ export declare type Rectangle = {
|
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
6
6
|
};
|
|
7
|
+
export declare function isInPolygon(p: {
|
|
8
|
+
x: any;
|
|
9
|
+
y: any;
|
|
10
|
+
}, polygon: string | any[]): boolean;
|
|
11
|
+
export declare function rotate(point: {
|
|
12
|
+
x: any;
|
|
13
|
+
y: any;
|
|
14
|
+
}, center: {
|
|
15
|
+
x: any;
|
|
16
|
+
y: any;
|
|
17
|
+
}, angle: number): {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if an HtmlElement is inside a selection
|
|
23
|
+
* @param button HTMLElement
|
|
24
|
+
* @param selection
|
|
25
|
+
* @returns true if the element is inside the selection, false otherwise
|
|
26
|
+
*/
|
|
27
|
+
export declare function buttonIsInSelection(button: HTMLButtonElement, selection: Rectangle): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Styles the button that represents a sweep on the plan: green-added to zone, red -not added
|
|
30
|
+
* @param button HTMLButtonElement, button on the plan,
|
|
31
|
+
* @param isAdded boolean, if the sweep added to the zone
|
|
32
|
+
*/
|
|
33
|
+
export declare function styleButton(button: HTMLButtonElement, isAdded?: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* Check if sweep (button) is chosen; it is reprsented by image style "mdi:adjust"
|
|
36
|
+
* @param button HTMLElement
|
|
37
|
+
* @returns boolean, if button was selected
|
|
38
|
+
*/
|
|
39
|
+
export declare function buttonIsChosen(button: HTMLElement): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Visually change the state of a scan button, a selected button is blue
|
|
42
|
+
* @param button HTMLElement
|
|
43
|
+
* @param selected if true the button will be blue, otherwise it will red or green
|
|
44
|
+
*/
|
|
45
|
+
export declare function setVisuallySelected(button: HTMLElement, selected: boolean): void;
|
|
@@ -22,7 +22,7 @@ import * as i20 from "@angular/common";
|
|
|
22
22
|
import * as i21 from "@ngx-translate/core";
|
|
23
23
|
import * as i22 from "@asymmetrik/ngx-leaflet";
|
|
24
24
|
import * as i23 from "@angular/forms";
|
|
25
|
-
import * as i24 from "ngx-smarterplan-core";
|
|
25
|
+
import * as i24 from "@smarterplan/ngx-smarterplan-core";
|
|
26
26
|
import * as i25 from "./ngx-smarterplan-location-routing.module";
|
|
27
27
|
export declare class NgxSmarterplanLocationsModule {
|
|
28
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSmarterplanLocationsModule, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smarterplan/ngx-smarterplan-locations",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^13.2.0",
|
|
6
6
|
"@angular/core": "^13.2.0",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@ngx-translate/core": "^14.0.0",
|
|
10
10
|
"leaflet": "^1.8.0",
|
|
11
11
|
"ngx-clipboard": "^15.1.0",
|
|
12
|
-
"ngx-smarterplan-core": "^0.
|
|
12
|
+
"@smarterplan/ngx-smarterplan-core": "^0.4.0",
|
|
13
13
|
"panzoom": "^9.4.2",
|
|
14
14
|
"ng2-pdf-viewer": "^9.0.0"
|
|
15
15
|
},
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"sideEffects": false
|
|
39
|
-
}
|
|
39
|
+
}
|