@smarterplan/ngx-smarterplan-locations 0.2.44 → 0.2.45

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 (152) hide show
  1. package/esm2020/lib/components/carousel/carousel.component.mjs +28 -0
  2. package/esm2020/lib/components/chevron/chevron.component.mjs +18 -0
  3. package/esm2020/lib/components/detail-location/detail-location.component.mjs +168 -0
  4. package/esm2020/lib/components/form-location/form-location.component.mjs +237 -0
  5. package/esm2020/lib/components/images/images.component.mjs +107 -0
  6. package/esm2020/lib/components/locations/locations.component.mjs +145 -0
  7. package/esm2020/lib/components/locations/map/map-popup/map-popup.component.mjs +66 -0
  8. package/esm2020/lib/components/locations/map/map.component.mjs +91 -0
  9. package/esm2020/lib/components/plan-legend/plan-legend.component.mjs +47 -0
  10. package/esm2020/lib/components/plans/calibration/calibration.component.mjs +468 -0
  11. package/esm2020/lib/components/plans/edit-plan/edit-plan.component.mjs +324 -0
  12. package/esm2020/lib/components/plans/plans.component.mjs +225 -0
  13. package/esm2020/lib/components/tab-navigation/tab-navigation.component.mjs +41 -0
  14. package/esm2020/lib/components/visits/visits.component.mjs +283 -0
  15. package/esm2020/lib/components/zones/add-audio-zone/add-audio-zone.component.mjs +230 -0
  16. package/esm2020/lib/components/zones/add-zone/add-zone.component.mjs +315 -0
  17. package/esm2020/lib/components/zones/add-zone/selection/selection.component.mjs +77 -0
  18. package/esm2020/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.mjs +502 -0
  19. package/esm2020/lib/components/zones/zones.component.mjs +268 -0
  20. package/esm2020/lib/helper.service.mjs +134 -0
  21. package/esm2020/lib/ngx-smarterplan-location-routing.module.mjs +49 -0
  22. package/esm2020/lib/ngx-smarterplan-locations.module.mjs +125 -0
  23. package/esm2020/lib/ngx-smarterplan-locations.service.mjs +14 -0
  24. package/esm2020/lib/pipes/count-audio-sweeps.pipe.mjs +27 -0
  25. package/esm2020/lib/radio-button/radio-button.component.mjs +26 -0
  26. package/esm2020/public-api.mjs +9 -0
  27. package/esm2020/smarterplan-ngx-smarterplan-locations.mjs +5 -0
  28. package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs +3991 -0
  29. package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs.map +1 -0
  30. package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs +3828 -0
  31. package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs.map +1 -0
  32. package/lib/components/carousel/carousel.component.d.ts +12 -0
  33. package/lib/components/chevron/chevron.component.d.ts +9 -0
  34. package/lib/components/detail-location/detail-location.component.d.ts +55 -0
  35. package/lib/components/form-location/form-location.component.d.ts +45 -0
  36. package/lib/components/images/images.component.d.ts +33 -0
  37. package/lib/components/locations/locations.component.d.ts +51 -0
  38. package/lib/components/locations/map/map-popup/map-popup.component.d.ts +22 -0
  39. package/lib/components/locations/map/map.component.d.ts +22 -0
  40. package/lib/components/plan-legend/plan-legend.component.d.ts +14 -0
  41. package/lib/components/plans/calibration/calibration.component.d.ts +140 -0
  42. package/lib/components/plans/edit-plan/edit-plan.component.d.ts +55 -0
  43. package/lib/components/plans/plans.component.d.ts +63 -0
  44. package/lib/components/tab-navigation/tab-navigation.component.d.ts +13 -0
  45. package/lib/components/visits/visits.component.d.ts +62 -0
  46. package/lib/components/zones/add-audio-zone/add-audio-zone.component.d.ts +63 -0
  47. package/lib/components/zones/add-zone/add-zone.component.d.ts +69 -0
  48. package/lib/components/zones/add-zone/selection/selection.component.d.ts +44 -0
  49. package/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.d.ts +107 -0
  50. package/lib/components/zones/zones.component.d.ts +73 -0
  51. package/lib/helper.service.d.ts +53 -0
  52. package/lib/ngx-smarterplan-location-routing.module.d.ts +7 -0
  53. package/lib/ngx-smarterplan-locations.module.d.ts +36 -0
  54. package/lib/ngx-smarterplan-locations.service.d.ts +6 -0
  55. package/lib/pipes/count-audio-sweeps.pipe.d.ts +10 -0
  56. package/lib/radio-button/radio-button.component.d.ts +12 -0
  57. package/package.json +22 -5
  58. package/{src/public-api.ts → public-api.d.ts} +4 -11
  59. package/smarterplan-ngx-smarterplan-locations.d.ts +5 -0
  60. package/.browserslistrc +0 -16
  61. package/karma.conf.js +0 -44
  62. package/ng-package.json +0 -7
  63. package/src/lib/components/carousel/carousel.component.html +0 -13
  64. package/src/lib/components/carousel/carousel.component.scss +0 -0
  65. package/src/lib/components/carousel/carousel.component.spec.ts +0 -25
  66. package/src/lib/components/carousel/carousel.component.ts +0 -31
  67. package/src/lib/components/chevron/chevron.component.html +0 -5
  68. package/src/lib/components/chevron/chevron.component.scss +0 -16
  69. package/src/lib/components/chevron/chevron.component.spec.ts +0 -25
  70. package/src/lib/components/chevron/chevron.component.ts +0 -17
  71. package/src/lib/components/detail-location/detail-location.component.html +0 -108
  72. package/src/lib/components/detail-location/detail-location.component.scss +0 -0
  73. package/src/lib/components/detail-location/detail-location.component.spec.ts +0 -25
  74. package/src/lib/components/detail-location/detail-location.component.ts +0 -215
  75. package/src/lib/components/form-location/form-location.component.html +0 -160
  76. package/src/lib/components/form-location/form-location.component.scss +0 -62
  77. package/src/lib/components/form-location/form-location.component.spec.ts +0 -25
  78. package/src/lib/components/form-location/form-location.component.ts +0 -274
  79. package/src/lib/components/images/images.component.html +0 -27
  80. package/src/lib/components/images/images.component.scss +0 -0
  81. package/src/lib/components/images/images.component.spec.ts +0 -25
  82. package/src/lib/components/images/images.component.ts +0 -133
  83. package/src/lib/components/locations/locations.component.html +0 -63
  84. package/src/lib/components/locations/locations.component.scss +0 -121
  85. package/src/lib/components/locations/locations.component.spec.ts +0 -25
  86. package/src/lib/components/locations/locations.component.ts +0 -186
  87. package/src/lib/components/locations/map/map-popup/map-popup.component.html +0 -11
  88. package/src/lib/components/locations/map/map-popup/map-popup.component.scss +0 -51
  89. package/src/lib/components/locations/map/map-popup/map-popup.component.spec.ts +0 -25
  90. package/src/lib/components/locations/map/map-popup/map-popup.component.ts +0 -79
  91. package/src/lib/components/locations/map/map.component.html +0 -2
  92. package/src/lib/components/locations/map/map.component.scss +0 -0
  93. package/src/lib/components/locations/map/map.component.spec.ts +0 -25
  94. package/src/lib/components/locations/map/map.component.ts +0 -111
  95. package/src/lib/components/plan-legend/plan-legend.component.html +0 -9
  96. package/src/lib/components/plan-legend/plan-legend.component.scss +0 -38
  97. package/src/lib/components/plan-legend/plan-legend.component.spec.ts +0 -25
  98. package/src/lib/components/plan-legend/plan-legend.component.ts +0 -50
  99. package/src/lib/components/plans/calibration/calibration.component.html +0 -98
  100. package/src/lib/components/plans/calibration/calibration.component.scss +0 -136
  101. package/src/lib/components/plans/calibration/calibration.component.spec.ts +0 -25
  102. package/src/lib/components/plans/calibration/calibration.component.ts +0 -603
  103. package/src/lib/components/plans/edit-plan/edit-plan.component.html +0 -77
  104. package/src/lib/components/plans/edit-plan/edit-plan.component.scss +0 -9
  105. package/src/lib/components/plans/edit-plan/edit-plan.component.spec.ts +0 -25
  106. package/src/lib/components/plans/edit-plan/edit-plan.component.ts +0 -421
  107. package/src/lib/components/plans/plans.component.html +0 -102
  108. package/src/lib/components/plans/plans.component.scss +0 -24
  109. package/src/lib/components/plans/plans.component.spec.ts +0 -25
  110. package/src/lib/components/plans/plans.component.ts +0 -305
  111. package/src/lib/components/tab-navigation/tab-navigation.component.html +0 -7
  112. package/src/lib/components/tab-navigation/tab-navigation.component.scss +0 -27
  113. package/src/lib/components/tab-navigation/tab-navigation.component.spec.ts +0 -25
  114. package/src/lib/components/tab-navigation/tab-navigation.component.ts +0 -35
  115. package/src/lib/components/visits/visits.component.html +0 -134
  116. package/src/lib/components/visits/visits.component.scss +0 -24
  117. package/src/lib/components/visits/visits.component.spec.ts +0 -25
  118. package/src/lib/components/visits/visits.component.ts +0 -357
  119. package/src/lib/components/zones/add-audio-zone/add-audio-zone.component.html +0 -73
  120. package/src/lib/components/zones/add-audio-zone/add-audio-zone.component.scss +0 -14
  121. package/src/lib/components/zones/add-audio-zone/add-audio-zone.component.spec.ts +0 -25
  122. package/src/lib/components/zones/add-audio-zone/add-audio-zone.component.ts +0 -269
  123. package/src/lib/components/zones/add-zone/add-zone.component.html +0 -153
  124. package/src/lib/components/zones/add-zone/add-zone.component.scss +0 -44
  125. package/src/lib/components/zones/add-zone/add-zone.component.spec.ts +0 -25
  126. package/src/lib/components/zones/add-zone/add-zone.component.ts +0 -377
  127. package/src/lib/components/zones/add-zone/selection/selection.component.html +0 -3
  128. package/src/lib/components/zones/add-zone/selection/selection.component.scss +0 -16
  129. package/src/lib/components/zones/add-zone/selection/selection.component.spec.ts +0 -25
  130. package/src/lib/components/zones/add-zone/selection/selection.component.ts +0 -95
  131. package/src/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.html +0 -73
  132. package/src/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.scss +0 -23
  133. package/src/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.spec.ts +0 -25
  134. package/src/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.ts +0 -595
  135. package/src/lib/components/zones/zones.component.html +0 -181
  136. package/src/lib/components/zones/zones.component.scss +0 -36
  137. package/src/lib/components/zones/zones.component.spec.ts +0 -25
  138. package/src/lib/components/zones/zones.component.ts +0 -339
  139. package/src/lib/helper.service.ts +0 -161
  140. package/src/lib/ngx-smarterplan-location-routing.module.ts +0 -41
  141. package/src/lib/ngx-smarterplan-locations.module.ts +0 -74
  142. package/src/lib/ngx-smarterplan-locations.service.spec.ts +0 -16
  143. package/src/lib/ngx-smarterplan-locations.service.ts +0 -9
  144. package/src/lib/pipes/count-audio-sweeps.pipe.ts +0 -21
  145. package/src/lib/radio-button/radio-button.component.html +0 -9
  146. package/src/lib/radio-button/radio-button.component.scss +0 -152
  147. package/src/lib/radio-button/radio-button.component.spec.ts +0 -25
  148. package/src/lib/radio-button/radio-button.component.ts +0 -26
  149. package/src/test.ts +0 -27
  150. package/tsconfig.lib.json +0 -15
  151. package/tsconfig.lib.prod.json +0 -10
  152. package/tsconfig.spec.json +0 -17
