@elaraai/east-ui 1.0.68 → 1.0.69
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 +2 -2
- package/dist/src/charts/chart/index.d.ts +39 -4
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/chart/index.js +3 -3
- package/dist/src/charts/chart/index.js.map +1 -1
- package/dist/src/charts/spec/index.d.ts +61 -3
- package/dist/src/charts/spec/index.d.ts.map +1 -1
- package/dist/src/charts/spec/types.d.ts +1 -1
- package/dist/src/charts/spec/types.js +1 -1
- package/dist/src/collections/blend/index.d.ts +1 -1
- package/dist/src/collections/blend/index.d.ts.map +1 -1
- package/dist/src/collections/blend/index.js +1 -1
- package/dist/src/collections/blend/index.js.map +1 -1
- package/dist/src/collections/blend/types.js +1 -1
- package/dist/src/collections/blend/types.js.map +1 -1
- package/dist/src/collections/board/index.d.ts +4 -4
- package/dist/src/collections/board/index.d.ts.map +1 -1
- package/dist/src/collections/board/index.js +1 -1
- package/dist/src/collections/board/index.js.map +1 -1
- package/dist/src/collections/board/types.js +1 -1
- package/dist/src/collections/board/types.js.map +1 -1
- package/dist/src/collections/calendar/index.d.ts +1 -1
- package/dist/src/collections/calendar/index.d.ts.map +1 -1
- package/dist/src/collections/deck/index.d.ts +58 -0
- package/dist/src/collections/deck/index.d.ts.map +1 -1
- package/dist/src/collections/index.d.ts +1 -2
- package/dist/src/collections/index.d.ts.map +1 -1
- package/dist/src/collections/index.js +1 -2
- package/dist/src/collections/index.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +29 -0
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/types.d.ts +29 -0
- package/dist/src/collections/library/types.d.ts.map +1 -1
- package/dist/src/collections/matrix/index.d.ts +1 -1
- package/dist/src/collections/matrix/index.d.ts.map +1 -1
- package/dist/src/collections/plan/assemble.d.ts +3732 -0
- package/dist/src/collections/plan/assemble.d.ts.map +1 -0
- package/dist/src/collections/plan/assemble.js +187 -0
- package/dist/src/collections/plan/assemble.js.map +1 -0
- package/dist/src/collections/plan/builders.d.ts +612 -0
- package/dist/src/collections/plan/builders.d.ts.map +1 -0
- package/dist/src/collections/plan/builders.js +543 -0
- package/dist/src/collections/plan/builders.js.map +1 -0
- package/dist/src/collections/plan/data-forms.d.ts +332 -0
- package/dist/src/collections/plan/data-forms.d.ts.map +1 -0
- package/dist/src/collections/plan/data-forms.js +212 -0
- package/dist/src/collections/plan/data-forms.js.map +1 -0
- package/dist/src/collections/plan/factories.d.ts +338 -0
- package/dist/src/collections/plan/factories.d.ts.map +1 -0
- package/dist/src/collections/plan/factories.js +414 -0
- package/dist/src/collections/plan/factories.js.map +1 -0
- package/dist/src/collections/plan/index.d.ts +271 -0
- package/dist/src/collections/plan/index.d.ts.map +1 -0
- package/dist/src/collections/plan/index.js +162 -0
- package/dist/src/collections/plan/index.js.map +1 -0
- package/dist/src/collections/plan/ir.d.ts +3496 -0
- package/dist/src/collections/plan/ir.d.ts.map +1 -0
- package/dist/src/collections/plan/ir.js +83 -0
- package/dist/src/collections/plan/ir.js.map +1 -0
- package/dist/src/collections/plan/pick.d.ts +115 -0
- package/dist/src/collections/plan/pick.d.ts.map +1 -0
- package/dist/src/collections/plan/pick.js +193 -0
- package/dist/src/collections/plan/pick.js.map +1 -0
- package/dist/src/collections/plan/root.d.ts +210 -0
- package/dist/src/collections/plan/root.d.ts.map +1 -0
- package/dist/src/collections/plan/root.js +146 -0
- package/dist/src/collections/plan/root.js.map +1 -0
- package/dist/src/collections/plan/series.d.ts +11890 -0
- package/dist/src/collections/plan/series.d.ts.map +1 -0
- package/dist/src/collections/plan/series.js +412 -0
- package/dist/src/collections/plan/series.js.map +1 -0
- package/dist/src/collections/plan/types.d.ts +9291 -0
- package/dist/src/collections/plan/types.d.ts.map +1 -0
- package/dist/src/collections/plan/types.js +940 -0
- package/dist/src/collections/plan/types.js.map +1 -0
- package/dist/src/collections/roster/index.d.ts +4 -4
- package/dist/src/collections/roster/index.d.ts.map +1 -1
- package/dist/src/collections/roster/index.js +1 -1
- package/dist/src/collections/roster/index.js.map +1 -1
- package/dist/src/collections/roster/types.d.ts +1 -1
- package/dist/src/collections/roster/types.d.ts.map +1 -1
- package/dist/src/collections/roster/types.js +4 -3
- package/dist/src/collections/roster/types.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +70 -2
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +55 -11
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/table/types.d.ts +1 -1
- package/dist/src/collections/table/types.d.ts.map +1 -1
- package/dist/src/component.d.ts +3898 -1339
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +83 -146
- package/dist/src/component.js.map +1 -1
- package/dist/src/container/card/types.d.ts +1 -1
- package/dist/src/container/card/types.d.ts.map +1 -1
- package/dist/src/contracts/approval.d.ts +117 -0
- package/dist/src/contracts/approval.d.ts.map +1 -0
- package/dist/src/contracts/approval.js +105 -0
- package/dist/src/contracts/approval.js.map +1 -0
- package/dist/src/contracts/drag.d.ts +3 -3
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +23 -10
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/index.d.ts +4 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/index.js +4 -1
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/contracts/pick.d.ts +705 -0
- package/dist/src/contracts/pick.d.ts.map +1 -0
- package/dist/src/contracts/pick.js +360 -0
- package/dist/src/contracts/pick.js.map +1 -0
- package/dist/src/contracts/review.d.ts +7 -99
- package/dist/src/contracts/review.d.ts.map +1 -1
- package/dist/src/contracts/review.js +11 -85
- package/dist/src/contracts/review.js.map +1 -1
- package/dist/src/contracts/slice-affordances.d.ts +13 -4
- package/dist/src/contracts/slice-affordances.d.ts.map +1 -1
- package/dist/src/contracts/slice-affordances.js +13 -3
- package/dist/src/contracts/slice-affordances.js.map +1 -1
- package/dist/src/contracts/source.d.ts +432 -0
- package/dist/src/contracts/source.d.ts.map +1 -0
- package/dist/src/contracts/source.js +505 -0
- package/dist/src/contracts/source.js.map +1 -0
- package/dist/src/contracts/states.d.ts +130 -0
- package/dist/src/contracts/states.d.ts.map +1 -1
- package/dist/src/contracts/states.js +122 -0
- package/dist/src/contracts/states.js.map +1 -1
- package/dist/src/contracts/time.d.ts +76 -0
- package/dist/src/contracts/time.d.ts.map +1 -0
- package/dist/src/contracts/time.js +78 -0
- package/dist/src/contracts/time.js.map +1 -0
- package/dist/src/display/trace/types.d.ts +1 -1
- package/dist/src/display/trace/types.d.ts.map +1 -1
- package/dist/src/index.d.ts +10 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +22 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +4 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/dock/index.d.ts +1 -1
- package/dist/src/layout/dock/index.js +1 -1
- package/dist/src/layout/index.d.ts +0 -1
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +0 -1
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/overlays/drawer/types.d.ts +1 -1
- package/dist/src/overlays/drawer/types.d.ts.map +1 -1
- package/dist/src/pick/index.d.ts +443 -0
- package/dist/src/pick/index.d.ts.map +1 -0
- package/dist/src/pick/index.js +64 -0
- package/dist/src/pick/index.js.map +1 -0
- package/dist/src/pick/panel/index.d.ts +64 -0
- package/dist/src/pick/panel/index.d.ts.map +1 -0
- package/dist/src/pick/panel/index.js +61 -0
- package/dist/src/pick/panel/index.js.map +1 -0
- package/dist/src/platform/slice/index.d.ts +291 -0
- package/dist/src/platform/slice/index.d.ts.map +1 -1
- package/dist/src/platform/slice/index.js +16 -0
- package/dist/src/platform/slice/index.js.map +1 -1
- package/dist/src/runtime/collections/deck.d.ts +29 -0
- package/dist/src/runtime/collections/deck.d.ts.map +1 -1
- package/dist/src/runtime/collections/index.d.ts +1 -2
- package/dist/src/runtime/collections/index.d.ts.map +1 -1
- package/dist/src/runtime/collections/index.js +1 -2
- package/dist/src/runtime/collections/index.js.map +1 -1
- package/dist/src/runtime/collections/library.d.ts +1 -1
- package/dist/src/runtime/collections/library.js +1 -1
- package/dist/src/runtime/collections/plan.d.ts +98 -0
- package/dist/src/runtime/collections/plan.d.ts.map +1 -0
- package/dist/src/runtime/collections/plan.js +98 -0
- package/dist/src/runtime/collections/plan.js.map +1 -0
- package/dist/src/runtime/collections/schematic.d.ts +1 -1
- package/dist/src/runtime/collections/schematic.js +1 -1
- package/dist/src/runtime/collections/table.d.ts +9 -1
- package/dist/src/runtime/collections/table.d.ts.map +1 -1
- package/dist/src/runtime/collections/table.js +1 -7
- package/dist/src/runtime/collections/table.js.map +1 -1
- package/dist/src/runtime/layout/dock.d.ts +2 -2
- package/dist/src/runtime/layout/dock.js +2 -2
- package/dist/src/runtime/layout/index.d.ts +0 -1
- package/dist/src/runtime/layout/index.d.ts.map +1 -1
- package/dist/src/runtime/layout/index.js +0 -1
- package/dist/src/runtime/layout/index.js.map +1 -1
- package/dist/src/shared/plot-gutter.d.ts +6 -23
- package/dist/src/shared/plot-gutter.d.ts.map +1 -1
- package/dist/src/shared/plot-gutter.js +6 -19
- package/dist/src/shared/plot-gutter.js.map +1 -1
- package/dist/src/shared/reify.d.ts +47 -4
- package/dist/src/shared/reify.d.ts.map +1 -1
- package/dist/src/shared/reify.js +62 -4
- package/dist/src/shared/reify.js.map +1 -1
- package/dist/src/slice/breakdown/index.d.ts +27 -0
- package/dist/src/slice/breakdown/index.d.ts.map +1 -1
- package/dist/src/slice/breakdown/types.d.ts +27 -0
- package/dist/src/slice/breakdown/types.d.ts.map +1 -1
- package/dist/src/slice/cohort/index.d.ts +54 -0
- package/dist/src/slice/cohort/index.d.ts.map +1 -1
- package/dist/src/slice/cohort/types.d.ts +27 -0
- package/dist/src/slice/cohort/types.d.ts.map +1 -1
- package/dist/src/slice/filter/index.d.ts +27 -0
- package/dist/src/slice/filter/index.d.ts.map +1 -1
- package/dist/src/slice/filter/types.d.ts +27 -0
- package/dist/src/slice/filter/types.d.ts.map +1 -1
- package/dist/src/slice/index.d.ts +405 -0
- package/dist/src/slice/index.d.ts.map +1 -1
- package/dist/src/slice/legend/index.d.ts +27 -0
- package/dist/src/slice/legend/index.d.ts.map +1 -1
- package/dist/src/slice/legend/types.d.ts +27 -0
- package/dist/src/slice/legend/types.d.ts.map +1 -1
- package/dist/src/slice/range/index.d.ts +60 -18
- package/dist/src/slice/range/index.d.ts.map +1 -1
- package/dist/src/slice/range/index.js +9 -1
- package/dist/src/slice/range/index.js.map +1 -1
- package/dist/src/slice/range/types.d.ts +63 -22
- package/dist/src/slice/range/types.d.ts.map +1 -1
- package/dist/src/slice/range/types.js +12 -5
- package/dist/src/slice/range/types.js.map +1 -1
- package/dist/src/slice/search/index.d.ts +27 -0
- package/dist/src/slice/search/index.d.ts.map +1 -1
- package/dist/src/slice/search/types.d.ts +27 -0
- package/dist/src/slice/search/types.d.ts.map +1 -1
- package/dist/src/slice/summary/index.d.ts +27 -0
- package/dist/src/slice/summary/index.d.ts.map +1 -1
- package/dist/src/slice/summary/types.d.ts +27 -0
- package/dist/src/slice/summary/types.d.ts.map +1 -1
- package/dist/src/style/content.d.ts +4 -6
- package/dist/src/style/content.d.ts.map +1 -1
- package/dist/src/style/content.js +4 -6
- package/dist/src/style/content.js.map +1 -1
- package/dist/src/style/scheme.js +1 -1
- package/dist/src/style/scheme.js.map +1 -1
- package/dist/test/collections/index.d.ts +2 -2
- package/dist/test/collections/index.d.ts.map +1 -1
- package/dist/test/collections/index.js +2 -2
- package/dist/test/collections/index.js.map +1 -1
- package/dist/test/collections/paged-source.examples.d.ts +9 -0
- package/dist/test/collections/paged-source.examples.d.ts.map +1 -0
- package/dist/test/collections/paged-source.examples.js +136 -0
- package/dist/test/collections/paged-source.examples.js.map +1 -0
- package/dist/test/collections/plan.examples.d.ts +125 -0
- package/dist/test/collections/plan.examples.d.ts.map +1 -0
- package/dist/test/collections/plan.examples.js +2939 -0
- package/dist/test/collections/plan.examples.js.map +1 -0
- package/dist/test/contracts/pick.examples.d.ts +6 -0
- package/dist/test/contracts/pick.examples.d.ts.map +1 -0
- package/dist/test/contracts/pick.examples.js +89 -0
- package/dist/test/contracts/pick.examples.js.map +1 -0
- package/dist/test/layout/dock.examples.d.ts +4 -4
- package/dist/test/layout/dock.examples.d.ts.map +1 -1
- package/dist/test/layout/dock.examples.js +34 -16
- package/dist/test/layout/dock.examples.js.map +1 -1
- package/dist/test/slice/slice.examples.d.ts +2 -1
- package/dist/test/slice/slice.examples.d.ts.map +1 -1
- package/dist/test/slice/slice.examples.js +67 -9
- package/dist/test/slice/slice.examples.js.map +1 -1
- package/package.json +3 -3
- package/dist/src/collections/gantt/index.d.ts +0 -377
- package/dist/src/collections/gantt/index.d.ts.map +0 -1
- package/dist/src/collections/gantt/index.js +0 -896
- package/dist/src/collections/gantt/index.js.map +0 -1
- package/dist/src/collections/gantt/types.d.ts +0 -353
- package/dist/src/collections/gantt/types.d.ts.map +0 -1
- package/dist/src/collections/gantt/types.js +0 -207
- package/dist/src/collections/gantt/types.js.map +0 -1
- package/dist/src/collections/planner/index.d.ts +0 -624
- package/dist/src/collections/planner/index.d.ts.map +0 -1
- package/dist/src/collections/planner/index.js +0 -941
- package/dist/src/collections/planner/index.js.map +0 -1
- package/dist/src/collections/planner/types.d.ts +0 -615
- package/dist/src/collections/planner/types.d.ts.map +0 -1
- package/dist/src/collections/planner/types.js +0 -423
- package/dist/src/collections/planner/types.js.map +0 -1
- package/dist/src/layout/aligned-stack/index.d.ts +0 -101
- package/dist/src/layout/aligned-stack/index.d.ts.map +0 -1
- package/dist/src/layout/aligned-stack/index.js +0 -105
- package/dist/src/layout/aligned-stack/index.js.map +0 -1
- package/dist/src/layout/aligned-stack/types.d.ts +0 -50
- package/dist/src/layout/aligned-stack/types.d.ts.map +0 -1
- package/dist/src/layout/aligned-stack/types.js +0 -24
- package/dist/src/layout/aligned-stack/types.js.map +0 -1
- package/dist/src/runtime/collections/gantt.d.ts +0 -67
- package/dist/src/runtime/collections/gantt.d.ts.map +0 -1
- package/dist/src/runtime/collections/gantt.js +0 -58
- package/dist/src/runtime/collections/gantt.js.map +0 -1
- package/dist/src/runtime/collections/planner.d.ts +0 -80
- package/dist/src/runtime/collections/planner.d.ts.map +0 -1
- package/dist/src/runtime/collections/planner.js +0 -76
- package/dist/src/runtime/collections/planner.js.map +0 -1
- package/dist/src/runtime/layout/aligned-stack.d.ts +0 -38
- package/dist/src/runtime/layout/aligned-stack.d.ts.map +0 -1
- package/dist/src/runtime/layout/aligned-stack.js +0 -36
- package/dist/src/runtime/layout/aligned-stack.js.map +0 -1
- package/dist/test/collections/gantt.examples.d.ts +0 -33
- package/dist/test/collections/gantt.examples.d.ts.map +0 -1
- package/dist/test/collections/gantt.examples.js +0 -359
- package/dist/test/collections/gantt.examples.js.map +0 -1
- package/dist/test/collections/planner.examples.d.ts +0 -47
- package/dist/test/collections/planner.examples.d.ts.map +0 -1
- package/dist/test/collections/planner.examples.js +0 -546
- package/dist/test/collections/planner.examples.js.map +0 -1
- package/dist/test/layout/aligned-stack.examples.d.ts +0 -25
- package/dist/test/layout/aligned-stack.examples.d.ts.map +0 -1
- package/dist/test/layout/aligned-stack.examples.js +0 -294
- package/dist/test/layout/aligned-stack.examples.js.map +0 -1
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Plan value builders — shorthand resolvers, the instant sugar
|
|
7
|
+
* ({@link resolveInstant} / `Plan.at`), the axis declarations (`Plan.axis`,
|
|
8
|
+
* `.time` / `.number` / `.ordinal`), element value builders (`Plan.run` /
|
|
9
|
+
* `decision` / `port` / `event` / `marker` / `chip` / `mark`) and cell
|
|
10
|
+
* builders (`heatCells` / `weightCells` / `segmentCells` / `tableCells`).
|
|
11
|
+
* Every element is pure data — rich click/hover surfaces resolve through
|
|
12
|
+
* the ROOT's `popover` / `hover` functions over `PlanElementRefType`
|
|
13
|
+
* (`Plan Data Interface.md` §3.3), never per-element embeds.
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
import { East, Expr, ArrayType, BooleanType, DateTimeType, FloatType, IntegerType, OptionType, StringType, StructType, variant, some, none, } from "@elaraai/east";
|
|
18
|
+
import { TickFormatType } from "../../format/types.js";
|
|
19
|
+
import { IconType } from "../../display/icon/types.js";
|
|
20
|
+
import { StatusValueType } from "../../feedback/status/types.js";
|
|
21
|
+
import { ColorSchemeType } from "../../style/scheme.js";
|
|
22
|
+
import { EventStateType } from "../../contracts/states.js";
|
|
23
|
+
import { TimeResolutionType } from "../../contracts/time.js";
|
|
24
|
+
import { MatrixFillType } from "../matrix/types.js";
|
|
25
|
+
import { PlanAxisType, PlanInstantType, PlanPortType, PlanCellMarkerType, PlanStretchType, PlanContentAlignType, PlanContentType, PlanAnimationType, PlanEventMarkKindType, PlanHeatCellType, PlanWeightCellType, PlanSegmentType, PlanSegmentCellType, PlanHeatCellsType, PlanTableCellType, PlanTableToneType, PlanTableSeriesType, PlanLinkType, PlanRunType, PlanDecisionMarkType, PlanBucketEventType, PlanChipType, PlanEventMarkType, PlanLaneType, PlanRowsCollectionType, } from "./types.js";
|
|
26
|
+
// ============================================================================
|
|
27
|
+
// Shorthand resolvers
|
|
28
|
+
// ============================================================================
|
|
29
|
+
/**
|
|
30
|
+
* Resolves the shared event-lifecycle string shorthands into an
|
|
31
|
+
* {@link EventStateType} value: `"estimated"`, `"added"`, `"recommended"`,
|
|
32
|
+
* `"removed"` (the three `proposed` flavours), `"confirmed"`,
|
|
33
|
+
* `"in-progress"`, `"actual"`, `"rejected"`.
|
|
34
|
+
*
|
|
35
|
+
* @param state - An `EventStateType` value/expression or a string shorthand
|
|
36
|
+
* @returns The resolved `EventStateType` value
|
|
37
|
+
*/
|
|
38
|
+
export function resolvePlanEventState(state) {
|
|
39
|
+
if (typeof state !== "string")
|
|
40
|
+
return state;
|
|
41
|
+
switch (state) {
|
|
42
|
+
case "estimated": return East.value(variant("estimated", null), EventStateType);
|
|
43
|
+
case "added": return East.value(variant("proposed", variant("added", null)), EventStateType);
|
|
44
|
+
case "recommended": return East.value(variant("proposed", variant("recommended", null)), EventStateType);
|
|
45
|
+
case "removed": return East.value(variant("proposed", variant("removed", null)), EventStateType);
|
|
46
|
+
case "confirmed": return East.value(variant("confirmed", null), EventStateType);
|
|
47
|
+
case "in-progress": return East.value(variant("in-progress", null), EventStateType);
|
|
48
|
+
case "actual": return East.value(variant("actual", null), EventStateType);
|
|
49
|
+
case "rejected": return East.value(variant("rejected", null), EventStateType);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** Resolve a null-payload variant string shorthand against its East type. */
|
|
53
|
+
export function resolveTag(v, type) {
|
|
54
|
+
const value = typeof v === "string" ? variant(v, null) : v;
|
|
55
|
+
return East.value(value, type);
|
|
56
|
+
}
|
|
57
|
+
/** Resolve a {@link PlanIconInput} into an `IconType` value. */
|
|
58
|
+
export function resolveIcon(icon) {
|
|
59
|
+
if (typeof icon === "string") {
|
|
60
|
+
return East.value({ prefix: "fas", name: icon, label: none, style: none }, IconType);
|
|
61
|
+
}
|
|
62
|
+
if (typeof icon.prefix === "string") {
|
|
63
|
+
return East.value({
|
|
64
|
+
prefix: icon.prefix,
|
|
65
|
+
name: icon.name,
|
|
66
|
+
label: none,
|
|
67
|
+
style: none,
|
|
68
|
+
}, IconType);
|
|
69
|
+
}
|
|
70
|
+
return icon;
|
|
71
|
+
}
|
|
72
|
+
/** An empty flattened-subtree value — the keyed collection with no rows. */
|
|
73
|
+
export function emptyRows() {
|
|
74
|
+
return East.value(new Map(), PlanRowsCollectionType);
|
|
75
|
+
}
|
|
76
|
+
// ============================================================================
|
|
77
|
+
// Instants — the axis-kind sugar
|
|
78
|
+
// ============================================================================
|
|
79
|
+
/**
|
|
80
|
+
* Resolves an instant input into a {@link PlanInstantType} value — the one
|
|
81
|
+
* place the arm is inferred (#631).
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* The input is any {@link PlanInstantLikeType} value or expression. JS values
|
|
85
|
+
* wrap by their type (`Date` ⇒ `time`, `number` / `bigint` ⇒ `number`,
|
|
86
|
+
* `string` ⇒ `ordinal`); East expressions wrap by their STATIC type
|
|
87
|
+
* (`DateTimeType` ⇒ `time`, `FloatType` ⇒ `number`, `IntegerType` ⇒ `number`
|
|
88
|
+
* via `toFloat`, `StringType` ⇒ `ordinal`); a {@link PlanInstantType} value
|
|
89
|
+
* or expression passes through (subtype-checked by `East.value`). Nothing
|
|
90
|
+
* here knows the canvas axis — the arm is the INPUT's; the renderer holds it
|
|
91
|
+
* against the root's declaration.
|
|
92
|
+
*
|
|
93
|
+
* @param v - The instant (a value or expression of a {@link PlanInstantLikeType})
|
|
94
|
+
* @param where - The field being resolved, for the error message
|
|
95
|
+
* @returns The instant as a `PlanInstantType` expression
|
|
96
|
+
* @throws {Error} If `v` is an expression of a non-instant type
|
|
97
|
+
*/
|
|
98
|
+
export function resolveInstant(v, where) {
|
|
99
|
+
if (v instanceof Date)
|
|
100
|
+
return East.value(variant("time", v), PlanInstantType);
|
|
101
|
+
if (typeof v === "number")
|
|
102
|
+
return East.value(variant("number", v), PlanInstantType);
|
|
103
|
+
if (typeof v === "bigint")
|
|
104
|
+
return East.value(variant("number", Number(v)), PlanInstantType);
|
|
105
|
+
if (typeof v === "string")
|
|
106
|
+
return East.value(variant("ordinal", v), PlanInstantType);
|
|
107
|
+
if (v instanceof Expr) {
|
|
108
|
+
const tag = Expr.type(v).type;
|
|
109
|
+
switch (tag) {
|
|
110
|
+
case "DateTime": return East.value(variant("time", v), PlanInstantType);
|
|
111
|
+
case "Float": return East.value(variant("number", v), PlanInstantType);
|
|
112
|
+
case "Integer": return East.value(variant("number", v.toFloat()), PlanInstantType);
|
|
113
|
+
case "String": return East.value(variant("ordinal", v), PlanInstantType);
|
|
114
|
+
case "Variant": return East.value(v, PlanInstantType);
|
|
115
|
+
default:
|
|
116
|
+
throw new Error(`Plan: ${where} must be an instant — a Date / number / string, a DateTime / Float / ` +
|
|
117
|
+
`Integer / String expression, or a Plan.at.* value (got a ${tag} expression)`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// A plain variant VALUE (`variant("time", d)`, a decoded instant).
|
|
121
|
+
return East.value(v, PlanInstantType);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The `Plan.at` builders — one instant per axis kind, explicitly. The
|
|
125
|
+
* element builders already wrap by type; these are for element RECORDS
|
|
126
|
+
* written as data (`{ at: Plan.at.time(week(27n)), … }` in a
|
|
127
|
+
* `Plan.Types.HeatCell` array) and for reading as a declaration. Each
|
|
128
|
+
* result is BRANDED with its arm ({@link PlanInstantExpr}), so a cell
|
|
129
|
+
* list built from them carries the kind to the root's compile-time check.
|
|
130
|
+
*/
|
|
131
|
+
export const at = {
|
|
132
|
+
/**
|
|
133
|
+
* A `time` instant.
|
|
134
|
+
*
|
|
135
|
+
* @param v - The UTC instant (a `Date` or `DateTimeType` expression)
|
|
136
|
+
* @returns A `PlanInstantType` expression with the `time` arm, branded `"time"`
|
|
137
|
+
*/
|
|
138
|
+
time: (v) => East.value(variant("time", v), PlanInstantType),
|
|
139
|
+
/**
|
|
140
|
+
* A `number` instant.
|
|
141
|
+
*
|
|
142
|
+
* @param v - The position (a number or `FloatType` expression)
|
|
143
|
+
* @returns A `PlanInstantType` expression with the `number` arm, branded `"number"`
|
|
144
|
+
*/
|
|
145
|
+
number: (v) => East.value(variant("number", v), PlanInstantType),
|
|
146
|
+
/**
|
|
147
|
+
* An `ordinal` instant.
|
|
148
|
+
*
|
|
149
|
+
* @param v - The declared value (a string or `StringType` expression)
|
|
150
|
+
* @returns A `PlanInstantType` expression with the `ordinal` arm, branded `"ordinal"`
|
|
151
|
+
*/
|
|
152
|
+
ordinal: (v) => East.value(variant("ordinal", v), PlanInstantType),
|
|
153
|
+
};
|
|
154
|
+
// ============================================================================
|
|
155
|
+
// Axis — the three kinds
|
|
156
|
+
// ============================================================================
|
|
157
|
+
/**
|
|
158
|
+
* Builds the `time` axis declaration — `Plan.axis({ … })` / `Plan.axis.time`.
|
|
159
|
+
*
|
|
160
|
+
* @param options - Window, resolution(s), now instant and tick format ({@link PlanAxisOptions})
|
|
161
|
+
* @returns An East expression of {@link PlanAxisType} (the `time` arm), branded `"time"` — the root's canvas kind
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* The window is half-open `[min, max)` in UTC; omit it to follow the bound
|
|
165
|
+
* slice's datetime range (else fit to the data). `resolutions` lists the
|
|
166
|
+
* WEEK/DAY-style segment options (omit ⇒ no segment). When the Plan is
|
|
167
|
+
* slice-bound, slice state supersedes window + resolution after mount — the
|
|
168
|
+
* slice is the single source of truth.
|
|
169
|
+
*/
|
|
170
|
+
export function createTimeAxis(options) {
|
|
171
|
+
return East.value(variant("time", {
|
|
172
|
+
window: options.window !== undefined
|
|
173
|
+
? some({ min: options.window.min, max: options.window.max })
|
|
174
|
+
: none,
|
|
175
|
+
resolution: resolveTag(options.resolution, TimeResolutionType),
|
|
176
|
+
resolutions: (options.resolutions ?? []).map(r => resolveTag(r, TimeResolutionType)),
|
|
177
|
+
now: options.now !== undefined ? some(options.now) : none,
|
|
178
|
+
format: options.format !== undefined ? some(options.format) : none,
|
|
179
|
+
}), PlanAxisType);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Builds the `number` axis declaration — `Plan.axis.number({ … })`.
|
|
183
|
+
*
|
|
184
|
+
* @param options - Window, step, now position and tick format ({@link PlanNumberAxisOptions})
|
|
185
|
+
* @returns An East expression of {@link PlanAxisType} (the `number` arm), branded `"number"` — the root's canvas kind
|
|
186
|
+
* @throws {Error} If a literal `step` is not `> 0`
|
|
187
|
+
*
|
|
188
|
+
* @remarks
|
|
189
|
+
* `[min, max)` ÷ `step` = `n` buckets, edges on whole multiples of `step`
|
|
190
|
+
* (the `TimeResolution` rule, numerically). Omit the window to follow the
|
|
191
|
+
* bound slice's `float` / `integer` range (else fit to the data). Element
|
|
192
|
+
* instants on this canvas are numbers — a `FloatType` / `IntegerType`
|
|
193
|
+
* accessor or a bare number wraps to the `number` arm.
|
|
194
|
+
*/
|
|
195
|
+
export function createNumberAxis(options) {
|
|
196
|
+
if (typeof options.step === "number" && !(options.step > 0)) {
|
|
197
|
+
throw new Error(`Plan.axis.number: \`step\` must be > 0 (got ${options.step}) — it is the bucket width`);
|
|
198
|
+
}
|
|
199
|
+
return East.value(variant("number", {
|
|
200
|
+
window: options.window !== undefined
|
|
201
|
+
? some({ min: options.window.min, max: options.window.max })
|
|
202
|
+
: none,
|
|
203
|
+
step: options.step,
|
|
204
|
+
now: options.now !== undefined ? some(options.now) : none,
|
|
205
|
+
format: options.format !== undefined ? some(options.format) : none,
|
|
206
|
+
}), PlanAxisType);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Builds the `ordinal` axis declaration — `Plan.axis.ordinal({ … })`.
|
|
210
|
+
*
|
|
211
|
+
* @param options - The ordered values and the now value ({@link PlanOrdinalAxisOptions})
|
|
212
|
+
* @returns An East expression of {@link PlanAxisType} (the `ordinal` arm), branded `"ordinal"` — the root's canvas kind
|
|
213
|
+
* @throws {Error} If a literal `values` list is empty
|
|
214
|
+
*
|
|
215
|
+
* @remarks
|
|
216
|
+
* The declared values ARE the buckets, one each, in order; the window is
|
|
217
|
+
* the whole list, so there is no slice range to brush and the window keys
|
|
218
|
+
* idle. Element instants on this canvas are the values — a `StringType`
|
|
219
|
+
* accessor or a bare string wraps to the `ordinal` arm.
|
|
220
|
+
*/
|
|
221
|
+
export function createOrdinalAxis(options) {
|
|
222
|
+
if (Array.isArray(options.values) && options.values.length === 0) {
|
|
223
|
+
throw new Error("Plan.axis.ordinal: `values` must list at least one value — the list is the axis");
|
|
224
|
+
}
|
|
225
|
+
return East.value(variant("ordinal", {
|
|
226
|
+
values: East.value(options.values, ArrayType(StringType)),
|
|
227
|
+
now: options.now !== undefined ? some(options.now) : none,
|
|
228
|
+
}), PlanAxisType);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Builds the shared axis declaration — `Plan.axis({ … })` is the `time`
|
|
232
|
+
* shorthand; `Plan.axis.time` / `.number` / `.ordinal` declare each kind.
|
|
233
|
+
*
|
|
234
|
+
* @param options - The time-axis options ({@link PlanAxisOptions})
|
|
235
|
+
* @returns An East expression of {@link PlanAxisType}, branded with its kind
|
|
236
|
+
*/
|
|
237
|
+
export const createAxis = Object.assign(function axis(options) { return createTimeAxis(options); }, { time: createTimeAxis, number: createNumberAxis, ordinal: createOrdinalAxis });
|
|
238
|
+
/**
|
|
239
|
+
* Builds one span run from a flat input. The result is BRANDED with the axis
|
|
240
|
+
* kind `start` / `end` imply ({@link PlanKindOf}) — a `DateTimeType` accessor
|
|
241
|
+
* makes a `"time"` run, a `FloatType` one a `"number"` run — so the series and
|
|
242
|
+
* root can refuse a mismatched kind at compile time; an erased input (an
|
|
243
|
+
* `Expr<PlanInstantType>`) leaves the run unbranded.
|
|
244
|
+
*
|
|
245
|
+
* @typeParam S - The `start` input's type
|
|
246
|
+
* @typeParam E - The `end` input's type
|
|
247
|
+
* @param input - The run configuration ({@link PlanRunInput})
|
|
248
|
+
* @returns An East expression of {@link PlanRunType}, branded with its kind
|
|
249
|
+
*/
|
|
250
|
+
export function createRun(input) {
|
|
251
|
+
return East.value({
|
|
252
|
+
key: input.key,
|
|
253
|
+
start: resolveInstant(input.start, "run start"),
|
|
254
|
+
end: resolveInstant(input.end, "run end"),
|
|
255
|
+
label: input.label,
|
|
256
|
+
quantity: input.quantity !== undefined ? some(input.quantity) : none,
|
|
257
|
+
qty: input.qty !== undefined ? some(input.qty) : none,
|
|
258
|
+
state: resolvePlanEventState(input.state),
|
|
259
|
+
status: input.status !== undefined ? some(resolveTag(input.status, StatusValueType)) : none,
|
|
260
|
+
moved: input.moved !== undefined ? some(typeof input.moved === "number" ? BigInt(input.moved) : input.moved) : none,
|
|
261
|
+
icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
|
|
262
|
+
}, PlanRunType);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Builds one decision mark from a flat input, branded with `at`'s kind.
|
|
266
|
+
*
|
|
267
|
+
* @typeParam A - The `at` input's type
|
|
268
|
+
* @param input - The decision configuration ({@link PlanDecisionInput})
|
|
269
|
+
* @returns An East expression of {@link PlanDecisionMarkType}, branded with its kind
|
|
270
|
+
*/
|
|
271
|
+
export function createDecision(input) {
|
|
272
|
+
return East.value({
|
|
273
|
+
key: input.key,
|
|
274
|
+
at: resolveInstant(input.at, "decision at"),
|
|
275
|
+
applied: input.applied,
|
|
276
|
+
}, PlanDecisionMarkType);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Builds one port glyph from a flat input, branded with `at`'s kind.
|
|
280
|
+
*
|
|
281
|
+
* @typeParam A - The `at` input's type
|
|
282
|
+
* @param input - The port configuration ({@link PlanPortInput})
|
|
283
|
+
* @returns An East expression of {@link PlanPortType}, branded with its kind
|
|
284
|
+
*/
|
|
285
|
+
export function createPort(input) {
|
|
286
|
+
return East.value({
|
|
287
|
+
at: resolveInstant(input.at, "port at"),
|
|
288
|
+
label: input.label !== undefined ? some(input.label) : none,
|
|
289
|
+
}, PlanPortType);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Builds one bucket event from a flat input, branded with `at`'s kind.
|
|
293
|
+
*
|
|
294
|
+
* @typeParam A - The `at` input's type
|
|
295
|
+
* @param input - The event configuration ({@link PlanBucketEventInput})
|
|
296
|
+
* @returns An East expression of {@link PlanBucketEventType}, branded with its kind
|
|
297
|
+
*/
|
|
298
|
+
export function createBucketEvent(input) {
|
|
299
|
+
const content = input.content !== undefined
|
|
300
|
+
? some(East.value({
|
|
301
|
+
horizontal: input.content.horizontal !== undefined ? some(resolveTag(input.content.horizontal, PlanContentAlignType)) : none,
|
|
302
|
+
vertical: input.content.vertical !== undefined ? some(resolveTag(input.content.vertical, PlanContentAlignType)) : none,
|
|
303
|
+
}, PlanContentType))
|
|
304
|
+
: none;
|
|
305
|
+
return East.value({
|
|
306
|
+
key: input.key,
|
|
307
|
+
at: resolveInstant(input.at, "event at"),
|
|
308
|
+
lane: input.lane !== undefined ? some(input.lane) : none,
|
|
309
|
+
label: input.label !== undefined ? some(input.label) : none,
|
|
310
|
+
icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
|
|
311
|
+
state: resolvePlanEventState(input.state),
|
|
312
|
+
tone: input.tone !== undefined ? some(resolveTag(input.tone, StatusValueType)) : none,
|
|
313
|
+
color: input.color !== undefined ? some(input.color) : none,
|
|
314
|
+
colorPalette: input.colorPalette !== undefined ? some(resolveTag(input.colorPalette, ColorSchemeType)) : none,
|
|
315
|
+
stretch: input.stretch !== undefined ? some(resolveTag(input.stretch, PlanStretchType)) : none,
|
|
316
|
+
content,
|
|
317
|
+
animation: input.animation !== undefined ? some(resolveTag(input.animation, PlanAnimationType)) : none,
|
|
318
|
+
}, PlanBucketEventType);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Builds one bucket-row lane from a flat input.
|
|
322
|
+
*
|
|
323
|
+
* @param input - The lane configuration ({@link PlanLaneInput})
|
|
324
|
+
* @returns An East expression of {@link PlanLaneType}
|
|
325
|
+
*/
|
|
326
|
+
export function createLane(input) {
|
|
327
|
+
return East.value({
|
|
328
|
+
key: input.key,
|
|
329
|
+
label: input.label !== undefined ? some(input.label) : none,
|
|
330
|
+
}, PlanLaneType);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Builds one link edge from a flat input. Links are root DATA
|
|
334
|
+
* (`links={transfers.map(($, t) => Plan.link({ … }))}`): the links-focus
|
|
335
|
+
* control gathers a row's transitive upstream/downstream family over them.
|
|
336
|
+
*
|
|
337
|
+
* @param input - The link configuration ({@link PlanLinkInput})
|
|
338
|
+
* @returns An East expression of {@link PlanLinkType}
|
|
339
|
+
*/
|
|
340
|
+
export function createLink(input) {
|
|
341
|
+
return East.value({
|
|
342
|
+
fromRow: input.from,
|
|
343
|
+
fromRun: input.fromRun,
|
|
344
|
+
toRow: input.to,
|
|
345
|
+
toRun: input.toRun,
|
|
346
|
+
quantity: input.quantity,
|
|
347
|
+
label: input.label,
|
|
348
|
+
}, PlanLinkType);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Builds one cell marker from a flat input, branded with `at`'s kind.
|
|
352
|
+
*
|
|
353
|
+
* @typeParam A - The `at` input's type
|
|
354
|
+
* @param input - The marker configuration ({@link PlanCellMarkerInput})
|
|
355
|
+
* @returns An East expression of {@link PlanCellMarkerType}, branded with its kind
|
|
356
|
+
*/
|
|
357
|
+
export function createCellMarker(input) {
|
|
358
|
+
return East.value({
|
|
359
|
+
at: resolveInstant(input.at, "marker at"),
|
|
360
|
+
lane: input.lane !== undefined ? some(input.lane) : none,
|
|
361
|
+
status: resolveTag(input.status ?? "danger", StatusValueType),
|
|
362
|
+
message: input.message,
|
|
363
|
+
}, PlanCellMarkerType);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Builds one cards chip from a flat input, branded with the kind `from` /
|
|
367
|
+
* `to` imply.
|
|
368
|
+
*
|
|
369
|
+
* @typeParam F - The `from` input's type
|
|
370
|
+
* @typeParam T - The `to` input's type
|
|
371
|
+
* @param input - The chip configuration ({@link PlanChipInput})
|
|
372
|
+
* @returns An East expression of {@link PlanChipType}, branded with its kind
|
|
373
|
+
*/
|
|
374
|
+
export function createChip(input) {
|
|
375
|
+
return East.value({
|
|
376
|
+
key: input.key,
|
|
377
|
+
from: resolveInstant(input.from, "chip from"),
|
|
378
|
+
to: resolveInstant(input.to, "chip to"),
|
|
379
|
+
label: input.label,
|
|
380
|
+
state: resolvePlanEventState(input.state),
|
|
381
|
+
icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
|
|
382
|
+
}, PlanChipType);
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Builds one event mark from a flat input, branded with `at`'s kind.
|
|
386
|
+
*
|
|
387
|
+
* @typeParam A - The `at` input's type
|
|
388
|
+
* @param input - The mark configuration ({@link PlanEventMarkInput})
|
|
389
|
+
* @returns An East expression of {@link PlanEventMarkType}, branded with its kind
|
|
390
|
+
*/
|
|
391
|
+
export function createEventMark(input) {
|
|
392
|
+
return East.value({
|
|
393
|
+
key: input.key,
|
|
394
|
+
at: resolveInstant(input.at, "mark at"),
|
|
395
|
+
kind: typeof input.kind === "string" ? East.value(variant(input.kind, null), PlanEventMarkKindType) : input.kind,
|
|
396
|
+
icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
|
|
397
|
+
label: input.label !== undefined ? some(input.label) : none,
|
|
398
|
+
}, PlanEventMarkType);
|
|
399
|
+
}
|
|
400
|
+
/** The `Plan.markKind` builders — non-null mark kinds. */
|
|
401
|
+
export const markKind = {
|
|
402
|
+
/**
|
|
403
|
+
* A decision diamond mark — ◇ pending / ◆ applied.
|
|
404
|
+
*
|
|
405
|
+
* @param applied - `true` fills the diamond
|
|
406
|
+
* @returns A `PlanEventMarkKindType` expression with the `decision` arm
|
|
407
|
+
*/
|
|
408
|
+
decision: (applied) => East.value(variant("decision", { applied }), PlanEventMarkKindType),
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* Wraps per-bucket heat cells into the `heat` arm of {@link PlanHeatCellsType}.
|
|
412
|
+
* Literal records whose `at` is a `Plan.at.*` value brand the result with
|
|
413
|
+
* that kind ({@link PlanCellsInput}); an East array is kind-erased.
|
|
414
|
+
*
|
|
415
|
+
* @typeParam K - The kind inferred from the literal records' `at`
|
|
416
|
+
* @param cells - The cells (`{ at, value, label }` structs; `value: none` ⇒ the no-data hatch)
|
|
417
|
+
* @param options - Scale + warn threshold ({@link PlanHeatCellsOptions})
|
|
418
|
+
* @returns A `PlanHeatCellsType` expression, branded with the cells' kind
|
|
419
|
+
*/
|
|
420
|
+
export function createHeatCells(cells, options) {
|
|
421
|
+
return East.value(variant("heat", {
|
|
422
|
+
cells: East.value(cells, ArrayType(PlanHeatCellType)),
|
|
423
|
+
min: options?.min !== undefined ? some(options.min) : none,
|
|
424
|
+
max: options?.max !== undefined ? some(options.max) : none,
|
|
425
|
+
warnAt: options?.warnAt !== undefined ? some(options.warnAt) : none,
|
|
426
|
+
}), PlanHeatCellsType);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Wraps per-bucket weight cells into the `weight` arm of
|
|
430
|
+
* {@link PlanHeatCellsType} (booked-vs-free bars; planned ⇒ pale). Literal
|
|
431
|
+
* records with `Plan.at.*` instants brand the result with their kind.
|
|
432
|
+
*
|
|
433
|
+
* @typeParam K - The kind inferred from the literal records' `at`
|
|
434
|
+
* @param cells - The cells (`{ at, fraction, planned }` structs)
|
|
435
|
+
* @returns A `PlanHeatCellsType` expression, branded with the cells' kind
|
|
436
|
+
*/
|
|
437
|
+
export function createWeightCells(cells) {
|
|
438
|
+
return East.value(variant("weight", East.value(cells, ArrayType(PlanWeightCellType))), PlanHeatCellsType);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Wraps per-bucket segment cells into the `segments` arm of
|
|
442
|
+
* {@link PlanHeatCellsType} (committed / pending / slack compositions).
|
|
443
|
+
* Literal records with `Plan.at.*` instants brand the result with their kind.
|
|
444
|
+
*
|
|
445
|
+
* @typeParam K - The kind inferred from the literal records' `at`
|
|
446
|
+
* @param cells - The cells (`{ at, segments }` structs — build segments with `Plan.segment`)
|
|
447
|
+
* @returns A `PlanHeatCellsType` expression, branded with the cells' kind
|
|
448
|
+
*/
|
|
449
|
+
export function createSegmentCells(cells) {
|
|
450
|
+
return East.value(variant("segments", East.value(cells, ArrayType(PlanSegmentCellType))), PlanHeatCellsType);
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Builds one segment from a flat input (the Matrix segment vocabulary).
|
|
454
|
+
*
|
|
455
|
+
* @param input - The segment configuration ({@link PlanSegmentInput})
|
|
456
|
+
* @returns An East expression of {@link PlanSegmentType}
|
|
457
|
+
*/
|
|
458
|
+
export function createSegment(input) {
|
|
459
|
+
return East.value({
|
|
460
|
+
fill: resolveTag(input.fill, MatrixFillType),
|
|
461
|
+
weight: input.weight,
|
|
462
|
+
label: input.label !== undefined ? some(input.label) : none,
|
|
463
|
+
}, PlanSegmentType);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Builds one table-row value series (see {@link Plan.table}'s `series`) —
|
|
467
|
+
* per-position style declared once, raw cells beneath it; the result carries
|
|
468
|
+
* the cells' axis kind.
|
|
469
|
+
*
|
|
470
|
+
* @typeParam K - The cells' axis kind
|
|
471
|
+
* @param input - The series configuration ({@link PlanTableSeriesInput})
|
|
472
|
+
* @returns An East expression of {@link PlanTableSeriesType}, branded with the cells' kind
|
|
473
|
+
*/
|
|
474
|
+
export function createTableSeries(input) {
|
|
475
|
+
return East.value({
|
|
476
|
+
cells: East.value(input.cells, ArrayType(PlanTableCellType)),
|
|
477
|
+
format: input.format !== undefined ? some(East.value(input.format, TickFormatType)) : none,
|
|
478
|
+
tone: input.tone !== undefined ? some(resolveTag(input.tone, PlanTableToneType)) : none,
|
|
479
|
+
strong: input.strong !== undefined ? some(input.strong) : none,
|
|
480
|
+
rollup: input.rollup !== undefined ? some(input.rollup) : none,
|
|
481
|
+
}, PlanTableSeriesType);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Builds per-bucket table cells from raw values. The RENDERER prints each
|
|
485
|
+
* value through the row's `format` (a `Format.*` spec — the shared
|
|
486
|
+
* `TickFormatType`), tones negatives `neg` and renders `none` as the muted
|
|
487
|
+
* em-dash; build `PlanTableCellType` values directly for explicit `text` /
|
|
488
|
+
* `tone` overrides.
|
|
489
|
+
*
|
|
490
|
+
* @remarks
|
|
491
|
+
* The `at` of each raw cell wraps to the axis arm by its type — a
|
|
492
|
+
* `DateTimeType` field to `time`, a numeric field to `number`, a string
|
|
493
|
+
* field to `ordinal`, a {@link PlanInstantType} field as is — so a
|
|
494
|
+
* `{ at: DateTimeType, value }` dataset keeps compiling unchanged.
|
|
495
|
+
*
|
|
496
|
+
* Literal records brand the result with the kind their `at` implies
|
|
497
|
+
* ({@link PlanKindOf}); an East array is kind-erased.
|
|
498
|
+
*
|
|
499
|
+
* @typeParam A - The literal records' `at` type
|
|
500
|
+
* @param cells - The raw cells (`{ at, value }` records; `value` an `Option<Float>`)
|
|
501
|
+
* @returns An `ArrayType(PlanTableCellType)` expression, branded with the cells' kind
|
|
502
|
+
* @throws {Error} If an East array's element `at` is not an instant-typed field
|
|
503
|
+
*/
|
|
504
|
+
export function createTableCells(cells) {
|
|
505
|
+
if (Array.isArray(cells)) {
|
|
506
|
+
// Each element is a literal record or a struct expression; both
|
|
507
|
+
// expose `at` / `value` (a struct expression's field accessors carry
|
|
508
|
+
// the field's static type, which is what `resolveInstant` reads).
|
|
509
|
+
const built = cells.map((c) => {
|
|
510
|
+
const rec = c;
|
|
511
|
+
return East.value({
|
|
512
|
+
at: resolveInstant(rec.at, "tableCells at"),
|
|
513
|
+
value: East.value(rec.value, OptionType(FloatType)),
|
|
514
|
+
text: none,
|
|
515
|
+
tone: none,
|
|
516
|
+
}, PlanTableCellType);
|
|
517
|
+
});
|
|
518
|
+
return East.value(built, ArrayType(PlanTableCellType));
|
|
519
|
+
}
|
|
520
|
+
// An East array — wrap `at` by its STATIC element type, once for the map.
|
|
521
|
+
const raw = cells;
|
|
522
|
+
const elem = Expr.type(raw).value;
|
|
523
|
+
const atTag = (elem.fields.at).type;
|
|
524
|
+
const wrap = (v) => {
|
|
525
|
+
switch (atTag) {
|
|
526
|
+
case "DateTime": return East.value(variant("time", v), PlanInstantType);
|
|
527
|
+
case "Float": return East.value(variant("number", v), PlanInstantType);
|
|
528
|
+
case "Integer": return East.value(variant("number", v.toFloat()), PlanInstantType);
|
|
529
|
+
case "String": return East.value(variant("ordinal", v), PlanInstantType);
|
|
530
|
+
case "Variant": return East.value(v, PlanInstantType);
|
|
531
|
+
default:
|
|
532
|
+
throw new Error("Plan.tableCells: each cell's `at` must be an instant-typed field (DateTime / Float / " +
|
|
533
|
+
`Integer / String / Plan.Types.Instant) — got ${atTag}`);
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
return raw.map((_$, c) => East.value({
|
|
537
|
+
at: wrap(c.at),
|
|
538
|
+
value: c.value,
|
|
539
|
+
text: none,
|
|
540
|
+
tone: none,
|
|
541
|
+
}, PlanTableCellType));
|
|
542
|
+
}
|
|
543
|
+
//# sourceMappingURL=builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.js","sourceRoot":"","sources":["../../../../src/collections/plan/builders.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAiB,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,eAAe,EAA2B,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,eAAe,EAA2B,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,cAAc,EAA0B,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAA0B,cAAc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