@itwin/rpcinterface-full-stack-tests 5.4.0-dev.10 → 5.4.0-dev.12
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/lib/dist/bundled-tests.js +64 -45
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-24291b.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_3_4__loaders_gl_core_4_3_4_node_modu-4c1fc9.bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -185489,10 +185489,10 @@ class AngleDescription extends _FormattedQuantityDescription__WEBPACK_IMPORTED_M
|
|
|
185489
185489
|
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
|
|
185490
185490
|
const defaultName = "angle";
|
|
185491
185491
|
super({
|
|
185492
|
-
name: name
|
|
185493
|
-
displayLabel: displayLabel
|
|
185494
|
-
kindOfQuantityName: kindOfQuantityName
|
|
185495
|
-
iconSpec
|
|
185492
|
+
name: name ?? defaultName,
|
|
185493
|
+
displayLabel: displayLabel ?? _IModelApp__WEBPACK_IMPORTED_MODULE_0__.IModelApp.localization.getLocalizedString("iModelJs:Properties.Angle"),
|
|
185494
|
+
kindOfQuantityName: kindOfQuantityName ?? "DefaultToolsUnits.ANGLE",
|
|
185495
|
+
iconSpec,
|
|
185496
185496
|
});
|
|
185497
185497
|
}
|
|
185498
185498
|
get formatterQuantityType() { return _quantity_formatting_QuantityFormatter__WEBPACK_IMPORTED_MODULE_1__.QuantityType.Angle; }
|
|
@@ -185624,9 +185624,9 @@ class LengthDescription extends _FormattedQuantityDescription__WEBPACK_IMPORTED_
|
|
|
185624
185624
|
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
|
|
185625
185625
|
const defaultName = "length";
|
|
185626
185626
|
super({
|
|
185627
|
-
name: name
|
|
185628
|
-
displayLabel: displayLabel
|
|
185629
|
-
kindOfQuantityName: kindOfQuantityName
|
|
185627
|
+
name: name ?? defaultName,
|
|
185628
|
+
displayLabel: displayLabel ?? _IModelApp__WEBPACK_IMPORTED_MODULE_0__.IModelApp.localization.getLocalizedString("iModelJs:Properties.Length"),
|
|
185629
|
+
kindOfQuantityName: kindOfQuantityName ?? "DefaultToolsUnits.LENGTH",
|
|
185630
185630
|
iconSpec,
|
|
185631
185631
|
});
|
|
185632
185632
|
}
|
|
@@ -185645,9 +185645,9 @@ class SurveyLengthDescription extends _FormattedQuantityDescription__WEBPACK_IMP
|
|
|
185645
185645
|
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
|
|
185646
185646
|
const defaultName = "surveyLength";
|
|
185647
185647
|
super({
|
|
185648
|
-
name: name
|
|
185649
|
-
displayLabel: displayLabel
|
|
185650
|
-
kindOfQuantityName: kindOfQuantityName
|
|
185648
|
+
name: name ?? defaultName,
|
|
185649
|
+
displayLabel: displayLabel ?? _IModelApp__WEBPACK_IMPORTED_MODULE_0__.IModelApp.localization.getLocalizedString("iModelJs:Properties.Length"),
|
|
185650
|
+
kindOfQuantityName: kindOfQuantityName ?? "CivilUnits.LENGTH",
|
|
185651
185651
|
iconSpec,
|
|
185652
185652
|
});
|
|
185653
185653
|
}
|
|
@@ -185666,9 +185666,9 @@ class EngineeringLengthDescription extends _FormattedQuantityDescription__WEBPAC
|
|
|
185666
185666
|
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
|
|
185667
185667
|
const defaultName = "engineeringLength";
|
|
185668
185668
|
super({
|
|
185669
|
-
name: name
|
|
185670
|
-
displayLabel: displayLabel
|
|
185671
|
-
kindOfQuantityName: kindOfQuantityName
|
|
185669
|
+
name: name ?? defaultName,
|
|
185670
|
+
displayLabel: displayLabel ?? _IModelApp__WEBPACK_IMPORTED_MODULE_0__.IModelApp.localization.getLocalizedString("iModelJs:Properties.Length"),
|
|
185671
|
+
kindOfQuantityName: kindOfQuantityName ?? "AecUnits.LENGTH",
|
|
185672
185672
|
iconSpec,
|
|
185673
185673
|
});
|
|
185674
185674
|
}
|
|
@@ -186259,13 +186259,14 @@ class QuantityTypeFormatsProvider {
|
|
|
186259
186259
|
this._removeListeners.forEach(listener => listener());
|
|
186260
186260
|
}
|
|
186261
186261
|
_kindOfQuantityMap = new Map([
|
|
186262
|
-
["
|
|
186263
|
-
["
|
|
186264
|
-
["
|
|
186265
|
-
["
|
|
186266
|
-
["
|
|
186267
|
-
["
|
|
186268
|
-
["
|
|
186262
|
+
["DefaultToolsUnits.LENGTH", QuantityType.Length],
|
|
186263
|
+
["DefaultToolsUnits.ANGLE", QuantityType.Angle],
|
|
186264
|
+
["DefaultToolsUnits.AREA", QuantityType.Area],
|
|
186265
|
+
["DefaultToolsUnits.VOLUME", QuantityType.Volume],
|
|
186266
|
+
["DefaultToolsUnits.LENGTH_COORDINATE", QuantityType.Coordinate],
|
|
186267
|
+
["CivilUnits.STATION", QuantityType.Stationing],
|
|
186268
|
+
["CivilUnits.LENGTH", QuantityType.LengthSurvey],
|
|
186269
|
+
["AecUnits.LENGTH", QuantityType.LengthEngineering]
|
|
186269
186270
|
]);
|
|
186270
186271
|
async getFormat(name) {
|
|
186271
186272
|
const quantityType = this._kindOfQuantityMap.get(name);
|
|
@@ -186493,7 +186494,7 @@ class QuantityFormatter {
|
|
|
186493
186494
|
*/
|
|
186494
186495
|
async onInitialized() {
|
|
186495
186496
|
await this.initializeQuantityTypesRegistry();
|
|
186496
|
-
const initialKoQs = [["
|
|
186497
|
+
const initialKoQs = [["DefaultToolsUnits.LENGTH", "Units.M"], ["DefaultToolsUnits.ANGLE", "Units.RAD"], ["DefaultToolsUnits.AREA", "Units.SQ_M"], ["DefaultToolsUnits.VOLUME", "Units.CUB_M"], ["DefaultToolsUnits.LENGTH_COORDINATE", "Units.M"], ["CivilUnits.STATION", "Units.M"], ["CivilUnits.LENGTH", "Units.M"], ["AecUnits.LENGTH", "Units.M"]];
|
|
186497
186498
|
for (const entry of initialKoQs) {
|
|
186498
186499
|
try {
|
|
186499
186500
|
await this.addFormattingSpecsToRegistry(entry[0], entry[1]);
|
|
@@ -207991,13 +207992,13 @@ class MeasureDistanceTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pr
|
|
|
207991
207992
|
/** @internal */
|
|
207992
207993
|
async onPostInstall() {
|
|
207993
207994
|
await super.onPostInstall();
|
|
207994
|
-
this._lengthFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
207995
|
-
this._angleFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
207995
|
+
this._lengthFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
207996
|
+
this._angleFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.ANGLE", "Units.RAD");
|
|
207996
207997
|
this._removeFormatterListener = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.formatsProvider.onFormatsChanged.addListener(async (args) => {
|
|
207997
|
-
if (args.formatsChanged === "all" || args.formatsChanged.includes("
|
|
207998
|
-
this._lengthFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
207999
|
-
if (args.formatsChanged === "all" || args.formatsChanged.includes("
|
|
208000
|
-
this._angleFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
207998
|
+
if (args.formatsChanged === "all" || args.formatsChanged.includes("DefaultToolsUnits.LENGTH"))
|
|
207999
|
+
this._lengthFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
208000
|
+
if (args.formatsChanged === "all" || args.formatsChanged.includes("DefaultToolsUnits.ANGLE"))
|
|
208001
|
+
this._angleFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.ANGLE", "Units.RAD");
|
|
208001
208002
|
});
|
|
208002
208003
|
this.setupAndPromptForNextAction();
|
|
208003
208004
|
}
|
|
@@ -208479,7 +208480,7 @@ class MeasureLocationTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pr
|
|
|
208479
208480
|
const isSpatial = (undefined !== this.targetView && this.targetView.view.isSpatialView());
|
|
208480
208481
|
const toolTip = document.createElement("div");
|
|
208481
208482
|
let toolTipHtml = "";
|
|
208482
|
-
const coordFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
208483
|
+
const coordFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH_COORDINATE", "Units.M");
|
|
208483
208484
|
if (undefined !== coordFormatterSpec) {
|
|
208484
208485
|
let pointAdjusted = point;
|
|
208485
208486
|
if (isSpatial) {
|
|
@@ -208495,7 +208496,7 @@ class MeasureLocationTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pr
|
|
|
208495
208496
|
toolTipHtml += "<br>";
|
|
208496
208497
|
}
|
|
208497
208498
|
if (isSpatial) {
|
|
208498
|
-
const latLongFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
208499
|
+
const latLongFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.ANGLE", "Units.RAD");
|
|
208499
208500
|
if (undefined !== latLongFormatterSpec && undefined !== coordFormatterSpec) {
|
|
208500
208501
|
try {
|
|
208501
208502
|
const cartographic = await this.iModel.spatialToCartographic(point);
|
|
@@ -208799,17 +208800,17 @@ class MeasureAreaByPointsTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9_
|
|
|
208799
208800
|
const isSpatial = (undefined !== this.targetView && this.targetView.view.isSpatialView());
|
|
208800
208801
|
const toolTip = document.createElement("div");
|
|
208801
208802
|
let toolTipHtml = "";
|
|
208802
|
-
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
208803
|
+
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.AREA", "Units.SQ_M");
|
|
208803
208804
|
if (undefined !== areaFormatterSpec) {
|
|
208804
208805
|
const formattedArea = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(this._area, areaFormatterSpec);
|
|
208805
208806
|
toolTipHtml += `${translateBold("Area") + formattedArea}<br>`;
|
|
208806
208807
|
}
|
|
208807
|
-
const perimeterFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
208808
|
+
const perimeterFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
208808
208809
|
if (undefined !== perimeterFormatterSpec) {
|
|
208809
208810
|
const formattedPerimeter = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(this._perimeter, perimeterFormatterSpec);
|
|
208810
208811
|
toolTipHtml += `${translateBold("Perimeter") + formattedPerimeter}<br>`;
|
|
208811
208812
|
}
|
|
208812
|
-
const coordFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
208813
|
+
const coordFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH_COORDINATE", "Units.M");
|
|
208813
208814
|
if (undefined !== coordFormatterSpec) {
|
|
208814
208815
|
let pointAdjusted = this._centroid.clone();
|
|
208815
208816
|
if (isSpatial) {
|
|
@@ -208848,7 +208849,7 @@ class MeasureAreaByPointsTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9_
|
|
|
208848
208849
|
const toolTip = await this.getMarkerToolTip();
|
|
208849
208850
|
this._acceptedMeasurement = new MeasureMarker("1", toolTip, this._centroid, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(25, 25));
|
|
208850
208851
|
this._marker = undefined;
|
|
208851
|
-
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
208852
|
+
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.AREA", "Units.SQ_M");
|
|
208852
208853
|
if (undefined === areaFormatterSpec)
|
|
208853
208854
|
return;
|
|
208854
208855
|
const formattedTotalArea = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(this._area, areaFormatterSpec);
|
|
@@ -209031,7 +209032,7 @@ class MeasureElementTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pri
|
|
|
209031
209032
|
let toolTipHtml = "";
|
|
209032
209033
|
switch (this.getOperation()) {
|
|
209033
209034
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MassPropertiesOperation.AccumulateLengths: {
|
|
209034
|
-
const distanceFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209035
|
+
const distanceFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
209035
209036
|
if (undefined !== distanceFormatterSpec) {
|
|
209036
209037
|
const formattedLength = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(responseProps.length ? responseProps.length : 0, distanceFormatterSpec);
|
|
209037
209038
|
toolTipHtml += `${translateBold("Length") + formattedLength}<br>`;
|
|
@@ -209039,13 +209040,13 @@ class MeasureElementTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pri
|
|
|
209039
209040
|
break;
|
|
209040
209041
|
}
|
|
209041
209042
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MassPropertiesOperation.AccumulateAreas: {
|
|
209042
|
-
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209043
|
+
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.AREA", "Units.SQ_M");
|
|
209043
209044
|
if (undefined !== areaFormatterSpec) {
|
|
209044
209045
|
const formattedArea = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(responseProps.area ? responseProps.area : 0, areaFormatterSpec);
|
|
209045
209046
|
toolTipHtml += `${translateBold("Area") + formattedArea}<br>`;
|
|
209046
209047
|
}
|
|
209047
209048
|
if (responseProps.perimeter) {
|
|
209048
|
-
const perimeterFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209049
|
+
const perimeterFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
209049
209050
|
if (undefined !== perimeterFormatterSpec) {
|
|
209050
209051
|
const formattedPerimeter = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(responseProps.perimeter, perimeterFormatterSpec);
|
|
209051
209052
|
toolTipHtml += `${translateBold("Perimeter") + formattedPerimeter}<br>`;
|
|
@@ -209054,13 +209055,13 @@ class MeasureElementTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pri
|
|
|
209054
209055
|
break;
|
|
209055
209056
|
}
|
|
209056
209057
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MassPropertiesOperation.AccumulateVolumes: {
|
|
209057
|
-
const volumeFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209058
|
+
const volumeFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.VOLUME", "Units.CUB_M");
|
|
209058
209059
|
if (undefined !== volumeFormatterSpec) {
|
|
209059
209060
|
const formattedVolume = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(responseProps.volume ? responseProps.volume : 0, volumeFormatterSpec);
|
|
209060
209061
|
toolTipHtml += `${translateBold("Volume") + formattedVolume}<br>`;
|
|
209061
209062
|
}
|
|
209062
209063
|
if (responseProps.area) {
|
|
209063
|
-
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209064
|
+
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.AREA", "Units.SQ_M");
|
|
209064
209065
|
if (undefined !== areaFormatterSpec) {
|
|
209065
209066
|
const formattedArea = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(responseProps.area, areaFormatterSpec);
|
|
209066
209067
|
toolTipHtml += `${translateBold("Area") + formattedArea}<br>`;
|
|
@@ -209070,7 +209071,7 @@ class MeasureElementTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pri
|
|
|
209070
209071
|
}
|
|
209071
209072
|
}
|
|
209072
209073
|
if (responseProps.centroid) {
|
|
209073
|
-
const coordFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209074
|
+
const coordFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
209074
209075
|
if (undefined !== coordFormatterSpec) {
|
|
209075
209076
|
let pointAdjusted = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(responseProps.centroid);
|
|
209076
209077
|
if (isSpatial) {
|
|
@@ -209121,21 +209122,21 @@ class MeasureElementTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pri
|
|
|
209121
209122
|
return;
|
|
209122
209123
|
switch (operation) {
|
|
209123
209124
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MassPropertiesOperation.AccumulateLengths:
|
|
209124
|
-
const distanceFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209125
|
+
const distanceFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.LENGTH", "Units.M");
|
|
209125
209126
|
if (undefined === distanceFormatterSpec)
|
|
209126
209127
|
return;
|
|
209127
209128
|
const formattedTotalDistance = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(this._totalValue, distanceFormatterSpec);
|
|
209128
209129
|
this._totalMarker = new MeasureLabel(labelPt, formattedTotalDistance);
|
|
209129
209130
|
break;
|
|
209130
209131
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MassPropertiesOperation.AccumulateAreas:
|
|
209131
|
-
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209132
|
+
const areaFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.AREA", "Units.SQ_M");
|
|
209132
209133
|
if (undefined === areaFormatterSpec)
|
|
209133
209134
|
return;
|
|
209134
209135
|
const formattedTotalArea = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(this._totalValue, areaFormatterSpec);
|
|
209135
209136
|
this._totalMarker = new MeasureLabel(labelPt, formattedTotalArea);
|
|
209136
209137
|
break;
|
|
209137
209138
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MassPropertiesOperation.AccumulateVolumes:
|
|
209138
|
-
const volumeFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("
|
|
209139
|
+
const volumeFormatterSpec = await getFormatterSpecByKoQAndPersistenceUnit("DefaultToolsUnits.VOLUME", "Units.CUB_M");
|
|
209139
209140
|
if (undefined === volumeFormatterSpec)
|
|
209140
209141
|
return;
|
|
209141
209142
|
const formattedTotalVolume = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(this._totalValue, volumeFormatterSpec);
|
|
@@ -336433,7 +336434,25 @@ class Formatter {
|
|
|
336433
336434
|
return { componentText: "", isNegative: false };
|
|
336434
336435
|
}
|
|
336435
336436
|
if (i < (spec.format.units?.length ?? 0) - 1) {
|
|
336436
|
-
|
|
336437
|
+
let wholePart = Math.trunc(unitValue);
|
|
336438
|
+
// Check if the remaining fractional part will round up to a full unit in the next (smaller) component
|
|
336439
|
+
if (spec.format.type === _FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Fractional && i === spec.unitConversions.length - 2) {
|
|
336440
|
+
// For the second-to-last unit with fractional formatting, check if rounding causes carry-over
|
|
336441
|
+
const fractionalPart = unitValue - wholePart;
|
|
336442
|
+
const nextUnitValue = (0,_Quantity__WEBPACK_IMPORTED_MODULE_3__.applyConversion)(fractionalPart, spec.unitConversions[i + 1].conversion);
|
|
336443
|
+
// Create a FractionalNumeric to determine what the rounded value would be
|
|
336444
|
+
const fn = new FractionalNumeric(Math.abs(nextUnitValue), spec.format.precision, true);
|
|
336445
|
+
// If the fractional numeric rounds to a whole unit (integral part increased due to rounding)
|
|
336446
|
+
// and the next unit value would round to equal the conversion factor, we need to carry it over
|
|
336447
|
+
const roundedNextValue = parseFloat(fn.getIntegralString());
|
|
336448
|
+
const expectedNextValue = Math.floor(Math.abs(nextUnitValue));
|
|
336449
|
+
// Check if rounding caused the value to reach the conversion factor (1 full unit of the parent)
|
|
336450
|
+
const conversionFactor = spec.unitConversions[i + 1].conversion.factor;
|
|
336451
|
+
if (roundedNextValue > expectedNextValue && Math.abs(roundedNextValue - conversionFactor) < this.FPV_MINTHRESHOLD) {
|
|
336452
|
+
// The rounding caused a carry-over to a full parent unit, add 1 to the current unit's whole part
|
|
336453
|
+
wholePart += (unitValue >= 0 ? 1 : -1);
|
|
336454
|
+
}
|
|
336455
|
+
}
|
|
336437
336456
|
const componentText = Formatter.formatCompositePart(Math.abs(wholePart), false, currentLabel, spec);
|
|
336438
336457
|
remainingMagnitude = unitValue - wholePart;
|
|
336439
336458
|
compositeStrings.push(componentText);
|
|
@@ -339179,7 +339198,7 @@ class TestContext {
|
|
|
339179
339198
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
339180
339199
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
339181
339200
|
await core_frontend_1.NoRenderApp.startup({
|
|
339182
|
-
applicationVersion: "5.4.0-dev.
|
|
339201
|
+
applicationVersion: "5.4.0-dev.12",
|
|
339183
339202
|
applicationId: this.settings.gprid,
|
|
339184
339203
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
339185
339204
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -364474,7 +364493,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
364474
364493
|
/***/ ((module) => {
|
|
364475
364494
|
|
|
364476
364495
|
"use strict";
|
|
364477
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.4.0-dev.
|
|
364496
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.4.0-dev.12","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"5.2.2-dev.2","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.3.12","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
364478
364497
|
|
|
364479
364498
|
/***/ }),
|
|
364480
364499
|
|