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

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 +5 -5
package/lib/cjs/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/cjs/Unit.js CHANGED
@@ -1,45 +1,45 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Quantity
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BadUnit = exports.BasicUnit = void 0;
11
- /** This class provides basic implementation of UnitProps interface.
12
- * @beta
13
- */
14
- class BasicUnit {
15
- constructor(name, label, phenomenon, system) {
16
- this.name = "";
17
- this.label = "";
18
- this.phenomenon = "";
19
- this.isValid = false;
20
- this.system = "unknown";
21
- if (name && name.length > 0 && label && label.length > 0 && phenomenon && phenomenon.length > 0) {
22
- this.name = name;
23
- this.label = label;
24
- this.phenomenon = phenomenon;
25
- this.isValid = true;
26
- if (system)
27
- this.system = system;
28
- }
29
- }
30
- }
31
- exports.BasicUnit = BasicUnit;
32
- /** This class is a convenience class that can be returned when a valid Unit cannot be determined.
33
- * @beta
34
- */
35
- class BadUnit {
36
- constructor() {
37
- this.name = "";
38
- this.label = "";
39
- this.phenomenon = "";
40
- this.isValid = false;
41
- this.system = "unknown";
42
- }
43
- }
44
- exports.BadUnit = BadUnit;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Quantity
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.BadUnit = exports.BasicUnit = void 0;
11
+ /** This class provides basic implementation of UnitProps interface.
12
+ * @beta
13
+ */
14
+ class BasicUnit {
15
+ constructor(name, label, phenomenon, system) {
16
+ this.name = "";
17
+ this.label = "";
18
+ this.phenomenon = "";
19
+ this.isValid = false;
20
+ this.system = "unknown";
21
+ if (name && name.length > 0 && label && label.length > 0 && phenomenon && phenomenon.length > 0) {
22
+ this.name = name;
23
+ this.label = label;
24
+ this.phenomenon = phenomenon;
25
+ this.isValid = true;
26
+ if (system)
27
+ this.system = system;
28
+ }
29
+ }
30
+ }
31
+ exports.BasicUnit = BasicUnit;
32
+ /** This class is a convenience class that can be returned when a valid Unit cannot be determined.
33
+ * @beta
34
+ */
35
+ class BadUnit {
36
+ constructor() {
37
+ this.name = "";
38
+ this.label = "";
39
+ this.phenomenon = "";
40
+ this.isValid = false;
41
+ this.system = "unknown";
42
+ }
43
+ }
44
+ exports.BadUnit = BadUnit;
45
45
  //# sourceMappingURL=Unit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Unit.js","sourceRoot":"","sources":["../../src/Unit.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;GAEG;AACH,MAAa,SAAS;IAOpB,YAAY,IAAY,EAAE,KAAa,EAAE,UAAkB,EAAE,MAAe;QANrE,SAAI,GAAG,EAAE,CAAC;QACV,UAAK,GAAG,EAAE,CAAC;QACX,eAAU,GAAG,EAAE,CAAC;QAChB,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAW,SAAS,CAAC;QAGhC,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,MAAM;gBACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACxB;IACH,CAAC;CACF;AAjBD,8BAiBC;AAED;;GAEG;AACH,MAAa,OAAO;IAApB;QACS,SAAI,GAAG,EAAE,CAAC;QACV,UAAK,GAAG,EAAE,CAAC;QACX,eAAU,GAAG,EAAE,CAAC;QAChB,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,SAAS,CAAC;IAC5B,CAAC;CAAA;AAND,0BAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Quantity\r\n */\r\n\r\nimport { UnitProps } from \"./Interfaces\";\r\n\r\n/** This class provides basic implementation of UnitProps interface.\r\n * @beta\r\n */\r\nexport class BasicUnit implements UnitProps {\r\n public name = \"\";\r\n public label = \"\";\r\n public phenomenon = \"\";\r\n public isValid = false;\r\n public system: string = \"unknown\";\r\n\r\n constructor(name: string, label: string, phenomenon: string, system?: string) {\r\n if (name && name.length > 0 && label && label.length > 0 && phenomenon && phenomenon.length > 0) {\r\n this.name = name;\r\n this.label = label;\r\n this.phenomenon = phenomenon;\r\n this.isValid = true;\r\n if (system)\r\n this.system = system;\r\n }\r\n }\r\n}\r\n\r\n/** This class is a convenience class that can be returned when a valid Unit cannot be determined.\r\n * @beta\r\n */\r\nexport class BadUnit implements UnitProps {\r\n public name = \"\";\r\n public label = \"\";\r\n public phenomenon = \"\";\r\n public isValid = false;\r\n public system = \"unknown\";\r\n}\r\n"]}
