@itwin/core-quantity 4.0.0-dev.52 → 4.0.0-dev.55

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 (66) 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/Formatter/Format.d.ts +91 -91
  7. package/lib/cjs/Formatter/Format.js +328 -328
  8. package/lib/cjs/Formatter/FormatEnums.d.ts +133 -133
  9. package/lib/cjs/Formatter/FormatEnums.js +318 -318
  10. package/lib/cjs/Formatter/Formatter.d.ts +44 -44
  11. package/lib/cjs/Formatter/Formatter.js +371 -371
  12. package/lib/cjs/Formatter/Formatter.js.map +1 -1
  13. package/lib/cjs/Formatter/FormatterSpec.d.ts +39 -39
  14. package/lib/cjs/Formatter/FormatterSpec.js +101 -101
  15. package/lib/cjs/Formatter/Interfaces.d.ts +62 -62
  16. package/lib/cjs/Formatter/Interfaces.js +17 -17
  17. package/lib/cjs/Interfaces.d.ts +86 -86
  18. package/lib/cjs/Interfaces.d.ts.map +1 -1
  19. package/lib/cjs/Interfaces.js +9 -9
  20. package/lib/cjs/Parser.d.ts +93 -93
  21. package/lib/cjs/Parser.d.ts.map +1 -1
  22. package/lib/cjs/Parser.js +592 -592
  23. package/lib/cjs/Parser.js.map +1 -1
  24. package/lib/cjs/ParserSpec.d.ts +34 -34
  25. package/lib/cjs/ParserSpec.js +47 -47
  26. package/lib/cjs/Quantity.d.ts +27 -27
  27. package/lib/cjs/Quantity.js +46 -46
  28. package/lib/cjs/Quantity.js.map +1 -1
  29. package/lib/cjs/Unit.d.ts +25 -25
  30. package/lib/cjs/Unit.js +44 -44
  31. package/lib/cjs/core-quantity.d.ts +19 -19
  32. package/lib/cjs/core-quantity.js +39 -35
  33. package/lib/cjs/core-quantity.js.map +1 -1
  34. package/lib/esm/Constants.d.ts +27 -27
  35. package/lib/esm/Constants.js +49 -48
  36. package/lib/esm/Constants.js.map +1 -1
  37. package/lib/esm/Exception.d.ts +26 -26
  38. package/lib/esm/Exception.js +34 -34
  39. package/lib/esm/Formatter/Format.d.ts +91 -91
  40. package/lib/esm/Formatter/Format.js +323 -323
  41. package/lib/esm/Formatter/FormatEnums.d.ts +133 -133
  42. package/lib/esm/Formatter/FormatEnums.js +302 -302
  43. package/lib/esm/Formatter/Formatter.d.ts +44 -44
  44. package/lib/esm/Formatter/Formatter.js +368 -367
  45. package/lib/esm/Formatter/Formatter.js.map +1 -1
  46. package/lib/esm/Formatter/FormatterSpec.d.ts +39 -39
  47. package/lib/esm/Formatter/FormatterSpec.js +97 -97
  48. package/lib/esm/Formatter/Interfaces.d.ts +62 -62
  49. package/lib/esm/Formatter/Interfaces.js +13 -13
  50. package/lib/esm/Interfaces.d.ts +86 -86
  51. package/lib/esm/Interfaces.d.ts.map +1 -1
  52. package/lib/esm/Interfaces.js +8 -8
  53. package/lib/esm/Parser.d.ts +93 -93
  54. package/lib/esm/Parser.d.ts.map +1 -1
  55. package/lib/esm/Parser.js +589 -588
  56. package/lib/esm/Parser.js.map +1 -1
  57. package/lib/esm/ParserSpec.d.ts +34 -34
  58. package/lib/esm/ParserSpec.js +43 -43
  59. package/lib/esm/Quantity.d.ts +27 -27
  60. package/lib/esm/Quantity.js +42 -42
  61. package/lib/esm/Quantity.js.map +1 -1
  62. package/lib/esm/Unit.d.ts +25 -25
  63. package/lib/esm/Unit.js +39 -39
  64. package/lib/esm/core-quantity.d.ts +19 -19
  65. package/lib/esm/core-quantity.js +23 -23
  66. package/package.json +6 -6
