@elaraai/e3-ui 1.0.3 → 1.0.5

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.
Files changed (100) hide show
  1. package/README.md +3 -2
  2. package/dist/src/data.d.ts +22 -1
  3. package/dist/src/data.d.ts.map +1 -1
  4. package/dist/src/data.js.map +1 -1
  5. package/dist/src/decision/bind.d.ts +4594 -0
  6. package/dist/src/decision/bind.d.ts.map +1 -0
  7. package/dist/src/decision/bind.js +156 -0
  8. package/dist/src/decision/bind.js.map +1 -0
  9. package/dist/src/decision/index.d.ts +1787 -0
  10. package/dist/src/decision/index.d.ts.map +1 -0
  11. package/dist/src/decision/index.js +36 -0
  12. package/dist/src/decision/index.js.map +1 -0
  13. package/dist/src/decision/journal.d.ts +405 -0
  14. package/dist/src/decision/journal.d.ts.map +1 -0
  15. package/dist/src/decision/journal.js +74 -0
  16. package/dist/src/decision/journal.js.map +1 -0
  17. package/dist/src/decision/queue.d.ts +2876 -0
  18. package/dist/src/decision/queue.d.ts.map +1 -0
  19. package/dist/src/decision/queue.js +166 -0
  20. package/dist/src/decision/queue.js.map +1 -0
  21. package/dist/src/decision/types.d.ts +1338 -0
  22. package/dist/src/decision/types.d.ts.map +1 -0
  23. package/dist/src/decision/types.js +389 -0
  24. package/dist/src/decision/types.js.map +1 -0
  25. package/dist/src/diff.d.ts +72 -0
  26. package/dist/src/diff.d.ts.map +1 -1
  27. package/dist/src/diff.js +6 -0
  28. package/dist/src/diff.js.map +1 -1
  29. package/dist/src/index.d.ts +27 -11
  30. package/dist/src/index.d.ts.map +1 -1
  31. package/dist/src/index.js +30 -10
  32. package/dist/src/index.js.map +1 -1
  33. package/dist/src/internal.d.ts +28 -0
  34. package/dist/src/internal.d.ts.map +1 -0
  35. package/dist/src/internal.js +28 -0
  36. package/dist/src/internal.js.map +1 -0
  37. package/dist/src/ontology.d.ts +205 -10
  38. package/dist/src/ontology.d.ts.map +1 -1
  39. package/dist/src/ontology.js +23 -4
  40. package/dist/src/ontology.js.map +1 -1
  41. package/dist/src/runtime/decision/journal.d.ts +29 -0
  42. package/dist/src/runtime/decision/journal.d.ts.map +1 -0
  43. package/dist/src/runtime/decision/journal.js +27 -0
  44. package/dist/src/runtime/decision/journal.js.map +1 -0
  45. package/dist/src/runtime/decision/queue.d.ts +47 -0
  46. package/dist/src/runtime/decision/queue.d.ts.map +1 -0
  47. package/dist/src/runtime/decision/queue.js +45 -0
  48. package/dist/src/runtime/decision/queue.js.map +1 -0
  49. package/dist/src/runtime/diff.d.ts +36 -0
  50. package/dist/src/runtime/diff.d.ts.map +1 -0
  51. package/dist/src/runtime/diff.js +34 -0
  52. package/dist/src/runtime/diff.js.map +1 -0
  53. package/dist/src/runtime/index.d.ts +15 -0
  54. package/dist/src/runtime/index.d.ts.map +1 -0
  55. package/dist/src/runtime/index.js +15 -0
  56. package/dist/src/runtime/index.js.map +1 -0
  57. package/dist/src/runtime/ontology.d.ts +36 -0
  58. package/dist/src/runtime/ontology.d.ts.map +1 -0
  59. package/dist/src/runtime/ontology.js +34 -0
  60. package/dist/src/runtime/ontology.js.map +1 -0
  61. package/dist/src/runtime/runtime.d.ts +7 -0
  62. package/dist/src/runtime/runtime.d.ts.map +1 -0
  63. package/dist/src/runtime/runtime.js +7 -0
  64. package/dist/src/runtime/runtime.js.map +1 -0
  65. package/dist/src/ui.d.ts +6 -6
  66. package/dist/src/ui.d.ts.map +1 -1
  67. package/dist/src/ui.js +9 -1
  68. package/dist/src/ui.js.map +1 -1
  69. package/dist/test/{data.examples.d.ts → data/data.examples.d.ts} +1 -0
  70. package/dist/test/data/data.examples.d.ts.map +1 -0
  71. package/dist/test/{data.examples.js → data/data.examples.js} +30 -68
  72. package/dist/test/data/data.examples.js.map +1 -0
  73. package/dist/test/decision/journal.examples.d.ts +266 -0
  74. package/dist/test/decision/journal.examples.d.ts.map +1 -0
  75. package/dist/test/decision/journal.examples.js +107 -0
  76. package/dist/test/decision/journal.examples.js.map +1 -0
  77. package/dist/test/decision/loop.examples.d.ts +455 -0
  78. package/dist/test/decision/loop.examples.d.ts.map +1 -0
  79. package/dist/test/decision/loop.examples.js +120 -0
  80. package/dist/test/decision/loop.examples.js.map +1 -0
  81. package/dist/test/decision/queue.examples.d.ts +269 -0
  82. package/dist/test/decision/queue.examples.d.ts.map +1 -0
  83. package/dist/test/decision/queue.examples.js +273 -0
  84. package/dist/test/decision/queue.examples.js.map +1 -0
  85. package/dist/test/{diff.examples.d.ts → diff/diff.examples.d.ts} +5 -4
  86. package/dist/test/diff/diff.examples.d.ts.map +1 -0
  87. package/dist/test/diff/diff.examples.js +582 -0
  88. package/dist/test/diff/diff.examples.js.map +1 -0
  89. package/dist/test/{ontology.examples.d.ts → ontology/ontology.examples.d.ts} +6 -4
  90. package/dist/test/ontology/ontology.examples.d.ts.map +1 -0
  91. package/dist/test/{ontology.examples.js → ontology/ontology.examples.js} +37 -57
  92. package/dist/test/ontology/ontology.examples.js.map +1 -0
  93. package/package.json +19 -19
  94. package/dist/test/data.examples.d.ts.map +0 -1
  95. package/dist/test/data.examples.js.map +0 -1
  96. package/dist/test/diff.examples.d.ts.map +0 -1
  97. package/dist/test/diff.examples.js +0 -964
  98. package/dist/test/diff.examples.js.map +0 -1
  99. package/dist/test/ontology.examples.d.ts.map +0 -1
  100. package/dist/test/ontology.examples.js.map +0 -1