1
+ {"version":3,"file":"Unit.js","sourceRoot":"","sources":["../../src/Unit.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;GAEG;AACH,MAAa,SAAS;IAOpB,YAAY,IAAY,EAAE,KAAa,EAAE,UAAkB,EAAE,MAAe;QANrE,SAAI,GAAG,EAAE,CAAC;QACV,UAAK,GAAG,EAAE,CAAC;QACX,eAAU,GAAG,EAAE,CAAC;QAChB,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAW,SAAS,CAAC;QAGhC,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,MAAM;gBACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACxB;IACH,CAAC;CACF;AAjBD,8BAiBC;AAED;;GAEG;AACH,MAAa,OAAO;IAApB;QACS,SAAI,GAAG,EAAE,CAAC;QACV,UAAK,GAAG,EAAE,CAAC;QACX,eAAU,GAAG,EAAE,CAAC;QAChB,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,SAAS,CAAC;IAC5B,CAAC;CAAA;AAND,0BAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Quantity\n */\n\nimport { UnitProps } from \"./Interfaces\";\n\n/** This class provides basic implementation of UnitProps interface.\n * @beta\n */\nexport class BasicUnit implements UnitProps {\n public name = \"\";\n public label = \"\";\n public phenomenon = \"\";\n public isValid = false;\n public system: string = \"unknown\";\n\n constructor(name: string, label: string, phenomenon: string, system?: string) {\n if (name && name.length > 0 && label && label.length > 0 && phenomenon && phenomenon.length > 0) {\n this.name = name;\n this.label = label;\n this.phenomenon = phenomenon;\n this.isValid = true;\n if (system)\n this.system = system;\n }\n }\n}\n\n/** This class is a convenience class that can be returned when a valid Unit cannot be determined.\n * @beta\n */\nexport class BadUnit implements UnitProps {\n public name = \"\";\n public label = \"\";\n public phenomenon = \"\";\n public isValid = false;\n public system = \"unknown\";\n}\n"]}
@@ -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,36 +1,36 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- /*---------------------------------------------------------------------------------------------
14
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
15
- * See LICENSE.md in the project root for license terms and full copyright notice.
16
- *--------------------------------------------------------------------------------------------*/
17
- __exportStar(require("./Constants"), exports);
18
- __exportStar(require("./Exception"), exports);
19
- __exportStar(require("./Interfaces"), exports);
20
- __exportStar(require("./Parser"), exports);
21
- __exportStar(require("./ParserSpec"), exports);
22
- __exportStar(require("./Quantity"), exports);
23
- __exportStar(require("./Unit"), exports);
24
- __exportStar(require("./Formatter/Format"), exports);
25
- __exportStar(require("./Formatter/FormatterSpec"), exports);
26
- __exportStar(require("./Formatter/FormatEnums"), exports);
27
- __exportStar(require("./Formatter/Formatter"), exports);
28
- __exportStar(require("./Formatter/Interfaces"), exports);
29
- /** @docs-package-description
30
- * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.
31
- */
32
- /**
33
- * @docs-group-description Quantity
34
- * Classes, Interfaces, and definitions used to format and parse quantity values.
35
- */
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ /*---------------------------------------------------------------------------------------------
14
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
15
+ * See LICENSE.md in the project root for license terms and full copyright notice.
16
+ *--------------------------------------------------------------------------------------------*/
17
+ __exportStar(require("./Constants"), exports);
18
+ __exportStar(require("./Exception"), exports);
19
+ __exportStar(require("./Interfaces"), exports);
20
+ __exportStar(require("./Parser"), exports);
21
+ __exportStar(require("./ParserSpec"), exports);
22
+ __exportStar(require("./Quantity"), exports);
23
+ __exportStar(require("./Unit"), exports);
24
+ __exportStar(require("./Formatter/Format"), exports);
25
+ __exportStar(require("./Formatter/FormatterSpec"), exports);
26
+ __exportStar(require("./Formatter/FormatEnums"), exports);
27
+ __exportStar(require("./Formatter/Formatter"), exports);
28
+ __exportStar(require("./Formatter/Interfaces"), exports);
29
+ /** @docs-package-description
30
+ * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.
31
+ */
32
+ /**
33
+ * @docs-group-description Quantity
34
+ * Classes, Interfaces, and definitions used to format and parse quantity values.
35
+ */
36
36
  //# sourceMappingURL=core-quantity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-quantity.js","sourceRoot":"","sources":["../../src/core-quantity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,yCAAuB;AAEvB,qDAAmC;AACnC,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC;AACtC,yDAAuC;AAEvC;;GAEG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./Constants\";\r\nexport * from \"./Exception\";\r\nexport * from \"./Interfaces\";\r\nexport * from \"./Parser\";\r\nexport * from \"./ParserSpec\";\r\nexport * from \"./Quantity\";\r\nexport * from \"./Unit\";\r\n\r\nexport * from \"./Formatter/Format\";\r\nexport * from \"./Formatter/FormatterSpec\";\r\nexport * from \"./Formatter/FormatEnums\";\r\nexport * from \"./Formatter/Formatter\";\r\nexport * from \"./Formatter/Interfaces\";\r\n\r\n/** @docs-package-description\r\n * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.\r\n */\r\n\r\n/**\r\n * @docs-group-description Quantity\r\n * Classes, Interfaces, and definitions used to format and parse quantity values.\r\n */\r\n"]}
