bruce-models 5.6.9 → 5.7.1
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/dist/bruce-models.es5.js +68 -16
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +68 -16
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/abstract-api.js +17 -26
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/project/project-view-tile.js +15 -15
- package/dist/lib/project/project-view-tile.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -566,6 +566,12 @@
|
|
|
566
566
|
formData.append(key, params.formData[key]);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* If we support the legacy request and need it for progress, then we diverge there.
|
|
571
|
+
*/
|
|
572
|
+
if (window && window["XMLHttpRequest"] && params.onProgress) {
|
|
573
|
+
return legacyUpload(url, params.headers, formData, params.onProgress, params.abortSignal);
|
|
574
|
+
}
|
|
569
575
|
const res = yield fetch(url, {
|
|
570
576
|
headers: params.headers,
|
|
571
577
|
method: "POST",
|
|
@@ -576,6 +582,52 @@
|
|
|
576
582
|
});
|
|
577
583
|
}
|
|
578
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Performs a legacy upload with XMLHttpRequest.
|
|
587
|
+
* Unfortunately, this is needed to track progress when it's supported.
|
|
588
|
+
* Fetch doesn't have this capability.
|
|
589
|
+
* @param url
|
|
590
|
+
* @param params
|
|
591
|
+
*/
|
|
592
|
+
function legacyUpload(url, headers, formData, onProgress, abortSignal) {
|
|
593
|
+
return new Promise((resolve, reject) => {
|
|
594
|
+
const xhr = new window["XMLHttpRequest"]();
|
|
595
|
+
xhr.open("POST", url, true);
|
|
596
|
+
// Set custom headers.
|
|
597
|
+
if (headers) {
|
|
598
|
+
Object.keys(headers).forEach((key) => {
|
|
599
|
+
let value = headers[key];
|
|
600
|
+
if (!value) {
|
|
601
|
+
value = "";
|
|
602
|
+
}
|
|
603
|
+
xhr.setRequestHeader(key, value);
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
// Progress event.
|
|
607
|
+
xhr.upload.onprogress = (event) => {
|
|
608
|
+
if (onProgress && event.lengthComputable) {
|
|
609
|
+
onProgress(event);
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
// Success and error handling.
|
|
613
|
+
xhr.onload = () => {
|
|
614
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
615
|
+
resolve(JSON.parse(xhr.responseText));
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
reject(new Error(`Failed to upload: ${xhr.status} ${xhr.statusText}`));
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
xhr.onerror = () => reject(new Error("Network error occurred during file upload."));
|
|
622
|
+
if (abortSignal) {
|
|
623
|
+
abortSignal.addEventListener("abort", () => {
|
|
624
|
+
xhr.abort();
|
|
625
|
+
reject(new Error("Upload aborted."));
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
xhr.send(formData);
|
|
629
|
+
});
|
|
630
|
+
}
|
|
579
631
|
|
|
580
632
|
(function (MessageBroker) {
|
|
581
633
|
let EAction;
|
|
@@ -10461,67 +10513,67 @@
|
|
|
10461
10513
|
{
|
|
10462
10514
|
id: EDefaultImagery.BingMapsAerial,
|
|
10463
10515
|
name: "Bing Maps Aerial",
|
|
10464
|
-
iconUrl: "https://template.
|
|
10516
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/3974f74e-f65e-41cb-9980-d004d2a4eac1?cc=1"
|
|
10465
10517
|
},
|
|
10466
10518
|
{
|
|
10467
10519
|
id: EDefaultImagery.BingMapsAerialWithLabels,
|
|
10468
10520
|
name: "Bing Maps Aerial with Labels",
|
|
10469
|
-
iconUrl: "https://template.
|
|
10521
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/f8013557-ef2b-4536-9a6f-aee76c1ffc45?cc=1"
|
|
10470
10522
|
},
|
|
10471
10523
|
{
|
|
10472
10524
|
id: EDefaultImagery.BingMapsRoads,
|
|
10473
10525
|
name: "Bing Maps Roads",
|
|
10474
|
-
iconUrl: "https://template.
|
|
10526
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/24d5031c-9e3d-42b4-9067-6d6e763e3bc2?cc=1"
|
|
10475
10527
|
},
|
|
10476
10528
|
{
|
|
10477
10529
|
id: EDefaultImagery.MapboxSatellite,
|
|
10478
10530
|
name: "Mapbox Satellite",
|
|
10479
|
-
iconUrl: "https://template.
|
|
10531
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/80408e6f-f225-484f-8b50-698d6b367c89?cc=1"
|
|
10480
10532
|
},
|
|
10481
10533
|
{
|
|
10482
10534
|
id: EDefaultImagery.MapBoxStreets,
|
|
10483
10535
|
name: "Mapbox Streets",
|
|
10484
|
-
iconUrl: "https://template.
|
|
10536
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/8adcb13e-2289-4672-8218-381adae37c72?cc=1"
|
|
10485
10537
|
},
|
|
10486
10538
|
{
|
|
10487
10539
|
id: EDefaultImagery.MapBoxStreetsClassic,
|
|
10488
10540
|
name: "Mapbox Streets Classic",
|
|
10489
|
-
iconUrl: "https://template.
|
|
10541
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/8371bab5-9e32-4597-9405-842ec12c93b6?cc=1"
|
|
10490
10542
|
},
|
|
10491
10543
|
{
|
|
10492
10544
|
id: EDefaultImagery.EsriWorldImagery,
|
|
10493
10545
|
name: "Esri World Imagery",
|
|
10494
|
-
iconUrl: "https://template.
|
|
10546
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/8331102f-f976-4811-b5a8-947a823ee605?cc=1"
|
|
10495
10547
|
},
|
|
10496
10548
|
{
|
|
10497
10549
|
id: EDefaultImagery.EsriWorldStreetMap,
|
|
10498
10550
|
name: "Esri World Street Map",
|
|
10499
|
-
iconUrl: "https://template.
|
|
10551
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/1057b493-c1cb-4fbd-ba6a-a2aa18e7961f?cc=1"
|
|
10500
10552
|
},
|
|
10501
10553
|
{
|
|
10502
10554
|
id: EDefaultImagery.EsriNationalGeographic,
|
|
10503
10555
|
name: "Esri National Geographic",
|
|
10504
|
-
iconUrl: "https://template.
|
|
10556
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/ee0c1425-d775-4f35-971a-14f032d34f35?cc=1"
|
|
10505
10557
|
},
|
|
10506
10558
|
{
|
|
10507
10559
|
id: EDefaultImagery.OpenStreetMap,
|
|
10508
10560
|
name: "Open Street Map",
|
|
10509
|
-
iconUrl: "https://template.
|
|
10561
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/df78c884-983e-4827-8aa3-eb6403ec0b5e?cc=1"
|
|
10510
10562
|
},
|
|
10511
10563
|
{
|
|
10512
10564
|
id: EDefaultImagery.LINZ,
|
|
10513
10565
|
name: "LINZ",
|
|
10514
|
-
iconUrl: "https://template.
|
|
10566
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/023fca3d-d849-45df-a0c8-511cebc98414?cc=1"
|
|
10515
10567
|
},
|
|
10516
10568
|
{
|
|
10517
10569
|
id: EDefaultImagery.StamenWaterColor,
|
|
10518
10570
|
name: "Stamen Water Color",
|
|
10519
|
-
iconUrl: "https://template.
|
|
10571
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/4d8b29e2-0df3-43de-aaf4-0e788cd1642a?cc=1"
|
|
10520
10572
|
},
|
|
10521
10573
|
{
|
|
10522
10574
|
id: EDefaultImagery.StamenToner,
|
|
10523
10575
|
name: "Stamen Toner",
|
|
10524
|
-
iconUrl: "https://template.
|
|
10576
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/d5b9fa60-4fb3-4c2f-914c-b6d3016ecb54?cc=1"
|
|
10525
10577
|
},
|
|
10526
10578
|
{
|
|
10527
10579
|
id: EDefaultImagery.ThunderforestCycle,
|
|
@@ -10558,12 +10610,12 @@
|
|
|
10558
10610
|
{
|
|
10559
10611
|
id: EDefaultTerrain.CesiumWorldTerrain,
|
|
10560
10612
|
name: "Cesium World Terrain",
|
|
10561
|
-
iconUrl: "https://template.
|
|
10613
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/b3486042-c2d8-4588-85e8-0bba2c0ccb80?cc=1"
|
|
10562
10614
|
},
|
|
10563
10615
|
{
|
|
10564
10616
|
id: EDefaultTerrain.LINZ,
|
|
10565
10617
|
name: "LINZ",
|
|
10566
|
-
iconUrl: "https://template.
|
|
10618
|
+
iconUrl: "https://template.api.nextspace-uat-aus.net/file/023fca3d-d849-45df-a0c8-511cebc98414?cc=1"
|
|
10567
10619
|
},
|
|
10568
10620
|
{
|
|
10569
10621
|
id: EDefaultTerrain.FlatTerrain,
|
|
@@ -14908,7 +14960,7 @@
|
|
|
14908
14960
|
})(exports.Scenario || (exports.Scenario = {}));
|
|
14909
14961
|
|
|
14910
14962
|
// This is updated with the package.json version on build.
|
|
14911
|
-
const VERSION = "5.
|
|
14963
|
+
const VERSION = "5.7.1";
|
|
14912
14964
|
|
|
14913
14965
|
exports.VERSION = VERSION;
|
|
14914
14966
|
exports.AbstractApi = AbstractApi;
|