@smarterplan/ngx-smarterplan-core 1.2.14 → 1.2.16
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/menu-bar/navigation-bar/navigation-bar.component.mjs +20 -18
- package/esm2020/lib/services/matterport-import.service.mjs +2 -3
- package/esm2020/lib/services/matterport.service.mjs +75 -74
- package/esm2020/lib/services/models/equipment.service.mjs +19 -17
- package/esm2020/lib/services/models/measurement.service.mjs +20 -18
- package/esm2020/lib/services/models/poi.service.mjs +19 -17
- package/esm2020/lib/services/models/ticket.service.mjs +40 -36
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +188 -178
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +188 -176
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/components/menu-bar/navigation-bar/navigation-bar.component.d.ts.map +1 -1
- package/lib/services/matterport-import.service.d.ts.map +1 -1
- package/lib/services/models/equipment.service.d.ts.map +1 -1
- package/lib/services/models/measurement.service.d.ts.map +1 -1
- package/lib/services/models/poi.service.d.ts.map +1 -1
- package/lib/services/models/ticket.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1854,22 +1854,24 @@ class PoiService {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
async createPOIForSpaceID(poi) {
|
|
1856
1856
|
removeNullKeysFromObject(poi);
|
|
1857
|
-
this.awsKinesisAnalytics
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1857
|
+
if (!!this.awsKinesisAnalytics) {
|
|
1858
|
+
this.awsKinesisAnalytics.getInstance().record(
|
|
1859
|
+
// @ts-ignore
|
|
1860
|
+
{
|
|
1861
|
+
data: {
|
|
1862
|
+
eventType: 'Object Creation',
|
|
1863
|
+
objectType: 'poi',
|
|
1864
|
+
poi: poi,
|
|
1865
|
+
user: this.userService.cu,
|
|
1866
|
+
timestamp: new Date(),
|
|
1867
|
+
floorId: this.selectedFloor?.id,
|
|
1868
|
+
locationId: this.currentSpaceID,
|
|
1869
|
+
zoneId: this.zoneIDFilter,
|
|
1870
|
+
},
|
|
1871
|
+
streamName: 'smarterplanKinesis-analytics',
|
|
1872
|
+
// partitionKey: "",
|
|
1873
|
+
}, 'AWSKinesis');
|
|
1874
|
+
}
|
|
1873
1875
|
return this.API.__proto__.CreatePOI(poi);
|
|
1874
1876
|
}
|
|
1875
1877
|
poiIsVirtual(poi) {
|
|
@@ -2807,79 +2809,80 @@ class MatterportService {
|
|
|
2807
2809
|
// renderer.shadowMap.type = three.PCFSoftShadowMap;
|
|
2808
2810
|
// });
|
|
2809
2811
|
// Wait until Showcase is actually playing....
|
|
2810
|
-
this.sdk.Tag.data.subscribe({
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
}
|
|
2812
|
+
// this.sdk.Tag.data.subscribe({
|
|
2813
|
+
// onAdded: async function (index, item, collection) {
|
|
2814
|
+
//
|
|
2815
|
+
// let thisOpacity = 0.2;
|
|
2816
|
+
// this.sdk.Tag.editOpacity(index, thisOpacity);
|
|
2817
|
+
//
|
|
2818
|
+
// let source = null;
|
|
2819
|
+
// try {
|
|
2820
|
+
// source = await Promise.all([
|
|
2821
|
+
// this.sdk.Sensor.createSource(this.sdk.Sensor.SourceType.SPHERE, {
|
|
2822
|
+
// origin: item.anchorPosition,
|
|
2823
|
+
// radius: Number(3),
|
|
2824
|
+
// userData: {
|
|
2825
|
+
// id: index + '-sphere-source',
|
|
2826
|
+
// },
|
|
2827
|
+
// })
|
|
2828
|
+
// ]);
|
|
2829
|
+
// } catch (e) {
|
|
2830
|
+
// console.log('could not create Sphere sensor')
|
|
2831
|
+
// console.error(e);
|
|
2832
|
+
// }
|
|
2833
|
+
// if (!source) {
|
|
2834
|
+
// return;
|
|
2835
|
+
// }
|
|
2836
|
+
//
|
|
2837
|
+
// let sensor = null;
|
|
2838
|
+
// try {
|
|
2839
|
+
// sensor = await this.sdk.Sensor.createSensor(this.sdk.Sensor.SensorType.CAMERA);
|
|
2840
|
+
// } catch (e) {
|
|
2841
|
+
// console.log('could not create Camera sensor')
|
|
2842
|
+
// console.error(e);
|
|
2843
|
+
// }
|
|
2844
|
+
// if (!sensor) {
|
|
2845
|
+
// return;
|
|
2846
|
+
// }
|
|
2847
|
+
//
|
|
2848
|
+
// sensor.addSource(...source);
|
|
2849
|
+
// sensor.readings.subscribe({
|
|
2850
|
+
// onUpdated(source, reading) {
|
|
2851
|
+
// console.log(thisOpacity);
|
|
2852
|
+
// let oldOpacity = thisOpacity;
|
|
2853
|
+
// if (reading.inRange) {
|
|
2854
|
+
// thisOpacity = 1;
|
|
2855
|
+
// console.log(index + ' is inRange');
|
|
2856
|
+
// } else if (reading.inView) {
|
|
2857
|
+
// console.log(index + ' is inView but not inRange');
|
|
2858
|
+
// thisOpacity = 0.5;
|
|
2859
|
+
// } else {
|
|
2860
|
+
// thisOpacity = 0.2;
|
|
2861
|
+
// console.log(index + ' is not inView or inRange');
|
|
2862
|
+
// }
|
|
2863
|
+
//
|
|
2864
|
+
// this.sdk.Tag.editOpacity(index, thisOpacity);
|
|
2865
|
+
// /*
|
|
2866
|
+
// let inc = 0.01;
|
|
2867
|
+
// if (oldOpacity > thisOpacity) {
|
|
2868
|
+
// inc = -0.01;
|
|
2869
|
+
// }
|
|
2870
|
+
//
|
|
2871
|
+
// for(var i = oldOpacity; i != thisOpacity; i=i+inc) {
|
|
2872
|
+
// setTimeout(function() {
|
|
2873
|
+
// mpSdk.Tag.editOpacity(index, i);
|
|
2874
|
+
// console.log('Delay', i);
|
|
2875
|
+
// },10);
|
|
2876
|
+
// }
|
|
2877
|
+
// */
|
|
2878
|
+
// }
|
|
2879
|
+
// });
|
|
2880
|
+
// //sensor.showDebug(true);
|
|
2881
|
+
// }.bind(this),
|
|
2882
|
+
// onCollectionUpdated: function (collection) {
|
|
2883
|
+
// console.log('Collection received. There are ', Object.keys(collection).length, ' Tags in the collection', collection);
|
|
2884
|
+
// }
|
|
2885
|
+
// });
|
|
2883
2886
|
resolve(true);
|
|
2884
2887
|
}.bind(this));
|
|
2885
2888
|
});
|
|
@@ -6745,24 +6748,26 @@ class TicketsService extends BaseObjectService {
|
|
|
6745
6748
|
event.ownerID = event.ownerID ? event.ownerID : currentMission.id;
|
|
6746
6749
|
try {
|
|
6747
6750
|
const receivedEvent = await this.eventService.createEvent(event);
|
|
6748
|
-
this.awsKinesisAnalytics
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6751
|
+
if (!!this.awsKinesisAnalytics) {
|
|
6752
|
+
this.awsKinesisAnalytics.getInstance().record(
|
|
6753
|
+
// @ts-ignore
|
|
6754
|
+
{
|
|
6755
|
+
data: {
|
|
6756
|
+
eventType: 'Ticket Change',
|
|
6757
|
+
ticketId: event.ticketID,
|
|
6758
|
+
ticket: ticket,
|
|
6759
|
+
status: event.status,
|
|
6760
|
+
event: event,
|
|
6761
|
+
user: this.userService.cu,
|
|
6762
|
+
locationId: this.currentSpaceID,
|
|
6763
|
+
timestamp: new Date(),
|
|
6764
|
+
zoneId: this.zoneIDFilter,
|
|
6765
|
+
floorId: this.selectedFloor?.id,
|
|
6766
|
+
},
|
|
6767
|
+
streamName: 'smarterplanKinesis-analytics',
|
|
6768
|
+
// partitionKey: "",
|
|
6769
|
+
}, 'AWSKinesis');
|
|
6770
|
+
}
|
|
6766
6771
|
// console.log('Event successfully created !');
|
|
6767
6772
|
return receivedEvent;
|
|
6768
6773
|
}
|
|
@@ -6867,23 +6872,25 @@ class TicketsService extends BaseObjectService {
|
|
|
6867
6872
|
return this.API.__proto__.GetTicket(id);
|
|
6868
6873
|
}
|
|
6869
6874
|
async createTicket(input) {
|
|
6870
|
-
this.awsKinesisAnalytics
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6875
|
+
if (!!this.awsKinesisAnalytics) {
|
|
6876
|
+
this.awsKinesisAnalytics.getInstance().record(
|
|
6877
|
+
// @ts-ignore
|
|
6878
|
+
{
|
|
6879
|
+
data: {
|
|
6880
|
+
eventType: 'Object Creation',
|
|
6881
|
+
objectType: 'ticket',
|
|
6882
|
+
//zoneId: input.spaceID, // TODO: check if spaceId == zoneId
|
|
6883
|
+
domain: input.domain,
|
|
6884
|
+
user: this.userService.cu,
|
|
6885
|
+
locationId: this.currentSpaceID,
|
|
6886
|
+
timestamp: new Date(),
|
|
6887
|
+
zoneId: this.zoneIDFilter,
|
|
6888
|
+
floorId: this.selectedFloor?.id,
|
|
6889
|
+
},
|
|
6890
|
+
streamName: 'smarterplanKinesis-analytics',
|
|
6891
|
+
// partitionKey: "",
|
|
6892
|
+
}, 'AWSKinesis');
|
|
6893
|
+
}
|
|
6887
6894
|
return this.API.__proto__.CreateTicket(input);
|
|
6888
6895
|
}
|
|
6889
6896
|
async updateTicket(input) {
|
|
@@ -7119,22 +7126,24 @@ class EquipmentService extends BaseObjectService {
|
|
|
7119
7126
|
}
|
|
7120
7127
|
async createEquipment(equip, imageFile, documentFile) {
|
|
7121
7128
|
removeNullKeysFromObject(equip);
|
|
7122
|
-
this.awsKinesisAnalytics
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7129
|
+
if (!!this.awsKinesisAnalytics) {
|
|
7130
|
+
this.awsKinesisAnalytics.getInstance().record(
|
|
7131
|
+
// @ts-ignore
|
|
7132
|
+
{
|
|
7133
|
+
data: {
|
|
7134
|
+
eventType: 'Object Creation',
|
|
7135
|
+
objectType: 'equipment',
|
|
7136
|
+
poi: equip,
|
|
7137
|
+
user: this.userService.cu,
|
|
7138
|
+
locationId: this.currentSpaceID,
|
|
7139
|
+
timestamp: new Date(),
|
|
7140
|
+
zoneId: this.currentZone.id,
|
|
7141
|
+
floorId: this.selectedFloor?.id,
|
|
7142
|
+
},
|
|
7143
|
+
streamName: 'smarterplanKinesis-analytics',
|
|
7144
|
+
// partitionKey: "",
|
|
7145
|
+
}, 'AWSKinesis');
|
|
7146
|
+
}
|
|
7138
7147
|
return this.API.CreateEquipment(equip).then(async (receivedEquipment) => {
|
|
7139
7148
|
let equipment = receivedEquipment;
|
|
7140
7149
|
if (equipment) {
|
|
@@ -10412,23 +10421,25 @@ class MeasurementService {
|
|
|
10412
10421
|
comment,
|
|
10413
10422
|
poi,
|
|
10414
10423
|
};
|
|
10415
|
-
this.awsKinesisAnalytics
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10424
|
+
if (!!this.awsKinesisAnalytics) {
|
|
10425
|
+
this.awsKinesisAnalytics.getInstance().record(
|
|
10426
|
+
// @ts-ignore
|
|
10427
|
+
{
|
|
10428
|
+
data: {
|
|
10429
|
+
eventType: 'Object Creation',
|
|
10430
|
+
objectType: 'measurement',
|
|
10431
|
+
measurement: measurement,
|
|
10432
|
+
//zoneId: spaceID,
|
|
10433
|
+
user: this.userService.cu,
|
|
10434
|
+
locationId: this.currentSpaceID,
|
|
10435
|
+
timestamp: new Date(),
|
|
10436
|
+
zoneId: this.zoneIDFilter,
|
|
10437
|
+
floorId: this.selectedFloor?.id,
|
|
10438
|
+
},
|
|
10439
|
+
streamName: 'smarterplanKinesis-analytics',
|
|
10440
|
+
// partitionKey: "",
|
|
10441
|
+
}, 'AWSKinesis');
|
|
10442
|
+
}
|
|
10432
10443
|
return measurement;
|
|
10433
10444
|
}
|
|
10434
10445
|
async getModel3DForMeasurement(measurement) {
|
|
@@ -10927,23 +10938,25 @@ class NavigationBarComponent {
|
|
|
10927
10938
|
}
|
|
10928
10939
|
}
|
|
10929
10940
|
async sendKinesisAnalyticsEventForZone(zoneId, zoneName) {
|
|
10930
|
-
this.awsKinesisAnalytics
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10941
|
+
if (!!this.awsKinesisAnalytics) {
|
|
10942
|
+
this.awsKinesisAnalytics.getInstance().record(
|
|
10943
|
+
// @ts-ignore
|
|
10944
|
+
{
|
|
10945
|
+
data: {
|
|
10946
|
+
eventType: 'Zone Change',
|
|
10947
|
+
zoneId: zoneId,
|
|
10948
|
+
zoneName: zoneName,
|
|
10949
|
+
locationId: this.selectedLocation?.id,
|
|
10950
|
+
locationName: this.selectedLocation?.name,
|
|
10951
|
+
user: this.userService?.cu,
|
|
10952
|
+
timestamp: new Date(),
|
|
10953
|
+
floorId: this.selectedFloor?.id,
|
|
10954
|
+
childZoneId: this.selectedChildZone?.id,
|
|
10955
|
+
},
|
|
10956
|
+
streamName: 'smarterplanKinesis-analytics',
|
|
10957
|
+
// partitionKey: "",
|
|
10958
|
+
}, 'AWSKinesis');
|
|
10959
|
+
}
|
|
10947
10960
|
}
|
|
10948
10961
|
async onVisitClick(event) {
|
|
10949
10962
|
this.clearData(false);
|
|
@@ -11378,7 +11391,7 @@ class MatterportImportService {
|
|
|
11378
11391
|
this.importingImages = new Subject();
|
|
11379
11392
|
this.sweepProcessedCount = new Subject();
|
|
11380
11393
|
this.totalSweepsCount = new Subject();
|
|
11381
|
-
this.MAX_SCANS_RELOAD =
|
|
11394
|
+
this.MAX_SCANS_RELOAD = 10;
|
|
11382
11395
|
}
|
|
11383
11396
|
get spaceID() {
|
|
11384
11397
|
return this._spaceID;
|
|
@@ -11559,7 +11572,6 @@ class MatterportImportService {
|
|
|
11559
11572
|
nmbScans < this.MAX_SCANS_RELOAD
|
|
11560
11573
|
? (maxScan = nmbScans)
|
|
11561
11574
|
: (maxScan = this.MAX_SCANS_RELOAD);
|
|
11562
|
-
maxScan;
|
|
11563
11575
|
}
|
|
11564
11576
|
for (let index = indexScan; index < maxScan; index += 1) {
|
|
11565
11577
|
if (!this.stop) {
|