@reekon-tools/boldr-utils 1.4.4 → 1.4.6
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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/firestore.d.ts +48 -3
- package/dist/types/firestore.js +33 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { evaluateFormula, createFormulaScope, createEnhancedFormulaScope, clearFormulaCache, type EnhancedMapping, type FormulaDefinition, type FormulaEvaluationOptions, } from './formulas/evaluateFormula.js';
|
|
2
|
+
export { calculateFormula } from './formulas/calculateFormula.js';
|
|
2
3
|
export { convertMicrometers } from './utils/micrometersToUnit.js';
|
|
3
4
|
export { parseMeasurement } from './utils/parseMeasurement.js';
|
|
4
5
|
export { useParseMeasurement } from './hooks/useParseMeasurement.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { evaluateFormula, createFormulaScope, createEnhancedFormulaScope, clearFormulaCache, } from './formulas/evaluateFormula.js';
|
|
2
|
+
export { calculateFormula } from './formulas/calculateFormula.js';
|
|
2
3
|
export { convertMicrometers } from './utils/micrometersToUnit.js';
|
|
3
4
|
export { parseMeasurement } from './utils/parseMeasurement.js';
|
|
4
5
|
export { useParseMeasurement } from './hooks/useParseMeasurement.js';
|
|
@@ -62,6 +62,12 @@ export interface Project extends FirestoreDoc, Timestamps {
|
|
|
62
62
|
city: string;
|
|
63
63
|
zipCode: string;
|
|
64
64
|
state: string;
|
|
65
|
+
collectionId: string | null;
|
|
66
|
+
index: number | null;
|
|
67
|
+
}
|
|
68
|
+
export declare enum TemplateType {
|
|
69
|
+
Layout = "layout",
|
|
70
|
+
Annotation = "annotation"
|
|
65
71
|
}
|
|
66
72
|
export interface Template {
|
|
67
73
|
id: string;
|
|
@@ -69,6 +75,7 @@ export interface Template {
|
|
|
69
75
|
description: string;
|
|
70
76
|
diagramFileId: string | null;
|
|
71
77
|
diagramUrl: string;
|
|
78
|
+
type?: TemplateType;
|
|
72
79
|
tableConfig: ColumnConfig[];
|
|
73
80
|
tolerances?: {
|
|
74
81
|
[key: string]: {
|
|
@@ -78,12 +85,43 @@ export interface Template {
|
|
|
78
85
|
deviation: number;
|
|
79
86
|
};
|
|
80
87
|
};
|
|
88
|
+
isPublic: boolean;
|
|
89
|
+
orgId: string;
|
|
90
|
+
orgName: string;
|
|
91
|
+
parentFolderId?: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface SelectedTemplate {
|
|
94
|
+
count: number;
|
|
95
|
+
isPublic: boolean;
|
|
96
|
+
name: string;
|
|
97
|
+
groupType?: string;
|
|
98
|
+
}
|
|
99
|
+
export declare enum FileUploadType {
|
|
100
|
+
Annotation = "annotation",
|
|
101
|
+
Template = "template"
|
|
102
|
+
}
|
|
103
|
+
export interface FileUpload {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
projectId: string;
|
|
107
|
+
jobId: string;
|
|
108
|
+
groupId: string;
|
|
109
|
+
type: FileUploadType;
|
|
110
|
+
folderPath: string;
|
|
111
|
+
thumbnailUrl: string | null;
|
|
112
|
+
fileType: string | null;
|
|
81
113
|
}
|
|
82
114
|
export declare enum FolderType {
|
|
83
115
|
Project = "project",
|
|
84
|
-
Job = "job"
|
|
116
|
+
Job = "job",
|
|
117
|
+
Template = "template"
|
|
85
118
|
}
|
|
86
|
-
export interface
|
|
119
|
+
export interface ProjectFolder extends FirestoreDoc, Timestamps {
|
|
120
|
+
name: string;
|
|
121
|
+
parentFolderId: string | null;
|
|
122
|
+
projectId: string;
|
|
123
|
+
}
|
|
124
|
+
export interface Folder extends FirestoreDoc, Timestamps {
|
|
87
125
|
name: string;
|
|
88
126
|
index: number;
|
|
89
127
|
parentFolderId?: string | null;
|
|
@@ -99,7 +137,8 @@ export interface Job extends FirestoreDoc, Timestamps {
|
|
|
99
137
|
folderId: string;
|
|
100
138
|
progress: number;
|
|
101
139
|
projectId: string;
|
|
102
|
-
totalTasks:
|
|
140
|
+
totalTasks: number;
|
|
141
|
+
lastAccessed: Date;
|
|
103
142
|
toleranceConfig?: {
|
|
104
143
|
thresholds: {
|
|
105
144
|
id: string;
|
|
@@ -140,6 +179,11 @@ export interface Group extends FirestoreDoc, Timestamps {
|
|
|
140
179
|
formula?: any;
|
|
141
180
|
isCompleted?: boolean;
|
|
142
181
|
type?: string;
|
|
182
|
+
details?: {
|
|
183
|
+
material: string;
|
|
184
|
+
finish: string;
|
|
185
|
+
finishDate: string;
|
|
186
|
+
};
|
|
143
187
|
}
|
|
144
188
|
export declare enum ColumnType {
|
|
145
189
|
Text = "text",
|
|
@@ -208,6 +252,7 @@ export declare enum Units {
|
|
|
208
252
|
FeetInchesFractional = "ft_in_frac"
|
|
209
253
|
}
|
|
210
254
|
export declare const convertUnitsToReadable: (targetUnit: Units) => "cm" | "mm" | "m" | "in" | "ft" | "in (fractional)" | "ft-in (decimal)" | "ft-in (fractional)" | null;
|
|
255
|
+
export declare const convertUnitsToReadableShort: (targetUnit: Units) => "cm" | "mm" | "m" | "in" | "ft" | "ft-in";
|
|
211
256
|
export declare enum FractionalTolerance {
|
|
212
257
|
Fourth = "4",
|
|
213
258
|
Eighth = "8",
|
package/dist/types/firestore.js
CHANGED
|
@@ -10,10 +10,21 @@ export var InvitationStatus;
|
|
|
10
10
|
InvitationStatus["Pending"] = "pending";
|
|
11
11
|
InvitationStatus["Accepted"] = "accepted";
|
|
12
12
|
})(InvitationStatus || (InvitationStatus = {}));
|
|
13
|
+
export var TemplateType;
|
|
14
|
+
(function (TemplateType) {
|
|
15
|
+
TemplateType["Layout"] = "layout";
|
|
16
|
+
TemplateType["Annotation"] = "annotation";
|
|
17
|
+
})(TemplateType || (TemplateType = {}));
|
|
18
|
+
export var FileUploadType;
|
|
19
|
+
(function (FileUploadType) {
|
|
20
|
+
FileUploadType["Annotation"] = "annotation";
|
|
21
|
+
FileUploadType["Template"] = "template";
|
|
22
|
+
})(FileUploadType || (FileUploadType = {}));
|
|
13
23
|
export var FolderType;
|
|
14
24
|
(function (FolderType) {
|
|
15
25
|
FolderType["Project"] = "project";
|
|
16
26
|
FolderType["Job"] = "job";
|
|
27
|
+
FolderType["Template"] = "template";
|
|
17
28
|
})(FolderType || (FolderType = {}));
|
|
18
29
|
export var JobType;
|
|
19
30
|
(function (JobType) {
|
|
@@ -70,6 +81,28 @@ export const convertUnitsToReadable = (targetUnit) => {
|
|
|
70
81
|
return null;
|
|
71
82
|
}
|
|
72
83
|
};
|
|
84
|
+
export const convertUnitsToReadableShort = (targetUnit) => {
|
|
85
|
+
switch (targetUnit) {
|
|
86
|
+
case Units.Meters:
|
|
87
|
+
return 'm';
|
|
88
|
+
case Units.Millimeters:
|
|
89
|
+
return 'mm';
|
|
90
|
+
case Units.Centimeters:
|
|
91
|
+
return 'cm';
|
|
92
|
+
case Units.Feet:
|
|
93
|
+
return 'ft';
|
|
94
|
+
case Units.FractionalInches:
|
|
95
|
+
return 'in';
|
|
96
|
+
case Units.Inches:
|
|
97
|
+
return 'in';
|
|
98
|
+
case Units.FeetInchesDecimal:
|
|
99
|
+
return 'ft-in';
|
|
100
|
+
case Units.FeetInchesFractional:
|
|
101
|
+
return 'ft-in';
|
|
102
|
+
default:
|
|
103
|
+
return targetUnit;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
73
106
|
export var FractionalTolerance;
|
|
74
107
|
(function (FractionalTolerance) {
|
|
75
108
|
FractionalTolerance["Fourth"] = "4";
|