@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
|
@@ -21,15 +21,99 @@
|
|
|
21
21
|
*
|
|
22
22
|
* @packageDocumentation
|
|
23
23
|
*/
|
|
24
|
-
import { East, Expr, variant, some, none, ArrayType, StringType, StructType, } from "@elaraai/east";
|
|
24
|
+
import { East, Expr, variant, some, none, ArrayType, BooleanType, FunctionType, IntegerType, OptionType, StringType, StructType, NullType, } from "@elaraai/east";
|
|
25
25
|
import { UIComponentType } from "../../component.js";
|
|
26
26
|
import { mapRows } from "../../shared/reify.js";
|
|
27
27
|
import { DensityType } from "../../style/interaction.js";
|
|
28
|
-
import {} from "../../contracts/drag.js";
|
|
28
|
+
import { CanDropFnType, CellRefType, DragEventType } from "../../contracts/drag.js";
|
|
29
29
|
import { PlannerStateType } from "../planner/types.js";
|
|
30
|
-
import { BoardModeType, BoardEntityType, BoardAssignmentType, BoardRequirementType,
|
|
30
|
+
import { BoardModeType, BoardEntityType, BoardAssignmentType, BoardRequirementType, } from "./types.js";
|
|
31
|
+
import { RowRefType, RowReviewType, buildReview } from "../../contracts/review.js";
|
|
31
32
|
// Re-export types
|
|
32
|
-
export { BoardModeType, BoardEntityType, BoardAssignmentType, BoardRequirementType,
|
|
33
|
+
export { BoardModeType, BoardEntityType, BoardAssignmentType, BoardRequirementType, } from "./types.js";
|
|
34
|
+
/**
|
|
35
|
+
* East StructType for the Board component.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Flat resolved tables — the renderer groups assignments into cells by
|
|
39
|
+
* `area × shift` and joins each to `people` by person key for the chip face.
|
|
40
|
+
* Assignment states reuse the Planner event-state grammar
|
|
41
|
+
* ({@link PlannerStateType}); the `model` flavour renders as the dashed
|
|
42
|
+
* ghost with the acceptance affordance. The component renders no built-in
|
|
43
|
+
* user-facing copy. Defined here (not `types.ts`) since #265: the root
|
|
44
|
+
* carries the shared review config, whose `summary` is a `UIComponentType` —
|
|
45
|
+
* `component.ts` mirrors this arm inline with the recursion `node`.
|
|
46
|
+
*
|
|
47
|
+
* @property id - DnD target identity
|
|
48
|
+
* @property sources - Library ids accepted for `add` drags
|
|
49
|
+
* @property mode - `published` (committed-only, immutable) or `edit`
|
|
50
|
+
* @property areaHeader - Optional frozen area column header (none = blank)
|
|
51
|
+
* @property areaWidth - Optional CSS width for the frozen area column
|
|
52
|
+
* @property areas - The grid rows
|
|
53
|
+
* @property shifts - The grid columns (this day's shift types, in order)
|
|
54
|
+
* @property people - The chip directory (faces), joined by person key
|
|
55
|
+
* @property assignments - The person chips (grouped into cells by area × shift)
|
|
56
|
+
* @property requirements - Optional per-cell coverage (none = no coverage chrome)
|
|
57
|
+
* @property density - Optional density
|
|
58
|
+
* @property maxVisible - Optional per-cell chip cap before the `+N` overflow
|
|
59
|
+
* @property summary - Optional status-strip text (open / proposed counts)
|
|
60
|
+
* @property canDrop - Optional IR-level drop veto over synthesized candidate events
|
|
61
|
+
* @property onDrag - Drag funnel — add / move / remove events
|
|
62
|
+
* @property onSelect - Assignment / cell click callback
|
|
63
|
+
* @property onAccept - Ghost-assignment acceptance callback (ONE proposed assignment)
|
|
64
|
+
* @property onAddAt - Open-slot / empty-cell click callback (edit mode)
|
|
65
|
+
* @property review - Optional batch review foot (shared contract, #265)
|
|
66
|
+
*/
|
|
67
|
+
export const BoardRootType = StructType({
|
|
68
|
+
/** DnD target identity */
|
|
69
|
+
id: StringType,
|
|
70
|
+
/** Library ids accepted for `add` drags */
|
|
71
|
+
sources: ArrayType(StringType),
|
|
72
|
+
/** `published` (committed-only, immutable) or `edit` */
|
|
73
|
+
mode: BoardModeType,
|
|
74
|
+
/** Optional frozen area column header (none = blank) */
|
|
75
|
+
areaHeader: OptionType(StringType),
|
|
76
|
+
/** Optional CSS width for the frozen area column (none = the Planner-consistent 150px) */
|
|
77
|
+
areaWidth: OptionType(StringType),
|
|
78
|
+
/** The grid rows */
|
|
79
|
+
areas: ArrayType(BoardEntityType),
|
|
80
|
+
/** The grid columns (this day's shift types, in order) */
|
|
81
|
+
shifts: ArrayType(BoardEntityType),
|
|
82
|
+
/** The chip directory (faces), joined by person key */
|
|
83
|
+
people: ArrayType(BoardEntityType),
|
|
84
|
+
/** The person chips (grouped into cells by area × shift) */
|
|
85
|
+
assignments: ArrayType(BoardAssignmentType),
|
|
86
|
+
/** Optional per-cell coverage (none = no coverage chrome) */
|
|
87
|
+
requirements: OptionType(ArrayType(BoardRequirementType)),
|
|
88
|
+
/** Optional density */
|
|
89
|
+
density: OptionType(DensityType),
|
|
90
|
+
/** Optional per-cell chip cap before the `+N` overflow */
|
|
91
|
+
maxVisible: OptionType(IntegerType),
|
|
92
|
+
/** Optional status-strip text (open / proposed counts) */
|
|
93
|
+
summary: OptionType(StringType),
|
|
94
|
+
/** Optional IR-level drop veto — consulted per hovered cell with the
|
|
95
|
+
* synthesized candidate event ({@link CanDropFnType} semantics); `false`
|
|
96
|
+
* ⇒ the ⊘ invalid stage and the drop is a no-op. Absent ⇒ accept. The
|
|
97
|
+
* factory's deprecated `canAssign` sugar compiles into this predicate. */
|
|
98
|
+
canDrop: OptionType(CanDropFnType),
|
|
99
|
+
/** Drag funnel — add / move / remove events */
|
|
100
|
+
onDrag: OptionType(FunctionType([DragEventType], NullType)),
|
|
101
|
+
/** Assignment / cell click callback */
|
|
102
|
+
onSelect: OptionType(FunctionType([CellRefType], NullType)),
|
|
103
|
+
/** Ghost-assignment acceptance callback — resolves ONE proposed
|
|
104
|
+
* assignment; `review`'s batch verbs sign off the whole board. The
|
|
105
|
+
* interplay is host-owned (no implicit cascading in the component). */
|
|
106
|
+
onAccept: OptionType(FunctionType([CellRefType], NullType)),
|
|
107
|
+
/** Open-slot / empty-cell click callback (edit mode) */
|
|
108
|
+
onAddAt: OptionType(FunctionType([CellRefType], NullType)),
|
|
109
|
+
/** Optional batch review foot (#265) — the shared contract's commitBar
|
|
110
|
+
* verbs (`onApproveAll` / `onRejectAll` / `onRerun` + `summary`). Board
|
|
111
|
+
* is single-day areas × shifts, so v1 renders the FOOT only: the
|
|
112
|
+
* per-row fields (`columnLabel`, `onApprove`, `onReject`) are unused
|
|
113
|
+
* (a per-area decision column is an epic candidate); the factory warns
|
|
114
|
+
* when they are set. */
|
|
115
|
+
review: OptionType(RowReviewType),
|
|
116
|
+
});
|
|
33
117
|
function resolveEntities(rows, mapper) {
|
|
34
118
|
if (mapper === undefined) {
|
|
35
119
|
return East.value(rows, ArrayType(BoardEntityType));
|
|
@@ -45,6 +129,15 @@ function resolveEntities(rows, mapper) {
|
|
|
45
129
|
}, BoardEntityType);
|
|
46
130
|
});
|
|
47
131
|
}
|
|
132
|
+
/** Board v1 renders the review FOOT only — warn (and drop) per-row fields
|
|
133
|
+
* so a host wiring `onApprove` learns it is inert here (#265). */
|
|
134
|
+
function reviewFootOnly(review) {
|
|
135
|
+
if (review.onApprove !== undefined || review.onReject !== undefined || review.columnLabel !== undefined) {
|
|
136
|
+
console.warn("[Board] review.columnLabel / onApprove / onReject are unused — Board renders the batch foot only (per-area decisions are tracked as an epic #259 candidate).");
|
|
137
|
+
}
|
|
138
|
+
const { onApprove: _onApprove, onReject: _onReject, columnLabel: _columnLabel, ...foot } = review;
|
|
139
|
+
return foot;
|
|
140
|
+
}
|
|
48
141
|
function buildRoot(areas, shifts, people, assignments, config) {
|
|
49
142
|
const assignmentMapper = config.assignment;
|
|
50
143
|
const resolvedAssignments = assignmentMapper === undefined
|
|
@@ -85,6 +178,38 @@ function buildRoot(areas, shifts, people, assignments, config) {
|
|
|
85
178
|
const maxVisible = config.maxVisible !== undefined
|
|
86
179
|
? some(typeof config.maxVisible === "number" ? BigInt(config.maxVisible) : config.maxVisible)
|
|
87
180
|
: none;
|
|
181
|
+
// Compile the deprecated `canAssign` sugar into the shared `canDrop`
|
|
182
|
+
// contract: an `add`'s person is the dragged card's key; a `move`'s person
|
|
183
|
+
// is resolved from the authored assignments by the moving event's key
|
|
184
|
+
// (allowing when unresolvable — e.g. a chip added optimistically this
|
|
185
|
+
// session); sink kinds are always structurally valid. When the host also
|
|
186
|
+
// supplies an explicit `canDrop`, both predicates must allow.
|
|
187
|
+
const canAssignFn = config.canAssign;
|
|
188
|
+
const compiledCanAssign = canAssignFn === undefined ? undefined
|
|
189
|
+
: East.function([DragEventType], BooleanType, ($, ev) => {
|
|
190
|
+
const fn = $.const(canAssignFn, FunctionType([StringType, StringType, StringType], BooleanType));
|
|
191
|
+
const rows = $.const(resolvedAssignments);
|
|
192
|
+
return ev.match({
|
|
193
|
+
add: (_$, add) => fn(add.from.key, add.into.row, add.into.slot),
|
|
194
|
+
move: ($, mv) => {
|
|
195
|
+
const key = $.const(mv.from.event.match({ some: (_$, k) => k, none: (_$) => East.value("") }));
|
|
196
|
+
return rows.firstMap((_$, a) => East.equal(a.key, key).ifElse(() => some(a.person), () => none)).match({
|
|
197
|
+
some: (_$, person) => fn(person, mv.to.row, mv.to.slot),
|
|
198
|
+
none: (_$) => East.value(true),
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
remove: (_$) => East.value(true),
|
|
202
|
+
resize: (_$) => East.value(true),
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
const userCanDrop = config.canDrop;
|
|
206
|
+
const canDrop = compiledCanAssign !== undefined && userCanDrop !== undefined
|
|
207
|
+
? East.function([DragEventType], BooleanType, ($, ev) => {
|
|
208
|
+
const compiled = $.const(compiledCanAssign);
|
|
209
|
+
const user = $.const(userCanDrop, CanDropFnType);
|
|
210
|
+
return compiled(ev).and(_$ => user(ev));
|
|
211
|
+
})
|
|
212
|
+
: compiledCanAssign ?? userCanDrop;
|
|
88
213
|
return East.value(variant("Board", {
|
|
89
214
|
id: config.id,
|
|
90
215
|
sources: East.value(config.sources ?? [], ArrayType(StringType)),
|
|
@@ -99,7 +224,8 @@ function buildRoot(areas, shifts, people, assignments, config) {
|
|
|
99
224
|
density,
|
|
100
225
|
maxVisible,
|
|
101
226
|
summary: config.summary !== undefined ? some(config.summary) : none,
|
|
102
|
-
|
|
227
|
+
canDrop: canDrop !== undefined ? some(canDrop) : none,
|
|
228
|
+
review: config.review !== undefined ? some(buildReview(reviewFootOnly(config.review), RowReviewType)) : none,
|
|
103
229
|
onDrag: config.onDrag !== undefined ? some(config.onDrag) : none,
|
|
104
230
|
onSelect: config.onSelect !== undefined ? some(config.onSelect) : none,
|
|
105
231
|
onAccept: config.onAccept !== undefined ? some(config.onAccept) : none,
|
|
@@ -236,6 +362,8 @@ export const Board = {
|
|
|
236
362
|
* @property onAddAt - Open-slot / empty-cell click callback
|
|
237
363
|
*/
|
|
238
364
|
Board: BoardRootType,
|
|
365
|
+
/** The review configuration — the shared `RowReviewType`; Board v1 renders the batch foot only (#265). */
|
|
366
|
+
Review: RowReviewType,
|
|
239
367
|
/**
|
|
240
368
|
* Board render mode (`published` / `edit`).
|
|
241
369
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/board/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/board/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oB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E,WAAW,EAAE,MACa,CAAC,CAAC;AACxE,CAAC;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE;QACH;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;QACH,KAAK,EAAE,aAAa;QACpB,0GAA0G;QAC1G,MAAM,EAAE,aAAa;QACrB;;;;;WAKG;QACH,IAAI,EAAE,aAAa;QACnB;;;;;;WAMG;QACH,MAAM,EAAE,eAAe;QACvB;;;;;;;;WAQG;QACH,UAAU,EAAE,mBAAmB;QAC/B;;;;;;WAMG;QACH,WAAW,EAAE,oBAAoB;QACjC;;;;;;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 { IntegerType, NullType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
|
|
6
6
|
/**
|
|
7
7
|
* Board render mode.
|
|
8
8
|
*
|
|
@@ -108,201 +108,4 @@ export declare const BoardRequirementType: StructType<{
|
|
|
108
108
|
* Type representing resolved coverage requirements.
|
|
109
109
|
*/
|
|
110
110
|
export type BoardRequirementType = typeof BoardRequirementType;
|
|
111
|
-
/**
|
|
112
|
-
* East StructType for the Board component.
|
|
113
|
-
*
|
|
114
|
-
* @remarks
|
|
115
|
-
* Flat resolved tables — the renderer groups assignments into cells by
|
|
116
|
-
* `area × shift` and joins each to `people` by person key for the chip face.
|
|
117
|
-
* Assignment states reuse the Planner event-state grammar
|
|
118
|
-
* ({@link PlannerStateType}); the `model` flavour renders as the dashed
|
|
119
|
-
* ghost with the acceptance affordance. The component renders no built-in
|
|
120
|
-
* user-facing copy: every string it shows arrives as data or a prop, and its
|
|
121
|
-
* own chrome is numerals, glyphs and tones.
|
|
122
|
-
*
|
|
123
|
-
* @property id - DnD target identity
|
|
124
|
-
* @property sources - Library ids accepted for `add` drags
|
|
125
|
-
* @property mode - `published` (committed-only, immutable) or `edit`
|
|
126
|
-
* @property areaHeader - Optional frozen area column header (none = blank)
|
|
127
|
-
* @property areaWidth - Optional CSS width for the frozen area column
|
|
128
|
-
* @property areas - The grid rows
|
|
129
|
-
* @property shifts - The grid columns (this day's shift types, in order)
|
|
130
|
-
* @property people - The chip directory (faces), joined by person key
|
|
131
|
-
* @property assignments - The person chips (grouped into cells by area × shift)
|
|
132
|
-
* @property requirements - Optional per-cell coverage (none = no coverage chrome)
|
|
133
|
-
* @property density - Optional density
|
|
134
|
-
* @property maxVisible - Optional per-cell chip cap before the `+N` overflow
|
|
135
|
-
* @property summary - Optional status-strip text (open / proposed counts)
|
|
136
|
-
* @property canAssign - Optional assignability predicate `(person, area, shift) => Boolean`
|
|
137
|
-
* @property onDrag - Drag funnel — add / move / remove events
|
|
138
|
-
* @property onSelect - Assignment / cell click callback
|
|
139
|
-
* @property onAccept - Ghost-assignment acceptance callback
|
|
140
|
-
* @property onAddAt - Open-slot / empty-cell click callback (edit mode)
|
|
141
|
-
*/
|
|
142
|
-
export declare const BoardRootType: StructType<{
|
|
143
|
-
/** DnD target identity */
|
|
144
|
-
readonly id: StringType;
|
|
145
|
-
/** Library ids accepted for `add` drags */
|
|
146
|
-
readonly sources: ArrayType<StringType>;
|
|
147
|
-
/** `published` (committed-only, immutable) or `edit` */
|
|
148
|
-
readonly mode: VariantType<{
|
|
149
|
-
/** Committed-only, pointer-immutable */
|
|
150
|
-
readonly published: NullType;
|
|
151
|
-
/** Operator + model proposals are interactive */
|
|
152
|
-
readonly edit: NullType;
|
|
153
|
-
}>;
|
|
154
|
-
/** Optional frozen area column header (none = blank) */
|
|
155
|
-
readonly areaHeader: OptionType<StringType>;
|
|
156
|
-
/** Optional CSS width for the frozen area column (none = the Planner-consistent 150px) */
|
|
157
|
-
readonly areaWidth: OptionType<StringType>;
|
|
158
|
-
/** The grid rows */
|
|
159
|
-
readonly areas: ArrayType<StructType<{
|
|
160
|
-
/** Entity identity — the key assignments reference */
|
|
161
|
-
readonly key: StringType;
|
|
162
|
-
/** Display name */
|
|
163
|
-
readonly label: StringType;
|
|
164
|
-
/** Optional muted second line (e.g. wing, time window, role) */
|
|
165
|
-
readonly sublabel: OptionType<StringType>;
|
|
166
|
-
}>>;
|
|
167
|
-
/** The grid columns (this day's shift types, in order) */
|
|
168
|
-
readonly shifts: ArrayType<StructType<{
|
|
169
|
-
/** Entity identity — the key assignments reference */
|
|
170
|
-
readonly key: StringType;
|
|
171
|
-
/** Display name */
|
|
172
|
-
readonly label: StringType;
|
|
173
|
-
/** Optional muted second line (e.g. wing, time window, role) */
|
|
174
|
-
readonly sublabel: OptionType<StringType>;
|
|
175
|
-
}>>;
|
|
176
|
-
/** The chip directory (faces), joined by person key */
|
|
177
|
-
readonly people: ArrayType<StructType<{
|
|
178
|
-
/** Entity identity — the key assignments reference */
|
|
179
|
-
readonly key: StringType;
|
|
180
|
-
/** Display name */
|
|
181
|
-
readonly label: StringType;
|
|
182
|
-
/** Optional muted second line (e.g. wing, time window, role) */
|
|
183
|
-
readonly sublabel: OptionType<StringType>;
|
|
184
|
-
}>>;
|
|
185
|
-
/** The person chips (grouped into cells by area × shift) */
|
|
186
|
-
readonly assignments: ArrayType<StructType<{
|
|
187
|
-
/** Stable assignment identity — referenced by drag-grammar cell refs */
|
|
188
|
-
readonly key: StringType;
|
|
189
|
-
/** The person key (joined to `people` for the chip face) */
|
|
190
|
-
readonly person: StringType;
|
|
191
|
-
/** The area key (the grid row) */
|
|
192
|
-
readonly area: StringType;
|
|
193
|
-
/** The shift key (the grid column) */
|
|
194
|
-
readonly shift: StringType;
|
|
195
|
-
/** The audit state (committed / proposed / rejected) */
|
|
196
|
-
readonly state: VariantType<{
|
|
197
|
-
readonly committed: NullType;
|
|
198
|
-
readonly proposed: VariantType<{
|
|
199
|
-
readonly added: NullType;
|
|
200
|
-
readonly model: NullType;
|
|
201
|
-
readonly removed: NullType;
|
|
202
|
-
}>;
|
|
203
|
-
readonly rejected: NullType;
|
|
204
|
-
}>;
|
|
205
|
-
}>>;
|
|
206
|
-
/** Optional per-cell coverage (none = no coverage chrome) */
|
|
207
|
-
readonly requirements: OptionType<ArrayType<StructType<{
|
|
208
|
-
/** The area key */
|
|
209
|
-
readonly area: StringType;
|
|
210
|
-
/** The shift key */
|
|
211
|
-
readonly shift: StringType;
|
|
212
|
-
/** Required headcount for the cell */
|
|
213
|
-
readonly required: IntegerType;
|
|
214
|
-
}>>>;
|
|
215
|
-
/** Optional density */
|
|
216
|
-
readonly density: OptionType<VariantType<{
|
|
217
|
-
readonly comfortable: NullType;
|
|
218
|
-
readonly compact: NullType;
|
|
219
|
-
readonly condensed: NullType;
|
|
220
|
-
}>>;
|
|
221
|
-
/** Optional per-cell chip cap before the `+N` overflow */
|
|
222
|
-
readonly maxVisible: OptionType<IntegerType>;
|
|
223
|
-
/** Optional status-strip text (open / proposed counts) */
|
|
224
|
-
readonly summary: OptionType<StringType>;
|
|
225
|
-
/** Optional assignability predicate `(person, area, shift) => Boolean` — a
|
|
226
|
-
* `false` verdict renders the invalid-drop treatment and vetoes the drop */
|
|
227
|
-
readonly canAssign: OptionType<FunctionType<[StringType, StringType, StringType], BooleanType>>;
|
|
228
|
-
/** Drag funnel — add / move / remove events */
|
|
229
|
-
readonly onDrag: OptionType<FunctionType<[VariantType<{
|
|
230
|
-
readonly add: StructType<{
|
|
231
|
-
readonly from: StructType<{
|
|
232
|
-
readonly library: StringType;
|
|
233
|
-
readonly key: StringType;
|
|
234
|
-
}>;
|
|
235
|
-
readonly into: StructType<{
|
|
236
|
-
readonly surface: StringType;
|
|
237
|
-
readonly row: StringType;
|
|
238
|
-
readonly slot: StringType;
|
|
239
|
-
readonly event: OptionType<StringType>;
|
|
240
|
-
}>;
|
|
241
|
-
readonly duplicate: BooleanType;
|
|
242
|
-
}>;
|
|
243
|
-
readonly move: StructType<{
|
|
244
|
-
readonly from: StructType<{
|
|
245
|
-
readonly surface: StringType;
|
|
246
|
-
readonly row: StringType;
|
|
247
|
-
readonly slot: StringType;
|
|
248
|
-
readonly event: OptionType<StringType>;
|
|
249
|
-
}>;
|
|
250
|
-
readonly to: StructType<{
|
|
251
|
-
readonly surface: StringType;
|
|
252
|
-
readonly row: StringType;
|
|
253
|
-
readonly slot: StringType;
|
|
254
|
-
readonly event: OptionType<StringType>;
|
|
255
|
-
}>;
|
|
256
|
-
}>;
|
|
257
|
-
readonly remove: StructType<{
|
|
258
|
-
readonly from: StructType<{
|
|
259
|
-
readonly surface: StringType;
|
|
260
|
-
readonly row: StringType;
|
|
261
|
-
readonly slot: StringType;
|
|
262
|
-
readonly event: OptionType<StringType>;
|
|
263
|
-
}>;
|
|
264
|
-
readonly to: VariantType<{
|
|
265
|
-
readonly trash: NullType;
|
|
266
|
-
readonly source: NullType;
|
|
267
|
-
}>;
|
|
268
|
-
}>;
|
|
269
|
-
readonly resize: StructType<{
|
|
270
|
-
readonly event: StructType<{
|
|
271
|
-
readonly surface: StringType;
|
|
272
|
-
readonly row: StringType;
|
|
273
|
-
readonly slot: StringType;
|
|
274
|
-
readonly event: OptionType<StringType>;
|
|
275
|
-
}>;
|
|
276
|
-
readonly edge: VariantType<{
|
|
277
|
-
readonly start: NullType;
|
|
278
|
-
readonly end: NullType;
|
|
279
|
-
}>;
|
|
280
|
-
}>;
|
|
281
|
-
}>], NullType>>;
|
|
282
|
-
/** Assignment / cell click callback */
|
|
283
|
-
readonly onSelect: OptionType<FunctionType<[StructType<{
|
|
284
|
-
readonly surface: StringType;
|
|
285
|
-
readonly row: StringType;
|
|
286
|
-
readonly slot: StringType;
|
|
287
|
-
readonly event: OptionType<StringType>;
|
|
288
|
-
}>], NullType>>;
|
|
289
|
-
/** Ghost-assignment acceptance callback */
|
|
290
|
-
readonly onAccept: OptionType<FunctionType<[StructType<{
|
|
291
|
-
readonly surface: StringType;
|
|
292
|
-
readonly row: StringType;
|
|
293
|
-
readonly slot: StringType;
|
|
294
|
-
readonly event: OptionType<StringType>;
|
|
295
|
-
}>], NullType>>;
|
|
296
|
-
/** Open-slot / empty-cell click callback (edit mode) */
|
|
297
|
-
readonly onAddAt: OptionType<FunctionType<[StructType<{
|
|
298
|
-
readonly surface: StringType;
|
|
299
|
-
readonly row: StringType;
|
|
300
|
-
readonly slot: StringType;
|
|
301
|
-
readonly event: OptionType<StringType>;
|
|
302
|
-
}>], NullType>>;
|
|
303
|
-
}>;
|
|
304
|
-
/**
|
|
305
|
-
* Type representing the Board component.
|
|
306
|
-
*/
|
|
307
|
-
export type BoardRootType = typeof BoardRootType;
|
|
308
111
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/collections/board/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/collections/board/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACd,MAAM,eAAe,CAAC;AAIvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;IACtB,wCAAwC;;IAExC,iDAAiD;;EAEnD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;IACxB,sDAAsD;;IAEtD,mBAAmB;;IAEnB,gEAAgE;;EAElE,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;IAC5B,wEAAwE;;IAExE,4DAA4D;;IAE5D,kCAAkC;;IAElC,sCAAsC;;IAEtC,wDAAwD;;;;;;;;;;EAE1D,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;IAC7B,mBAAmB;;IAEnB,oBAAoB;;IAEpB,sCAAsC;;EAExC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC"}
|
|
@@ -2,9 +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 {
|
|
6
|
-
import { DensityType } from "../../style/interaction.js";
|
|
7
|
-
import { CellRefType, DragEventType } from "../../contracts/drag.js";
|
|
5
|
+
import { IntegerType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
8
6
|
import { PlannerStateType } from "../planner/types.js";
|
|
9
7
|
/**
|
|
10
8
|
* Board render mode.
|
|
@@ -83,74 +81,9 @@ export const BoardRequirementType = StructType({
|
|
|
83
81
|
/** Required headcount for the cell */
|
|
84
82
|
required: IntegerType,
|
|
85
83
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* `area × shift` and joins each to `people` by person key for the chip face.
|
|
92
|
-
* Assignment states reuse the Planner event-state grammar
|
|
93
|
-
* ({@link PlannerStateType}); the `model` flavour renders as the dashed
|
|
94
|
-
* ghost with the acceptance affordance. The component renders no built-in
|
|
95
|
-
* user-facing copy: every string it shows arrives as data or a prop, and its
|
|
96
|
-
* own chrome is numerals, glyphs and tones.
|
|
97
|
-
*
|
|
98
|
-
* @property id - DnD target identity
|
|
99
|
-
* @property sources - Library ids accepted for `add` drags
|
|
100
|
-
* @property mode - `published` (committed-only, immutable) or `edit`
|
|
101
|
-
* @property areaHeader - Optional frozen area column header (none = blank)
|
|
102
|
-
* @property areaWidth - Optional CSS width for the frozen area column
|
|
103
|
-
* @property areas - The grid rows
|
|
104
|
-
* @property shifts - The grid columns (this day's shift types, in order)
|
|
105
|
-
* @property people - The chip directory (faces), joined by person key
|
|
106
|
-
* @property assignments - The person chips (grouped into cells by area × shift)
|
|
107
|
-
* @property requirements - Optional per-cell coverage (none = no coverage chrome)
|
|
108
|
-
* @property density - Optional density
|
|
109
|
-
* @property maxVisible - Optional per-cell chip cap before the `+N` overflow
|
|
110
|
-
* @property summary - Optional status-strip text (open / proposed counts)
|
|
111
|
-
* @property canAssign - Optional assignability predicate `(person, area, shift) => Boolean`
|
|
112
|
-
* @property onDrag - Drag funnel — add / move / remove events
|
|
113
|
-
* @property onSelect - Assignment / cell click callback
|
|
114
|
-
* @property onAccept - Ghost-assignment acceptance callback
|
|
115
|
-
* @property onAddAt - Open-slot / empty-cell click callback (edit mode)
|
|
116
|
-
*/
|
|
117
|
-
export const BoardRootType = StructType({
|
|
118
|
-
/** DnD target identity */
|
|
119
|
-
id: StringType,
|
|
120
|
-
/** Library ids accepted for `add` drags */
|
|
121
|
-
sources: ArrayType(StringType),
|
|
122
|
-
/** `published` (committed-only, immutable) or `edit` */
|
|
123
|
-
mode: BoardModeType,
|
|
124
|
-
/** Optional frozen area column header (none = blank) */
|
|
125
|
-
areaHeader: OptionType(StringType),
|
|
126
|
-
/** Optional CSS width for the frozen area column (none = the Planner-consistent 150px) */
|
|
127
|
-
areaWidth: OptionType(StringType),
|
|
128
|
-
/** The grid rows */
|
|
129
|
-
areas: ArrayType(BoardEntityType),
|
|
130
|
-
/** The grid columns (this day's shift types, in order) */
|
|
131
|
-
shifts: ArrayType(BoardEntityType),
|
|
132
|
-
/** The chip directory (faces), joined by person key */
|
|
133
|
-
people: ArrayType(BoardEntityType),
|
|
134
|
-
/** The person chips (grouped into cells by area × shift) */
|
|
135
|
-
assignments: ArrayType(BoardAssignmentType),
|
|
136
|
-
/** Optional per-cell coverage (none = no coverage chrome) */
|
|
137
|
-
requirements: OptionType(ArrayType(BoardRequirementType)),
|
|
138
|
-
/** Optional density */
|
|
139
|
-
density: OptionType(DensityType),
|
|
140
|
-
/** Optional per-cell chip cap before the `+N` overflow */
|
|
141
|
-
maxVisible: OptionType(IntegerType),
|
|
142
|
-
/** Optional status-strip text (open / proposed counts) */
|
|
143
|
-
summary: OptionType(StringType),
|
|
144
|
-
/** Optional assignability predicate `(person, area, shift) => Boolean` — a
|
|
145
|
-
* `false` verdict renders the invalid-drop treatment and vetoes the drop */
|
|
146
|
-
canAssign: OptionType(FunctionType([StringType, StringType, StringType], BooleanType)),
|
|
147
|
-
/** Drag funnel — add / move / remove events */
|
|
148
|
-
onDrag: OptionType(FunctionType([DragEventType], NullType)),
|
|
149
|
-
/** Assignment / cell click callback */
|
|
150
|
-
onSelect: OptionType(FunctionType([CellRefType], NullType)),
|
|
151
|
-
/** Ghost-assignment acceptance callback */
|
|
152
|
-
onAccept: OptionType(FunctionType([CellRefType], NullType)),
|
|
153
|
-
/** Open-slot / empty-cell click callback (edit mode) */
|
|
154
|
-
onAddAt: OptionType(FunctionType([CellRefType], NullType)),
|
|
155
|
-
});
|
|
84
|
+
// NOTE (#265): `BoardRootType` moved to `./index.ts` — the root now carries
|
|
85
|
+
// the shared review config (`review.summary` is a `UIComponentType`), so it is
|
|
86
|
+
// UIComp-coupled and can no longer live in this `component.ts`-importable
|
|
87
|
+
// module. `component.ts` spells the Board arm inline with the recursion
|
|
88
|
+
// `node` (the Planner precedent).
|
|
156
89
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/collections/board/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/collections/board/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACrC,wCAAwC;IACxC,SAAS,EAAE,QAAQ;IACnB,iDAAiD;IACjD,IAAI,EAAE,QAAQ;CACjB,CAAC,CAAC;AAYH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACtC,sDAAsD;IACtD,GAAG,EAAE,UAAU;IACf,mBAAmB;IACnB,KAAK,EAAE,UAAU;IACjB,gEAAgE;IAChE,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;CACnC,CAAC,CAAC;AAOH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;IAC1C,wEAAwE;IACxE,GAAG,EAAE,UAAU;IACf,4DAA4D;IAC5D,MAAM,EAAE,UAAU;IAClB,kCAAkC;IAClC,IAAI,EAAE,UAAU;IAChB,sCAAsC;IACtC,KAAK,EAAE,UAAU;IACjB,wDAAwD;IACxD,KAAK,EAAE,gBAAgB;CAC1B,CAAC,CAAC;AAOH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;IAC3C,mBAAmB;IACnB,IAAI,EAAE,UAAU;IAChB,oBAAoB;IACpB,KAAK,EAAE,UAAU;IACjB,sCAAsC;IACtC,QAAQ,EAAE,WAAW;CACxB,CAAC,CAAC;AAOH,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,wEAAwE;AACxE,kCAAkC"}
|