@masterteam/components 0.0.343 → 0.0.344

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.343",
3
+ "version": "0.0.344",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, Type, OnInit, ElementRef, NgZone, Signal } from '@angular/core';
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';
@@ -116,59 +116,102 @@ interface EntityCalculationExplanationTarget {
116
116
  label: string;
117
117
  /** The raw value on screen, compared with the saved one. */
118
118
  displayedValue: string | undefined;
119
+ /** How the value is shown, when the response does not say. */
120
+ viewType?: string;
121
+ /**
122
+ * Names of status keys the host already knows (the value on screen), so a
123
+ * status rule reads as its name rather than its key.
124
+ */
125
+ statusNames?: Record<string, string>;
119
126
  }
120
127
  /**
121
128
  * `GET properties/calculation-explanation`. The backend returns these as
122
129
  * camelCase strings; anything else is treated as unavailable.
123
130
  */
124
131
  type CalculationExplanationStatus = 'available' | 'notCaptured' | 'unsupported' | 'limitExceeded' | 'restricted' | 'valueChanged' | 'notCalculated';
132
+ /**
133
+ * What the explanation describes. `savedCalculation` is the calculation that
134
+ * produced the persisted value; `currentCalculation` evaluates current data
135
+ * read-only (native schedule fields) and claims no saved revision.
136
+ */
137
+ type CalculationExplanationBasis = 'savedCalculation' | 'currentCalculation';
125
138
  /** A JSON value captured by the backend, shown as plain text. */
126
139
  type CalculationExplanationValue = string | number | boolean | null | CalculationExplanationValue[] | {
127
140
  [key: string]: CalculationExplanationValue;
128
141
  };
129
142
  /**
130
- * The latest saved calculation of one value. Not wrapped in the usual response
131
- * envelope: the endpoint returns this object as is.
143
+ * Current, authorized display metadata of a property. Names are today's, not
144
+ * the ones at calculation time; the numbers always come from the calculation.
145
+ */
146
+ interface CalculationPropertyDisplay {
147
+ key: string;
148
+ name: string;
149
+ nameEn: string | null;
150
+ nameAr: string | null;
151
+ viewType: string;
152
+ }
153
+ /**
154
+ * The calculation of one value. Not wrapped in the usual response envelope:
155
+ * the endpoint returns this object as is.
132
156
  */
133
157
  interface CalculationExplanationResponse {
134
158
  status: CalculationExplanationStatus | (string & {});
135
159
  propertyKey: string;
160
+ /** Absent from responses before the backend added current calculations. */
161
+ basis?: CalculationExplanationBasis | (string & {});
136
162
  valueVersion: string | null;
137
163
  /** The formula was changed after this value was saved. */
138
164
  definitionChanged: boolean;
139
- /** Only with `available`: the persisted value the explanation belongs to. */
165
+ /** Only with `available`. */
140
166
  explanation?: CalculationExplanationDocument | null;
167
+ /** The persisted, normalized value the explanation belongs to (saved basis). */
141
168
  savedValue?: string | null;
169
+ /** The explained property, as it is configured now. */
170
+ display?: CalculationPropertyDisplay | null;
142
171
  }
172
+ type CalculationExplanationProvider = 'formula' | 'status' | 'nativeMethod' | 'codeBuilder' | 'schedule';
143
173
  interface CalculationExplanationDocument {
144
174
  schemaVersion: number;
145
175
  calculationId: string;
146
- provider: string;
176
+ provider: CalculationExplanationProvider | (string & {});
147
177
  providerVersion: string;
148
178
  engineVersion: string;
149
179
  status: string;
150
- /** The saved formula, with internal property references. */
180
+ /**
181
+ * The saved formula with internal property references; for a native method
182
+ * or a schedule field, a description of the calculation instead.
183
+ */
151
184
  formula: string;
152
185
  definitionHash: string;
153
186
  calculatedAt: string;
154
187
  /** The formula with every input replaced by its value: `(20 * 2)`. */
155
188
  formulaWithValues: string | null;
156
- /** The engine output, before the backend normalized it for saving. */
189
+ /** The typed engine output, before the backend normalized it for saving. */
157
190
  result: CalculationExplanationValue;
158
191
  rootNodeId: number;
159
192
  nodes: CalculationExplanationNode[];
160
193
  sources: CalculationExplanationSourceRecords[];
194
+ /** Progress rollups behind `@Schedule::*_progress` references. */
195
+ schedule?: ScheduleCalculationExplanation[];
196
+ /** Status rules in configured order (status provider). */
197
+ statusRules?: CalculationStatusRuleExplanation[];
161
198
  }