package/lib/esm/Unit.d.ts CHANGED
@@ -1,26 +1,26 @@
1
- /** @packageDocumentation
2
- * @module Quantity
3
- */
4
- import { UnitProps } from "./Interfaces";
5
- /** This class provides basic implementation of UnitProps interface.
6
- * @beta
7
- */
8
- export declare class BasicUnit implements UnitProps {
9
- name: string;
10
- label: string;
11
- phenomenon: string;
12
- isValid: boolean;
13
- system: string;
14
- constructor(name: string, label: string, phenomenon: string, system?: string);
15
- }
16
- /** This class is a convenience class that can be returned when a valid Unit cannot be determined.
17
- * @beta
18
- */
19
- export declare class BadUnit implements UnitProps {
20
- name: string;
21
- label: string;
22
- phenomenon: string;
23
- isValid: boolean;
24
- system: string;
25
- }
1
+ /** @packageDocumentation
2
+ * @module Quantity
3
+ */
4
+ import { UnitProps } from "./Interfaces";
5
+ /** This class provides basic implementation of UnitProps interface.
6
+ * @beta
7
+ */
8
+ export declare class BasicUnit implements UnitProps {
9
+ name: string;
10
+ label: string;
11
+ phenomenon: string;
12
+ isValid: boolean;
13
+ system: string;
14
+ constructor(name: string, label: string, phenomenon: string, system?: string);
15
+ }
16
+ /** This class is a convenience class that can be returned when a valid Unit cannot be determined.
17
+ * @beta
18
+ */
19
+ export declare class BadUnit implements UnitProps {
20
+ name: string;
21
+ label: string;
22
+ phenomenon: string;
23
+ isValid: boolean;
24
+ system: string;
25
+ }
26
26
  //# sourceMappingURL=Unit.d.ts.map