@@ -0,0 +1,69 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { FormGroup, FormBuilder, AbstractControl, ValidatorFn } from '@angular/forms';
3
+ import { Zone, Plan, Layer, ZoneService, LayerService, BaseUserService, NavigationService } from '@smarterplan/ngx-smarterplan-core';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AddZoneComponent implements OnInit {
6
+ private fb;
7
+ private zoneService;
8
+ private layerService;
9
+ private userService;
10
+ private navigationService;
11
+ zoneEdit: Zone;
12
+ spaceID: string;
13
+ images360: {
14
+ path: string;
15
+ filename: string;
16
+ }[];
17
+ navigationIDs: string[];
18
+ zones: Zone[];
19
+ newZoneDataFromEditor: any;
20
+ updatedZone: EventEmitter<any>;
21
+ chosenPlan: Plan;
22
+ isMuseumVisit: boolean;
23
+ defaultZone: Zone;
24
+ parentZones: Zone[];
25
+ carouselIsVisible: boolean;
26
+ zoneForm: FormGroup;
27
+ isSubmitted: boolean;
28
+ currentScanShowing: number;
29
+ chosenScans: number[];
30
+ layers: Layer[];
31
+ fromPlan: boolean;
32
+ chosenScansOnPlan: string[];
33
+ currentOrgId: string;
34
+ zoneInitialNavCount: number;
35
+ zoneIsMatterportFloor: boolean;
36
+ multipleFloors: boolean;
37
+ constructor(fb: FormBuilder, zoneService: ZoneService, layerService: LayerService, userService: BaseUserService, navigationService: NavigationService);
38
+ ngOnInit(): Promise<void>;
39
+ updateLayers(): Promise<void>;
40
+ initZoneForm(): Promise<void>;
41
+ onSubmitZone(): Promise<void>;
42
+ onCancel(): void;
43
+ get name(): AbstractControl;
44
+ get newLayer(): AbstractControl;
45
+ toggleCarousel(): void;
46
+ togglePlan(): void;
47
+ onAddScan(): void;
48
+ onRemoveScanImage(scan: any): void;
49
+ onRemoveScanPlan(scan: any): void;
50
+ setSweepsAndNodeForZoneInput(zoneInput: Zone): Promise<void>;
51
+ createLayer(name: string): Promise<Layer>;
52
+ loadNavigations(): Promise<any>;
53
+ /**
54
+ * Adds all sweeps of the space
55
+ */
56
+ onAddAll(): void;
57
+ getDefaultZone(): Zone;
58
+ /**
59
+ * Multiple floors
60
+ */
61
+ onChangeMultipleFloors(): void;
62
+ onSelectedSweepsFromPlan(result: {
63
+ sweeps: string[];
64
+ startSweepID: string;
65
+ }): void;
66
+ layerNameValidator(): ValidatorFn;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<AddZoneComponent, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<AddZoneComponent, "lib-add-zone", never, { "zoneEdit": "zoneEdit"; "spaceID": "spaceID"; "images360": "images360"; "navigationIDs": "navigationIDs"; "zones": "zones"; "newZoneDataFromEditor": "newZoneDataFromEditor"; "chosenPlan": "chosenPlan"; "isMuseumVisit": "isMuseumVisit"; "defaultZone": "defaultZone"; }, { "updatedZone": "updatedZone"; }, never, never>;
69
+ }
@@ -0,0 +1,44 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { Rectangle } from '../../../../helper.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SelectionComponent implements OnInit {
5
+ constructor();
6
+ /**Emit a new selection */
7
+ onSelectionChanged: EventEmitter<Rectangle>;
8
+ /**Zone wich you can use a selection inside, must have the class ".selectZone" */
9
+ selectionableZone: HTMLElement;
10
+ /**HtmlElement use to display the selected zone (blue) */
11
+ selectionElement: HTMLElement;
12
+ isMousedown: boolean;
13
+ selection: {
14
+ startX: number;
15
+ startY: number;
16
+ endX: number;
17
+ endY: number;
18
+ };
19
+ selectionRectangle: Rectangle;
20
+ ngOnInit(): void;
21
+ /**
22
+ * Update the current selection
23
+ * Will update the selectionRectangle and Selection HTML element
24
+ * @param shouldEmit if true an event will be emitted through onSelectionChanged (true by default)
25
+ */
26
+ updateSelectionElement(shouldEmit?: boolean): void;
27
+ /**
28
+ * Trigger when mouse is press down on selectionableZone
29
+ * @param event
30
+ */
31
+ mousedown(event: MouseEvent): void;
32
+ /**
33
+ * Trigger when mouse is release on selectionableZone
34
+ * @param event
35
+ */
36
+ mouseup(event: MouseEvent): void;
37
+ /**
38
+ * Trigger when mouse is moving on selectionableZone
39
+ * @param event
40
+ */
41
+ mousemove(event: MouseEvent): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectionComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectionComponent, "lib-selection", never, {}, { "onSelectionChanged": "onSelectionChanged"; }, never, ["*"]>;
44
+ }
@@ -0,0 +1,107 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { Navigation, NavigationService, Plan, Zone, ZoneService, PlanService } from '@smarterplan/ngx-smarterplan-core';
4
+ import { PanZoom } from 'panzoom';
5
+ import { Rectangle } from '../../../../helper.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class SweepPlanSelectionComponent implements OnInit {
8
+ private zoneService;
9
+ private navigationService;
10
+ private planService;
11
+ private translate;
12
+ plans: Plan[];
13
+ spaceID: string;
14
+ chosenScansOnPlan: string[];
15
+ /** if comming from Edit Plan SVG Zone creation */
16
+ newZoneData: any;
17
+ navIDsZoneEdit: string[];
18
+ occupiedSweeps: string[];
19
+ unavailableSweeps: string[];
20
+ editingAudioZone: boolean;
21
+ inputZone: Zone;
22
+ multipleFloors: boolean;
23
+ chosenPlan: Plan;
24
+ /** panZoom element for adding scans */
25
+ panZoom: PanZoom;
26
+ /** divPlan (use By panZoom) */
27
+ divPlan: HTMLElement;
28
+ /** all scan buttons Element */
29
+ buttonElements: HTMLButtonElement[];
30
+ /** Scan buttons that are in the current selection */
31
+ buttonsInSelection: HTMLButtonElement[];
32
+ sweepsSelected: EventEmitter<{
33
+ sweeps: string[];
34
+ startSweepID: string;
35
+ }>;
36
+ isSettingStartSweep: boolean;
37
+ startSweepID: string;
38
+ chosenSweepsPerFloor: Map<string, string[]>;
39
+ inputSweepsPerFloor: Map<string, string[]>;
40
+ selectionChanged: boolean;
41
+ constructor(zoneService: ZoneService, navigationService: NavigationService, planService: PlanService, translate: TranslateService);
42
+ ngOnInit(): Promise<void>;
43
+ ngOnChanges(): void;
44
+ setSweepsOfInputZone(): void;
45
+ getPlans(): Promise<void>;
46
+ onPlanClick(plan: Plan): Promise<void>;
47
+ addScanPoints(): Promise<void>;
48
+ /** Function if we are coming for svg editor workflow */
49
+ setScanByDraw(navigations: any[]): Promise<void>;
50
+ setScanInRect(img: any, coeffX: number, coeffY: number, element: {
51
+ angle: any;
52
+ cx: any;
53
+ cy: any;
54
+ x: number;
55
+ width: any;
56
+ y: number;
57
+ height: any;
58
+ }, navigations: any[]): Promise<void>;
59
+ setScanInCircle(img: any, coeffX: number, coeffY: number, element: {
60
+ angle: any;
61
+ cx: number;
62
+ cy: number;
63
+ rx: number;
64
+ ry: number;
65
+ }, navigations: Navigation[]): Promise<void>;
66
+ setScanInPolygon(img: any, coeffX: number, coeffY: number, element: {
67
+ segList: any;
68
+ }, navigations: any[]): Promise<void>;
69
+ clearDivPlan(): void;
70
+ /**
71
+ * Trigger each by the selectionComponent when selection change
72
+ * Update the current selected scan buttons
73
+ * @param selection new selection
74
+ */
75
+ onSelectionChanged(selection: Rectangle): void;
76
+ /**
77
+ * Trigger when the user click to add the selected scans
78
+ */
79
+ onSelectionAdd(): void;
80
+ /**
81
+ * Trigger when the user click to remove the selected scans
82
+ */
83
+ onSelectionRemove(): void;
84
+ /**
85
+ * Trigger when the user click to select all scans
86
+ */
87
+ onSelectAll(): void;
88
+ /**
89
+ * Trigger when the user change the size of the scan points
90
+ * @param event
91
+ */
92
+ onChangeScanSize(event: any): void;
93
+ /**
94
+ * When a button representing a scan is clicked
95
+ * @param button
96
+ */
97
+ onButtonScanClicked(button: HTMLElement): void;
98
+ onSaveSelection(): void;
99
+ onCancel(): void;
100
+ /**
101
+ * Adds current selection of sweeps for current floor (plan) for multifloor zone.
102
+ * It has to be saved anyway with onSaveSelection!
103
+ */
104
+ onValidateForFloor(): void;
105
+ static ɵfac: i0.ɵɵFactoryDeclaration<SweepPlanSelectionComponent, never>;
106
+ static ɵcmp: i0.ɵɵComponentDeclaration<SweepPlanSelectionComponent, "lib-sweep-plan-selection", never, { "spaceID": "spaceID"; "chosenScansOnPlan": "chosenScansOnPlan"; "newZoneData": "newZoneData"; "occupiedSweeps": "occupiedSweeps"; "unavailableSweeps": "unavailableSweeps"; "editingAudioZone": "editingAudioZone"; "inputZone": "inputZone"; "multipleFloors": "multipleFloors"; }, { "sweepsSelected": "sweepsSelected"; }, never, never>;
107
+ }
@@ -0,0 +1,73 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { TranslateService } from '@ngx-translate/core';
4
+ import { MenuItem, ZoneService, SpaceService, VisitService, NavigationService, BaseUserService, PlanService, Navigation, Plan, Space, Zone, NavigatorService } from '@smarterplan/ngx-smarterplan-core';
5
+ import { Subject } from 'rxjs';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ZonesComponent implements OnInit {
8
+ private route;
9
+ private zoneService;
10
+ private spaceService;
11
+ private visitService;
12
+ private navigationService;
13
+ private userService;
14
+ private planService;
15
+ private translate;
16
+ private navigatorService;
17
+ private router;
18
+ lotIndexDetails: number;
19
+ currentSpace: Space;
20
+ updatedZone: EventEmitter<boolean>;
21
+ plans: Plan[];
22
+ zoneForEdit: Zone;
23
+ isEditingZone: boolean;
24
+ captureDate: number;
25
+ spaceID: string;
26
+ navigations: string[];
27
+ images360: any[];
28
+ carouselIsVisible: boolean;
29
+ planIsVisible: boolean;
30
+ currentPlan: Plan;
31
+ currentZone: Zone;
32
+ loadingPlan: boolean;
33
+ menuItems: MenuItem[];
34
+ isMuseumVisit: boolean;
35
+ isMuseumModule: boolean;
36
+ allZones: Zone[];
37
+ floorZones: Zone[];
38
+ zonesMap: Map<string, Zone[]>;
39
+ floorDetails: number;
40
+ defaultZone: Zone;
41
+ defaultShowing: boolean;
42
+ isAddingAudioTrack: boolean;
43
+ parentZoneForAudio: Zone;
44
+ destroy$: Subject<unknown>;
45
+ constructor(route: ActivatedRoute, zoneService: ZoneService, spaceService: SpaceService, visitService: VisitService, navigationService: NavigationService, userService: BaseUserService, planService: PlanService, translate: TranslateService, navigatorService: NavigatorService, router: Router);
46
+ ngOnInit(): Promise<void>;
47
+ ngOnDestroy(): void;
48
+ setupMenuItems(): void;
49
+ onGoBack(): void;
50
+ ngOnChanges(): void;
51
+ resetZones(): Promise<void>;
52
+ resetNavigations(): void;
53
+ onPlansLoaded(): Promise<void>;
54
+ /**
55
+ * onToggleDetail folds/unfolds details for a zone
56
+ * @param index
57
+ * @param zone
58
+ */
59
+ onToggleDetail(index: number, zone: Zone): Promise<void>;
60
+ onToggleDetailFloor(index: number, floor: Zone): void;
61
+ onToggleDefaultZone(): void;
62
+ preparePlan(): Promise<void>;
63
+ toggleCarousel(): void;
64
+ onEdit(zone: Zone): void;
65
+ onAddLot(): void;
66
+ onAddMuseumZone(): void;
67
+ onAddAudioZone(parentZone: Zone): void;
68
+ onDelete(zone: Zone): Promise<void>;
69
+ editCompleted(event: any): void;
70
+ showScanPointsOnPlan(navigations: Navigation[]): Promise<void>;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZonesComponent, never>;
72
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZonesComponent, "lib-zones", never, {}, { "updatedZone": "updatedZone"; }, never, never>;
73
+ }
@@ -0,0 +1,53 @@
1
+ export declare type Rectangle = {
2
+ top: number;
3
+ left: number;
4
+ width: number;
5
+ height: number;
6
+ };
7
+ export declare enum SweepState {
8
+ ADDED = 0,
9
+ REMOVED = 1,
10
+ DISABLED = 2,
11
+ OCCUPIED = 3,
12
+ STARTPOINT = 4
13
+ }
14
+ export declare function isInPolygon(p: {
15
+ x: any;
16
+ y: any;
17
+ }, polygon: string | any[]): boolean;
18
+ export declare function rotate(point: {
19
+ x: any;
20
+ y: any;
21
+ }, center: {
22
+ x: any;
23
+ y: any;
24
+ }, angle: number): {
25
+ x: number;
26
+ y: number;
27
+ };
28
+ /**
29
+ * Check if an HtmlElement is inside a selection
30
+ * @param button HTMLElement
31
+ * @param selection
32
+ * @returns true if the element is inside the selection, false otherwise
33
+ */
34
+ export declare function buttonIsInSelection(button: HTMLButtonElement, selection: Rectangle): boolean;
35
+ /**
36
+ * Styles the button that represents a sweep on the plan: green-added to zone, red -not added, gray - disabled, orange - occupied
37
+ * @param button HTMLButtonElement, button on the plan,
38
+ * @param isAdded boolean, if the sweep added to the zone
39
+ * @param isOccupied boolean, if the sweep added to any other zone (but not current)
40
+ */
41
+ export declare function styleButton(button: HTMLButtonElement, state: SweepState): void;
42
+ /**
43
+ * Check if sweep (button) is chosen; it is reprsented by image style "mdi:adjust"
44
+ * @param button HTMLElement
45
+ * @returns boolean, if button was selected
46
+ */
47
+ export declare function buttonIsChosen(button: HTMLElement): boolean;
48
+ /**
49
+ * Visually change the state of a scan button, a selected button is blue
50
+ * @param button HTMLElement
51
+ * @param selected if true the button will be blue, otherwise it will red or green
52
+ */
53
+ export declare function setVisuallySelected(button: HTMLElement, selected: boolean): void;
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/router";
3
+ export declare class LocationsRoutingModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocationsRoutingModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LocationsRoutingModule, never, [typeof i1.RouterModule], [typeof i1.RouterModule]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<LocationsRoutingModule>;
7
+ }
@@ -0,0 +1,36 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/locations/locations.component";
3
+ import * as i2 from "./components/detail-location/detail-location.component";
4
+ import * as i3 from "./components/plans/calibration/calibration.component";
5
+ import * as i4 from "./components/plans/plans.component";
6
+ import * as i5 from "./components/visits/visits.component";
7
+ import * as i6 from "./components/zones/zones.component";
8
+ import * as i7 from "./components/images/images.component";
9
+ import * as i8 from "./components/plans/edit-plan/edit-plan.component";
10
+ import * as i9 from "./components/tab-navigation/tab-navigation.component";
11
+ import * as i10 from "./components/locations/map/map.component";
12
+ import * as i11 from "./components/locations/map/map-popup/map-popup.component";
13
+ import * as i12 from "./components/form-location/form-location.component";
14
+ import * as i13 from "./components/chevron/chevron.component";
15
+ import * as i14 from "./components/zones/add-zone/add-zone.component";
16
+ import * as i15 from "./components/zones/add-zone/selection/selection.component";
17
+ import * as i16 from "./components/carousel/carousel.component";
18
+ import * as i17 from "./components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component";
19
+ import * as i18 from "./components/zones/add-audio-zone/add-audio-zone.component";
20
+ import * as i19 from "./radio-button/radio-button.component";
21
+ import * as i20 from "./components/plan-legend/plan-legend.component";
22
+ import * as i21 from "./pipes/count-audio-sweeps.pipe";
23
+ import * as i22 from "ng2-pdf-viewer";
24
+ import * as i23 from "ngx-clipboard";
25
+ import * as i24 from "@ng-bootstrap/ng-bootstrap";
26
+ import * as i25 from "@angular/common";
27
+ import * as i26 from "@ngx-translate/core";
28
+ import * as i27 from "@asymmetrik/ngx-leaflet";
29
+ import * as i28 from "@angular/forms";
30
+ import * as i29 from "@smarterplan/ngx-smarterplan-core";
31
+ import * as i30 from "./ngx-smarterplan-location-routing.module";
32
+ export declare class NgxSmarterplanLocationsModule {
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxSmarterplanLocationsModule, never>;
34
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSmarterplanLocationsModule, [typeof i1.LocationsComponent, typeof i2.DetailLocationComponent, typeof i3.CalibrationComponent, typeof i4.PlansComponent, typeof i5.VisitsComponent, typeof i6.ZonesComponent, typeof i7.ImagesComponent, typeof i8.EditPlanComponent, typeof i9.TabNavigationComponent, typeof i10.MapComponent, typeof i11.MapPopupComponent, typeof i12.FormLocationComponent, typeof i13.ChevronComponent, typeof i14.AddZoneComponent, typeof i15.SelectionComponent, typeof i16.CarouselComponent, typeof i17.SweepPlanSelectionComponent, typeof i18.AddAudioZoneComponent, typeof i19.RadioButtonComponent, typeof i20.PlanLegendComponent, typeof i21.CountAudioSweepsPipe], [typeof i22.PdfViewerModule, typeof i23.ClipboardModule, typeof i24.NgbModule, typeof i24.NgbAlertModule, typeof i25.CommonModule, typeof i26.TranslateModule, typeof i27.LeafletModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.NgxSmarterplanCoreModule, typeof i30.LocationsRoutingModule], [typeof i10.MapComponent, typeof i9.TabNavigationComponent]>;
35
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxSmarterplanLocationsModule>;
36
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NgxSmarterplanLocationsService {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxSmarterplanLocationsService, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxSmarterplanLocationsService>;
6
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { Zone, ZoneService } from '@smarterplan/ngx-smarterplan-core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CountAudioSweepsPipe implements PipeTransform {
5
+ private zoneService;
6
+ constructor(zoneService: ZoneService);
7
+ transform(zone: Zone): Promise<number>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<CountAudioSweepsPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<CountAudioSweepsPipe, "countAudioSweeps">;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RadioButtonComponent implements OnInit {
4
+ label: string;
5
+ isCheckedEvent: EventEmitter<boolean>;
6
+ isChecked: boolean;
7
+ constructor();
8
+ ngOnInit(): void;
9
+ onChecked(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "lib-radio-button", never, { "label": "label"; }, { "isCheckedEvent": "isCheckedEvent"; }, never, never>;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarterplan/ngx-smarterplan-locations",
3
- "version": "0.2.44",
3
+ "version": "0.2.45",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.2.0",
6
6
  "@angular/core": "^13.2.0",
@@ -16,7 +16,24 @@
16
16
  "dependencies": {
17
17
  "tslib": "^2.3.0"
18
18
  },
19
- "devDependencies": {
20
- "@types/leaflet": "^1.7.9"
21
- }
22
- }
19
+ "module": "fesm2015/smarterplan-ngx-smarterplan-locations.mjs",
20
+ "es2020": "fesm2020/smarterplan-ngx-smarterplan-locations.mjs",
21
+ "esm2020": "esm2020/smarterplan-ngx-smarterplan-locations.mjs",
22
+ "fesm2020": "fesm2020/smarterplan-ngx-smarterplan-locations.mjs",
23
+ "fesm2015": "fesm2015/smarterplan-ngx-smarterplan-locations.mjs",
24
+ "typings": "smarterplan-ngx-smarterplan-locations.d.ts",
25
+ "exports": {
26
+ "./package.json": {
27
+ "default": "./package.json"
28
+ },
29
+ ".": {
30
+ "types": "./smarterplan-ngx-smarterplan-locations.d.ts",
31
+ "esm2020": "./esm2020/smarterplan-ngx-smarterplan-locations.mjs",
32
+ "es2020": "./fesm2020/smarterplan-ngx-smarterplan-locations.mjs",
33
+ "es2015": "./fesm2015/smarterplan-ngx-smarterplan-locations.mjs",
34
+ "node": "./fesm2015/smarterplan-ngx-smarterplan-locations.mjs",
35
+ "default": "./fesm2020/smarterplan-ngx-smarterplan-locations.mjs"
36
+ }
37
+ },
38
+ "sideEffects": false
39
+ }
@@ -1,11 +1,4 @@
1
- /*
2
- * Public API Surface of ngx-smarterplan-locations
3
- */
4
-
5
- export * from './lib/ngx-smarterplan-locations.service';
6
- export * from './lib/ngx-smarterplan-locations.module';
7
-
8
- // Components
9
-
10
- export * from './lib/components/locations/map/map.component';
11
- export * from './lib/components/tab-navigation/tab-navigation.component';
1
+ export * from './lib/ngx-smarterplan-locations.service';
2
+ export * from './lib/ngx-smarterplan-locations.module';
3
+ export * from './lib/components/locations/map/map.component';
4
+ export * from './lib/components/tab-navigation/tab-navigation.component';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@smarterplan/ngx-smarterplan-locations" />
5
+ export * from './public-api';
package/.browserslistrc DELETED
@@ -1,16 +0,0 @@
1
- # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
- # For additional information regarding the format and rule options, please see:
3
- # https://github.com/browserslist/browserslist#queries
4
-
5
- # For the full list of supported browsers by the Angular framework, please see:
6
- # https://angular.io/guide/browser-support
7
-
8
- # You can see what browsers were selected by your queries by running:
9
- # npx browserslist
10
-
11
- last 1 Chrome version
12
- last 1 Firefox version
13
- last 2 Edge major versions
14
- last 2 Safari major versions
15
- last 2 iOS major versions
16
- Firefox ESR
package/karma.conf.js DELETED
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/ngx-smarterplan-locations'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/ngx-smarterplan-locations",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,13 +0,0 @@
1
- <ngb-carousel [interval]="5000" *ngIf="images && images.length > 1" (slide)="onSlide($event)">
2
- <ng-template *ngFor="let image of images; let i = index" ngbSlide [id]="'slideId_' + i">
3
- <div class="picsum-img-wrapper">
4
- <img [src]="image.path" alt="Scan" class="d-block w-100">
5
- </div>
6
- <div class="carousel-caption">
7
- <h3>{{image.title}}</h3>
8
- <p>{{image.description}}</p>
9
- </div>
10
- </ng-template>
11
- </ngb-carousel>
12
-
13
- <img *ngIf="images.length === 1" [src]="images[0].path" alt="Scan" class="d-block w-100">
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CarouselComponent } from './carousel.component';
4
-
5
- describe('CarouselComponent', () => {
6
- let component: CarouselComponent;
7
- let fixture: ComponentFixture<CarouselComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ CarouselComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(CarouselComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,31 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-carousel',
5
- templateUrl: './carousel.component.html',
6
- styleUrls: ['./carousel.component.scss']
7
- })
8
- export class CarouselComponent implements OnInit {
9
-
10
- @Input() images;
11
-
12
- @Output() currentScan = new EventEmitter<number>();
13
-
14
- dataEvent: string;
15
-
16
- constructor() { }
17
-
18
- ngOnInit(): void {
19
- this.currentScan.emit(0);
20
- }
21
-
22
- onSlide(event) {
23
- this.dataEvent = JSON.stringify(event);
24
- const imageIndex = Number.parseInt(
25
- event.current.replace("slideId_", ""),
26
- 10,
27
- );
28
- this.currentScan.emit(imageIndex);
29
- }
30
-
31
- }
@@ -1,5 +0,0 @@
1
- <div style="height: 30px; width: 30px;">
2
- <span class="icon-container" >
3
- <div [class]="conditionShowing ? 'icon-img-up' : 'icon-img-down'"></div>
4
- </span>
5
- </div>
@@ -1,16 +0,0 @@
1
- .icon-container {
2
- height: 30px;
3
- width: 30px;
4
- }
5
-
6
- .icon-img-down {
7
- width: 30px;
8
- height: 100%;
9
- background: url('https://api.iconify.design/mdi-light/chevron-right.svg?width=28') no-repeat center center / contain;
10
- }
11
-
12
- .icon-img-up {
13
- width: 30px;
14
- height: 100%;
15
- background: url('https://api.iconify.design/mdi-light/chevron-down.svg?width=28') no-repeat center center / contain;
16
- }