@itwin/core-quantity 4.0.0-dev.1 → 4.0.0-dev.100

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 (77) hide show
  1. package/CHANGELOG.md +53 -1
  2. package/lib/cjs/Constants.d.ts +27 -27
  3. package/lib/cjs/Constants.js +52 -52
  4. package/lib/cjs/Constants.js.map +1 -1
  5. package/lib/cjs/Exception.d.ts +26 -26
  6. package/lib/cjs/Exception.js +38 -38
  7. package/lib/cjs/Formatter/Format.d.ts +91 -91
  8. package/lib/cjs/Formatter/Format.js +328 -329
  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/Formatter.d.ts +44 -44
  13. package/lib/cjs/Formatter/Formatter.js +371 -371
  14. package/lib/cjs/Formatter/Formatter.js.map +1 -1
  15. package/lib/cjs/Formatter/FormatterSpec.d.ts +39 -39
  16. package/lib/cjs/Formatter/FormatterSpec.d.ts.map +1 -1
  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/Interfaces.d.ts +86 -86
  22. package/lib/cjs/Interfaces.d.ts.map +1 -1
  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.d.ts.map +1 -1
  27. package/lib/cjs/Parser.js +592 -592
  28. package/lib/cjs/Parser.js.map +1 -1
  29. package/lib/cjs/ParserSpec.d.ts +34 -34
  30. package/lib/cjs/ParserSpec.js +47 -47
  31. package/lib/cjs/Quantity.d.ts +27 -27
  32. package/lib/cjs/Quantity.d.ts.map +1 -1
  33. package/lib/cjs/Quantity.js +46 -46
  34. package/lib/cjs/Quantity.js.map +1 -1
  35. package/lib/cjs/Unit.d.ts +25 -25
  36. package/lib/cjs/Unit.js +44 -44
  37. package/lib/cjs/core-quantity.d.ts +19 -19
  38. package/lib/cjs/core-quantity.js +39 -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 +49 -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/Formatter/Format.d.ts +91 -91
  46. package/lib/esm/Formatter/Format.js +323 -324
  47. package/lib/esm/Formatter/Format.js.map +1 -1
  48. package/lib/esm/Formatter/FormatEnums.d.ts +133 -133
  49. package/lib/esm/Formatter/FormatEnums.js +302 -302
  50. package/lib/esm/Formatter/Formatter.d.ts +44 -44
  51. package/lib/esm/Formatter/Formatter.js +368 -367
  52. package/lib/esm/Formatter/Formatter.js.map +1 -1
  53. package/lib/esm/Formatter/FormatterSpec.d.ts +39 -39
  54. package/lib/esm/Formatter/FormatterSpec.d.ts.map +1 -1
  55. package/lib/esm/Formatter/FormatterSpec.js +97 -97
  56. package/lib/esm/Formatter/FormatterSpec.js.map +1 -1
  57. package/lib/esm/Formatter/Interfaces.d.ts +62 -62
  58. package/lib/esm/Formatter/Interfaces.js +13 -13
  59. package/lib/esm/Interfaces.d.ts +86 -86
  60. package/lib/esm/Interfaces.d.ts.map +1 -1
  61. package/lib/esm/Interfaces.js +8 -8
  62. package/lib/esm/Interfaces.js.map +1 -1
  63. package/lib/esm/Parser.d.ts +93 -93
  64. package/lib/esm/Parser.d.ts.map +1 -1
  65. package/lib/esm/Parser.js +589 -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/Quantity.d.ts +27 -27
  70. package/lib/esm/Quantity.d.ts.map +1 -1
  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/core-quantity.d.ts +19 -19
  76. package/lib/esm/core-quantity.js +23 -23
  77. package/package.json +12 -13
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.1",
3
+ "version": "4.0.0-dev.100",
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",
@@ -8,7 +8,8 @@
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/iTwin/itwinjs-core/tree/master/core/quantity"
11
+ "url": "https://github.com/iTwin/itwinjs-core.git",
12
+ "directory": "core/quantity"
12
13
  },
13
14
  "keywords": [
14
15
  "Bentley",
@@ -20,26 +21,26 @@
20
21
  "url": "http://www.bentley.com"
21
22
  },
22
23
  "devDependencies": {
23
- "@itwin/build-tools": "4.0.0-dev.1",
24
- "@itwin/core-bentley": "4.0.0-dev.1",
25
- "@itwin/eslint-plugin": "4.0.0-dev.1",
24
+ "@itwin/eslint-plugin": "^4.0.0-dev.33",
26
25
  "@types/chai": "4.3.1",
27
26
  "@types/chai-as-promised": "^7",
28
27
  "@types/glob": "^5.0.35",
29
28
  "@types/mocha": "^8.2.2",
30
- "@types/node": "18.11.5",
29
+ "@types/node": "^18.11.5",
31
30
  "@types/sinon": "^9.0.0",
32
31
  "chai": "^4.1.2",
33
32
  "chai-as-promised": "^7",
34
- "eslint": "^7.11.0",
33
+ "eslint": "^8.36.0",
35
34
  "mocha": "^10.0.0",
36
35
  "nyc": "^15.1.0",
37
36
  "rimraf": "^3.0.2",
38
37
  "sinon": "^9.0.2",
39
- "typescript": "~4.4.0"
38
+ "typescript": "~5.0.2",
39
+ "@itwin/build-tools": "4.0.0-dev.100",
40
+ "@itwin/core-bentley": "4.0.0-dev.100"
40
41
  },
41
42
  "peerDependencies": {
42
- "@itwin/core-bentley": "^4.0.0-dev.1"
43
+ "@itwin/core-bentley": "^4.0.0-dev.100"
43
44
  },
44
45
  "nyc": {
45
46
  "extends": "./node_modules/@itwin/build-tools/.nycrc"
@@ -51,8 +52,7 @@
51
52
  "extends": "plugin:@itwin/itwinjs-recommended"
52
53
  },
53
54
  "scripts": {
54
- "build": "npm run -s build:cjs",
55
- "build:ci": "npm run -s build && npm run -s build:esm",
55
+ "build": "npm run -s build:cjs && npm run -s build:esm",
56
56
  "build:cjs": "tsc 1>&2 --outDir lib/cjs",
57
57
  "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm",
58
58
  "clean": "rimraf lib .rush/temp/package-deps*.json .nyc_output",
@@ -62,6 +62,5 @@
62
62
  "docs": "betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-quantity/file.json --tsIndexFile=./core-quantity.ts --onlyJson",
63
63
  "cover": "nyc npm -s test",
64
64
  "start": "npm run -s lint && npm run -s clean && npm run -s build && npm run -s test & npm run -s cover & npm run -s docs"
65
- },
66
- "readme": "# @itwin/core-quantity\r\n\r\nCopyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.\r\n\r\n## Description\r\n\r\nThe __@itwin/core-quantity__ package contains classes for quantity formatting and parsing.\r\n\r\n## Documentation\r\n\r\nSee the [iTwin.js](https://www.itwinjs.org) documentation for more information.\r\n"
65
+ }
67
66
  }