@reekon-tools/boldr-utils 1.0.0 → 1.0.1

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 (2) hide show
  1. package/dist/index.js +73 -0
  2. package/package.json +1 -1
package/dist/index.js ADDED
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DecimalTolerance = exports.FractionalTolerance = exports.convertUnitsToReadable = exports.Units = exports.MeasurementType = exports.ColumnType = exports.InvitationStatus = exports.OrganizationRole = void 0;
4
+ var OrganizationRole;
5
+ (function (OrganizationRole) {
6
+ OrganizationRole["Owner"] = "owner";
7
+ OrganizationRole["Editor"] = "editor";
8
+ })(OrganizationRole || (exports.OrganizationRole = OrganizationRole = {}));
9
+ var InvitationStatus;
10
+ (function (InvitationStatus) {
11
+ InvitationStatus["Pending"] = "pending";
12
+ InvitationStatus["Accepted"] = "accepted";
13
+ })(InvitationStatus || (exports.InvitationStatus = InvitationStatus = {}));
14
+ var ColumnType;
15
+ (function (ColumnType) {
16
+ ColumnType["Text"] = "text";
17
+ ColumnType["Number"] = "number";
18
+ ColumnType["Measurement"] = "measurement";
19
+ ColumnType["Boolean"] = "boolean";
20
+ })(ColumnType || (exports.ColumnType = ColumnType = {}));
21
+ var MeasurementType;
22
+ (function (MeasurementType) {
23
+ })(MeasurementType || (exports.MeasurementType = MeasurementType = {}));
24
+ var Units;
25
+ (function (Units) {
26
+ Units["Centimeters"] = "cm";
27
+ Units["Millimeters"] = "mm";
28
+ Units["Meters"] = "m";
29
+ Units["Inches"] = "in";
30
+ Units["FractionalInches"] = "in_frac";
31
+ Units["Feet"] = "ft";
32
+ Units["FeetInchesDecimal"] = "ft_in_decimal";
33
+ Units["FeetInchesFractional"] = "ft_in_frac";
34
+ })(Units || (exports.Units = Units = {}));
35
+ const convertUnitsToReadable = (targetUnit) => {
36
+ switch (targetUnit) {
37
+ case Units.Meters:
38
+ return 'm';
39
+ case Units.Millimeters:
40
+ return 'mm';
41
+ case Units.Centimeters:
42
+ return 'cm';
43
+ case Units.Feet:
44
+ return 'ft';
45
+ case Units.FractionalInches:
46
+ return 'in (fractional)';
47
+ case Units.Inches:
48
+ return 'in';
49
+ case Units.FeetInchesDecimal:
50
+ return 'ft-in (decimal)';
51
+ case Units.FeetInchesFractional:
52
+ return 'ft-in (fractional)';
53
+ default:
54
+ return targetUnit;
55
+ }
56
+ };
57
+ exports.convertUnitsToReadable = convertUnitsToReadable;
58
+ var FractionalTolerance;
59
+ (function (FractionalTolerance) {
60
+ FractionalTolerance["Fourth"] = "4";
61
+ FractionalTolerance["Eighth"] = "8";
62
+ FractionalTolerance["Sixteenth"] = "16";
63
+ FractionalTolerance["ThirtySecond"] = "32";
64
+ FractionalTolerance["SixtyFourth"] = "64";
65
+ FractionalTolerance["OneTwentyEighth"] = "128";
66
+ })(FractionalTolerance || (exports.FractionalTolerance = FractionalTolerance = {}));
67
+ var DecimalTolerance;
68
+ (function (DecimalTolerance) {
69
+ DecimalTolerance["Half"] = "0.5";
70
+ DecimalTolerance["Tenth"] = "0.1";
71
+ DecimalTolerance["Hundredth"] = "0.01";
72
+ DecimalTolerance["Thousandth"] = "0.001";
73
+ })(DecimalTolerance || (exports.DecimalTolerance = DecimalTolerance = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reekon-tools/boldr-utils",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shared utilities for Boldr projects in Reekon Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",