199
+ type CalculationExplanationNodeKind = 'literal' | 'input' | 'binary' | 'unary' | 'function' | 'conditional' | 'array' | 'table' | 'semantic' | 'selection' | 'method' | 'codeBlock';
162
200
  interface CalculationExplanationNode {
163
201
  id: number;
164
- kind: 'literal' | 'input' | 'binary' | 'unary' | 'function' | 'conditional' | 'array' | (string & {});
202
+ kind: CalculationExplanationNodeKind | (string & {});
165
203
  operation: string | null;
166
204
  expression: string;
167
205
  children: number[];
168
206
  argumentNames: (string | null)[];
207
+ /** `notEvaluated` (a branch never reached) is not an evaluated `null`. */
169
208
  state: 'evaluated' | 'notEvaluated' | (string & {});
170
- value: CalculationExplanationValue;
209
+ value?: CalculationExplanationValue;
171
210
  reference: string | null;
211
+ /** The referenced property, for an input whose source was authorized. */
212
+ display?: CalculationPropertyDisplay | null;
213
+ /** The rows behind a vector input, aligned with its values. */
214
+ recordIds?: number[];
172
215
  }
173
216
  interface CalculationExplanationSourceRecords {
174
217
  tablePath: string;
@@ -176,6 +219,60 @@ interface CalculationExplanationSourceRecords {
176
219
  recordIds: number[];
177
220
  propertyKeys: string[];
178
221
  }
222
+ interface CalculationStatusRuleExplanation {
223
+ key: string;
224
+ order: number;
225
+ state: 'evaluated' | 'failed' | 'notEvaluated' | (string & {});
226
+ selected: boolean;
227
+ /** The rule's condition, explained like a formula. */
228
+ condition: CalculationExplanationDocument | null;
229
+ }
230
+ interface ScheduleCalculationExplanation {
231
+ /** The semantic node it belongs to: `Schedule::actual_progress`. */
232
+ reference: string;
233
+ asOfUtc: string;
234
+ weightMode: 'workingDays' | 'explicitWeight' | (string & {});
235
+ aggregation: 'weightedAverage' | 'arithmeticMean' | 'empty' | (string & {});
236
+ formulaWithValues: string;
237
+ result: number;
238
+ roundingDigits: number;
239
+ roundingMode: string;
240
+ includeMilestones: boolean;
241
+ excludeSameDayMilestones: boolean;
242
+ leafOnly: boolean;
243
+ excludedRowCount: number;
244
+ notes: string[];
245
+ contributors: ScheduleCalculationContributor[];
246
+ }
247
+ interface ScheduleCalculationContributor {
248
+ recordId: number;
249
+ moduleKey: string;
250
+ contextKey: string | null;
251
+ progress: number;
252
+ weight: number;
253
+ inputMissing: boolean;
254
+ includedInAggregation: boolean;
255
+ plannedStart: string | null;
256
+ plannedFinish: string | null;
257
+ plannedCalculation: PlannedProgressExplanation | null;
258
+ }
259
+ /** How one item's planned progress was derived from its dates and calendar. */
260
+ interface PlannedProgressExplanation {
261
+ result: number;
262
+ rule: 'missingDates' | 'invalidDateRange' | 'beforeStart' | 'afterFinish' | 'milestoneDueDate' | 'noWorkingTime' | 'elapsedWorkingMinutes' | (string & {});
263
+ elapsedWorkingMinutes: number | null;
264
+ totalWorkingMinutes: number | null;
265
+ asOfLocal: string;
266
+ timeZoneId: string;
267
+ calendarSource: string;
268
+ workDayStartMinute: number;
269
+ workDayEndMinute: number;
270
+ /** Sunday = 0. */
271
+ workingDays: number[];
272
+ holidays: string[];
273
+ plannedStart: string | null;
274
+ plannedFinish: string | null;
275
+ }
179
276
 
180
277
  /** A recalculation covering this value is running, or queued behind another. */
181
278
  type EntityCalculationStatus = 'running' | 'waiting' | 'delayed';
@@ -1512,7 +1609,7 @@ declare class EntityAttachment {
1512
1609
  readonly data: _angular_core.InputSignal<EntityData | undefined>;
1513
1610
  readonly name: _angular_core.InputSignal<string | undefined>;
1514
1611
  readonly shape: _angular_core.InputSignal<"default" | "compact">;
1515
- readonly value: _angular_core.InputSignal<string | EntityAttachmentItemValue | EntityAttachmentValue | null | undefined>;
1612
+ readonly value: _angular_core.InputSignal<string | EntityAttachmentValue | EntityAttachmentItemValue | null | undefined>;
1516
1613
  readonly endPoint: _angular_core.InputSignal<string>;
1517
1614
  readonly context: _angular_core.InputSignal<HttpContext | undefined>;
1518
1615
  private readonly httpClient;
@@ -2065,7 +2162,8 @@ interface CalculatedPropertyMeta {
2065
2162
  * Whether a surface marks this property as calculated. `isCalculated` alone is
2066
2163
  * too broad: the backend also sets it, with no calculation method, on system
2067
2164
  * columns such as `created_at`, `id` and `team_members`. A status has no method
2068
- * but is recalculated, and an auto code is generated once.
2165
+ * but is recalculated. An auto code is generated rather than recalculated, but
2166
+ * the backend explains it like any calculated value, so it is marked too.
2069
2167
  */
2070
2168
  declare function isCalculatedProperty(meta: CalculatedPropertyMeta | null | undefined): boolean;
2071
2169
  /**
@@ -2153,10 +2251,9 @@ declare class CalculationExplanationApi {
2153
2251
  */
2154
2252
  declare function toCalculationContextKey(contextKey: string): string | null;
2155
2253
  /**
2156
- * What a value's calculated-value mark explains on click: only a calculated
2157
- * value whose host named the record it was read from. A status is
2158
- * recalculated but has no formula (the endpoint answers `unsupported`), so it
2159
- * keeps the plain mark.
2254
+ * What a value's calculated-value mark explains on click: any calculated value
2255
+ * (a formula, a status, a generated code, a date or an amount) whose host
2256
+ * named the record it was read from.
2160
2257
  */
2161
2258
  declare function toCalculationExplanationTarget(entity: EntityData | null | undefined, label?: string | null): EntityCalculationExplanationTarget | null;
2162
2259
  /**
@@ -2168,6 +2265,208 @@ declare abstract class EntityCalculationRefresher {
2168
2265
  abstract refreshStaleCalculatedValue(): void;
2169
2266
  }
2170
2267
 
2268
+ /**
2269
+ * The application's currency unit (`SAR`), shown after captured amounts. The
2270
+ * explanation never guesses a currency: without this token, or with an empty
2271
+ * unit, amounts are shown as plain numbers.
2272
+ */
2273
+ declare const MT_CALCULATION_CURRENCY: InjectionToken<Signal<string>>;
2274
+ declare const CALCULATION_EXPLANATION_KEYS = "components.entitiesPreview.calculationExplanation";
2275
+ /** What formatting needs from the host: language, currency, dates, text. */
2276
+ interface ExplanationFormatContext {
2277
+ lang: string;
2278
+ currency: string;
2279
+ formatDate: (value: string, type: 'date' | 'dateTime' | 'time') => string;
2280
+ translate: (key: string, params?: Record<string, unknown>) => string;
2281
+ }
2282
+ /** One piece of the readable equation. Rendered as plain text, never HTML. */
2283
+ type ExplanationSegment = {
2284
+ kind: 'text';
2285
+ text: string;
2286
+ } | {
2287
+ kind: 'value';
2288
+ text: string;
2289
+ } | {
2290
+ kind: 'term';
2291
+ label: string;
2292
+ value: string | null;
2293
+ } | {
2294
+ kind: 'result';
2295
+ text: string;
2296
+ } | {
2297
+ kind: 'muted';
2298
+ text: string;
2299
+ };
2300
+ /** Captured JSON shown as labelled data. */
2301
+ type ExplanationData = {
2302
+ kind: 'text';
2303
+ text: string;
2304
+ } | {
2305
+ kind: 'list';
2306
+ items: string[];
2307
+ } | {
2308
+ kind: 'table';
2309
+ columns: string[];
2310
+ rows: string[][];
2311
+ } | {
2312
+ kind: 'fields';
2313
+ fields: {
2314
+ label: string;
2315
+ data: ExplanationData;
2316
+ }[];
2317
+ };
2318
+ /** A number as captured: grouped, never rounded, with a real minus sign. */
2319
+ declare function formatExplanationNumber(value: number): string;
2320
+ /** A captured value as plain text. Never formatted or rounded here. */
2321
+ declare function formatExplanationValue(value: CalculationExplanationValue | undefined): string;
2322
+ /**
2323
+ * A captured value the way its property shows values: grouped numbers, the
2324
+ * application currency, `%`, the configured date format.
2325
+ */
2326
+ declare function formatTypedValue(value: CalculationExplanationValue | undefined, viewType: string | null | undefined, ctx: ExplanationFormatContext): string;
2327
+ /** A property's current name in the active language. */
2328
+ declare function displayName(display: CalculationPropertyDisplay | null | undefined, lang: string): string | null;
2329
+ /** `Modules.LevelDataFinancial` → `LevelDataFinancial`. */
2330
+ declare function tableLabel(tablePath: string | null | undefined): string;
2331
+ /** `totalLevelWeight` / `is_cancelled` → `Total level weight` / `Is cancelled`. */
2332
+ declare function humanizeKey(key: string): string;
2333
+ /** Whether the document's root reads as an equation. */
2334
+ declare function isEquationDocument(document: CalculationExplanationDocument): boolean;
2335
+ /**
2336
+ * The calculation as a readable equation: every input by its property name
2337
+ * with the value it had, operators as symbols, nested function results shown
2338
+ * after the call. `null` when the document is not an equation (a native
2339
+ * method, a status selection, a generated code).
2340
+ */
2341
+ declare function buildExplanationSegments(document: CalculationExplanationDocument, ctx: ExplanationFormatContext): ExplanationSegment[] | null;
2342
+ /** Captured JSON (native method facts) as labelled fields, lists or tables. */
2343
+ declare function toExplanationData(value: CalculationExplanationValue | undefined, ctx: ExplanationFormatContext, depth?: number): ExplanationData;
2344
+ interface ExplanationInputView {
2345
+ label: string;
2346
+ value: string;
2347
+ /** A vector input: each value with the record it came from. */
2348
+ rows: {
2349
+ recordId: number | null;
2350
+ value: string;
2351
+ }[];
2352
+ }
2353
+ interface ExplanationFunctionView {
2354
+ name: string;
2355
+ result: string;
2356
+ notEvaluated: boolean;
2357
+ }
2358
+ interface ExplanationFactView {
2359
+ label: string;
2360
+ data: ExplanationData;
2361
+ }
2362
+ interface ExplanationCodeBlockView {
2363
+ type: string;
2364
+ value: string;
2365
+ /** The block's value before its transformations, when it differs. */
2366
+ raw: string | null;
2367
+ settings: ExplanationData | null;
2368
+ }
2369
+ interface ExplanationStatusRuleView {
2370
+ key: string;
2371
+ name: string;
2372
+ order: number;
2373
+ verdict: 'selected' | 'matched' | 'notMatched' | 'checked' | 'failed' | 'notEvaluated';
2374
+ segments: ExplanationSegment[] | null;
2375
+ }
2376
+ interface ExplanationPlannedView {
2377
+ recordId: number;
2378
+ rule: string;
2379
+ minutes: string | null;
2380
+ dates: string | null;
2381
+ }
2382
+ interface ExplanationCalendarView {
2383
+ timeZone: string;
2384
+ source: string;
2385
+ workingHours: string;
2386
+ workingDays: string;
2387
+ holidays: string;
2388
+ }
2389
+ interface ExplanationScheduleView {
2390
+ title: string;
2391
+ result: string;
2392
+ formulaWithValues: string;
2393
+ facts: string[];
2394
+ notes: string[];
2395
+ contributors: {
2396
+ recordId: number;
2397
+ progress: string;
2398
+ weight: string;
2399
+ included: boolean;
2400
+ inputMissing: boolean;
2401
+ }[];
2402
+ planned: ExplanationPlannedView[];
2403
+ calendar: ExplanationCalendarView | null;
2404
+ }
2405
+ interface ExplanationSourceView {
2406
+ label: string;
2407
+ count: number;
2408
+ ids: string;
2409
+ }
2410
+ interface ExplanationDetailsView {
2411
+ formula: string | null;
2412
+ formulaWithValues: string | null;
2413
+ inputs: ExplanationInputView[];
2414
+ functions: ExplanationFunctionView[];
2415
+ facts: ExplanationFactView[];
2416
+ codeBlocks: ExplanationCodeBlockView[];
2417
+ statusRules: ExplanationStatusRuleView[];
2418
+ schedule: ExplanationScheduleView[];
2419
+ sources: ExplanationSourceView[];
2420
+ }
2421
+ /** Everything the expandable details show, read from the document as is. */
2422
+ declare function buildExplanationDetails(document: CalculationExplanationDocument, ctx: ExplanationFormatContext, statusNames?: Record<string, string>): ExplanationDetailsView;
2423
+ /** Whether the details have anything to expand. */
2424
+ declare function hasExplanationDetails(view: ExplanationDetailsView): boolean;
2425
+ /** A generated code as its parts: `PRJ + - + 2026 + - + 0042`. */
2426
+ declare function buildCodeSegments(document: CalculationExplanationDocument, ctx: ExplanationFormatContext): ExplanationSegment[];
2427
+ /** The status a rule selects, by the name the host knows or its key. */
2428
+ declare function statusName(key: string, statusNames: Record<string, string>): string;
2429
+ /** The rule that chose the status, if one did. */
2430
+ declare function selectedStatusRule(document: CalculationExplanationDocument): CalculationStatusRuleExplanation | null;
2431
+
2432
+ /**
2433
+ * A readable equation: `Budget (12,000 SAR) − Spent (15,000 SAR) = −3,000 SAR`.
2434
+ * A left-to-right block in every language, like a formula in a spreadsheet:
2435
+ * inside a right-to-left page an inline left-to-right run breaks across lines
2436
+ * in the wrong order. Each term is isolated and kept whole, so an Arabic name
2437
+ * reads with its own value. Every piece is interpolated as text.
2438
+ */
2439
+ declare class CalculationExplanationEquation {
2440
+ readonly segments: _angular_core.InputSignal<ExplanationSegment[]>;
2441
+ /** Shown after the equation, behind `resultOperator`. */
2442
+ readonly result: _angular_core.InputSignal<string | null>;
2443
+ readonly resultOperator: _angular_core.InputSignal<string>;
2444
+ protected readonly pieces: _angular_core.Signal<{
2445
+ segment: ExplanationSegment;
2446
+ space: boolean;
2447
+ }[]>;
2448
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationEquation, never>;
2449
+ 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>;
2450
+ }
2451
+
2452
+ /**
2453
+ * The expandable part of an explanation: the inputs with the rows they came
2454
+ * from, function results, status rules, schedule rollups, generated-code
2455
+ * parts and contributing records. Everything is the backend's captured data,
2456
+ * shown as text; nothing is recalculated here.
2457
+ */
2458
+ declare class CalculationExplanationDetails {
2459
+ readonly details: _angular_core.InputSignal<ExplanationDetailsView>;
2460
+ protected readonly prefix = "components.entitiesPreview.calculationExplanation";
2461
+ protected readonly scheduleKeys = "components.entitiesPreview.calculationExplanation.schedule";
2462
+ protected readonly verdictClass: Record<string, string>;
2463
+ protected hasMissingInput(rows: {
2464
+ inputMissing: boolean;
2465
+ }[]): boolean;
2466
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalculationExplanationDetails, never>;
2467
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalculationExplanationDetails, "mt-calculation-explanation-details", never, { "details": { "alias": "details"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2468
+ }
2469
+
2171
2470
  type ExplanationState = {
2172
2471
  kind: 'loading';
2173
2472
  } | {
@@ -2177,39 +2476,78 @@ type ExplanationState = {
2177
2476
  messageKey: string;
2178
2477
  } | {
2179
2478
  kind: 'available';
2180
- formulaWithValues: string | null;
2181
- result: string;
2182
- calculatedAt: string;
2479
+ basis: CalculationExplanationBasis;
2480
+ document: CalculationExplanationDocument;
2183
2481
  definitionChanged: boolean;
2184
2482
  /** The value on screen was older than the saved one and was re-read. */
2185
2483
  refreshed: boolean;
2484
+ viewType: string | undefined;
2485
+ };
2486
+ /** How the summary reads, by what the backend explained. */
2487
+ type SummaryView = {
2488
+ kind: 'equation';
2489
+ segments: ExplanationSegment[];
2490
+ operator: string;
2491
+ } | {
2492
+ kind: 'description';
2493
+ text: string;
2494
+ code: boolean;
2495
+ } | {
2496
+ kind: 'message';
2497
+ text: string;
2186
2498
  };
2187
2499
  /**
2188
- * How a calculated value was calculated: its formula with the values it used,
2189
- * the result and when, as saved with the value. Fetched each time it opens and
2190
- * never recalculated here.
2500
+ * How a calculated value was calculated: a readable equation with each input
2501
+ * by name and the value it had, the result and when, with the captured
2502
+ * details behind a toggle. Fetched each time it opens; reading it never
2503
+ * recalculates anything, and nothing here is recalculated either.
2191
2504
  */
2192
2505
  declare class EntityCalculationExplanation implements OnInit {
2193
2506
  private readonly api;
2194
2507
  private readonly refresher;
2508
+ private readonly transloco;
2509
+ private readonly lang;
2510
+ private readonly currency;
2511
+ private readonly datePipe;
2195
2512
  readonly target: _angular_core.InputSignal<EntityCalculationExplanationTarget>;
2196
2513
  protected readonly prefix = "components.entitiesPreview.calculationExplanation";
2197
2514
  protected readonly state: _angular_core.WritableSignal<ExplanationState>;
2515
+ protected readonly expanded: _angular_core.WritableSignal<boolean>;
2198
2516
  protected readonly available: _angular_core.Signal<{
2199
2517
  kind: "available";
2200
- formulaWithValues: string | null;
2201
- result: string;
2202
- calculatedAt: string;
2518
+ basis: CalculationExplanationBasis;
2519
+ document: CalculationExplanationDocument;
2203
2520
  definitionChanged: boolean;
2204
2521
  /** The value on screen was older than the saved one and was re-read. */
2205
2522
  refreshed: boolean;
2523
+ viewType: string | undefined;
2206
2524
  } | null>;
2207
2525
  protected readonly unavailableKey: _angular_core.Signal<string | null>;
2526
+ private readonly formatContext;
2527
+ protected readonly view: _angular_core.Signal<{
2528
+ basis: CalculationExplanationBasis;
2529
+ calculatedAt: string;
2530
+ definitionChanged: boolean;
2531
+ refreshed: boolean;
2532
+ result: string;
2533
+ summary: SummaryView;
2534
+ equation: ExplanationSegment[];
2535
+ operator: string;
2536
+ description: string;
2537
+ descriptionIsCode: boolean;
2538
+ differs: {
2539
+ page: string;
2540
+ current: string;
2541
+ } | null;
2542
+ details: ExplanationDetailsView;
2543
+ hasDetails: boolean;
2544
+ } | null>;
2208
2545
  private request?;
2209
2546
  constructor();
2210
2547
  ngOnInit(): void;
2211
2548
  private load;
2212
2549
  private apply;
2550
+ private summarize;
2213
2551
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityCalculationExplanation, never>;
2214
2552
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityCalculationExplanation, "mt-entity-calculation-explanation", never, { "target": { "alias": "target"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2215
2553
  }
@@ -2219,8 +2557,6 @@ declare class EntityCalculationExplanation implements OnInit {
2219
2557
  * as numbers.
2220
2558
  */
2221
2559
  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
2560
 
2225
2561
  /**
2226
2562
  * Says how a calculated number just moved: the signed difference, with the
@@ -2387,7 +2723,7 @@ declare class EntityPreview {
2387
2723
  * `mt-entity-preview` usages in the app.
2388
2724
  */
2389
2725
  readonly infoText: _angular_core.Signal<string>;
2390
- readonly comparisonKind: _angular_core.Signal<"Value" | "EntityList" | null>;
2726
+ readonly comparisonKind: _angular_core.Signal<"EntityList" | "Value" | null>;
2391
2727
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
2392
2728
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
2393
2729
  }
@@ -2673,5 +3009,5 @@ declare class FitText {
2673
3009
 
2674
3010
  declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
2675
3011
 
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 };
3012
+ export { CALCULATION_CHANGE_CHIP_MS, CALCULATION_EXPLANATION_KEYS, CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, CalculatedValueHistory, CalculationExplanationApi, CalculationExplanationDetails, CalculationExplanationEquation, 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, PERFORMANCE_SCORE_CHART_SIZES, SECTION_KEY_PREFIX, buildCodeSegments, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildExplanationDetails, buildExplanationSegments, buildSectionKey, canEntityBeHeader, compactCurrencyDisplay, currencyUnitOf, describeCalculationChange, 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, 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, selectedStatusRule, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, statusName, summarizeEntityListRows, tableLabel, toCalculationContextKey, toCalculationExplanationTarget, toExplanationData, visibleLocalSchemaFields };
3013
+ export type { CalculatedPropertyMeta, CalculationExplanationBasis, CalculationExplanationDocument, CalculationExplanationNode, CalculationExplanationNodeKind, CalculationExplanationProvider, CalculationExplanationResponse, CalculationExplanationSourceRecords, CalculationExplanationStatus, CalculationExplanationValue, CalculationPropertyDisplay, 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, ExplanationCalendarView, ExplanationCodeBlockView, ExplanationData, ExplanationDetailsView, ExplanationFactView, ExplanationFormatContext, ExplanationFunctionView, ExplanationInputView, ExplanationPlannedView, ExplanationScheduleView, ExplanationSegment, ExplanationSourceView, ExplanationStatusRuleView, 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, ValueComparison };