1
+ {"version":3,"file":"core-quantity.js","sourceRoot":"","sources":["../../src/core-quantity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,yCAAuB;AAEvB,qDAAmC;AACnC,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC;AACtC,yDAAuC;AAEvC;;GAEG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./Constants\";\nexport * from \"./Exception\";\nexport * from \"./Interfaces\";\nexport * from \"./Parser\";\nexport * from \"./ParserSpec\";\nexport * from \"./Quantity\";\nexport * from \"./Unit\";\n\nexport * from \"./Formatter/Format\";\nexport * from \"./Formatter/FormatterSpec\";\nexport * from \"./Formatter/FormatEnums\";\nexport * from \"./Formatter/Formatter\";\nexport * from \"./Formatter/Interfaces\";\n\n/** @docs-package-description\n * The core-quantity package always runs in a web browser. It contains classes, interfaces, and definitions for formatting and parsing quantity values.\n */\n\n/**\n * @docs-group-description Quantity\n * Classes, Interfaces, and definitions used to format and parse quantity values.\n */\n"]}
@@ -1,28 +1,28 @@
1
- /** Constants used internally for both formatting and parsing.
2
- * @internal
3
- */
4
- export declare class QuantityConstants {
5
- static readonly CHAR_COMMA = 44;
6
- static readonly CHAR_SPACE = 32;
7
- static readonly CHAR_NUMBER = 35;
8
- static readonly CHAR_PLUS = 43;
9
- static readonly CHAR_MINUS = 45;
10
- static readonly CHAR_PERIOD = 46;
11
- static readonly CHAR_SLASH = 47;
12
- static readonly CHAR_DIVISION_SLASH = 8725;
13
- static readonly CHAR_FRACTION_SLASH = 8260;
14
- static readonly CHAR_ONE_QUARTER = 188;
15
- static readonly CHAR_ONE_HALF = 189;
16
- static readonly CHAR_THREE_QUARTER = 190;
17
- static readonly CHAR_DIGIT_ZERO = 48;
18
- static readonly CHAR_DIGIT_NINE = 57;
19
- static readonly CHAR_UPPER_E = 69;
20
- static readonly CHAR_LOWER_E = 101;
21
- private static _LOCALE_DECIMAL_SEPARATOR;
22
- private static _LOCALE_THOUSAND_SEPARATOR;
23
- /** Return the decimal separator for the current locale. */
24
- static get LocaleSpecificDecimalSeparator(): string;
25
- /** Return the thousand separator for the current locale. */
26
- static get LocaleSpecificThousandSeparator(): string;
27
- }
1
+ /** Constants used internally for both formatting and parsing.
2
+ * @internal
3
+ */
4
+ export declare class QuantityConstants {
5
+ static readonly CHAR_COMMA = 44;
6
+ static readonly CHAR_SPACE = 32;
7
+ static readonly CHAR_NUMBER = 35;
8
+ static readonly CHAR_PLUS = 43;
9
+ static readonly CHAR_MINUS = 45;
10
+ static readonly CHAR_PERIOD = 46;
11
+ static readonly CHAR_SLASH = 47;
12
+ static readonly CHAR_DIVISION_SLASH = 8725;
13
+ static readonly CHAR_FRACTION_SLASH = 8260;
14
+ static readonly CHAR_ONE_QUARTER = 188;
15
+ static readonly CHAR_ONE_HALF = 189;
16
+ static readonly CHAR_THREE_QUARTER = 190;
17
+ static readonly CHAR_DIGIT_ZERO = 48;
18
+ static readonly CHAR_DIGIT_NINE = 57;
19
+ static readonly CHAR_UPPER_E = 69;
20
+ static readonly CHAR_LOWER_E = 101;
21
+ private static _LOCALE_DECIMAL_SEPARATOR;
22
+ private static _LOCALE_THOUSAND_SEPARATOR;
23
+ /** Return the decimal separator for the current locale. */
24
+ static get LocaleSpecificDecimalSeparator(): string;
25
+ /** Return the thousand separator for the current locale. */
26
+ static get LocaleSpecificThousandSeparator(): string;
27
+ }
28
28
  //# sourceMappingURL=Constants.d.ts.map