@@ -0,0 +1,266 @@
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
+ /** @jsxImportSource @elaraai/east-ui */
6
+ /**
7
+ * `DecisionJournal` examples — the resolved-cases read-back. The judgements
8
+ * input is pre-seeded with three resolved cases (one per verdict flavour)
9
+ * and one still-staged case, which the journal must NOT show: it renders
10
+ * exactly the judgements carrying a verdict, newest first.
11
+ */
12
+ import { ArrayType, DictType, StringType, variant } from '@elaraai/east';
13
+ import * as e3 from '@elaraai/e3';
14
+ export declare const journalDecisions: e3.DatasetDef<ArrayType<import("@elaraai/east").StructType<{
15
+ readonly id: StringType;
16
+ readonly kind: StringType;
17
+ readonly title: StringType;
18
+ readonly urgency: import("@elaraai/east").VariantType<{
19
+ readonly overdue: import("@elaraai/east").NullType;
20
+ readonly due: import("@elaraai/east").NullType;
21
+ readonly routine: import("@elaraai/east").NullType;
22
+ }>;
23
+ readonly value: import("@elaraai/east").FloatType;
24
+ readonly deadline: import("@elaraai/east").OptionType<import("@elaraai/east").DateTimeType>;
25
+ readonly format: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
26
+ readonly number: import("@elaraai/east").StructType<{
27
+ readonly minimumFractionDigits: import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>;
28
+ readonly maximumFractionDigits: import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>;
29
+ readonly signDisplay: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
30
+ readonly auto: import("@elaraai/east").NullType;
31
+ readonly never: import("@elaraai/east").NullType;
32
+ readonly always: import("@elaraai/east").NullType;
33
+ readonly exceptZero: import("@elaraai/east").NullType;
34
+ }>>;
35
+ }>;
36
+ readonly currency: import("@elaraai/east").StructType<{
37
+ readonly currency: import("@elaraai/east").VariantType<{
38
+ readonly USD: import("@elaraai/east").NullType;
39
+ readonly EUR: import("@elaraai/east").NullType;
40
+ readonly GBP: import("@elaraai/east").NullType;
41
+ readonly JPY: import("@elaraai/east").NullType;
42
+ readonly CHF: import("@elaraai/east").NullType;
43
+ readonly CAD: import("@elaraai/east").NullType;
44
+ readonly AUD: import("@elaraai/east").NullType;
45
+ readonly NZD: import("@elaraai/east").NullType;
46
+ readonly CNY: import("@elaraai/east").NullType;
47
+ readonly HKD: import("@elaraai/east").NullType;
48
+ readonly SGD: import("@elaraai/east").NullType;
49
+ readonly KRW: import("@elaraai/east").NullType;
50
+ readonly INR: import("@elaraai/east").NullType;
51
+ readonly TWD: import("@elaraai/east").NullType;
52
+ readonly THB: import("@elaraai/east").NullType;
53
+ readonly MYR: import("@elaraai/east").NullType;
54
+ readonly IDR: import("@elaraai/east").NullType;
55
+ readonly PHP: import("@elaraai/east").NullType;
56
+ readonly VND: import("@elaraai/east").NullType;
57
+ readonly SEK: import("@elaraai/east").NullType;
58
+ readonly NOK: import("@elaraai/east").NullType;
59
+ readonly DKK: import("@elaraai/east").NullType;
60
+ readonly PLN: import("@elaraai/east").NullType;
61
+ readonly CZK: import("@elaraai/east").NullType;
62
+ readonly HUF: import("@elaraai/east").NullType;
63
+ readonly RUB: import("@elaraai/east").NullType;
64
+ readonly UAH: import("@elaraai/east").NullType;
65
+ readonly RON: import("@elaraai/east").NullType;
66
+ readonly MXN: import("@elaraai/east").NullType;
67
+ readonly BRL: import("@elaraai/east").NullType;
68
+ readonly ARS: import("@elaraai/east").NullType;
69
+ readonly CLP: import("@elaraai/east").NullType;
70
+ readonly COP: import("@elaraai/east").NullType;
71
+ readonly PEN: import("@elaraai/east").NullType;
72
+ readonly AED: import("@elaraai/east").NullType;
73
+ readonly SAR: import("@elaraai/east").NullType;
74
+ readonly ILS: import("@elaraai/east").NullType;
75
+ readonly ZAR: import("@elaraai/east").NullType;
76
+ readonly TRY: import("@elaraai/east").NullType;
77
+ readonly EGP: import("@elaraai/east").NullType;
78
+ readonly NGN: import("@elaraai/east").NullType;
79
+ readonly KES: import("@elaraai/east").NullType;
80
+ }>;
81
+ readonly display: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
82
+ readonly code: import("@elaraai/east").NullType;
83
+ readonly symbol: import("@elaraai/east").NullType;
84
+ readonly narrowSymbol: import("@elaraai/east").NullType;
85
+ readonly name: import("@elaraai/east").NullType;
86
+ }>>;
87
+ readonly compact: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
88
+ readonly short: import("@elaraai/east").NullType;
89
+ readonly long: import("@elaraai/east").NullType;
90
+ }>>;
91
+ readonly minimumFractionDigits: import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>;
92
+ readonly maximumFractionDigits: import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>;
93
+ }>;
94
+ readonly percent: import("@elaraai/east").StructType<{
95
+ readonly minimumFractionDigits: import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>;
96
+ readonly maximumFractionDigits: import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>;
97
+ readonly signDisplay: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
98
+ readonly auto: import("@elaraai/east").NullType;
99
+ readonly never: import("@elaraai/east").NullType;
100
+ readonly always: import("@elaraai/east").NullType;
101
+ readonly exceptZero: import("@elaraai/east").NullType;
102
+ }>>;
103
+ }>;
104
+ readonly compact: import("@elaraai/east").StructType<{
105
+ readonly display: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
106
+ readonly short: import("@elaraai/east").NullType;
107
+ readonly long: import("@elaraai/east").NullType;
108
+ }>>;
109
+ }>;
110
+ readonly unit: import("@elaraai/east").StructType<{
111
+ readonly unit: import("@elaraai/east").VariantType<{
112
+ readonly bit: import("@elaraai/east").NullType;
113
+ readonly byte: import("@elaraai/east").NullType;
114
+ readonly kilobit: import("@elaraai/east").NullType;
115
+ readonly kilobyte: import("@elaraai/east").NullType;
116
+ readonly megabit: import("@elaraai/east").NullType;
117
+ readonly megabyte: import("@elaraai/east").NullType;
118
+ readonly gigabit: import("@elaraai/east").NullType;
119
+ readonly gigabyte: import("@elaraai/east").NullType;
120
+ readonly terabit: import("@elaraai/east").NullType;
121
+ readonly terabyte: import("@elaraai/east").NullType;
122
+ readonly petabyte: import("@elaraai/east").NullType;
123
+ readonly nanosecond: import("@elaraai/east").NullType;
124
+ readonly microsecond: import("@elaraai/east").NullType;
125
+ readonly millisecond: import("@elaraai/east").NullType;
126
+ readonly second: import("@elaraai/east").NullType;
127
+ readonly minute: import("@elaraai/east").NullType;
128
+ readonly hour: import("@elaraai/east").NullType;
129
+ readonly day: import("@elaraai/east").NullType;
130
+ readonly week: import("@elaraai/east").NullType;
131
+ readonly month: import("@elaraai/east").NullType;
132
+ readonly year: import("@elaraai/east").NullType;
133
+ readonly millimeter: import("@elaraai/east").NullType;
134
+ readonly centimeter: import("@elaraai/east").NullType;
135
+ readonly meter: import("@elaraai/east").NullType;
136
+ readonly kilometer: import("@elaraai/east").NullType;
137
+ readonly inch: import("@elaraai/east").NullType;
138
+ readonly foot: import("@elaraai/east").NullType;
139
+ readonly yard: import("@elaraai/east").NullType;
140
+ readonly mile: import("@elaraai/east").NullType;
141
+ readonly gram: import("@elaraai/east").NullType;
142
+ readonly kilogram: import("@elaraai/east").NullType;
143
+ readonly milligram: import("@elaraai/east").NullType;
144
+ readonly ounce: import("@elaraai/east").NullType;
145
+ readonly pound: import("@elaraai/east").NullType;
146
+ readonly stone: import("@elaraai/east").NullType;
147
+ readonly celsius: import("@elaraai/east").NullType;
148
+ readonly fahrenheit: import("@elaraai/east").NullType;
149
+ readonly milliliter: import("@elaraai/east").NullType;
150
+ readonly liter: import("@elaraai/east").NullType;
151
+ readonly gallon: import("@elaraai/east").NullType;
152
+ readonly fluidOunce: import("@elaraai/east").NullType;
153
+ readonly acre: import("@elaraai/east").NullType;
154
+ readonly hectare: import("@elaraai/east").NullType;
155
+ readonly meterPerSecond: import("@elaraai/east").NullType;
156
+ readonly kilometerPerHour: import("@elaraai/east").NullType;
157
+ readonly milePerHour: import("@elaraai/east").NullType;
158
+ readonly percent: import("@elaraai/east").NullType;
159
+ readonly degree: import("@elaraai/east").NullType;
160
+ }>;
161
+ readonly display: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
162
+ readonly short: import("@elaraai/east").NullType;
163
+ readonly narrow: import("@elaraai/east").NullType;
164
+ readonly long: import("@elaraai/east").NullType;
165
+ }>>;
166
+ }>;
167
+ readonly scientific: import("@elaraai/east").NullType;
168
+ readonly engineering: import("@elaraai/east").NullType;
169
+ readonly date: import("@elaraai/east").StructType<{
170
+ readonly format: StringType;
171
+ }>;
172
+ readonly time: import("@elaraai/east").StructType<{
173
+ readonly format: StringType;
174
+ }>;
175
+ readonly datetime: import("@elaraai/east").StructType<{
176
+ readonly format: StringType;
177
+ }>;
178
+ }>>;
179
+ readonly summary: import("@elaraai/east").OptionType<StringType>;
180
+ readonly downside: import("@elaraai/east").OptionType<import("@elaraai/east").FloatType>;
181
+ readonly confidence: import("@elaraai/east").OptionType<import("@elaraai/east").FloatType>;
182
+ readonly detail: import("@elaraai/east").OptionType<StringType>;
183
+ readonly stakes: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
184
+ readonly low: import("@elaraai/east").NullType;
185
+ readonly medium: import("@elaraai/east").NullType;
186
+ readonly high: import("@elaraai/east").NullType;
187
+ readonly critical: import("@elaraai/east").NullType;
188
+ }>>;
189
+ readonly prompts: ArrayType<import("@elaraai/east").StructType<{
190
+ readonly id: StringType;
191
+ readonly text: StringType;
192
+ }>>;
193
+ readonly levers: ArrayType<import("@elaraai/east").StructType<{
194
+ readonly case: StringType;
195
+ readonly label: StringType;
196
+ }>>;
197
+ readonly evidence: ArrayType<import("@elaraai/east").StructType<{
198
+ readonly label: StringType;
199
+ readonly text: StringType;
200
+ readonly note: import("@elaraai/east").OptionType<StringType>;
201
+ }>>;
202
+ readonly alternatives: ArrayType<import("@elaraai/east").StructType<{
203
+ readonly id: import("@elaraai/east").OptionType<StringType>;
204
+ readonly label: StringType;
205
+ readonly value: import("@elaraai/east").FloatType;
206
+ readonly downside: import("@elaraai/east").OptionType<import("@elaraai/east").FloatType>;
207
+ readonly confidence: import("@elaraai/east").OptionType<import("@elaraai/east").FloatType>;
208
+ readonly note: import("@elaraai/east").OptionType<StringType>;
209
+ }>>;
210
+ }>>, [variant<"field", "inputs">, variant<"field", "journal_decisions">]>;
211
+ export declare const journalJudgements: e3.DatasetDef<DictType<StringType, import("@elaraai/east").StructType<{
212
+ readonly caseId: StringType;
213
+ readonly answers: DictType<StringType, import("@elaraai/east").VariantType<{
214
+ readonly yes: import("@elaraai/east").NullType;
215
+ readonly no: import("@elaraai/east").NullType;
216
+ readonly unknown: import("@elaraai/east").NullType;
217
+ }>>;
218
+ readonly knowledge: import("@elaraai/east").OptionType<StringType>;
219
+ readonly constraints: ArrayType<import("@elaraai/east").VariantType<{
220
+ readonly string: import("@elaraai/east").VariantType<{
221
+ readonly eq: StringType;
222
+ readonly neq: StringType;
223
+ readonly in: import("@elaraai/east").SetType<StringType>;
224
+ readonly notIn: import("@elaraai/east").SetType<StringType>;
225
+ }>;
226
+ readonly integer: import("@elaraai/east").VariantType<{
227
+ readonly eq: import("@elaraai/east").IntegerType;
228
+ readonly atMost: import("@elaraai/east").IntegerType;
229
+ readonly atLeast: import("@elaraai/east").IntegerType;
230
+ readonly between: import("@elaraai/east").StructType<{
231
+ readonly min: import("@elaraai/east").IntegerType;
232
+ readonly max: import("@elaraai/east").IntegerType;
233
+ }>;
234
+ }>;
235
+ readonly float: import("@elaraai/east").VariantType<{
236
+ readonly eq: import("@elaraai/east").FloatType;
237
+ readonly atMost: import("@elaraai/east").FloatType;
238
+ readonly atLeast: import("@elaraai/east").FloatType;
239
+ readonly between: import("@elaraai/east").StructType<{
240
+ readonly min: import("@elaraai/east").FloatType;
241
+ readonly max: import("@elaraai/east").FloatType;
242
+ }>;
243
+ }>;
244
+ readonly datetime: import("@elaraai/east").VariantType<{
245
+ readonly before: import("@elaraai/east").DateTimeType;
246
+ readonly after: import("@elaraai/east").DateTimeType;
247
+ readonly between: import("@elaraai/east").StructType<{
248
+ readonly min: import("@elaraai/east").DateTimeType;
249
+ readonly max: import("@elaraai/east").DateTimeType;
250
+ }>;
251
+ }>;
252
+ readonly boolean: import("@elaraai/east").VariantType<{
253
+ readonly is: import("@elaraai/east").BooleanType;
254
+ }>;
255
+ }>>;
256
+ readonly verdict: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
257
+ readonly accepted: StringType;
258
+ readonly rejected: import("@elaraai/east").NullType;
259
+ readonly deferred: import("@elaraai/east").OptionType<StringType>;
260
+ readonly handoff: StringType;
261
+ }>>;
262
+ readonly resolvedAt: import("@elaraai/east").OptionType<import("@elaraai/east").DateTimeType>;
263
+ }>>, [variant<"field", "inputs">, variant<"field", "journal_judgements">]>;
264
+ export declare const decisionJournalResolved: import("@elaraai/east").ExampleDef<[], any>;
265
+ export declare const decisionJournalScroll: import("@elaraai/east").ExampleDef<[], any>;
266
+ //# sourceMappingURL=journal.examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journal.examples.d.ts","sourceRoot":"","sources":["../../../test/decision/journal.examples.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wCAAwC;AAExC;;;;;GAKG;AAEH,OAAO,EAAQ,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAc,OAAO,EAAW,MAAM,eAAe,CAAC;AAGpG,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAMlC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEAuB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAqC7B,CAAC;AAOF,eAAO,MAAM,uBAAuB,6CAclC,CAAC;AAMH,eAAO,MAAM,qBAAqB,6CAchC,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { jsx as _jsx } from "@elaraai/east-ui/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2025 Elara AI Pty Ltd
4
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
5
+ */
6
+ /** @jsxImportSource @elaraai/east-ui */
7
+ /**
8
+ * `DecisionJournal` examples — the resolved-cases read-back. The judgements
9
+ * input is pre-seeded with three resolved cases (one per verdict flavour)
10
+ * and one still-staged case, which the journal must NOT show: it renders
11
+ * exactly the judgements carrying a verdict, newest first.
12
+ */
13
+ import { East, ArrayType, DictType, StringType, some, none, variant, example } from '@elaraai/east';
14
+ import { Reactive, UIComponentType } from '@elaraai/east-ui';
15
+ import { Data, Decision, DecisionJournal } from '@elaraai/e3-ui';
16
+ import * as e3 from '@elaraai/e3';
17
+ // ============================================================================
18
+ // Inputs — one open case in the queue; three resolved cases in judgements.
19
+ // ============================================================================
20
+ export const journalDecisions = e3.input('journal_decisions', ArrayType(Decision.Types.Decision), [
21
+ {
22
+ id: 'cap-ne-wk10',
23
+ kind: 'capacity',
24
+ title: 'Raise NE weekend cover',
25
+ urgency: variant('due', null),
26
+ value: 22000,
27
+ deadline: none,
28
+ format: none,
29
+ summary: some('NE region · wk 10'),
30
+ downside: some(-4000),
31
+ confidence: some(0.7),
32
+ detail: none,
33
+ stakes: none,
34
+ prompts: [],
35
+ levers: [],
36
+ evidence: [],
37
+ alternatives: [],
38
+ },
39
+ ]);
40
+ export const journalJudgements = e3.input('journal_judgements', Decision.Types.Judgements(), new Map([
41
+ ['ros-patel-cho', {
42
+ caseId: 'ros-patel-cho',
43
+ answers: new Map([['cho_told', variant('yes', null)]]),
44
+ knowledge: some("Accepted the recommendation. Cho's hours are at OT cap; will need to revisit Wed if forecast holds."),
45
+ constraints: [variant('float', variant('atMost', 36))],
46
+ verdict: some(variant('accepted', '')),
47
+ resolvedAt: some(new Date('2026-06-09T16:42:00')),
48
+ }],
49
+ ['avl-patel-thu', {
50
+ caseId: 'avl-patel-thu',
51
+ answers: new Map(),
52
+ knowledge: some('Patel arranged a private swap with Riggs — no roster change needed.'),
53
+ constraints: [],
54
+ verdict: some(variant('rejected', null)),
55
+ resolvedAt: some(new Date('2026-06-09T11:05:00')),
56
+ }],
57
+ ['utl-cho-cap', {
58
+ caseId: 'utl-cho-cap',
59
+ answers: new Map([['trend_structural', variant('unknown', null)]]),
60
+ knowledge: none,
61
+ constraints: [],
62
+ verdict: some(variant('handoff', 'workforce lead — needs the quarterly staffing view')),
63
+ resolvedAt: some(new Date('2026-06-08T09:30:00')),
64
+ }],
65
+ ['cap-ne-wk10', {
66
+ caseId: 'cap-ne-wk10',
67
+ answers: new Map(),
68
+ knowledge: some('Still gathering payroll input.'),
69
+ constraints: [],
70
+ verdict: none,
71
+ resolvedAt: none,
72
+ }],
73
+ ]));
74
+ // ============================================================================
75
+ // 1. Resolved cases — one entry per verdict flavour; the still-staged case
76
+ // is excluded.
77
+ // ============================================================================
78
+ export const decisionJournalResolved = example({
79
+ keywords: ['DecisionJournal', 'Decide', 'Trust', 'journal', 'verdict', 'resolved', 'read-back'],
80
+ description: 'Decision journal — resolved cases newest first with verdict, rationale quote, injected constraints and resolution time; staged cases excluded',
81
+ fn: East.function([], UIComponentType, (_$) => {
82
+ return (_jsx(Reactive, { children: $ => {
83
+ const decisions = $.let(Data.bind([ArrayType(Decision.Types.Decision)], journalDecisions.path, { mode: 'direct' }));
84
+ const judgements = $.let(Data.bind([Decision.Types.Judgements()], journalJudgements.path, { mode: 'direct' }));
85
+ const handle = $.let(Decision.bind({ decisions: [decisions], judgements }));
86
+ return _jsx(DecisionJournal, { handle: handle, heading: "Decision journal \u00B7 SE region" });
87
+ } }));
88
+ }),
89
+ inputs: [],
90
+ });
91
+ // ============================================================================
92
+ // 2. Capped height — `maxHeight` pins the header and scrolls the entries.
93
+ // ============================================================================
94
+ export const decisionJournalScroll = example({
95
+ keywords: ['DecisionJournal', 'Decide', 'maxHeight', 'scroll', 'overflow'],
96
+ description: 'Journal capped with maxHeight — the header stays pinned while the entries scroll',
97
+ fn: East.function([], UIComponentType, (_$) => {
98
+ return (_jsx(Reactive, { children: $ => {
99
+ const decisions = $.let(Data.bind([ArrayType(Decision.Types.Decision)], journalDecisions.path, { mode: 'direct' }));
100
+ const judgements = $.let(Data.bind([Decision.Types.Judgements()], journalJudgements.path, { mode: 'direct' }));
101
+ const handle = $.let(Decision.bind({ decisions: [decisions], judgements }));
102
+ return _jsx(DecisionJournal, { handle: handle, heading: "Decision journal \u00B7 SE region", maxHeight: "180px" });
103
+ } }));
104
+ }),
105
+ inputs: [],
106
+ });
107
+ //# sourceMappingURL=journal.examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journal.examples.js","sourceRoot":"","sources":["../../../test/decision/journal.examples.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,wCAAwC;AAExC;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAElC,+EAA+E;AAC/E,2EAA2E;AAC3E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC,KAAK,CACpC,mBAAmB,EACnB,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAClC;IACI;QACI,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,wBAAwB;QAC/B,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;QAC7B,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC;QAClC,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;QACrB,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC;QACrB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,E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