@elaraai/e3-ui 1.0.86 → 1.0.88
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/bind/data-indexed.d.ts +159 -0
- package/dist/src/bind/data-indexed.d.ts.map +1 -0
- package/dist/src/bind/data-indexed.js +105 -0
- package/dist/src/bind/data-indexed.js.map +1 -0
- package/dist/src/bind/data.d.ts +5 -3
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +6 -0
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/record.d.ts +34 -23
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js +46 -19
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +2923 -0
- package/dist/src/calendar/index.d.ts.map +1 -0
- package/dist/src/calendar/index.js +135 -0
- package/dist/src/calendar/index.js.map +1 -0
- package/dist/src/decision/queue.d.ts +3 -3
- package/dist/src/decision/queue.d.ts.map +1 -1
- package/dist/src/decision/queue.js +2 -2
- package/dist/src/decision/queue.js.map +1 -1
- package/dist/src/decision/types.d.ts +4 -0
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/decision/types.js +4 -0
- package/dist/src/decision/types.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +114 -0
- package/dist/src/flowchart/canvas.d.ts.map +1 -0
- package/dist/src/flowchart/canvas.js +84 -0
- package/dist/src/flowchart/canvas.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +79 -0
- package/dist/src/flowchart/flowchart.d.ts.map +1 -0
- package/dist/src/flowchart/flowchart.js +9 -0
- package/dist/src/flowchart/flowchart.js.map +1 -0
- package/dist/src/flowchart/index.d.ts +305 -0
- package/dist/src/flowchart/index.d.ts.map +1 -0
- package/dist/src/flowchart/index.js +267 -0
- package/dist/src/flowchart/index.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +720 -0
- package/dist/src/flowchart/library.d.ts.map +1 -0
- package/dist/src/flowchart/library.js +611 -0
- package/dist/src/flowchart/library.js.map +1 -0
- package/dist/src/flowchart/over.d.ts +234 -0
- package/dist/src/flowchart/over.d.ts.map +1 -0
- package/dist/src/flowchart/over.js +220 -0
- package/dist/src/flowchart/over.js.map +1 -0
- package/dist/src/flowchart/patch.d.ts +64 -0
- package/dist/src/flowchart/patch.d.ts.map +1 -0
- package/dist/src/flowchart/patch.js +67 -0
- package/dist/src/flowchart/patch.js.map +1 -0
- package/dist/src/flowchart/payload.d.ts +8220 -0
- package/dist/src/flowchart/payload.d.ts.map +1 -0
- package/dist/src/flowchart/payload.js +521 -0
- package/dist/src/flowchart/payload.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +393 -0
- package/dist/src/flowchart/types.d.ts.map +1 -0
- package/dist/src/flowchart/types.js +216 -0
- package/dist/src/flowchart/types.js.map +1 -0
- package/dist/src/flowchart/values.d.ts +267 -0
- package/dist/src/flowchart/values.d.ts.map +1 -0
- package/dist/src/flowchart/values.js +216 -0
- package/dist/src/flowchart/values.js.map +1 -0
- package/dist/src/flowchart/window.d.ts +521 -0
- package/dist/src/flowchart/window.d.ts.map +1 -0
- package/dist/src/flowchart/window.js +69 -0
- package/dist/src/flowchart/window.js.map +1 -0
- package/dist/src/index.d.ts +25 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +48 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +35 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +72 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/assemble.d.ts +2224 -0
- package/dist/src/plan/assemble.d.ts.map +1 -0
- package/dist/src/plan/assemble.js +210 -0
- package/dist/src/plan/assemble.js.map +1 -0
- package/dist/src/plan/builders.d.ts +790 -0
- package/dist/src/plan/builders.d.ts.map +1 -0
- package/dist/src/plan/builders.js +749 -0
- package/dist/src/plan/builders.js.map +1 -0
- package/dist/src/plan/event-rows.d.ts +2565 -0
- package/dist/src/plan/event-rows.d.ts.map +1 -0
- package/dist/src/plan/event-rows.js +689 -0
- package/dist/src/plan/event-rows.js.map +1 -0
- package/dist/src/plan/factories.d.ts +458 -0
- package/dist/src/plan/factories.d.ts.map +1 -0
- package/dist/src/plan/factories.js +484 -0
- package/dist/src/plan/factories.js.map +1 -0
- package/dist/src/plan/index.d.ts +672 -0
- package/dist/src/plan/index.d.ts.map +1 -0
- package/dist/src/plan/index.js +532 -0
- package/dist/src/plan/index.js.map +1 -0
- package/dist/src/plan/ir.d.ts +2594 -0
- package/dist/src/plan/ir.d.ts.map +1 -0
- package/dist/src/plan/ir.js +78 -0
- package/dist/src/plan/ir.js.map +1 -0
- package/dist/src/plan/library.d.ts +772 -0
- package/dist/src/plan/library.d.ts.map +1 -0
- package/dist/src/plan/library.js +424 -0
- package/dist/src/plan/library.js.map +1 -0
- package/dist/src/plan/ordered-source.d.ts +27 -0
- package/dist/src/plan/ordered-source.d.ts.map +1 -0
- package/dist/src/plan/ordered-source.js +48 -0
- package/dist/src/plan/ordered-source.js.map +1 -0
- package/dist/src/plan/over.d.ts +247 -0
- package/dist/src/plan/over.d.ts.map +1 -0
- package/dist/src/plan/over.js +266 -0
- package/dist/src/plan/over.js.map +1 -0
- package/dist/src/plan/pick.d.ts +78 -0
- package/dist/src/plan/pick.d.ts.map +1 -0
- package/dist/src/plan/pick.js +146 -0
- package/dist/src/plan/pick.js.map +1 -0
- package/dist/src/plan/plan.d.ts +11611 -0
- package/dist/src/plan/plan.d.ts.map +1 -0
- package/dist/src/plan/plan.js +428 -0
- package/dist/src/plan/plan.js.map +1 -0
- package/dist/src/plan/refs.d.ts +218 -0
- package/dist/src/plan/refs.d.ts.map +1 -0
- package/dist/src/plan/refs.js +226 -0
- package/dist/src/plan/refs.js.map +1 -0
- package/dist/src/plan/root.d.ts +290 -0
- package/dist/src/plan/root.d.ts.map +1 -0
- package/dist/src/plan/root.js +463 -0
- package/dist/src/plan/root.js.map +1 -0
- package/dist/src/plan/series.d.ts +13554 -0
- package/dist/src/plan/series.d.ts.map +1 -0
- package/dist/src/plan/series.js +1921 -0
- package/dist/src/plan/series.js.map +1 -0
- package/dist/src/plan/types.d.ts +12400 -0
- package/dist/src/plan/types.d.ts.map +1 -0
- package/dist/src/plan/types.js +1335 -0
- package/dist/src/plan/types.js.map +1 -0
- package/dist/src/roster/coverage.d.ts +240 -0
- package/dist/src/roster/coverage.d.ts.map +1 -0
- package/dist/src/roster/coverage.js +109 -0
- package/dist/src/roster/coverage.js.map +1 -0
- package/dist/src/roster/index.d.ts +4028 -0
- package/dist/src/roster/index.d.ts.map +1 -0
- package/dist/src/roster/index.js +115 -0
- package/dist/src/roster/index.js.map +1 -0
- package/dist/src/roster/library.d.ts +106 -0
- package/dist/src/roster/library.d.ts.map +1 -0
- package/dist/src/roster/library.js +78 -0
- package/dist/src/roster/library.js.map +1 -0
- package/dist/src/roster/people.d.ts +50 -0
- package/dist/src/roster/people.d.ts.map +1 -0
- package/dist/src/roster/people.js +32 -0
- package/dist/src/roster/people.js.map +1 -0
- package/dist/src/roster/rules.d.ts +275 -0
- package/dist/src/roster/rules.d.ts.map +1 -0
- package/dist/src/roster/rules.js +162 -0
- package/dist/src/roster/rules.js.map +1 -0
- package/dist/src/roster/types.d.ts +672 -0
- package/dist/src/roster/types.d.ts.map +1 -0
- package/dist/src/roster/types.js +248 -0
- package/dist/src/roster/types.js.map +1 -0
- package/dist/src/roster/visibility.d.ts +66 -0
- package/dist/src/roster/visibility.d.ts.map +1 -0
- package/dist/src/roster/visibility.js +25 -0
- package/dist/src/roster/visibility.js.map +1 -0
- package/dist/src/schedule/days.d.ts +54 -0
- package/dist/src/schedule/days.d.ts.map +1 -0
- package/dist/src/schedule/days.js +68 -0
- package/dist/src/schedule/days.js.map +1 -0
- package/dist/src/schedule/events.d.ts +433 -0
- package/dist/src/schedule/events.d.ts.map +1 -0
- package/dist/src/schedule/events.js +851 -0
- package/dist/src/schedule/events.js.map +1 -0
- package/dist/src/schedule/index.d.ts +150 -0
- package/dist/src/schedule/index.d.ts.map +1 -0
- package/dist/src/schedule/index.js +132 -0
- package/dist/src/schedule/index.js.map +1 -0
- package/dist/src/schedule/library.d.ts +70 -0
- package/dist/src/schedule/library.d.ts.map +1 -0
- package/dist/src/schedule/library.js +102 -0
- package/dist/src/schedule/library.js.map +1 -0
- package/dist/src/schedule/patch.d.ts +74 -0
- package/dist/src/schedule/patch.d.ts.map +1 -0
- package/dist/src/schedule/patch.js +68 -0
- package/dist/src/schedule/patch.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +189 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -0
- package/dist/src/schedule/record-window.js +95 -0
- package/dist/src/schedule/record-window.js.map +1 -0
- package/dist/src/schedule/resources.d.ts +165 -0
- package/dist/src/schedule/resources.d.ts.map +1 -0
- package/dist/src/schedule/resources.js +234 -0
- package/dist/src/schedule/resources.js.map +1 -0
- package/dist/src/schedule/templates.d.ts +47 -0
- package/dist/src/schedule/templates.d.ts.map +1 -0
- package/dist/src/schedule/templates.js +61 -0
- package/dist/src/schedule/templates.js.map +1 -0
- package/dist/src/schedule/types.d.ts +1677 -0
- package/dist/src/schedule/types.d.ts.map +1 -0
- package/dist/src/schedule/types.js +374 -0
- package/dist/src/schedule/types.js.map +1 -0
- package/dist/src/schedule/window.d.ts +154 -0
- package/dist/src/schedule/window.d.ts.map +1 -0
- package/dist/src/schedule/window.js +363 -0
- package/dist/src/schedule/window.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +385 -0
- package/dist/src/sheet/bridge.d.ts.map +1 -0
- package/dist/src/sheet/bridge.js +809 -0
- package/dist/src/sheet/bridge.js.map +1 -0
- package/dist/src/sheet/columns.d.ts +410 -0
- package/dist/src/sheet/columns.d.ts.map +1 -0
- package/dist/src/sheet/columns.js +99 -0
- package/dist/src/sheet/columns.js.map +1 -0
- package/dist/src/sheet/context-bridge.d.ts +48 -0
- package/dist/src/sheet/context-bridge.d.ts.map +1 -0
- package/dist/src/sheet/context-bridge.js +216 -0
- package/dist/src/sheet/context-bridge.js.map +1 -0
- package/dist/src/sheet/draft-bridge.d.ts +37 -0
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -0
- package/dist/src/sheet/draft-bridge.js +153 -0
- package/dist/src/sheet/draft-bridge.js.map +1 -0
- package/dist/src/sheet/drafts.d.ts +14 -0
- package/dist/src/sheet/drafts.d.ts.map +1 -0
- package/dist/src/sheet/drafts.js +14 -0
- package/dist/src/sheet/drafts.js.map +1 -0
- package/dist/src/sheet/editing-bridge.d.ts +40 -0
- package/dist/src/sheet/editing-bridge.d.ts.map +1 -0
- package/dist/src/sheet/editing-bridge.js +231 -0
- package/dist/src/sheet/editing-bridge.js.map +1 -0
- package/dist/src/sheet/editing-types.d.ts +268 -0
- package/dist/src/sheet/editing-types.d.ts.map +1 -0
- package/dist/src/sheet/editing-types.js +34 -0
- package/dist/src/sheet/editing-types.js.map +1 -0
- package/dist/src/sheet/edits.d.ts +37 -0
- package/dist/src/sheet/edits.d.ts.map +1 -0
- package/dist/src/sheet/edits.js +31 -0
- package/dist/src/sheet/edits.js.map +1 -0
- package/dist/src/sheet/fields.d.ts +693 -0
- package/dist/src/sheet/fields.d.ts.map +1 -0
- package/dist/src/sheet/fields.js +280 -0
- package/dist/src/sheet/fields.js.map +1 -0
- package/dist/src/sheet/group.d.ts +165 -0
- package/dist/src/sheet/group.d.ts.map +1 -0
- package/dist/src/sheet/group.js +52 -0
- package/dist/src/sheet/group.js.map +1 -0
- package/dist/src/sheet/index.d.ts +542 -0
- package/dist/src/sheet/index.d.ts.map +1 -0
- package/dist/src/sheet/index.js +387 -0
- package/dist/src/sheet/index.js.map +1 -0
- package/dist/src/sheet/library.d.ts +284 -0
- package/dist/src/sheet/library.d.ts.map +1 -0
- package/dist/src/sheet/library.js +259 -0
- package/dist/src/sheet/library.js.map +1 -0
- package/dist/src/sheet/link.d.ts +398 -0
- package/dist/src/sheet/link.d.ts.map +1 -0
- package/dist/src/sheet/link.js +228 -0
- package/dist/src/sheet/link.js.map +1 -0
- package/dist/src/sheet/record.d.ts +75 -0
- package/dist/src/sheet/record.d.ts.map +1 -0
- package/dist/src/sheet/record.js +128 -0
- package/dist/src/sheet/record.js.map +1 -0
- package/dist/src/sheet/registers.d.ts +681 -0
- package/dist/src/sheet/registers.d.ts.map +1 -0
- package/dist/src/sheet/registers.js +671 -0
- package/dist/src/sheet/registers.js.map +1 -0
- package/dist/src/sheet/root.d.ts +329 -0
- package/dist/src/sheet/root.d.ts.map +1 -0
- package/dist/src/sheet/root.js +511 -0
- package/dist/src/sheet/root.js.map +1 -0
- package/dist/src/sheet/seed-bridge.d.ts +14 -0
- package/dist/src/sheet/seed-bridge.d.ts.map +1 -0
- package/dist/src/sheet/seed-bridge.js +51 -0
- package/dist/src/sheet/seed-bridge.js.map +1 -0
- package/dist/src/sheet/sheet.d.ts +11819 -0
- package/dist/src/sheet/sheet.d.ts.map +1 -0
- package/dist/src/sheet/sheet.js +236 -0
- package/dist/src/sheet/sheet.js.map +1 -0
- package/dist/src/sheet/sub-rows.d.ts +299 -0
- package/dist/src/sheet/sub-rows.d.ts.map +1 -0
- package/dist/src/sheet/sub-rows.js +272 -0
- package/dist/src/sheet/sub-rows.js.map +1 -0
- package/dist/src/sheet/templates.d.ts +161 -0
- package/dist/src/sheet/templates.d.ts.map +1 -0
- package/dist/src/sheet/templates.js +122 -0
- package/dist/src/sheet/templates.js.map +1 -0
- package/dist/src/sheet/transactions.d.ts +76 -0
- package/dist/src/sheet/transactions.d.ts.map +1 -0
- package/dist/src/sheet/transactions.js +40 -0
- package/dist/src/sheet/transactions.js.map +1 -0
- package/dist/src/sheet/types.d.ts +15226 -0
- package/dist/src/sheet/types.d.ts.map +1 -0
- package/dist/src/sheet/types.js +1070 -0
- package/dist/src/sheet/types.js.map +1 -0
- package/dist/src/sheet/views.d.ts +29 -0
- package/dist/src/sheet/views.d.ts.map +1 -0
- package/dist/src/sheet/views.js +43 -0
- package/dist/src/sheet/views.js.map +1 -0
- package/dist/src/studio/component.d.ts.map +1 -1
- package/dist/src/studio/component.js +11 -8
- package/dist/src/studio/component.js.map +1 -1
- package/dist/src/utils/derive.d.ts +134 -8
- package/dist/src/utils/derive.d.ts.map +1 -1
- package/dist/src/utils/derive.js +409 -7
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/ordered-source.d.ts +38 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -0
- package/dist/src/utils/ordered-source.js +45 -0
- package/dist/src/utils/ordered-source.js.map +1 -0
- package/dist/src/utils/row-inspector.d.ts +36 -0
- package/dist/src/utils/row-inspector.d.ts.map +1 -0
- package/dist/src/utils/row-inspector.js +49 -0
- package/dist/src/utils/row-inspector.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +21 -19
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +122 -122
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +9 -9
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts +228 -0
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar-records.examples.js +91 -0
- package/dist/test/calendar/calendar-records.examples.js.map +1 -0
- package/dist/test/calendar/calendar.examples.d.ts +776 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar.examples.js +336 -0
- package/dist/test/calendar/calendar.examples.js.map +1 -0
- package/dist/test/decision/journal.examples.d.ts +28 -28
- package/dist/test/decision/journal.examples.d.ts.map +1 -1
- package/dist/test/decision/journal.examples.js +4 -4
- package/dist/test/decision/journal.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +5 -7
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +3713 -0
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -0
- package/dist/test/flowchart/flowchart.examples.js +465 -0
- package/dist/test/flowchart/flowchart.examples.js.map +1 -0
- package/dist/test/plan/plan-events.examples.d.ts +3666 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-events.examples.js +773 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -0
- package/dist/test/plan/plan-records.examples.d.ts +3 -0
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-records.examples.js +45 -0
- package/dist/test/plan/plan-records.examples.js.map +1 -0
- package/dist/test/plan/plan-windows.examples.d.ts +588 -0
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-windows.examples.js +170 -0
- package/dist/test/plan/plan-windows.examples.js.map +1 -0
- package/dist/test/plan/plan.examples.d.ts +8095 -0
- package/dist/test/plan/plan.examples.d.ts.map +1 -0
- package/dist/test/plan/plan.examples.js +2500 -0
- package/dist/test/plan/plan.examples.js.map +1 -0
- package/dist/test/roster/domain.examples.d.ts +367 -0
- package/dist/test/roster/domain.examples.d.ts.map +1 -0
- package/dist/test/roster/domain.examples.js +72 -0
- package/dist/test/roster/domain.examples.js.map +1 -0
- package/dist/test/roster/roster-records.examples.d.ts +729 -0
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -0
- package/dist/test/roster/roster-records.examples.js +86 -0
- package/dist/test/roster/roster-records.examples.js.map +1 -0
- package/dist/test/roster/roster.examples.d.ts +750 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -0
- package/dist/test/roster/roster.examples.js +198 -0
- package/dist/test/roster/roster.examples.js.map +1 -0
- package/dist/test/roster/warehouse.d.ts +87 -0
- package/dist/test/roster/warehouse.d.ts.map +1 -0
- package/dist/test/roster/warehouse.js +883 -0
- package/dist/test/roster/warehouse.js.map +1 -0
- package/dist/test/sheet/sheet-link.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-link.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-link.examples.js +41 -0
- package/dist/test/sheet/sheet-link.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +421 -0
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-records.examples.js +79 -0
- package/dist/test/sheet/sheet-records.examples.js.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.js +58 -0
- package/dist/test/sheet/sheet-transactions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +5562 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet.examples.js +1178 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +11 -11
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -9
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* `Flowchart.library` — the flowchart's library pane (#1246, #1248,
|
|
7
|
+
* `Flowchart Builder Spec.md` decisions 5–8, §4.2, §4.4, FB13, FB25–FB29):
|
|
8
|
+
* `library` lists the pane's tabs, in order, each a `Flowchart.library.*`
|
|
9
|
+
* call. Left out, or empty, the flowchart has no library pane.
|
|
10
|
+
*
|
|
11
|
+
* - `Flowchart.library.flows()` (#1246) — the Flows tab: every flow the
|
|
12
|
+
* flowchart holds by name, a click opening one on the canvas, and "+ New
|
|
13
|
+
* flow" naming another. Over one flow there is none to list, so one flow's
|
|
14
|
+
* library takes every tab but it.
|
|
15
|
+
* - `Flowchart.library.states(rows, { … })` — state templates: one card per
|
|
16
|
+
* row, its `drop` the fields of the state a card dropped on a lane adds.
|
|
17
|
+
* - `Flowchart.library.transitions(rows, { … })` — transition templates: one
|
|
18
|
+
* card per row, its `drop` the fields a card sets on the transition it lands
|
|
19
|
+
* on.
|
|
20
|
+
* - `Flowchart.library.tab(rows, { … })` — the author's own cards; given a
|
|
21
|
+
* `drop`, its patch's type names what a card lands on: a state, a
|
|
22
|
+
* transition, a lane's header or a decision's diamond.
|
|
23
|
+
*
|
|
24
|
+
* Each data tab takes its own bound data (the user, 2026-10-08), apart from
|
|
25
|
+
* the flows and from the other tabs: its rows are an `Array<T>` or a
|
|
26
|
+
* `Dict<String, T>` the app binds — a value, or an expression such as a
|
|
27
|
+
* binding's `read()` — read as `Sheet.library.tab` reads its rows: its
|
|
28
|
+
* accessors `(row, key) => …` reified once into a describe function the rows'
|
|
29
|
+
* map then calls, a Dict's key the second argument and an Array's index,
|
|
30
|
+
* printed, in its place; a key that repeats keeps its first card. A card
|
|
31
|
+
* crosses the closed payload as the fields its drop sets, typed by the row it
|
|
32
|
+
* lands on — a flow's rows are the flowchart's own types. Dropped on the
|
|
33
|
+
* canvas (#1249), a state template adds a state where it lands on a lane, a
|
|
34
|
+
* transition template retypes the transition it lands on, and an author's card
|
|
35
|
+
* sets its fields on what its drop's type names; ⏎ on a card drops it on the
|
|
36
|
+
* canvas's selection.
|
|
37
|
+
*
|
|
38
|
+
* @packageDocumentation
|
|
39
|
+
*/
|
|
40
|
+
import { ArrayType, DictType, NullType, OptionType, StringType, StructType, VariantType, type EastType, type ExprType, type SubtypeExprOrValue } from "@elaraai/east";
|
|
41
|
+
import { type FlowchartPatchOf } from "./patch.js";
|
|
42
|
+
import { FlowchartLinkType, FlowchartStateType } from "./types.js";
|
|
43
|
+
/**
|
|
44
|
+
* A card a library tab lists that drops nothing: an author's card read, never
|
|
45
|
+
* dragged.
|
|
46
|
+
*
|
|
47
|
+
* @property key - Its identity in its tab
|
|
48
|
+
* @property label - Its title
|
|
49
|
+
* @property meta - A line under its title
|
|
50
|
+
* @property group - The group its tab lists it under
|
|
51
|
+
*/
|
|
52
|
+
export declare const FlowchartCardType: StructType<{
|
|
53
|
+
readonly key: StringType;
|
|
54
|
+
readonly label: StringType;
|
|
55
|
+
readonly meta: OptionType<StringType>;
|
|
56
|
+
readonly group: OptionType<StringType>;
|
|
57
|
+
}>;
|
|
58
|
+
/** Type representing {@link FlowchartCardType}. */
|
|
59
|
+
export type FlowchartCardType = typeof FlowchartCardType;
|
|
60
|
+
/**
|
|
61
|
+
* A state template's card: what it shows, and the fields of the state it
|
|
62
|
+
* adds, over a state's defaults — the `Flowchart.patch(Flowchart.Types.State, …)`
|
|
63
|
+
* its drop returns.
|
|
64
|
+
*/
|
|
65
|
+
export declare const FlowchartStateCardType: StructType<{
|
|
66
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
67
|
+
readonly key: StringType;
|
|
68
|
+
readonly label: OptionType<StringType>;
|
|
69
|
+
readonly lane: StringType;
|
|
70
|
+
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
71
|
+
readonly notes: OptionType<StringType>;
|
|
72
|
+
}>>;
|
|
73
|
+
readonly key: StringType;
|
|
74
|
+
readonly label: StringType;
|
|
75
|
+
readonly meta: OptionType<StringType>;
|
|
76
|
+
readonly group: OptionType<StringType>;
|
|
77
|
+
}>;
|
|
78
|
+
/** Type representing {@link FlowchartStateCardType}. */
|
|
79
|
+
export type FlowchartStateCardType = typeof FlowchartStateCardType;
|
|
80
|
+
/**
|
|
81
|
+
* A transition template's card: what it shows, and the fields it sets on the
|
|
82
|
+
* transition it lands on — the `Flowchart.patch(Flowchart.Types.Link, …)` its
|
|
83
|
+
* drop returns.
|
|
84
|
+
*/
|
|
85
|
+
export declare const FlowchartTransitionCardType: StructType<{
|
|
86
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
87
|
+
readonly key: OptionType<StringType>;
|
|
88
|
+
readonly from: StringType;
|
|
89
|
+
readonly to: StringType;
|
|
90
|
+
readonly kind: OptionType<VariantType<{
|
|
91
|
+
readonly planned: NullType;
|
|
92
|
+
readonly observed: NullType;
|
|
93
|
+
}>>;
|
|
94
|
+
readonly trigger: OptionType<StringType>;
|
|
95
|
+
readonly evidence: OptionType<StructType<{
|
|
96
|
+
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
97
|
+
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
98
|
+
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
99
|
+
readonly unit: OptionType<StringType>;
|
|
100
|
+
}>>;
|
|
101
|
+
}>>;
|
|
102
|
+
readonly key: StringType;
|
|
103
|
+
readonly label: StringType;
|
|
104
|
+
readonly meta: OptionType<StringType>;
|
|
105
|
+
readonly group: OptionType<StringType>;
|
|
106
|
+
}>;
|
|
107
|
+
/** Type representing {@link FlowchartTransitionCardType}. */
|
|
108
|
+
export type FlowchartTransitionCardType = typeof FlowchartTransitionCardType;
|
|
109
|
+
/** An author's card that lands on a lane's header, and the lane's fields it sets. */
|
|
110
|
+
export declare const FlowchartLaneCardType: StructType<{
|
|
111
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
112
|
+
readonly key: StringType;
|
|
113
|
+
readonly label: OptionType<StringType>;
|
|
114
|
+
}>>;
|
|
115
|
+
readonly key: StringType;
|
|
116
|
+
readonly label: StringType;
|
|
117
|
+
readonly meta: OptionType<StringType>;
|
|
118
|
+
readonly group: OptionType<StringType>;
|
|
119
|
+
}>;
|
|
120
|
+
/** Type representing {@link FlowchartLaneCardType}. */
|
|
121
|
+
export type FlowchartLaneCardType = typeof FlowchartLaneCardType;
|
|
122
|
+
/** An author's card that lands on a decision's diamond, and the decision's fields it sets. */
|
|
123
|
+
export declare const FlowchartDecisionCardType: StructType<{
|
|
124
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
125
|
+
readonly key: StringType;
|
|
126
|
+
readonly label: StringType;
|
|
127
|
+
readonly letter: OptionType<StringType>;
|
|
128
|
+
readonly owner: OptionType<StringType>;
|
|
129
|
+
readonly queue: OptionType<ArrayType<StringType>>;
|
|
130
|
+
readonly outcomes: OptionType<StringType>;
|
|
131
|
+
}>>;
|
|
132
|
+
readonly key: StringType;
|
|
133
|
+
readonly label: StringType;
|
|
134
|
+
readonly meta: OptionType<StringType>;
|
|
135
|
+
readonly group: OptionType<StringType>;
|
|
136
|
+
}>;
|
|
137
|
+
/** Type representing {@link FlowchartDecisionCardType}. */
|
|
138
|
+
export type FlowchartDecisionCardType = typeof FlowchartDecisionCardType;
|
|
139
|
+
/**
|
|
140
|
+
* An author's tab's cards, by what they land on — the type of the patch its
|
|
141
|
+
* `drop` returns — each card with the fields it sets there.
|
|
142
|
+
*
|
|
143
|
+
* @property none - The tab declares no `drop`: its cards are read, never dragged
|
|
144
|
+
* @property state - Its cards land on a state
|
|
145
|
+
* @property transition - Its cards land on a transition
|
|
146
|
+
* @property lane - Its cards land on a lane's header
|
|
147
|
+
* @property decision - Its cards land on a decision's diamond
|
|
148
|
+
*/
|
|
149
|
+
export declare const FlowchartLandsType: VariantType<{
|
|
150
|
+
readonly none: ArrayType<StructType<{
|
|
151
|
+
readonly key: StringType;
|
|
152
|
+
readonly label: StringType;
|
|
153
|
+
readonly meta: OptionType<StringType>;
|
|
154
|
+
readonly group: OptionType<StringType>;
|
|
155
|
+
}>>;
|
|
156
|
+
readonly state: ArrayType<StructType<{
|
|
157
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
158
|
+
readonly key: StringType;
|
|
159
|
+
readonly label: OptionType<StringType>;
|
|
160
|
+
readonly lane: StringType;
|
|
161
|
+
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
162
|
+
readonly notes: OptionType<StringType>;
|
|
163
|
+
}>>;
|
|
164
|
+
readonly key: StringType;
|
|
165
|
+
readonly label: StringType;
|
|
166
|
+
readonly meta: OptionType<StringType>;
|
|
167
|
+
readonly group: OptionType<StringType>;
|
|
168
|
+
}>>;
|
|
169
|
+
readonly transition: ArrayType<StructType<{
|
|
170
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
171
|
+
readonly key: OptionType<StringType>;
|
|
172
|
+
readonly from: StringType;
|
|
173
|
+
readonly to: StringType;
|
|
174
|
+
readonly kind: OptionType<VariantType<{
|
|
175
|
+
readonly planned: NullType;
|
|
176
|
+
readonly observed: NullType;
|
|
177
|
+
}>>;
|
|
178
|
+
readonly trigger: OptionType<StringType>;
|
|
179
|
+
readonly evidence: OptionType<StructType<{
|
|
180
|
+
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
181
|
+
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
182
|
+
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
183
|
+
readonly unit: OptionType<StringType>;
|
|
184
|
+
}>>;
|
|
185
|
+
}>>;
|
|
186
|
+
readonly key: StringType;
|
|
187
|
+
readonly label: StringType;
|
|
188
|
+
readonly meta: OptionType<StringType>;
|
|
189
|
+
readonly group: OptionType<StringType>;
|
|
190
|
+
}>>;
|
|
191
|
+
readonly lane: ArrayType<StructType<{
|
|
192
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
193
|
+
readonly key: StringType;
|
|
194
|
+
readonly label: OptionType<StringType>;
|
|
195
|
+
}>>;
|
|
196
|
+
readonly key: StringType;
|
|
197
|
+
readonly label: StringType;
|
|
198
|
+
readonly meta: OptionType<StringType>;
|
|
199
|
+
readonly group: OptionType<StringType>;
|
|
200
|
+
}>>;
|
|
201
|
+
readonly decision: ArrayType<StructType<{
|
|
202
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
203
|
+
readonly key: StringType;
|
|
204
|
+
readonly label: StringType;
|
|
205
|
+
readonly letter: OptionType<StringType>;
|
|
206
|
+
readonly owner: OptionType<StringType>;
|
|
207
|
+
readonly queue: OptionType<ArrayType<StringType>>;
|
|
208
|
+
readonly outcomes: OptionType<StringType>;
|
|
209
|
+
}>>;
|
|
210
|
+
readonly key: StringType;
|
|
211
|
+
readonly label: StringType;
|
|
212
|
+
readonly meta: OptionType<StringType>;
|
|
213
|
+
readonly group: OptionType<StringType>;
|
|
214
|
+
}>>;
|
|
215
|
+
}>;
|
|
216
|
+
/** Type representing {@link FlowchartLandsType}. */
|
|
217
|
+
export type FlowchartLandsType = typeof FlowchartLandsType;
|
|
218
|
+
/**
|
|
219
|
+
* One tab of the library pane, as `library` lists it (`Flowchart Builder
|
|
220
|
+
* Spec.md` §4.2).
|
|
221
|
+
*
|
|
222
|
+
* @remarks
|
|
223
|
+
* A card crosses the closed payload as the fields its drop sets, typed by the
|
|
224
|
+
* row it lands on — a flow's rows are the flowchart's own types. A template
|
|
225
|
+
* tab's name is the author's when given; left out, the renderer names it in
|
|
226
|
+
* its words (`States`, `Transitions`), so a host translates it.
|
|
227
|
+
*
|
|
228
|
+
* @property flows - Every flow in the record; a click opens one
|
|
229
|
+
* @property states - State templates from the tab's own rows: its name, its icon and its cards
|
|
230
|
+
* @property transitions - Transition templates from the tab's own rows: its name, its icon and its cards
|
|
231
|
+
* @property tab - The author's own cards: its name, its icon, and its cards by what they land on
|
|
232
|
+
*/
|
|
233
|
+
export declare const FlowchartLibraryTabType: VariantType<{
|
|
234
|
+
readonly flows: NullType;
|
|
235
|
+
readonly states: StructType<{
|
|
236
|
+
readonly name: OptionType<StringType>;
|
|
237
|
+
readonly icon: OptionType<StringType>;
|
|
238
|
+
readonly cards: ArrayType<StructType<{
|
|
239
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
240
|
+
readonly key: StringType;
|
|
241
|
+
readonly label: OptionType<StringType>;
|
|
242
|
+
readonly lane: StringType;
|
|
243
|
+
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
244
|
+
readonly notes: OptionType<StringType>;
|
|
245
|
+
}>>;
|
|
246
|
+
readonly key: StringType;
|
|
247
|
+
readonly label: StringType;
|
|
248
|
+
readonly meta: OptionType<StringType>;
|
|
249
|
+
readonly group: OptionType<StringType>;
|
|
250
|
+
}>>;
|
|
251
|
+
}>;
|
|
252
|
+
readonly transitions: StructType<{
|
|
253
|
+
readonly name: OptionType<StringType>;
|
|
254
|
+
readonly icon: OptionType<StringType>;
|
|
255
|
+
readonly cards: ArrayType<StructType<{
|
|
256
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
257
|
+
readonly key: OptionType<StringType>;
|
|
258
|
+
readonly from: StringType;
|
|
259
|
+
readonly to: StringType;
|
|
260
|
+
readonly kind: OptionType<VariantType<{
|
|
261
|
+
readonly planned: NullType;
|
|
262
|
+
readonly observed: NullType;
|
|
263
|
+
}>>;
|
|
264
|
+
readonly trigger: OptionType<StringType>;
|
|
265
|
+
readonly evidence: OptionType<StructType<{
|
|
266
|
+
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
267
|
+
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
268
|
+
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
269
|
+
readonly unit: OptionType<StringType>;
|
|
270
|
+
}>>;
|
|
271
|
+
}>>;
|
|
272
|
+
readonly key: StringType;
|
|
273
|
+
readonly label: StringType;
|
|
274
|
+
readonly meta: OptionType<StringType>;
|
|
275
|
+
readonly group: OptionType<StringType>;
|
|
276
|
+
}>>;
|
|
277
|
+
}>;
|
|
278
|
+
readonly tab: StructType<{
|
|
279
|
+
readonly name: StringType;
|
|
280
|
+
readonly icon: OptionType<StringType>;
|
|
281
|
+
readonly lands: VariantType<{
|
|
282
|
+
readonly none: ArrayType<StructType<{
|
|
283
|
+
readonly key: StringType;
|
|
284
|
+
readonly label: StringType;
|
|
285
|
+
readonly meta: OptionType<StringType>;
|
|
286
|
+
readonly group: OptionType<StringType>;
|
|
287
|
+
}>>;
|
|
288
|
+
readonly state: ArrayType<StructType<{
|
|
289
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
290
|
+
readonly key: StringType;
|
|
291
|
+
readonly label: OptionType<StringType>;
|
|
292
|
+
readonly lane: StringType;
|
|
293
|
+
readonly members: OptionType<import("@elaraai/east").IntegerType>;
|
|
294
|
+
readonly notes: OptionType<StringType>;
|
|
295
|
+
}>>;
|
|
296
|
+
readonly key: StringType;
|
|
297
|
+
readonly label: StringType;
|
|
298
|
+
readonly meta: OptionType<StringType>;
|
|
299
|
+
readonly group: OptionType<StringType>;
|
|
300
|
+
}>>;
|
|
301
|
+
readonly transition: ArrayType<StructType<{
|
|
302
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
303
|
+
readonly key: OptionType<StringType>;
|
|
304
|
+
readonly from: StringType;
|
|
305
|
+
readonly to: StringType;
|
|
306
|
+
readonly kind: OptionType<VariantType<{
|
|
307
|
+
readonly planned: NullType;
|
|
308
|
+
readonly observed: NullType;
|
|
309
|
+
}>>;
|
|
310
|
+
readonly trigger: OptionType<StringType>;
|
|
311
|
+
readonly evidence: OptionType<StructType<{
|
|
312
|
+
readonly volume: OptionType<import("@elaraai/east").FloatType>;
|
|
313
|
+
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
314
|
+
readonly measuredAt: OptionType<import("@elaraai/east").DateTimeType>;
|
|
315
|
+
readonly unit: OptionType<StringType>;
|
|
316
|
+
}>>;
|
|
317
|
+
}>>;
|
|
318
|
+
readonly key: StringType;
|
|
319
|
+
readonly label: StringType;
|
|
320
|
+
readonly meta: OptionType<StringType>;
|
|
321
|
+
readonly group: OptionType<StringType>;
|
|
322
|
+
}>>;
|
|
323
|
+
readonly lane: ArrayType<StructType<{
|
|
324
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
325
|
+
readonly key: StringType;
|
|
326
|
+
readonly label: OptionType<StringType>;
|
|
327
|
+
}>>;
|
|
328
|
+
readonly key: StringType;
|
|
329
|
+
readonly label: StringType;
|
|
330
|
+
readonly meta: OptionType<StringType>;
|
|
331
|
+
readonly group: OptionType<StringType>;
|
|
332
|
+
}>>;
|
|
333
|
+
readonly decision: ArrayType<StructType<{
|
|
334
|
+
readonly sets: FlowchartPatchOf<StructType<{
|
|
335
|
+
readonly key: StringType;
|
|
336
|
+
readonly label: StringType;
|
|
337
|
+
readonly letter: OptionType<StringType>;
|
|
338
|
+
readonly owner: OptionType<StringType>;
|
|
339
|
+
readonly queue: OptionType<ArrayType<StringType>>;
|
|
340
|
+
readonly outcomes: OptionType<StringType>;
|
|
341
|
+
}>>;
|
|
342
|
+
readonly key: StringType;
|
|
343
|
+
readonly label: StringType;
|
|
344
|
+
readonly meta: OptionType<StringType>;
|
|
345
|
+
readonly group: OptionType<StringType>;
|
|
346
|
+
}>>;
|
|
347
|
+
}>;
|
|
348
|
+
}>;
|
|
349
|
+
}>;
|
|
350
|
+
/** Type representing {@link FlowchartLibraryTabType}. */
|
|
351
|
+
export type FlowchartLibraryTabType = typeof FlowchartLibraryTabType;
|
|
352
|
+
/**
|
|
353
|
+
* What a data tab's card shows, read off one of its rows — its value and its
|
|
354
|
+
* key: a Dict's key, or an Array's index, printed — as `Sheet.library.tab`'s
|
|
355
|
+
* accessors read them.
|
|
356
|
+
*
|
|
357
|
+
* @typeParam T - The rows' element type
|
|
358
|
+
*/
|
|
359
|
+
export interface FlowchartCardAccessors<T extends EastType> {
|
|
360
|
+
/** The card's key — unique within the tab; a key that repeats keeps its first card. */
|
|
361
|
+
key: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<StringType>;
|
|
362
|
+
/** The card's name. */
|
|
363
|
+
label: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<StringType>;
|
|
364
|
+
/** The line under it — return the field's `Option`. */
|
|
365
|
+
meta?: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<OptionType<StringType>>;
|
|
366
|
+
/** The tab's group the card sits under. */
|
|
367
|
+
group?: (row: ExprType<T>, key: ExprType<StringType>) => SubtypeExprOrValue<StringType>;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* A state template tab — `Flowchart.library.states(rows, { … })`: its name
|
|
371
|
+
* and icon, what each card shows, and the fields of the state it adds.
|
|
372
|
+
*
|
|
373
|
+
* @typeParam T - The rows' element type
|
|
374
|
+
*/
|
|
375
|
+
export interface FlowchartStatesConfig<T extends EastType> extends FlowchartCardAccessors<T> {
|
|
376
|
+
/** The tab's name; left out, `States`, in the flowchart's words. */
|
|
377
|
+
name?: string;
|
|
378
|
+
/** A Font Awesome solid icon name for the tab's cards. */
|
|
379
|
+
icon?: string;
|
|
380
|
+
/** The fields of the state a card dropped on a lane adds, over a state's defaults: `Flowchart.patch(Flowchart.Types.State, { … })`. */
|
|
381
|
+
drop: (row: ExprType<T>, key: ExprType<StringType>) => ExprType<FlowchartPatchOf<FlowchartStateType>>;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* A transition template tab — `Flowchart.library.transitions(rows, { … })`:
|
|
385
|
+
* its name and icon, what each card shows, and the fields it sets on the
|
|
386
|
+
* transition it lands on.
|
|
387
|
+
*
|
|
388
|
+
* @typeParam T - The rows' element type
|
|
389
|
+
*/
|
|
390
|
+
export interface FlowchartTransitionsConfig<T extends EastType> extends FlowchartCardAccessors<T> {
|
|
391
|
+
/** The tab's name; left out, `Transitions`, in the flowchart's words. */
|
|
392
|
+
name?: string;
|
|
393
|
+
/** A Font Awesome solid icon name for the tab's cards. */
|
|
394
|
+
icon?: string;
|
|
395
|
+
/**
|
|
396
|
+
* The fields a card sets on the transition it lands on —
|
|
397
|
+
* `Flowchart.patch(Flowchart.Types.Link, { … })`: its kind, its decision
|
|
398
|
+
* and its other fields, never its `key`, `from` or `to`.
|
|
399
|
+
*/
|
|
400
|
+
drop: (row: ExprType<T>, key: ExprType<StringType>) => ExprType<FlowchartPatchOf<FlowchartLinkType>>;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* An author's tab — `Flowchart.library.tab(rows, { … })`: its name and icon,
|
|
404
|
+
* what each card shows, and, given a `drop`, the fields a card sets where it
|
|
405
|
+
* lands.
|
|
406
|
+
*
|
|
407
|
+
* @typeParam T - The rows' element type
|
|
408
|
+
* @typeParam P - The patch `drop` returns: `Flowchart.Types.Patch` of a flow's row type
|
|
409
|
+
*/
|
|
410
|
+
export interface FlowchartTabConfig<T extends EastType, P extends EastType = EastType> extends FlowchartCardAccessors<T> {
|
|
411
|
+
/** The tab's name: its label in the tab row, and its identity in `library`. */
|
|
412
|
+
name: string;
|
|
413
|
+
/** A Font Awesome solid icon name for the tab's cards. */
|
|
414
|
+
icon?: string;
|
|
415
|
+
/**
|
|
416
|
+
* What a dropped card sets: `Flowchart.patch(R, { … })` over a flow's row
|
|
417
|
+
* type, whose type names what it lands on — `State` a state, `Link` a
|
|
418
|
+
* transition, `Lane` a lane's header, `Trigger` a decision's diamond.
|
|
419
|
+
* Without one, the cards are read, never dragged.
|
|
420
|
+
*/
|
|
421
|
+
drop?: (row: ExprType<T>, key: ExprType<StringType>) => ExprType<P>;
|
|
422
|
+
}
|
|
423
|
+
/** The Flows tab, as `Flowchart.library.flows()` returns it. */
|
|
424
|
+
export interface FlowchartFlowsTab {
|
|
425
|
+
readonly kind: "flows";
|
|
426
|
+
}
|
|
427
|
+
/** The state templates' tab, as `Flowchart.library.states(…)` returns it: its rows and how it reads them. */
|
|
428
|
+
export interface FlowchartStatesTab {
|
|
429
|
+
readonly kind: "states";
|
|
430
|
+
readonly rows: unknown;
|
|
431
|
+
readonly config: FlowchartStatesConfig<EastType>;
|
|
432
|
+
}
|
|
433
|
+
/** The transition templates' tab, as `Flowchart.library.transitions(…)` returns it: its rows and how it reads them. */
|
|
434
|
+
export interface FlowchartTransitionsTab {
|
|
435
|
+
readonly kind: "transitions";
|
|
436
|
+
readonly rows: unknown;
|
|
437
|
+
readonly config: FlowchartTransitionsConfig<EastType>;
|
|
438
|
+
}
|
|
439
|
+
/** An author's tab, as `Flowchart.library.tab(…)` returns it: its rows and how it reads them. */
|
|
440
|
+
export interface FlowchartAuthorTab {
|
|
441
|
+
readonly kind: "tab";
|
|
442
|
+
readonly rows: unknown;
|
|
443
|
+
readonly config: FlowchartTabConfig<EastType>;
|
|
444
|
+
}
|
|
445
|
+
/** One tab of the library pane — what each `Flowchart.library.*` call returns, and `library` lists. */
|
|
446
|
+
export type FlowchartLibraryTab = FlowchartFlowsTab | FlowchartStatesTab | FlowchartTransitionsTab | FlowchartAuthorTab;
|
|
447
|
+
/**
|
|
448
|
+
* The tabs a flowchart over one flow may list: every tab but the Flows tab,
|
|
449
|
+
* which lists flows by name — one flow has none to list (FB16).
|
|
450
|
+
*/
|
|
451
|
+
export type FlowchartOneFlowLibraryTab = FlowchartStatesTab | FlowchartTransitionsTab | FlowchartAuthorTab;
|
|
452
|
+
/** The rows a data tab reads: an Array, or a Dict by String keys. */
|
|
453
|
+
export type FlowchartLibraryRows<T extends EastType> = SubtypeExprOrValue<ArrayType<T>> | SubtypeExprOrValue<DictType<StringType, T>>;
|
|
454
|
+
/**
|
|
455
|
+
* The Flows tab — `Flowchart.library.flows()` (FB13, FB14): every flow the
|
|
456
|
+
* flowchart holds, by name, each card its name and its description — or, with
|
|
457
|
+
* none, its counts — the open flow placed, and a flow whose drafts are not
|
|
458
|
+
* yet saved marked Pending. A click opens a flow on the canvas, and the
|
|
459
|
+
* tab's search reads names and descriptions. Where the flowchart edits — a
|
|
460
|
+
* record, or the host's flows given `onApply`, and not read only — "+ New
|
|
461
|
+
* flow" names another, refusing a name the flowchart holds, and opens it
|
|
462
|
+
* empty, one lane, as a draft the history item saves or discards.
|
|
463
|
+
*
|
|
464
|
+
* @remarks
|
|
465
|
+
* Over a record of flows, or the host's flows by name. Over one flow (`data`
|
|
466
|
+
* of `Flowchart.Types.Flow`) it is refused, when the surface is built and by
|
|
467
|
+
* the tag's types.
|
|
468
|
+
*
|
|
469
|
+
* @returns The tab
|
|
470
|
+
*
|
|
471
|
+
* @example
|
|
472
|
+
* ```tsx
|
|
473
|
+
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
474
|
+
* import { East } from "@elaraai/east";
|
|
475
|
+
* import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
476
|
+
* import { Flowchart, Record } from "@elaraai/e3-ui";
|
|
477
|
+
* import e3 from "@elaraai/e3";
|
|
478
|
+
*
|
|
479
|
+
* export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, Flowchart.values({
|
|
480
|
+
* "Inbound parcels": {
|
|
481
|
+
* description: "From the trailer to the van",
|
|
482
|
+
* lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
|
|
483
|
+
* states: [
|
|
484
|
+
* { key: "ARV", label: "Arrived", lane: "intake" },
|
|
485
|
+
* { key: "SCN", label: "Scanned", lane: "intake" },
|
|
486
|
+
* { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
|
|
487
|
+
* { key: "LDD", label: "Loaded", lane: "load" },
|
|
488
|
+
* ],
|
|
489
|
+
* links: [
|
|
490
|
+
* { from: "ARV", to: "SCN" },
|
|
491
|
+
* { from: "SCN", to: "CH*", trigger: "route" },
|
|
492
|
+
* { from: "CH*", to: "LDD" },
|
|
493
|
+
* { from: "SCN", to: "SCN", kind: "observed" },
|
|
494
|
+
* ],
|
|
495
|
+
* triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
|
|
496
|
+
* },
|
|
497
|
+
* "Returns": {
|
|
498
|
+
* description: "From the counter back to the sender",
|
|
499
|
+
* lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
|
|
500
|
+
* states: [
|
|
501
|
+
* { key: "RCV", label: "Received", lane: "counter" },
|
|
502
|
+
* { key: "INS", label: "Inspected", lane: "check" },
|
|
503
|
+
* { key: "RSD", label: "Resent", lane: "out" },
|
|
504
|
+
* ],
|
|
505
|
+
* links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
|
|
506
|
+
* },
|
|
507
|
+
* }));
|
|
508
|
+
* export const depotFlowsPatch = e3.mutation.patch(depotFlows);
|
|
509
|
+
*
|
|
510
|
+
* const flowchart = East.function([], UIComponentType, (_$) => (
|
|
511
|
+
* <Reactive>{$ => {
|
|
512
|
+
* const flows = $.let(Record.bind(depotFlows, [depotFlowsPatch]));
|
|
513
|
+
* return (
|
|
514
|
+
* <Box height="500px">
|
|
515
|
+
* <Flowchart record={flows} flow="Inbound parcels" library={[Flowchart.library.flows()]} />
|
|
516
|
+
* </Box>
|
|
517
|
+
* );
|
|
518
|
+
* }}</Reactive>
|
|
519
|
+
* ));
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
export declare function libraryFlows(): FlowchartFlowsTab;
|
|
523
|
+
/**
|
|
524
|
+
* The state templates — `Flowchart.library.states(rows, { … })` (FB26,
|
|
525
|
+
* decisions 6 and 7): one card per row of the tab's own rows — its label, the
|
|
526
|
+
* line under it, the tab's icon — grouped by its `group` and searched by its
|
|
527
|
+
* key, label and line. Each card is a drag source, and a click selects it, a
|
|
528
|
+
* click on the selected card letting it go. A card dropped on a lane adds a
|
|
529
|
+
* state there, seeded with the fields its `drop` sets over a state's defaults
|
|
530
|
+
* (#1249).
|
|
531
|
+
*
|
|
532
|
+
* @remarks
|
|
533
|
+
* The rows are the app's own — an input or a record the app binds, apart from
|
|
534
|
+
* the flows and from the other tabs — read as `Sheet.library.tab` reads its
|
|
535
|
+
* rows: an `Array<T>` or a `Dict<String, T>`, each accessor taking a row and
|
|
536
|
+
* its key, a Dict's key or an Array's index, printed. A key that repeats keeps
|
|
537
|
+
* its first card. Left out, the tab's name is `States`, in the flowchart's
|
|
538
|
+
* words. Refused when the surface is built: rows that are neither an Array
|
|
539
|
+
* nor a `Dict<String, T>`, a `drop` over another type than
|
|
540
|
+
* `Flowchart.Types.State`, and the tab listed twice.
|
|
541
|
+
*
|
|
542
|
+
* @typeParam T - The rows' element type
|
|
543
|
+
* @param rows - The rows — an `Array<T>` or a `Dict<String, T>` value or expression, such as a binding's `read()`
|
|
544
|
+
* @param config - The tab's name and icon, what each card shows, and its `drop` ({@link FlowchartStatesConfig})
|
|
545
|
+
* @returns The tab
|
|
546
|
+
*
|
|
547
|
+
* @example
|
|
548
|
+
* ```tsx
|
|
549
|
+
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
550
|
+
* import { ArrayType, DictType, East, IntegerType, OptionType, StringType, StructType, none, some, variant } from "@elaraai/east";
|
|
551
|
+
* import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
552
|
+
* import { Data, Flowchart, Record } from "@elaraai/e3-ui";
|
|
553
|
+
* import e3 from "@elaraai/e3";
|
|
554
|
+
*
|
|
555
|
+
* export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, Flowchart.values({
|
|
556
|
+
* "Inbound parcels": {
|
|
557
|
+
* description: "From the trailer to the van",
|
|
558
|
+
* lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
|
|
559
|
+
* states: [
|
|
560
|
+
* { key: "ARV", label: "Arrived", lane: "intake" },
|
|
561
|
+
* { key: "SCN", label: "Scanned", lane: "intake" },
|
|
562
|
+
* { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
|
|
563
|
+
* { key: "LDD", label: "Loaded", lane: "load" },
|
|
564
|
+
* ],
|
|
565
|
+
* links: [
|
|
566
|
+
* { from: "ARV", to: "SCN" },
|
|
567
|
+
* { from: "SCN", to: "CH*", trigger: "route" },
|
|
568
|
+
* { from: "CH*", to: "LDD" },
|
|
569
|
+
* { from: "SCN", to: "SCN", kind: "observed" },
|
|
570
|
+
* ],
|
|
571
|
+
* triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
|
|
572
|
+
* },
|
|
573
|
+
* "Returns": {
|
|
574
|
+
* description: "From the counter back to the sender",
|
|
575
|
+
* lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
|
|
576
|
+
* states: [
|
|
577
|
+
* { key: "RCV", label: "Received", lane: "counter" },
|
|
578
|
+
* { key: "INS", label: "Inspected", lane: "check" },
|
|
579
|
+
* { key: "RSD", label: "Resent", lane: "out" },
|
|
580
|
+
* ],
|
|
581
|
+
* links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
|
|
582
|
+
* },
|
|
583
|
+
* }));
|
|
584
|
+
* export const depotFlowsPatch = e3.mutation.patch(depotFlows);
|
|
585
|
+
* export const StepTemplate = StructType({ code: StringType, name: StringType, kind: StringType, slots: OptionType(IntegerType) });
|
|
586
|
+
* export const stepTemplates = e3.input("flowchart_step_templates", ArrayType(StepTemplate), variant("value", [
|
|
587
|
+
* { code: "ARV", name: "Arrived", kind: "Intake", slots: none },
|
|
588
|
+
* { code: "SCN", name: "Scanned", kind: "Intake", slots: none },
|
|
589
|
+
* { code: "CH*", name: "Sort chutes", kind: "Sort", slots: some(12n) },
|
|
590
|
+
* { code: "HLD", name: "Held", kind: "Hold", slots: none },
|
|
591
|
+
* { code: "LDD", name: "Loaded", kind: "Load", slots: none },
|
|
592
|
+
* ]));
|
|
593
|
+
* export const MoveTemplate = StructType({ kind: Flowchart.Types.Kind, decision: OptionType(StringType), note: StringType });
|
|
594
|
+
* export const moveTemplates = e3.record("flowchart_move_templates", DictType(StringType, MoveTemplate), new Map([
|
|
595
|
+
* ["Observed", { kind: variant("observed", null), decision: none, note: "Mined from the scans" }],
|
|
596
|
+
* ["Planned", { kind: variant("planned", null), decision: none, note: "The designed path" }],
|
|
597
|
+
* ["Routed", { kind: variant("planned", null), decision: some("route"), note: "Governed by the route decision" }],
|
|
598
|
+
* ]));
|
|
599
|
+
* export const DecisionOwner = StructType({ role: StringType, name: StringType, desk: StringType });
|
|
600
|
+
* export const decisionOwners = e3.input("flowchart_decision_owners", ArrayType(DecisionOwner), variant("value", [
|
|
601
|
+
* { role: "sort-planner", name: "Sort planner", desk: "Sort hall" },
|
|
602
|
+
* { role: "customs-desk", name: "Customs desk", desk: "Hold bay" },
|
|
603
|
+
* ]));
|
|
604
|
+
*
|
|
605
|
+
* const flowchart = East.function([], UIComponentType, (_$) => (
|
|
606
|
+
* <Reactive>{$ => {
|
|
607
|
+
* const flows = $.let(Record.bind(depotFlows, [depotFlowsPatch]));
|
|
608
|
+
* const steps = $.let(Data.bind(stepTemplates));
|
|
609
|
+
* const moves = $.let(Record.bind(moveTemplates, []));
|
|
610
|
+
* const owners = $.let(Data.bind(decisionOwners));
|
|
611
|
+
* return (
|
|
612
|
+
* <Box height="560px">
|
|
613
|
+
* <Flowchart
|
|
614
|
+
* record={flows}
|
|
615
|
+
* flow="Inbound parcels"
|
|
616
|
+
* name="depot"
|
|
617
|
+
* library={[
|
|
618
|
+
* Flowchart.library.flows(),
|
|
619
|
+
* // Step types, an input's rows: a card dropped on a lane adds a state seeded with what its drop sets.
|
|
620
|
+
* Flowchart.library.states(steps.read(), {
|
|
621
|
+
* name: "Steps", icon: "box",
|
|
622
|
+
* key: s => s.code, label: s => s.name, meta: s => some(s.code), group: s => s.kind,
|
|
623
|
+
* drop: s => Flowchart.patch(Flowchart.Types.State, { key: s.code, label: some(s.name), members: s.slots }),
|
|
624
|
+
* }),
|
|
625
|
+
* // Transition types, a record's rows by name: a card dropped on a transition retypes it.
|
|
626
|
+
* Flowchart.library.transitions(moves.read(), {
|
|
627
|
+
* icon: "arrow-right",
|
|
628
|
+
* key: (_m, name) => name, label: (_m, name) => name, meta: m => some(m.note),
|
|
629
|
+
* drop: m => Flowchart.patch(Flowchart.Types.Link, { kind: some(m.kind), trigger: m.decision }),
|
|
630
|
+
* }),
|
|
631
|
+
* // The author's own cards: a role dropped on a decision owns it.
|
|
632
|
+
* Flowchart.library.tab(owners.read(), {
|
|
633
|
+
* name: "Owners", icon: "user-tie",
|
|
634
|
+
* key: o => o.role, label: o => o.name, meta: o => some(o.desk),
|
|
635
|
+
* drop: o => Flowchart.patch(Flowchart.Types.Trigger, { owner: some(o.role) }),
|
|
636
|
+
* }),
|
|
637
|
+
* ]}
|
|
638
|
+
* />
|
|
639
|
+
* </Box>
|
|
640
|
+
* );
|
|
641
|
+
* }}</Reactive>
|
|
642
|
+
* ));
|
|
643
|
+
* ```
|
|
644
|
+
*/
|
|
645
|
+
export declare function libraryStates<T extends EastType>(rows: FlowchartLibraryRows<T>, config: FlowchartStatesConfig<T>): FlowchartStatesTab;
|
|
646
|
+
/**
|
|
647
|
+
* The transition templates — `Flowchart.library.transitions(rows, { … })`
|
|
648
|
+
* (FB26, decision 8): one card per row of the tab's own rows, as
|
|
649
|
+
* {@link libraryStates}' are, each a drag source that a click selects and a
|
|
650
|
+
* second click lets go. A card dropped on a transition sets the fields its
|
|
651
|
+
* `drop` sets on it — its kind, its decision and its other fields (#1249): a
|
|
652
|
+
* connection makes a transition of the default type, and a card retypes it.
|
|
653
|
+
*
|
|
654
|
+
* @remarks
|
|
655
|
+
* The rows are read as {@link libraryStates}' are. Left out, the tab's name is
|
|
656
|
+
* `Transitions`, in the flowchart's words. Refused when the surface is built:
|
|
657
|
+
* rows that are neither an Array nor a `Dict<String, T>`, a `drop` over
|
|
658
|
+
* another type than `Flowchart.Types.Link`, and the tab listed twice; and,
|
|
659
|
+
* when the tab's cards are read, a card whose `drop` sets the transition's
|
|
660
|
+
* `key`, `from` or `to` — the fields a patch sets are values its rows give,
|
|
661
|
+
* which the build cannot see.
|
|
662
|
+
*
|
|
663
|
+
* @typeParam T - The rows' element type
|
|
664
|
+
* @param rows - The rows — an `Array<T>` or a `Dict<String, T>` value or expression, such as a binding's `read()`
|
|
665
|
+
* @param config - The tab's name and icon, what each card shows, and its `drop` ({@link FlowchartTransitionsConfig})
|
|
666
|
+
* @returns The tab
|
|
667
|
+
*/
|
|
668
|
+
export declare function libraryTransitions<T extends EastType>(rows: FlowchartLibraryRows<T>, config: FlowchartTransitionsConfig<T>): FlowchartTransitionsTab;
|
|
669
|
+
/**
|
|
670
|
+
* A tab of the author's own cards — `Flowchart.library.tab(rows, { … })`
|
|
671
|
+
* (FB27): one card per row of the tab's own rows, as {@link libraryStates}'
|
|
672
|
+
* are, a click selecting a card and a second click letting it go. Given a
|
|
673
|
+
* `drop`, each card is a drag source, which lands where its patch's type says
|
|
674
|
+
* — a state, a transition, a lane's header or a decision's diamond — and sets
|
|
675
|
+
* its fields there (#1249); without one, the cards are read, never dragged.
|
|
676
|
+
*
|
|
677
|
+
* @remarks
|
|
678
|
+
* The rows are read as {@link libraryStates}' are. A tab's name is its
|
|
679
|
+
* identity in `library`. Refused when the surface is built: rows that are
|
|
680
|
+
* neither an Array nor a `Dict<String, T>`, a `drop` over none of a flow's
|
|
681
|
+
* row types, and two tabs of one name.
|
|
682
|
+
*
|
|
683
|
+
* @typeParam T - The rows' element type
|
|
684
|
+
* @typeParam P - The patch `drop` returns
|
|
685
|
+
* @param rows - The rows — an `Array<T>` or a `Dict<String, T>` value or expression, such as a binding's `read()`
|
|
686
|
+
* @param config - The tab's name and icon, what each card shows, and its `drop` ({@link FlowchartTabConfig})
|
|
687
|
+
* @returns The tab
|
|
688
|
+
*/
|
|
689
|
+
export declare function libraryTab<T extends EastType, P extends EastType = EastType>(rows: FlowchartLibraryRows<T>, config: FlowchartTabConfig<T, P>): FlowchartAuthorTab;
|
|
690
|
+
/** The library pane's tabs — `Flowchart.library`. */
|
|
691
|
+
export interface FlowchartLibrary {
|
|
692
|
+
/** The Flows tab: every flow by name, a click opening one, and "+ New flow" ({@link libraryFlows}). */
|
|
693
|
+
flows: typeof libraryFlows;
|
|
694
|
+
/** State templates from the tab's own rows, each card adding a state where it is dropped ({@link libraryStates}). */
|
|
695
|
+
states: typeof libraryStates;
|
|
696
|
+
/** Transition templates from the tab's own rows, each card retyping the transition it is dropped on ({@link libraryTransitions}). */
|
|
697
|
+
transitions: typeof libraryTransitions;
|
|
698
|
+
/** The author's own cards from the tab's own rows ({@link libraryTab}). */
|
|
699
|
+
tab: typeof libraryTab;
|
|
700
|
+
}
|
|
701
|
+
/** The library pane's tabs, each a factory (`Flowchart.library`). */
|
|
702
|
+
export declare const FlowchartLibraryFactories: FlowchartLibrary;
|
|
703
|
+
/**
|
|
704
|
+
* The library pane on the wire (`Flowchart Builder Spec.md` §4.2, §4.4, FB16,
|
|
705
|
+
* FB25–FB29): its tabs in the order `library` lists them; none when it is
|
|
706
|
+
* left out, or empty.
|
|
707
|
+
*
|
|
708
|
+
* @param library - The tabs, each a `Flowchart.library.*` call
|
|
709
|
+
* @param many - Whether the flowchart holds flows by name, rather than one flow
|
|
710
|
+
* @returns The tabs on the wire
|
|
711
|
+
* @throws {Error} Naming the tab and the remedy: a `library` that is no list
|
|
712
|
+
* of `Flowchart.library.*` calls; a tab listed twice — the Flows tab, the
|
|
713
|
+
* state templates or the transition templates, or two of the author's tabs
|
|
714
|
+
* of one name; the Flows tab over one flow; and each of a data tab's
|
|
715
|
+
* refusals — rows that are neither an Array nor a `Dict<String, T>`, and a
|
|
716
|
+
* `drop` of another type than its tab's
|
|
717
|
+
* @internal
|
|
718
|
+
*/
|
|
719
|
+
export declare function buildLibrary(library: unknown, many: boolean): ExprType<ArrayType<FlowchartLibraryTabType>>;
|
|
720
|
+
//# sourceMappingURL=library.d.ts.map
|