@elaraai/east-ui 1.0.80 → 1.0.82
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/dist/src/charts/chart/index.d.ts +4 -0
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/spec/index.d.ts +8 -0
- package/dist/src/charts/spec/index.d.ts.map +1 -1
- package/dist/src/collections/deck/index.d.ts +8 -0
- package/dist/src/collections/deck/index.d.ts.map +1 -1
- package/dist/src/collections/index.d.ts +2 -2
- package/dist/src/collections/index.d.ts.map +1 -1
- package/dist/src/collections/index.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +4 -0
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/types.d.ts +4 -0
- package/dist/src/collections/library/types.d.ts.map +1 -1
- package/dist/src/collections/matrix/index.d.ts +56 -19
- package/dist/src/collections/matrix/index.d.ts.map +1 -1
- package/dist/src/collections/matrix/index.js +38 -24
- package/dist/src/collections/matrix/index.js.map +1 -1
- package/dist/src/collections/plan/assemble.d.ts +655 -2113
- package/dist/src/collections/plan/assemble.d.ts.map +1 -1
- package/dist/src/collections/plan/assemble.js +159 -136
- package/dist/src/collections/plan/assemble.js.map +1 -1
- package/dist/src/collections/plan/builders.d.ts +193 -40
- package/dist/src/collections/plan/builders.d.ts.map +1 -1
- package/dist/src/collections/plan/builders.js +162 -32
- package/dist/src/collections/plan/builders.js.map +1 -1
- package/dist/src/collections/plan/factories.d.ts +290 -116
- package/dist/src/collections/plan/factories.d.ts.map +1 -1
- package/dist/src/collections/plan/factories.js +281 -156
- package/dist/src/collections/plan/factories.js.map +1 -1
- package/dist/src/collections/plan/index.d.ts +111 -58
- package/dist/src/collections/plan/index.d.ts.map +1 -1
- package/dist/src/collections/plan/index.js +62 -31
- package/dist/src/collections/plan/index.js.map +1 -1
- package/dist/src/collections/plan/ir.d.ts +759 -1769
- package/dist/src/collections/plan/ir.d.ts.map +1 -1
- package/dist/src/collections/plan/ir.js +51 -27
- package/dist/src/collections/plan/ir.js.map +1 -1
- package/dist/src/collections/plan/pick.d.ts +89 -71
- package/dist/src/collections/plan/pick.d.ts.map +1 -1
- package/dist/src/collections/plan/pick.js +101 -86
- package/dist/src/collections/plan/pick.js.map +1 -1
- package/dist/src/collections/plan/root.d.ts +164 -77
- package/dist/src/collections/plan/root.d.ts.map +1 -1
- package/dist/src/collections/plan/root.js +350 -42
- package/dist/src/collections/plan/root.js.map +1 -1
- package/dist/src/collections/plan/series.d.ts +12524 -10527
- package/dist/src/collections/plan/series.d.ts.map +1 -1
- package/dist/src/collections/plan/series.js +1596 -298
- package/dist/src/collections/plan/series.js.map +1 -1
- package/dist/src/collections/plan/types.d.ts +6115 -2802
- package/dist/src/collections/plan/types.d.ts.map +1 -1
- package/dist/src/collections/plan/types.js +575 -170
- package/dist/src/collections/plan/types.js.map +1 -1
- package/dist/src/collections/sheet/bridge.d.ts +154 -43
- package/dist/src/collections/sheet/bridge.d.ts.map +1 -1
- package/dist/src/collections/sheet/bridge.js +383 -240
- package/dist/src/collections/sheet/bridge.js.map +1 -1
- package/dist/src/collections/sheet/columns.d.ts +66 -16
- package/dist/src/collections/sheet/columns.d.ts.map +1 -1
- package/dist/src/collections/sheet/columns.js +25 -25
- package/dist/src/collections/sheet/columns.js.map +1 -1
- package/dist/src/collections/sheet/context-bridge.d.ts +48 -0
- package/dist/src/collections/sheet/context-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/context-bridge.js +216 -0
- package/dist/src/collections/sheet/context-bridge.js.map +1 -0
- package/dist/src/collections/sheet/draft-bridge.d.ts +37 -0
- package/dist/src/collections/sheet/draft-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/draft-bridge.js +153 -0
- package/dist/src/collections/sheet/draft-bridge.js.map +1 -0
- package/dist/src/collections/sheet/drafts.d.ts +14 -0
- package/dist/src/collections/sheet/drafts.d.ts.map +1 -0
- package/dist/src/collections/sheet/drafts.js +14 -0
- package/dist/src/collections/sheet/drafts.js.map +1 -0
- package/dist/src/collections/sheet/editing-bridge.d.ts +36 -0
- package/dist/src/collections/sheet/editing-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/editing-bridge.js +196 -0
- package/dist/src/collections/sheet/editing-bridge.js.map +1 -0
- package/dist/src/collections/sheet/editing-types.d.ts +268 -0
- package/dist/src/collections/sheet/editing-types.d.ts.map +1 -0
- package/dist/src/collections/sheet/editing-types.js +34 -0
- package/dist/src/collections/sheet/editing-types.js.map +1 -0
- package/dist/src/collections/sheet/edits.d.ts +37 -0
- package/dist/src/collections/sheet/edits.d.ts.map +1 -0
- package/dist/src/collections/sheet/edits.js +31 -0
- package/dist/src/collections/sheet/edits.js.map +1 -0
- package/dist/src/collections/sheet/group.d.ts +165 -0
- package/dist/src/collections/sheet/group.d.ts.map +1 -0
- package/dist/src/collections/sheet/group.js +52 -0
- package/dist/src/collections/sheet/group.js.map +1 -0
- package/dist/src/collections/sheet/index.d.ts +171 -27
- package/dist/src/collections/sheet/index.d.ts.map +1 -1
- package/dist/src/collections/sheet/index.js +99 -17
- package/dist/src/collections/sheet/index.js.map +1 -1
- package/dist/src/collections/sheet/link.d.ts +22 -16
- package/dist/src/collections/sheet/link.d.ts.map +1 -1
- package/dist/src/collections/sheet/link.js +18 -12
- package/dist/src/collections/sheet/link.js.map +1 -1
- package/dist/src/collections/sheet/registers.d.ts +152 -5
- package/dist/src/collections/sheet/registers.d.ts.map +1 -1
- package/dist/src/collections/sheet/registers.js +154 -5
- package/dist/src/collections/sheet/registers.js.map +1 -1
- package/dist/src/collections/sheet/root.d.ts +175 -26
- package/dist/src/collections/sheet/root.d.ts.map +1 -1
- package/dist/src/collections/sheet/root.js +150 -26
- package/dist/src/collections/sheet/root.js.map +1 -1
- package/dist/src/collections/sheet/seed-bridge.d.ts +14 -0
- package/dist/src/collections/sheet/seed-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/seed-bridge.js +51 -0
- package/dist/src/collections/sheet/seed-bridge.js.map +1 -0
- package/dist/src/collections/sheet/sub-rows.d.ts +249 -0
- package/dist/src/collections/sheet/sub-rows.d.ts.map +1 -0
- package/dist/src/collections/sheet/sub-rows.js +222 -0
- package/dist/src/collections/sheet/sub-rows.js.map +1 -0
- package/dist/src/collections/sheet/transactions.d.ts +76 -0
- package/dist/src/collections/sheet/transactions.d.ts.map +1 -0
- package/dist/src/collections/sheet/transactions.js +40 -0
- package/dist/src/collections/sheet/transactions.js.map +1 -0
- package/dist/src/collections/sheet/types.d.ts +12034 -3651
- package/dist/src/collections/sheet/types.d.ts.map +1 -1
- package/dist/src/collections/sheet/types.js +365 -48
- package/dist/src/collections/sheet/types.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +98 -123
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +97 -111
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/table/types.d.ts +87 -31
- package/dist/src/collections/table/types.d.ts.map +1 -1
- package/dist/src/collections/table/types.js +51 -26
- package/dist/src/collections/table/types.js.map +1 -1
- package/dist/src/collections/value-tree/flatten.d.ts.map +1 -1
- package/dist/src/collections/value-tree/flatten.js +4 -1
- package/dist/src/collections/value-tree/flatten.js.map +1 -1
- package/dist/src/component.d.ts +5075 -4079
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +46 -46
- package/dist/src/component.js.map +1 -1
- package/dist/src/contracts/approval.d.ts +10 -8
- package/dist/src/contracts/approval.d.ts.map +1 -1
- package/dist/src/contracts/approval.js +10 -8
- package/dist/src/contracts/approval.js.map +1 -1
- package/dist/src/contracts/drag.d.ts +11 -9
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +28 -21
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/editing.d.ts +1283 -0
- package/dist/src/contracts/editing.d.ts.map +1 -0
- package/dist/src/contracts/editing.js +711 -0
- package/dist/src/contracts/editing.js.map +1 -0
- 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/pick.d.ts +6 -7
- package/dist/src/contracts/pick.d.ts.map +1 -1
- package/dist/src/contracts/pick.js +6 -7
- package/dist/src/contracts/pick.js.map +1 -1
- package/dist/src/contracts/review.d.ts +3 -1
- package/dist/src/contracts/review.d.ts.map +1 -1
- package/dist/src/contracts/review.js +3 -1
- package/dist/src/contracts/review.js.map +1 -1
- package/dist/src/contracts/source.d.ts +270 -80
- package/dist/src/contracts/source.d.ts.map +1 -1
- package/dist/src/contracts/source.js +357 -58
- package/dist/src/contracts/source.js.map +1 -1
- package/dist/src/display/chip-rail/index.d.ts.map +1 -1
- package/dist/src/display/chip-rail/index.js +10 -10
- package/dist/src/display/chip-rail/index.js.map +1 -1
- package/dist/src/extension.d.ts +2 -1
- package/dist/src/extension.d.ts.map +1 -1
- package/dist/src/extension.js +2 -1
- package/dist/src/extension.js.map +1 -1
- package/dist/src/format/index.d.ts +1 -154
- package/dist/src/format/index.d.ts.map +1 -1
- package/dist/src/format/types.d.ts +35 -23
- package/dist/src/format/types.d.ts.map +1 -1
- package/dist/src/format/types.js +16 -14
- package/dist/src/format/types.js.map +1 -1
- package/dist/src/forms/field/index.js +4 -4
- package/dist/src/forms/field/index.js.map +1 -1
- package/dist/src/forms/file-upload/index.js +16 -16
- package/dist/src/forms/file-upload/index.js.map +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +8 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +11 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/box/index.d.ts.map +1 -1
- package/dist/src/layout/box/index.js +47 -47
- package/dist/src/layout/box/index.js.map +1 -1
- package/dist/src/layout/flex/index.d.ts.map +1 -1
- package/dist/src/layout/flex/index.js +47 -47
- package/dist/src/layout/flex/index.js.map +1 -1
- package/dist/src/layout/grid/index.js +11 -11
- package/dist/src/layout/grid/index.js.map +1 -1
- package/dist/src/layout/scroll-area/index.d.ts.map +1 -1
- package/dist/src/layout/scroll-area/index.js +8 -8
- package/dist/src/layout/scroll-area/index.js.map +1 -1
- package/dist/src/layout/separator/index.d.ts.map +1 -1
- package/dist/src/layout/separator/index.js +6 -6
- package/dist/src/layout/separator/index.js.map +1 -1
- package/dist/src/layout/stack/index.d.ts.map +1 -1
- package/dist/src/layout/stack/index.js +46 -46
- package/dist/src/layout/stack/index.js.map +1 -1
- package/dist/src/layout/sticky/index.d.ts.map +1 -1
- package/dist/src/layout/sticky/index.js +8 -8
- package/dist/src/layout/sticky/index.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +8 -8
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/platform/index.d.ts +1 -1
- package/dist/src/platform/index.d.ts.map +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/platform/index.js.map +1 -1
- package/dist/src/platform/slice/impl.d.ts +62 -51
- package/dist/src/platform/slice/impl.d.ts.map +1 -1
- package/dist/src/platform/slice/impl.js +155 -72
- package/dist/src/platform/slice/impl.js.map +1 -1
- package/dist/src/platform/slice/index.d.ts +3744 -2226
- package/dist/src/platform/slice/index.d.ts.map +1 -1
- package/dist/src/platform/slice/index.js +43 -1
- package/dist/src/platform/slice/index.js.map +1 -1
- package/dist/src/runtime/collections/deck.d.ts +4 -0
- package/dist/src/runtime/collections/deck.d.ts.map +1 -1
- package/dist/src/runtime/collections/matrix.d.ts +10 -9
- package/dist/src/runtime/collections/matrix.d.ts.map +1 -1
- package/dist/src/runtime/collections/matrix.js +11 -6
- package/dist/src/runtime/collections/matrix.js.map +1 -1
- package/dist/src/runtime/collections/plan.d.ts +148 -65
- package/dist/src/runtime/collections/plan.d.ts.map +1 -1
- package/dist/src/runtime/collections/plan.js +155 -67
- package/dist/src/runtime/collections/plan.js.map +1 -1
- package/dist/src/runtime/collections/sheet.d.ts +56 -23
- package/dist/src/runtime/collections/sheet.d.ts.map +1 -1
- package/dist/src/runtime/collections/sheet.js +30 -22
- package/dist/src/runtime/collections/sheet.js.map +1 -1
- package/dist/src/runtime/collections/table.d.ts +18 -11
- package/dist/src/runtime/collections/table.d.ts.map +1 -1
- package/dist/src/runtime/collections/table.js +7 -4
- package/dist/src/runtime/collections/table.js.map +1 -1
- package/dist/src/shared/reify.d.ts +4 -46
- package/dist/src/shared/reify.d.ts.map +1 -1
- package/dist/src/shared/reify.js +4 -61
- package/dist/src/shared/reify.js.map +1 -1
- package/dist/src/shared/tree.d.ts +88 -0
- package/dist/src/shared/tree.d.ts.map +1 -0
- package/dist/src/shared/tree.js +134 -0
- package/dist/src/shared/tree.js.map +1 -0
- package/dist/src/slice/breakdown/index.d.ts +4 -0
- package/dist/src/slice/breakdown/index.d.ts.map +1 -1
- package/dist/src/slice/breakdown/types.d.ts +4 -0
- package/dist/src/slice/breakdown/types.d.ts.map +1 -1
- package/dist/src/slice/cohort/index.d.ts +24 -4
- package/dist/src/slice/cohort/index.d.ts.map +1 -1
- package/dist/src/slice/cohort/index.js +8 -4
- package/dist/src/slice/cohort/index.js.map +1 -1
- package/dist/src/slice/cohort/types.d.ts +11 -0
- package/dist/src/slice/cohort/types.d.ts.map +1 -1
- package/dist/src/slice/cohort/types.js +7 -0
- package/dist/src/slice/cohort/types.js.map +1 -1
- package/dist/src/slice/filter/index.d.ts +4 -0
- package/dist/src/slice/filter/index.d.ts.map +1 -1
- package/dist/src/slice/filter/types.d.ts +4 -0
- package/dist/src/slice/filter/types.d.ts.map +1 -1
- package/dist/src/slice/index.d.ts +736 -0
- package/dist/src/slice/index.d.ts.map +1 -1
- package/dist/src/slice/legend/index.d.ts +4 -0
- package/dist/src/slice/legend/index.d.ts.map +1 -1
- package/dist/src/slice/legend/types.d.ts +4 -0
- package/dist/src/slice/legend/types.d.ts.map +1 -1
- package/dist/src/slice/rail/index.d.ts +8 -4
- package/dist/src/slice/rail/index.d.ts.map +1 -1
- package/dist/src/slice/rail/index.js.map +1 -1
- package/dist/src/slice/range/index.d.ts +4 -0
- package/dist/src/slice/range/index.d.ts.map +1 -1
- package/dist/src/slice/range/types.d.ts +4 -0
- package/dist/src/slice/range/types.d.ts.map +1 -1
- package/dist/src/slice/search/index.d.ts +4 -0
- package/dist/src/slice/search/index.d.ts.map +1 -1
- package/dist/src/slice/search/types.d.ts +4 -0
- package/dist/src/slice/search/types.d.ts.map +1 -1
- package/dist/src/slice/summary/index.d.ts +4 -0
- package/dist/src/slice/summary/index.d.ts.map +1 -1
- package/dist/src/slice/summary/types.d.ts +4 -0
- package/dist/src/slice/summary/types.d.ts.map +1 -1
- package/dist/src/typography/code/index.js +1 -1
- package/dist/src/typography/code/index.js.map +1 -1
- package/dist/src/typography/code-block/index.js +7 -7
- package/dist/src/typography/code-block/index.js.map +1 -1
- package/dist/src/typography/heading/index.js +2 -2
- package/dist/src/typography/heading/index.js.map +1 -1
- package/dist/src/typography/list/index.js +1 -1
- package/dist/src/typography/list/index.js.map +1 -1
- package/dist/src/typography/mark/index.js +1 -1
- package/dist/src/typography/mark/index.js.map +1 -1
- package/dist/src/typography/note/index.js +1 -1
- package/dist/src/typography/note/index.js.map +1 -1
- package/dist/src/typography/numeric/index.d.ts +3 -308
- package/dist/src/typography/numeric/index.d.ts.map +1 -1
- package/dist/src/typography/numeric/index.js +4 -4
- package/dist/src/typography/numeric/index.js.map +1 -1
- package/dist/src/typography/numeric/types.d.ts +1 -154
- package/dist/src/typography/numeric/types.d.ts.map +1 -1
- package/dist/src/typography/text/index.js +1 -1
- package/dist/src/typography/text/index.js.map +1 -1
- package/dist/test/collections/matrix.examples.d.ts +7 -3
- package/dist/test/collections/matrix.examples.d.ts.map +1 -1
- package/dist/test/collections/matrix.examples.js +55 -24
- package/dist/test/collections/matrix.examples.js.map +1 -1
- package/dist/test/collections/paged-source.examples.d.ts +4 -0
- package/dist/test/collections/paged-source.examples.d.ts.map +1 -1
- package/dist/test/collections/paged-source.examples.js +98 -13
- package/dist/test/collections/paged-source.examples.js.map +1 -1
- package/dist/test/collections/plan.examples.d.ts +101 -26
- package/dist/test/collections/plan.examples.d.ts.map +1 -1
- package/dist/test/collections/plan.examples.js +1481 -755
- package/dist/test/collections/plan.examples.js.map +1 -1
- package/dist/test/collections/sheet-link.examples.d.ts +7 -0
- package/dist/test/collections/sheet-link.examples.d.ts.map +1 -0
- package/dist/test/collections/sheet-link.examples.js +41 -0
- package/dist/test/collections/sheet-link.examples.js.map +1 -0
- package/dist/test/collections/sheet-transactions.examples.d.ts +7 -0
- package/dist/test/collections/sheet-transactions.examples.d.ts.map +1 -0
- package/dist/test/collections/sheet-transactions.examples.js +58 -0
- package/dist/test/collections/sheet-transactions.examples.js.map +1 -0
- package/dist/test/collections/sheet.examples.d.ts +52 -5
- package/dist/test/collections/sheet.examples.d.ts.map +1 -1
- package/dist/test/collections/sheet.examples.js +500 -158
- package/dist/test/collections/sheet.examples.js.map +1 -1
- package/dist/test/collections/table.examples.d.ts +31 -3
- package/dist/test/collections/table.examples.d.ts.map +1 -1
- package/dist/test/collections/table.examples.js +188 -28
- package/dist/test/collections/table.examples.js.map +1 -1
- package/dist/test/contracts/editing.examples.d.ts +7 -0
- package/dist/test/contracts/editing.examples.d.ts.map +1 -0
- package/dist/test/contracts/editing.examples.js +58 -0
- package/dist/test/contracts/editing.examples.js.map +1 -0
- package/dist/test/layout/splitter.examples.d.ts.map +1 -1
- package/dist/test/layout/splitter.examples.js +3 -1
- package/dist/test/layout/splitter.examples.js.map +1 -1
- package/dist/test/platform/slice.examples.d.ts.map +1 -1
- package/dist/test/platform/slice.examples.js +1 -0
- package/dist/test/platform/slice.examples.js.map +1 -1
- package/dist/test/slice/slice.examples.d.ts.map +1 -1
- package/dist/test/slice/slice.examples.js +5 -2
- package/dist/test/slice/slice.examples.js.map +1 -1
- package/package.json +4 -3
- package/dist/src/collections/plan/data-forms.d.ts +0 -332
- package/dist/src/collections/plan/data-forms.d.ts.map +0 -1
- package/dist/src/collections/plan/data-forms.js +0 -212
- package/dist/src/collections/plan/data-forms.js.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* `<Plan>` tag — see the export's JSDoc.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { type PlanConfig, type PlanAxisKindLiteral, type PlanNamespace } from "../../collections/plan/index.js";
|
|
9
9
|
import type { UIElement } from "../runtime.js";
|
|
10
10
|
/**
|
|
11
11
|
* `<Plan>` — the axis-aligned composite canvas: one shared axis
|
|
@@ -16,45 +16,160 @@ import type { UIElement } from "../runtime.js";
|
|
|
16
16
|
* numerals), cards rows (Roster chips), event marks and group strips —
|
|
17
17
|
* sliced and reviewed as one surface.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `Plan.
|
|
19
|
+
* A canvas is its `data` — a keyed collection of raw entries, or a paged
|
|
20
|
+
* source of one — and its `series`: one `Plan.series.*` value per row series,
|
|
21
|
+
* whose accessors derive each canvas row from the raw fields (`Plan.pick`
|
|
22
|
+
* makes the list one the user picks from). The list IS the layout — one block
|
|
23
|
+
* per series, top to bottom — and hierarchy comes only from the data's own
|
|
24
|
+
* nesting (#822): a series' `children` walk what an entry holds, to any depth
|
|
25
|
+
* (`Plan.children` steps down to another entry type), and a flat source is
|
|
26
|
+
* grouped in a data step first (`groupToDicts`). `Plan.series.section` titles
|
|
27
|
+
* a block and `Plan.series.views` shows one entry several ways. Every row has
|
|
28
|
+
* a typed id — its series and the path of entry keys to it (`Plan.ref`).
|
|
29
|
+
*
|
|
30
|
+
* Content comes from the value builders (`Plan.run` / `event` / `chip` /
|
|
31
|
+
* `mark` / `marker` / `decision` / `port` / `segment` / the cell builders,
|
|
32
|
+
* instants via `Plan.at.*`), the axis from `Plan.axis` (`time`) /
|
|
33
|
+
* `Plan.axis.number` / `Plan.axis.ordinal` — its window stated, or supplied by
|
|
34
|
+
* a bound slice — and rows no dataset holds from the kind factories
|
|
35
|
+
* (`Plan.span` / `buckets` / `chart` / `heat` / `table` / `cards` / `events` /
|
|
36
|
+
* `group`), placed by a `Plan.series.rows` entry. Props are
|
|
37
|
+
* {@link PlanConfig}; maps to `Plan.Root`.
|
|
26
38
|
*
|
|
27
39
|
* @example
|
|
28
40
|
* ```tsx
|
|
29
41
|
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
30
|
-
* import { East } from "@elaraai/east";
|
|
31
|
-
* import { Plan, UIComponentType } from "@elaraai/east-ui";
|
|
42
|
+
* import { ArrayType, DateTimeType, DictType, East, FloatType, IntegerType, StringType, StructType, VariantType, variant } from "@elaraai/east";
|
|
43
|
+
* import { EventStateType, Format, Plan, UIComponentType } from "@elaraai/east-ui";
|
|
32
44
|
*
|
|
33
|
-
* const canvas = East.function([], UIComponentType,
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
45
|
+
* const canvas = East.function([], UIComponentType, ($) => {
|
|
46
|
+
* // Monday of ISO week n, 2026 — window W27–W38 (half-open), now W31.
|
|
47
|
+
* const week = $.const(East.function([IntegerType], DateTimeType, ($, n) => {
|
|
48
|
+
* const w1 = $.const(new Date("2025-12-29T00:00:00Z"), DateTimeType);
|
|
49
|
+
* return w1.addWeeks(n.subtract(1n));
|
|
50
|
+
* }));
|
|
51
|
+
* // The RAW domain shape — series discriminated by a variant field
|
|
52
|
+
* // (the natural ops-dataset form; the same rows page from a dataset).
|
|
53
|
+
* const JobRow = StructType({
|
|
54
|
+
* batch: StringType, start: DateTimeType, end: DateTimeType,
|
|
55
|
+
* tonnes: FloatType, state: EventStateType,
|
|
56
|
+
* });
|
|
57
|
+
* const ShiftRow = StructType({
|
|
58
|
+
* key: StringType, from: DateTimeType, to: DateTimeType,
|
|
59
|
+
* hours: FloatType, state: EventStateType,
|
|
60
|
+
* });
|
|
61
|
+
* const OpsRow = StructType({
|
|
62
|
+
* line: StringType,
|
|
63
|
+
* kind: VariantType({
|
|
64
|
+
* machine: StructType({ jobs: ArrayType(JobRow) }),
|
|
65
|
+
* crew: StructType({ shifts: ArrayType(ShiftRow) }),
|
|
66
|
+
* }),
|
|
67
|
+
* });
|
|
68
|
+
* const ops = $.const(new Map([
|
|
69
|
+
* ["L1-M03", { line: "Line 1", kind: variant("machine", { jobs: [
|
|
70
|
+
* { batch: "B-214", start: week(28n), end: week(31n), tonnes: 96.0, state: variant("in-progress", null) },
|
|
71
|
+
* { batch: "B-221", start: week(32n), end: week(35n), tonnes: 88.0, state: variant("proposed", variant("recommended", null)) },
|
|
72
|
+
* ] }) }],
|
|
73
|
+
* ["L1-M04", { line: "Line 1", kind: variant("machine", { jobs: [
|
|
74
|
+
* { batch: "B-208", start: week(27n), end: week(30n), tonnes: 112.0, state: variant("actual", null) },
|
|
75
|
+
* ] }) }],
|
|
76
|
+
* ["L2-M11", { line: "Line 2", kind: variant("machine", { jobs: [
|
|
77
|
+
* { batch: "B-241", start: week(29n), end: week(33n), tonnes: 92.0, state: variant("confirmed", null) },
|
|
78
|
+
* ] }) }],
|
|
79
|
+
* ["crewA", { line: "Line 1", kind: variant("crew", { shifts: [
|
|
80
|
+
* { key: "s1", from: week(27n), to: week(29n), hours: 80.0, state: variant("confirmed", null) },
|
|
81
|
+
* { key: "s2", from: week(31n), to: week(33n), hours: 64.0, state: variant("proposed", variant("recommended", null)) },
|
|
82
|
+
* ] }) }],
|
|
83
|
+
* ]), DictType(StringType, OpsRow));
|
|
84
|
+
* // Hierarchy is the DATA's (#822): one `groupToDicts` groups the rows
|
|
85
|
+
* // into the canvas's blocks — each machine under its line, the crews
|
|
86
|
+
* // under one "Crews" block. An entry of the result holds its rows.
|
|
87
|
+
* const blocks = $.let(ops.groupToDicts(
|
|
88
|
+
* ($, r) => r.kind.hasTag("crew").ifElse(() => "Crews", () => r.line),
|
|
89
|
+
* ($, _r, k) => k));
|
|
90
|
+
* const Block = DictType(StringType, OpsRow);
|
|
91
|
+
* // The series — real East values bound in the body, typed by the
|
|
92
|
+
* // constructor. The list IS the layout: one block per series, top to
|
|
93
|
+
* // bottom. The accessors are where raw fields become canvas vocabulary:
|
|
94
|
+
* // labels, quantity displays and chip text all derive CLIENT-SIDE,
|
|
95
|
+
* // inside each series' `derive`.
|
|
96
|
+
* const series = $.const([
|
|
97
|
+
* // One row per line, its machines stepped down into
|
|
98
|
+
* // (`Plan.children`) and their runs rolled up into its bands —
|
|
99
|
+
* // which sum the runs' quantities, unit by unit.
|
|
100
|
+
* Plan.series.span(Block, {
|
|
101
|
+
* key: "lines", title: "Lines",
|
|
102
|
+
* match: (_b, name) => name.equal("Crews").not(),
|
|
103
|
+
* label: (_b, name) => name,
|
|
104
|
+
* runs: _b => [],
|
|
105
|
+
* rollup: "union",
|
|
106
|
+
* children: Plan.children((b) => b, [
|
|
107
|
+
* Plan.series.span(OpsRow, {
|
|
108
|
+
* key: "machines", title: "Machines",
|
|
109
|
+
* match: r => r.kind.hasTag("machine"),
|
|
110
|
+
* label: (_r, k) => k, id: true,
|
|
111
|
+
* runs: r => r.kind.unwrap("machine").jobs.map((_$, j) => Plan.run({
|
|
112
|
+
* key: j.batch, start: j.start, end: j.end,
|
|
113
|
+
* label: East.str`RUN · ${j.batch}`,
|
|
114
|
+
* // A quantity is one value: the bar prints `96 t`,
|
|
115
|
+
* // and the line's band sums the tonnes.
|
|
116
|
+
* quantity: Plan.quantity(j.tonnes, { unit: "t", format: Format.Number({ maximumFractionDigits: 0n }) }),
|
|
117
|
+
* state: j.state,
|
|
118
|
+
* })),
|
|
119
|
+
* }),
|
|
120
|
+
* ]),
|
|
121
|
+
* }),
|
|
122
|
+
* // One strip per matching block — here the one "Crews" block,
|
|
123
|
+
* // wearing its member count.
|
|
124
|
+
* Plan.series.group(Block, {
|
|
125
|
+
* key: "crews", title: "Crews",
|
|
126
|
+
* match: (_b, name) => name.equal("Crews"),
|
|
127
|
+
* label: (_b, name) => name,
|
|
128
|
+
* children: Plan.children((b) => b, [
|
|
129
|
+
* Plan.series.cards(OpsRow, {
|
|
130
|
+
* key: "crew-shifts", title: "Crew shifts",
|
|
131
|
+
* match: r => r.kind.hasTag("crew"),
|
|
132
|
+
* label: (_r, k) => k,
|
|
133
|
+
* chips: r => r.kind.unwrap("crew").shifts.map(($, s) => {
|
|
134
|
+
* const hrs = $.let(East.Float.printFixed(s.hours, 0n), StringType);
|
|
135
|
+
* // `+` marks ADDED hours — a removed proposal keeps the
|
|
136
|
+
* // plain figure (see planCardRows for the full ladder).
|
|
137
|
+
* const label = $.let(s.state.match({
|
|
138
|
+
* proposed: (_$, p) => p.hasTag("removed").ifElse(
|
|
139
|
+
* () => East.str`${hrs}h`,
|
|
140
|
+
* () => East.str`+${hrs}h`),
|
|
141
|
+
* }, _$ => East.str`${hrs}h`), StringType);
|
|
142
|
+
* return Plan.chip({ key: s.key, from: s.from, to: s.to, label, state: s.state });
|
|
143
|
+
* }),
|
|
144
|
+
* }),
|
|
145
|
+
* ]),
|
|
146
|
+
* }),
|
|
147
|
+
* Plan.series.rows(Block, { key: "chrome", title: "Milestones", subtitle: "one-off chrome" },
|
|
148
|
+
* [Plan.events({ key: "ms", label: "MILESTONES", id: true, marks: [
|
|
149
|
+
* Plan.mark({ key: "kick", at: week(28n), kind: "milestone", label: "KICKOFF" }),
|
|
150
|
+
* Plan.mark({ key: "rel", at: week(33n), kind: "milestone", label: "REL 2.4" }),
|
|
151
|
+
* ] })]),
|
|
152
|
+
* ], ArrayType(Plan.Types.Series(Block)));
|
|
153
|
+
* const axis = $.const(Plan.axis({ window: { min: week(27n), max: week(39n) }, resolution: "week", now: week(31n) }));
|
|
154
|
+
* return (
|
|
155
|
+
* <Plan
|
|
156
|
+
* axis={axis}
|
|
157
|
+
* data={blocks}
|
|
158
|
+
* series={series}
|
|
159
|
+
* />
|
|
160
|
+
* );
|
|
161
|
+
* });
|
|
51
162
|
* ```
|
|
52
163
|
*
|
|
53
164
|
* @remarks
|
|
54
|
-
* Carries the
|
|
55
|
-
* `.ordinal`), `Plan.at`,
|
|
56
|
-
* `Plan.
|
|
57
|
-
* `Plan.
|
|
165
|
+
* Carries the factory namespace except `Root` (the tag is the root):
|
|
166
|
+
* `Plan.axis` (+ `.time` / `.number` / `.ordinal`), `Plan.at`,
|
|
167
|
+
* `Plan.series.*`, `Plan.children`, `Plan.ref` / `Plan.sectionRef`,
|
|
168
|
+
* `Plan.pick` / `Plan.pickItems`, the kind factories, the value and cell
|
|
169
|
+
* builders, `Plan.quantity`, `Plan.link`, `Plan.layer` / `Plan.fixed` (chart
|
|
170
|
+
* channels), `Plan.markKind`, `Plan.uiState` (a bound `ui` state's seed), and
|
|
171
|
+
* `Plan.Types.*`. Replaces `Gantt`, `Planner` and
|
|
172
|
+
* `AlignedStack`.
|
|
58
173
|
*
|
|
59
174
|
* The tag is generic in the canvas's axis kind `K`, inferred from `axis`:
|
|
60
175
|
* a series whose instants ride another arm is a compile error at the tag
|
|
@@ -62,37 +177,5 @@ import type { UIElement } from "../runtime.js";
|
|
|
62
177
|
*/
|
|
63
178
|
export declare const Plan: {
|
|
64
179
|
<K extends PlanAxisKindLiteral = PlanAxisKindLiteral>(props: PlanConfig<K>): UIElement;
|
|
65
|
-
|
|
66
|
-
at: typeof PlanFactory.at;
|
|
67
|
-
span: typeof PlanFactory.span;
|
|
68
|
-
buckets: typeof PlanFactory.buckets;
|
|
69
|
-
chart: typeof PlanFactory.chart;
|
|
70
|
-
heat: typeof PlanFactory.heat;
|
|
71
|
-
table: typeof PlanFactory.table;
|
|
72
|
-
cards: typeof PlanFactory.cards;
|
|
73
|
-
events: typeof PlanFactory.events;
|
|
74
|
-
group: typeof PlanFactory.group;
|
|
75
|
-
series: typeof PlanFactory.series;
|
|
76
|
-
run: typeof PlanFactory.run;
|
|
77
|
-
decision: typeof PlanFactory.decision;
|
|
78
|
-
port: typeof PlanFactory.port;
|
|
79
|
-
event: typeof PlanFactory.event;
|
|
80
|
-
lane: typeof PlanFactory.lane;
|
|
81
|
-
marker: typeof PlanFactory.marker;
|
|
82
|
-
chip: typeof PlanFactory.chip;
|
|
83
|
-
mark: typeof PlanFactory.mark;
|
|
84
|
-
link: typeof PlanFactory.link;
|
|
85
|
-
markKind: typeof PlanFactory.markKind;
|
|
86
|
-
heatCells: typeof PlanFactory.heatCells;
|
|
87
|
-
weightCells: typeof PlanFactory.weightCells;
|
|
88
|
-
segmentCells: typeof PlanFactory.segmentCells;
|
|
89
|
-
segment: typeof PlanFactory.segment;
|
|
90
|
-
tableCells: typeof PlanFactory.tableCells;
|
|
91
|
-
tableSeries: typeof PlanFactory.tableSeries;
|
|
92
|
-
layer: typeof PlanFactory.layer;
|
|
93
|
-
fixed: typeof PlanFactory.fixed;
|
|
94
|
-
pick: typeof PlanFactory.pick;
|
|
95
|
-
pickItems: typeof PlanFactory.pickItems;
|
|
96
|
-
Types: typeof PlanFactory.Types;
|
|
97
|
-
};
|
|
180
|
+
} & Omit<PlanNamespace, "Root">;
|
|
98
181
|
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAEH,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAY/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuKG;AACH,eAAO,MAAM,IAAI,EAAE;IACf,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAC1F,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAqC,CAAC"}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* `<Plan>` tag — see the export's JSDoc.
|
|
7
7
|
*/
|
|
8
8
|
import { Plan as PlanFactory, } from "../../collections/plan/index.js";
|
|
9
|
+
/** The tag's call — `Plan.Root`, generic in the axis kind `K` that `axis` fixes. */
|
|
10
|
+
function PlanTag(props) {
|
|
11
|
+
return PlanFactory.Root(props);
|
|
12
|
+
}
|
|
13
|
+
// The tag IS the root, so `Root` is the one factory member it does not carry.
|
|
14
|
+
// Derived, never hand-listed: a member added to `PlanNamespace` rides the tag
|
|
15
|
+
// with no edit here (#814).
|
|
16
|
+
const { Root: _root, ...authoring } = PlanFactory;
|
|
9
17
|
/**
|
|
10
18
|
* `<Plan>` — the axis-aligned composite canvas: one shared axis
|
|
11
19
|
* (`{ time | number | ordinal }` — a window ÷ resolution or step, or an
|
|
@@ -15,84 +23,164 @@ import { Plan as PlanFactory, } from "../../collections/plan/index.js";
|
|
|
15
23
|
* numerals), cards rows (Roster chips), event marks and group strips —
|
|
16
24
|
* sliced and reviewed as one surface.
|
|
17
25
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* `Plan.
|
|
26
|
+
* A canvas is its `data` — a keyed collection of raw entries, or a paged
|
|
27
|
+
* source of one — and its `series`: one `Plan.series.*` value per row series,
|
|
28
|
+
* whose accessors derive each canvas row from the raw fields (`Plan.pick`
|
|
29
|
+
* makes the list one the user picks from). The list IS the layout — one block
|
|
30
|
+
* per series, top to bottom — and hierarchy comes only from the data's own
|
|
31
|
+
* nesting (#822): a series' `children` walk what an entry holds, to any depth
|
|
32
|
+
* (`Plan.children` steps down to another entry type), and a flat source is
|
|
33
|
+
* grouped in a data step first (`groupToDicts`). `Plan.series.section` titles
|
|
34
|
+
* a block and `Plan.series.views` shows one entry several ways. Every row has
|
|
35
|
+
* a typed id — its series and the path of entry keys to it (`Plan.ref`).
|
|
36
|
+
*
|
|
37
|
+
* Content comes from the value builders (`Plan.run` / `event` / `chip` /
|
|
38
|
+
* `mark` / `marker` / `decision` / `port` / `segment` / the cell builders,
|
|
39
|
+
* instants via `Plan.at.*`), the axis from `Plan.axis` (`time`) /
|
|
40
|
+
* `Plan.axis.number` / `Plan.axis.ordinal` — its window stated, or supplied by
|
|
41
|
+
* a bound slice — and rows no dataset holds from the kind factories
|
|
42
|
+
* (`Plan.span` / `buckets` / `chart` / `heat` / `table` / `cards` / `events` /
|
|
43
|
+
* `group`), placed by a `Plan.series.rows` entry. Props are
|
|
44
|
+
* {@link PlanConfig}; maps to `Plan.Root`.
|
|
25
45
|
*
|
|
26
46
|
* @example
|
|
27
47
|
* ```tsx
|
|
28
48
|
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
29
|
-
* import { East } from "@elaraai/east";
|
|
30
|
-
* import { Plan, UIComponentType } from "@elaraai/east-ui";
|
|
49
|
+
* import { ArrayType, DateTimeType, DictType, East, FloatType, IntegerType, StringType, StructType, VariantType, variant } from "@elaraai/east";
|
|
50
|
+
* import { EventStateType, Format, Plan, UIComponentType } from "@elaraai/east-ui";
|
|
31
51
|
*
|
|
32
|
-
* const canvas = East.function([], UIComponentType,
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
52
|
+
* const canvas = East.function([], UIComponentType, ($) => {
|
|
53
|
+
* // Monday of ISO week n, 2026 — window W27–W38 (half-open), now W31.
|
|
54
|
+
* const week = $.const(East.function([IntegerType], DateTimeType, ($, n) => {
|
|
55
|
+
* const w1 = $.const(new Date("2025-12-29T00:00:00Z"), DateTimeType);
|
|
56
|
+
* return w1.addWeeks(n.subtract(1n));
|
|
57
|
+
* }));
|
|
58
|
+
* // The RAW domain shape — series discriminated by a variant field
|
|
59
|
+
* // (the natural ops-dataset form; the same rows page from a dataset).
|
|
60
|
+
* const JobRow = StructType({
|
|
61
|
+
* batch: StringType, start: DateTimeType, end: DateTimeType,
|
|
62
|
+
* tonnes: FloatType, state: EventStateType,
|
|
63
|
+
* });
|
|
64
|
+
* const ShiftRow = StructType({
|
|
65
|
+
* key: StringType, from: DateTimeType, to: DateTimeType,
|
|
66
|
+
* hours: FloatType, state: EventStateType,
|
|
67
|
+
* });
|
|
68
|
+
* const OpsRow = StructType({
|
|
69
|
+
* line: StringType,
|
|
70
|
+
* kind: VariantType({
|
|
71
|
+
* machine: StructType({ jobs: ArrayType(JobRow) }),
|
|
72
|
+
* crew: StructType({ shifts: ArrayType(ShiftRow) }),
|
|
73
|
+
* }),
|
|
74
|
+
* });
|
|
75
|
+
* const ops = $.const(new Map([
|
|
76
|
+
* ["L1-M03", { line: "Line 1", kind: variant("machine", { jobs: [
|
|
77
|
+
* { batch: "B-214", start: week(28n), end: week(31n), tonnes: 96.0, state: variant("in-progress", null) },
|
|
78
|
+
* { batch: "B-221", start: week(32n), end: week(35n), tonnes: 88.0, state: variant("proposed", variant("recommended", null)) },
|
|
79
|
+
* ] }) }],
|
|
80
|
+
* ["L1-M04", { line: "Line 1", kind: variant("machine", { jobs: [
|
|
81
|
+
* { batch: "B-208", start: week(27n), end: week(30n), tonnes: 112.0, state: variant("actual", null) },
|
|
82
|
+
* ] }) }],
|
|
83
|
+
* ["L2-M11", { line: "Line 2", kind: variant("machine", { jobs: [
|
|
84
|
+
* { batch: "B-241", start: week(29n), end: week(33n), tonnes: 92.0, state: variant("confirmed", null) },
|
|
85
|
+
* ] }) }],
|
|
86
|
+
* ["crewA", { line: "Line 1", kind: variant("crew", { shifts: [
|
|
87
|
+
* { key: "s1", from: week(27n), to: week(29n), hours: 80.0, state: variant("confirmed", null) },
|
|
88
|
+
* { key: "s2", from: week(31n), to: week(33n), hours: 64.0, state: variant("proposed", variant("recommended", null)) },
|
|
89
|
+
* ] }) }],
|
|
90
|
+
* ]), DictType(StringType, OpsRow));
|
|
91
|
+
* // Hierarchy is the DATA's (#822): one `groupToDicts` groups the rows
|
|
92
|
+
* // into the canvas's blocks — each machine under its line, the crews
|
|
93
|
+
* // under one "Crews" block. An entry of the result holds its rows.
|
|
94
|
+
* const blocks = $.let(ops.groupToDicts(
|
|
95
|
+
* ($, r) => r.kind.hasTag("crew").ifElse(() => "Crews", () => r.line),
|
|
96
|
+
* ($, _r, k) => k));
|
|
97
|
+
* const Block = DictType(StringType, OpsRow);
|
|
98
|
+
* // The series — real East values bound in the body, typed by the
|
|
99
|
+
* // constructor. The list IS the layout: one block per series, top to
|
|
100
|
+
* // bottom. The accessors are where raw fields become canvas vocabulary:
|
|
101
|
+
* // labels, quantity displays and chip text all derive CLIENT-SIDE,
|
|
102
|
+
* // inside each series' `derive`.
|
|
103
|
+
* const series = $.const([
|
|
104
|
+
* // One row per line, its machines stepped down into
|
|
105
|
+
* // (`Plan.children`) and their runs rolled up into its bands —
|
|
106
|
+
* // which sum the runs' quantities, unit by unit.
|
|
107
|
+
* Plan.series.span(Block, {
|
|
108
|
+
* key: "lines", title: "Lines",
|
|
109
|
+
* match: (_b, name) => name.equal("Crews").not(),
|
|
110
|
+
* label: (_b, name) => name,
|
|
111
|
+
* runs: _b => [],
|
|
112
|
+
* rollup: "union",
|
|
113
|
+
* children: Plan.children((b) => b, [
|
|
114
|
+
* Plan.series.span(OpsRow, {
|
|
115
|
+
* key: "machines", title: "Machines",
|
|
116
|
+
* match: r => r.kind.hasTag("machine"),
|
|
117
|
+
* label: (_r, k) => k, id: true,
|
|
118
|
+
* runs: r => r.kind.unwrap("machine").jobs.map((_$, j) => Plan.run({
|
|
119
|
+
* key: j.batch, start: j.start, end: j.end,
|
|
120
|
+
* label: East.str`RUN · ${j.batch}`,
|
|
121
|
+
* // A quantity is one value: the bar prints `96 t`,
|
|
122
|
+
* // and the line's band sums the tonnes.
|
|
123
|
+
* quantity: Plan.quantity(j.tonnes, { unit: "t", format: Format.Number({ maximumFractionDigits: 0n }) }),
|
|
124
|
+
* state: j.state,
|
|
125
|
+
* })),
|
|
126
|
+
* }),
|
|
127
|
+
* ]),
|
|
128
|
+
* }),
|
|
129
|
+
* // One strip per matching block — here the one "Crews" block,
|
|
130
|
+
* // wearing its member count.
|
|
131
|
+
* Plan.series.group(Block, {
|
|
132
|
+
* key: "crews", title: "Crews",
|
|
133
|
+
* match: (_b, name) => name.equal("Crews"),
|
|
134
|
+
* label: (_b, name) => name,
|
|
135
|
+
* children: Plan.children((b) => b, [
|
|
136
|
+
* Plan.series.cards(OpsRow, {
|
|
137
|
+
* key: "crew-shifts", title: "Crew shifts",
|
|
138
|
+
* match: r => r.kind.hasTag("crew"),
|
|
139
|
+
* label: (_r, k) => k,
|
|
140
|
+
* chips: r => r.kind.unwrap("crew").shifts.map(($, s) => {
|
|
141
|
+
* const hrs = $.let(East.Float.printFixed(s.hours, 0n), StringType);
|
|
142
|
+
* // `+` marks ADDED hours — a removed proposal keeps the
|
|
143
|
+
* // plain figure (see planCardRows for the full ladder).
|
|
144
|
+
* const label = $.let(s.state.match({
|
|
145
|
+
* proposed: (_$, p) => p.hasTag("removed").ifElse(
|
|
146
|
+
* () => East.str`${hrs}h`,
|
|
147
|
+
* () => East.str`+${hrs}h`),
|
|
148
|
+
* }, _$ => East.str`${hrs}h`), StringType);
|
|
149
|
+
* return Plan.chip({ key: s.key, from: s.from, to: s.to, label, state: s.state });
|
|
150
|
+
* }),
|
|
151
|
+
* }),
|
|
152
|
+
* ]),
|
|
153
|
+
* }),
|
|
154
|
+
* Plan.series.rows(Block, { key: "chrome", title: "Milestones", subtitle: "one-off chrome" },
|
|
155
|
+
* [Plan.events({ key: "ms", label: "MILESTONES", id: true, marks: [
|
|
156
|
+
* Plan.mark({ key: "kick", at: week(28n), kind: "milestone", label: "KICKOFF" }),
|
|
157
|
+
* Plan.mark({ key: "rel", at: week(33n), kind: "milestone", label: "REL 2.4" }),
|
|
158
|
+
* ] })]),
|
|
159
|
+
* ], ArrayType(Plan.Types.Series(Block)));
|
|
160
|
+
* const axis = $.const(Plan.axis({ window: { min: week(27n), max: week(39n) }, resolution: "week", now: week(31n) }));
|
|
161
|
+
* return (
|
|
162
|
+
* <Plan
|
|
163
|
+
* axis={axis}
|
|
164
|
+
* data={blocks}
|
|
165
|
+
* series={series}
|
|
166
|
+
* />
|
|
167
|
+
* );
|
|
168
|
+
* });
|
|
50
169
|
* ```
|
|
51
170
|
*
|
|
52
171
|
* @remarks
|
|
53
|
-
* Carries the
|
|
54
|
-
* `.ordinal`), `Plan.at`,
|
|
55
|
-
* `Plan.
|
|
56
|
-
* `Plan.
|
|
172
|
+
* Carries the factory namespace except `Root` (the tag is the root):
|
|
173
|
+
* `Plan.axis` (+ `.time` / `.number` / `.ordinal`), `Plan.at`,
|
|
174
|
+
* `Plan.series.*`, `Plan.children`, `Plan.ref` / `Plan.sectionRef`,
|
|
175
|
+
* `Plan.pick` / `Plan.pickItems`, the kind factories, the value and cell
|
|
176
|
+
* builders, `Plan.quantity`, `Plan.link`, `Plan.layer` / `Plan.fixed` (chart
|
|
177
|
+
* channels), `Plan.markKind`, `Plan.uiState` (a bound `ui` state's seed), and
|
|
178
|
+
* `Plan.Types.*`. Replaces `Gantt`, `Planner` and
|
|
179
|
+
* `AlignedStack`.
|
|
57
180
|
*
|
|
58
181
|
* The tag is generic in the canvas's axis kind `K`, inferred from `axis`:
|
|
59
182
|
* a series whose instants ride another arm is a compile error at the tag
|
|
60
183
|
* (see `PlanConfig`).
|
|
61
184
|
*/
|
|
62
|
-
export const Plan = Object.assign(
|
|
63
|
-
return PlanFactory.Root(props);
|
|
64
|
-
}, {
|
|
65
|
-
axis: PlanFactory.axis,
|
|
66
|
-
at: PlanFactory.at,
|
|
67
|
-
span: PlanFactory.span,
|
|
68
|
-
buckets: PlanFactory.buckets,
|
|
69
|
-
chart: PlanFactory.chart,
|
|
70
|
-
heat: PlanFactory.heat,
|
|
71
|
-
table: PlanFactory.table,
|
|
72
|
-
cards: PlanFactory.cards,
|
|
73
|
-
events: PlanFactory.events,
|
|
74
|
-
group: PlanFactory.group,
|
|
75
|
-
series: PlanFactory.series,
|
|
76
|
-
run: PlanFactory.run,
|
|
77
|
-
decision: PlanFactory.decision,
|
|
78
|
-
port: PlanFactory.port,
|
|
79
|
-
event: PlanFactory.event,
|
|
80
|
-
lane: PlanFactory.lane,
|
|
81
|
-
marker: PlanFactory.marker,
|
|
82
|
-
chip: PlanFactory.chip,
|
|
83
|
-
mark: PlanFactory.mark,
|
|
84
|
-
link: PlanFactory.link,
|
|
85
|
-
markKind: PlanFactory.markKind,
|
|
86
|
-
heatCells: PlanFactory.heatCells,
|
|
87
|
-
weightCells: PlanFactory.weightCells,
|
|
88
|
-
segmentCells: PlanFactory.segmentCells,
|
|
89
|
-
segment: PlanFactory.segment,
|
|
90
|
-
tableCells: PlanFactory.tableCells,
|
|
91
|
-
tableSeries: PlanFactory.tableSeries,
|
|
92
|
-
layer: PlanFactory.layer,
|
|
93
|
-
fixed: PlanFactory.fixed,
|
|
94
|
-
pick: PlanFactory.pick,
|
|
95
|
-
pickItems: PlanFactory.pickItems,
|
|
96
|
-
Types: PlanFactory.Types,
|
|
97
|
-
});
|
|
185
|
+
export const Plan = Object.assign(PlanTag, authoring);
|
|
98
186
|
//# sourceMappingURL=plan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EACH,IAAI,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EACH,IAAI,IAAI,WAAW,GAItB,MAAM,iCAAiC,CAAC;AAGzC,oFAAoF;AACpF,SAAS,OAAO,CAAsD,KAAoB;IACtF,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,8EAA8E;AAC9E,8EAA8E;AAC9E,4BAA4B;AAC5B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,GAAG,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuKG;AACH,MAAM,CAAC,MAAM,IAAI,GAEiB,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -7,9 +7,38 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { SubtypeExprOrValue, ArrayType, DictType, StringType, StructType } from "@elaraai/east";
|
|
9
9
|
import type { PagedSource } from "../../contracts/source.js";
|
|
10
|
-
import {
|
|
10
|
+
import { type SheetColumnSpec, type SheetOptions, type SheetGroupedOptions, type SheetEntriesOptions, type SheetEntryOf, type SheetBindHandle, type SheetLinesField, type SheetLineOf, type SheetNamespace } from "../../collections/sheet/index.js";
|
|
11
11
|
import type { DataRowType } from "../../collections/table/index.js";
|
|
12
12
|
import type { UIElement } from "../runtime.js";
|
|
13
|
+
/**
|
|
14
|
+
* `<Sheet data={entries} id="id" group={Sheet.group(P, "lines", …)} columns={{ … }} />`
|
|
15
|
+
* — GROUPED rows with LOOSE rows between the groups (#846): `data` holds
|
|
16
|
+
* `Sheet.Types.Entry(P, "lines")` entries, each a group or a row of the
|
|
17
|
+
* line type; `columns` are declared over the line type.
|
|
18
|
+
*/
|
|
19
|
+
declare function SheetTag<P extends StructType, F extends SheetLinesField<P>>(props: {
|
|
20
|
+
data: NoInfer<SubtypeExprOrValue<ArrayType<SheetEntryOf<P, F>>> | SheetBindHandle<SheetEntryOf<P, F>> | PagedSource<ArrayType<SheetEntryOf<P, F>>> | PagedSource<DictType<StringType, SheetEntryOf<P, F>>>>;
|
|
21
|
+
columns: SheetColumnSpec<SheetLineOf<P, F>>;
|
|
22
|
+
} & SheetEntriesOptions<P, F>): UIElement;
|
|
23
|
+
/**
|
|
24
|
+
* `<Sheet data={plans} id="id" group={Sheet.group(P, "lines", …)} columns={{ … }} />`
|
|
25
|
+
* — GROUPED rows (#740): the rows are groups, `columns` are declared over
|
|
26
|
+
* the line type the group's lines field holds.
|
|
27
|
+
*/
|
|
28
|
+
declare function SheetTag<T extends SubtypeExprOrValue<ArrayType<StructType>>, F extends SheetLinesField<DataRowType<T>>>(props: {
|
|
29
|
+
data: T;
|
|
30
|
+
columns: SheetColumnSpec<SheetLineOf<DataRowType<T>, F>>;
|
|
31
|
+
} & SheetGroupedOptions<DataRowType<T>, F>): UIElement;
|
|
32
|
+
/** GROUPED rows over a whole-value bind handle of groups. */
|
|
33
|
+
declare function SheetTag<P extends StructType, F extends SheetLinesField<P>>(props: {
|
|
34
|
+
data: SheetBindHandle<P>;
|
|
35
|
+
columns: SheetColumnSpec<SheetLineOf<P, F>>;
|
|
36
|
+
} & SheetGroupedOptions<P, F>): UIElement;
|
|
37
|
+
/** GROUPED rows over a paged source of groups. */
|
|
38
|
+
declare function SheetTag<P extends StructType, F extends SheetLinesField<P>>(props: {
|
|
39
|
+
data: PagedSource<ArrayType<P>> | PagedSource<DictType<StringType, P>>;
|
|
40
|
+
columns: SheetColumnSpec<SheetLineOf<P, F>>;
|
|
41
|
+
} & SheetGroupedOptions<P, F>): UIElement;
|
|
13
42
|
/**
|
|
14
43
|
* `<Sheet data={rows} id="id" columns={{ … }} />` — the planning spreadsheet.
|
|
15
44
|
* Maps to `Sheet.Root`. `columns` is typed as `SheetColumnSpec<R>` (a mapped
|
|
@@ -45,24 +74,30 @@ declare function SheetTag<R extends StructType>(props: {
|
|
|
45
74
|
* @example
|
|
46
75
|
* ```tsx
|
|
47
76
|
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
48
|
-
* import {
|
|
77
|
+
* import { ArrayType, DateTimeType, East, FloatType, OptionType, StringType, StructType, none } from "@elaraai/east";
|
|
49
78
|
* import { Reactive, Sheet, State, UIComponentType } from "@elaraai/east-ui";
|
|
50
79
|
*
|
|
51
|
-
* const
|
|
52
|
-
*
|
|
53
|
-
* const jobs = East.function([], UIComponentType, (_$) => (
|
|
80
|
+
* const sheet = East.function([], UIComponentType, (_$) => (
|
|
54
81
|
* <Reactive>{$ => {
|
|
55
|
-
* const
|
|
82
|
+
* const JobType = StructType({
|
|
83
|
+
* id: StringType,
|
|
84
|
+
* start: OptionType(DateTimeType), // none = blank cell
|
|
85
|
+
* task: StringType, // "" = blank cell
|
|
86
|
+
* qty: OptionType(FloatType),
|
|
87
|
+
* });
|
|
88
|
+
* const jobs = $.let(State.bind([ArrayType(JobType)], "sheet_basic_jobs", [
|
|
89
|
+
* { id: "j1", start: none, task: "Machining", qty: none },
|
|
90
|
+
* ]));
|
|
56
91
|
* return (
|
|
57
92
|
* <Sheet
|
|
58
|
-
* data={
|
|
93
|
+
* data={jobs}
|
|
59
94
|
* id="id"
|
|
60
95
|
* columns={{
|
|
61
|
-
* start: Sheet.column.date(JobType, { header: "Start", sub: "
|
|
96
|
+
* start: Sheet.column.date(JobType, { header: "Start", sub: "dd / mm / yyyy" }),
|
|
62
97
|
* task: Sheet.column.text(JobType, { header: "Task" }),
|
|
63
|
-
* qty: Sheet.column.quantity(JobType, { header: "Qty" }),
|
|
98
|
+
* qty: Sheet.column.quantity(JobType, { header: "Qty" }), // no driver on this sheet — the two-argument form
|
|
64
99
|
* }}
|
|
65
|
-
* onUpdate={
|
|
100
|
+
* onUpdate={jobs.write}
|
|
66
101
|
* />
|
|
67
102
|
* );
|
|
68
103
|
* }}</Reactive>
|
|
@@ -70,20 +105,18 @@ declare function SheetTag<R extends StructType>(props: {
|
|
|
70
105
|
* ```
|
|
71
106
|
*
|
|
72
107
|
* @remarks
|
|
73
|
-
* Carries the
|
|
74
|
-
* `Sheet.register.members` / `.concat`,
|
|
75
|
-
* `.check` / `.parse` / `.print`,
|
|
76
|
-
*
|
|
77
|
-
* `
|
|
108
|
+
* Carries the factory namespace except `Root` (the tag is the root):
|
|
109
|
+
* `Sheet.column.*` (the builders), `Sheet.register.members` / `.concat`,
|
|
110
|
+
* `Sheet.driver`, `Sheet.link.arity` / `.check` / `.parse` / `.print`,
|
|
111
|
+
* `Sheet.patch`, `Sheet.apply` (a checked batch applied to a collection),
|
|
112
|
+
* `Sheet.group` / `Sheet.group.cell.*` (grouped rows, #740 — with loose rows
|
|
113
|
+
* between the groups over `Sheet.Types.Entry` entries, #846), `Sheet.subRows`
|
|
114
|
+
* / `Sheet.subRow` (sub rows, #844), and `Sheet.Types.*` (the closed wire
|
|
115
|
+
* types plus the typed constructors, among them `DraftContext(R, D)` /
|
|
116
|
+
* `Fill(T)` / `Patch(R)` / `Proposal(R)` / `CheckContext(R)` / `Draft(R)` /
|
|
117
|
+
* `PatchEvent(E)` / `ChangeSet(E)` / `Entry(G, "rows")`). Desugars to
|
|
78
118
|
* `Sheet.Root(data, columns, options)`.
|
|
79
119
|
*/
|
|
80
|
-
export declare const Sheet: typeof SheetTag &
|
|
81
|
-
column: typeof SheetFactory.column;
|
|
82
|
-
register: typeof SheetFactory.register;
|
|
83
|
-
driver: typeof SheetFactory.driver;
|
|
84
|
-
link: typeof SheetFactory.link;
|
|
85
|
-
patch: typeof SheetFactory.patch;
|
|
86
|
-
Types: typeof SheetFactory.Types;
|
|
87
|
-
};
|
|
120
|
+
export declare const Sheet: typeof SheetTag & Omit<SheetNamespace, "Root">;
|
|
88
121
|
export {};
|
|
89
122
|
//# sourceMappingURL=sheet.d.ts.map
|