@itwin/core-quantity 4.0.0-dev.7 → 4.0.0-dev.70
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 +11 -1
- 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/Formatter/Format.d.ts +91 -91
- package/lib/cjs/Formatter/Format.js +328 -329
- 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/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/Interfaces.d.ts +62 -62
- package/lib/cjs/Formatter/Interfaces.js +17 -17
- 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/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/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/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/Formatter/Format.d.ts +91 -91
- package/lib/esm/Formatter/Format.js +323 -324
- 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/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/Interfaces.d.ts +62 -62
- package/lib/esm/Formatter/Interfaces.js +13 -13
- 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/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/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/core-quantity.d.ts +19 -19
- package/lib/esm/core-quantity.js +23 -23
- package/package.json +10 -10
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
|
package/lib/esm/core-quantity.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "4.0.0-dev.70",
|
|
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
|
|
11
|
+
"url": "https://github.com/iTwin/itwinjs-core.git",
|
|
12
|
+
"directory": "core/quantity"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"Bentley",
|
|
@@ -20,14 +21,14 @@
|
|
|
20
21
|
"url": "http://www.bentley.com"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@itwin/build-tools": "4.0.0-dev.
|
|
24
|
-
"@itwin/core-bentley": "4.0.0-dev.
|
|
25
|
-
"@itwin/eslint-plugin": "4.0.0-dev.
|
|
24
|
+
"@itwin/build-tools": "4.0.0-dev.70",
|
|
25
|
+
"@itwin/core-bentley": "4.0.0-dev.70",
|
|
26
|
+
"@itwin/eslint-plugin": "^4.0.0-dev.32",
|
|
26
27
|
"@types/chai": "4.3.1",
|
|
27
28
|
"@types/chai-as-promised": "^7",
|
|
28
29
|
"@types/glob": "^5.0.35",
|
|
29
30
|
"@types/mocha": "^8.2.2",
|
|
30
|
-
"@types/node": "18.11.5",
|
|
31
|
+
"@types/node": "^18.11.5",
|
|
31
32
|
"@types/sinon": "^9.0.0",
|
|
32
33
|
"chai": "^4.1.2",
|
|
33
34
|
"chai-as-promised": "^7",
|
|
@@ -36,10 +37,10 @@
|
|
|
36
37
|
"nyc": "^15.1.0",
|
|
37
38
|
"rimraf": "^3.0.2",
|
|
38
39
|
"sinon": "^9.0.2",
|
|
39
|
-
"typescript": "~
|
|
40
|
+
"typescript": "~5.0.2"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
|
-
"@itwin/core-bentley": "^4.0.0-dev.
|
|
43
|
+
"@itwin/core-bentley": "^4.0.0-dev.70"
|
|
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",
|