@umriss-ui/table 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -14
- package/README.md +3 -3
- package/dist/index.d.ts +73 -74
- package/dist/table.css +1 -1
- package/dist/table.js +864 -864
- package/docs/llms-full.md +5289 -3730
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,43 @@ is one of the internal numbers from before core's first publication as `0.1.0`
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
+
## 0.5.0 – Alarms without a plant (Sep. 2026)
|
|
26
|
+
|
|
27
|
+
Needs `@umriss-ui/core` 0.11: it reads the renamed alarm wording keys; the peer range moves to `^0.11.0`.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **The alarm names no longer assume a plant** (ADR-0035). One hard cut before
|
|
32
|
+
1.0, with no deprecated aliases: rename as below and the compiler finds the
|
|
33
|
+
rest. The concepts are ISA-18.2's as before; `docs/standards.md` maps each
|
|
34
|
+
ISA term to the name here. The string values change with the names, and so
|
|
35
|
+
do `data-lifecycle` and `data-availability` in the DOM.
|
|
36
|
+
|
|
37
|
+
| Before | Now |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `"standing-unacknowledged"`, `"standing-acknowledged"` | `"active-unacknowledged"`, `"active-acknowledged"` |
|
|
40
|
+
| `"cleared-unacknowledged"`, `"cleared-acknowledged"` | `"resolved-unacknowledged"`, `"resolved-acknowledged"` |
|
|
41
|
+
| `Transition` `"cleared"` | `"resolved"` |
|
|
42
|
+
| `Alarm.cleared` (the moment) | `Alarm.resolved` |
|
|
43
|
+
| `isStanding` | `isActive` |
|
|
44
|
+
| `AlarmProjection.standingUnacknowledged` | `AlarmProjection.activeUnacknowledged` |
|
|
45
|
+
| `Availability` `"shelved"` | `"snoozed"` |
|
|
46
|
+
| `Availability` `"suppressed-by-design"` | `"suppressed"` |
|
|
47
|
+
| `Availability` `"out-of-service"` | `"disabled"` |
|
|
48
|
+
| `shelve(alarm, until, by)`, `unshelve(alarm)` | `snooze(alarm, until, by)`, `unsnooze(alarm)` |
|
|
49
|
+
| `takeOutOfService(alarm)`, `returnToService(alarm)` | `disable(alarm)`, `enable(alarm)` |
|
|
50
|
+
| the type `Shelf`, the field `Alarm.shelf` | the type `Snooze`, the field `Alarm.snooze` |
|
|
51
|
+
| `isHiddenFromOperation` | `isHidden` |
|
|
52
|
+
| `AlarmProjection.hiddenFromOperation` | `AlarmProjection.hiddenAlarms` |
|
|
53
|
+
| `ReturnBand.direction` `"obere"`, `"untere"` | `"upper"`, `"lower"` |
|
|
54
|
+
|
|
55
|
+
`"in-service"` and `acknowledge` keep their names. `<AlarmList>` reads the
|
|
56
|
+
renamed wording keys, so its words change with them: "Active" and
|
|
57
|
+
"Resolved" for the lifecycle, "Snoozed", "Suppressed" and "Disabled" for
|
|
58
|
+
the availability, "Hidden: 3" for the count.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
25
62
|
## 0.4.0 – Grid, server, pinning, availability (Sep. 2026)
|
|
26
63
|
|
|
27
64
|
Needs `@umriss-ui/core` 0.10: it reads the new wording keys and `--u-shadow-sticky`; the peer range moves to `^0.10.0`.
|
|
@@ -79,21 +116,21 @@ Needs `@umriss-ui/core` 0.10: it reads the new wording keys and `--u-shadow-stic
|
|
|
79
116
|
stands online as <https://romanhaendler.github.io/umriss-ui/table/llms-full.txt>,
|
|
80
117
|
with an index of the pages beside it (`llms.txt`).
|
|
81
118
|
- **Availability, the second field beside the lifecycle** (ISA-18.2's special
|
|
82
|
-
states): `availability?: "in-service" | "
|
|
83
|
-
"
|
|
119
|
+
states): `availability?: "in-service" | "snoozed" | "suppressed" |
|
|
120
|
+
"disabled"` on `Alarm`, never merged into the four lifecycle values.
|
|
84
121
|
Without a statement an alarm is in service, so existing alarms read as
|
|
85
|
-
before. A shelved alarm carries `
|
|
122
|
+
before. A shelved alarm carries `snooze: { until, by }` - and cannot be
|
|
86
123
|
written without it.
|
|
87
124
|
- **Four pure transitions**, one alarm in and one out, performed by the
|
|
88
|
-
application: `
|
|
89
|
-
`
|
|
125
|
+
application: `snooze(alarm, until, by)`, `unsnooze`, `disable`,
|
|
126
|
+
`enable`. One that does not apply returns the same object. A shelf
|
|
90
127
|
never overwrites out of service or suppressed by design, and taking out of
|
|
91
128
|
service never overwrites suppressed by design - the plant's logic owns it.
|
|
92
129
|
- **`availabilityAt(alarm, asOf)`**: a shelf that has reached its end is in
|
|
93
130
|
service again at the as-of time - by the model's clock, not by a timer.
|
|
94
131
|
`AlarmRow.availability` carries that value.
|
|
95
|
-
- **`
|
|
96
|
-
`
|
|
132
|
+
- **`isHidden`, `AVAILABILITIES`, the types `Availability` and
|
|
133
|
+
`Snooze`**, and on the projection **`hiddenAlarms`**: how many of the
|
|
97
134
|
filtered set are hidden. The model still removes nothing.
|
|
98
135
|
- **An `availability` column** in `alarmColumns` / `ALARM_COLUMNS` (its label
|
|
99
136
|
from `wording.columnAvailability`), valued by rank like the priority.
|
|
@@ -103,7 +140,7 @@ Needs `@umriss-ui/core` 0.10: it reads the new wording keys and `--u-shadow-stic
|
|
|
103
140
|
11:10 by M. Keller"). The bar counts them ("Hidden from operation: 3").
|
|
104
141
|
- **`hiddenOnly` and `onHiddenOnlyChange` on `<AlarmList>`**: with the
|
|
105
142
|
handler the count becomes a switch for the view; the application filters
|
|
106
|
-
with the table's own `filter` and `
|
|
143
|
+
with the table's own `filter` and `isHidden`. The switch stays
|
|
107
144
|
while the view is on, even at zero.
|
|
108
145
|
- **Any column can be pinned**: `pin="start"` or `pin="end"` on a `Column` or
|
|
109
146
|
a `VerdictColumn` keeps it in view while the table scrolls sideways, in a
|
|
@@ -135,7 +172,7 @@ Needs `@umriss-ui/core` 0.10: it reads the new wording keys and `--u-shadow-stic
|
|
|
135
172
|
- **`DEFAULT_ORDER` begins with availability**: in service above hidden, then
|
|
136
173
|
priority, acknowledgement and time as before. Only alarms with an
|
|
137
174
|
availability of their own move.
|
|
138
|
-
- **`
|
|
175
|
+
- **`activeUnacknowledged` counts only alarms in service.** The live figure
|
|
139
176
|
calls somebody over; it must not call them to a shelved alarm.
|
|
140
177
|
- **A done alarm's row (`keepDone`) is muted as it always claimed to be.**
|
|
141
178
|
Its colour stood on the row, and the table's cells set their own; it now
|
|
@@ -165,7 +202,7 @@ Needs `@umriss-ui/core` 0.10: it reads the new wording keys and `--u-shadow-stic
|
|
|
165
202
|
operation" switch's label is in the live figure's size.
|
|
166
203
|
- **`Alarm` is a type, no longer an interface** - the union with the shelf
|
|
167
204
|
needs it. `Partial<Alarm>` spread into an `Alarm` no longer compiles; name
|
|
168
|
-
the fields you mean (`Pick<Alarm, "
|
|
205
|
+
the fields you mean (`Pick<Alarm, "resolved" | "acknowledgedAt">`).
|
|
169
206
|
|
|
170
207
|
### Fixed
|
|
171
208
|
|
|
@@ -422,10 +459,10 @@ Delivery report for `.scratch/english-and-umriss-ui/spec.md`, the table's share.
|
|
|
422
459
|
|
|
423
460
|
### Changed — the values, not only the names
|
|
424
461
|
|
|
425
|
-
- **The alarm lifecycle.** `LifecycleState` is `"
|
|
426
|
-
`"
|
|
427
|
-
`"
|
|
428
|
-
`"
|
|
462
|
+
- **The alarm lifecycle.** `LifecycleState` is `"active-unacknowledged"`,
|
|
463
|
+
`"active-acknowledged"`, `"resolved-unacknowledged"`,
|
|
464
|
+
`"resolved-acknowledged"`; `Transition` is `"raised"`, `"acknowledged"`,
|
|
465
|
+
`"resolved"`; `Priority` is `"high"`, `"medium"`, `"low"`. In the DOM,
|
|
429
466
|
`data-zustand` is `data-lifecycle` and `data-prioritaet` is `data-priority`.
|
|
430
467
|
- **The limit model's wire format** follows `@umriss-ui/core` and
|
|
431
468
|
`@umriss-ui/charts`: `data-urteil` is `data-verdict`, and `VerdictColumn`
|
package/README.md
CHANGED
|
@@ -108,9 +108,9 @@ stylesheets by hand.
|
|
|
108
108
|
* **On a row**: a detail row that stays open across a change of filter, row
|
|
109
109
|
actions that stay quiet until the row is meant, and a bulk action that always
|
|
110
110
|
receives a list.
|
|
111
|
-
* **For
|
|
112
|
-
limit set, and `AlarmList` shows alarms with a lifecycle —
|
|
113
|
-
|
|
111
|
+
* **For monitoring**: `VerdictColumn` reads a measured value against a
|
|
112
|
+
limit set, and `AlarmList` shows alarms with a lifecycle — active or
|
|
113
|
+
resolved, acknowledged or not. The library generates no alarms (ADR-0009).
|
|
114
114
|
* **A million rows on a server**: in manual mode the rows are one page a server
|
|
115
115
|
answered; the table reports the view - search, conditions, sort, page -
|
|
116
116
|
once per change and shows placeholders over the previous page while the
|
package/dist/index.d.ts
CHANGED
|
@@ -96,9 +96,9 @@ declare type AggregateProps<W, Z> = (AggregateOptions<W, Z> & {
|
|
|
96
96
|
trimmings for the display. The other way round it would be a pair of
|
|
97
97
|
booleans in disguise.
|
|
98
98
|
|
|
99
|
-
`availability` is the second field, and its union with the
|
|
100
|
-
this is a type and not an interface: a
|
|
101
|
-
be written down. A
|
|
99
|
+
`availability` is the second field, and its union with the snooze is why
|
|
100
|
+
this is a type and not an interface: a snoozed alarm without an end cannot
|
|
101
|
+
be written down. A snooze without an end is the snooze ISA-18.2 warns
|
|
102
102
|
against - an alarm switched off that nobody will remember switching off. */
|
|
103
103
|
export declare type Alarm = AlarmBase & AlarmAvailability;
|
|
104
104
|
|
|
@@ -107,12 +107,12 @@ export declare const ALARM_COLUMNS: readonly Column<AlarmRow, AlarmColumn>[];
|
|
|
107
107
|
|
|
108
108
|
declare type AlarmAvailability = {
|
|
109
109
|
/** Without a statement: in service. */
|
|
110
|
-
availability?: Exclude<Availability, "
|
|
111
|
-
|
|
110
|
+
availability?: Exclude<Availability, "snoozed">;
|
|
111
|
+
snooze?: undefined;
|
|
112
112
|
} | {
|
|
113
|
-
availability: "
|
|
113
|
+
availability: "snoozed";
|
|
114
114
|
/** Until when, and by whom. */
|
|
115
|
-
|
|
115
|
+
snooze: Snooze;
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
declare interface AlarmBase {
|
|
@@ -122,8 +122,8 @@ declare interface AlarmBase {
|
|
|
122
122
|
lifecycle: LifecycleState;
|
|
123
123
|
/** The moment of coming, in milliseconds. */
|
|
124
124
|
raised: number;
|
|
125
|
-
/** The moment of
|
|
126
|
-
|
|
125
|
+
/** The moment of resolving; while the alarm is active: none. */
|
|
126
|
+
resolved?: number;
|
|
127
127
|
/** The moment of the acknowledgement, as long as unacknowledged: none. */
|
|
128
128
|
acknowledgedAt?: number;
|
|
129
129
|
}
|
|
@@ -155,7 +155,7 @@ export declare interface AlarmInput {
|
|
|
155
155
|
chatter?: ChatterRule;
|
|
156
156
|
/** Without it no flood is detected and nothing is marked. */
|
|
157
157
|
flood?: FloodRule;
|
|
158
|
-
/** Show the alarms that are done as well (
|
|
158
|
+
/** Show the alarms that are done as well (resolved and acknowledged).
|
|
159
159
|
Default: no - that is the only removal the model performs. */
|
|
160
160
|
keepDone?: boolean;
|
|
161
161
|
/** The columns of the projection; without a statement `ALARM_COLUMNS`.
|
|
@@ -187,9 +187,9 @@ export declare interface AlarmListProps extends Omit<HTMLAttributes<HTMLDivEleme
|
|
|
187
187
|
statement the density of the `UmrissProvider`, without a setting
|
|
188
188
|
"compact". */
|
|
189
189
|
density?: "regular" | "compact";
|
|
190
|
-
/** The view
|
|
191
|
-
projection does, with the table's own `filter` and
|
|
192
|
-
|
|
190
|
+
/** The view of hidden alarms is on. The list does not filter - the
|
|
191
|
+
projection does, with the table's own `filter` and `isHidden`; this
|
|
192
|
+
only says what the switch shows. */
|
|
193
193
|
hiddenOnly?: boolean;
|
|
194
194
|
/** Offers the view as a switch beside its count. Without it the count
|
|
195
195
|
stands as text. */
|
|
@@ -210,15 +210,15 @@ export declare interface AlarmProjection extends TableProjection<AlarmRow, Alarm
|
|
|
210
210
|
/** The flood that was detected, when a rule was given and it applies. A
|
|
211
211
|
marking beside the complete list, not a replacement for it. */
|
|
212
212
|
flood: Flood | null;
|
|
213
|
-
/**
|
|
213
|
+
/** Active and unacknowledged within the filtered set - the number for the
|
|
214
214
|
polite screen reader. From the filtered set, not from the visible page,
|
|
215
215
|
like every figure in this house. Only alarms in service count: the
|
|
216
216
|
number calls somebody over, and a hidden alarm is one it must not call
|
|
217
217
|
to. */
|
|
218
|
-
|
|
219
|
-
/** Hidden
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
activeUnacknowledged: number;
|
|
219
|
+
/** Hidden within the filtered set: snoozed, suppressed, disabled. They are
|
|
220
|
+
in the list; this is how many. */
|
|
221
|
+
hiddenAlarms: number;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
/** An alarm with everything the list and the order need to know about it.
|
|
@@ -229,14 +229,14 @@ export declare interface AlarmRow {
|
|
|
229
229
|
alarm: Alarm;
|
|
230
230
|
type: AlarmType;
|
|
231
231
|
lifecycle: LifecycleState;
|
|
232
|
-
/** At the as-of time: an expired
|
|
232
|
+
/** At the as-of time: an expired snooze is already back in service here. */
|
|
233
233
|
availability: Availability;
|
|
234
234
|
priority: Priority;
|
|
235
235
|
/** 0 is the most urgent. For the sort. */
|
|
236
236
|
rank: number;
|
|
237
237
|
/** Since the coming, from the as-of time passed in. */
|
|
238
238
|
age: number;
|
|
239
|
-
/** How long the condition was true - until the
|
|
239
|
+
/** How long the condition was true - until the resolving, otherwise until the
|
|
240
240
|
as-of time. Not the same thing as the age. */
|
|
241
241
|
duration: number;
|
|
242
242
|
/** Occurrences of this TYPE within the window; without a chatter rule: all of
|
|
@@ -269,30 +269,30 @@ declare interface AutomaticMode {
|
|
|
269
269
|
filterOptions?: never;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
/** In service first, then by how near each is to coming back:
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
/** In service first, then by how near each is to coming back: snoozed (a
|
|
273
|
+
person's own decision, with an end), suppressed, disabled. The order of
|
|
274
|
+
the default sort. */
|
|
275
275
|
export declare const AVAILABILITIES: readonly Availability[];
|
|
276
276
|
|
|
277
|
-
/** Whether an alarm is in front of the
|
|
278
|
-
lifecycle (ISA-18.2's special states).
|
|
277
|
+
/** Whether an alarm is in front of the people watching the list - the second
|
|
278
|
+
field beside the lifecycle (ISA-18.2's special states).
|
|
279
279
|
|
|
280
280
|
A second field and never a fifth value of the lifecycle, by the same rule
|
|
281
281
|
that made the lifecycle one field: one state, one field. The two answer
|
|
282
282
|
different questions - what happened to the condition, and whether anyone
|
|
283
|
-
is meant to see it now - and a
|
|
284
|
-
underneath: when the
|
|
283
|
+
is meant to see it now - and a snoozed alarm keeps its lifecycle
|
|
284
|
+
underneath: when the snooze ends it comes back active and unacknowledged
|
|
285
285
|
if that is what it is.
|
|
286
286
|
|
|
287
|
-
`suppressed
|
|
288
|
-
suppresses (a
|
|
289
|
-
application writes the field from that logic. */
|
|
290
|
-
export declare type Availability = "in-service" | "
|
|
287
|
+
`suppressed` has no transition here. It is the application's logic that
|
|
288
|
+
suppresses (a service that is switched off raises no error-rate alarm),
|
|
289
|
+
and the application writes the field from that logic. */
|
|
290
|
+
export declare type Availability = "in-service" | "snoozed" | "suppressed" | "disabled";
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
|
-
* The availability at the as-of time. A
|
|
293
|
+
* The availability at the as-of time. A snooze that has reached its end is in
|
|
294
294
|
* service again - by the model's clock, not by a timer: nothing here reads a
|
|
295
|
-
* clock, and a timer in a user-interface library would bring a
|
|
295
|
+
* clock, and a timer in a user-interface library would bring a snoozed alarm
|
|
296
296
|
* back only while a browser tab happens to be open.
|
|
297
297
|
*/
|
|
298
298
|
export declare function availabilityAt(alarm: Alarm, asOf: number): Availability;
|
|
@@ -515,13 +515,18 @@ declare type DatePeriod = "day" | "week" | "month" | "year";
|
|
|
515
515
|
sort, so that a caller replaces one value instead of fighting against a
|
|
516
516
|
hard-wired comparison.
|
|
517
517
|
|
|
518
|
-
Availability stands first because a
|
|
519
|
-
decision already taken; above
|
|
518
|
+
Availability stands first because a snoozed alarm of high priority is a
|
|
519
|
+
decision already taken; above an active one of medium priority it would
|
|
520
520
|
take the first glance from the alarm nobody has decided about. */
|
|
521
521
|
export declare const DEFAULT_ORDER: readonly SortLevel<AlarmColumn>[];
|
|
522
522
|
|
|
523
523
|
export declare function detectFlood(alarms: readonly Alarm[], rule: FloodRule, asOf: number): Flood | null;
|
|
524
524
|
|
|
525
|
+
/** Disables an alarm - from service or from a snooze. A suppressed alarm
|
|
526
|
+
stays as it is: that field is the application's logic's, and `enable`
|
|
527
|
+
would otherwise hand it back in service with the suppression lost. */
|
|
528
|
+
export declare function disable(alarm: Alarm): Alarm;
|
|
529
|
+
|
|
525
530
|
/** What can appear as text without `children`. */
|
|
526
531
|
declare type Displayable = string | number | boolean | Date;
|
|
527
532
|
|
|
@@ -544,6 +549,10 @@ export declare interface EditOptions<W, Z> {
|
|
|
544
549
|
validate?: (value: W | null, row: Z) => string | null | undefined;
|
|
545
550
|
}
|
|
546
551
|
|
|
552
|
+
/** Returns a disabled alarm to service. Only that one: a snooze ends by
|
|
553
|
+
`unsnooze` or its time, a suppression by the application's logic. */
|
|
554
|
+
export declare function enable(alarm: Alarm): Alarm;
|
|
555
|
+
|
|
547
556
|
/** Writes the filtered set in the visible columns and their order – with the
|
|
548
557
|
values, not with their presentation. In manual mode the table holds one
|
|
549
558
|
page of the server's, so it writes that page, and its button says so. */
|
|
@@ -619,7 +628,7 @@ export declare interface Flood {
|
|
|
619
628
|
export declare interface FloodRule {
|
|
620
629
|
windowMs: number;
|
|
621
630
|
/** From how many alarms within the window - across all types, because one
|
|
622
|
-
fault drags nine
|
|
631
|
+
fault drags nine others with it. Reaching it is enough. */
|
|
623
632
|
atLeast: number;
|
|
624
633
|
}
|
|
625
634
|
|
|
@@ -628,7 +637,7 @@ declare type FooterFor<W> = [Present<W>] extends [number] ? "sum" | "avg" : neve
|
|
|
628
637
|
declare type FormatFor<W> = [Present<W>] extends [number] ? NumberFormat : [Present<W>] extends [Date] ? DateFormat : never;
|
|
629
638
|
|
|
630
639
|
/** Frequency per alarm type within the window. Grouped by TYPE, not by
|
|
631
|
-
occurrence - a chattering
|
|
640
|
+
occurrence - a chattering source is one problem, not forty. */
|
|
632
641
|
export declare function frequencyByType(alarms: readonly Alarm[], windowMs: number, asOf: number): Map<string, number>;
|
|
633
642
|
|
|
634
643
|
declare interface GroupByBase {
|
|
@@ -677,12 +686,12 @@ declare interface GroupLevel<Z> {
|
|
|
677
686
|
}
|
|
678
687
|
|
|
679
688
|
/**
|
|
680
|
-
* Has the value come back far enough for
|
|
689
|
+
* Has the value come back far enough for an active alarm to resolve? The value
|
|
681
690
|
* must come back past the return value, not merely past the bound that
|
|
682
691
|
* triggered the alarm - which is why `limit` does not appear in this
|
|
683
692
|
* calculation.
|
|
684
693
|
*
|
|
685
|
-
* The condition of
|
|
694
|
+
* The condition of resolving, not that of raising: that a measured value raises
|
|
686
695
|
* an alarm the caller's process layer decides. It lives here because only this
|
|
687
696
|
* module knows what the alarm just was.
|
|
688
697
|
*
|
|
@@ -692,20 +701,20 @@ export declare const hasReturned: (band: ReturnBand, value: number) => boolean;
|
|
|
692
701
|
|
|
693
702
|
export declare const isAcknowledged: (state: LifecycleState) => boolean;
|
|
694
703
|
|
|
704
|
+
export declare const isActive: (state: LifecycleState) => boolean;
|
|
705
|
+
|
|
695
706
|
declare type IsDisplayable<W> = [Present<W>] extends [never] ? false : [Present<W>] extends [Displayable] ? true : false;
|
|
696
707
|
|
|
697
|
-
/**
|
|
708
|
+
/** Resolved and acknowledged: the only position that leaves the list. */
|
|
698
709
|
export declare const isDone: (state: LifecycleState) => boolean;
|
|
699
710
|
|
|
700
711
|
/** Everything but in service: still in the list, drawn neutrally and counted,
|
|
701
712
|
never removed. "Not absent, only deliberately hidden." */
|
|
702
|
-
export declare const
|
|
713
|
+
export declare const isHidden: (availability: Availability) => boolean;
|
|
703
714
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
/** One field, four values. `cleared-unacknowledged` is the fleeting alarm and the
|
|
715
|
+
/** One field, four values. `resolved-unacknowledged` is the fleeting alarm and the
|
|
707
716
|
reason why no pair of booleans stands here. */
|
|
708
|
-
export declare type LifecycleState = "
|
|
717
|
+
export declare type LifecycleState = "active-unacknowledged" | "active-acknowledged" | "resolved-unacknowledged" | "resolved-acknowledged";
|
|
709
718
|
|
|
710
719
|
/** One line of a grouped table. A header heads a group of an outer level; a row
|
|
711
720
|
of the innermost level stands in its span; a folded span is one line. */
|
|
@@ -766,7 +775,7 @@ export declare type ManualView<K extends string = string> = TableView<K> & Requi
|
|
|
766
775
|
/**
|
|
767
776
|
* The transition as pure calculation.
|
|
768
777
|
*
|
|
769
|
-
* `raised` always leads to `
|
|
778
|
+
* `raised` always leads to `active-unacknowledged`, even out of an
|
|
770
779
|
* acknowledged position: a renewed occurrence of the condition is a new
|
|
771
780
|
* event and demands that somebody see it again.
|
|
772
781
|
*/
|
|
@@ -818,7 +827,7 @@ export declare const PRIORITIES: readonly Priority[];
|
|
|
818
827
|
|
|
819
828
|
This is a DIFFERENT scale from the severity of a limit (which has two), on a
|
|
820
829
|
different object. The mapping between the two is the caller's, in his code,
|
|
821
|
-
where the
|
|
830
|
+
where the application's convention stands. */
|
|
822
831
|
export declare type Priority = "high" | "medium" | "low";
|
|
823
832
|
|
|
824
833
|
/** 0 is the most urgent. Sorted ascending it stands on top. */
|
|
@@ -836,21 +845,17 @@ export declare interface RangeCondition<W> {
|
|
|
836
845
|
it. That is the dead band: it keeps the value sitting on the bound from
|
|
837
846
|
producing a hundred alarms. */
|
|
838
847
|
export declare interface ReturnBand {
|
|
839
|
-
/** `
|
|
840
|
-
`
|
|
841
|
-
direction: "
|
|
848
|
+
/** `upper`: the alarm comes when the value rises above the bound.
|
|
849
|
+
`lower`: it comes when the value falls below it. */
|
|
850
|
+
direction: "upper" | "lower";
|
|
842
851
|
/** The bound that triggered the alarm. Stands here so that the condition is
|
|
843
|
-
described completely in one place - for the decision about
|
|
852
|
+
described completely in one place - for the decision about resolving it is
|
|
844
853
|
expressly not read. */
|
|
845
854
|
limit: number;
|
|
846
|
-
/** The value the reading must come back past before the alarm
|
|
855
|
+
/** The value the reading must come back past before the alarm resolves. */
|
|
847
856
|
returnTo: number;
|
|
848
857
|
}
|
|
849
858
|
|
|
850
|
-
/** Returns an alarm out of service to service. Only that one: a shelf ends by
|
|
851
|
-
`unshelve` or its time, a suppression by the plant's logic. */
|
|
852
|
-
export declare function returnToService(alarm: Alarm): Alarm;
|
|
853
|
-
|
|
854
859
|
export declare interface RowActionsProps {
|
|
855
860
|
/** The row's `Action`s. */
|
|
856
861
|
children: ReactNode;
|
|
@@ -907,20 +912,20 @@ export declare interface SetFilter<Z> {
|
|
|
907
912
|
<I extends string>(column: I & (I extends Field<Z> ? never : unknown), condition: unknown): void;
|
|
908
913
|
}
|
|
909
914
|
|
|
910
|
-
/** A
|
|
915
|
+
/** A snooze: a person's own, time-limited decision to take an alarm out of
|
|
911
916
|
the way. */
|
|
912
|
-
export declare interface
|
|
917
|
+
export declare interface Snooze {
|
|
913
918
|
/** When it ends, in milliseconds. Reaching it is enough. */
|
|
914
919
|
until: number;
|
|
915
|
-
/** Who
|
|
920
|
+
/** Who snoozed it - a snooze is tracked, not anonymous. */
|
|
916
921
|
by: string;
|
|
917
922
|
}
|
|
918
923
|
|
|
919
|
-
/**
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
export declare function
|
|
924
|
+
/** Snoozes an alarm in service, or snoozes anew what is snoozed. A disabled
|
|
925
|
+
or suppressed alarm stays as it is: the stronger removal is not
|
|
926
|
+
overwritten by the weaker one, or the end of the snooze would put an alarm
|
|
927
|
+
disabled for maintenance back in service. */
|
|
928
|
+
export declare function snooze(alarm: Alarm, until: number, by: string): Alarm;
|
|
924
929
|
|
|
925
930
|
export declare type SortDirection = "asc" | "desc";
|
|
926
931
|
|
|
@@ -987,7 +992,7 @@ declare interface TableOptionsCommon<Z> {
|
|
|
987
992
|
outermost first. It is the default that `view` leaves out; without it
|
|
988
993
|
the table is ungrouped until the user groups it. */
|
|
989
994
|
defaultGrouping?: GroupingId<Z> | readonly GroupingId<Z>[];
|
|
990
|
-
/** Which rows the table has at all – by permission, by
|
|
995
|
+
/** Which rows the table has at all – by permission, by tenant, by anything the
|
|
991
996
|
user is not meant to undo. It is invisible: never a condition, never
|
|
992
997
|
reset, never part of the view, and "43 of 1,204" counts only the rows it
|
|
993
998
|
admits. It may stand in the call; a change leaves the page standing, and
|
|
@@ -1200,12 +1205,6 @@ export declare interface TableView<K extends string = string> {
|
|
|
1200
1205
|
pinned?: Readonly<Record<string, Pin>>;
|
|
1201
1206
|
}
|
|
1202
1207
|
|
|
1203
|
-
/** Takes an alarm out of service - from service or from a shelf. An alarm
|
|
1204
|
-
suppressed by design stays as it is: that field is the plant's logic's,
|
|
1205
|
-
and `returnToService` would otherwise hand it back in service with the
|
|
1206
|
-
suppression lost. */
|
|
1207
|
-
export declare function takeOutOfService(alarm: Alarm): Alarm;
|
|
1208
|
-
|
|
1209
1208
|
/** The table toolbar: on the left whatever one puts into it, and the conditions
|
|
1210
1209
|
of the column filters; on the right the ratio of the filtered set to all
|
|
1211
1210
|
rows and "reset" as long as something restricts, and the count of the
|
|
@@ -1227,10 +1226,10 @@ export declare interface ToolbarProps {
|
|
|
1227
1226
|
|
|
1228
1227
|
/** What can happen to an alarm. The caller reports the event; what it means the
|
|
1229
1228
|
model knows. */
|
|
1230
|
-
export declare type Transition = "raised" | "acknowledged" | "
|
|
1229
|
+
export declare type Transition = "raised" | "acknowledged" | "resolved";
|
|
1231
1230
|
|
|
1232
|
-
/**
|
|
1233
|
-
export declare function
|
|
1231
|
+
/** Ends a snooze before its time. */
|
|
1232
|
+
export declare function unsnooze(alarm: Alarm): Alarm;
|
|
1234
1233
|
|
|
1235
1234
|
export declare function useTable<Z>(rows: readonly Z[], options: TableOptions<Z>): Table<Z>;
|
|
1236
1235
|
|