@@ -1,49 +1,49 @@
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
- /* eslint-disable @typescript-eslint/naming-convention */
6
- /** Constants used internally for both formatting and parsing.
7
- * @internal
8
- */
9
- export class QuantityConstants {
10
- /** Return the decimal separator for the current locale. */
11
- static get LocaleSpecificDecimalSeparator() {
12
- if (QuantityConstants._LOCALE_DECIMAL_SEPARATOR.length > 0)
13
- return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;
14
- QuantityConstants._LOCALE_DECIMAL_SEPARATOR = ".";
15
- const matches = (12345.6789).toLocaleString().match(/345(.*)67/);
16
- if (matches && matches.length > 1)
17
- QuantityConstants._LOCALE_DECIMAL_SEPARATOR = matches[1];
18
- return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;
19
- }
20
- /** Return the thousand separator for the current locale. */
21
- static get LocaleSpecificThousandSeparator() {
22
- if (QuantityConstants._LOCALE_THOUSAND_SEPARATOR.length > 0)
23
- return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;
24
- QuantityConstants._LOCALE_THOUSAND_SEPARATOR = ",";
25
- const matches = (12345.6789).toLocaleString().match(/12(.*)345/);
26
- if (matches && matches.length > 0)
27
- QuantityConstants._LOCALE_THOUSAND_SEPARATOR = matches[1];
28
- return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;
29
- }
30
- }
31
- QuantityConstants.CHAR_COMMA = 44;
32
- QuantityConstants.CHAR_SPACE = 32;
33
- QuantityConstants.CHAR_NUMBER = 35;
34
- QuantityConstants.CHAR_PLUS = 43;
35
- QuantityConstants.CHAR_MINUS = 45;
36
- QuantityConstants.CHAR_PERIOD = 46;
37
- QuantityConstants.CHAR_SLASH = 47;
38
- QuantityConstants.CHAR_DIVISION_SLASH = 8725;
39
- QuantityConstants.CHAR_FRACTION_SLASH = 8260;
40
- QuantityConstants.CHAR_ONE_QUARTER = 188;
41
- QuantityConstants.CHAR_ONE_HALF = 189;
42
- QuantityConstants.CHAR_THREE_QUARTER = 190;
43
- QuantityConstants.CHAR_DIGIT_ZERO = 48;
44
- QuantityConstants.CHAR_DIGIT_NINE = 57;
45
- QuantityConstants.CHAR_UPPER_E = 69;
46
- QuantityConstants.CHAR_LOWER_E = 101;
47
- QuantityConstants._LOCALE_DECIMAL_SEPARATOR = "";
48
- QuantityConstants._LOCALE_THOUSAND_SEPARATOR = "";
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
+ /* eslint-disable @typescript-eslint/naming-convention */
6
+ /** Constants used internally for both formatting and parsing.
7
+ * @internal
8
+ */
9
+ export class QuantityConstants {
10
+ /** Return the decimal separator for the current locale. */
11
+ static get LocaleSpecificDecimalSeparator() {
12
+ if (QuantityConstants._LOCALE_DECIMAL_SEPARATOR.length > 0)
13
+ return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;
14
+ QuantityConstants._LOCALE_DECIMAL_SEPARATOR = ".";
15
+ const matches = (12345.6789).toLocaleString().match(/345(.*)67/);
16
+ if (matches && matches.length > 1)
17
+ QuantityConstants._LOCALE_DECIMAL_SEPARATOR = matches[1];
18
+ return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;
19
+ }
20
+ /** Return the thousand separator for the current locale. */
21
+ static get LocaleSpecificThousandSeparator() {
22
+ if (QuantityConstants._LOCALE_THOUSAND_SEPARATOR.length > 0)
23
+ return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;
24
+ QuantityConstants._LOCALE_THOUSAND_SEPARATOR = ",";
25
+ const matches = (12345.6789).toLocaleString().match(/12(.*)345/);
26
+ if (matches && matches.length > 0)
27
+ QuantityConstants._LOCALE_THOUSAND_SEPARATOR = matches[1];
28
+ return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;
29
+ }
30
+ }
31
+ QuantityConstants.CHAR_COMMA = 44;
32
+ QuantityConstants.CHAR_SPACE = 32;
33
+ QuantityConstants.CHAR_NUMBER = 35;
34
+ QuantityConstants.CHAR_PLUS = 43;
35
+ QuantityConstants.CHAR_MINUS = 45;
36
+ QuantityConstants.CHAR_PERIOD = 46;
37
+ QuantityConstants.CHAR_SLASH = 47;
38
+ QuantityConstants.CHAR_DIVISION_SLASH = 8725;
39
+ QuantityConstants.CHAR_FRACTION_SLASH = 8260;
40
+ QuantityConstants.CHAR_ONE_QUARTER = 188;
41
+ QuantityConstants.CHAR_ONE_HALF = 189;
42
+ QuantityConstants.CHAR_THREE_QUARTER = 190;
43
+ QuantityConstants.CHAR_DIGIT_ZERO = 48;
44
+ QuantityConstants.CHAR_DIGIT_NINE = 57;
45
+ QuantityConstants.CHAR_UPPER_E = 69;
46
+ QuantityConstants.CHAR_LOWER_E = 101;
47
+ QuantityConstants._LOCALE_DECIMAL_SEPARATOR = "";
48
+ QuantityConstants._LOCALE_THOUSAND_SEPARATOR = "";
49
49
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../src/Constants.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,yDAAyD;AAEzD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAoB5B,2DAA2D;IACpD,MAAM,KAAK,8BAA8B;QAC9C,IAAI,iBAAiB,CAAC,yBAAyB,CAAC,MAAM,GAAG,CAAC;YACxD,OAAO,iBAAiB,CAAC,yBAAyB,CAAC;QAErD,iBAAiB,CAAC,yBAAyB,GAAG,GAAG,CAAC;QAClD,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,cAAc,EAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClE,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAC/B,iBAAiB,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAE3D,OAAO,iBAAiB,CAAC,yBAAyB,CAAC;IACrD,CAAC;IAED,4DAA4D;IACrD,MAAM,KAAK,+BAA+B;QAC/C,IAAI,iBAAiB,CAAC,0BAA0B,CAAC,MAAM,GAAG,CAAC;YACzD,OAAO,iBAAiB,CAAC,0BAA0B,CAAC;QAEtD,iBAAiB,CAAC,0BAA0B,GAAG,GAAG,CAAC;QACnD,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,cAAc,EAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClE,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAC/B,iBAAiB,CAAC,0BAA0B,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAE5D,OAAO,iBAAiB,CAAC,0BAA0B,CAAC;IACtD,CAAC;;AA3CsB,4BAAU,GAAG,EAAE,CAAC;AAChB,4BAAU,GAAG,EAAE,CAAC;AAChB,6BAAW,GAAG,EAAE,CAAC;AACjB,2BAAS,GAAG,EAAE,CAAC;AACf,4BAAU,GAAG,EAAE,CAAC;AAChB,6BAAW,GAAG,EAAE,CAAC;AACjB,4BAAU,GAAG,EAAE,CAAC;AAChB,qCAAmB,GAAG,IAAI,CAAC;AAC3B,qCAAmB,GAAG,IAAI,CAAC;AAC3B,kCAAgB,GAAG,GAAG,CAAC;AACvB,+BAAa,GAAG,GAAG,CAAC;AACpB,oCAAkB,GAAG,GAAG,CAAC;AACzB,iCAAe,GAAG,EAAE,CAAC;AACrB,iCAAe,GAAG,EAAE,CAAC;AACrB,8BAAY,GAAG,EAAE,CAAC;AAClB,8BAAY,GAAG,GAAG,CAAC;AAC3B,2CAAyB,GAAG,EAAE,CAAC;AAC/B,4CAA0B,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** Constants used internally for both formatting and parsing.\r\n * @internal\r\n */\r\nexport class QuantityConstants {\r\n public static readonly CHAR_COMMA = 44;\r\n public static readonly CHAR_SPACE = 32;\r\n public static readonly CHAR_NUMBER = 35;\r\n public static readonly CHAR_PLUS = 43;\r\n public static readonly CHAR_MINUS = 45;\r\n public static readonly CHAR_PERIOD = 46;\r\n public static readonly CHAR_SLASH = 47;\r\n public static readonly CHAR_DIVISION_SLASH = 8725;\r\n public static readonly CHAR_FRACTION_SLASH = 8260;\r\n public static readonly CHAR_ONE_QUARTER = 188;\r\n public static readonly CHAR_ONE_HALF = 189;\r\n public static readonly CHAR_THREE_QUARTER = 190;\r\n public static readonly CHAR_DIGIT_ZERO = 48;\r\n public static readonly CHAR_DIGIT_NINE = 57;\r\n public static readonly CHAR_UPPER_E = 69;\r\n public static readonly CHAR_LOWER_E = 101;\r\n private static _LOCALE_DECIMAL_SEPARATOR = \"\";\r\n private static _LOCALE_THOUSAND_SEPARATOR = \"\";\r\n\r\n /** Return the decimal separator for the current locale. */\r\n public static get LocaleSpecificDecimalSeparator(): string {\r\n if (QuantityConstants._LOCALE_DECIMAL_SEPARATOR.length > 0)\r\n return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;\r\n\r\n QuantityConstants._LOCALE_DECIMAL_SEPARATOR = \".\";\r\n const matches = (12345.6789).toLocaleString()!.match(/345(.*)67/);\r\n if (matches && matches.length > 1)\r\n QuantityConstants._LOCALE_DECIMAL_SEPARATOR = matches[1];\r\n\r\n return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;\r\n }\r\n\r\n /** Return the thousand separator for the current locale. */\r\n public static get LocaleSpecificThousandSeparator(): string {\r\n if (QuantityConstants._LOCALE_THOUSAND_SEPARATOR.length > 0)\r\n return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;\r\n\r\n QuantityConstants._LOCALE_THOUSAND_SEPARATOR = \",\";\r\n const matches = (12345.6789).toLocaleString()!.match(/12(.*)345/);\r\n if (matches && matches.length > 0)\r\n QuantityConstants._LOCALE_THOUSAND_SEPARATOR = matches[1];\r\n\r\n return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../src/Constants.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,yDAAyD;AAEzD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAoB5B,2DAA2D;IACpD,MAAM,KAAK,8BAA8B;QAC9C,IAAI,iBAAiB,CAAC,yBAAyB,CAAC,MAAM,GAAG,CAAC;YACxD,OAAO,iBAAiB,CAAC,yBAAyB,CAAC;QAErD,iBAAiB,CAAC,yBAAyB,GAAG,GAAG,CAAC;QAClD,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,cAAc,EAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClE,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAC/B,iBAAiB,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAE3D,OAAO,iBAAiB,CAAC,yBAAyB,CAAC;IACrD,CAAC;IAED,4DAA4D;IACrD,MAAM,KAAK,+BAA+B;QAC/C,IAAI,iBAAiB,CAAC,0BAA0B,CAAC,MAAM,GAAG,CAAC;YACzD,OAAO,iBAAiB,CAAC,0BAA0B,CAAC;QAEtD,iBAAiB,CAAC,0BAA0B,GAAG,GAAG,CAAC;QACnD,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,cAAc,EAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAClE,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAC/B,iBAAiB,CAAC,0BAA0B,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAE5D,OAAO,iBAAiB,CAAC,0BAA0B,CAAC;IACtD,CAAC;;AA3CsB,4BAAU,GAAG,EAAE,CAAC;AAChB,4BAAU,GAAG,EAAE,CAAC;AAChB,6BAAW,GAAG,EAAE,CAAC;AACjB,2BAAS,GAAG,EAAE,CAAC;AACf,4BAAU,GAAG,EAAE,CAAC;AAChB,6BAAW,GAAG,EAAE,CAAC;AACjB,4BAAU,GAAG,EAAE,CAAC;AAChB,qCAAmB,GAAG,IAAI,CAAC;AAC3B,qCAAmB,GAAG,IAAI,CAAC;AAC3B,kCAAgB,GAAG,GAAG,CAAC;AACvB,+BAAa,GAAG,GAAG,CAAC;AACpB,oCAAkB,GAAG,GAAG,CAAC;AACzB,iCAAe,GAAG,EAAE,CAAC;AACrB,iCAAe,GAAG,EAAE,CAAC;AACrB,8BAAY,GAAG,EAAE,CAAC;AAClB,8BAAY,GAAG,GAAG,CAAC;AAC3B,2CAAyB,GAAG,EAAE,CAAC;AAC/B,4CAA0B,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** Constants used internally for both formatting and parsing.\n * @internal\n */\nexport class QuantityConstants {\n public static readonly CHAR_COMMA = 44;\n public static readonly CHAR_SPACE = 32;\n public static readonly CHAR_NUMBER = 35;\n public static readonly CHAR_PLUS = 43;\n public static readonly CHAR_MINUS = 45;\n public static readonly CHAR_PERIOD = 46;\n public static readonly CHAR_SLASH = 47;\n public static readonly CHAR_DIVISION_SLASH = 8725;\n public static readonly CHAR_FRACTION_SLASH = 8260;\n public static readonly CHAR_ONE_QUARTER = 188;\n public static readonly CHAR_ONE_HALF = 189;\n public static readonly CHAR_THREE_QUARTER = 190;\n public static readonly CHAR_DIGIT_ZERO = 48;\n public static readonly CHAR_DIGIT_NINE = 57;\n public static readonly CHAR_UPPER_E = 69;\n public static readonly CHAR_LOWER_E = 101;\n private static _LOCALE_DECIMAL_SEPARATOR = \"\";\n private static _LOCALE_THOUSAND_SEPARATOR = \"\";\n\n /** Return the decimal separator for the current locale. */\n public static get LocaleSpecificDecimalSeparator(): string {\n if (QuantityConstants._LOCALE_DECIMAL_SEPARATOR.length > 0)\n return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;\n\n QuantityConstants._LOCALE_DECIMAL_SEPARATOR = \".\";\n const matches = (12345.6789).toLocaleString()!.match(/345(.*)67/);\n if (matches && matches.length > 1)\n QuantityConstants._LOCALE_DECIMAL_SEPARATOR = matches[1];\n\n return QuantityConstants._LOCALE_DECIMAL_SEPARATOR;\n }\n\n /** Return the thousand separator for the current locale. */\n public static get LocaleSpecificThousandSeparator(): string {\n if (QuantityConstants._LOCALE_THOUSAND_SEPARATOR.length > 0)\n return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;\n\n QuantityConstants._LOCALE_THOUSAND_SEPARATOR = \",\";\n const matches = (12345.6789).toLocaleString()!.match(/12(.*)345/);\n if (matches && matches.length > 0)\n QuantityConstants._LOCALE_THOUSAND_SEPARATOR = matches[1];\n\n return QuantityConstants._LOCALE_THOUSAND_SEPARATOR;\n }\n}\n"]}
@@ -1,27 +1,27 @@
1
- /** @packageDocumentation
2
- * @module Quantity
3
- */
4
- import { BentleyError } from "@itwin/core-bentley";
5
- /**
6
- * Status codes used during Quantity parsing and formatting processing.
7
- * @beta
8
- */
9
- export declare enum QuantityStatus {
10
- QUANTITY_ERROR_BASE = 35039,
11
- Success = 0,
12
- InvalidJson = 35040,
13
- InvalidCompositeFormat = 35041,
14
- UnableToGenerateParseTokens = 35042,
15
- NoValueOrUnitFoundInString = 35043,
16
- UnitLabelSuppliedButNotMatched = 35044,
17
- UnknownUnit = 35045,
18
- UnableToConvertParseTokensToQuantity = 35046
19
- }
20
- /** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.
21
- * @beta
22
- */
23
- export declare class QuantityError extends BentleyError {
24
- readonly errorNumber: number;
25
- constructor(errorNumber: number, message?: string);
26
- }
1
+ /** @packageDocumentation
2
+ * @module Quantity
3
+ */
4
+ import { BentleyError } from "@itwin/core-bentley";
5
+ /**
6
+ * Status codes used during Quantity parsing and formatting processing.
7
+ * @beta
8
+ */
9
+ export declare enum QuantityStatus {
10
+ QUANTITY_ERROR_BASE = 35039,
11
+ Success = 0,
12
+ InvalidJson = 35040,
13
+ InvalidCompositeFormat = 35041,
14
+ UnableToGenerateParseTokens = 35042,
15
+ NoValueOrUnitFoundInString = 35043,
16
+ UnitLabelSuppliedButNotMatched = 35044,
17
+ UnknownUnit = 35045,
18
+ UnableToConvertParseTokensToQuantity = 35046
19
+ }
20
+ /** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.
21
+ * @beta
22
+ */
23
+ export declare class QuantityError extends BentleyError {
24
+ readonly errorNumber: number;
25
+ constructor(errorNumber: number, message?: string);
26
+ }
27
27
  //# sourceMappingURL=Exception.d.ts.map
