@itwin/core-frontend
Version:
iTwin.js frontend components
80 lines • 4.03 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Properties
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.EngineeringLengthDescription = exports.SurveyLengthDescription = exports.LengthDescription = void 0;
const IModelApp_1 = require("../IModelApp");
const QuantityFormatter_1 = require("../quantity-formatting/QuantityFormatter");
const FormattedQuantityDescription_1 = require("./FormattedQuantityDescription");
/**
* Length Property Description
* @beta
*/
class LengthDescription extends FormattedQuantityDescription_1.FormattedQuantityDescription {
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
const defaultName = "length";
super({
name: name ? name : defaultName,
displayLabel: displayLabel ? displayLabel : IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.Length"),
kindOfQuantityName: kindOfQuantityName ? kindOfQuantityName : "AecUnits.LENGTH",
iconSpec,
});
}
get formatterQuantityType() { return QuantityFormatter_1.QuantityType.Length; }
/**
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `kindOfQuantityName` property instead.
*/
get quantityType() { return "Length"; }
get parseError() { return IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.UnableToParseLength"); }
}
exports.LengthDescription = LengthDescription;
/**
* Survey Length Property Description
* @beta
*/
class SurveyLengthDescription extends FormattedQuantityDescription_1.FormattedQuantityDescription {
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
const defaultName = "surveyLength";
super({
name: name ? name : defaultName,
displayLabel: displayLabel ? displayLabel : IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.Length"),
kindOfQuantityName: kindOfQuantityName ? kindOfQuantityName : "AecUnits.LENGTH",
iconSpec,
});
}
get formatterQuantityType() { return QuantityFormatter_1.QuantityType.LengthSurvey; }
/**
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `kindOfQuantityName` property instead.
*/
get quantityType() { return "LengthSurvey"; }
get parseError() { return IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.UnableToParseLength"); }
}
exports.SurveyLengthDescription = SurveyLengthDescription;
/**
* Engineering Length Property Description
* @beta
*/
class EngineeringLengthDescription extends FormattedQuantityDescription_1.FormattedQuantityDescription {
constructor(name, displayLabel, iconSpec, kindOfQuantityName) {
const defaultName = "engineeringLength";
super({
name: name ? name : defaultName,
displayLabel: displayLabel ? displayLabel : IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.Length"),
kindOfQuantityName: kindOfQuantityName ? kindOfQuantityName : "AecUnits.LENGTH",
iconSpec,
});
}
get formatterQuantityType() { return QuantityFormatter_1.QuantityType.LengthEngineering; }
/**
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `kindOfQuantityName` property instead.
*/
get quantityType() { return "LengthEngineering"; }
get parseError() { return IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Properties.UnableToParseLength"); }
}
exports.EngineeringLengthDescription = EngineeringLengthDescription;
//# sourceMappingURL=LengthDescription.js.map
;