@itwin/core-quantity 4.0.0-dev.52 → 4.0.0-dev.54
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/cjs/Constants.d.ts +27 -27
- package/lib/cjs/Constants.js +52 -52
- package/lib/cjs/Constants.js.map +1 -1
- package/lib/cjs/Exception.d.ts +26 -26
- package/lib/cjs/Exception.js +38 -38
- package/lib/cjs/Exception.js.map +1 -1
- package/lib/cjs/Formatter/Format.d.ts +91 -91
- package/lib/cjs/Formatter/Format.js +328 -328
- package/lib/cjs/Formatter/Format.js.map +1 -1
- package/lib/cjs/Formatter/FormatEnums.d.ts +133 -133
- package/lib/cjs/Formatter/FormatEnums.js +318 -318
- package/lib/cjs/Formatter/FormatEnums.js.map +1 -1
- package/lib/cjs/Formatter/Formatter.d.ts +44 -44
- package/lib/cjs/Formatter/Formatter.js +371 -371
- package/lib/cjs/Formatter/Formatter.js.map +1 -1
- package/lib/cjs/Formatter/FormatterSpec.d.ts +39 -39
- package/lib/cjs/Formatter/FormatterSpec.js +101 -101
- package/lib/cjs/Formatter/FormatterSpec.js.map +1 -1
- package/lib/cjs/Formatter/Interfaces.d.ts +62 -62
- package/lib/cjs/Formatter/Interfaces.js +17 -17
- package/lib/cjs/Formatter/Interfaces.js.map +1 -1
- package/lib/cjs/Interfaces.d.ts +86 -86
- package/lib/cjs/Interfaces.d.ts.map +1 -1
- package/lib/cjs/Interfaces.js +9 -9
- package/lib/cjs/Interfaces.js.map +1 -1
- package/lib/cjs/Parser.d.ts +93 -93
- package/lib/cjs/Parser.d.ts.map +1 -1
- package/lib/cjs/Parser.js +592 -592
- package/lib/cjs/Parser.js.map +1 -1
- package/lib/cjs/ParserSpec.d.ts +34 -34
- package/lib/cjs/ParserSpec.js +47 -47
- package/lib/cjs/ParserSpec.js.map +1 -1
- package/lib/cjs/Quantity.d.ts +27 -27
- package/lib/cjs/Quantity.js +46 -46
- package/lib/cjs/Quantity.js.map +1 -1
- package/lib/cjs/Unit.d.ts +25 -25
- package/lib/cjs/Unit.js +44 -44
- package/lib/cjs/Unit.js.map +1 -1
- package/lib/cjs/core-quantity.d.ts +19 -19
- package/lib/cjs/core-quantity.js +39 -35
- package/lib/cjs/core-quantity.js.map +1 -1
- package/lib/esm/Constants.d.ts +27 -27
- package/lib/esm/Constants.js +49 -48
- package/lib/esm/Constants.js.map +1 -1
- package/lib/esm/Exception.d.ts +26 -26
- package/lib/esm/Exception.js +34 -34
- package/lib/esm/Exception.js.map +1 -1
- package/lib/esm/Formatter/Format.d.ts +91 -91
- package/lib/esm/Formatter/Format.js +323 -323
- package/lib/esm/Formatter/Format.js.map +1 -1
- package/lib/esm/Formatter/FormatEnums.d.ts +133 -133
- package/lib/esm/Formatter/FormatEnums.js +302 -302
- package/lib/esm/Formatter/FormatEnums.js.map +1 -1
- package/lib/esm/Formatter/Formatter.d.ts +44 -44
- package/lib/esm/Formatter/Formatter.js +368 -367
- package/lib/esm/Formatter/Formatter.js.map +1 -1
- package/lib/esm/Formatter/FormatterSpec.d.ts +39 -39
- package/lib/esm/Formatter/FormatterSpec.js +97 -97
- package/lib/esm/Formatter/FormatterSpec.js.map +1 -1
- package/lib/esm/Formatter/Interfaces.d.ts +62 -62
- package/lib/esm/Formatter/Interfaces.js +13 -13
- package/lib/esm/Formatter/Interfaces.js.map +1 -1
- package/lib/esm/Interfaces.d.ts +86 -86
- package/lib/esm/Interfaces.d.ts.map +1 -1
- package/lib/esm/Interfaces.js +8 -8
- package/lib/esm/Interfaces.js.map +1 -1
- package/lib/esm/Parser.d.ts +93 -93
- package/lib/esm/Parser.d.ts.map +1 -1
- package/lib/esm/Parser.js +589 -588
- package/lib/esm/Parser.js.map +1 -1
- package/lib/esm/ParserSpec.d.ts +34 -34
- package/lib/esm/ParserSpec.js +43 -43
- package/lib/esm/ParserSpec.js.map +1 -1
- package/lib/esm/Quantity.d.ts +27 -27
- package/lib/esm/Quantity.js +42 -42
- package/lib/esm/Quantity.js.map +1 -1
- package/lib/esm/Unit.d.ts +25 -25
- package/lib/esm/Unit.js +39 -39
- package/lib/esm/Unit.js.map +1 -1
- package/lib/esm/core-quantity.d.ts +19 -19
- package/lib/esm/core-quantity.js +23 -23
- package/lib/esm/core-quantity.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Quantity
|
|
3
|
-
*/
|
|
4
|
-
import { UnitProps, UnitsProvider } from "../Interfaces";
|
|
5
|
-
import { DecimalPrecision, FormatTraits, FormatType, FractionalPrecision, ScientificType, ShowSignOption } from "./FormatEnums";
|
|
6
|
-
import { CloneOptions, FormatProps } from "./Interfaces";
|
|
7
|
-
/** A base Format class with shared properties and functionality between quantity and ecschema-metadata Format classes
|
|
8
|
-
* @beta
|
|
9
|
-
*/
|
|
10
|
-
export declare class BaseFormat {
|
|
11
|
-
private _name;
|
|
12
|
-
protected _roundFactor: number;
|
|
13
|
-
protected _type: FormatType;
|
|
14
|
-
protected _precision: number;
|
|
15
|
-
protected _showSignOption: ShowSignOption;
|
|
16
|
-
protected _decimalSeparator: string;
|
|
17
|
-
protected _thousandSeparator: string;
|
|
18
|
-
protected _uomSeparator: string;
|
|
19
|
-
protected _stationSeparator: string;
|
|
20
|
-
protected _formatTraits: FormatTraits;
|
|
21
|
-
protected _spacer: string;
|
|
22
|
-
protected _includeZero: boolean;
|
|
23
|
-
protected _minWidth?: number;
|
|
24
|
-
protected _scientificType?: ScientificType;
|
|
25
|
-
protected _stationOffsetSize?: number;
|
|
26
|
-
constructor(name: string);
|
|
27
|
-
get name(): string;
|
|
28
|
-
get roundFactor(): number;
|
|
29
|
-
set roundFactor(roundFactor: number);
|
|
30
|
-
get type(): FormatType;
|
|
31
|
-
set type(formatType: FormatType);
|
|
32
|
-
get precision(): DecimalPrecision | FractionalPrecision;
|
|
33
|
-
set precision(precision: DecimalPrecision | FractionalPrecision);
|
|
34
|
-
get minWidth(): number | undefined;
|
|
35
|
-
set minWidth(minWidth: number | undefined);
|
|
36
|
-
get scientificType(): ScientificType | undefined;
|
|
37
|
-
set scientificType(scientificType: ScientificType | undefined);
|
|
38
|
-
get showSignOption(): ShowSignOption;
|
|
39
|
-
set showSignOption(showSignOption: ShowSignOption);
|
|
40
|
-
get decimalSeparator(): string;
|
|
41
|
-
set decimalSeparator(decimalSeparator: string);
|
|
42
|
-
get thousandSeparator(): string;
|
|
43
|
-
set thousandSeparator(thousandSeparator: string);
|
|
44
|
-
get uomSeparator(): string;
|
|
45
|
-
set uomSeparator(uomSeparator: string);
|
|
46
|
-
get stationSeparator(): string;
|
|
47
|
-
set stationSeparator(stationSeparator: string);
|
|
48
|
-
get stationOffsetSize(): number | undefined;
|
|
49
|
-
set stationOffsetSize(stationOffsetSize: number | undefined);
|
|
50
|
-
get formatTraits(): FormatTraits;
|
|
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);
|
|
72
|
-
get units(): Array<[UnitProps, string | undefined]> | undefined;
|
|
73
|
-
get hasUnits(): boolean;
|
|
74
|
-
get customProps(): any;
|
|
75
|
-
static isFormatTraitSetInProps(formatProps: FormatProps, trait: FormatTraits): boolean;
|
|
76
|
-
private createUnit;
|
|
77
|
-
/**
|
|
78
|
-
* Clone Format
|
|
79
|
-
*/
|
|
80
|
-
clone(options?: CloneOptions): Format;
|
|
81
|
-
/**
|
|
82
|
-
* Populates this Format with the values from the provided.
|
|
83
|
-
*/
|
|
84
|
-
fromJSON(unitsProvider: UnitsProvider, jsonObj: FormatProps): Promise<void>;
|
|
85
|
-
/** Create a Format from FormatProps */
|
|
86
|
-
static createFromJSON(name: string, unitsProvider: UnitsProvider, formatProps: FormatProps): Promise<Format>;
|
|
87
|
-
/**
|
|
88
|
-
* Returns a JSON object that contain the specification for this Format.
|
|
89
|
-
*/
|
|
90
|
-
toJSON(): FormatProps;
|
|
91
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Quantity
|
|
3
|
+
*/
|
|
4
|
+
import { UnitProps, UnitsProvider } from "../Interfaces";
|
|
5
|
+
import { DecimalPrecision, FormatTraits, FormatType, FractionalPrecision, ScientificType, ShowSignOption } from "./FormatEnums";
|
|
6
|
+
import { CloneOptions, FormatProps } from "./Interfaces";
|
|
7
|
+
/** A base Format class with shared properties and functionality between quantity and ecschema-metadata Format classes
|
|
8
|
+
* @beta
|
|
9
|
+
*/
|
|
10
|
+
export declare class BaseFormat {
|
|
11
|
+
private _name;
|
|
12
|
+
protected _roundFactor: number;
|
|
13
|
+
protected _type: FormatType;
|
|
14
|
+
protected _precision: number;
|
|
15
|
+
protected _showSignOption: ShowSignOption;
|
|
16
|
+
protected _decimalSeparator: string;
|
|
17
|
+
protected _thousandSeparator: string;
|
|
18
|
+
protected _uomSeparator: string;
|
|
19
|
+
protected _stationSeparator: string;
|
|
20
|
+
protected _formatTraits: FormatTraits;
|
|
21
|
+
protected _spacer: string;
|
|
22
|
+
protected _includeZero: boolean;
|
|
23
|
+
protected _minWidth?: number;
|
|
24
|
+
protected _scientificType?: ScientificType;
|
|
25
|
+
protected _stationOffsetSize?: number;
|
|
26
|
+
constructor(name: string);
|
|
27
|
+
get name(): string;
|
|
28
|
+
get roundFactor(): number;
|
|
29
|
+
set roundFactor(roundFactor: number);
|
|
30
|
+
get type(): FormatType;
|
|
31
|
+
set type(formatType: FormatType);
|
|
32
|
+
get precision(): DecimalPrecision | FractionalPrecision;
|
|
33
|
+
set precision(precision: DecimalPrecision | FractionalPrecision);
|
|
34
|
+
get minWidth(): number | undefined;
|
|
35
|
+
set minWidth(minWidth: number | undefined);
|
|
36
|
+
get scientificType(): ScientificType | undefined;
|
|
37
|
+
set scientificType(scientificType: ScientificType | undefined);
|
|
38
|
+
get showSignOption(): ShowSignOption;
|
|
39
|
+
set showSignOption(showSignOption: ShowSignOption);
|
|
40
|
+
get decimalSeparator(): string;
|
|
41
|
+
set decimalSeparator(decimalSeparator: string);
|
|
42
|
+
get thousandSeparator(): string;
|
|
43
|
+
set thousandSeparator(thousandSeparator: string);
|
|
44
|
+
get uomSeparator(): string;
|
|
45
|
+
set uomSeparator(uomSeparator: string);
|
|
46
|
+
get stationSeparator(): string;
|
|
47
|
+
set stationSeparator(stationSeparator: string);
|
|
48
|
+
get stationOffsetSize(): number | undefined;
|
|
49
|
+
set stationOffsetSize(stationOffsetSize: number | undefined);
|
|
50
|
+
get formatTraits(): FormatTraits;
|
|
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);
|
|
72
|
+
get units(): Array<[UnitProps, string | undefined]> | undefined;
|
|
73
|
+
get hasUnits(): boolean;
|
|
74
|
+
get customProps(): any;
|
|
75
|
+
static isFormatTraitSetInProps(formatProps: FormatProps, trait: FormatTraits): boolean;
|
|
76
|
+
private createUnit;
|
|
77
|
+
/**
|
|
78
|
+
* Clone Format
|
|
79
|
+
*/
|
|
80
|
+
clone(options?: CloneOptions): Format;
|
|
81
|
+
/**
|
|
82
|
+
* Populates this Format with the values from the provided.
|
|
83
|
+
*/
|
|
84
|
+
fromJSON(unitsProvider: UnitsProvider, jsonObj: FormatProps): Promise<void>;
|
|
85
|
+
/** Create a Format from FormatProps */
|
|
86
|
+
static createFromJSON(name: string, unitsProvider: UnitsProvider, formatProps: FormatProps): Promise<Format>;
|
|
87
|
+
/**
|
|
88
|
+
* Returns a JSON object that contain the specification for this Format.
|
|
89
|
+
*/
|
|
90
|
+
toJSON(): FormatProps;
|
|
91
|
+
}
|
|
92
92
|
//# sourceMappingURL=Format.d.ts.map
|