@itwin/core-quantity 4.0.0-dev.48 → 4.0.0-dev.51

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.
Files changed (79) hide show
  1. package/lib/cjs/Constants.d.ts +27 -27
  2. package/lib/cjs/Constants.js +52 -52
  3. package/lib/cjs/Constants.js.map +1 -1
  4. package/lib/cjs/Exception.d.ts +26 -26
  5. package/lib/cjs/Exception.js +38 -38
  6. package/lib/cjs/Exception.js.map +1 -1
  7. package/lib/cjs/Formatter/Format.d.ts +91 -91
  8. package/lib/cjs/Formatter/Format.js +328 -328
  9. package/lib/cjs/Formatter/Format.js.map +1 -1
  10. package/lib/cjs/Formatter/FormatEnums.d.ts +133 -133
  11. package/lib/cjs/Formatter/FormatEnums.js +318 -318
  12. package/lib/cjs/Formatter/FormatEnums.js.map +1 -1
  13. package/lib/cjs/Formatter/Formatter.d.ts +44 -44
  14. package/lib/cjs/Formatter/Formatter.js +371 -371
  15. package/lib/cjs/Formatter/Formatter.js.map +1 -1
  16. package/lib/cjs/Formatter/FormatterSpec.d.ts +39 -39
  17. package/lib/cjs/Formatter/FormatterSpec.js +101 -101
  18. package/lib/cjs/Formatter/FormatterSpec.js.map +1 -1
  19. package/lib/cjs/Formatter/Interfaces.d.ts +62 -62
  20. package/lib/cjs/Formatter/Interfaces.js +17 -17
  21. package/lib/cjs/Formatter/Interfaces.js.map +1 -1
  22. package/lib/cjs/Interfaces.d.ts +86 -86
  23. package/lib/cjs/Interfaces.js +9 -9
  24. package/lib/cjs/Interfaces.js.map +1 -1
  25. package/lib/cjs/Parser.d.ts +93 -93
  26. package/lib/cjs/Parser.js +592 -592
  27. package/lib/cjs/Parser.js.map +1 -1
  28. package/lib/cjs/ParserSpec.d.ts +34 -34
  29. package/lib/cjs/ParserSpec.js +47 -47
  30. package/lib/cjs/ParserSpec.js.map +1 -1
  31. package/lib/cjs/Quantity.d.ts +27 -27
  32. package/lib/cjs/Quantity.js +46 -46
  33. package/lib/cjs/Quantity.js.map +1 -1
  34. package/lib/cjs/Unit.d.ts +25 -25
  35. package/lib/cjs/Unit.js +44 -44
  36. package/lib/cjs/Unit.js.map +1 -1
  37. package/lib/cjs/core-quantity.d.ts +19 -19
  38. package/lib/cjs/core-quantity.js +35 -35
  39. package/lib/cjs/core-quantity.js.map +1 -1
  40. package/lib/esm/Constants.d.ts +27 -27
  41. package/lib/esm/Constants.js +48 -48
  42. package/lib/esm/Constants.js.map +1 -1
  43. package/lib/esm/Exception.d.ts +26 -26
  44. package/lib/esm/Exception.js +34 -34
  45. package/lib/esm/Exception.js.map +1 -1
  46. package/lib/esm/Formatter/Format.d.ts +91 -91
  47. package/lib/esm/Formatter/Format.js +323 -323
  48. package/lib/esm/Formatter/Format.js.map +1 -1
  49. package/lib/esm/Formatter/FormatEnums.d.ts +133 -133
  50. package/lib/esm/Formatter/FormatEnums.js +302 -302
  51. package/lib/esm/Formatter/FormatEnums.js.map +1 -1
  52. package/lib/esm/Formatter/Formatter.d.ts +44 -44
  53. package/lib/esm/Formatter/Formatter.js +367 -367
  54. package/lib/esm/Formatter/Formatter.js.map +1 -1
  55. package/lib/esm/Formatter/FormatterSpec.d.ts +39 -39
  56. package/lib/esm/Formatter/FormatterSpec.js +97 -97
  57. package/lib/esm/Formatter/FormatterSpec.js.map +1 -1
  58. package/lib/esm/Formatter/Interfaces.d.ts +62 -62
  59. package/lib/esm/Formatter/Interfaces.js +13 -13
  60. package/lib/esm/Formatter/Interfaces.js.map +1 -1
  61. package/lib/esm/Interfaces.d.ts +86 -86
  62. package/lib/esm/Interfaces.js +8 -8
  63. package/lib/esm/Interfaces.js.map +1 -1
  64. package/lib/esm/Parser.d.ts +93 -93
  65. package/lib/esm/Parser.js +588 -588
  66. package/lib/esm/Parser.js.map +1 -1
  67. package/lib/esm/ParserSpec.d.ts +34 -34
  68. package/lib/esm/ParserSpec.js +43 -43
  69. package/lib/esm/ParserSpec.js.map +1 -1
  70. package/lib/esm/Quantity.d.ts +27 -27
  71. package/lib/esm/Quantity.js +42 -42
  72. package/lib/esm/Quantity.js.map +1 -1
  73. package/lib/esm/Unit.d.ts +25 -25
  74. package/lib/esm/Unit.js +39 -39
  75. package/lib/esm/Unit.js.map +1 -1
  76. package/lib/esm/core-quantity.d.ts +19 -19
  77. package/lib/esm/core-quantity.js +23 -23
  78. package/lib/esm/core-quantity.js.map +1 -1
  79. package/package.json +4 -4
@@ -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