@itwin/core-quantity 3.1.0-dev.8 → 3.2.0-dev.3
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/CHANGELOG.md +17 -1
- package/lib/cjs/Exception.d.ts.map +1 -1
- package/lib/cjs/Exception.js +1 -0
- package/lib/cjs/Exception.js.map +1 -1
- package/lib/cjs/Formatter/Format.d.ts +37 -41
- package/lib/cjs/Formatter/Format.d.ts.map +1 -1
- package/lib/cjs/Formatter/Format.js +117 -341
- package/lib/cjs/Formatter/Format.js.map +1 -1
- package/lib/cjs/Formatter/FormatEnums.d.ts +46 -1
- package/lib/cjs/Formatter/FormatEnums.d.ts.map +1 -1
- package/lib/cjs/Formatter/FormatEnums.js +219 -2
- package/lib/cjs/Formatter/FormatEnums.js.map +1 -1
- package/lib/cjs/Formatter/FormatterSpec.js +1 -1
- package/lib/cjs/Formatter/FormatterSpec.js.map +1 -1
- package/lib/cjs/Interfaces.d.ts +9 -1
- package/lib/cjs/Interfaces.d.ts.map +1 -1
- package/lib/cjs/Interfaces.js.map +1 -1
- package/lib/esm/Exception.d.ts.map +1 -1
- package/lib/esm/Exception.js +2 -1
- package/lib/esm/Exception.js.map +1 -1
- package/lib/esm/Formatter/Format.d.ts +37 -41
- package/lib/esm/Formatter/Format.d.ts.map +1 -1
- package/lib/esm/Formatter/Format.js +116 -341
- package/lib/esm/Formatter/Format.js.map +1 -1
- package/lib/esm/Formatter/FormatEnums.d.ts +46 -1
- package/lib/esm/Formatter/FormatEnums.d.ts.map +1 -1
- package/lib/esm/Formatter/FormatEnums.js +205 -1
- package/lib/esm/Formatter/FormatEnums.js.map +1 -1
- package/lib/esm/Formatter/FormatterSpec.js +1 -1
- package/lib/esm/Formatter/FormatterSpec.js.map +1 -1
- package/lib/esm/Interfaces.d.ts +9 -1
- package/lib/esm/Interfaces.d.ts.map +1 -1
- package/lib/esm/Interfaces.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @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EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;CACF;AAzFD,sCAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Quantity\r\n */\r\n\r\nimport { UnitConversion, UnitConversionSpec, UnitProps, UnitsProvider } from \"../Interfaces\";\r\nimport { Format } from \"./Format\";\r\nimport { Formatter } from \"./Formatter\";\r\n\r\n// cSpell:ignore ZERONORMALIZED, nosign, onlynegative, signalways, negativeparentheses\r\n// cSpell:ignore trailzeroes, keepsinglezero, zeroempty, keepdecimalpoint, applyrounding, fractiondash, showunitlabel, prependunitlabel, exponentonlynegative\r\n\r\n/** A class that contains both formatting information and the conversion factors necessary to convert from an input unit to the units specified in the format.\r\n * Once created the FormatterSpec will be able to format quantity values with synchronous calls.\r\n * @beta\r\n */\r\nexport class FormatterSpec {\r\n protected _name: string;\r\n protected _conversions: UnitConversionSpec[] = []; // max four entries\r\n protected _format: Format;\r\n protected _persistenceUnit: UnitProps;\r\n\r\n /** Constructor\r\n * @param name The name of a format specification.\r\n * @param format Defines the output format for the quantity value.\r\n * @param conversions An array of conversion factors necessary to convert from an input unit to the units specified in the format.\r\n * @param persistenceUnit The unit the magnitude value is input.\r\n */\r\n constructor(name: string, format: Format, conversions?: UnitConversionSpec[], persistenceUnit?: UnitProps) {\r\n if (!persistenceUnit) {\r\n if (format.units) {\r\n const [props] = format.units[0];\r\n persistenceUnit = props;\r\n } else {\r\n throw new Error(\"Formatter Spec needs persistence unit to be specified\");\r\n }\r\n }\r\n\r\n this._name = name;\r\n this._format = format;\r\n this._persistenceUnit = persistenceUnit;\r\n if (conversions) this._conversions = conversions;\r\n }\r\n\r\n public get name(): string { return this._name; }\r\n /** Returns an array of UnitConversionSpecs, one for each unit that is to be shown in the formatted quantity string. */\r\n public get unitConversions(): UnitConversionSpec[] { return this._conversions; }\r\n public get format(): Format { return this._format; }\r\n public get persistenceUnit(): UnitProps { return this._persistenceUnit; }\r\n\r\n /** Get an array of UnitConversionSpecs, one for each unit that is to be shown in the formatted quantity string. */\r\n public static async getUnitConversions(format: Format, unitsProvider: UnitsProvider, inputUnit?: UnitProps): Promise<UnitConversionSpec[]> {\r\n const conversions: UnitConversionSpec[] = [];\r\n let persistenceUnit = inputUnit;\r\n if (!persistenceUnit) {\r\n if (format.units) {\r\n const [props] = format.units[0];\r\n persistenceUnit = props;\r\n } else {\r\n throw new Error(\"Formatter Spec needs persistence unit to be specified\");\r\n }\r\n }\r\n\r\n if (format.units) {\r\n let convertFromUnit = inputUnit;\r\n for (const unit of format.units) {\r\n let unitConversion: UnitConversion;\r\n if (convertFromUnit) {\r\n unitConversion = await unitsProvider.getConversion(convertFromUnit, unit[0]);\r\n } else {\r\n unitConversion = { factor: 1.0, offset: 0.0 };\r\n }\r\n const unitLabel = (unit[1] && unit[1]!.length > 0) ? unit[1]! : unit[0].label;\r\n const spec = ({ name: unit[0].name, label: unitLabel, conversion: unitConversion, system: unit[0].system }) as UnitConversionSpec;\r\n\r\n conversions.push(spec);\r\n convertFromUnit = unit[0];\r\n }\r\n } else {\r\n // if format is only numeric and a input unit is defined set spec to use the input unit as the format unit\r\n if (inputUnit) {\r\n const spec: UnitConversionSpec = { name: inputUnit.name, label: inputUnit.label, system: inputUnit.system, conversion: { factor: 1.0, offset: 0.0 } };\r\n conversions.push(spec);\r\n }\r\n }\r\n\r\n return conversions;\r\n }\r\n\r\n /** Static async method to create a FormatSpec given the format and unit of the quantity that will be passed to the Formatter. The input unit will\r\n * be used to generate conversion information for each unit specified in the Format. This method is async due to the fact that the units provider must make\r\n * async calls to lookup unit definitions.\r\n * @param name The name of a format specification.\r\n * @param unitsProvider The units provider is used to look up unit definitions and provide conversion information for converting between units.\r\n * @param inputUnit The unit the value to be formatted. This unit is often referred to as persistence unit.\r\n */\r\n public static async create(name: string, format: Format, unitsProvider: UnitsProvider, inputUnit?: UnitProps): Promise<FormatterSpec> {\r\n const conversions: UnitConversionSpec[] = await FormatterSpec.getUnitConversions(format, unitsProvider, inputUnit);\r\n return new FormatterSpec(name, format, conversions, inputUnit);\r\n }\r\n\r\n /** Format a quantity value. */\r\n public applyFormatting(magnitude: number): string {\r\n return Formatter.formatQuantity(magnitude, this);\r\n }\r\n}\r\n"]}
|
package/lib/cjs/Interfaces.d.ts
CHANGED
|
@@ -61,12 +61,20 @@ export interface PotentialParseUnit {
|
|
|
61
61
|
unitName: string;
|
|
62
62
|
altLabels?: string[];
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* This interface defines extra properties to be associated with Units from Units Schema by name
|
|
66
|
+
* @alpha
|
|
67
|
+
*/
|
|
68
|
+
export interface UnitExtraData {
|
|
69
|
+
readonly name: string;
|
|
70
|
+
readonly altDisplayLabels: string[];
|
|
71
|
+
}
|
|
64
72
|
/** This interface is implemented by the class that is responsible for locating units by name or label and providing conversion values between units.
|
|
65
73
|
* The methods to be implemented are async allowing the UnitsProvider to query the backend when necessary to look up unit definition and conversion rules.
|
|
66
74
|
* @beta
|
|
67
75
|
*/
|
|
68
76
|
export interface UnitsProvider {
|
|
69
|
-
findUnit(unitLabel: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps>;
|
|
77
|
+
findUnit(unitLabel: string, schemaName?: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps>;
|
|
70
78
|
getUnitsByFamily(phenomenon: string): Promise<UnitProps[]>;
|
|
71
79
|
findUnitByName(unitName: string): Promise<UnitProps>;
|
|
72
80
|
getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversion>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Interfaces.d.ts","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB,EAAE,CAAC,IAAI,E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;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/G,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3D,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACrD,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAChF;AAED;;;GAGG;AACH,oBAAY,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Quantity\r\n */\r\n\r\n/** This interface allows a provider to be specified that will define an array of alternate labels for a specific unit.\r\n * @beta\r\n */\r\nexport interface AlternateUnitLabelsProvider {\r\n getAlternateUnitLabels: (unit: UnitProps) => string[] | undefined;\r\n}\r\n\r\n/** This interface provides basic information about a Unit that is return from a UnitProvider. This info\r\n * uniquely identifies a unit by its name.\r\n * @beta\r\n */\r\nexport interface UnitProps {\r\n /** Unique name for unit. */\r\n readonly name: string;\r\n /** Default label for unit. */\r\n readonly label: string;\r\n /** Unique name of unit phenomenon. Example phenomenon names include 'Units.LENGTH', 'Units.AREA', and 'Units.VOLUME' */\r\n readonly phenomenon: string;\r\n /** This is set to true if the Unit is known by the UnitsProvider. */\r\n readonly isValid: boolean;\r\n /** Unique system name. Example \"Units.USCUSTOM\",\" Units.METRIC\", \"Units.USSURVEY\", \"Units.IMPERIAL\" */\r\n readonly system: string;\r\n}\r\n\r\n/** This interface defines the required properties of a Quantity.\r\n * @beta\r\n */\r\nexport interface QuantityProps {\r\n readonly magnitude: number;\r\n readonly unit: UnitProps;\r\n readonly isValid: boolean;\r\n}\r\n\r\n/** Interface that defines how to convert between a specific unit an another in synchronous formatting or parsing processing.\r\n * @beta\r\n */\r\nexport interface UnitConversionSpec {\r\n /** Unit name that was used to locate the unit by the Unit Provider */\r\n name: string;\r\n /** The default label that is used to display unit */\r\n label: string;\r\n /** Unit system name, used to when finding preferred parse unit */\r\n system: string;\r\n /** the information necessary to convert the unit to a specific display unit */\r\n conversion: UnitConversion;\r\n /** Labels that may be used to represent the unit in a string that is to be parsed. */\r\n parseLabels?: string[];\r\n}\r\n\r\n/** This interface defines the properties required to convert a quantity value from one unit to another such as from meters to feet\r\n * or from Celsius to Fahrenheit.\r\n * @beta\r\n */\r\nexport interface UnitConversion {\r\n factor: number;\r\n offset: number;\r\n}\r\n\r\n/** Interface that defines potential parse units that may be found in user's string input of a quantity value.\r\n * @beta\r\n */\r\nexport interface PotentialParseUnit {\r\n unitName: string;\r\n altLabels?: string[];\r\n}\r\n\r\n/** This interface is implemented by the class that is responsible for locating units by name or label and providing conversion values between units.\r\n * The methods to be implemented are async allowing the UnitsProvider to query the backend when necessary to look up unit definition and conversion rules.\r\n * @beta\r\n */\r\nexport interface UnitsProvider {\r\n findUnit(unitLabel: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps>;\r\n getUnitsByFamily(phenomenon: string): Promise<UnitProps[]>;\r\n findUnitByName(unitName: string): Promise<UnitProps>;\r\n getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversion>;\r\n}\r\n\r\n/**\r\n * Used to uniquely identify a unit system.\r\n * @beta\r\n */\r\nexport type UnitSystemKey = \"metric\" | \"imperial\" | \"usCustomary\" | \"usSurvey\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Quantity\r\n */\r\n\r\n/** This interface allows a provider to be specified that will define an array of alternate labels for a specific unit.\r\n * @beta\r\n */\r\nexport interface AlternateUnitLabelsProvider {\r\n getAlternateUnitLabels: (unit: UnitProps) => string[] | undefined;\r\n}\r\n\r\n/** This interface provides basic information about a Unit that is return from a UnitProvider. This info\r\n * uniquely identifies a unit by its name.\r\n * @beta\r\n */\r\nexport interface UnitProps {\r\n /** Unique name for unit. */\r\n readonly name: string;\r\n /** Default label for unit. */\r\n readonly label: string;\r\n /** Unique name of unit phenomenon. Example phenomenon names include 'Units.LENGTH', 'Units.AREA', and 'Units.VOLUME' */\r\n readonly phenomenon: string;\r\n /** This is set to true if the Unit is known by the UnitsProvider. */\r\n readonly isValid: boolean;\r\n /** Unique system name. Example \"Units.USCUSTOM\",\" Units.METRIC\", \"Units.USSURVEY\", \"Units.IMPERIAL\" */\r\n readonly system: string;\r\n}\r\n\r\n/** This interface defines the required properties of a Quantity.\r\n * @beta\r\n */\r\nexport interface QuantityProps {\r\n readonly magnitude: number;\r\n readonly unit: UnitProps;\r\n readonly isValid: boolean;\r\n}\r\n\r\n/** Interface that defines how to convert between a specific unit an another in synchronous formatting or parsing processing.\r\n * @beta\r\n */\r\nexport interface UnitConversionSpec {\r\n /** Unit name that was used to locate the unit by the Unit Provider */\r\n name: string;\r\n /** The default label that is used to display unit */\r\n label: string;\r\n /** Unit system name, used to when finding preferred parse unit */\r\n system: string;\r\n /** the information necessary to convert the unit to a specific display unit */\r\n conversion: UnitConversion;\r\n /** Labels that may be used to represent the unit in a string that is to be parsed. */\r\n parseLabels?: string[];\r\n}\r\n\r\n/** This interface defines the properties required to convert a quantity value from one unit to another such as from meters to feet\r\n * or from Celsius to Fahrenheit.\r\n * @beta\r\n */\r\nexport interface UnitConversion {\r\n factor: number;\r\n offset: number;\r\n}\r\n\r\n/** Interface that defines potential parse units that may be found in user's string input of a quantity value.\r\n * @beta\r\n */\r\nexport interface PotentialParseUnit {\r\n unitName: string;\r\n altLabels?: string[];\r\n}\r\n\r\n/**\r\n * This interface defines extra properties to be associated with Units from Units Schema by name\r\n * @alpha\r\n */\r\nexport interface UnitExtraData {\r\n readonly name: string;\r\n readonly altDisplayLabels: string[];\r\n}\r\n\r\n/** This interface is implemented by the class that is responsible for locating units by name or label and providing conversion values between units.\r\n * The methods to be implemented are async allowing the UnitsProvider to query the backend when necessary to look up unit definition and conversion rules.\r\n * @beta\r\n */\r\nexport interface UnitsProvider {\r\n findUnit(unitLabel: string, schemaName?: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps>;\r\n getUnitsByFamily(phenomenon: string): Promise<UnitProps[]>;\r\n findUnitByName(unitName: string): Promise<UnitProps>;\r\n getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversion>;\r\n}\r\n\r\n/**\r\n * Used to uniquely identify a unit system.\r\n * @beta\r\n */\r\nexport type UnitSystemKey = \"metric\" | \"imperial\" | \"usCustomary\" | \"usSurvey\";\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Exception.d.ts","sourceRoot":"","sources":["../../src/Exception.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Exception.d.ts","sourceRoot":"","sources":["../../src/Exception.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,oBAAY,cAAc;IACxB,mBAAmB,QAAS;IAC5B,OAAO,IAAI;IACX,WAAW,QAA0B;IACrC,sBAAsB,QAA0B;IAChD,2BAA2B,QAA0B;IACrD,0BAA0B,QAA0B;IACpD,8BAA8B,QAA0B;IACxD,WAAW,QAA0B;IACrC,oCAAoC,QAA0B;CAC/D;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;aACD,WAAW,EAAE,MAAM;gBAAnB,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAIlF"}
|
package/lib/esm/Exception.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Quantity
|
|
7
7
|
*/
|
|
8
|
-
import { BentleyError } from "@itwin/core-bentley";
|
|
8
|
+
import { assert, BentleyError } from "@itwin/core-bentley";
|
|
9
9
|
/**
|
|
10
10
|
* Status codes used during Quantity parsing and formatting processing.
|
|
11
11
|
* @beta
|
|
@@ -29,6 +29,7 @@ export class QuantityError extends BentleyError {
|
|
|
29
29
|
constructor(errorNumber, message) {
|
|
30
30
|
super(errorNumber, message);
|
|
31
31
|
this.errorNumber = errorNumber;
|
|
32
|
+
assert(errorNumber !== QuantityStatus.Success, message);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
//# sourceMappingURL=Exception.js.map
|
package/lib/esm/Exception.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../src/Exception.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../src/Exception.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAN,IAAY,cAUX;AAVD,WAAY,cAAc;IACxB,qFAA4B,CAAA;IAC5B,yDAAW,CAAA;IACX,qEAAqC,CAAA;IACrC,2FAAgD,CAAA;IAChD,qGAAqD,CAAA;IACrD,mGAAoD,CAAA;IACpD,2GAAwD,CAAA;IACxD,qEAAqC,CAAA;IACrC,uHAA8D,CAAA;AAChE,CAAC,EAVW,cAAc,KAAd,cAAc,QAUzB;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,YAA4C,WAAmB,EAAE,OAAgB;QAC/E,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QADc,gBAAW,GAAX,WAAW,CAAQ;QAE7D,MAAM,CAAC,WAAW,KAAK,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Quantity\r\n */\r\n\r\nimport { assert, BentleyError } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * Status codes used during Quantity parsing and formatting processing.\r\n * @beta\r\n */\r\nexport enum QuantityStatus {\r\n QUANTITY_ERROR_BASE = 0x88DF,\r\n Success = 0,\r\n InvalidJson = QUANTITY_ERROR_BASE + 1,\r\n InvalidCompositeFormat = QUANTITY_ERROR_BASE + 2,\r\n UnableToGenerateParseTokens = QUANTITY_ERROR_BASE + 3,\r\n NoValueOrUnitFoundInString = QUANTITY_ERROR_BASE + 4,\r\n UnitLabelSuppliedButNotMatched = QUANTITY_ERROR_BASE + 5,\r\n UnknownUnit = QUANTITY_ERROR_BASE + 6,\r\n UnableToConvertParseTokensToQuantity = QUANTITY_ERROR_BASE + 7,\r\n}\r\n\r\n/** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.\r\n * @beta\r\n */\r\nexport class QuantityError extends BentleyError {\r\n public constructor(public override readonly errorNumber: number, message?: string) {\r\n super(errorNumber, message);\r\n assert(errorNumber !== QuantityStatus.Success, message);\r\n }\r\n}\r\n"]}
|
|
@@ -4,84 +4,80 @@
|
|
|
4
4
|
import { UnitProps, UnitsProvider } from "../Interfaces";
|
|
5
5
|
import { DecimalPrecision, FormatTraits, FormatType, FractionalPrecision, ScientificType, ShowSignOption } from "./FormatEnums";
|
|
6
6
|
import { CloneOptions, FormatProps } from "./Interfaces";
|
|
7
|
-
/** A class
|
|
7
|
+
/** A base Format class with shared properties and functionality between quantity and ecschema-metadata Format classes
|
|
8
8
|
* @beta
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class BaseFormat {
|
|
11
11
|
private _name;
|
|
12
12
|
protected _roundFactor: number;
|
|
13
13
|
protected _type: FormatType;
|
|
14
14
|
protected _precision: number;
|
|
15
|
-
protected _minWidth?: number;
|
|
16
|
-
protected _scientificType?: ScientificType;
|
|
17
15
|
protected _showSignOption: ShowSignOption;
|
|
18
16
|
protected _decimalSeparator: string;
|
|
19
17
|
protected _thousandSeparator: string;
|
|
20
18
|
protected _uomSeparator: string;
|
|
21
19
|
protected _stationSeparator: string;
|
|
22
|
-
protected _stationOffsetSize?: number;
|
|
23
20
|
protected _formatTraits: FormatTraits;
|
|
24
21
|
protected _spacer: string;
|
|
25
22
|
protected _includeZero: boolean;
|
|
26
|
-
protected
|
|
27
|
-
protected
|
|
28
|
-
|
|
29
|
-
* @param name The name of a format specification. TODO: make optional or remove
|
|
30
|
-
*/
|
|
23
|
+
protected _minWidth?: number;
|
|
24
|
+
protected _scientificType?: ScientificType;
|
|
25
|
+
protected _stationOffsetSize?: number;
|
|
31
26
|
constructor(name: string);
|
|
32
27
|
get name(): string;
|
|
33
28
|
get roundFactor(): number;
|
|
29
|
+
set roundFactor(roundFactor: number);
|
|
34
30
|
get type(): FormatType;
|
|
31
|
+
set type(formatType: FormatType);
|
|
35
32
|
get precision(): DecimalPrecision | FractionalPrecision;
|
|
33
|
+
set precision(precision: DecimalPrecision | FractionalPrecision);
|
|
36
34
|
get minWidth(): number | undefined;
|
|
35
|
+
set minWidth(minWidth: number | undefined);
|
|
37
36
|
get scientificType(): ScientificType | undefined;
|
|
37
|
+
set scientificType(scientificType: ScientificType | undefined);
|
|
38
38
|
get showSignOption(): ShowSignOption;
|
|
39
|
+
set showSignOption(showSignOption: ShowSignOption);
|
|
39
40
|
get decimalSeparator(): string;
|
|
41
|
+
set decimalSeparator(decimalSeparator: string);
|
|
40
42
|
get thousandSeparator(): string;
|
|
43
|
+
set thousandSeparator(thousandSeparator: string);
|
|
41
44
|
get uomSeparator(): string;
|
|
45
|
+
set uomSeparator(uomSeparator: string);
|
|
42
46
|
get stationSeparator(): string;
|
|
47
|
+
set stationSeparator(stationSeparator: string);
|
|
43
48
|
get stationOffsetSize(): number | undefined;
|
|
49
|
+
set stationOffsetSize(stationOffsetSize: number | undefined);
|
|
44
50
|
get formatTraits(): FormatTraits;
|
|
45
|
-
|
|
46
|
-
get
|
|
51
|
+
set formatTraits(formatTraits: FormatTraits);
|
|
52
|
+
get spacer(): string | undefined;
|
|
53
|
+
set spacer(spacer: string | undefined);
|
|
54
|
+
get includeZero(): boolean | undefined;
|
|
55
|
+
set includeZero(includeZero: boolean | undefined);
|
|
56
|
+
/** This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid FormatType. Throws exception if not valid. */
|
|
57
|
+
parseFormatTraits(formatTraitsFromJson: string | string[]): void;
|
|
58
|
+
/** This method returns true if the formatTrait is set in this Format object. */
|
|
59
|
+
hasFormatTraitSet(formatTrait: FormatTraits): boolean;
|
|
60
|
+
loadFormatProperties(formatProps: FormatProps): void;
|
|
61
|
+
}
|
|
62
|
+
/** A class used to define the specifications for formatting quantity values. This class is typically loaded by reading [[FormatProps]].
|
|
63
|
+
* @beta
|
|
64
|
+
*/
|
|
65
|
+
export declare class Format extends BaseFormat {
|
|
66
|
+
protected _units?: Array<[UnitProps, string | undefined]>;
|
|
67
|
+
protected _customProps?: any;
|
|
68
|
+
/** Constructor
|
|
69
|
+
* @param name The name of a format specification. TODO: make optional or remove
|
|
70
|
+
*/
|
|
71
|
+
constructor(name: string);
|
|
47
72
|
get units(): Array<[UnitProps, string | undefined]> | undefined;
|
|
48
73
|
get hasUnits(): boolean;
|
|
49
74
|
get customProps(): any;
|
|
50
|
-
static scientificTypeToString(scientificType: ScientificType): string;
|
|
51
|
-
/** This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid ScientificType. Throws exception if not valid. */
|
|
52
|
-
static parseScientificType(scientificType: string, formatName: string): ScientificType;
|
|
53
|
-
/** Method used when generating a JSON object that represents this Format. */
|
|
54
|
-
static showSignOptionToString(showSign: ShowSignOption): string;
|
|
55
|
-
/** This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid ShowSignOption. Throws exception if not valid. */
|
|
56
|
-
static parseShowSignOption(showSignOption: string, formatName: string): ShowSignOption;
|
|
57
75
|
static isFormatTraitSetInProps(formatProps: FormatProps, trait: FormatTraits): boolean;
|
|
58
|
-
/** Get string used in FormatProps */
|
|
59
|
-
static getTraitString(trait: FormatTraits): "trailZeroes" | "keepSingleZero" | "zeroEmpty" | "keepDecimalPoint" | "applyRounding" | "fractionDash" | "showUnitLabel" | "prependUnitLabel" | "use1000Separator" | "exponentOnlyNegative";
|
|
60
|
-
/** Method used when generating a JSON object that represents this Format. */
|
|
61
|
-
static formatTraitsToArray(currentFormatTrait: FormatTraits): string[];
|
|
62
|
-
/** This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid FormatTrait. Throws exception if not valid. */
|
|
63
|
-
static parseFormatTrait(stringToCheck: string, currentFormatTrait: number): FormatTraits;
|
|
64
|
-
/** Get FormatTrait from entry in FormatProps */
|
|
65
|
-
static parseFormatTraits(formatTraitsFromJson: string | string[] | undefined): FormatTraits | undefined;
|
|
66
|
-
/** Method used when generating a JSON object that represents this Format. */
|
|
67
|
-
static formatTypeToString(type: FormatType): string;
|
|
68
|
-
/** This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid FormatType. Throws exception if not valid. */
|
|
69
|
-
static parseFormatType(jsonObjType: string, formatName: string): FormatType;
|
|
70
|
-
/** This method validates the input value, that is typically extracted for persisted JSON data, is a valid DecimalPrecision. Throws exception if not valid. */
|
|
71
|
-
static parseDecimalPrecision(jsonObjPrecision: number): DecimalPrecision;
|
|
72
|
-
/** This method validates the input value, that is typically extracted for persisted JSON data, is a valid FractionalPrecision. Throws exception if not valid. */
|
|
73
|
-
static parseFractionalPrecision(jsonObjPrecision: number, formatName: string): FractionalPrecision;
|
|
74
|
-
/** This method validates the input value, that is typically extracted for persisted JSON data, is a valid DecimalPrecision or FractionalPrecision. Throws exception if not valid. */
|
|
75
|
-
static parsePrecision(precision: number, formatName: string, type: FormatType): DecimalPrecision | FractionalPrecision;
|
|
76
|
-
private verifyFormatTraitsOptions;
|
|
77
|
-
/** This method returns true if the formatTrait is set in this Format object. */
|
|
78
|
-
hasFormatTraitSet(formatTrait: FormatTraits): boolean;
|
|
79
76
|
private createUnit;
|
|
80
77
|
/**
|
|
81
78
|
* Clone Format
|
|
82
79
|
*/
|
|
83
80
|
clone(options?: CloneOptions): Format;
|
|
84
|
-
private loadFormatProperties;
|
|
85
81
|
/**
|
|
86
82
|
* Populates this Format with the values from the provided.
|
|
87
83
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Format.d.ts","sourceRoot":"","sources":["../../../src/Formatter/Format.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"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