@elaraai/e3-ui 1.0.103 → 1.0.105
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/allocation/functions.d.ts +2 -1
- package/dist/src/allocation/functions.d.ts.map +1 -1
- package/dist/src/allocation/functions.js +3 -2
- package/dist/src/allocation/functions.js.map +1 -1
- package/dist/src/allocation/index.d.ts +120 -1
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +24 -4
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +25 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +58 -7
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +12 -14
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +11 -11
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/func.d.ts +7 -2
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +10 -3
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/calendar/index.d.ts +148 -1
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +55 -5
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +32 -14
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +21 -6
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/details.d.ts +469 -0
- package/dist/src/flowchart/details.d.ts.map +1 -0
- package/dist/src/flowchart/details.js +1035 -0
- package/dist/src/flowchart/details.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +16 -72
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js +10 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +282 -251
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +234 -220
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/kinds.d.ts +438 -0
- package/dist/src/flowchart/kinds.d.ts.map +1 -0
- package/dist/src/flowchart/kinds.js +799 -0
- package/dist/src/flowchart/kinds.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +154 -739
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +191 -673
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +3652 -7843
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +331 -469
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/templates.d.ts +657 -0
- package/dist/src/flowchart/templates.d.ts.map +1 -0
- package/dist/src/flowchart/templates.js +658 -0
- package/dist/src/flowchart/templates.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +2258 -214
- package/dist/src/flowchart/types.d.ts.map +1 -1
- package/dist/src/flowchart/types.js +374 -124
- package/dist/src/flowchart/types.js.map +1 -1
- package/dist/src/index.d.ts +13 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -29
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -19
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ontology/index.d.ts +44 -15
- package/dist/src/ontology/index.d.ts.map +1 -1
- package/dist/src/ontology/index.js +19 -11
- package/dist/src/ontology/index.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +2 -1
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -4
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/plan.d.ts +145 -1
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +67 -3
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/types.d.ts +1 -0
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/query/builder.d.ts +362 -315
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +12 -1
- package/dist/src/query/builder.js.map +1 -1
- package/dist/src/query/index.d.ts +5 -1
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +3 -1
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/roster/fit.d.ts +5 -2
- package/dist/src/roster/fit.d.ts.map +1 -1
- package/dist/src/roster/fit.js +5 -3
- package/dist/src/roster/fit.js.map +1 -1
- package/dist/src/roster/index.d.ts +103 -2
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +45 -6
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/runtime/index.d.ts +1 -3
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -3
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +1 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schematic/index.d.ts +1 -1
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +1 -1
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -24
- package/dist/src/schematic/kinds.d.ts.map +1 -1
- package/dist/src/schematic/kinds.js +8 -212
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/payload.d.ts +140 -1
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +38 -1
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/types.d.ts.map +1 -1
- package/dist/src/schematic/types.js +4 -36
- package/dist/src/schematic/types.js.map +1 -1
- package/dist/src/schematic/window.d.ts +9 -42
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +10 -115
- package/dist/src/schematic/window.js.map +1 -1
- package/dist/src/sheet/actions.d.ts +388 -0
- package/dist/src/sheet/actions.d.ts.map +1 -0
- package/dist/src/sheet/actions.js +594 -0
- package/dist/src/sheet/actions.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +12 -1
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +30 -6
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/columns.d.ts +5 -2
- package/dist/src/sheet/columns.d.ts.map +1 -1
- package/dist/src/sheet/columns.js.map +1 -1
- package/dist/src/sheet/draft-bridge.d.ts +9 -4
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
- package/dist/src/sheet/draft-bridge.js +22 -7
- package/dist/src/sheet/draft-bridge.js.map +1 -1
- package/dist/src/sheet/fields.d.ts +13 -0
- package/dist/src/sheet/fields.d.ts.map +1 -1
- package/dist/src/sheet/fields.js +3 -0
- package/dist/src/sheet/fields.js.map +1 -1
- package/dist/src/sheet/index.d.ts +32 -2
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +18 -3
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +8 -0
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/root.d.ts +23 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +40 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +7843 -4132
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +41 -2
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +4 -0
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/types.d.ts +12449 -5268
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +114 -2
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/utils/derive.d.ts +1 -1
- package/dist/src/utils/derive.js +1 -1
- package/dist/src/utils/record-kind.d.ts +625 -0
- package/dist/src/utils/record-kind.d.ts.map +1 -0
- package/dist/src/utils/record-kind.js +450 -0
- package/dist/src/utils/record-kind.js.map +1 -0
- package/dist/src/utils/views.d.ts +55 -0
- package/dist/src/utils/views.d.ts.map +1 -0
- package/dist/src/utils/views.js +72 -0
- package/dist/src/utils/views.js.map +1 -0
- package/dist/src/utils/vocabulary.d.ts +48 -0
- package/dist/src/utils/vocabulary.d.ts.map +1 -0
- package/dist/src/utils/vocabulary.js +47 -0
- package/dist/src/utils/vocabulary.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +2 -0
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +81 -2
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/bind/func/func.examples.d.ts +19 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +36 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +2 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +80 -2
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts +1 -0
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +12 -0
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +5 -4
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +861 -512
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/ontology/ontology.examples.d.ts +2 -3
- package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
- package/dist/test/ontology/ontology.examples.js +32 -21
- package/dist/test/ontology/ontology.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +44 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +2 -2
- package/dist/test/plan/plan-nested.examples.js +5 -5
- package/dist/test/plan/plan-nested.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +1 -1
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +2 -0
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +37 -1
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +76 -15
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +6 -4
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +144 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
- package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-actions.examples.js +394 -0
- package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +1 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +77 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +18 -8
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -12
- package/dist/src/diff/index.d.ts +0 -407
- package/dist/src/diff/index.d.ts.map +0 -1
- package/dist/src/diff/index.js +0 -203
- package/dist/src/diff/index.js.map +0 -1
- package/dist/src/experiment/index.d.ts +0 -1033
- package/dist/src/experiment/index.d.ts.map +0 -1
- package/dist/src/experiment/index.js +0 -197
- package/dist/src/experiment/index.js.map +0 -1
- package/dist/src/experiment/types.d.ts +0 -1093
- package/dist/src/experiment/types.d.ts.map +0 -1
- package/dist/src/experiment/types.js +0 -423
- package/dist/src/experiment/types.js.map +0 -1
- package/dist/src/flowchart/over.d.ts +0 -227
- package/dist/src/flowchart/over.d.ts.map +0 -1
- package/dist/src/flowchart/over.js +0 -213
- package/dist/src/flowchart/over.js.map +0 -1
- package/dist/src/flowchart/patch.d.ts +0 -64
- package/dist/src/flowchart/patch.d.ts.map +0 -1
- package/dist/src/flowchart/patch.js +0 -67
- package/dist/src/flowchart/patch.js.map +0 -1
- package/dist/src/flowchart/values.d.ts +0 -271
- package/dist/src/flowchart/values.d.ts.map +0 -1
- package/dist/src/flowchart/values.js +0 -220
- package/dist/src/flowchart/values.js.map +0 -1
- package/dist/src/flowchart/window.d.ts +0 -306
- package/dist/src/flowchart/window.d.ts.map +0 -1
- package/dist/src/flowchart/window.js +0 -63
- package/dist/src/flowchart/window.js.map +0 -1
- package/dist/src/runtime/diff.d.ts +0 -36
- package/dist/src/runtime/diff.d.ts.map +0 -1
- package/dist/src/runtime/diff.js +0 -34
- package/dist/src/runtime/diff.js.map +0 -1
- package/dist/src/runtime/experiment.d.ts +0 -48
- package/dist/src/runtime/experiment.d.ts.map +0 -1
- package/dist/src/runtime/experiment.js +0 -10
- package/dist/src/runtime/experiment.js.map +0 -1
- package/dist/test/diff/diff.examples.d.ts +0 -313
- package/dist/test/diff/diff.examples.d.ts.map +0 -1
- package/dist/test/diff/diff.examples.js +0 -452
- package/dist/test/diff/diff.examples.js.map +0 -1
- package/dist/test/experiment/experiment.examples.d.ts +0 -1512
- package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
- package/dist/test/experiment/experiment.examples.js +0 -609
- package/dist/test/experiment/experiment.examples.js.map +0 -1
|
@@ -3,827 +3,242 @@
|
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* `Flowchart.library`
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* index, printed, in its place. A card crosses the closed payload as the
|
|
29
|
-
* fields its drop sets, typed by the row it lands on — a flow's rows are the
|
|
30
|
-
* flowchart's own types. Dropped on the canvas (#1249), a state template adds
|
|
31
|
-
* a state where it lands on a lane, a transition template retypes the
|
|
32
|
-
* transition it lands on, and an author's card sets its fields on what its
|
|
33
|
-
* drop's type names; ⏎ on a card drops it on the canvas's selection.
|
|
34
|
-
*
|
|
35
|
-
* Templates are records (#1340, ruling 9): the state and the transition
|
|
36
|
-
* templates are each a record of their own, read whole
|
|
37
|
-
* (`Data.bind(record).read()`, a `Dict<String, T>`), each card keyed by its
|
|
38
|
-
* record's key, and each list names its `source` of the flowchart's one
|
|
39
|
-
* `Slice.bindRecords`, which narrows its cards by those keys as it narrows
|
|
40
|
-
* anything of that record's — a list written in the code names none, and is
|
|
41
|
-
* refused, naming the change (#1346). An author's tab reads an `Array<T>` or
|
|
42
|
-
* a `Dict<String, T>`, each card keyed by its `key`, a key that repeats
|
|
43
|
-
* keeping its first card; naming a `source` it follows that source by its
|
|
44
|
-
* cards' keys, and naming none it lists its rows whole.
|
|
6
|
+
* `Flowchart.library` (#1501, `Flowchart Records Spec.md` R14, D5, D8): the
|
|
7
|
+
* library pane's tabs, which `library` lists in order, and their wire, which
|
|
8
|
+
* the renderer draws. A kind's cards are on the kind, as the Schematic's are —
|
|
9
|
+
* `Flowchart.templates(rows, { name, group?, values, source })`, rows of a
|
|
10
|
+
* record of the app's — and its tab lists them, following their source of the
|
|
11
|
+
* slice:
|
|
12
|
+
*
|
|
13
|
+
* - `Flowchart.library.states()` — the Steps tab, the states' cards: one
|
|
14
|
+
* dropped on a lane adds a state there from its values, keyed `state-<n>`,
|
|
15
|
+
* its order between the cards it lands between.
|
|
16
|
+
* - `Flowchart.library.transitions()` — the Transitions tab, the transitions'
|
|
17
|
+
* cards: one dropped on a transition gives it its values, its ends kept.
|
|
18
|
+
* - `Flowchart.library.lanes()` — the Lanes tab, the lanes' cards: one dropped
|
|
19
|
+
* between two lanes, or at the band row's tail, adds a lane there from its
|
|
20
|
+
* values, keyed `lane-<n>`, its order between theirs.
|
|
21
|
+
* - `Flowchart.library.tab(rows, { … })` — the app's own cards: its `drop` a
|
|
22
|
+
* `Flowchart.patch(R, { … })` over one kind's row type, which names the kind
|
|
23
|
+
* its cards land on — a state's, a transition's, a lane's or a decision's —
|
|
24
|
+
* through the shared `buildScheduleTab`, as the Schematic's tabs are.
|
|
25
|
+
*
|
|
26
|
+
* There is no Flows tab: the Flowchart draws one flowchart. Left out, or
|
|
27
|
+
* empty, the Flowchart has no library pane.
|
|
45
28
|
*
|
|
46
29
|
* @packageDocumentation
|
|
47
30
|
*/
|
|
48
|
-
import { ArrayType,
|
|
49
|
-
import { type
|
|
50
|
-
import {
|
|
51
|
-
|
|
52
|
-
* A card a library tab lists that drops nothing: an author's card read, never
|
|
53
|
-
* dragged.
|
|
54
|
-
*
|
|
55
|
-
* @property key - Its identity in its tab
|
|
56
|
-
* @property label - Its title
|
|
57
|
-
* @property meta - A line under its title
|
|
58
|
-
* @property group - The group its tab lists it under
|
|
59
|
-
*/
|
|
60
|
-
export declare const FlowchartCardType: StructType<{
|
|
61
|
-
readonly key: StringType;
|
|
62
|
-
readonly label: StringType;
|
|
63
|
-
readonly meta: OptionType<StringType>;
|
|
64
|
-
readonly group: OptionType<StringType>;
|
|
65
|
-
}>;
|
|
66
|
-
/** Type representing {@link FlowchartCardType}. */
|
|
67
|
-
export type FlowchartCardType = typeof FlowchartCardType;
|
|
31
|
+
import { ArrayType, OptionType, StringType, StructType, VariantType, type DictType, type EastType, type ExprType, type SubtypeExprOrValue } from "@elaraai/east";
|
|
32
|
+
import { type ScheduleLibraryTabConfig } from "../schedule/library.js";
|
|
33
|
+
import type { FlowchartKindSort } from "./kinds.js";
|
|
34
|
+
export { ScheduleLibraryCardType as FlowchartLibraryCardType } from "../schedule/library.js";
|
|
68
35
|
/**
|
|
69
|
-
* A
|
|
70
|
-
*
|
|
71
|
-
* its
|
|
36
|
+
* A kind's tab on the wire: its name and icon, the author's when given; left
|
|
37
|
+
* out, the renderer names it in its words (`Steps`, `Transitions`, `Lanes`),
|
|
38
|
+
* so a host translates it. Its cards are its kind's. The tab an author lists
|
|
39
|
+
* is a {@link FlowchartKindTab}, which this is built from.
|
|
72
40
|
*/
|
|
73
|
-
export declare const
|
|
74
|
-
readonly
|
|
75
|
-
readonly
|
|
76
|
-
readonly meta: OptionType<StringType>;
|
|
77
|
-
readonly group: OptionType<StringType>;
|
|
78
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
79
|
-
readonly key: StringType;
|
|
80
|
-
readonly label: OptionType<StringType>;
|
|
81
|
-
readonly lane: StringType;
|
|
82
|
-
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
83
|
-
readonly notes: OptionType<StringType>;
|
|
84
|
-
}>>;
|
|
85
|
-
}>;
|
|
86
|
-
/** Type representing {@link FlowchartStateCardType}. */
|
|
87
|
-
export type FlowchartStateCardType = typeof FlowchartStateCardType;
|
|
88
|
-
/**
|
|
89
|
-
* A transition template's card: what it shows, and the fields it sets on the
|
|
90
|
-
* transition it lands on — the `Flowchart.patch(Flowchart.Types.Link, …)` its
|
|
91
|
-
* drop returns.
|
|
92
|
-
*/
|
|
93
|
-
export declare const FlowchartTransitionCardType: StructType<{
|
|
94
|
-
readonly key: StringType;
|
|
95
|
-
readonly label: StringType;
|
|
96
|
-
readonly meta: OptionType<StringType>;
|
|
97
|
-
readonly group: OptionType<StringType>;
|
|
98
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
99
|
-
readonly key: OptionType<StringType>;
|
|
100
|
-
readonly from: StringType;
|
|
101
|
-
readonly to: StringType;
|
|
102
|
-
readonly kind: OptionType<VariantType<{
|
|
103
|
-
readonly planned: NullType;
|
|
104
|
-
readonly observed: NullType;
|
|
105
|
-
}>>;
|
|
106
|
-
readonly trigger: OptionType<StringType>;
|
|
107
|
-
readonly evidence: OptionType<StructType<{
|
|
108
|
-
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
109
|
-
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
110
|
-
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
111
|
-
readonly unit: OptionType<StringType>;
|
|
112
|
-
}>>;
|
|
113
|
-
}>>;
|
|
114
|
-
}>;
|
|
115
|
-
/** Type representing {@link FlowchartTransitionCardType}. */
|
|
116
|
-
export type FlowchartTransitionCardType = typeof FlowchartTransitionCardType;
|
|
117
|
-
/** An author's card that lands on a lane's header, and the lane's fields it sets. */
|
|
118
|
-
export declare const FlowchartLaneCardType: StructType<{
|
|
119
|
-
readonly key: StringType;
|
|
120
|
-
readonly label: StringType;
|
|
121
|
-
readonly meta: OptionType<StringType>;
|
|
122
|
-
readonly group: OptionType<StringType>;
|
|
123
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
124
|
-
readonly key: StringType;
|
|
125
|
-
readonly label: OptionType<StringType>;
|
|
126
|
-
}>>;
|
|
127
|
-
}>;
|
|
128
|
-
/** Type representing {@link FlowchartLaneCardType}. */
|
|
129
|
-
export type FlowchartLaneCardType = typeof FlowchartLaneCardType;
|
|
130
|
-
/** An author's card that lands on a decision's diamond, and the decision's fields it sets. */
|
|
131
|
-
export declare const FlowchartDecisionCardType: StructType<{
|
|
132
|
-
readonly key: StringType;
|
|
133
|
-
readonly label: StringType;
|
|
134
|
-
readonly meta: OptionType<StringType>;
|
|
135
|
-
readonly group: OptionType<StringType>;
|
|
136
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
137
|
-
readonly key: StringType;
|
|
138
|
-
readonly label: StringType;
|
|
139
|
-
readonly letter: OptionType<StringType>;
|
|
140
|
-
readonly owner: OptionType<StringType>;
|
|
141
|
-
readonly queue: OptionType<ArrayType<StringType>>;
|
|
142
|
-
readonly outcomes: OptionType<StringType>;
|
|
143
|
-
}>>;
|
|
144
|
-
}>;
|
|
145
|
-
/** Type representing {@link FlowchartDecisionCardType}. */
|
|
146
|
-
export type FlowchartDecisionCardType = typeof FlowchartDecisionCardType;
|
|
147
|
-
/**
|
|
148
|
-
* An author's tab's cards, by what they land on — the type of the patch its
|
|
149
|
-
* `drop` returns — each card with the fields it sets there.
|
|
150
|
-
*
|
|
151
|
-
* @property none - The tab declares no `drop`: its cards are read, never dragged
|
|
152
|
-
* @property state - Its cards land on a state
|
|
153
|
-
* @property transition - Its cards land on a transition
|
|
154
|
-
* @property lane - Its cards land on a lane's header
|
|
155
|
-
* @property decision - Its cards land on a decision's diamond
|
|
156
|
-
*/
|
|
157
|
-
export declare const FlowchartLandsType: VariantType<{
|
|
158
|
-
readonly none: ArrayType<StructType<{
|
|
159
|
-
readonly key: StringType;
|
|
160
|
-
readonly label: StringType;
|
|
161
|
-
readonly meta: OptionType<StringType>;
|
|
162
|
-
readonly group: OptionType<StringType>;
|
|
163
|
-
}>>;
|
|
164
|
-
readonly state: ArrayType<StructType<{
|
|
165
|
-
readonly key: StringType;
|
|
166
|
-
readonly label: StringType;
|
|
167
|
-
readonly meta: OptionType<StringType>;
|
|
168
|
-
readonly group: OptionType<StringType>;
|
|
169
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
170
|
-
readonly key: StringType;
|
|
171
|
-
readonly label: OptionType<StringType>;
|
|
172
|
-
readonly lane: StringType;
|
|
173
|
-
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
174
|
-
readonly notes: OptionType<StringType>;
|
|
175
|
-
}>>;
|
|
176
|
-
}>>;
|
|
177
|
-
readonly transition: ArrayType<StructType<{
|
|
178
|
-
readonly key: StringType;
|
|
179
|
-
readonly label: StringType;
|
|
180
|
-
readonly meta: OptionType<StringType>;
|
|
181
|
-
readonly group: OptionType<StringType>;
|
|
182
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
183
|
-
readonly key: OptionType<StringType>;
|
|
184
|
-
readonly from: StringType;
|
|
185
|
-
readonly to: StringType;
|
|
186
|
-
readonly kind: OptionType<VariantType<{
|
|
187
|
-
readonly planned: NullType;
|
|
188
|
-
readonly observed: NullType;
|
|
189
|
-
}>>;
|
|
190
|
-
readonly trigger: OptionType<StringType>;
|
|
191
|
-
readonly evidence: OptionType<StructType<{
|
|
192
|
-
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
193
|
-
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
194
|
-
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
195
|
-
readonly unit: OptionType<StringType>;
|
|
196
|
-
}>>;
|
|
197
|
-
}>>;
|
|
198
|
-
}>>;
|
|
199
|
-
readonly lane: ArrayType<StructType<{
|
|
200
|
-
readonly key: StringType;
|
|
201
|
-
readonly label: StringType;
|
|
202
|
-
readonly meta: OptionType<StringType>;
|
|
203
|
-
readonly group: OptionType<StringType>;
|
|
204
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
205
|
-
readonly key: StringType;
|
|
206
|
-
readonly label: OptionType<StringType>;
|
|
207
|
-
}>>;
|
|
208
|
-
}>>;
|
|
209
|
-
readonly decision: ArrayType<StructType<{
|
|
210
|
-
readonly key: StringType;
|
|
211
|
-
readonly label: StringType;
|
|
212
|
-
readonly meta: OptionType<StringType>;
|
|
213
|
-
readonly group: OptionType<StringType>;
|
|
214
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
215
|
-
readonly key: StringType;
|
|
216
|
-
readonly label: StringType;
|
|
217
|
-
readonly letter: OptionType<StringType>;
|
|
218
|
-
readonly owner: OptionType<StringType>;
|
|
219
|
-
readonly queue: OptionType<ArrayType<StringType>>;
|
|
220
|
-
readonly outcomes: OptionType<StringType>;
|
|
221
|
-
}>>;
|
|
222
|
-
}>>;
|
|
41
|
+
export declare const FlowchartKindTabWireType: StructType<{
|
|
42
|
+
readonly name: OptionType<StringType>;
|
|
43
|
+
readonly icon: OptionType<StringType>;
|
|
223
44
|
}>;
|
|
224
|
-
/** Type representing {@link
|
|
225
|
-
export type
|
|
45
|
+
/** Type representing {@link FlowchartKindTabWireType}. */
|
|
46
|
+
export type FlowchartKindTabWireType = typeof FlowchartKindTabWireType;
|
|
226
47
|
/**
|
|
227
|
-
* One tab of the library pane,
|
|
228
|
-
* Spec.md` §4.2).
|
|
48
|
+
* One tab of the library pane on the wire, in the order `library` lists them.
|
|
229
49
|
*
|
|
230
|
-
* @
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* tab's name
|
|
234
|
-
* its words (`States`, `Transitions`), so a host translates it.
|
|
235
|
-
*
|
|
236
|
-
* @property flows - Every flow in the record — over a slice, those its `flows` source narrows them to; a click opens one
|
|
237
|
-
* @property states - State templates from the tab's own record: its name, its icon, its cards, and the source of the slice they follow, by their keys (#1346)
|
|
238
|
-
* @property transitions - Transition templates from the tab's own record: its name, its icon, its cards, and the source of the slice they follow, by their keys (#1346)
|
|
239
|
-
* @property tab - The author's own cards: its name, its icon, its cards by what they land on, and the source of the slice they follow, by their keys — none, its cards whole (#1346)
|
|
50
|
+
* @property states - The Steps tab: the states' cards, which the states kind carries
|
|
51
|
+
* @property transitions - The Transitions tab: the transitions' cards
|
|
52
|
+
* @property lanes - The Lanes tab: the lanes' cards
|
|
53
|
+
* @property tab - The author's own: its name, its icon, the kind its cards land on, its cards and the source they follow
|
|
240
54
|
*/
|
|
241
55
|
export declare const FlowchartLibraryTabType: VariantType<{
|
|
242
|
-
readonly flows: NullType;
|
|
243
56
|
readonly states: StructType<{
|
|
244
57
|
readonly name: OptionType<StringType>;
|
|
245
58
|
readonly icon: OptionType<StringType>;
|
|
246
|
-
readonly cards: ArrayType<StructType<{
|
|
247
|
-
readonly key: StringType;
|
|
248
|
-
readonly label: StringType;
|
|
249
|
-
readonly meta: OptionType<StringType>;
|
|
250
|
-
readonly group: OptionType<StringType>;
|
|
251
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
252
|
-
readonly key: StringType;
|
|
253
|
-
readonly label: OptionType<StringType>;
|
|
254
|
-
readonly lane: StringType;
|
|
255
|
-
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
256
|
-
readonly notes: OptionType<StringType>;
|
|
257
|
-
}>>;
|
|
258
|
-
}>>;
|
|
259
|
-
readonly source: StringType;
|
|
260
59
|
}>;
|
|
261
60
|
readonly transitions: StructType<{
|
|
262
61
|
readonly name: OptionType<StringType>;
|
|
263
62
|
readonly icon: OptionType<StringType>;
|
|
63
|
+
}>;
|
|
64
|
+
readonly lanes: StructType<{
|
|
65
|
+
readonly name: OptionType<StringType>;
|
|
66
|
+
readonly icon: OptionType<StringType>;
|
|
67
|
+
}>;
|
|
68
|
+
readonly tab: StructType<{
|
|
69
|
+
readonly name: StringType;
|
|
70
|
+
readonly icon: OptionType<StringType>;
|
|
71
|
+
readonly drop: OptionType<StringType>;
|
|
264
72
|
readonly cards: ArrayType<StructType<{
|
|
265
73
|
readonly key: StringType;
|
|
266
74
|
readonly label: StringType;
|
|
267
75
|
readonly meta: OptionType<StringType>;
|
|
268
76
|
readonly group: OptionType<StringType>;
|
|
269
|
-
readonly sets:
|
|
270
|
-
readonly
|
|
271
|
-
readonly
|
|
272
|
-
readonly to: StringType;
|
|
273
|
-
readonly kind: OptionType<VariantType<{
|
|
274
|
-
readonly planned: NullType;
|
|
275
|
-
readonly observed: NullType;
|
|
276
|
-
}>>;
|
|
277
|
-
readonly trigger: OptionType<StringType>;
|
|
278
|
-
readonly evidence: OptionType<StructType<{
|
|
279
|
-
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
280
|
-
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
281
|
-
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
282
|
-
readonly unit: OptionType<StringType>;
|
|
283
|
-
}>>;
|
|
77
|
+
readonly sets: ArrayType<StructType<{
|
|
78
|
+
readonly path: ArrayType<StringType>;
|
|
79
|
+
readonly value: import("@elaraai/east").BlobType;
|
|
284
80
|
}>>;
|
|
285
81
|
}>>;
|
|
286
|
-
readonly source: StringType;
|
|
287
|
-
}>;
|
|
288
|
-
readonly tab: StructType<{
|
|
289
|
-
readonly name: StringType;
|
|
290
|
-
readonly icon: OptionType<StringType>;
|
|
291
|
-
readonly lands: VariantType<{
|
|
292
|
-
readonly none: ArrayType<StructType<{
|
|
293
|
-
readonly key: StringType;
|
|
294
|
-
readonly label: StringType;
|
|
295
|
-
readonly meta: OptionType<StringType>;
|
|
296
|
-
readonly group: OptionType<StringType>;
|
|
297
|
-
}>>;
|
|
298
|
-
readonly state: ArrayType<StructType<{
|
|
299
|
-
readonly key: StringType;
|
|
300
|
-
readonly label: StringType;
|
|
301
|
-
readonly meta: OptionType<StringType>;
|
|
302
|
-
readonly group: OptionType<StringType>;
|
|
303
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
304
|
-
readonly key: StringType;
|
|
305
|
-
readonly label: OptionType<StringType>;
|
|
306
|
-
readonly lane: StringType;
|
|
307
|
-
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
308
|
-
readonly notes: OptionType<StringType>;
|
|
309
|
-
}>>;
|
|
310
|
-
}>>;
|
|
311
|
-
readonly transition: ArrayType<StructType<{
|
|
312
|
-
readonly key: StringType;
|
|
313
|
-
readonly label: StringType;
|
|
314
|
-
readonly meta: OptionType<StringType>;
|
|
315
|
-
readonly group: OptionType<StringType>;
|
|
316
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
317
|
-
readonly key: OptionType<StringType>;
|
|
318
|
-
readonly from: StringType;
|
|
319
|
-
readonly to: StringType;
|
|
320
|
-
readonly kind: OptionType<VariantType<{
|
|
321
|
-
readonly planned: NullType;
|
|
322
|
-
readonly observed: NullType;
|
|
323
|
-
}>>;
|
|
324
|
-
readonly trigger: OptionType<StringType>;
|
|
325
|
-
readonly evidence: OptionType<StructType<{
|
|
326
|
-
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
327
|
-
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
328
|
-
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
329
|
-
readonly unit: OptionType<StringType>;
|
|
330
|
-
}>>;
|
|
331
|
-
}>>;
|
|
332
|
-
}>>;
|
|
333
|
-
readonly lane: ArrayType<StructType<{
|
|
334
|
-
readonly key: StringType;
|
|
335
|
-
readonly label: StringType;
|
|
336
|
-
readonly meta: OptionType<StringType>;
|
|
337
|
-
readonly group: OptionType<StringType>;
|
|
338
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
339
|
-
readonly key: StringType;
|
|
340
|
-
readonly label: OptionType<StringType>;
|
|
341
|
-
}>>;
|
|
342
|
-
}>>;
|
|
343
|
-
readonly decision: ArrayType<StructType<{
|
|
344
|
-
readonly key: StringType;
|
|
345
|
-
readonly label: StringType;
|
|
346
|
-
readonly meta: OptionType<StringType>;
|
|
347
|
-
readonly group: OptionType<StringType>;
|
|
348
|
-
readonly sets: FlowchartPatchOf<StructType<{
|
|
349
|
-
readonly key: StringType;
|
|
350
|
-
readonly label: StringType;
|
|
351
|
-
readonly letter: OptionType<StringType>;
|
|
352
|
-
readonly owner: OptionType<StringType>;
|
|
353
|
-
readonly queue: OptionType<ArrayType<StringType>>;
|
|
354
|
-
readonly outcomes: OptionType<StringType>;
|
|
355
|
-
}>>;
|
|
356
|
-
}>>;
|
|
357
|
-
}>;
|
|
358
82
|
readonly source: OptionType<StringType>;
|
|
359
83
|
}>;
|
|
360
84
|
}>;
|
|
361
85
|
/** Type representing {@link FlowchartLibraryTabType}. */
|
|
362
86
|
export type FlowchartLibraryTabType = typeof FlowchartLibraryTabType;
|
|
363
|
-
/**
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
* @typeParam T - The rows' element type
|
|
369
|
-
*/
|
|
370
|
-
export interface FlowchartCardAccessors<T extends EastType> {
|
|
371
|
-
/** The card's name. */
|
|
372
|
-
label: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<StringType>;
|
|
373
|
-
/** The line under it — return the field's `Option`. */
|
|
374
|
-
meta?: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<OptionType<StringType>>;
|
|
375
|
-
/** The tab's group the card sits under. */
|
|
376
|
-
group?: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<StringType>;
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* A state template tab — `Flowchart.library.states(rows, { … })`: its name
|
|
380
|
-
* and icon, what each card shows, and the fields of the state it adds. Each
|
|
381
|
-
* card is keyed by its templates record's key (#1346): it takes no `key`.
|
|
382
|
-
*
|
|
383
|
-
* @typeParam T - The rows' element type
|
|
384
|
-
*/
|
|
385
|
-
export interface FlowchartStatesConfig<T extends EastType> extends FlowchartCardAccessors<T> {
|
|
386
|
-
/** The tab's name; left out, `States`, in the flowchart's words. */
|
|
87
|
+
/** The kinds that take cards, each with a tab of its own: the states, the transitions and the lanes. */
|
|
88
|
+
export type FlowchartCardKind = "states" | "transitions" | "lanes";
|
|
89
|
+
/** A kind's tab's options: its name and its icon. */
|
|
90
|
+
export interface FlowchartKindTabOptions {
|
|
91
|
+
/** The tab's name; left out, the Flowchart's words: `Steps`, `Transitions` or `Lanes`. */
|
|
387
92
|
name?: string;
|
|
388
|
-
/** A Font Awesome solid icon name for the tab
|
|
389
|
-
icon?: string;
|
|
390
|
-
/** The fields of the state a card dropped on a lane adds, over a state's defaults: `Flowchart.patch(Flowchart.Types.State, { … })`. */
|
|
391
|
-
drop: (row: ExprType<T>, key: ExprType<StringType>) => ExprType<FlowchartPatchOf<FlowchartStateType>>;
|
|
392
|
-
/**
|
|
393
|
-
* The source of the flowchart's `Slice.bindRecords` over this templates
|
|
394
|
-
* record (#1340, ruling 9): its shown keys narrow the tab's cards, each
|
|
395
|
-
* card's key its record's key. A templates list must name one.
|
|
396
|
-
*/
|
|
397
|
-
source?: string;
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* A transition template tab — `Flowchart.library.transitions(rows, { … })`:
|
|
401
|
-
* its name and icon, what each card shows, and the fields it sets on the
|
|
402
|
-
* transition it lands on. Each card is keyed by its templates record's key
|
|
403
|
-
* (#1346): it takes no `key`.
|
|
404
|
-
*
|
|
405
|
-
* @typeParam T - The rows' element type
|
|
406
|
-
*/
|
|
407
|
-
export interface FlowchartTransitionsConfig<T extends EastType> extends FlowchartCardAccessors<T> {
|
|
408
|
-
/** The tab's name; left out, `Transitions`, in the flowchart's words. */
|
|
409
|
-
name?: string;
|
|
410
|
-
/** A Font Awesome solid icon name for the tab's cards. */
|
|
411
|
-
icon?: string;
|
|
412
|
-
/**
|
|
413
|
-
* The fields a card sets on the transition it lands on —
|
|
414
|
-
* `Flowchart.patch(Flowchart.Types.Link, { … })`: its kind, its decision
|
|
415
|
-
* and its other fields, never its `key`, `from` or `to`.
|
|
416
|
-
*/
|
|
417
|
-
drop: (row: ExprType<T>, key: ExprType<StringType>) => ExprType<FlowchartPatchOf<FlowchartLinkType>>;
|
|
418
|
-
/**
|
|
419
|
-
* The source of the flowchart's `Slice.bindRecords` over this templates
|
|
420
|
-
* record (#1340, ruling 9): its shown keys narrow the tab's cards, each
|
|
421
|
-
* card's key its record's key. A templates list must name one.
|
|
422
|
-
*/
|
|
423
|
-
source?: string;
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* An author's tab — `Flowchart.library.tab(rows, { … })`: its name and icon,
|
|
427
|
-
* what each card shows, and, given a `drop`, the fields a card sets where it
|
|
428
|
-
* lands.
|
|
429
|
-
*
|
|
430
|
-
* @typeParam T - The rows' element type
|
|
431
|
-
* @typeParam P - The patch `drop` returns: `Flowchart.Types.Patch` of a flow's row type
|
|
432
|
-
*/
|
|
433
|
-
export interface FlowchartTabConfig<T extends EastType, P extends EastType = EastType> extends FlowchartCardAccessors<T> {
|
|
434
|
-
/** The tab's name: its label in the tab row, and its identity in `library`. */
|
|
435
|
-
name: string;
|
|
436
|
-
/**
|
|
437
|
-
* The card's key — unique within the tab; a key that repeats keeps its
|
|
438
|
-
* first card. Following a `source`, it is the key of that record's row:
|
|
439
|
-
* the tab follows the source by it.
|
|
440
|
-
*/
|
|
441
|
-
key: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<StringType>;
|
|
442
|
-
/** A Font Awesome solid icon name for the tab's cards. */
|
|
93
|
+
/** A Font Awesome solid icon name for the tab. */
|
|
443
94
|
icon?: string;
|
|
444
|
-
/**
|
|
445
|
-
* What a dropped card sets: `Flowchart.patch(R, { … })` over a flow's row
|
|
446
|
-
* type, whose type names what it lands on — `State` a state, `Link` a
|
|
447
|
-
* transition, `Lane` a lane's header, `Trigger` a decision's diamond.
|
|
448
|
-
* Without one, the cards are read, never dragged.
|
|
449
|
-
*/
|
|
450
|
-
drop?: (row: ExprType<T>, key: ExprType<StringType>) => ExprType<P>;
|
|
451
|
-
/**
|
|
452
|
-
* The source of the flowchart's `Slice.bindRecords` whose shown keys
|
|
453
|
-
* filter this tab's cards (#1346), each card's key its row's key in that
|
|
454
|
-
* record; omitted, the tab lists its rows whole. It counts what it shows,
|
|
455
|
-
* and says so when the rail leaves it none.
|
|
456
|
-
*/
|
|
457
|
-
source?: string;
|
|
458
95
|
}
|
|
459
|
-
/**
|
|
460
|
-
export interface
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
readonly
|
|
467
|
-
readonly config: FlowchartStatesConfig<EastType>;
|
|
468
|
-
}
|
|
469
|
-
/** The transition templates' tab, as `Flowchart.library.transitions(…)` returns it: its rows and how it reads them. */
|
|
470
|
-
export interface FlowchartTransitionsTab {
|
|
471
|
-
readonly kind: "transitions";
|
|
472
|
-
readonly rows: unknown;
|
|
473
|
-
readonly config: FlowchartTransitionsConfig<EastType>;
|
|
96
|
+
/** A kind's tab, as `Flowchart.library.states()`, `.transitions()` or `.lanes()` returns it. */
|
|
97
|
+
export interface FlowchartKindTab {
|
|
98
|
+
/** The kind whose cards it lists. */
|
|
99
|
+
readonly kind: FlowchartCardKind;
|
|
100
|
+
/** Its name, when given. */
|
|
101
|
+
readonly name: string | undefined;
|
|
102
|
+
/** Its icon, when given. */
|
|
103
|
+
readonly icon: string | undefined;
|
|
474
104
|
}
|
|
475
105
|
/** An author's tab, as `Flowchart.library.tab(…)` returns it: its rows and how it reads them. */
|
|
476
106
|
export interface FlowchartAuthorTab {
|
|
107
|
+
/** Identifies an author's tab. */
|
|
477
108
|
readonly kind: "tab";
|
|
109
|
+
/** Its rows: an Array, or a Dict by String keys. */
|
|
478
110
|
readonly rows: unknown;
|
|
479
|
-
|
|
111
|
+
/** How it reads them. */
|
|
112
|
+
readonly config: ScheduleLibraryTabConfig<EastType, EastType>;
|
|
480
113
|
}
|
|
481
|
-
/** One tab of the library pane
|
|
482
|
-
export type FlowchartLibraryTab =
|
|
114
|
+
/** One tab of the library pane: what each `Flowchart.library.*` call returns, and `library` lists. */
|
|
115
|
+
export type FlowchartLibraryTab = FlowchartKindTab | FlowchartAuthorTab;
|
|
483
116
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
117
|
+
* An author's tab's options — `Flowchart.library.tab(rows, { … })`: its name
|
|
118
|
+
* and icon, what each card shows, the source of the slice it follows, and the
|
|
119
|
+
* patch a card dropped on a row sets.
|
|
120
|
+
*
|
|
121
|
+
* @typeParam T - The rows' element type
|
|
122
|
+
* @typeParam P - The patch `drop` returns
|
|
486
123
|
*/
|
|
487
|
-
export type
|
|
488
|
-
/** The rows an author's tab reads: an Array, or a Dict by String keys — a record's, when it follows a source. */
|
|
124
|
+
export type FlowchartTabConfig<T extends EastType, P extends EastType = EastType> = ScheduleLibraryTabConfig<StringType, T, P>;
|
|
125
|
+
/** The rows an author's tab reads: an Array, each card keyed by its index, printed; or a Dict by String keys — a record's, when it follows a source. */
|
|
489
126
|
export type FlowchartLibraryRows<T extends EastType> = SubtypeExprOrValue<ArrayType<T>> | SubtypeExprOrValue<DictType<StringType, T>>;
|
|
490
|
-
/** The rows a templates list reads (#1340, ruling 9): its templates record's, by String keys — its binding's `read()`. */
|
|
491
|
-
export type FlowchartTemplateRows<T extends EastType> = SubtypeExprOrValue<DictType<StringType, T>>;
|
|
492
127
|
/**
|
|
493
|
-
* The
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* flow" names another, refusing a name the flowchart holds, and opens it
|
|
500
|
-
* empty, one lane, as a draft the history item saves or discards.
|
|
501
|
-
*
|
|
502
|
-
* @remarks
|
|
503
|
-
* Over a record of flows, or the host's flows by name. Over one flow (`data`
|
|
504
|
-
* of `Flowchart.Types.Flow`) it is refused, when the surface is built and by
|
|
505
|
-
* the tag's types.
|
|
128
|
+
* The Steps tab — `Flowchart.library.states()` (R14, D8): the states' cards,
|
|
129
|
+
* `Flowchart.templates` on `Flowchart.states`, grouped by their `group` and
|
|
130
|
+
* searched by their name, each a drag source. One dropped on a lane adds a
|
|
131
|
+
* state there from its values, keyed `state-<n>`, its order between the
|
|
132
|
+
* cards it lands between. It follows its cards' source of the slice, counting
|
|
133
|
+
* what it shows.
|
|
506
134
|
*
|
|
135
|
+
* @param options - The tab's name — `Steps` unless given — and its icon
|
|
136
|
+
* @param rest - Nothing: rows and a config, as the earlier form took, are refused
|
|
507
137
|
* @returns The tab
|
|
508
|
-
*
|
|
509
|
-
* @example
|
|
510
|
-
* ```tsx
|
|
511
|
-
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
512
|
-
* import { East } from "@elaraai/east";
|
|
513
|
-
* import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
514
|
-
* import { Flowchart, Record } from "@elaraai/e3-ui";
|
|
515
|
-
* import e3 from "@elaraai/e3";
|
|
516
|
-
*
|
|
517
|
-
* export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, {
|
|
518
|
-
* initial: Flowchart.values({
|
|
519
|
-
* "Inbound parcels": {
|
|
520
|
-
* description: "From the trailer to the van",
|
|
521
|
-
* lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
|
|
522
|
-
* states: [
|
|
523
|
-
* { key: "ARV", label: "Arrived", lane: "intake" },
|
|
524
|
-
* { key: "SCN", label: "Scanned", lane: "intake" },
|
|
525
|
-
* { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
|
|
526
|
-
* { key: "LDD", label: "Loaded", lane: "load" },
|
|
527
|
-
* ],
|
|
528
|
-
* links: [
|
|
529
|
-
* { from: "ARV", to: "SCN" },
|
|
530
|
-
* { from: "SCN", to: "CH*", trigger: "route" },
|
|
531
|
-
* { from: "CH*", to: "LDD" },
|
|
532
|
-
* { from: "SCN", to: "SCN", kind: "observed" },
|
|
533
|
-
* ],
|
|
534
|
-
* triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
|
|
535
|
-
* },
|
|
536
|
-
* "Returns": {
|
|
537
|
-
* description: "From the counter back to the sender",
|
|
538
|
-
* lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
|
|
539
|
-
* states: [
|
|
540
|
-
* { key: "RCV", label: "Received", lane: "counter" },
|
|
541
|
-
* { key: "INS", label: "Inspected", lane: "check" },
|
|
542
|
-
* { key: "RSD", label: "Resent", lane: "out" },
|
|
543
|
-
* ],
|
|
544
|
-
* links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
|
|
545
|
-
* },
|
|
546
|
-
* }),
|
|
547
|
-
* mutations: (mutation) => ({
|
|
548
|
-
* patch: mutation.patch(),
|
|
549
|
-
* }),
|
|
550
|
-
* });
|
|
551
|
-
*
|
|
552
|
-
* const flowchart = East.function([], UIComponentType, (_$) => (
|
|
553
|
-
* <Reactive>{$ => {
|
|
554
|
-
* const flows = $.let(Record.bind(depotFlows));
|
|
555
|
-
* return (
|
|
556
|
-
* <Box height="500px">
|
|
557
|
-
* <Flowchart record={flows} flow="Inbound parcels" library={[Flowchart.library.flows()]} />
|
|
558
|
-
* </Box>
|
|
559
|
-
* );
|
|
560
|
-
* }}</Reactive>
|
|
561
|
-
* ));
|
|
562
|
-
* ```
|
|
138
|
+
* @throws {Error} When given anything but `{ name?, icon? }`, naming the cards on the kind
|
|
563
139
|
*/
|
|
564
|
-
export declare function
|
|
140
|
+
export declare function libraryStates(options?: FlowchartKindTabOptions, ...rest: readonly never[]): FlowchartKindTab;
|
|
565
141
|
/**
|
|
566
|
-
* The
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
* searched by its key, label and line. Each card is a drag source, and a click
|
|
570
|
-
* selects it, a click on the selected card letting it go. A card dropped on a
|
|
571
|
-
* lane adds a state there, seeded with the fields its `drop` sets over a
|
|
572
|
-
* state's defaults (#1249).
|
|
142
|
+
* The Transitions tab — `Flowchart.library.transitions()` (R14, D8): the
|
|
143
|
+
* transitions' cards, `Flowchart.templates` on `Flowchart.transitions`. One
|
|
144
|
+
* dropped on a transition gives it its values, its ends kept.
|
|
573
145
|
*
|
|
574
|
-
* @
|
|
575
|
-
*
|
|
576
|
-
* read whole — `Data.bind(record).read()`, a `Dict<String, T>` — apart from
|
|
577
|
-
* the flows and from the other tabs, each accessor taking a row and its key.
|
|
578
|
-
* A card's key is its record's key, and the tab follows `source`, the
|
|
579
|
-
* flowchart's slice's source over that record, by it (#1346). Left out, the
|
|
580
|
-
* tab's name is `States`, in the flowchart's words. Refused when the surface
|
|
581
|
-
* is built: a list naming no source — one written in the code — or one the
|
|
582
|
-
* slice lacks, or `flows`; rows that are no `Dict<String, T>`; a `key`, which
|
|
583
|
-
* the record's keys are; a `drop` over another type than
|
|
584
|
-
* `Flowchart.Types.State`; and the tab listed twice.
|
|
585
|
-
*
|
|
586
|
-
* @typeParam T - The rows' element type
|
|
587
|
-
* @param rows - The templates record's rows — a `Dict<String, T>` expression, its binding's `read()`
|
|
588
|
-
* @param config - The tab's name and icon, what each card shows, its `drop` and its `source` ({@link FlowchartStatesConfig})
|
|
146
|
+
* @param options - The tab's name — `Transitions` unless given — and its icon
|
|
147
|
+
* @param rest - Nothing: rows and a config, as the earlier form took, are refused
|
|
589
148
|
* @returns The tab
|
|
590
|
-
*
|
|
591
|
-
* @example
|
|
592
|
-
* ```tsx
|
|
593
|
-
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
594
|
-
* import { DictType, East, IntegerType, OptionType, StringType, StructType, none, some, variant } from "@elaraai/east";
|
|
595
|
-
* import { Box, Reactive, Slice, UIComponentType } from "@elaraai/east-ui";
|
|
596
|
-
* import { Data, Flowchart, Record } from "@elaraai/e3-ui";
|
|
597
|
-
* import e3 from "@elaraai/e3";
|
|
598
|
-
*
|
|
599
|
-
* export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, {
|
|
600
|
-
* initial: Flowchart.values({
|
|
601
|
-
* "Inbound parcels": {
|
|
602
|
-
* description: "From the trailer to the van",
|
|
603
|
-
* lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
|
|
604
|
-
* states: [
|
|
605
|
-
* { key: "ARV", label: "Arrived", lane: "intake" },
|
|
606
|
-
* { key: "SCN", label: "Scanned", lane: "intake" },
|
|
607
|
-
* { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
|
|
608
|
-
* { key: "LDD", label: "Loaded", lane: "load" },
|
|
609
|
-
* ],
|
|
610
|
-
* links: [
|
|
611
|
-
* { from: "ARV", to: "SCN" },
|
|
612
|
-
* { from: "SCN", to: "CH*", trigger: "route" },
|
|
613
|
-
* { from: "CH*", to: "LDD" },
|
|
614
|
-
* { from: "SCN", to: "SCN", kind: "observed" },
|
|
615
|
-
* ],
|
|
616
|
-
* triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
|
|
617
|
-
* },
|
|
618
|
-
* "Returns": {
|
|
619
|
-
* description: "From the counter back to the sender",
|
|
620
|
-
* lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
|
|
621
|
-
* states: [
|
|
622
|
-
* { key: "RCV", label: "Received", lane: "counter" },
|
|
623
|
-
* { key: "INS", label: "Inspected", lane: "check" },
|
|
624
|
-
* { key: "RSD", label: "Resent", lane: "out" },
|
|
625
|
-
* ],
|
|
626
|
-
* links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
|
|
627
|
-
* },
|
|
628
|
-
* }),
|
|
629
|
-
* mutations: (mutation) => ({
|
|
630
|
-
* patch: mutation.patch(),
|
|
631
|
-
* }),
|
|
632
|
-
* });
|
|
633
|
-
* export const StepTemplate = StructType({ name: StringType, kind: StringType, slots: OptionType(IntegerType) });
|
|
634
|
-
* export const stepTemplates = e3.record("flowchart_step_templates", DictType(StringType, StepTemplate), {
|
|
635
|
-
* initial: new Map([
|
|
636
|
-
* ["ARV", { name: "Arrived", kind: "Intake", slots: none }],
|
|
637
|
-
* ["SCN", { name: "Scanned", kind: "Intake", slots: none }],
|
|
638
|
-
* ["CH*", { name: "Sort chutes", kind: "Sort", slots: some(12n) }],
|
|
639
|
-
* ["HLD", { name: "Held", kind: "Hold", slots: none }],
|
|
640
|
-
* ["LDD", { name: "Loaded", kind: "Load", slots: none }],
|
|
641
|
-
* ]),
|
|
642
|
-
* indexes: (index) => ({
|
|
643
|
-
* flowchart_steps_by_kind: index.on(["kind"]),
|
|
644
|
-
* }),
|
|
645
|
-
* mutations: (mutation) => ({
|
|
646
|
-
* // The step types' patch door: what another writer adds a step type through, the Steps tab's cards following.
|
|
647
|
-
* patch: mutation.patch(),
|
|
648
|
-
* }),
|
|
649
|
-
* });
|
|
650
|
-
* export const MoveTemplate = StructType({ kind: Flowchart.Types.Kind, decision: OptionType(StringType), note: StringType });
|
|
651
|
-
* export const moveTemplates = e3.record("flowchart_move_templates", DictType(StringType, MoveTemplate), {
|
|
652
|
-
* initial: new Map([
|
|
653
|
-
* ["Observed", { kind: variant("observed", null), decision: none, note: "Mined from the scans" }],
|
|
654
|
-
* ["Planned", { kind: variant("planned", null), decision: none, note: "The designed path" }],
|
|
655
|
-
* ["Routed", { kind: variant("planned", null), decision: some("route"), note: "Governed by the route decision" }],
|
|
656
|
-
* ]),
|
|
657
|
-
* indexes: (index) => ({
|
|
658
|
-
* flowchart_moves_by_kind: index.on(["kind"]),
|
|
659
|
-
* }),
|
|
660
|
-
* });
|
|
661
|
-
* export const DecisionOwner = StructType({ name: StringType, desk: StringType });
|
|
662
|
-
* export const decisionOwners = e3.record("flowchart_decision_owners", DictType(StringType, DecisionOwner), {
|
|
663
|
-
* initial: new Map([
|
|
664
|
-
* ["sort-planner", { name: "Sort planner", desk: "Sort hall" }],
|
|
665
|
-
* ["customs-desk", { name: "Customs desk", desk: "Hold bay" }],
|
|
666
|
-
* ]),
|
|
667
|
-
* indexes: (index) => ({
|
|
668
|
-
* flowchart_owners_by_desk: index.on(["desk"]),
|
|
669
|
-
* }),
|
|
670
|
-
* });
|
|
671
|
-
*
|
|
672
|
-
* const flowchart = East.function([], UIComponentType, (_$) => (
|
|
673
|
-
* <Reactive>{$ => {
|
|
674
|
-
* const flows = $.let(Record.bind(depotFlows));
|
|
675
|
-
* // What a tab reads whole binds with Data.bind, which keeps it loaded beside its pages.
|
|
676
|
-
* const steps = $.let(Data.bind(stepTemplates));
|
|
677
|
-
* const moves = $.let(Data.bind(moveTemplates));
|
|
678
|
-
* const owners = $.let(Data.bind(decisionOwners));
|
|
679
|
-
* // One rail over the library's records, a source each (#1346): each tab follows the source it names.
|
|
680
|
-
* const slice = $.let(Slice.bindRecords("flowchart.depot", {
|
|
681
|
-
* steps: { source: Data.bindPaged(stepTemplates, { indexes: ["flowchart_steps_by_kind"] }), label: "Steps", icon: { prefix: "fas", name: "box" },
|
|
682
|
-
* fields: { kind: { label: "Step kind", hints: ["Intake", "Sort", "Hold", "Load"] } } },
|
|
683
|
-
* moves: { source: Data.bindPaged(moveTemplates, { indexes: ["flowchart_moves_by_kind"] }), label: "Transitions", icon: { prefix: "fas", name: "arrow-right" },
|
|
684
|
-
* fields: { kind: { label: "Transition kind" } } },
|
|
685
|
-
* owners: { source: Data.bindPaged(decisionOwners, { indexes: ["flowchart_owners_by_desk"] }), label: "Owners", icon: { prefix: "fas", name: "user-tie" },
|
|
686
|
-
* fields: { desk: { label: "Desk", hints: ["Sort hall", "Hold bay"] } } },
|
|
687
|
-
* }));
|
|
688
|
-
* return (
|
|
689
|
-
* <Box height="560px">
|
|
690
|
-
* <Flowchart
|
|
691
|
-
* record={flows}
|
|
692
|
-
* flow="Inbound parcels"
|
|
693
|
-
* name="depot"
|
|
694
|
-
* slice={{ slice }}
|
|
695
|
-
* library={[
|
|
696
|
-
* Flowchart.library.flows(),
|
|
697
|
-
* // Step types, a templates record by code: a card dropped on a lane adds a state seeded with what its drop sets.
|
|
698
|
-
* Flowchart.library.states(steps.read(), {
|
|
699
|
-
* name: "Steps", icon: "box", source: "steps",
|
|
700
|
-
* label: s => s.name, meta: (_s, code) => some(code), group: s => s.kind,
|
|
701
|
-
* drop: (s, code) => Flowchart.patch(Flowchart.Types.State, { key: code, label: some(s.name), members: s.slots }),
|
|
702
|
-
* }),
|
|
703
|
-
* // Transition types, a templates record by name: a card dropped on a transition retypes it.
|
|
704
|
-
* Flowchart.library.transitions(moves.read(), {
|
|
705
|
-
* icon: "arrow-right", source: "moves",
|
|
706
|
-
* label: (_m, name) => name, meta: m => some(m.note),
|
|
707
|
-
* drop: m => Flowchart.patch(Flowchart.Types.Link, { kind: some(m.kind), trigger: m.decision }),
|
|
708
|
-
* }),
|
|
709
|
-
* // The author's own cards, a record of roles: a role dropped on a decision owns it.
|
|
710
|
-
* Flowchart.library.tab(owners.read(), {
|
|
711
|
-
* name: "Owners", icon: "user-tie", source: "owners",
|
|
712
|
-
* key: (_o, role) => role, label: o => o.name, meta: o => some(o.desk),
|
|
713
|
-
* drop: (_o, role) => Flowchart.patch(Flowchart.Types.Trigger, { owner: some(role) }),
|
|
714
|
-
* }),
|
|
715
|
-
* ]}
|
|
716
|
-
* />
|
|
717
|
-
* </Box>
|
|
718
|
-
* );
|
|
719
|
-
* }}</Reactive>
|
|
720
|
-
* ));
|
|
721
|
-
* ```
|
|
149
|
+
* @throws {Error} When given anything but `{ name?, icon? }`, naming the cards on the kind
|
|
722
150
|
*/
|
|
723
|
-
export declare function
|
|
151
|
+
export declare function libraryTransitions(options?: FlowchartKindTabOptions, ...rest: readonly never[]): FlowchartKindTab;
|
|
724
152
|
/**
|
|
725
|
-
* The
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
* `drop` sets on it — its kind, its decision and its other fields (#1249): a
|
|
730
|
-
* connection makes a transition of the default type, and a card retypes it.
|
|
731
|
-
*
|
|
732
|
-
* @remarks
|
|
733
|
-
* The rows are a templates record's, read as {@link libraryStates}' are, each
|
|
734
|
-
* card keyed by its record's key, and the tab follows its `source` as theirs
|
|
735
|
-
* does. Left out, the tab's name is `Transitions`, in the flowchart's words.
|
|
736
|
-
* Refused when the surface is built: a list naming no source, or one the slice
|
|
737
|
-
* lacks, or `flows`; rows that are no `Dict<String, T>`; a `key`; a `drop`
|
|
738
|
-
* over another type than `Flowchart.Types.Link`; and the tab listed twice;
|
|
739
|
-
* and, when the tab's cards are read, a card whose `drop` sets the
|
|
740
|
-
* transition's `key`, `from` or `to` — the fields a patch sets are values its
|
|
741
|
-
* rows give, which the build cannot see.
|
|
153
|
+
* The Lanes tab — `Flowchart.library.lanes()` (R14, D5): the lanes' cards,
|
|
154
|
+
* `Flowchart.templates` on `Flowchart.lanes`. One dropped between two lanes,
|
|
155
|
+
* or at the band row's tail, adds a lane there from its values, keyed
|
|
156
|
+
* `lane-<n>`, its order between theirs. + LANE stays on the canvas.
|
|
742
157
|
*
|
|
743
|
-
* @
|
|
744
|
-
* @param
|
|
745
|
-
* @param config - The tab's name and icon, what each card shows, its `drop` and its `source` ({@link FlowchartTransitionsConfig})
|
|
158
|
+
* @param options - The tab's name — `Lanes` unless given — and its icon
|
|
159
|
+
* @param rest - Nothing: anything after the options is refused
|
|
746
160
|
* @returns The tab
|
|
161
|
+
* @throws {Error} When given anything but `{ name?, icon? }`
|
|
747
162
|
*/
|
|
748
|
-
export declare function
|
|
163
|
+
export declare function libraryLanes(options?: FlowchartKindTabOptions, ...rest: readonly never[]): FlowchartKindTab;
|
|
749
164
|
/**
|
|
750
165
|
* A tab of the author's own cards — `Flowchart.library.tab(rows, { … })`
|
|
751
|
-
* (
|
|
752
|
-
*
|
|
753
|
-
* `
|
|
754
|
-
* — a
|
|
755
|
-
*
|
|
166
|
+
* (R14): one card per row, its label and the line under it, grouped by its
|
|
167
|
+
* `group` and searched by its key, label and line. Given a `drop` —
|
|
168
|
+
* `Flowchart.patch(R, { … })` over one kind's row type, which names that kind
|
|
169
|
+
* — a card dropped on a row of that kind sets the fields the patch sets:
|
|
170
|
+
* an owner dropped on a decision's diamond, say. Without one, the cards are
|
|
171
|
+
* read, never dragged.
|
|
756
172
|
*
|
|
757
173
|
* @remarks
|
|
758
|
-
* The rows are an `Array<T
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
* that are neither an Array nor a `Dict<String, T>`; a `source` the slice
|
|
765
|
-
* lacks; a `drop` over none of a flow's row types; and two tabs of one name.
|
|
174
|
+
* The rows are an `Array<T>`, each card keyed by its index, printed, or a
|
|
175
|
+
* `Dict<String, T>`, each by its key. Naming a `source` of the Flowchart's
|
|
176
|
+
* slice, the tab follows it by its cards' keys, each a row's key in that
|
|
177
|
+
* record — so its rows are that record's, a Dict; naming none, it lists its
|
|
178
|
+
* rows whole. A tab's name is its identity in `library`. `Flowchart.templates`'
|
|
179
|
+
* example, the depot, shows the tabs together, its Owners tab among them.
|
|
766
180
|
*
|
|
767
181
|
* @typeParam T - The rows' element type
|
|
768
182
|
* @typeParam P - The patch `drop` returns
|
|
769
|
-
* @param rows - The rows
|
|
183
|
+
* @param rows - The rows: an `Array<T>` or a `Dict<String, T>`, usually a record's `read()`
|
|
770
184
|
* @param config - The tab's name and icon, what each card shows, its `drop` and its `source` ({@link FlowchartTabConfig})
|
|
771
185
|
* @returns The tab
|
|
772
186
|
*/
|
|
773
187
|
export declare function libraryTab<T extends EastType, P extends EastType = EastType>(rows: FlowchartLibraryRows<T>, config: FlowchartTabConfig<T, P>): FlowchartAuthorTab;
|
|
774
188
|
/** The library pane's tabs — `Flowchart.library`. */
|
|
775
189
|
export interface FlowchartLibrary {
|
|
776
|
-
/** The
|
|
777
|
-
flows: typeof libraryFlows;
|
|
778
|
-
/** State templates from the tab's own rows, each card adding a state where it is dropped ({@link libraryStates}). */
|
|
190
|
+
/** The Steps tab: the states' cards ({@link libraryStates}). */
|
|
779
191
|
states: typeof libraryStates;
|
|
780
|
-
/**
|
|
192
|
+
/** The Transitions tab: the transitions' cards ({@link libraryTransitions}). */
|
|
781
193
|
transitions: typeof libraryTransitions;
|
|
782
|
-
/** The
|
|
194
|
+
/** The Lanes tab: the lanes' cards ({@link libraryLanes}). */
|
|
195
|
+
lanes: typeof libraryLanes;
|
|
196
|
+
/** The author's own cards ({@link libraryTab}). */
|
|
783
197
|
tab: typeof libraryTab;
|
|
784
198
|
}
|
|
785
199
|
/** The library pane's tabs, each a factory (`Flowchart.library`). */
|
|
786
200
|
export declare const FlowchartLibraryFactories: FlowchartLibrary;
|
|
201
|
+
/** One of the Flowchart's kinds, as its library is built against it. */
|
|
202
|
+
export interface FlowchartLibraryKind {
|
|
203
|
+
/** Its sort: the prop it fills. */
|
|
204
|
+
readonly sort: FlowchartKindSort;
|
|
205
|
+
/** Its record's row type. */
|
|
206
|
+
readonly rowType: StructType;
|
|
207
|
+
/** Whether it has cards. */
|
|
208
|
+
readonly templates: boolean;
|
|
209
|
+
}
|
|
787
210
|
/**
|
|
788
|
-
*
|
|
789
|
-
* the slice itself is checked, so a list written in the code is refused with
|
|
790
|
-
* the change to make before a source no list names is (#1340, ruling 9): each
|
|
791
|
-
* templates list is a record of its own, naming its source of the flowchart's
|
|
792
|
-
* one `Slice.bindRecords`.
|
|
211
|
+
* What a Flowchart's library is built against.
|
|
793
212
|
*
|
|
794
|
-
* @param library - The flowchart's `library`, as given
|
|
795
|
-
* @param names - The sources the slice names, read before it is checked (`sliceSourceNames`)
|
|
796
|
-
* @throws {Error} Naming the list and the change to make: a list naming no source — one written in the code — or one the slice lacks, a list naming `flows`, and the state and the transition templates naming one source
|
|
797
213
|
* @internal
|
|
798
214
|
*/
|
|
799
|
-
export
|
|
215
|
+
export interface FlowchartLibraryContext {
|
|
216
|
+
/** Its kinds, in order: its states, and its transitions, lanes and decisions where given. */
|
|
217
|
+
readonly kinds: readonly FlowchartLibraryKind[];
|
|
218
|
+
/** The slice's sources: an author's tab's `source` names one of them. */
|
|
219
|
+
readonly sources: readonly string[];
|
|
220
|
+
}
|
|
800
221
|
/**
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
* hold beside `flows`.
|
|
222
|
+
* Builds the library pane on the wire (R14): its tabs in the order `library`
|
|
223
|
+
* lists them; none when it is left out.
|
|
804
224
|
*
|
|
805
|
-
* @param
|
|
806
|
-
* @
|
|
225
|
+
* @param tabs - The tabs, each a `Flowchart.library.*` call
|
|
226
|
+
* @param ctx - What the library is built against
|
|
227
|
+
* @returns The tabs on the wire
|
|
228
|
+
* @throws {Error} Naming the tab: a `library` that is no list of `Flowchart.library.*` calls; a tab listed twice (an
|
|
229
|
+
* author's tab by its name); a kind's tab when the Flowchart has no such kind, or the kind has no cards; and each of
|
|
230
|
+
* an author's tab's refusals — rows that are neither an Array nor a `Dict<String, T>`, an Array following a source,
|
|
231
|
+
* a `key`, a source the slice lacks, and a `drop` over no kind's row type, or over one several kinds share
|
|
807
232
|
* @internal
|
|
808
233
|
*/
|
|
809
|
-
export declare function
|
|
234
|
+
export declare function buildFlowchartLibrary(tabs: unknown, ctx: FlowchartLibraryContext): ExprType<ArrayType<FlowchartLibraryTabType>>;
|
|
810
235
|
/**
|
|
811
|
-
* The
|
|
812
|
-
*
|
|
813
|
-
* left out, or empty.
|
|
236
|
+
* The sources of the slice the author's tabs name: each one the slice may
|
|
237
|
+
* hold, and its tab refused when the slice lacks it.
|
|
814
238
|
*
|
|
815
|
-
* @param
|
|
816
|
-
* @
|
|
817
|
-
* @param sources - The flowchart's slice's sources, which each templates list's and each author's tab's `source` must be one of
|
|
818
|
-
* @returns The tabs on the wire
|
|
819
|
-
* @throws {Error} Naming the tab and the remedy: a `library` that is no list
|
|
820
|
-
* of `Flowchart.library.*` calls; a tab listed twice — the Flows tab, the
|
|
821
|
-
* state templates or the transition templates, or two of the author's tabs
|
|
822
|
-
* of one name; the Flows tab over one flow; and each of a data tab's
|
|
823
|
-
* refusals — a source the slice lacks, rows that are neither an Array nor a
|
|
824
|
-
* `Dict<String, T>` (a templates record's, for a templates list), a
|
|
825
|
-
* templates list's `key`, and a `drop` of another type than its tab's
|
|
239
|
+
* @param tabs - The Flowchart's `library`
|
|
240
|
+
* @returns The sources its tabs name, in order
|
|
826
241
|
* @internal
|
|
827
242
|
*/
|
|
828
|
-
export declare function
|
|
243
|
+
export declare function flowchartTabSources(tabs: unknown): string[];
|
|
829
244
|
//# sourceMappingURL=library.d.ts.map
|