package/lib/esm/Unit.js CHANGED
@@ -1,40 +1,40 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Quantity
7
- */
8
- /** This class provides basic implementation of UnitProps interface.
9
- * @beta
10
- */
11
- export class BasicUnit {
12
- constructor(name, label, phenomenon, system) {
13
- this.name = "";
14
- this.label = "";
15
- this.phenomenon = "";
16
- this.isValid = false;
17
- this.system = "unknown";
18
- if (name && name.length > 0 && label && label.length > 0 && phenomenon && phenomenon.length > 0) {
19
- this.name = name;
20
- this.label = label;
21
- this.phenomenon = phenomenon;
22
- this.isValid = true;
23
- if (system)
24
- this.system = system;
25
- }
26
- }
27
- }
28
- /** This class is a convenience class that can be returned when a valid Unit cannot be determined.
29
- * @beta
30
- */
31
- export class BadUnit {
32
- constructor() {
33
- this.name = "";
34
- this.label = "";
35
- this.phenomenon = "";
36
- this.isValid = false;
37
- this.system = "unknown";
38
- }
39
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Quantity
7
+ */
8
+ /** This class provides basic implementation of UnitProps interface.
9
+ * @beta
10
+ */
11
+ export class BasicUnit {
12
+ constructor(name, label, phenomenon, system) {
13
+ this.name = "";
14
+ this.label = "";
15
+ this.phenomenon = "";
16
+ this.isValid = false;
17
+ this.system = "unknown";
18
+ if (name && name.length > 0 && label && label.length > 0 && phenomenon && phenomenon.length > 0) {
19
+ this.name = name;
20
+ this.label = label;
21
+ this.phenomenon = phenomenon;
22
+ this.isValid = true;
23
+ if (system)
24
+ this.system = system;
25
+ }
26
+ }
27
+ }
28
+ /** This class is a convenience class that can be returned when a valid Unit cannot be determined.
29
+ * @beta
30
+ */
31
+ export class BadUnit {
32
+ constructor() {
33
+ this.name = "";
34
+ this.label = "";
35
+ this.phenomenon = "";
36
+ this.isValid = false;
37
+ this.system = "unknown";
38
+ }
39
+ }
40
40
  //# sourceMappingURL=Unit.js.map
@@ -1,20 +1,20 @@
1
- export * from "./Constants";
2
- export * from "./Exception";
3
- export * from "./Interfaces";
4
- export * from "./Parser";
5
- export * from "./ParserSpec";
6
- export * from "./Quantity";
7
- export * from "./Unit";
8
- export * from "./Formatter/Format";
9
- export * from "./Formatter/FormatterSpec";
10
- export * from "./Formatter/FormatEnums";
11
- export * from "./Formatter/Formatter";
12
- export * from "./Formatter/Interfaces";
13
- /** @docs-package-description
14
- * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.
15
- */
16
- /**
17
- * @docs-group-description Quantity
18
- * Classes, Interfaces, and definitions used to format and parse quantity values.
19
- */
1
+ export * from "./Constants";
2
+ export * from "./Exception";
3
+ export * from "./Interfaces";
4
+ export * from "./Parser";
5
+ export * from "./ParserSpec";
6
+ export * from "./Quantity";
7
+ export * from "./Unit";
8
+ export * from "./Formatter/Format";
9
+ export * from "./Formatter/FormatterSpec";
10
+ export * from "./Formatter/FormatEnums";
11
+ export * from "./Formatter/Formatter";
12
+ export * from "./Formatter/Interfaces";
13
+ /** @docs-package-description
14
+ * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.
15
+ */
16
+ /**
17
+ * @docs-group-description Quantity
18
+ * Classes, Interfaces, and definitions used to format and parse quantity values.
19
+ */
20
20
  //# sourceMappingURL=core-quantity.d.ts.map
@@ -1,24 +1,24 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- export * from "./Constants";
6
- export * from "./Exception";
7
- export * from "./Interfaces";
8
- export * from "./Parser";
9
- export * from "./ParserSpec";
10
- export * from "./Quantity";
11
- export * from "./Unit";
12
- export * from "./Formatter/Format";
13
- export * from "./Formatter/FormatterSpec";
14
- export * from "./Formatter/FormatEnums";
15
- export * from "./Formatter/Formatter";
16
- export * from "./Formatter/Interfaces";
17
- /** @docs-package-description
18
- * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.
19
- */
20
- /**
21
- * @docs-group-description Quantity
22
- * Classes, Interfaces, and definitions used to format and parse quantity values.
23
- */
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export * from "./Constants";
6
+ export * from "./Exception";
7
+ export * from "./Interfaces";
8
+ export * from "./Parser";
9
+ export * from "./ParserSpec";
10
+ export * from "./Quantity";
11
+ export * from "./Unit";
12
+ export * from "./Formatter/Format";
13
+ export * from "./Formatter/FormatterSpec";
14
+ export * from "./Formatter/FormatEnums";
15
+ export * from "./Formatter/Formatter";
16
+ export * from "./Formatter/Interfaces";
17
+ /** @docs-package-description
18
+ * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.
19
+ */
20
+ /**
21
+ * @docs-group-description Quantity
22
+ * Classes, Interfaces, and definitions used to format and parse quantity values.
23
+ */
24
24
  //# sourceMappingURL=core-quantity.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-quantity",
3
- "version": "4.0.0-dev.52",
3
+ "version": "4.0.0-dev.55",
4
4
  "description": "Quantity parsing, formatting and conversions for iModel.js",
5
5
  "main": "lib/cjs/core-quantity.js",
6
6
  "module": "lib/esm/core-quantity.js",
@@ -20,9 +20,9 @@
20
20
  "url": "http://www.bentley.com"
21
21
  },
22
22
  "devDependencies": {
23
- "@itwin/build-tools": "4.0.0-dev.52",
24
- "@itwin/core-bentley": "4.0.0-dev.52",
25
- "@itwin/eslint-plugin": "nightly",
23
+ "@itwin/build-tools": "4.0.0-dev.55",
24
+ "@itwin/core-bentley": "4.0.0-dev.55",
25
+ "@itwin/eslint-plugin": "^4.0.0-dev.32",
26
26
  "@types/chai": "4.3.1",
27
27
  "@types/chai-as-promised": "^7",
28
28
  "@types/glob": "^5.0.35",
@@ -36,10 +36,10 @@
36
36
  "nyc": "^15.1.0",
37
37
  "rimraf": "^3.0.2",
38
38
  "sinon": "^9.0.2",
39
- "typescript": "~4.4.0"
39
+ "typescript": "~5.0.2"
40
40
  },
41
41
  "peerDependencies": {
42
- "@itwin/core-bentley": "^4.0.0-dev.52"
42
+ "@itwin/core-bentley": "^4.0.0-dev.55"
43
43
  },
44
44
  "nyc": {
45
45
  "extends": "./node_modules/@itwin/build-tools/.nycrc"