@ifc-lite/parser 6.5.0 → 7.0.0
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/README.md +21 -0
- package/dist/cost-category-buckets.d.ts +5 -0
- package/dist/cost-category-buckets.d.ts.map +1 -0
- package/dist/cost-category-buckets.js +37 -0
- package/dist/cost-category-buckets.js.map +1 -0
- package/dist/cost-compatibility-tree.d.ts +4 -0
- package/dist/cost-compatibility-tree.d.ts.map +1 -0
- package/dist/cost-compatibility-tree.js +46 -0
- package/dist/cost-compatibility-tree.js.map +1 -0
- package/dist/cost-evaluation-arithmetic.d.ts +16 -0
- package/dist/cost-evaluation-arithmetic.d.ts.map +1 -0
- package/dist/cost-evaluation-arithmetic.js +181 -0
- package/dist/cost-evaluation-arithmetic.js.map +1 -0
- package/dist/cost-evaluation-context.d.ts +20 -0
- package/dist/cost-evaluation-context.d.ts.map +1 -0
- package/dist/cost-evaluation-context.js +54 -0
- package/dist/cost-evaluation-context.js.map +1 -0
- package/dist/cost-evaluation-result.d.ts +5 -0
- package/dist/cost-evaluation-result.d.ts.map +1 -0
- package/dist/cost-evaluation-result.js +20 -0
- package/dist/cost-evaluation-result.js.map +1 -0
- package/dist/cost-evaluator.d.ts +6 -0
- package/dist/cost-evaluator.d.ts.map +1 -0
- package/dist/cost-evaluator.js +396 -0
- package/dist/cost-evaluator.js.map +1 -0
- package/dist/cost-extractor.d.ts +3 -8
- package/dist/cost-extractor.d.ts.map +1 -1
- package/dist/cost-extractor.js +330 -335
- package/dist/cost-extractor.js.map +1 -1
- package/dist/cost-quantities.d.ts +5 -0
- package/dist/cost-quantities.d.ts.map +1 -0
- package/dist/cost-quantities.js +116 -0
- package/dist/cost-quantities.js.map +1 -0
- package/dist/cost-quantity-evaluator.d.ts +23 -0
- package/dist/cost-quantity-evaluator.d.ts.map +1 -0
- package/dist/cost-quantity-evaluator.js +153 -0
- package/dist/cost-quantity-evaluator.js.map +1 -0
- package/dist/cost-reader.d.ts +26 -0
- package/dist/cost-reader.d.ts.map +1 -0
- package/dist/cost-reader.js +117 -0
- package/dist/cost-reader.js.map +1 -0
- package/dist/cost-relationships.d.ts +7 -0
- package/dist/cost-relationships.d.ts.map +1 -0
- package/dist/cost-relationships.js +237 -0
- package/dist/cost-relationships.js.map +1 -0
- package/dist/cost-step-lexemes.d.ts +16 -0
- package/dist/cost-step-lexemes.d.ts.map +1 -0
- package/dist/cost-step-lexemes.js +131 -0
- package/dist/cost-step-lexemes.js.map +1 -0
- package/dist/cost-types.d.ts +210 -76
- package/dist/cost-types.d.ts.map +1 -1
- package/dist/cost-units.d.ts +38 -0
- package/dist/cost-units.d.ts.map +1 -0
- package/dist/cost-units.js +348 -0
- package/dist/cost-units.js.map +1 -0
- package/dist/cost-value-evaluation-session.d.ts +19 -0
- package/dist/cost-value-evaluation-session.d.ts.map +1 -0
- package/dist/cost-value-evaluation-session.js +25 -0
- package/dist/cost-value-evaluation-session.js.map +1 -0
- package/dist/cost.d.ts +4 -0
- package/dist/cost.d.ts.map +1 -0
- package/dist/cost.js +6 -0
- package/dist/cost.js.map +1 -0
- package/dist/entity-extractor.d.ts.map +1 -1
- package/dist/entity-extractor.js +5 -2
- package/dist/entity-extractor.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/step-entity-parameters.d.ts +9 -0
- package/dist/step-entity-parameters.d.ts.map +1 -0
- package/dist/step-entity-parameters.js +30 -0
- package/dist/step-entity-parameters.js.map +1 -0
- package/package.json +4 -3
- package/dist/cost-schedule-2x3.d.ts +0 -31
- package/dist/cost-schedule-2x3.d.ts.map +0 -1
- package/dist/cost-schedule-2x3.js +0 -75
- package/dist/cost-schedule-2x3.js.map +0 -1
package/dist/cost-types.d.ts
CHANGED
|
@@ -1,105 +1,239 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read-model types for the cost (5D) extractor. See `cost-extractor.ts` for
|
|
3
|
-
* the extraction logic and the relationship-wiring rationale.
|
|
4
|
-
*/
|
|
1
|
+
/** Schema-aware, read-only IFC cost graph types. */
|
|
5
2
|
import type { CollectedQuantity } from './quantity-collect.js';
|
|
6
3
|
export type { CollectedQuantity };
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
export type CostSchemaVersion = 'IFC2X3' | 'IFC4' | 'IFC4X3' | 'IFC5';
|
|
5
|
+
export type CostDiagnosticCode = 'IFC2X3_PARTIAL_READ' | 'UNSUPPORTED_SCHEMA' | 'MISSING_REFERENCE' | 'INVALID_LIST' | 'MULTIPLE_NESTING_PARENTS' | 'NESTING_CYCLE' | 'QUANTITY_CYCLE' | 'VALUE_CYCLE' | 'MISSING_VALUE' | 'INVALID_NUMBER' | 'UNSUPPORTED_APPLIED_VALUE' | 'UNSUPPORTED_CONDITION' | 'UNSUPPORTED_UNIT' | 'INCOMPATIBLE_UNIT' | 'MISSING_CURRENCY' | 'MIXED_CURRENCY' | 'DIVISION_BY_ZERO';
|
|
6
|
+
export interface CostDiagnostic {
|
|
7
|
+
Code: CostDiagnosticCode;
|
|
8
|
+
Message: string;
|
|
9
|
+
Severity: 'warning' | 'error';
|
|
10
|
+
expressId?: number;
|
|
11
|
+
RelatedExpressId?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface CostScheduleInfo {
|
|
14
|
+
expressId: number;
|
|
15
|
+
GlobalId?: string;
|
|
16
|
+
Name?: string;
|
|
17
|
+
Description?: string;
|
|
18
|
+
ObjectType?: string;
|
|
19
|
+
Identification?: string;
|
|
20
|
+
PredefinedType?: string;
|
|
21
|
+
Status?: string;
|
|
22
|
+
SubmittedOn?: string;
|
|
23
|
+
UpdateDate?: string;
|
|
24
|
+
/** IFC2X3-only identifier. */
|
|
25
|
+
ID?: string;
|
|
26
|
+
/** @deprecated Use the exact IFC-cased field. */
|
|
27
|
+
globalId: string;
|
|
28
|
+
/** @deprecated Use the exact IFC-cased field. */
|
|
29
|
+
name: string;
|
|
30
|
+
/** @deprecated Use PredefinedType. */
|
|
31
|
+
predefinedType?: string;
|
|
32
|
+
/** @deprecated Use Status. */
|
|
33
|
+
status?: string;
|
|
34
|
+
/** @deprecated Use SubmittedOn. */
|
|
35
|
+
submittedOn?: string;
|
|
36
|
+
/** @deprecated Use UpdateDate. */
|
|
37
|
+
updateDate?: string;
|
|
38
|
+
/** Existing normalized schedule-root convenience view. */
|
|
39
|
+
costItemGlobalIds: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface CostItemInfo {
|
|
42
|
+
expressId: number;
|
|
43
|
+
GlobalId?: string;
|
|
44
|
+
Name?: string;
|
|
45
|
+
Description?: string;
|
|
46
|
+
ObjectType?: string;
|
|
47
|
+
Identification?: string;
|
|
48
|
+
PredefinedType?: string;
|
|
49
|
+
/** Ordered IFC4/IFC4X3 attribute references. Undefined means absent. */
|
|
50
|
+
CostValues?: number[];
|
|
51
|
+
/** Ordered IFC4/IFC4X3 attribute references. Undefined means absent. */
|
|
52
|
+
CostQuantities?: number[];
|
|
53
|
+
/** @deprecated Use the exact IFC-cased field. */
|
|
54
|
+
globalId: string;
|
|
55
|
+
/** @deprecated Use the exact IFC-cased field. */
|
|
56
|
+
name: string;
|
|
57
|
+
/** @deprecated Use PredefinedType. */
|
|
58
|
+
predefinedType?: string;
|
|
59
|
+
/** Existing normalized quantity view; never falls back to product Qto. */
|
|
60
|
+
costQuantities?: CollectedQuantity[];
|
|
61
|
+
/** Existing nested value view retained for compatibility. */
|
|
62
|
+
costValues?: CostValueInfo[];
|
|
63
|
+
parentGlobalId?: string;
|
|
64
|
+
childGlobalIds: string[];
|
|
65
|
+
productExpressIds: number[];
|
|
66
|
+
productGlobalIds: string[];
|
|
67
|
+
controllingScheduleGlobalIds: string[];
|
|
68
|
+
}
|
|
20
69
|
export interface CostValueUnitBasis {
|
|
21
|
-
/** `ValueComponent`, e.g. `1` in "per 1 hour". `undefined` when the
|
|
22
|
-
* `IfcValue` select member is not a plain numeric measure this reader
|
|
23
|
-
* resolves (same resolution `appliedValue` below uses). */
|
|
24
70
|
valueComponent?: number;
|
|
25
|
-
/** `UnitComponent`'s display symbol, e.g. `"h"`, `"m²"`. `undefined` when
|
|
26
|
-
* `resolveUnitByRef` does not resolve the referenced `IfcUnit` member. */
|
|
27
71
|
unitSymbol?: string;
|
|
28
|
-
/** SI scale factor for `unitSymbol`, when resolved. */
|
|
29
72
|
unitSiScale?: number;
|
|
30
73
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
74
|
+
export type CostAppliedValue = {
|
|
75
|
+
Kind: 'Typed';
|
|
76
|
+
Type: string;
|
|
77
|
+
Value: string;
|
|
78
|
+
} | {
|
|
79
|
+
Kind: 'Reference';
|
|
80
|
+
expressId: number;
|
|
81
|
+
} | {
|
|
82
|
+
Kind: 'Unsupported';
|
|
83
|
+
Raw: unknown;
|
|
84
|
+
InvalidNumber?: boolean;
|
|
85
|
+
};
|
|
37
86
|
export interface CostValueInfo {
|
|
87
|
+
/** Present on values returned by the schema-aware extractor. Optional for source compatibility. */
|
|
88
|
+
expressId?: number;
|
|
89
|
+
/** Present on values returned by the schema-aware extractor. Optional for source compatibility. */
|
|
90
|
+
Type?: 'IfcCostValue' | 'IfcAppliedValue';
|
|
91
|
+
Name?: string;
|
|
92
|
+
Description?: string;
|
|
93
|
+
AppliedValue?: CostAppliedValue;
|
|
94
|
+
UnitBasis?: number;
|
|
95
|
+
/** The source supplied UnitBasis but it was not an entity reference. */
|
|
96
|
+
InvalidUnitBasis?: boolean;
|
|
97
|
+
ApplicableDate?: string;
|
|
98
|
+
FixedUntilDate?: string;
|
|
99
|
+
Category?: string;
|
|
100
|
+
Condition?: string;
|
|
101
|
+
/** The source supplied Condition with a non-string representation. */
|
|
102
|
+
InvalidCondition?: boolean;
|
|
103
|
+
ArithmeticOperator?: string;
|
|
104
|
+
/** Ordered references; shared references retain their original expressId. */
|
|
105
|
+
Components?: number[];
|
|
106
|
+
/** IFC2X3-only equivalent of Category. */
|
|
107
|
+
CostType?: string;
|
|
108
|
+
/** @deprecated Use the exact IFC-cased field. */
|
|
38
109
|
name?: string;
|
|
110
|
+
/** @deprecated Use the exact IFC-cased field. */
|
|
39
111
|
description?: string;
|
|
40
|
-
/**
|
|
41
|
-
* `AppliedValue` is an `IfcAppliedValueSelect` — in practice almost always
|
|
42
|
-
* an `IfcMonetaryMeasure`/`IfcNumericMeasure`/`IfcRatioMeasure` typed
|
|
43
|
-
* numeric wrapper. Resolved to a plain number when the wrapped value reads
|
|
44
|
-
* as one; left `undefined` when it selects a non-numeric member (e.g. an
|
|
45
|
-
* `IfcMeasureWithUnit` reference) this extractor does not resolve.
|
|
46
|
-
*/
|
|
112
|
+
/** @deprecated Use AppliedValue. */
|
|
47
113
|
appliedValue?: number;
|
|
48
|
-
/**
|
|
114
|
+
/** Existing resolved rate basis view. */
|
|
49
115
|
unitBasis?: CostValueUnitBasis;
|
|
50
116
|
applicableDate?: string;
|
|
51
117
|
fixedUntilDate?: string;
|
|
52
118
|
category?: string;
|
|
53
119
|
condition?: string;
|
|
54
120
|
arithmeticOperator?: string;
|
|
55
|
-
/**
|
|
121
|
+
/** Existing nested component view. Shared identity is available in Components. */
|
|
56
122
|
components?: CostValueInfo[];
|
|
57
123
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
* `costQuantities` is `undefined` when `CostQuantities` is absent (the
|
|
62
|
-
* schema's `LIST [1:?]` forbids an empty-but-declared list, so `undefined`
|
|
63
|
-
* is the only "nothing here" state) or when every referenced quantity failed
|
|
64
|
-
* to resolve. It is never a fallback to a product's `Qto_` quantities — see
|
|
65
|
-
* `cost-extractor.ts` for why.
|
|
66
|
-
*
|
|
67
|
-
* `productExpressIds`/`productGlobalIds` use an empty array as a genuine
|
|
68
|
-
* "no products assigned" state, distinct from "not resolved".
|
|
69
|
-
*/
|
|
70
|
-
export interface CostItemInfo {
|
|
124
|
+
export type CostQuantityDimension = 'length' | 'area' | 'volume' | 'mass' | 'time' | 'count' | 'number';
|
|
125
|
+
export interface CostQuantityInfo {
|
|
71
126
|
expressId: number;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
127
|
+
Type: string;
|
|
128
|
+
Name?: string;
|
|
129
|
+
Description?: string;
|
|
130
|
+
Unit?: number;
|
|
131
|
+
/** The source supplied Unit but it was not an entity reference. */
|
|
132
|
+
InvalidUnit?: boolean;
|
|
133
|
+
LengthValue?: string;
|
|
134
|
+
AreaValue?: string;
|
|
135
|
+
VolumeValue?: string;
|
|
136
|
+
CountValue?: string;
|
|
137
|
+
WeightValue?: string;
|
|
138
|
+
TimeValue?: string;
|
|
139
|
+
NumberValue?: string;
|
|
140
|
+
Formula?: string;
|
|
141
|
+
Dimension?: CostQuantityDimension;
|
|
142
|
+
/** IfcPhysicalComplexQuantity children, in source order. */
|
|
143
|
+
HasQuantities?: number[];
|
|
144
|
+
/** The source aggregate contained a non-reference member. */
|
|
145
|
+
InvalidHasQuantities?: boolean;
|
|
87
146
|
}
|
|
88
|
-
export interface
|
|
147
|
+
export interface CostUnitInfo {
|
|
89
148
|
expressId: number;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
149
|
+
Type: string;
|
|
150
|
+
UnitType?: string;
|
|
151
|
+
Prefix?: string;
|
|
152
|
+
Name?: string;
|
|
153
|
+
Symbol?: string;
|
|
154
|
+
Currency?: string;
|
|
155
|
+
Dimension?: CostQuantityDimension;
|
|
156
|
+
/** Decimal multiplier into the dimension's canonical SI unit. */
|
|
157
|
+
Scale?: string;
|
|
158
|
+
}
|
|
159
|
+
export interface CostMeasureWithUnitInfo {
|
|
160
|
+
expressId: number;
|
|
161
|
+
ValueComponent: string;
|
|
162
|
+
UnitComponent: number;
|
|
163
|
+
ValueType?: string;
|
|
164
|
+
ValueDimension?: CostQuantityDimension;
|
|
98
165
|
}
|
|
166
|
+
export type CostRelationshipType = 'IfcRelAssignsToControl' | 'IfcRelAssignsToProduct' | 'IfcRelAssignsToProcess' | 'IfcRelNests' | 'IfcRelDeclares' | 'IfcRelAssociatesAppliedValue' | 'IfcRelSchedulesCostItems' | 'IfcAppliedValueRelationship';
|
|
167
|
+
/**
|
|
168
|
+
* Exact relationship endpoints are retained instead of flattened ID arrays.
|
|
169
|
+
* Only attributes present on a relationship kind are populated.
|
|
170
|
+
*/
|
|
171
|
+
export interface CostRelationshipInfo {
|
|
172
|
+
expressId: number;
|
|
173
|
+
Type: CostRelationshipType;
|
|
174
|
+
GlobalId?: string;
|
|
175
|
+
Name?: string;
|
|
176
|
+
Description?: string;
|
|
177
|
+
RelatedObjects?: number[];
|
|
178
|
+
/** The source RelatedObjects aggregate contained a non-reference member. */
|
|
179
|
+
InvalidRelatedObjects?: boolean;
|
|
180
|
+
/** One or more source endpoints were present but not STEP references. */
|
|
181
|
+
InvalidReferences?: boolean;
|
|
182
|
+
RelatedDefinitions?: number[];
|
|
183
|
+
RelatingControl?: number;
|
|
184
|
+
RelatingObject?: number;
|
|
185
|
+
RelatingProduct?: number;
|
|
186
|
+
RelatingProcess?: number;
|
|
187
|
+
RelatingContext?: number;
|
|
188
|
+
RelatingAppliedValue?: number;
|
|
189
|
+
ComponentOfTotal?: number;
|
|
190
|
+
Components?: number[];
|
|
191
|
+
ArithmeticOperator?: string;
|
|
192
|
+
}
|
|
193
|
+
/** Backward-compatible normalized extraction shape. */
|
|
99
194
|
export interface CostExtraction {
|
|
100
195
|
costSchedules: CostScheduleInfo[];
|
|
101
196
|
costItems: CostItemInfo[];
|
|
102
|
-
/** True if we encountered any costing entity (useful for empty-state UI). */
|
|
103
197
|
hasCost: boolean;
|
|
198
|
+
SchemaVersion?: CostSchemaVersion;
|
|
199
|
+
CostSchedules?: CostScheduleInfo[];
|
|
200
|
+
CostItems?: CostItemInfo[];
|
|
201
|
+
CostValues?: CostValueInfo[];
|
|
202
|
+
CostQuantities?: CostQuantityInfo[];
|
|
203
|
+
Units?: CostUnitInfo[];
|
|
204
|
+
MeasuresWithUnit?: CostMeasureWithUnitInfo[];
|
|
205
|
+
ProjectUnits?: Partial<Record<CostQuantityDimension, number>>;
|
|
206
|
+
Relationships?: CostRelationshipInfo[];
|
|
207
|
+
Diagnostics?: CostDiagnostic[];
|
|
208
|
+
HasCostData?: boolean;
|
|
209
|
+
Currency?: string;
|
|
210
|
+
}
|
|
211
|
+
/** Complete schema-aware graph returned by {@link extractCostOnDemand}. */
|
|
212
|
+
export interface CostGraphExtraction extends CostExtraction {
|
|
213
|
+
SchemaVersion: CostSchemaVersion;
|
|
214
|
+
CostSchedules: CostScheduleInfo[];
|
|
215
|
+
CostItems: CostItemInfo[];
|
|
216
|
+
CostValues: CostValueInfo[];
|
|
217
|
+
CostQuantities: CostQuantityInfo[];
|
|
218
|
+
Units: CostUnitInfo[];
|
|
219
|
+
MeasuresWithUnit: CostMeasureWithUnitInfo[];
|
|
220
|
+
ProjectUnits: Partial<Record<CostQuantityDimension, number>>;
|
|
221
|
+
Relationships: CostRelationshipInfo[];
|
|
222
|
+
Diagnostics: CostDiagnostic[];
|
|
223
|
+
HasCostData: boolean;
|
|
224
|
+
/** Project currency, when supplied by IfcUnitAssignment. */
|
|
225
|
+
Currency?: string;
|
|
226
|
+
}
|
|
227
|
+
export interface CostEvaluationResult {
|
|
228
|
+
expressId: number;
|
|
229
|
+
Amount?: string;
|
|
230
|
+
Currency?: string;
|
|
231
|
+
Dimension?: CostQuantityDimension | 'ratio';
|
|
232
|
+
QuantityApplied?: string;
|
|
233
|
+
Diagnostics: CostDiagnostic[];
|
|
234
|
+
}
|
|
235
|
+
export interface CostEvaluationOptions {
|
|
236
|
+
/** Decimal significant-digit precision from 1 through 10,000. Defaults to 34 (decimal128). */
|
|
237
|
+
Precision?: number;
|
|
104
238
|
}
|
|
105
239
|
//# sourceMappingURL=cost-types.d.ts.map
|
package/dist/cost-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost-types.d.ts","sourceRoot":"","sources":["../src/cost-types.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"cost-types.d.ts","sourceRoot":"","sources":["../src/cost-types.ts"],"names":[],"mappings":"AAIA,oDAAoD;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAC1B,qBAAqB,GACrB,oBAAoB,GACpB,mBAAmB,GACnB,cAAc,GACd,0BAA0B,GAC1B,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,2BAA2B,GAC3B,uBAAuB,GACvB,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,C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zD,aAAa,EAAE,iBAAiB,CAAC;IACjC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;IAC5C,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7D,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CostDiagnostic, CostMeasureWithUnitInfo, CostQuantityDimension, CostUnitInfo } from './cost-types.js';
|
|
2
|
+
import { CostEntityReader } from './cost-reader.js';
|
|
3
|
+
export interface ResolvedMeasureWithUnit {
|
|
4
|
+
Value: string;
|
|
5
|
+
Unit: CostUnitInfo;
|
|
6
|
+
ValueType?: string;
|
|
7
|
+
ValueDimension?: CostQuantityDimension;
|
|
8
|
+
}
|
|
9
|
+
export interface CompatibilityMeasureWithUnit {
|
|
10
|
+
Value?: string;
|
|
11
|
+
Unit?: CostUnitInfo;
|
|
12
|
+
}
|
|
13
|
+
export declare class CostUnitResolver {
|
|
14
|
+
private readonly reader;
|
|
15
|
+
private readonly diagnostics;
|
|
16
|
+
readonly Units: Map<number, CostUnitInfo>;
|
|
17
|
+
readonly MeasuresWithUnit: Map<number, CostMeasureWithUnitInfo>;
|
|
18
|
+
readonly ProjectUnits: Map<CostQuantityDimension, CostUnitInfo>;
|
|
19
|
+
Currency?: string;
|
|
20
|
+
private conversionScaleWork;
|
|
21
|
+
private conversionScaleBudgetReported;
|
|
22
|
+
constructor(reader: CostEntityReader, diagnostics: CostDiagnostic[]);
|
|
23
|
+
resolve(expressId: number): CostUnitInfo | undefined;
|
|
24
|
+
private buildSimpleUnit;
|
|
25
|
+
private unresolvedUnit;
|
|
26
|
+
private buildConversionUnit;
|
|
27
|
+
private conversionScale;
|
|
28
|
+
resolveMeasureWithUnit(expressId: number | undefined): ResolvedMeasureWithUnit | undefined;
|
|
29
|
+
/** Preserve the former best-effort rate marker without weakening canonical validation. */
|
|
30
|
+
compatibilityMeasureWithUnit(expressId: number | undefined, canonical: ResolvedMeasureWithUnit | undefined): CompatibilityMeasureWithUnit | undefined;
|
|
31
|
+
private readMeasureHeader;
|
|
32
|
+
private readMeasure;
|
|
33
|
+
private readProjectUnits;
|
|
34
|
+
private warn;
|
|
35
|
+
private reference;
|
|
36
|
+
private references;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=cost-units.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost-units.d.ts","sourceRoot":"","sources":["../src/cost-units.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAoB,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAuEtE,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC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