@elaraai/east-ui 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/charts/chart/index.d.ts +116 -12
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/chart/index.js +100 -37
- package/dist/src/charts/chart/index.js.map +1 -1
- package/dist/src/charts/index.d.ts +2 -1
- package/dist/src/charts/index.d.ts.map +1 -1
- package/dist/src/charts/index.js +2 -1
- package/dist/src/charts/index.js.map +1 -1
- package/dist/src/charts/spec/index.d.ts +5 -3
- package/dist/src/charts/spec/index.d.ts.map +1 -1
- package/dist/src/charts/spec/index.js +2 -2
- package/dist/src/charts/spec/index.js.map +1 -1
- package/dist/src/charts/spec/types.d.ts +7 -2
- package/dist/src/charts/spec/types.d.ts.map +1 -1
- package/dist/src/charts/spec/types.js +7 -2
- package/dist/src/charts/spec/types.js.map +1 -1
- package/dist/src/collections/blend/index.d.ts +59 -0
- package/dist/src/collections/blend/index.d.ts.map +1 -1
- package/dist/src/collections/blend/index.js +1 -0
- package/dist/src/collections/blend/index.js.map +1 -1
- package/dist/src/collections/blend/types.d.ts +66 -0
- package/dist/src/collections/blend/types.d.ts.map +1 -1
- package/dist/src/collections/blend/types.js +15 -1
- package/dist/src/collections/blend/types.js.map +1 -1
- package/dist/src/collections/board/index.d.ts +381 -28
- package/dist/src/collections/board/index.d.ts.map +1 -1
- package/dist/src/collections/board/index.js +133 -5
- package/dist/src/collections/board/index.js.map +1 -1
- package/dist/src/collections/board/types.d.ts +1 -198
- package/dist/src/collections/board/types.d.ts.map +1 -1
- package/dist/src/collections/board/types.js +6 -73
- package/dist/src/collections/board/types.js.map +1 -1
- package/dist/src/collections/gantt/index.d.ts +63 -24
- package/dist/src/collections/gantt/index.d.ts.map +1 -1
- package/dist/src/collections/gantt/index.js +98 -64
- package/dist/src/collections/gantt/index.js.map +1 -1
- package/dist/src/collections/gantt/types.d.ts +31 -76
- package/dist/src/collections/gantt/types.d.ts.map +1 -1
- package/dist/src/collections/gantt/types.js +18 -60
- package/dist/src/collections/gantt/types.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +700 -17
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/index.js +66 -12
- package/dist/src/collections/library/index.js.map +1 -1
- package/dist/src/collections/library/types.d.ts +710 -38
- package/dist/src/collections/library/types.d.ts.map +1 -1
- package/dist/src/collections/library/types.js +48 -20
- package/dist/src/collections/library/types.js.map +1 -1
- package/dist/src/collections/planner/index.d.ts +45 -26
- package/dist/src/collections/planner/index.d.ts.map +1 -1
- package/dist/src/collections/planner/index.js +37 -27
- package/dist/src/collections/planner/index.js.map +1 -1
- package/dist/src/collections/planner/types.d.ts +11 -0
- package/dist/src/collections/planner/types.d.ts.map +1 -1
- package/dist/src/collections/planner/types.js +11 -0
- package/dist/src/collections/planner/types.js.map +1 -1
- package/dist/src/collections/roster/index.d.ts +397 -21
- package/dist/src/collections/roster/index.d.ts.map +1 -1
- package/dist/src/collections/roster/index.js +94 -4
- package/dist/src/collections/roster/index.js.map +1 -1
- package/dist/src/collections/roster/types.d.ts +15 -161
- package/dist/src/collections/roster/types.d.ts.map +1 -1
- package/dist/src/collections/roster/types.js +13 -58
- package/dist/src/collections/roster/types.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +8 -0
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +22 -0
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/table/types.d.ts +17 -0
- package/dist/src/collections/table/types.d.ts.map +1 -1
- package/dist/src/collections/table/types.js.map +1 -1
- package/dist/src/component.d.ts +1411 -299
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +131 -11
- package/dist/src/component.js.map +1 -1
- package/dist/src/contracts/drag.d.ts +122 -1
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +46 -1
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/index.d.ts +2 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/index.js +2 -1
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/contracts/review.d.ts +198 -0
- package/dist/src/contracts/review.d.ts.map +1 -0
- package/dist/src/contracts/review.js +163 -0
- package/dist/src/contracts/review.js.map +1 -0
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +4 -2
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +5 -2
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/expandable/index.d.ts +116 -0
- package/dist/src/layout/expandable/index.d.ts.map +1 -0
- package/dist/src/layout/expandable/index.js +129 -0
- package/dist/src/layout/expandable/index.js.map +1 -0
- package/dist/src/layout/expandable/types.d.ts +43 -0
- package/dist/src/layout/expandable/types.d.ts.map +1 -0
- package/dist/src/layout/expandable/types.js +18 -0
- package/dist/src/layout/expandable/types.js.map +1 -0
- package/dist/src/layout/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +1 -0
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/runtime/charts/chart.d.ts +16 -13
- package/dist/src/runtime/charts/chart.d.ts.map +1 -1
- package/dist/src/runtime/charts/chart.js +16 -13
- package/dist/src/runtime/charts/chart.js.map +1 -1
- package/dist/src/runtime/collections/library.d.ts +4 -2
- package/dist/src/runtime/collections/library.d.ts.map +1 -1
- package/dist/src/runtime/collections/library.js +4 -2
- package/dist/src/runtime/collections/library.js.map +1 -1
- package/dist/src/runtime/layout/expandable.d.ts +43 -0
- package/dist/src/runtime/layout/expandable.d.ts.map +1 -0
- package/dist/src/runtime/layout/expandable.js +41 -0
- package/dist/src/runtime/layout/expandable.js.map +1 -0
- package/dist/src/runtime/layout/index.d.ts +1 -0
- package/dist/src/runtime/layout/index.d.ts.map +1 -1
- package/dist/src/runtime/layout/index.js +1 -0
- package/dist/src/runtime/layout/index.js.map +1 -1
- package/dist/test/charts/chart.examples.d.ts +8 -4
- package/dist/test/charts/chart.examples.d.ts.map +1 -1
- package/dist/test/charts/chart.examples.js +89 -34
- package/dist/test/charts/chart.examples.js.map +1 -1
- package/dist/test/collections/blend.examples.d.ts +10 -1
- package/dist/test/collections/blend.examples.d.ts.map +1 -1
- package/dist/test/collections/blend.examples.js +52 -6
- package/dist/test/collections/blend.examples.js.map +1 -1
- package/dist/test/collections/board.examples.d.ts +8 -1
- package/dist/test/collections/board.examples.d.ts.map +1 -1
- package/dist/test/collections/board.examples.js +32 -5
- package/dist/test/collections/board.examples.js.map +1 -1
- package/dist/test/collections/gantt.examples.d.ts +26 -1
- package/dist/test/collections/gantt.examples.d.ts.map +1 -1
- package/dist/test/collections/gantt.examples.js +153 -27
- package/dist/test/collections/gantt.examples.js.map +1 -1
- package/dist/test/collections/library.examples.d.ts +3 -0
- package/dist/test/collections/library.examples.d.ts.map +1 -1
- package/dist/test/collections/library.examples.js +107 -2
- package/dist/test/collections/library.examples.js.map +1 -1
- package/dist/test/collections/planner.examples.d.ts +14 -0
- package/dist/test/collections/planner.examples.d.ts.map +1 -1
- package/dist/test/collections/planner.examples.js +127 -3
- package/dist/test/collections/planner.examples.js.map +1 -1
- package/dist/test/collections/roster.examples.d.ts +17 -1
- package/dist/test/collections/roster.examples.d.ts.map +1 -1
- package/dist/test/collections/roster.examples.js +89 -9
- package/dist/test/collections/roster.examples.js.map +1 -1
- package/dist/test/collections/table.examples.d.ts +16 -0
- package/dist/test/collections/table.examples.d.ts.map +1 -1
- package/dist/test/collections/table.examples.js +62 -2
- package/dist/test/collections/table.examples.js.map +1 -1
- package/dist/test/disclosure/story.examples.js +3 -3
- package/dist/test/disclosure/story.examples.js.map +1 -1
- package/dist/test/layout/expandable.examples.d.ts +3 -0
- package/dist/test/layout/expandable.examples.d.ts.map +1 -0
- package/dist/test/layout/expandable.examples.js +31 -0
- package/dist/test/layout/expandable.examples.js.map +1 -0
- package/dist/test/layout/index.d.ts +1 -0
- package/dist/test/layout/index.d.ts.map +1 -1
- package/dist/test/layout/index.js +1 -0
- package/dist/test/layout/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -16,15 +16,91 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
|
-
import { East, Expr, variant, some, none, ArrayType, IntegerType, StringType, StructType, } from "@elaraai/east";
|
|
19
|
+
import { East, Expr, variant, some, none, ArrayType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, } from "@elaraai/east";
|
|
20
20
|
import { UIComponentType } from "../../component.js";
|
|
21
21
|
import { mapRows } from "../../shared/reify.js";
|
|
22
22
|
import { DensityType } from "../../style/interaction.js";
|
|
23
|
-
import {} from "../../contracts/drag.js";
|
|
23
|
+
import { CellRefType, DragEventType } from "../../contracts/drag.js";
|
|
24
24
|
import { PlannerStateType } from "../planner/types.js";
|
|
25
|
-
import { RosterModeType, RosterPersonType, RosterShiftType,
|
|
25
|
+
import { RosterModeType, RosterPersonType, RosterShiftType, } from "./types.js";
|
|
26
|
+
import { CanDropFnType } from "../../contracts/drag.js";
|
|
27
|
+
import { ApprovalStateType, RowRefType, RowReviewType, buildReview } from "../../contracts/review.js";
|
|
28
|
+
import { StatusValueType } from "../../feedback/status/types.js";
|
|
26
29
|
// Re-export types
|
|
27
|
-
export { RosterModeType, RosterPersonType, RosterShiftType,
|
|
30
|
+
export { RosterModeType, RosterPersonType, RosterShiftType, } from "./types.js";
|
|
31
|
+
/**
|
|
32
|
+
* East StructType for the Roster component.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Flat resolved tables — the renderer groups shifts into cells by
|
|
36
|
+
* `person × day`. Shift states reuse the Planner event-state grammar
|
|
37
|
+
* ({@link PlannerStateType}); the `model` flavour renders as the dashed
|
|
38
|
+
* ghost with the acceptance affordance. Defined here (not `types.ts`)
|
|
39
|
+
* since #265: the root carries the shared review config, whose `summary`
|
|
40
|
+
* is a `UIComponentType` — `component.ts` mirrors this arm inline with the
|
|
41
|
+
* recursion `node`.
|
|
42
|
+
*
|
|
43
|
+
* @property id - DnD target identity
|
|
44
|
+
* @property sources - Library ids accepted for `add` drags
|
|
45
|
+
* @property mode - `published` (committed-only, immutable) or `edit`
|
|
46
|
+
* @property days - The day columns, in order
|
|
47
|
+
* @property personHeader - The frozen person column's header
|
|
48
|
+
* @property personWidth - Optional CSS width for the frozen person column
|
|
49
|
+
* @property people - The grid rows
|
|
50
|
+
* @property shifts - The shift chips (joined to people by person key)
|
|
51
|
+
* @property density - Optional density
|
|
52
|
+
* @property summary - Optional status-strip text (dirty / ghost counts)
|
|
53
|
+
* @property onDrag - Drag funnel — add / move / remove events
|
|
54
|
+
* @property canDrop - Optional IR-level drop veto over synthesized candidate events
|
|
55
|
+
* @property onSelect - Shift / cell click callback
|
|
56
|
+
* @property onAccept - Ghost-shift acceptance callback (ONE proposed shift)
|
|
57
|
+
* @property onAddAt - Empty-cell click callback (edit mode)
|
|
58
|
+
* @property review - Optional row-level review chrome (shared contract, #265)
|
|
59
|
+
*/
|
|
60
|
+
export const RosterRootType = StructType({
|
|
61
|
+
/** DnD target identity */
|
|
62
|
+
id: StringType,
|
|
63
|
+
/** Library ids accepted for `add` drags */
|
|
64
|
+
sources: ArrayType(StringType),
|
|
65
|
+
/** `published` (committed-only, immutable) or `edit` */
|
|
66
|
+
mode: RosterModeType,
|
|
67
|
+
/** The day columns, in order */
|
|
68
|
+
days: ArrayType(StringType),
|
|
69
|
+
/** The frozen person column's header */
|
|
70
|
+
personHeader: StringType,
|
|
71
|
+
/** Optional CSS width for the frozen person column (none = the Planner-consistent 150px) */
|
|
72
|
+
personWidth: OptionType(StringType),
|
|
73
|
+
/** The grid rows */
|
|
74
|
+
people: ArrayType(RosterPersonType),
|
|
75
|
+
/** The shift chips (joined to people by person key) */
|
|
76
|
+
shifts: ArrayType(RosterShiftType),
|
|
77
|
+
/** Optional density */
|
|
78
|
+
density: OptionType(DensityType),
|
|
79
|
+
/** Optional status-strip text (dirty / ghost counts) */
|
|
80
|
+
summary: OptionType(StringType),
|
|
81
|
+
/** Drag funnel — add / move / remove events */
|
|
82
|
+
onDrag: OptionType(FunctionType([DragEventType], NullType)),
|
|
83
|
+
/** Optional IR-level drop veto — consulted per hovered cell with the
|
|
84
|
+
* synthesized candidate event (`CanDropFnType` semantics); `false`
|
|
85
|
+
* ⇒ the ⊘ invalid stage and the drop is a no-op. Absent ⇒ accept. */
|
|
86
|
+
canDrop: OptionType(CanDropFnType),
|
|
87
|
+
/** Shift / cell click callback */
|
|
88
|
+
onSelect: OptionType(FunctionType([CellRefType], NullType)),
|
|
89
|
+
/** Ghost-shift acceptance callback — resolves ONE proposed shift. The
|
|
90
|
+
* granularity contract (#265): `onAccept(CellRef)` is the *item*-level
|
|
91
|
+
* call; `review.onApprove({ rowIndex })` signs off a LINE. The interplay
|
|
92
|
+
* is host-owned — the component reports, the host decides whether
|
|
93
|
+
* row-approval implies accepting the row's ghosts (no implicit
|
|
94
|
+
* cascading in the component). */
|
|
95
|
+
onAccept: OptionType(FunctionType([CellRefType], NullType)),
|
|
96
|
+
/** Empty-cell click callback (edit mode) */
|
|
97
|
+
onAddAt: OptionType(FunctionType([CellRefType], NullType)),
|
|
98
|
+
/** Optional row-level review chrome (#265) — the shared contract's
|
|
99
|
+
* Decision column + commitBar foot; rows are people. Absent ⇒ a plain
|
|
100
|
+
* Roster (people `status`/`approval` are inert). Composes with — does
|
|
101
|
+
* not replace — per-tile ghost `onAccept`. */
|
|
102
|
+
review: OptionType(RowReviewType),
|
|
103
|
+
});
|
|
28
104
|
/** The default week. */
|
|
29
105
|
const WEEK = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
30
106
|
function buildRoot(people, shifts, config) {
|
|
@@ -39,6 +115,12 @@ function buildRoot(people, shifts, config) {
|
|
|
39
115
|
key: r.key,
|
|
40
116
|
label: r.label,
|
|
41
117
|
sublabel: r.sublabel !== undefined ? some(r.sublabel) : none,
|
|
118
|
+
status: r.status !== undefined
|
|
119
|
+
? East.value(r.status, OptionType(StatusValueType))
|
|
120
|
+
: none,
|
|
121
|
+
approval: r.approval !== undefined
|
|
122
|
+
? East.value(r.approval, OptionType(ApprovalStateType))
|
|
123
|
+
: none,
|
|
42
124
|
}, RosterPersonType);
|
|
43
125
|
});
|
|
44
126
|
const shiftMapper = config.shift;
|
|
@@ -79,9 +161,11 @@ function buildRoot(people, shifts, config) {
|
|
|
79
161
|
density,
|
|
80
162
|
summary: config.summary !== undefined ? some(config.summary) : none,
|
|
81
163
|
onDrag: config.onDrag !== undefined ? some(config.onDrag) : none,
|
|
164
|
+
canDrop: config.canDrop !== undefined ? some(config.canDrop) : none,
|
|
82
165
|
onSelect: config.onSelect !== undefined ? some(config.onSelect) : none,
|
|
83
166
|
onAccept: config.onAccept !== undefined ? some(config.onAccept) : none,
|
|
84
167
|
onAddAt: config.onAddAt !== undefined ? some(config.onAddAt) : none,
|
|
168
|
+
review: config.review !== undefined ? some(buildReview(config.review, RowReviewType)) : none,
|
|
85
169
|
}), UIComponentType);
|
|
86
170
|
}
|
|
87
171
|
/**
|
|
@@ -191,6 +275,12 @@ export const Roster = {
|
|
|
191
275
|
* @property onAddAt - Empty-cell click callback
|
|
192
276
|
*/
|
|
193
277
|
Roster: RosterRootType,
|
|
278
|
+
/** A row's review decision — the shared `ApprovalStateType` (#265). */
|
|
279
|
+
Approval: ApprovalStateType,
|
|
280
|
+
/** The review configuration — the shared row-granularity `RowReviewType` (#265). */
|
|
281
|
+
Review: RowReviewType,
|
|
282
|
+
/** The per-row approve / reject payload — the shared `RowRefType` (`{ rowIndex }`). */
|
|
283
|
+
ApproveEvent: RowRefType,
|
|
194
284
|
/**
|
|
195
285
|
* Roster render mode (`published` / `edit`).
|
|
196
286
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/roster/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EAET,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/roster/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EAET,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAuB,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACH,cAAc,EACd,gBAAgB,EAAE,eAAe,GACpC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AACzH,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,kBAAkB;AAClB,OAAO,EACH,cAAc,EACd,gBAAgB,EAAE,eAAe,GACpC,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACrC,0B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,IAAI,EAAE,cAAc;QACpB;;;;;;WAMG;QACH,MAAM,EAAE,gBAAgB;QACxB;;;;;;;;WAQG;QACH,KAAK,EAAE,eAAe;QACtB;;;;;;WAMG;QACH,KAAK,EAAE,gBAAgB;KAC1B;CACK,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { NullType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
|
|
6
6
|
/**
|
|
7
7
|
* Roster render mode.
|
|
8
8
|
*
|
|
@@ -42,6 +42,20 @@ export declare const RosterPersonType: StructType<{
|
|
|
42
42
|
readonly label: StringType;
|
|
43
43
|
/** Optional muted second line (e.g. `38h → 30h`) */
|
|
44
44
|
readonly sublabel: OptionType<StringType>;
|
|
45
|
+
/** The quiet per-row status dot (some ⇒ flagged, none ⇒ clean) */
|
|
46
|
+
readonly status: OptionType<VariantType<{
|
|
47
|
+
readonly success: NullType;
|
|
48
|
+
readonly warning: NullType;
|
|
49
|
+
readonly danger: NullType;
|
|
50
|
+
readonly info: NullType;
|
|
51
|
+
readonly neutral: NullType;
|
|
52
|
+
}>>;
|
|
53
|
+
/** The row's review decision (structurally the shared `ApprovalStateType`) */
|
|
54
|
+
readonly approval: OptionType<VariantType<{
|
|
55
|
+
readonly approved: NullType;
|
|
56
|
+
readonly pending: NullType;
|
|
57
|
+
readonly rejected: NullType;
|
|
58
|
+
}>>;
|
|
45
59
|
}>;
|
|
46
60
|
/**
|
|
47
61
|
* Type representing resolved roster people.
|
|
@@ -80,164 +94,4 @@ export declare const RosterShiftType: StructType<{
|
|
|
80
94
|
* Type representing resolved shifts.
|
|
81
95
|
*/
|
|
82
96
|
export type RosterShiftType = typeof RosterShiftType;
|
|
83
|
-
/**
|
|
84
|
-
* East StructType for the Roster component.
|
|
85
|
-
*
|
|
86
|
-
* @remarks
|
|
87
|
-
* Flat resolved tables — the renderer groups shifts into cells by
|
|
88
|
-
* `person × day`. Shift states reuse the Planner event-state grammar
|
|
89
|
-
* ({@link PlannerStateType}); the `model` flavour renders as the dashed
|
|
90
|
-
* ghost with the acceptance affordance.
|
|
91
|
-
*
|
|
92
|
-
* @property id - DnD target identity
|
|
93
|
-
* @property sources - Library ids accepted for `add` drags
|
|
94
|
-
* @property mode - `published` (committed-only, immutable) or `edit`
|
|
95
|
-
* @property days - The day columns, in order
|
|
96
|
-
* @property personHeader - The frozen person column's header
|
|
97
|
-
* @property personWidth - Optional CSS width for the frozen person column
|
|
98
|
-
* @property people - The grid rows
|
|
99
|
-
* @property shifts - The shift chips (joined to people by person key)
|
|
100
|
-
* @property density - Optional density
|
|
101
|
-
* @property summary - Optional status-strip text (dirty / ghost counts)
|
|
102
|
-
* @property onDrag - Drag funnel — add / move / remove events
|
|
103
|
-
* @property onSelect - Shift / cell click callback
|
|
104
|
-
* @property onAccept - Ghost-shift acceptance callback
|
|
105
|
-
* @property onAddAt - Empty-cell click callback (edit mode)
|
|
106
|
-
*/
|
|
107
|
-
export declare const RosterRootType: StructType<{
|
|
108
|
-
/** DnD target identity */
|
|
109
|
-
readonly id: StringType;
|
|
110
|
-
/** Library ids accepted for `add` drags */
|
|
111
|
-
readonly sources: ArrayType<StringType>;
|
|
112
|
-
/** `published` (committed-only, immutable) or `edit` */
|
|
113
|
-
readonly mode: VariantType<{
|
|
114
|
-
/** Committed-only, pointer-immutable */
|
|
115
|
-
readonly published: NullType;
|
|
116
|
-
/** Operator + model proposals are interactive */
|
|
117
|
-
readonly edit: NullType;
|
|
118
|
-
}>;
|
|
119
|
-
/** The day columns, in order */
|
|
120
|
-
readonly days: ArrayType<StringType>;
|
|
121
|
-
/** The frozen person column's header */
|
|
122
|
-
readonly personHeader: StringType;
|
|
123
|
-
/** Optional CSS width for the frozen person column (none = the Planner-consistent 150px) */
|
|
124
|
-
readonly personWidth: OptionType<StringType>;
|
|
125
|
-
/** The grid rows */
|
|
126
|
-
readonly people: ArrayType<StructType<{
|
|
127
|
-
/** Person identity — the join key shifts reference */
|
|
128
|
-
readonly key: StringType;
|
|
129
|
-
/** Display name */
|
|
130
|
-
readonly label: StringType;
|
|
131
|
-
/** Optional muted second line (e.g. `38h → 30h`) */
|
|
132
|
-
readonly sublabel: OptionType<StringType>;
|
|
133
|
-
}>>;
|
|
134
|
-
/** The shift chips (joined to people by person key) */
|
|
135
|
-
readonly shifts: ArrayType<StructType<{
|
|
136
|
-
/** Stable shift identity — referenced by drag-grammar cell refs */
|
|
137
|
-
readonly key: StringType;
|
|
138
|
-
/** The person key this shift belongs to */
|
|
139
|
-
readonly person: StringType;
|
|
140
|
-
/** The day column this shift sits in */
|
|
141
|
-
readonly day: StringType;
|
|
142
|
-
/** The chip text (e.g. `8h`) */
|
|
143
|
-
readonly label: StringType;
|
|
144
|
-
/** The audit state (committed / proposed / rejected) */
|
|
145
|
-
readonly state: VariantType<{
|
|
146
|
-
readonly committed: NullType;
|
|
147
|
-
readonly proposed: VariantType<{
|
|
148
|
-
readonly added: NullType;
|
|
149
|
-
readonly model: NullType;
|
|
150
|
-
readonly removed: NullType;
|
|
151
|
-
}>;
|
|
152
|
-
readonly rejected: NullType;
|
|
153
|
-
}>;
|
|
154
|
-
}>>;
|
|
155
|
-
/** Optional density */
|
|
156
|
-
readonly density: OptionType<VariantType<{
|
|
157
|
-
readonly comfortable: NullType;
|
|
158
|
-
readonly compact: NullType;
|
|
159
|
-
readonly condensed: NullType;
|
|
160
|
-
}>>;
|
|
161
|
-
/** Optional status-strip text (dirty / ghost counts) */
|
|
162
|
-
readonly summary: OptionType<StringType>;
|
|
163
|
-
/** Drag funnel — add / move / remove events */
|
|
164
|
-
readonly onDrag: OptionType<FunctionType<[VariantType<{
|
|
165
|
-
readonly add: StructType<{
|
|
166
|
-
readonly from: StructType<{
|
|
167
|
-
readonly library: StringType;
|
|
168
|
-
readonly key: StringType;
|
|
169
|
-
}>;
|
|
170
|
-
readonly into: StructType<{
|
|
171
|
-
readonly surface: StringType;
|
|
172
|
-
readonly row: StringType;
|
|
173
|
-
readonly slot: StringType;
|
|
174
|
-
readonly event: OptionType<StringType>;
|
|
175
|
-
}>;
|
|
176
|
-
readonly duplicate: import("@elaraai/east").BooleanType;
|
|
177
|
-
}>;
|
|
178
|
-
readonly move: StructType<{
|
|
179
|
-
readonly from: StructType<{
|
|
180
|
-
readonly surface: StringType;
|
|
181
|
-
readonly row: StringType;
|
|
182
|
-
readonly slot: StringType;
|
|
183
|
-
readonly event: OptionType<StringType>;
|
|
184
|
-
}>;
|
|
185
|
-
readonly to: StructType<{
|
|
186
|
-
readonly surface: StringType;
|
|
187
|
-
readonly row: StringType;
|
|
188
|
-
readonly slot: StringType;
|
|
189
|
-
readonly event: OptionType<StringType>;
|
|
190
|
-
}>;
|
|
191
|
-
}>;
|
|
192
|
-
readonly remove: StructType<{
|
|
193
|
-
readonly from: StructType<{
|
|
194
|
-
readonly surface: StringType;
|
|
195
|
-
readonly row: StringType;
|
|
196
|
-
readonly slot: StringType;
|
|
197
|
-
readonly event: OptionType<StringType>;
|
|
198
|
-
}>;
|
|
199
|
-
readonly to: VariantType<{
|
|
200
|
-
readonly trash: NullType;
|
|
201
|
-
readonly source: NullType;
|
|
202
|
-
}>;
|
|
203
|
-
}>;
|
|
204
|
-
readonly resize: StructType<{
|
|
205
|
-
readonly event: StructType<{
|
|
206
|
-
readonly surface: StringType;
|
|
207
|
-
readonly row: StringType;
|
|
208
|
-
readonly slot: StringType;
|
|
209
|
-
readonly event: OptionType<StringType>;
|
|
210
|
-
}>;
|
|
211
|
-
readonly edge: VariantType<{
|
|
212
|
-
readonly start: NullType;
|
|
213
|
-
readonly end: NullType;
|
|
214
|
-
}>;
|
|
215
|
-
}>;
|
|
216
|
-
}>], NullType>>;
|
|
217
|
-
/** Shift / cell click callback */
|
|
218
|
-
readonly onSelect: OptionType<FunctionType<[StructType<{
|
|
219
|
-
readonly surface: StringType;
|
|
220
|
-
readonly row: StringType;
|
|
221
|
-
readonly slot: StringType;
|
|
222
|
-
readonly event: OptionType<StringType>;
|
|
223
|
-
}>], NullType>>;
|
|
224
|
-
/** Ghost-shift acceptance callback */
|
|
225
|
-
readonly onAccept: OptionType<FunctionType<[StructType<{
|
|
226
|
-
readonly surface: StringType;
|
|
227
|
-
readonly row: StringType;
|
|
228
|
-
readonly slot: StringType;
|
|
229
|
-
readonly event: OptionType<StringType>;
|
|
230
|
-
}>], NullType>>;
|
|
231
|
-
/** Empty-cell click callback (edit mode) */
|
|
232
|
-
readonly onAddAt: OptionType<FunctionType<[StructType<{
|
|
233
|
-
readonly surface: StringType;
|
|
234
|
-
readonly row: StringType;
|
|
235
|
-
readonly slot: StringType;
|
|
236
|
-
readonly event: OptionType<StringType>;
|
|
237
|
-
}>], NullType>>;
|
|
238
|
-
}>;
|
|
239
|
-
/**
|
|
240
|
-
* Type representing the Roster component.
|
|
241
|
-
*/
|
|
242
|
-
export type RosterRootType = typeof RosterRootType;
|
|
243
97
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/collections/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/collections/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACd,MAAM,eAAe,CAAC;AAKvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;IACvB,wCAAwC;;IAExC,iDAAiD;;EAEnD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,MAAM,CAAC;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;IACzB,sDAAsD;;IAEtD,mBAAmB;;IAEnB,oDAAoD;;IAGpD,kEAAkE;;;;;;;;IAElE,8EAA8E;;;;;;EAEhF,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;IACxB,mEAAmE;;IAEnE,2CAA2C;;IAE3C,wCAAwC;;IAExC,gCAAgC;;IAEhC,wDAAwD;;;;;;;;;;EAE1D,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC"}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { PlannerStateType } from "../planner/types.js";
|
|
5
|
+
import { NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
6
|
+
import { PlannerApprovalType, PlannerStateType } from "../planner/types.js";
|
|
7
|
+
import { StatusValueType } from "../../feedback/status/types.js";
|
|
9
8
|
/**
|
|
10
9
|
* Roster render mode.
|
|
11
10
|
*
|
|
@@ -37,6 +36,11 @@ export const RosterPersonType = StructType({
|
|
|
37
36
|
label: StringType,
|
|
38
37
|
/** Optional muted second line (e.g. `38h → 30h`) */
|
|
39
38
|
sublabel: OptionType(StringType),
|
|
39
|
+
// Review chrome (only meaningful when the root carries `review`, #265):
|
|
40
|
+
/** The quiet per-row status dot (some ⇒ flagged, none ⇒ clean) */
|
|
41
|
+
status: OptionType(StatusValueType),
|
|
42
|
+
/** The row's review decision (structurally the shared `ApprovalStateType`) */
|
|
43
|
+
approval: OptionType(PlannerApprovalType),
|
|
40
44
|
});
|
|
41
45
|
/**
|
|
42
46
|
* A resolved shift chip.
|
|
@@ -59,58 +63,9 @@ export const RosterShiftType = StructType({
|
|
|
59
63
|
/** The audit state (committed / proposed / rejected) */
|
|
60
64
|
state: PlannerStateType,
|
|
61
65
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
* `person × day`. Shift states reuse the Planner event-state grammar
|
|
68
|
-
* ({@link PlannerStateType}); the `model` flavour renders as the dashed
|
|
69
|
-
* ghost with the acceptance affordance.
|
|
70
|
-
*
|
|
71
|
-
* @property id - DnD target identity
|
|
72
|
-
* @property sources - Library ids accepted for `add` drags
|
|
73
|
-
* @property mode - `published` (committed-only, immutable) or `edit`
|
|
74
|
-
* @property days - The day columns, in order
|
|
75
|
-
* @property personHeader - The frozen person column's header
|
|
76
|
-
* @property personWidth - Optional CSS width for the frozen person column
|
|
77
|
-
* @property people - The grid rows
|
|
78
|
-
* @property shifts - The shift chips (joined to people by person key)
|
|
79
|
-
* @property density - Optional density
|
|
80
|
-
* @property summary - Optional status-strip text (dirty / ghost counts)
|
|
81
|
-
* @property onDrag - Drag funnel — add / move / remove events
|
|
82
|
-
* @property onSelect - Shift / cell click callback
|
|
83
|
-
* @property onAccept - Ghost-shift acceptance callback
|
|
84
|
-
* @property onAddAt - Empty-cell click callback (edit mode)
|
|
85
|
-
*/
|
|
86
|
-
export const RosterRootType = StructType({
|
|
87
|
-
/** DnD target identity */
|
|
88
|
-
id: StringType,
|
|
89
|
-
/** Library ids accepted for `add` drags */
|
|
90
|
-
sources: ArrayType(StringType),
|
|
91
|
-
/** `published` (committed-only, immutable) or `edit` */
|
|
92
|
-
mode: RosterModeType,
|
|
93
|
-
/** The day columns, in order */
|
|
94
|
-
days: ArrayType(StringType),
|
|
95
|
-
/** The frozen person column's header */
|
|
96
|
-
personHeader: StringType,
|
|
97
|
-
/** Optional CSS width for the frozen person column (none = the Planner-consistent 150px) */
|
|
98
|
-
personWidth: OptionType(StringType),
|
|
99
|
-
/** The grid rows */
|
|
100
|
-
people: ArrayType(RosterPersonType),
|
|
101
|
-
/** The shift chips (joined to people by person key) */
|
|
102
|
-
shifts: ArrayType(RosterShiftType),
|
|
103
|
-
/** Optional density */
|
|
104
|
-
density: OptionType(DensityType),
|
|
105
|
-
/** Optional status-strip text (dirty / ghost counts) */
|
|
106
|
-
summary: OptionType(StringType),
|
|
107
|
-
/** Drag funnel — add / move / remove events */
|
|
108
|
-
onDrag: OptionType(FunctionType([DragEventType], NullType)),
|
|
109
|
-
/** Shift / cell click callback */
|
|
110
|
-
onSelect: OptionType(FunctionType([CellRefType], NullType)),
|
|
111
|
-
/** Ghost-shift acceptance callback */
|
|
112
|
-
onAccept: OptionType(FunctionType([CellRefType], NullType)),
|
|
113
|
-
/** Empty-cell click callback (edit mode) */
|
|
114
|
-
onAddAt: OptionType(FunctionType([CellRefType], NullType)),
|
|
115
|
-
});
|
|
66
|
+
// NOTE (#265): `RosterRootType` moved to `./index.ts` — the root now carries
|
|
67
|
+
// the shared review config (`review.summary` is a `UIComponentType`), so it is
|
|
68
|
+
// UIComp-coupled and can no longer live in this `component.ts`-importable
|
|
69
|
+
// module. `component.ts` spells the Roster arm inline with the recursion
|
|
70
|
+
// `node` (the Planner precedent).
|
|
116
71
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/collections/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/collections/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACtC,wCAAwC;IACxC,SAAS,EAAE,QAAQ;IACnB,iDAAiD;IACjD,IAAI,EAAE,QAAQ;CACjB,CAAC,CAAC;AAYH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACvC,sDAAsD;IACtD,GAAG,EAAE,UAAU;IACf,mBAAmB;IACnB,KAAK,EAAE,UAAU;IACjB,oDAAoD;IACpD,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAChC,wEAAwE;IACxE,kEAAkE;IAClE,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC;IACnC,8EAA8E;IAC9E,QAAQ,EAAE,UAAU,CAAC,mBAAmB,CAAC;CAC5C,CAAC,CAAC;AAOH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACtC,mEAAmE;IACnE,GAAG,EAAE,UAAU;IACf,2CAA2C;IAC3C,MAAM,EAAE,UAAU;IAClB,wCAAwC;IACxC,GAAG,EAAE,UAAU;IACf,gCAAgC;IAChC,KAAK,EAAE,UAAU;IACjB,wDAAwD;IACxD,KAAK,EAAE,gBAAgB;CAC1B,CAAC,CAAC;AAOH,6EAA6E;AAC7E,+EAA+E;AAC/E,0EAA0E;AAC1E,yEAAyE;AACzE,kCAAkC"}
|
|
@@ -6,6 +6,8 @@ import { type ExprType, type SubtypeExprOrValue, StructType, ArrayType, DictType
|
|
|
6
6
|
import { TableVariantType, TableStyleType, TableSizeType, type TableStyle, type PrimitiveEastType, TableCellRenderContextType, TableCellClickEventType, TableRowClickEventType, TableRowSelectionEventType, TableSortEventType, TableSortDirectionType, TableColumnGroupType, TablePaginationType, TableSelectionType, TableSelectionModeType, type TableSelectionModeLiteral } from "./types.js";
|
|
7
7
|
import { UIComponentType } from "../../component.js";
|
|
8
8
|
import { SliceBindType, SliceChromeType } from "../../platform/slice/index.js";
|
|
9
|
+
import { StatusValueType } from "../../feedback/status/types.js";
|
|
10
|
+
import { ApprovalStateType, RowRefType, RowReviewType } from "../../contracts/review.js";
|
|
9
11
|
import { type SliceAffordanceLiteral } from "../../contracts/slice-affordances.js";
|
|
10
12
|
import { DensityType } from "../../style/interaction.js";
|
|
11
13
|
import { StatusTokenType } from "../../style/interaction.js";
|
|
@@ -320,6 +322,9 @@ export declare const TableRootType: StructType<{
|
|
|
320
322
|
onRowDoubleClick: OptionType<FunctionType<[TableRowClickEventType], NullType>>;
|
|
321
323
|
onRowSelectionChange: OptionType<FunctionType<[TableRowSelectionEventType], NullType>>;
|
|
322
324
|
onSortChange: OptionType<FunctionType<[TableSortEventType], NullType>>;
|
|
325
|
+
review: OptionType<RowReviewType>;
|
|
326
|
+
reviewStatus: OptionType<FunctionType<[IntegerType], OptionType<StatusValueType>>>;
|
|
327
|
+
reviewApproval: OptionType<FunctionType<[IntegerType], OptionType<ApprovalStateType>>>;
|
|
323
328
|
slice: OptionType<typeof SliceChromeType>;
|
|
324
329
|
style: OptionType<TableStyleType>;
|
|
325
330
|
}>;
|
|
@@ -439,6 +444,9 @@ interface TableNamespace {
|
|
|
439
444
|
Root: typeof createTable;
|
|
440
445
|
Types: {
|
|
441
446
|
Root: typeof TableRootType;
|
|
447
|
+
Approval: ApprovalStateType;
|
|
448
|
+
Review: RowReviewType;
|
|
449
|
+
ApproveEvent: RowRefType;
|
|
442
450
|
Style: typeof TableStyleType;
|
|
443
451
|
Column: typeof TableColumnType;
|
|
444
452
|
Cell: typeof TableCellType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collections/table/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAGvB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EAAE,UAAU,EAEtB,KAAK,MAAM,EAIX,YAAY,EACZ,Q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, TableCellClickEventType, TableRowClickEventType, TableRowSelectionEventType, TableSortEventType, TableSortDirectionType, TableColumnGroupType, TablePaginationType, TableSelectionType, TableSelectionModeType, } from "./types.js";
|
|
8
8
|
import { UIComponentType } from "../../component.js";
|
|
9
9
|
import { SliceBindType, SliceChromeType } from "../../platform/slice/index.js";
|
|
10
|
+
import { StatusValueType } from "../../feedback/status/types.js";
|
|
11
|
+
import { ApprovalStateType, RowRefType, RowReviewType, buildReview } from "../../contracts/review.js";
|
|
10
12
|
import { SliceAffordanceType } from "../../contracts/slice-affordances.js";
|
|
11
13
|
import { Text } from "../../typography/index.js";
|
|
12
14
|
import { DensityType } from "../../style/interaction.js";
|
|
@@ -133,6 +135,13 @@ export const TableRootType = StructType({
|
|
|
133
135
|
onRowDoubleClick: OptionType(FunctionType([TableRowClickEventType], NullType)),
|
|
134
136
|
onRowSelectionChange: OptionType(FunctionType([TableRowSelectionEventType], NullType)),
|
|
135
137
|
onSortChange: OptionType(FunctionType([TableSortEventType], NullType)),
|
|
138
|
+
// Optional review chrome (#264) — the shared contract's row-granularity
|
|
139
|
+
// config (pinned-right Decision column + commitBar foot). `reviewStatus` /
|
|
140
|
+
// `reviewApproval` are `(rowIndex) => Option<…>` accessors over the
|
|
141
|
+
// UNSLICED row index (the Table's rowStatus idiom), inert without `review`.
|
|
142
|
+
review: OptionType(RowReviewType),
|
|
143
|
+
reviewStatus: OptionType(FunctionType([IntegerType], OptionType(StatusValueType))),
|
|
144
|
+
reviewApproval: OptionType(FunctionType([IntegerType], OptionType(ApprovalStateType))),
|
|
136
145
|
slice: OptionType(SliceChromeType),
|
|
137
146
|
style: OptionType(TableStyleType),
|
|
138
147
|
});
|
|
@@ -344,6 +353,13 @@ export function createTable(data, columns, style) {
|
|
|
344
353
|
virtualization: style?.virtualization !== undefined ? some(style.virtualization) : none,
|
|
345
354
|
density: densityValue ? some(densityValue) : none,
|
|
346
355
|
rowStatus: rowStatusValue ? some(rowStatusValue) : none,
|
|
356
|
+
review: style?.review !== undefined ? some(buildReview(style.review, RowReviewType)) : none,
|
|
357
|
+
reviewStatus: style?.reviewStatus !== undefined
|
|
358
|
+
? some(East.value(style.reviewStatus, FunctionType([IntegerType], OptionType(StatusValueType))))
|
|
359
|
+
: none,
|
|
360
|
+
reviewApproval: style?.reviewApproval !== undefined
|
|
361
|
+
? some(East.value(style.reviewApproval, FunctionType([IntegerType], OptionType(ApprovalStateType))))
|
|
362
|
+
: none,
|
|
347
363
|
pagination: paginationValue ? some(paginationValue) : none,
|
|
348
364
|
selection: selectionValue ? some(selectionValue) : none,
|
|
349
365
|
slice: sliceChromeValue ? some(sliceChromeValue) : none,
|
|
@@ -477,6 +493,12 @@ export const Table = {
|
|
|
477
493
|
* @property style - Optional visual-only style sub-struct ({@link TableStyleType})
|
|
478
494
|
*/
|
|
479
495
|
Root: TableRootType,
|
|
496
|
+
/** A row's review decision — the shared `ApprovalStateType` (#264). */
|
|
497
|
+
Approval: ApprovalStateType,
|
|
498
|
+
/** The review configuration — the shared row-granularity `RowReviewType` (#264). */
|
|
499
|
+
Review: RowReviewType,
|
|
500
|
+
/** The per-row approve / reject payload — the shared `RowRefType` (`{ rowIndex }`, unsliced). */
|
|
501
|
+
ApproveEvent: RowRefType,
|
|
480
502
|
/**
|
|
481
503
|
* East StructType holding every visual field for a Table —
|
|
482
504
|
* visual-only.
|