@masterteam/components 0.0.343 → 0.0.345
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/assets/common.css +1 -1
- package/assets/i18n/ar.json +224 -4
- package/assets/i18n/en.json +224 -4
- package/fesm2022/masterteam-components-entities.mjs +3369 -252
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +568 -45
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, Type, OnInit, ElementRef, NgZone
|
|
2
|
+
import { InjectionToken, Type, Signal, OnInit, ElementRef, NgZone } from '@angular/core';
|
|
3
3
|
import * as _masterteam_components_entities from '@masterteam/components/entities';
|
|
4
4
|
import { MTDateFormatType } from '@masterteam/components';
|
|
5
5
|
import { MTIcon } from '@masterteam/icons';
|
|
6
6
|
import { HttpContext } from '@angular/common/http';
|
|
7
|
+
import { Popover } from 'primeng/popover';
|
|
7
8
|
import { Observable } from 'rxjs';
|
|
8
9
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
10
|
import { TranslocoService } from '@jsverse/transloco';
|
|
@@ -116,59 +117,121 @@ interface EntityCalculationExplanationTarget {
|
|
|
116
117
|
label: string;
|
|
117
118
|
/** The raw value on screen, compared with the saved one. */
|
|
118
119
|
displayedValue: string | undefined;
|
|
120
|
+
/** How the value is shown, when the response does not say. */
|
|
121
|
+
viewType?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Names of status keys the host already knows (the value on screen), so a
|
|
124
|
+
* status rule reads as its name rather than its key.
|
|
125
|
+
*/
|
|
126
|
+
statusNames?: Record<string, string>;
|
|
119
127
|
}
|
|
120
128
|
/**
|
|
121
129
|
* `GET properties/calculation-explanation`. The backend returns these as
|
|
122
130
|
* camelCase strings; anything else is treated as unavailable.
|
|
123
131
|
*/
|
|
124
132
|
type CalculationExplanationStatus = 'available' | 'notCaptured' | 'unsupported' | 'limitExceeded' | 'restricted' | 'valueChanged' | 'notCalculated';
|
|
133
|
+
/**
|
|
134
|
+
* What the explanation describes. `savedCalculation` is the calculation that
|
|
135
|
+
* produced the persisted value; `currentCalculation` evaluates current data
|
|
136
|
+
* read-only (native schedule fields) and claims no saved revision.
|
|
137
|
+
*/
|
|
138
|
+
type CalculationExplanationBasis = 'savedCalculation' | 'currentCalculation';
|
|
125
139
|
/** A JSON value captured by the backend, shown as plain text. */
|
|
126
140
|
type CalculationExplanationValue = string | number | boolean | null | CalculationExplanationValue[] | {
|
|
127
141
|
[key: string]: CalculationExplanationValue;
|
|
128
142
|
};
|
|
129
143
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
144
|
+
* Current, authorized display metadata of a property. Names are today's, not
|
|
145
|
+
* the ones at calculation time; the numbers always come from the calculation.
|
|
146
|
+
*/
|
|
147
|
+
interface CalculationPropertyDisplay {
|
|
148
|
+
key: string;
|
|
149
|
+
name: string;
|
|
150
|
+
nameEn: string | null;
|
|
151
|
+
nameAr: string | null;
|
|
152
|
+
viewType: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The calculation of one value. Not wrapped in the usual response envelope:
|
|
156
|
+
* the endpoint returns this object as is.
|
|
132
157
|
*/
|
|
133
158
|
interface CalculationExplanationResponse {
|
|
134
159
|
status: CalculationExplanationStatus | (string & {});
|
|
135
160
|
propertyKey: string;
|
|
161
|
+
/** Absent from responses before the backend added current calculations. */
|
|
162
|
+
basis?: CalculationExplanationBasis | (string & {});
|
|
136
163
|
valueVersion: string | null;
|
|
137
164
|
/** The formula was changed after this value was saved. */
|
|
138
165
|
definitionChanged: boolean;
|
|
139
|
-
/** Only with `available
|
|
166
|
+
/** Only with `available`. */
|
|
140
167
|
explanation?: CalculationExplanationDocument | null;
|
|
168
|
+
/** The persisted, normalized value the explanation belongs to (saved basis). */
|
|
141
169
|
savedValue?: string | null;
|
|
170
|
+
/** The explained property, as it is configured now. */
|
|
171
|
+
display?: CalculationPropertyDisplay | null;
|
|
142
172
|
}
|
|
173
|
+
type CalculationExplanationProvider = 'formula' | 'status' | 'nativeMethod' | 'codeBuilder' | 'schedule';
|
|
143
174
|
interface CalculationExplanationDocument {
|
|
144
175
|
schemaVersion: number;
|
|
145
176
|
calculationId: string;
|
|
146
|
-
provider: string;
|
|
177
|
+
provider: CalculationExplanationProvider | (string & {});
|
|
147
178
|
providerVersion: string;
|
|
148
179
|
engineVersion: string;
|
|
149
180
|
status: string;
|
|
150
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* The saved formula with internal property references; for a native method
|
|
183
|
+
* or a schedule field, an English description of the calculation instead.
|
|
184
|
+
* Diagnostic only: never shown, the UI builds its wording from the nodes.
|
|
185
|
+
*/
|
|
151
186
|
formula: string;
|
|
187
|
+
/**
|
|
188
|
+
* A stable key for a server-authored description (`calculation.method.*`,
|
|
189
|
+
* `calculation.schedule.*`, `calculation.status.*`). Absent on older saved
|
|
190
|
+
* captures and on ordinary formulas.
|
|
191
|
+
*/
|
|
192
|
+
descriptionKey?: string | null;
|
|
152
193
|
definitionHash: string;
|
|
153
194
|
calculatedAt: string;
|
|
154
195
|
/** The formula with every input replaced by its value: `(20 * 2)`. */
|
|
155
196
|
formulaWithValues: string | null;
|
|
156
|
-
/** The engine output, before the backend normalized it for saving. */
|
|
197
|
+
/** The typed engine output, before the backend normalized it for saving. */
|
|
157
198
|
result: CalculationExplanationValue;
|
|
158
199
|
rootNodeId: number;
|
|
159
200
|
nodes: CalculationExplanationNode[];
|
|
160
201
|
sources: CalculationExplanationSourceRecords[];
|
|
202
|
+
/** Progress rollups behind `@Schedule::*_progress` references. */
|
|
203
|
+
schedule?: ScheduleCalculationExplanation[];
|
|
204
|
+
/** Status rules in configured order (status provider). */
|
|
205
|
+
statusRules?: CalculationStatusRuleExplanation[];
|
|
161
206
|
}
|
|
207
|
+
type CalculationExplanationNodeKind = 'literal' | 'input' | 'binary' | 'unary' | 'function' | 'conditional' | 'array' | 'table' | 'semantic' | 'selection' | 'method' | 'codeBlock';
|
|
162
208
|
interface CalculationExplanationNode {
|
|
163
209
|
id: number;
|
|
164
|
-
kind:
|
|
210
|
+
kind: CalculationExplanationNodeKind | (string & {});
|
|
165
211
|
operation: string | null;
|
|
212
|
+
/** Diagnostic text (formula source or an English fact label); never shown. */
|
|
166
213
|
expression: string;
|
|
214
|
+
/** A stable key for a native fact's label (`calculation.fact.*`). */
|
|
215
|
+
labelKey?: string | null;
|
|
167
216
|
children: number[];
|
|
168
217
|
argumentNames: (string | null)[];
|
|
218
|
+
/** `notEvaluated` (a branch never reached) is not an evaluated `null`. */
|
|
169
219
|
state: 'evaluated' | 'notEvaluated' | (string & {});
|
|
170
|
-
value
|
|
220
|
+
value?: CalculationExplanationValue;
|
|
171
221
|
reference: string | null;
|
|
222
|
+
/** The referenced property, for an input whose source was authorized. */
|
|
223
|
+
display?: CalculationPropertyDisplay | null;
|
|
224
|
+
/**
|
|
225
|
+
* The rows behind a vector input: `recordIds[i]` is the row of `value[i]`,
|
|
226
|
+
* nulls and repeats included. Never re-sorted, never taken from `sources`.
|
|
227
|
+
*/
|
|
228
|
+
recordIds?: number[];
|
|
229
|
+
}
|
|
230
|
+
/** A record a calculation read, to be named through an authorized read. */
|
|
231
|
+
interface CalculationRecordRef {
|
|
232
|
+
/** `Level:1/Module:4`, as the explanation wrote it. */
|
|
233
|
+
contextKey: string;
|
|
234
|
+
recordId: number;
|
|
172
235
|
}
|
|
173
236
|
interface CalculationExplanationSourceRecords {
|
|
174
237
|
tablePath: string;
|
|
@@ -176,6 +239,60 @@ interface CalculationExplanationSourceRecords {
|
|
|
176
239
|
recordIds: number[];
|
|
177
240
|
propertyKeys: string[];
|
|
178
241
|
}
|
|
242
|
+
interface CalculationStatusRuleExplanation {
|
|
243
|
+
key: string;
|
|
244
|
+
order: number;
|
|
245
|
+
state: 'evaluated' | 'failed' | 'notEvaluated' | (string & {});
|
|
246
|
+
selected: boolean;
|
|
247
|
+
/** The rule's condition, explained like a formula. */
|
|
248
|
+
condition: CalculationExplanationDocument | null;
|
|
249
|
+
}
|
|
250
|
+
interface ScheduleCalculationExplanation {
|
|
251
|
+
/** The semantic node it belongs to: `Schedule::actual_progress`. */
|
|
252
|
+
reference: string;
|
|
253
|
+
asOfUtc: string;
|
|
254
|
+
weightMode: 'workingDays' | 'explicitWeight' | (string & {});
|
|
255
|
+
aggregation: 'weightedAverage' | 'arithmeticMean' | 'empty' | (string & {});
|
|
256
|
+
formulaWithValues: string;
|
|
257
|
+
result: number;
|
|
258
|
+
roundingDigits: number;
|
|
259
|
+
roundingMode: string;
|
|
260
|
+
includeMilestones: boolean;
|
|
261
|
+
excludeSameDayMilestones: boolean;
|
|
262
|
+
leafOnly: boolean;
|
|
263
|
+
excludedRowCount: number;
|
|
264
|
+
notes: string[];
|
|
265
|
+
contributors: ScheduleCalculationContributor[];
|
|
266
|
+
}
|
|
267
|
+
interface ScheduleCalculationContributor {
|
|
268
|
+
recordId: number;
|
|
269
|
+
moduleKey: string;
|
|
270
|
+
contextKey: string | null;
|
|
271
|
+
progress: number;
|
|
272
|
+
weight: number;
|
|
273
|
+
inputMissing: boolean;
|
|
274
|
+
includedInAggregation: boolean;
|
|
275
|
+
plannedStart: string | null;
|
|
276
|
+
plannedFinish: string | null;
|
|
277
|
+
plannedCalculation: PlannedProgressExplanation | null;
|
|
278
|
+
}
|
|
279
|
+
/** How one item's planned progress was derived from its dates and calendar. */
|
|
280
|
+
interface PlannedProgressExplanation {
|
|
281
|
+
result: number;
|
|
282
|
+
rule: 'missingDates' | 'invalidDateRange' | 'beforeStart' | 'afterFinish' | 'milestoneDueDate' | 'noWorkingTime' | 'elapsedWorkingMinutes' | (string & {});
|
|
283
|
+
elapsedWorkingMinutes: number | null;
|
|
284
|
+
totalWorkingMinutes: number | null;
|
|
285
|
+
asOfLocal: string;
|
|
286
|
+
timeZoneId: string;
|
|
287
|
+
calendarSource: string;
|
|
288
|
+
workDayStartMinute: number;
|
|
289
|
+
workDayEndMinute: number;
|
|
290
|
+
/** Sunday = 0. */
|
|
291
|
+
workingDays: number[];
|
|
292
|
+
holidays: string[];
|
|
293
|
+
plannedStart: string | null;
|
|
294
|
+
plannedFinish: string | null;
|
|
295
|
+
}
|
|
179
296
|
|
|
180
297
|
/** A recalculation covering this value is running, or queued behind another. */
|
|
181
298
|
type EntityCalculationStatus = 'running' | 'waiting' | 'delayed';
|
|
@@ -2065,7 +2182,8 @@ interface CalculatedPropertyMeta {
|
|
|
2065
2182
|
* Whether a surface marks this property as calculated. `isCalculated` alone is
|
|
2066
2183
|
* too broad: the backend also sets it, with no calculation method, on system
|
|
2067
2184
|
* columns such as `created_at`, `id` and `team_members`. A status has no method
|
|
2068
|
-
* but is recalculated
|
|
2185
|
+
* but is recalculated. An auto code is generated rather than recalculated, but
|
|
2186
|
+
* the backend explains it like any calculated value, so it is marked too.
|
|
2069
2187
|
*/
|
|
2070
2188
|
declare function isCalculatedProperty(meta: CalculatedPropertyMeta | null | undefined): boolean;
|
|
2071
2189
|
/**
|
|
@@ -2121,8 +2239,10 @@ declare class EntityCalculatedIndicator {
|
|
|
2121
2239
|
readonly change: _angular_core.InputSignal<EntityCalculationChange | null | undefined>;
|
|
2122
2240
|
/** The value to explain on click. Without it the mark only has a tooltip. */
|
|
2123
2241
|
readonly explanation: _angular_core.InputSignal<EntityCalculationExplanationTarget | null>;
|
|
2124
|
-
|
|
2242
|
+
protected readonly popover: _angular_core.Signal<Popover | undefined>;
|
|
2125
2243
|
protected readonly opened: _angular_core.WritableSignal<boolean>;
|
|
2244
|
+
private readonly explanationElement;
|
|
2245
|
+
constructor();
|
|
2126
2246
|
protected readonly pulsing: _angular_core.Signal<boolean>;
|
|
2127
2247
|
protected readonly tooltipKey: _angular_core.Signal<string>;
|
|
2128
2248
|
protected readonly tooltipParams: _angular_core.Signal<{
|
|
@@ -2145,6 +2265,26 @@ declare class CalculationExplanationApi {
|
|
|
2145
2265
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationApi, never>;
|
|
2146
2266
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CalculationExplanationApi>;
|
|
2147
2267
|
}
|
|
2268
|
+
/**
|
|
2269
|
+
* Names the records a calculation read (schedule items, financial rows) through
|
|
2270
|
+
* the normal runtime record reads, so a contributor reads as its title rather
|
|
2271
|
+
* than its id. Only names are taken; the numbers stay the captured ones.
|
|
2272
|
+
*/
|
|
2273
|
+
declare class CalculationRecordNames {
|
|
2274
|
+
private readonly http;
|
|
2275
|
+
/**
|
|
2276
|
+
* Names by {@link calculationRecordKey}. A record the reader may not see, or
|
|
2277
|
+
* any failed read, is simply absent.
|
|
2278
|
+
*/
|
|
2279
|
+
read(owner: EntityCalculationSource, refs: CalculationRecordRef[]): Observable<Record<string, string>>;
|
|
2280
|
+
private readContext;
|
|
2281
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationRecordNames, never>;
|
|
2282
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CalculationRecordNames>;
|
|
2283
|
+
}
|
|
2284
|
+
/** `Level:1/Module:4` → `level:1/module:4`, the casing record reads use. */
|
|
2285
|
+
declare function toFetchContextKey(contextKey: string | null): string | null;
|
|
2286
|
+
/** The key a record's name is stored under. */
|
|
2287
|
+
declare function calculationRecordKey(contextKey: string | null, recordId: number): string;
|
|
2148
2288
|
/**
|
|
2149
2289
|
* The context key in the casing the endpoint accepts. Fetch contexts are
|
|
2150
2290
|
* written `level:12/module:5`, but this endpoint validates `Level:12/Module:5`
|
|
@@ -2153,10 +2293,9 @@ declare class CalculationExplanationApi {
|
|
|
2153
2293
|
*/
|
|
2154
2294
|
declare function toCalculationContextKey(contextKey: string): string | null;
|
|
2155
2295
|
/**
|
|
2156
|
-
* What a value's calculated-value mark explains on click:
|
|
2157
|
-
*
|
|
2158
|
-
*
|
|
2159
|
-
* keeps the plain mark.
|
|
2296
|
+
* What a value's calculated-value mark explains on click: any calculated value
|
|
2297
|
+
* (a formula, a status, a generated code, a date or an amount) whose host
|
|
2298
|
+
* named the record it was read from.
|
|
2160
2299
|
*/
|
|
2161
2300
|
declare function toCalculationExplanationTarget(entity: EntityData | null | undefined, label?: string | null): EntityCalculationExplanationTarget | null;
|
|
2162
2301
|
/**
|
|
@@ -2168,6 +2307,402 @@ declare abstract class EntityCalculationRefresher {
|
|
|
2168
2307
|
abstract refreshStaleCalculatedValue(): void;
|
|
2169
2308
|
}
|
|
2170
2309
|
|
|
2310
|
+
/**
|
|
2311
|
+
* The application's currency unit (`SAR`), shown after captured amounts. The
|
|
2312
|
+
* explanation never guesses a currency: without this token, or with an empty
|
|
2313
|
+
* unit, amounts are shown as plain numbers.
|
|
2314
|
+
*/
|
|
2315
|
+
declare const MT_CALCULATION_CURRENCY: InjectionToken<Signal<string>>;
|
|
2316
|
+
/**
|
|
2317
|
+
* The names of a status property's statuses in a language, by status key, so
|
|
2318
|
+
* a status rule reads as its business name. Read inside a reactive context:
|
|
2319
|
+
* a host backed by signals updates the explanation when its statuses load.
|
|
2320
|
+
*/
|
|
2321
|
+
type CalculationStatusNames = (propertyKey: string, lang: string) => Record<string, string>;
|
|
2322
|
+
declare const MT_CALCULATION_STATUS_NAMES: InjectionToken<CalculationStatusNames>;
|
|
2323
|
+
declare const CALCULATION_EXPLANATION_KEYS = "components.entitiesPreview.calculationExplanation";
|
|
2324
|
+
/** What formatting needs from the host: language, currency, dates, text. */
|
|
2325
|
+
interface ExplanationFormatContext {
|
|
2326
|
+
lang: string;
|
|
2327
|
+
currency: string;
|
|
2328
|
+
formatDate: (value: string, type: 'date' | 'dateTime' | 'time') => string;
|
|
2329
|
+
translate: (key: string, params?: Record<string, unknown>) => string;
|
|
2330
|
+
}
|
|
2331
|
+
/** One piece of the readable equation. Rendered as plain text, never HTML. */
|
|
2332
|
+
type ExplanationSegment = {
|
|
2333
|
+
kind: 'text';
|
|
2334
|
+
text: string;
|
|
2335
|
+
} | {
|
|
2336
|
+
kind: 'value';
|
|
2337
|
+
text: string;
|
|
2338
|
+
} | {
|
|
2339
|
+
kind: 'term';
|
|
2340
|
+
label: string;
|
|
2341
|
+
value: string | null;
|
|
2342
|
+
} | {
|
|
2343
|
+
kind: 'result';
|
|
2344
|
+
text: string;
|
|
2345
|
+
} | {
|
|
2346
|
+
kind: 'muted';
|
|
2347
|
+
text: string;
|
|
2348
|
+
};
|
|
2349
|
+
/**
|
|
2350
|
+
* How an equation reads: `labels` is its shape (`Budget − Spent`), `values`
|
|
2351
|
+
* the captured values in that shape (`10,000 SAR − 125,454 SAR`), `inline`
|
|
2352
|
+
* both at once (`Budget (10,000 SAR)`), for status conditions.
|
|
2353
|
+
*/
|
|
2354
|
+
type SegmentMode = 'inline' | 'labels' | 'values';
|
|
2355
|
+
/** Captured JSON shown as labelled data. */
|
|
2356
|
+
type ExplanationData = {
|
|
2357
|
+
kind: 'text';
|
|
2358
|
+
text: string;
|
|
2359
|
+
} | {
|
|
2360
|
+
kind: 'list';
|
|
2361
|
+
items: string[];
|
|
2362
|
+
} | {
|
|
2363
|
+
kind: 'table';
|
|
2364
|
+
columns: string[];
|
|
2365
|
+
rows: string[][];
|
|
2366
|
+
more: number;
|
|
2367
|
+
} | {
|
|
2368
|
+
kind: 'fields';
|
|
2369
|
+
fields: {
|
|
2370
|
+
label: string;
|
|
2371
|
+
data: ExplanationData;
|
|
2372
|
+
}[];
|
|
2373
|
+
};
|
|
2374
|
+
/** A number as captured: grouped, never rounded, with a real minus sign. */
|
|
2375
|
+
declare function formatExplanationNumber(value: number): string;
|
|
2376
|
+
/** A captured value as plain text. Never formatted or rounded here. */
|
|
2377
|
+
declare function formatExplanationValue(value: CalculationExplanationValue | undefined): string;
|
|
2378
|
+
/**
|
|
2379
|
+
* A captured value the way its property shows values: grouped numbers, the
|
|
2380
|
+
* application currency, `%`, the configured date format, yes/no. An untyped
|
|
2381
|
+
* value (a function result) that is a date reads as one.
|
|
2382
|
+
*/
|
|
2383
|
+
declare function formatTypedValue(value: CalculationExplanationValue | undefined, viewType: string | null | undefined, ctx: ExplanationFormatContext): string;
|
|
2384
|
+
/** A property's current name in the active language. */
|
|
2385
|
+
declare function displayName(display: CalculationPropertyDisplay | null | undefined, lang: string): string | null;
|
|
2386
|
+
/** `totalLevelWeight` / `is_cancelled` → `Total level weight` / `Is cancelled`. */
|
|
2387
|
+
declare function humanizeKey(key: string): string;
|
|
2388
|
+
/**
|
|
2389
|
+
* A server-authored text key (`calculation.method.leafAverage`) in the active
|
|
2390
|
+
* language; null for a missing or unknown key.
|
|
2391
|
+
*/
|
|
2392
|
+
declare function serverText(key: string | null | undefined, ctx: ExplanationFormatContext): string | null;
|
|
2393
|
+
/**
|
|
2394
|
+
* What a document's calculation does, in words: its description key, or for
|
|
2395
|
+
* an older capture a generic description of its kind.
|
|
2396
|
+
*/
|
|
2397
|
+
declare function describeDocument(document: CalculationExplanationDocument, ctx: ExplanationFormatContext): string;
|
|
2398
|
+
/** Whether the document's root reads as an equation. */
|
|
2399
|
+
declare function isEquationDocument(document: CalculationExplanationDocument): boolean;
|
|
2400
|
+
/**
|
|
2401
|
+
* The calculation as readable business wording: inputs by their property
|
|
2402
|
+
* names, operators as symbols, functions as words (`sum of Amount where …`).
|
|
2403
|
+
* `null` when the document is not an equation (a native method, a status
|
|
2404
|
+
* selection, a generated code), or, in `values` mode, when an input is a list
|
|
2405
|
+
* of values the line cannot show (the details list them by record).
|
|
2406
|
+
*
|
|
2407
|
+
* Nodes form a graph: the same input can be reached from several places, and
|
|
2408
|
+
* each place shows it in full. Only a node already on the current path (a
|
|
2409
|
+
* cycle, which a valid document never has) reads as `…`.
|
|
2410
|
+
*/
|
|
2411
|
+
declare function buildExplanationSegments(document: CalculationExplanationDocument, ctx: ExplanationFormatContext, mode?: SegmentMode, startId?: number): ExplanationSegment[] | null;
|
|
2412
|
+
/** Capitalizes the first word, for an equation that starts a line. */
|
|
2413
|
+
declare function capitalizeSegments(segments: ExplanationSegment[]): ExplanationSegment[];
|
|
2414
|
+
/** One part of a condition and whether it held. */
|
|
2415
|
+
interface ExplanationCheckView {
|
|
2416
|
+
segments: ExplanationSegment[];
|
|
2417
|
+
/** The captured truth; null when it was never evaluated. */
|
|
2418
|
+
met: boolean | null;
|
|
2419
|
+
/** At least one of these must hold (an `or`). */
|
|
2420
|
+
anyOf: ExplanationCheckView[] | null;
|
|
2421
|
+
}
|
|
2422
|
+
/**
|
|
2423
|
+
* A condition as a checklist: each part the rule requires on its own line
|
|
2424
|
+
* with whether it held, so a reader sees why a rule matched or which part
|
|
2425
|
+
* failed. Every truth is the captured one; nothing is evaluated here.
|
|
2426
|
+
*
|
|
2427
|
+
* `a and b and c` becomes three parts. `IF(guard, false, rest)` — the usual
|
|
2428
|
+
* "skip when data is missing" form — becomes `Unless guard` plus the parts of
|
|
2429
|
+
* `rest`. An `or` becomes one part whose options are listed. Null when the
|
|
2430
|
+
* document is not an equation.
|
|
2431
|
+
*/
|
|
2432
|
+
declare function buildConditionChecks(document: CalculationExplanationDocument, ctx: ExplanationFormatContext): ExplanationCheckView[] | null;
|
|
2433
|
+
/** A generated code as its parts: `PRJ + - + 2026 + - + 0042`. */
|
|
2434
|
+
declare function buildCodeSegments(document: CalculationExplanationDocument, ctx: ExplanationFormatContext): ExplanationSegment[];
|
|
2435
|
+
/**
|
|
2436
|
+
* Captured JSON (native method facts) as labelled fields, lists or tables.
|
|
2437
|
+
* Field names read as business labels; record ids read as a count.
|
|
2438
|
+
*/
|
|
2439
|
+
declare function toExplanationData(value: CalculationExplanationValue | undefined, ctx: ExplanationFormatContext, depth?: number, field?: string): ExplanationData;
|
|
2440
|
+
/** A scalar input the calculation used. */
|
|
2441
|
+
interface ExplanationValueView {
|
|
2442
|
+
label: string;
|
|
2443
|
+
value: string;
|
|
2444
|
+
}
|
|
2445
|
+
/** List inputs read from the same rows, one row per record. */
|
|
2446
|
+
interface ExplanationRecordTableView {
|
|
2447
|
+
columns: string[];
|
|
2448
|
+
rows: {
|
|
2449
|
+
/** The record, for its name; null when the context is unknown. */
|
|
2450
|
+
ref: CalculationRecordRef | null;
|
|
2451
|
+
cells: string[];
|
|
2452
|
+
}[];
|
|
2453
|
+
}
|
|
2454
|
+
/** A nested function and what it gave. */
|
|
2455
|
+
interface ExplanationStepView {
|
|
2456
|
+
segments: ExplanationSegment[];
|
|
2457
|
+
result: string;
|
|
2458
|
+
}
|
|
2459
|
+
interface ExplanationFactView {
|
|
2460
|
+
label: string;
|
|
2461
|
+
data: ExplanationData;
|
|
2462
|
+
}
|
|
2463
|
+
interface ExplanationCodeBlockView {
|
|
2464
|
+
type: string;
|
|
2465
|
+
value: string;
|
|
2466
|
+
/** The block's value before its transformations, when it differs. */
|
|
2467
|
+
raw: string | null;
|
|
2468
|
+
}
|
|
2469
|
+
interface ExplanationStatusRuleView {
|
|
2470
|
+
key: string;
|
|
2471
|
+
name: string;
|
|
2472
|
+
/** Its place in the order rules are checked, from 1. */
|
|
2473
|
+
position: number;
|
|
2474
|
+
verdict: 'selected' | 'matched' | 'notMatched' | 'checked' | 'failed' | 'notEvaluated';
|
|
2475
|
+
/** The condition in one line, when it has no checklist. */
|
|
2476
|
+
segments: ExplanationSegment[] | null;
|
|
2477
|
+
/** The condition as the parts it requires, each with whether it held. */
|
|
2478
|
+
checks: ExplanationCheckView[] | null;
|
|
2479
|
+
}
|
|
2480
|
+
interface ExplanationContributorView {
|
|
2481
|
+
ref: CalculationRecordRef;
|
|
2482
|
+
type: string | null;
|
|
2483
|
+
progress: string;
|
|
2484
|
+
weight: string;
|
|
2485
|
+
counted: boolean;
|
|
2486
|
+
/** Why it was not counted, or how a missing value was treated. */
|
|
2487
|
+
reason: string | null;
|
|
2488
|
+
/** A planned item's dates and the working time elapsed of its total. */
|
|
2489
|
+
planned: {
|
|
2490
|
+
dates: string | null;
|
|
2491
|
+
time: string | null;
|
|
2492
|
+
} | null;
|
|
2493
|
+
}
|
|
2494
|
+
interface ExplanationScheduleView {
|
|
2495
|
+
kind: 'actual' | 'planned' | 'baseline' | 'other';
|
|
2496
|
+
/** The rollup is the whole formula: its title and result are the summary's. */
|
|
2497
|
+
standalone: boolean;
|
|
2498
|
+
title: string;
|
|
2499
|
+
/** What this progress means, so actual, planned and baseline read apart. */
|
|
2500
|
+
meaning: string | null;
|
|
2501
|
+
result: string;
|
|
2502
|
+
/** `Weighted average · Weighted by working days`. */
|
|
2503
|
+
method: string;
|
|
2504
|
+
/** Contributors actually counted. */
|
|
2505
|
+
counted: string;
|
|
2506
|
+
notes: string[];
|
|
2507
|
+
missingBaseline: boolean;
|
|
2508
|
+
weightLabel: string;
|
|
2509
|
+
contributors: ExplanationContributorView[];
|
|
2510
|
+
}
|
|
2511
|
+
interface ExplanationDetailsView {
|
|
2512
|
+
/** What a native method or schedule field does, in words. */
|
|
2513
|
+
description: string | null;
|
|
2514
|
+
values: ExplanationValueView[];
|
|
2515
|
+
records: ExplanationRecordTableView[];
|
|
2516
|
+
steps: ExplanationStepView[];
|
|
2517
|
+
statusRules: ExplanationStatusRuleView[];
|
|
2518
|
+
schedule: ExplanationScheduleView[];
|
|
2519
|
+
codeBlocks: ExplanationCodeBlockView[];
|
|
2520
|
+
facts: ExplanationFactView[];
|
|
2521
|
+
}
|
|
2522
|
+
/** Everything the details panel shows, read from the document as is. */
|
|
2523
|
+
declare function buildExplanationDetails(document: CalculationExplanationDocument, ctx: ExplanationFormatContext, statusNames?: Record<string, string>): ExplanationDetailsView;
|
|
2524
|
+
/** Whether the details have anything beyond the summary. */
|
|
2525
|
+
declare function hasExplanationDetails(view: ExplanationDetailsView): boolean;
|
|
2526
|
+
/** Every record the details name, for one batch of name reads. */
|
|
2527
|
+
declare function detailRecordRefs(view: ExplanationDetailsView): CalculationRecordRef[];
|
|
2528
|
+
/**
|
|
2529
|
+
* The status a rule selects, by the name its property gives it. A status the
|
|
2530
|
+
* host has no name for reads as its key in words (`no_baseline` → `No
|
|
2531
|
+
* baseline`): a generic label would make every rule read the same.
|
|
2532
|
+
*/
|
|
2533
|
+
declare function statusName(key: string, statusNames: Record<string, string>): string;
|
|
2534
|
+
/** The rule that chose the status, if one did. */
|
|
2535
|
+
declare function selectedStatusRule(document: CalculationExplanationDocument): CalculationStatusRuleExplanation | null;
|
|
2536
|
+
/** Status rules in the order they are checked. */
|
|
2537
|
+
declare function orderedStatusRules(document: CalculationExplanationDocument): CalculationStatusRuleExplanation[];
|
|
2538
|
+
/** Whether a rollup found no baseline at all, so its 0 is not a baseline. */
|
|
2539
|
+
declare function isMissingBaseline(detail: ScheduleCalculationExplanation): boolean;
|
|
2540
|
+
|
|
2541
|
+
/**
|
|
2542
|
+
* A readable equation: `Remaining = Budget − Spent`, or its values
|
|
2543
|
+
* `10,000 SAR − 125,454 SAR = −115,454 SAR`. It reads in the page's direction:
|
|
2544
|
+
* functions read as words (`sum of Amount where …`), and in Arabic those words
|
|
2545
|
+
* run right to left. Each term and value is isolated and kept whole, so a name
|
|
2546
|
+
* or an amount never breaks across lines or reorders with its neighbours.
|
|
2547
|
+
* Every piece is interpolated as text.
|
|
2548
|
+
*/
|
|
2549
|
+
declare class CalculationExplanationEquation {
|
|
2550
|
+
readonly segments: _angular_core.InputSignal<ExplanationSegment[]>;
|
|
2551
|
+
/** Shown after the equation, behind `resultOperator`. */
|
|
2552
|
+
readonly result: _angular_core.InputSignal<string | null>;
|
|
2553
|
+
readonly resultOperator: _angular_core.InputSignal<string>;
|
|
2554
|
+
protected readonly pieces: _angular_core.Signal<{
|
|
2555
|
+
segment: ExplanationSegment;
|
|
2556
|
+
space: boolean;
|
|
2557
|
+
}[]>;
|
|
2558
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationEquation, never>;
|
|
2559
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalculationExplanationEquation, "mt-calculation-explanation-equation", never, { "segments": { "alias": "segments"; "required": true; "isSignal": true; }; "result": { "alias": "result"; "required": false; "isSignal": true; }; "resultOperator": { "alias": "resultOperator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
declare const MARKS: Record<'met' | 'notMet' | 'notChecked', {
|
|
2563
|
+
text: string;
|
|
2564
|
+
class: string;
|
|
2565
|
+
}>;
|
|
2566
|
+
/**
|
|
2567
|
+
* A condition as a checklist: each part a rule requires on its own line,
|
|
2568
|
+
* marked met, not met, or not checked (a part evaluation never reached).
|
|
2569
|
+
* An `or` lists its options under "At least one of".
|
|
2570
|
+
*/
|
|
2571
|
+
declare class CalculationExplanationChecks {
|
|
2572
|
+
readonly checks: _angular_core.InputSignal<ExplanationCheckView[]>;
|
|
2573
|
+
protected readonly prefix = "components.entitiesPreview.calculationExplanation";
|
|
2574
|
+
protected readonly marks: Record<"met" | "notMet" | "notChecked", {
|
|
2575
|
+
text: string;
|
|
2576
|
+
class: string;
|
|
2577
|
+
}>;
|
|
2578
|
+
protected markOf(met: boolean | null): keyof typeof MARKS;
|
|
2579
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationChecks, never>;
|
|
2580
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalculationExplanationChecks, "mt-calculation-explanation-checks", never, { "checks": { "alias": "checks"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
/**
|
|
2584
|
+
* The detailed part of an explanation, shown in its side panel below the
|
|
2585
|
+
* summary. Each part folds, so a long status or schedule reads as a short
|
|
2586
|
+
* list of titles first: records behind list inputs (by name), intermediate
|
|
2587
|
+
* results, status rules (one row each, opening to their checklist), schedule
|
|
2588
|
+
* rollups with their items, generated-code parts
|
|
2589
|
+
* and native facts. Everything is the backend's captured data in business
|
|
2590
|
+
* wording; nothing is recalculated here.
|
|
2591
|
+
*/
|
|
2592
|
+
declare class CalculationExplanationDetails {
|
|
2593
|
+
readonly details: _angular_core.InputSignal<ExplanationDetailsView>;
|
|
2594
|
+
/** Record titles by `calculationRecordKey`; `null` while they are read. */
|
|
2595
|
+
readonly recordNames: _angular_core.InputSignal<Record<string, string> | null>;
|
|
2596
|
+
/** Generic labels for records without a readable title, by position. */
|
|
2597
|
+
readonly fallbackLabel: _angular_core.InputSignal<(position: number) => string>;
|
|
2598
|
+
protected readonly prefix = "components.entitiesPreview.calculationExplanation";
|
|
2599
|
+
protected readonly scheduleKeys = "components.entitiesPreview.calculationExplanation.schedule";
|
|
2600
|
+
protected readonly openRows = 10;
|
|
2601
|
+
protected readonly verdictClass: Record<string, string>;
|
|
2602
|
+
/** A record by its title; never by its id. */
|
|
2603
|
+
protected nameOf(ref: CalculationRecordRef | null, index: number): string;
|
|
2604
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationDetails, never>;
|
|
2605
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalculationExplanationDetails, "mt-calculation-explanation-details", never, { "details": { "alias": "details"; "required": true; "isSignal": true; }; "recordNames": { "alias": "recordNames"; "required": false; "isSignal": true; }; "fallbackLabel": { "alias": "fallbackLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
/** An explanation the backend returned as `available`, as the UI keeps it. */
|
|
2609
|
+
interface AvailableCalculationExplanation {
|
|
2610
|
+
basis: CalculationExplanationBasis;
|
|
2611
|
+
document: CalculationExplanationDocument;
|
|
2612
|
+
definitionChanged: boolean;
|
|
2613
|
+
/** The value on screen was older than the saved one and was re-read. */
|
|
2614
|
+
refreshed: boolean;
|
|
2615
|
+
viewType: string | undefined;
|
|
2616
|
+
}
|
|
2617
|
+
/** How the calculation reads in short, for the tooltip and the panel. */
|
|
2618
|
+
interface ExplanationSummaryView {
|
|
2619
|
+
/** `Remaining = Budget − Spent`: the property, then the formula's shape. */
|
|
2620
|
+
labels: ExplanationSegment[] | null;
|
|
2621
|
+
/**
|
|
2622
|
+
* `10,000 SAR − 125,454 SAR`: the captured values in that shape. Null when
|
|
2623
|
+
* an input is a list of values; the panel lists them by record.
|
|
2624
|
+
*/
|
|
2625
|
+
values: ExplanationSegment[] | null;
|
|
2626
|
+
/** The calculation in words, when it is not a formula. */
|
|
2627
|
+
description: string | null;
|
|
2628
|
+
/** The status rule that set a status, by its place in the order. */
|
|
2629
|
+
status: {
|
|
2630
|
+
position: number;
|
|
2631
|
+
total: number;
|
|
2632
|
+
condition: ExplanationSegment[] | null;
|
|
2633
|
+
/** The condition as the parts it required, each with whether it held. */
|
|
2634
|
+
checks: ExplanationCheckView[] | null;
|
|
2635
|
+
} | null;
|
|
2636
|
+
noRuleMatched: boolean;
|
|
2637
|
+
/** Records a list input read, when the values line can't show them. */
|
|
2638
|
+
recordCount: number | null;
|
|
2639
|
+
}
|
|
2640
|
+
interface CalculationExplanationView {
|
|
2641
|
+
basis: CalculationExplanationBasis;
|
|
2642
|
+
calculatedAt: string;
|
|
2643
|
+
result: string;
|
|
2644
|
+
summary: ExplanationSummaryView;
|
|
2645
|
+
definitionChanged: boolean;
|
|
2646
|
+
refreshed: boolean;
|
|
2647
|
+
/** A current calculation that differs from the value on the page. */
|
|
2648
|
+
differs: {
|
|
2649
|
+
page: string;
|
|
2650
|
+
current: string;
|
|
2651
|
+
} | null;
|
|
2652
|
+
/** A baseline rollup found no baseline: its 0 is not an approved 0%. */
|
|
2653
|
+
missingBaseline: boolean;
|
|
2654
|
+
details: ExplanationDetailsView;
|
|
2655
|
+
hasDetails: boolean;
|
|
2656
|
+
}
|
|
2657
|
+
/** Everything both the tooltip and the details panel show. */
|
|
2658
|
+
declare function buildCalculationExplanationView(explanation: AvailableCalculationExplanation, target: EntityCalculationExplanationTarget, ctx: ExplanationFormatContext, statusNames: Record<string, string>): CalculationExplanationView;
|
|
2659
|
+
/**
|
|
2660
|
+
* Whether the saved value is the one on screen. Both are the persisted string,
|
|
2661
|
+
* but a number may be written either way (`40` and `40.0`), so numbers compare
|
|
2662
|
+
* as numbers.
|
|
2663
|
+
*/
|
|
2664
|
+
declare function isSameSavedValue(saved: string | null | undefined, displayed: string | undefined): boolean;
|
|
2665
|
+
|
|
2666
|
+
/**
|
|
2667
|
+
* The short form of an explanation: the result with its business reason
|
|
2668
|
+
* (`Remaining = Budget − Spent`, then `10,000 SAR − 125,454 SAR =
|
|
2669
|
+
* −115,454 SAR`), and the notices that change how to read it. Shown in the
|
|
2670
|
+
* tooltip and at the top of the details panel.
|
|
2671
|
+
*/
|
|
2672
|
+
declare class CalculationExplanationSummary {
|
|
2673
|
+
readonly view: _angular_core.InputSignal<CalculationExplanationView>;
|
|
2674
|
+
protected readonly prefix = "components.entitiesPreview.calculationExplanation";
|
|
2675
|
+
protected readonly empty: ExplanationSegment[];
|
|
2676
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationSummary, never>;
|
|
2677
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalculationExplanationSummary, "mt-calculation-explanation-summary", never, { "view": { "alias": "view"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* The full explanation of a calculated value, in a wide side panel opened from
|
|
2682
|
+
* its tooltip: the result and reason, then the values, contributing records by
|
|
2683
|
+
* name, status rules, schedule rollups and their calendar.
|
|
2684
|
+
*
|
|
2685
|
+
* Created through `ModalService`, so it is built with the root injector and
|
|
2686
|
+
* its inputs arrive through `inputValues`: it takes the explanation the
|
|
2687
|
+
* tooltip already read and only reads the names of the records it shows.
|
|
2688
|
+
*/
|
|
2689
|
+
declare class CalculationExplanationPanel implements OnInit {
|
|
2690
|
+
readonly target: _angular_core.InputSignal<EntityCalculationExplanationTarget>;
|
|
2691
|
+
readonly explanation: _angular_core.InputSignal<AvailableCalculationExplanation>;
|
|
2692
|
+
private readonly names;
|
|
2693
|
+
private readonly transloco;
|
|
2694
|
+
private readonly destroyRef;
|
|
2695
|
+
private readonly explanationContext;
|
|
2696
|
+
protected readonly prefix = "components.entitiesPreview.calculationExplanation";
|
|
2697
|
+
/** Record titles, `null` while they are being read. */
|
|
2698
|
+
protected readonly recordNames: _angular_core.WritableSignal<Record<string, string> | null>;
|
|
2699
|
+
protected readonly view: _angular_core.Signal<_masterteam_components_entities.CalculationExplanationView>;
|
|
2700
|
+
protected readonly fallbackLabel: (position: number) => string;
|
|
2701
|
+
ngOnInit(): void;
|
|
2702
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationPanel, never>;
|
|
2703
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalculationExplanationPanel, "mt-calculation-explanation-panel", never, { "target": { "alias": "target"; "required": true; "isSignal": true; }; "explanation": { "alias": "explanation"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2171
2706
|
type ExplanationState = {
|
|
2172
2707
|
kind: 'loading';
|
|
2173
2708
|
} | {
|
|
@@ -2175,52 +2710,40 @@ type ExplanationState = {
|
|
|
2175
2710
|
} | {
|
|
2176
2711
|
kind: 'unavailable';
|
|
2177
2712
|
messageKey: string;
|
|
2178
|
-
} | {
|
|
2713
|
+
} | ({
|
|
2179
2714
|
kind: 'available';
|
|
2180
|
-
|
|
2181
|
-
result: string;
|
|
2182
|
-
calculatedAt: string;
|
|
2183
|
-
definitionChanged: boolean;
|
|
2184
|
-
/** The value on screen was older than the saved one and was re-read. */
|
|
2185
|
-
refreshed: boolean;
|
|
2186
|
-
};
|
|
2715
|
+
} & AvailableCalculationExplanation);
|
|
2187
2716
|
/**
|
|
2188
|
-
* How a calculated value was calculated
|
|
2189
|
-
*
|
|
2190
|
-
*
|
|
2717
|
+
* How a calculated value was calculated, in short: the result with its
|
|
2718
|
+
* business reason (`Remaining = Budget − Spent`, then the values), when it was
|
|
2719
|
+
* calculated, and a way into the full details panel. Fetched each time it
|
|
2720
|
+
* opens; reading it never recalculates anything, and nothing here is
|
|
2721
|
+
* recalculated either.
|
|
2191
2722
|
*/
|
|
2192
2723
|
declare class EntityCalculationExplanation implements OnInit {
|
|
2193
2724
|
private readonly api;
|
|
2725
|
+
private readonly modal;
|
|
2194
2726
|
private readonly refresher;
|
|
2195
2727
|
readonly target: _angular_core.InputSignal<EntityCalculationExplanationTarget>;
|
|
2728
|
+
/** The details panel opened; the host closes the tooltip under it. */
|
|
2729
|
+
readonly detailsOpened: _angular_core.OutputEmitterRef<void>;
|
|
2730
|
+
private readonly explanationContext;
|
|
2196
2731
|
protected readonly prefix = "components.entitiesPreview.calculationExplanation";
|
|
2197
2732
|
protected readonly state: _angular_core.WritableSignal<ExplanationState>;
|
|
2198
|
-
protected readonly available: _angular_core.Signal<{
|
|
2733
|
+
protected readonly available: _angular_core.Signal<({
|
|
2199
2734
|
kind: "available";
|
|
2200
|
-
|
|
2201
|
-
result: string;
|
|
2202
|
-
calculatedAt: string;
|
|
2203
|
-
definitionChanged: boolean;
|
|
2204
|
-
/** The value on screen was older than the saved one and was re-read. */
|
|
2205
|
-
refreshed: boolean;
|
|
2206
|
-
} | null>;
|
|
2735
|
+
} & AvailableCalculationExplanation) | null>;
|
|
2207
2736
|
protected readonly unavailableKey: _angular_core.Signal<string | null>;
|
|
2737
|
+
protected readonly view: _angular_core.Signal<_masterteam_components_entities.CalculationExplanationView | null>;
|
|
2208
2738
|
private request?;
|
|
2209
2739
|
constructor();
|
|
2210
2740
|
ngOnInit(): void;
|
|
2741
|
+
protected openDetails(): void;
|
|
2211
2742
|
private load;
|
|
2212
2743
|
private apply;
|
|
2213
2744
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityCalculationExplanation, never>;
|
|
2214
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityCalculationExplanation, "mt-entity-calculation-explanation", never, { "target": { "alias": "target"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2745
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityCalculationExplanation, "mt-entity-calculation-explanation", never, { "target": { "alias": "target"; "required": true; "isSignal": true; }; }, { "detailsOpened": "detailsOpened"; }, never, never, true, never>;
|
|
2215
2746
|
}
|
|
2216
|
-
/**
|
|
2217
|
-
* Whether the saved value is the one on screen. Both are the persisted string,
|
|
2218
|
-
* but a number may be written either way (`40` and `40.0`), so numbers compare
|
|
2219
|
-
* as numbers.
|
|
2220
|
-
*/
|
|
2221
|
-
declare function isSameSavedValue(saved: string | null | undefined, displayed: string | undefined): boolean;
|
|
2222
|
-
/** A captured value as plain text. Never formatted or rounded here. */
|
|
2223
|
-
declare function formatExplanationValue(value: CalculationExplanationValue): string;
|
|
2224
2747
|
|
|
2225
2748
|
/**
|
|
2226
2749
|
* Says how a calculated number just moved: the signed difference, with the
|
|
@@ -2673,5 +3196,5 @@ declare class FitText {
|
|
|
2673
3196
|
|
|
2674
3197
|
declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
|
|
2675
3198
|
|
|
2676
|
-
export { CALCULATION_CHANGE_CHIP_MS, CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, CalculatedValueHistory, CalculationExplanationApi, ComparisonEntityList, ComparisonValue, DEFAULT_PERFORMANCE_SCORE_CHART_SIZE, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_HEADER_VIEW_TYPES, ENTITY_LIST_TABLE_COMPONENT, ENTITY_ROW_SPANS, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCalculatedGlyph, EntityCalculatedIndicator, EntityCalculationChangeChip, EntityCalculationExplanation, EntityCalculationRefresher, EntityCheckbox, EntityColor, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityHeader, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPerformanceScore, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, PERFORMANCE_SCORE_CHART_SIZES, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, canEntityBeHeader, compactCurrencyDisplay, currencyUnitOf, describeCalculationChange, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, formatCalculationDelta, formatExplanationValue, getEntitySectionTitle, getPerformanceScoreBands, groupEntitiesIntoSections, humanizeEntityListKey, isCalculatedProperty, isConnectionSyntheticKey, isEntityAlignEnd, isEntityHeader, isEntityLabelHidden, isEntityListLocalDocument, isEntityListSelectionDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSameSavedValue, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, mergeStakeholderNameColumns, mergeStakeholderNameEntities, mergeStakeholderNameRows, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, parsePerformanceScore, pinEntityHeaderFirst, readEntityHeaderDefaults, readEntityValueColor, resolveConnectionLevelName, resolveEntityGridRow, resolveEntityHeader, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, resolvePerformanceScoreStatus, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, toCalculationContextKey, toCalculationExplanationTarget, visibleLocalSchemaFields };
|
|
2677
|
-
export type { CalculatedPropertyMeta, CalculationExplanationDocument, CalculationExplanationNode, CalculationExplanationResponse, CalculationExplanationSourceRecords, CalculationExplanationStatus, CalculationExplanationValue, ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityCalculationChange, EntityCalculationExplanationTarget, EntityCalculationSource, EntityCalculationStatus, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityHeaderConfig, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListSelectionDocument, EntityListSelectionRecord, EntityListSelectionRecordValue, EntityListTableHost, EntityListTranslatable, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPerformanceScoreChartSize, EntityPerformanceScoreConfig, EntityPerformanceScoreStatus, EntityPerformanceScoreValue, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRowSpan, EntityRuntimeContext, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsBadgeKind, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogPhaseValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsPhaseSummary, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimePhaseCount, LeafDetailsRuntimePhaseDetails, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, LeafPhaseSavedConfig, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
3199
|
+
export { CALCULATION_CHANGE_CHIP_MS, CALCULATION_EXPLANATION_KEYS, CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, CalculatedValueHistory, CalculationExplanationApi, CalculationExplanationChecks, CalculationExplanationDetails, CalculationExplanationEquation, CalculationExplanationPanel, CalculationExplanationSummary, CalculationRecordNames, ComparisonEntityList, ComparisonValue, DEFAULT_PERFORMANCE_SCORE_CHART_SIZE, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_HEADER_VIEW_TYPES, ENTITY_LIST_TABLE_COMPONENT, ENTITY_ROW_SPANS, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCalculatedGlyph, EntityCalculatedIndicator, EntityCalculationChangeChip, EntityCalculationExplanation, EntityCalculationRefresher, EntityCheckbox, EntityColor, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityHeader, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPerformanceScore, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, MT_CALCULATION_CURRENCY, MT_CALCULATION_STATUS_NAMES, PERFORMANCE_SCORE_CHART_SIZES, SECTION_KEY_PREFIX, buildCalculationExplanationView, buildCodeSegments, buildConditionChecks, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildExplanationDetails, buildExplanationSegments, buildSectionKey, calculationRecordKey, canEntityBeHeader, capitalizeSegments, compactCurrencyDisplay, currencyUnitOf, describeCalculationChange, describeDocument, detailRecordRefs, displayName, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, formatCalculationDelta, formatExplanationNumber, formatExplanationValue, formatTypedValue, getEntitySectionTitle, getPerformanceScoreBands, groupEntitiesIntoSections, hasExplanationDetails, humanizeEntityListKey, humanizeKey, isCalculatedProperty, isConnectionSyntheticKey, isEntityAlignEnd, isEntityHeader, isEntityLabelHidden, isEntityListLocalDocument, isEntityListSelectionDocument, isEntitySection, isEquationDocument, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isMissingBaseline, isSameSavedValue, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, mergeStakeholderNameColumns, mergeStakeholderNameEntities, mergeStakeholderNameRows, normalizeConnectionSourceLevels, normalizeNumerals, orderedStatusRules, parseCurrencyAmount, parsePerformanceScore, pinEntityHeaderFirst, readEntityHeaderDefaults, readEntityValueColor, resolveConnectionLevelName, resolveEntityGridRow, resolveEntityHeader, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, resolvePerformanceScoreStatus, selectedStatusRule, serializeEntityRawValue, serverText, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, statusName, summarizeEntityListRows, toCalculationContextKey, toCalculationExplanationTarget, toExplanationData, toFetchContextKey, visibleLocalSchemaFields };
|
|
3200
|
+
export type { AvailableCalculationExplanation, CalculatedPropertyMeta, CalculationExplanationBasis, CalculationExplanationDocument, CalculationExplanationNode, CalculationExplanationNodeKind, CalculationExplanationProvider, CalculationExplanationResponse, CalculationExplanationSourceRecords, CalculationExplanationStatus, CalculationExplanationValue, CalculationExplanationView, CalculationPropertyDisplay, CalculationRecordRef, CalculationStatusNames, CalculationStatusRuleExplanation, ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityCalculationChange, EntityCalculationExplanationTarget, EntityCalculationSource, EntityCalculationStatus, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityHeaderConfig, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListSelectionDocument, EntityListSelectionRecord, EntityListSelectionRecordValue, EntityListTableHost, EntityListTranslatable, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPerformanceScoreChartSize, EntityPerformanceScoreConfig, EntityPerformanceScoreStatus, EntityPerformanceScoreValue, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRowSpan, EntityRuntimeContext, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, ExplanationCheckView, ExplanationCodeBlockView, ExplanationContributorView, ExplanationData, ExplanationDetailsView, ExplanationFactView, ExplanationFormatContext, ExplanationRecordTableView, ExplanationScheduleView, ExplanationSegment, ExplanationStatusRuleView, ExplanationStepView, ExplanationSummaryView, ExplanationValueView, LeafDetailsBadgeKind, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogPhaseValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsPhaseSummary, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimePhaseCount, LeafDetailsRuntimePhaseDetails, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, LeafPhaseSavedConfig, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PlannedProgressExplanation, PropertyValueComparison, ScheduleCalculationContributor, ScheduleCalculationExplanation, SegmentMode, ValueComparison };
|