@@ -1,35 +1,35 @@
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
- import { assert, BentleyError } from "@itwin/core-bentley";
9
- /**
10
- * Status codes used during Quantity parsing and formatting processing.
11
- * @beta
12
- */
13
- export var QuantityStatus;
14
- (function (QuantityStatus) {
15
- QuantityStatus[QuantityStatus["QUANTITY_ERROR_BASE"] = 35039] = "QUANTITY_ERROR_BASE";
16
- QuantityStatus[QuantityStatus["Success"] = 0] = "Success";
17
- QuantityStatus[QuantityStatus["InvalidJson"] = 35040] = "InvalidJson";
18
- QuantityStatus[QuantityStatus["InvalidCompositeFormat"] = 35041] = "InvalidCompositeFormat";
19
- QuantityStatus[QuantityStatus["UnableToGenerateParseTokens"] = 35042] = "UnableToGenerateParseTokens";
20
- QuantityStatus[QuantityStatus["NoValueOrUnitFoundInString"] = 35043] = "NoValueOrUnitFoundInString";
21
- QuantityStatus[QuantityStatus["UnitLabelSuppliedButNotMatched"] = 35044] = "UnitLabelSuppliedButNotMatched";
22
- QuantityStatus[QuantityStatus["UnknownUnit"] = 35045] = "UnknownUnit";
23
- QuantityStatus[QuantityStatus["UnableToConvertParseTokensToQuantity"] = 35046] = "UnableToConvertParseTokensToQuantity";
24
- })(QuantityStatus || (QuantityStatus = {}));
25
- /** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.
26
- * @beta
27
- */
28
- export class QuantityError extends BentleyError {
29
- constructor(errorNumber, message) {
30
- super(errorNumber, message);
31
- this.errorNumber = errorNumber;
32
- assert(errorNumber !== QuantityStatus.Success, message);
33
- }
34
- }
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
+ import { assert, BentleyError } from "@itwin/core-bentley";
9
+ /**
10
+ * Status codes used during Quantity parsing and formatting processing.
11
+ * @beta
12
+ */
13
+ export var QuantityStatus;
14
+ (function (QuantityStatus) {
15
+ QuantityStatus[QuantityStatus["QUANTITY_ERROR_BASE"] = 35039] = "QUANTITY_ERROR_BASE";
16
+ QuantityStatus[QuantityStatus["Success"] = 0] = "Success";
17
+ QuantityStatus[QuantityStatus["InvalidJson"] = 35040] = "InvalidJson";
18
+ QuantityStatus[QuantityStatus["InvalidCompositeFormat"] = 35041] = "InvalidCompositeFormat";
19
+ QuantityStatus[QuantityStatus["UnableToGenerateParseTokens"] = 35042] = "UnableToGenerateParseTokens";
20
+ QuantityStatus[QuantityStatus["NoValueOrUnitFoundInString"] = 35043] = "NoValueOrUnitFoundInString";
21
+ QuantityStatus[QuantityStatus["UnitLabelSuppliedButNotMatched"] = 35044] = "UnitLabelSuppliedButNotMatched";
22
+ QuantityStatus[QuantityStatus["UnknownUnit"] = 35045] = "UnknownUnit";
23
+ QuantityStatus[QuantityStatus["UnableToConvertParseTokensToQuantity"] = 35046] = "UnableToConvertParseTokensToQuantity";
24
+ })(QuantityStatus || (QuantityStatus = {}));
25
+ /** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.
26
+ * @beta
27
+ */
28
+ export class QuantityError extends BentleyError {
29
+ constructor(errorNumber, message) {
30
+ super(errorNumber, message);
31
+ this.errorNumber = errorNumber;
32
+ assert(errorNumber !== QuantityStatus.Success, message);
33
+ }
34
+ }
35
35
  //# sourceMappingURL=Exception.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../src/Exception.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAN,IAAY,cAUX;AAVD,WAAY,cAAc;IACxB,qFAA4B,CAAA;IAC5B,yDAAW,CAAA;IACX,qEAAqC,CAAA;IACrC,2FAAgD,CAAA;IAChD,qGAAqD,CAAA;IACrD,mGAAoD,CAAA;IACpD,2GAAwD,CAAA;IACxD,qEAAqC,CAAA;IACrC,uHAA8D,CAAA;AAChE,CAAC,EAVW,cAAc,KAAd,cAAc,QAUzB;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,YAA4C,WAAmB,EAAE,OAAgB;QAC/E,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QADc,gBAAW,GAAX,WAAW,CAAQ;QAE7D,MAAM,CAAC,WAAW,KAAK,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Quantity\r\n */\r\n\r\nimport { assert, BentleyError } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * Status codes used during Quantity parsing and formatting processing.\r\n * @beta\r\n */\r\nexport enum QuantityStatus {\r\n QUANTITY_ERROR_BASE = 0x88DF,\r\n Success = 0,\r\n InvalidJson = QUANTITY_ERROR_BASE + 1,\r\n InvalidCompositeFormat = QUANTITY_ERROR_BASE + 2,\r\n UnableToGenerateParseTokens = QUANTITY_ERROR_BASE + 3,\r\n NoValueOrUnitFoundInString = QUANTITY_ERROR_BASE + 4,\r\n UnitLabelSuppliedButNotMatched = QUANTITY_ERROR_BASE + 5,\r\n UnknownUnit = QUANTITY_ERROR_BASE + 6,\r\n UnableToConvertParseTokensToQuantity = QUANTITY_ERROR_BASE + 7,\r\n}\r\n\r\n/** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.\r\n * @beta\r\n */\r\nexport class QuantityError extends BentleyError {\r\n public constructor(public override readonly errorNumber: number, message?: string) {\r\n super(errorNumber, message);\r\n assert(errorNumber !== QuantityStatus.Success, message);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../src/Exception.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAN,IAAY,cAUX;AAVD,WAAY,cAAc;IACxB,qFAA4B,CAAA;IAC5B,yDAAW,CAAA;IACX,qEAAqC,CAAA;IACrC,2FAAgD,CAAA;IAChD,qGAAqD,CAAA;IACrD,mGAAoD,CAAA;IACpD,2GAAwD,CAAA;IACxD,qEAAqC,CAAA;IACrC,uHAA8D,CAAA;AAChE,CAAC,EAVW,cAAc,KAAd,cAAc,QAUzB;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,YAA4C,WAAmB,EAAE,OAAgB;QAC/E,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QADc,gBAAW,GAAX,WAAW,CAAQ;QAE7D,MAAM,CAAC,WAAW,KAAK,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Quantity\n */\n\nimport { assert, BentleyError } from \"@itwin/core-bentley\";\n\n/**\n * Status codes used during Quantity parsing and formatting processing.\n * @beta\n */\nexport enum QuantityStatus {\n QUANTITY_ERROR_BASE = 0x88DF,\n Success = 0,\n InvalidJson = QUANTITY_ERROR_BASE + 1,\n InvalidCompositeFormat = QUANTITY_ERROR_BASE + 2,\n UnableToGenerateParseTokens = QUANTITY_ERROR_BASE + 3,\n NoValueOrUnitFoundInString = QUANTITY_ERROR_BASE + 4,\n UnitLabelSuppliedButNotMatched = QUANTITY_ERROR_BASE + 5,\n UnknownUnit = QUANTITY_ERROR_BASE + 6,\n UnableToConvertParseTokensToQuantity = QUANTITY_ERROR_BASE + 7,\n}\n\n/** The error type thrown by this module. See [[QuantityStatus]] for `errorNumber` values.\n * @beta\n */\nexport class QuantityError extends BentleyError {\n public constructor(public override readonly errorNumber: number, message?: string) {\n super(errorNumber, message);\n assert(errorNumber !== QuantityStatus.Success, message);\n }\n}\n"]}