@elaraai/e3-ui 1.0.86 → 1.0.87

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 (385) hide show
  1. package/dist/src/bind/data-indexed.d.ts +159 -0
  2. package/dist/src/bind/data-indexed.d.ts.map +1 -0
  3. package/dist/src/bind/data-indexed.js +105 -0
  4. package/dist/src/bind/data-indexed.js.map +1 -0
  5. package/dist/src/bind/data.d.ts +5 -3
  6. package/dist/src/bind/data.d.ts.map +1 -1
  7. package/dist/src/bind/data.js +6 -0
  8. package/dist/src/bind/data.js.map +1 -1
  9. package/dist/src/bind/record.d.ts +34 -23
  10. package/dist/src/bind/record.d.ts.map +1 -1
  11. package/dist/src/bind/record.js +46 -19
  12. package/dist/src/bind/record.js.map +1 -1
  13. package/dist/src/calendar/index.d.ts +2923 -0
  14. package/dist/src/calendar/index.d.ts.map +1 -0
  15. package/dist/src/calendar/index.js +135 -0
  16. package/dist/src/calendar/index.js.map +1 -0
  17. package/dist/src/decision/queue.d.ts +3 -3
  18. package/dist/src/decision/queue.d.ts.map +1 -1
  19. package/dist/src/decision/queue.js +2 -2
  20. package/dist/src/decision/queue.js.map +1 -1
  21. package/dist/src/decision/types.d.ts +4 -0
  22. package/dist/src/decision/types.d.ts.map +1 -1
  23. package/dist/src/decision/types.js +4 -0
  24. package/dist/src/decision/types.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +114 -0
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -0
  27. package/dist/src/flowchart/canvas.js +84 -0
  28. package/dist/src/flowchart/canvas.js.map +1 -0
  29. package/dist/src/flowchart/flowchart.d.ts +79 -0
  30. package/dist/src/flowchart/flowchart.d.ts.map +1 -0
  31. package/dist/src/flowchart/flowchart.js +9 -0
  32. package/dist/src/flowchart/flowchart.js.map +1 -0
  33. package/dist/src/flowchart/index.d.ts +305 -0
  34. package/dist/src/flowchart/index.d.ts.map +1 -0
  35. package/dist/src/flowchart/index.js +267 -0
  36. package/dist/src/flowchart/index.js.map +1 -0
  37. package/dist/src/flowchart/library.d.ts +720 -0
  38. package/dist/src/flowchart/library.d.ts.map +1 -0
  39. package/dist/src/flowchart/library.js +611 -0
  40. package/dist/src/flowchart/library.js.map +1 -0
  41. package/dist/src/flowchart/over.d.ts +234 -0
  42. package/dist/src/flowchart/over.d.ts.map +1 -0
  43. package/dist/src/flowchart/over.js +220 -0
  44. package/dist/src/flowchart/over.js.map +1 -0
  45. package/dist/src/flowchart/patch.d.ts +64 -0
  46. package/dist/src/flowchart/patch.d.ts.map +1 -0
  47. package/dist/src/flowchart/patch.js +67 -0
  48. package/dist/src/flowchart/patch.js.map +1 -0
  49. package/dist/src/flowchart/payload.d.ts +8220 -0
  50. package/dist/src/flowchart/payload.d.ts.map +1 -0
  51. package/dist/src/flowchart/payload.js +521 -0
  52. package/dist/src/flowchart/payload.js.map +1 -0
  53. package/dist/src/flowchart/types.d.ts +393 -0
  54. package/dist/src/flowchart/types.d.ts.map +1 -0
  55. package/dist/src/flowchart/types.js +216 -0
  56. package/dist/src/flowchart/types.js.map +1 -0
  57. package/dist/src/flowchart/values.d.ts +267 -0
  58. package/dist/src/flowchart/values.d.ts.map +1 -0
  59. package/dist/src/flowchart/values.js +216 -0
  60. package/dist/src/flowchart/values.js.map +1 -0
  61. package/dist/src/flowchart/window.d.ts +521 -0
  62. package/dist/src/flowchart/window.d.ts.map +1 -0
  63. package/dist/src/flowchart/window.js +69 -0
  64. package/dist/src/flowchart/window.js.map +1 -0
  65. package/dist/src/index.d.ts +25 -1
  66. package/dist/src/index.d.ts.map +1 -1
  67. package/dist/src/index.js +48 -1
  68. package/dist/src/index.js.map +1 -1
  69. package/dist/src/internal.d.ts +35 -3
  70. package/dist/src/internal.d.ts.map +1 -1
  71. package/dist/src/internal.js +72 -3
  72. package/dist/src/internal.js.map +1 -1
  73. package/dist/src/plan/assemble.d.ts +2224 -0
  74. package/dist/src/plan/assemble.d.ts.map +1 -0
  75. package/dist/src/plan/assemble.js +210 -0
  76. package/dist/src/plan/assemble.js.map +1 -0
  77. package/dist/src/plan/builders.d.ts +790 -0
  78. package/dist/src/plan/builders.d.ts.map +1 -0
  79. package/dist/src/plan/builders.js +749 -0
  80. package/dist/src/plan/builders.js.map +1 -0
  81. package/dist/src/plan/event-rows.d.ts +2565 -0
  82. package/dist/src/plan/event-rows.d.ts.map +1 -0
  83. package/dist/src/plan/event-rows.js +689 -0
  84. package/dist/src/plan/event-rows.js.map +1 -0
  85. package/dist/src/plan/factories.d.ts +458 -0
  86. package/dist/src/plan/factories.d.ts.map +1 -0
  87. package/dist/src/plan/factories.js +484 -0
  88. package/dist/src/plan/factories.js.map +1 -0
  89. package/dist/src/plan/index.d.ts +672 -0
  90. package/dist/src/plan/index.d.ts.map +1 -0
  91. package/dist/src/plan/index.js +532 -0
  92. package/dist/src/plan/index.js.map +1 -0
  93. package/dist/src/plan/ir.d.ts +2594 -0
  94. package/dist/src/plan/ir.d.ts.map +1 -0
  95. package/dist/src/plan/ir.js +78 -0
  96. package/dist/src/plan/ir.js.map +1 -0
  97. package/dist/src/plan/library.d.ts +772 -0
  98. package/dist/src/plan/library.d.ts.map +1 -0
  99. package/dist/src/plan/library.js +424 -0
  100. package/dist/src/plan/library.js.map +1 -0
  101. package/dist/src/plan/ordered-source.d.ts +27 -0
  102. package/dist/src/plan/ordered-source.d.ts.map +1 -0
  103. package/dist/src/plan/ordered-source.js +48 -0
  104. package/dist/src/plan/ordered-source.js.map +1 -0
  105. package/dist/src/plan/over.d.ts +247 -0
  106. package/dist/src/plan/over.d.ts.map +1 -0
  107. package/dist/src/plan/over.js +266 -0
  108. package/dist/src/plan/over.js.map +1 -0
  109. package/dist/src/plan/pick.d.ts +78 -0
  110. package/dist/src/plan/pick.d.ts.map +1 -0
  111. package/dist/src/plan/pick.js +146 -0
  112. package/dist/src/plan/pick.js.map +1 -0
  113. package/dist/src/plan/plan.d.ts +11611 -0
  114. package/dist/src/plan/plan.d.ts.map +1 -0
  115. package/dist/src/plan/plan.js +428 -0
  116. package/dist/src/plan/plan.js.map +1 -0
  117. package/dist/src/plan/refs.d.ts +218 -0
  118. package/dist/src/plan/refs.d.ts.map +1 -0
  119. package/dist/src/plan/refs.js +226 -0
  120. package/dist/src/plan/refs.js.map +1 -0
  121. package/dist/src/plan/root.d.ts +290 -0
  122. package/dist/src/plan/root.d.ts.map +1 -0
  123. package/dist/src/plan/root.js +463 -0
  124. package/dist/src/plan/root.js.map +1 -0
  125. package/dist/src/plan/series.d.ts +13554 -0
  126. package/dist/src/plan/series.d.ts.map +1 -0
  127. package/dist/src/plan/series.js +1921 -0
  128. package/dist/src/plan/series.js.map +1 -0
  129. package/dist/src/plan/types.d.ts +12400 -0
  130. package/dist/src/plan/types.d.ts.map +1 -0
  131. package/dist/src/plan/types.js +1335 -0
  132. package/dist/src/plan/types.js.map +1 -0
  133. package/dist/src/roster/coverage.d.ts +240 -0
  134. package/dist/src/roster/coverage.d.ts.map +1 -0
  135. package/dist/src/roster/coverage.js +109 -0
  136. package/dist/src/roster/coverage.js.map +1 -0
  137. package/dist/src/roster/index.d.ts +4028 -0
  138. package/dist/src/roster/index.d.ts.map +1 -0
  139. package/dist/src/roster/index.js +115 -0
  140. package/dist/src/roster/index.js.map +1 -0
  141. package/dist/src/roster/library.d.ts +106 -0
  142. package/dist/src/roster/library.d.ts.map +1 -0
  143. package/dist/src/roster/library.js +78 -0
  144. package/dist/src/roster/library.js.map +1 -0
  145. package/dist/src/roster/people.d.ts +50 -0
  146. package/dist/src/roster/people.d.ts.map +1 -0
  147. package/dist/src/roster/people.js +32 -0
  148. package/dist/src/roster/people.js.map +1 -0
  149. package/dist/src/roster/rules.d.ts +275 -0
  150. package/dist/src/roster/rules.d.ts.map +1 -0
  151. package/dist/src/roster/rules.js +162 -0
  152. package/dist/src/roster/rules.js.map +1 -0
  153. package/dist/src/roster/types.d.ts +672 -0
  154. package/dist/src/roster/types.d.ts.map +1 -0
  155. package/dist/src/roster/types.js +248 -0
  156. package/dist/src/roster/types.js.map +1 -0
  157. package/dist/src/roster/visibility.d.ts +66 -0
  158. package/dist/src/roster/visibility.d.ts.map +1 -0
  159. package/dist/src/roster/visibility.js +25 -0
  160. package/dist/src/roster/visibility.js.map +1 -0
  161. package/dist/src/schedule/days.d.ts +54 -0
  162. package/dist/src/schedule/days.d.ts.map +1 -0
  163. package/dist/src/schedule/days.js +68 -0
  164. package/dist/src/schedule/days.js.map +1 -0
  165. package/dist/src/schedule/events.d.ts +433 -0
  166. package/dist/src/schedule/events.d.ts.map +1 -0
  167. package/dist/src/schedule/events.js +851 -0
  168. package/dist/src/schedule/events.js.map +1 -0
  169. package/dist/src/schedule/index.d.ts +150 -0
  170. package/dist/src/schedule/index.d.ts.map +1 -0
  171. package/dist/src/schedule/index.js +132 -0
  172. package/dist/src/schedule/index.js.map +1 -0
  173. package/dist/src/schedule/library.d.ts +70 -0
  174. package/dist/src/schedule/library.d.ts.map +1 -0
  175. package/dist/src/schedule/library.js +102 -0
  176. package/dist/src/schedule/library.js.map +1 -0
  177. package/dist/src/schedule/patch.d.ts +74 -0
  178. package/dist/src/schedule/patch.d.ts.map +1 -0
  179. package/dist/src/schedule/patch.js +68 -0
  180. package/dist/src/schedule/patch.js.map +1 -0
  181. package/dist/src/schedule/record-window.d.ts +189 -0
  182. package/dist/src/schedule/record-window.d.ts.map +1 -0
  183. package/dist/src/schedule/record-window.js +95 -0
  184. package/dist/src/schedule/record-window.js.map +1 -0
  185. package/dist/src/schedule/resources.d.ts +165 -0
  186. package/dist/src/schedule/resources.d.ts.map +1 -0
  187. package/dist/src/schedule/resources.js +234 -0
  188. package/dist/src/schedule/resources.js.map +1 -0
  189. package/dist/src/schedule/templates.d.ts +47 -0
  190. package/dist/src/schedule/templates.d.ts.map +1 -0
  191. package/dist/src/schedule/templates.js +61 -0
  192. package/dist/src/schedule/templates.js.map +1 -0
  193. package/dist/src/schedule/types.d.ts +1677 -0
  194. package/dist/src/schedule/types.d.ts.map +1 -0
  195. package/dist/src/schedule/types.js +374 -0
  196. package/dist/src/schedule/types.js.map +1 -0
  197. package/dist/src/schedule/window.d.ts +154 -0
  198. package/dist/src/schedule/window.d.ts.map +1 -0
  199. package/dist/src/schedule/window.js +363 -0
  200. package/dist/src/schedule/window.js.map +1 -0
  201. package/dist/src/sheet/bridge.d.ts +385 -0
  202. package/dist/src/sheet/bridge.d.ts.map +1 -0
  203. package/dist/src/sheet/bridge.js +809 -0
  204. package/dist/src/sheet/bridge.js.map +1 -0
  205. package/dist/src/sheet/columns.d.ts +410 -0
  206. package/dist/src/sheet/columns.d.ts.map +1 -0
  207. package/dist/src/sheet/columns.js +99 -0
  208. package/dist/src/sheet/columns.js.map +1 -0
  209. package/dist/src/sheet/context-bridge.d.ts +48 -0
  210. package/dist/src/sheet/context-bridge.d.ts.map +1 -0
  211. package/dist/src/sheet/context-bridge.js +216 -0
  212. package/dist/src/sheet/context-bridge.js.map +1 -0
  213. package/dist/src/sheet/draft-bridge.d.ts +37 -0
  214. package/dist/src/sheet/draft-bridge.d.ts.map +1 -0
  215. package/dist/src/sheet/draft-bridge.js +153 -0
  216. package/dist/src/sheet/draft-bridge.js.map +1 -0
  217. package/dist/src/sheet/drafts.d.ts +14 -0
  218. package/dist/src/sheet/drafts.d.ts.map +1 -0
  219. package/dist/src/sheet/drafts.js +14 -0
  220. package/dist/src/sheet/drafts.js.map +1 -0
  221. package/dist/src/sheet/editing-bridge.d.ts +40 -0
  222. package/dist/src/sheet/editing-bridge.d.ts.map +1 -0
  223. package/dist/src/sheet/editing-bridge.js +231 -0
  224. package/dist/src/sheet/editing-bridge.js.map +1 -0
  225. package/dist/src/sheet/editing-types.d.ts +268 -0
  226. package/dist/src/sheet/editing-types.d.ts.map +1 -0
  227. package/dist/src/sheet/editing-types.js +34 -0
  228. package/dist/src/sheet/editing-types.js.map +1 -0
  229. package/dist/src/sheet/edits.d.ts +37 -0
  230. package/dist/src/sheet/edits.d.ts.map +1 -0
  231. package/dist/src/sheet/edits.js +31 -0
  232. package/dist/src/sheet/edits.js.map +1 -0
  233. package/dist/src/sheet/fields.d.ts +693 -0
  234. package/dist/src/sheet/fields.d.ts.map +1 -0
  235. package/dist/src/sheet/fields.js +280 -0
  236. package/dist/src/sheet/fields.js.map +1 -0
  237. package/dist/src/sheet/group.d.ts +165 -0
  238. package/dist/src/sheet/group.d.ts.map +1 -0
  239. package/dist/src/sheet/group.js +52 -0
  240. package/dist/src/sheet/group.js.map +1 -0
  241. package/dist/src/sheet/index.d.ts +542 -0
  242. package/dist/src/sheet/index.d.ts.map +1 -0
  243. package/dist/src/sheet/index.js +387 -0
  244. package/dist/src/sheet/index.js.map +1 -0
  245. package/dist/src/sheet/library.d.ts +284 -0
  246. package/dist/src/sheet/library.d.ts.map +1 -0
  247. package/dist/src/sheet/library.js +259 -0
  248. package/dist/src/sheet/library.js.map +1 -0
  249. package/dist/src/sheet/link.d.ts +398 -0
  250. package/dist/src/sheet/link.d.ts.map +1 -0
  251. package/dist/src/sheet/link.js +228 -0
  252. package/dist/src/sheet/link.js.map +1 -0
  253. package/dist/src/sheet/record.d.ts +75 -0
  254. package/dist/src/sheet/record.d.ts.map +1 -0
  255. package/dist/src/sheet/record.js +128 -0
  256. package/dist/src/sheet/record.js.map +1 -0
  257. package/dist/src/sheet/registers.d.ts +681 -0
  258. package/dist/src/sheet/registers.d.ts.map +1 -0
  259. package/dist/src/sheet/registers.js +671 -0
  260. package/dist/src/sheet/registers.js.map +1 -0
  261. package/dist/src/sheet/root.d.ts +329 -0
  262. package/dist/src/sheet/root.d.ts.map +1 -0
  263. package/dist/src/sheet/root.js +511 -0
  264. package/dist/src/sheet/root.js.map +1 -0
  265. package/dist/src/sheet/seed-bridge.d.ts +14 -0
  266. package/dist/src/sheet/seed-bridge.d.ts.map +1 -0
  267. package/dist/src/sheet/seed-bridge.js +51 -0
  268. package/dist/src/sheet/seed-bridge.js.map +1 -0
  269. package/dist/src/sheet/sheet.d.ts +11819 -0
  270. package/dist/src/sheet/sheet.d.ts.map +1 -0
  271. package/dist/src/sheet/sheet.js +236 -0
  272. package/dist/src/sheet/sheet.js.map +1 -0
  273. package/dist/src/sheet/sub-rows.d.ts +299 -0
  274. package/dist/src/sheet/sub-rows.d.ts.map +1 -0
  275. package/dist/src/sheet/sub-rows.js +272 -0
  276. package/dist/src/sheet/sub-rows.js.map +1 -0
  277. package/dist/src/sheet/templates.d.ts +161 -0
  278. package/dist/src/sheet/templates.d.ts.map +1 -0
  279. package/dist/src/sheet/templates.js +122 -0
  280. package/dist/src/sheet/templates.js.map +1 -0
  281. package/dist/src/sheet/transactions.d.ts +76 -0
  282. package/dist/src/sheet/transactions.d.ts.map +1 -0
  283. package/dist/src/sheet/transactions.js +40 -0
  284. package/dist/src/sheet/transactions.js.map +1 -0
  285. package/dist/src/sheet/types.d.ts +15226 -0
  286. package/dist/src/sheet/types.d.ts.map +1 -0
  287. package/dist/src/sheet/types.js +1070 -0
  288. package/dist/src/sheet/types.js.map +1 -0
  289. package/dist/src/sheet/views.d.ts +29 -0
  290. package/dist/src/sheet/views.d.ts.map +1 -0
  291. package/dist/src/sheet/views.js +43 -0
  292. package/dist/src/sheet/views.js.map +1 -0
  293. package/dist/src/studio/component.d.ts.map +1 -1
  294. package/dist/src/studio/component.js +11 -8
  295. package/dist/src/studio/component.js.map +1 -1
  296. package/dist/src/utils/derive.d.ts +134 -8
  297. package/dist/src/utils/derive.d.ts.map +1 -1
  298. package/dist/src/utils/derive.js +409 -7
  299. package/dist/src/utils/derive.js.map +1 -1
  300. package/dist/src/utils/ordered-source.d.ts +38 -0
  301. package/dist/src/utils/ordered-source.d.ts.map +1 -0
  302. package/dist/src/utils/ordered-source.js +45 -0
  303. package/dist/src/utils/ordered-source.js.map +1 -0
  304. package/dist/src/utils/row-inspector.d.ts +36 -0
  305. package/dist/src/utils/row-inspector.d.ts.map +1 -0
  306. package/dist/src/utils/row-inspector.js +49 -0
  307. package/dist/src/utils/row-inspector.js.map +1 -0
  308. package/dist/test/bind/data/data.examples.d.ts +21 -19
  309. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  310. package/dist/test/bind/data/data.examples.js +122 -122
  311. package/dist/test/bind/data/data.examples.js.map +1 -1
  312. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  313. package/dist/test/bind/record/record.examples.js +9 -9
  314. package/dist/test/bind/record/record.examples.js.map +1 -1
  315. package/dist/test/calendar/calendar-records.examples.d.ts +228 -0
  316. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -0
  317. package/dist/test/calendar/calendar-records.examples.js +91 -0
  318. package/dist/test/calendar/calendar-records.examples.js.map +1 -0
  319. package/dist/test/calendar/calendar.examples.d.ts +776 -0
  320. package/dist/test/calendar/calendar.examples.d.ts.map +1 -0
  321. package/dist/test/calendar/calendar.examples.js +336 -0
  322. package/dist/test/calendar/calendar.examples.js.map +1 -0
  323. package/dist/test/decision/journal.examples.d.ts +28 -28
  324. package/dist/test/decision/journal.examples.d.ts.map +1 -1
  325. package/dist/test/decision/journal.examples.js +4 -4
  326. package/dist/test/decision/journal.examples.js.map +1 -1
  327. package/dist/test/decision/queue.examples.d.ts.map +1 -1
  328. package/dist/test/decision/queue.examples.js +5 -7
  329. package/dist/test/decision/queue.examples.js.map +1 -1
  330. package/dist/test/flowchart/flowchart.examples.d.ts +3713 -0
  331. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -0
  332. package/dist/test/flowchart/flowchart.examples.js +465 -0
  333. package/dist/test/flowchart/flowchart.examples.js.map +1 -0
  334. package/dist/test/plan/plan-events.examples.d.ts +3666 -0
  335. package/dist/test/plan/plan-events.examples.d.ts.map +1 -0
  336. package/dist/test/plan/plan-events.examples.js +773 -0
  337. package/dist/test/plan/plan-events.examples.js.map +1 -0
  338. package/dist/test/plan/plan-records.examples.d.ts +3 -0
  339. package/dist/test/plan/plan-records.examples.d.ts.map +1 -0
  340. package/dist/test/plan/plan-records.examples.js +45 -0
  341. package/dist/test/plan/plan-records.examples.js.map +1 -0
  342. package/dist/test/plan/plan-windows.examples.d.ts +588 -0
  343. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -0
  344. package/dist/test/plan/plan-windows.examples.js +170 -0
  345. package/dist/test/plan/plan-windows.examples.js.map +1 -0
  346. package/dist/test/plan/plan.examples.d.ts +8095 -0
  347. package/dist/test/plan/plan.examples.d.ts.map +1 -0
  348. package/dist/test/plan/plan.examples.js +2500 -0
  349. package/dist/test/plan/plan.examples.js.map +1 -0
  350. package/dist/test/roster/domain.examples.d.ts +367 -0
  351. package/dist/test/roster/domain.examples.d.ts.map +1 -0
  352. package/dist/test/roster/domain.examples.js +72 -0
  353. package/dist/test/roster/domain.examples.js.map +1 -0
  354. package/dist/test/roster/roster-records.examples.d.ts +729 -0
  355. package/dist/test/roster/roster-records.examples.d.ts.map +1 -0
  356. package/dist/test/roster/roster-records.examples.js +86 -0
  357. package/dist/test/roster/roster-records.examples.js.map +1 -0
  358. package/dist/test/roster/roster.examples.d.ts +750 -0
  359. package/dist/test/roster/roster.examples.d.ts.map +1 -0
  360. package/dist/test/roster/roster.examples.js +198 -0
  361. package/dist/test/roster/roster.examples.js.map +1 -0
  362. package/dist/test/roster/warehouse.d.ts +87 -0
  363. package/dist/test/roster/warehouse.d.ts.map +1 -0
  364. package/dist/test/roster/warehouse.js +883 -0
  365. package/dist/test/roster/warehouse.js.map +1 -0
  366. package/dist/test/sheet/sheet-link.examples.d.ts +7 -0
  367. package/dist/test/sheet/sheet-link.examples.d.ts.map +1 -0
  368. package/dist/test/sheet/sheet-link.examples.js +41 -0
  369. package/dist/test/sheet/sheet-link.examples.js.map +1 -0
  370. package/dist/test/sheet/sheet-records.examples.d.ts +421 -0
  371. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -0
  372. package/dist/test/sheet/sheet-records.examples.js +79 -0
  373. package/dist/test/sheet/sheet-records.examples.js.map +1 -0
  374. package/dist/test/sheet/sheet-transactions.examples.d.ts +7 -0
  375. package/dist/test/sheet/sheet-transactions.examples.d.ts.map +1 -0
  376. package/dist/test/sheet/sheet-transactions.examples.js +58 -0
  377. package/dist/test/sheet/sheet-transactions.examples.js.map +1 -0
  378. package/dist/test/sheet/sheet.examples.d.ts +5562 -0
  379. package/dist/test/sheet/sheet.examples.d.ts.map +1 -0
  380. package/dist/test/sheet/sheet.examples.js +1178 -0
  381. package/dist/test/sheet/sheet.examples.js.map +1 -0
  382. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  383. package/dist/test/studio/studio.examples.js +11 -11
  384. package/dist/test/studio/studio.examples.js.map +1 -1
  385. package/package.json +12 -9
@@ -0,0 +1,421 @@
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
+ import { ArrayType, BooleanType, DateTimeType, DictType, IntegerType, SetType, StringType, StructType, variant } from "@elaraai/east";
7
+ /** The same work order can be edited as a Sheet row or scheduled on a Plan. */
8
+ export declare const IndexedOperation: StructType<{
9
+ readonly key: StringType;
10
+ readonly label: StringType;
11
+ readonly start: DateTimeType;
12
+ readonly end: DateTimeType;
13
+ }>;
14
+ /** Work orders retain their original String record keys through every index. */
15
+ export declare const IndexedWork: StructType<{
16
+ readonly reference: StringType;
17
+ readonly job: StringType;
18
+ readonly status: StringType;
19
+ readonly due: DateTimeType;
20
+ readonly quantity: IntegerType;
21
+ readonly urgent: BooleanType;
22
+ readonly tags: SetType<StringType>;
23
+ readonly operations: ArrayType<StructType<{
24
+ readonly key: StringType;
25
+ readonly label: StringType;
26
+ readonly start: DateTimeType;
27
+ readonly end: DateTimeType;
28
+ }>>;
29
+ }>;
30
+ export declare const indexedWorkCount: import("@elaraai/e3").DatasetDef<IntegerType, [variant<"field", "inputs">, variant<"field", "indexed_work_count">]>;
31
+ export declare const indexedWorkGenerated: import("@elaraai/e3").TaskDef<DictType<StringType, StructType<{
32
+ readonly reference: StringType;
33
+ readonly job: StringType;
34
+ readonly status: StringType;
35
+ readonly due: DateTimeType;
36
+ readonly quantity: IntegerType;
37
+ readonly urgent: BooleanType;
38
+ readonly tags: SetType<StringType>;
39
+ readonly operations: ArrayType<StructType<{
40
+ readonly key: StringType;
41
+ readonly label: StringType;
42
+ readonly start: DateTimeType;
43
+ readonly end: DateTimeType;
44
+ }>>;
45
+ }>>, [variant<"field", "tasks">, variant<"field", "indexed_work_generated">, variant<"field", "output">]>;
46
+ export declare const indexedWorkOrders: import("@elaraai/e3").RecordDef<DictType<StringType, StructType<{
47
+ readonly reference: StringType;
48
+ readonly job: StringType;
49
+ readonly status: StringType;
50
+ readonly due: DateTimeType;
51
+ readonly quantity: IntegerType;
52
+ readonly urgent: BooleanType;
53
+ readonly tags: SetType<StringType>;
54
+ readonly operations: ArrayType<StructType<{
55
+ readonly key: StringType;
56
+ readonly label: StringType;
57
+ readonly start: DateTimeType;
58
+ readonly end: DateTimeType;
59
+ }>>;
60
+ }>>, [variant<"field", "records">, variant<"field", "indexed_work_orders">]>;
61
+ export declare const indexedWorkPatch: import("@elaraai/e3").MutationDef<"patch", DictType<StringType, StructType<{
62
+ readonly reference: StringType;
63
+ readonly job: StringType;
64
+ readonly status: StringType;
65
+ readonly due: DateTimeType;
66
+ readonly quantity: IntegerType;
67
+ readonly urgent: BooleanType;
68
+ readonly tags: SetType<StringType>;
69
+ readonly operations: ArrayType<StructType<{
70
+ readonly key: StringType;
71
+ readonly label: StringType;
72
+ readonly start: DateTimeType;
73
+ readonly end: DateTimeType;
74
+ }>>;
75
+ }>>, [import("@elaraai/east").VariantType<{
76
+ unchanged: import("@elaraai/east").NullType;
77
+ replace: StructType<{
78
+ before: DictType<StringType, StructType<{
79
+ readonly reference: StringType;
80
+ readonly job: StringType;
81
+ readonly status: StringType;
82
+ readonly due: DateTimeType;
83
+ readonly quantity: IntegerType;
84
+ readonly urgent: BooleanType;
85
+ readonly tags: SetType<StringType>;
86
+ readonly operations: ArrayType<StructType<{
87
+ readonly key: StringType;
88
+ readonly label: StringType;
89
+ readonly start: DateTimeType;
90
+ readonly end: DateTimeType;
91
+ }>>;
92
+ }>>;
93
+ after: DictType<StringType, StructType<{
94
+ readonly reference: StringType;
95
+ readonly job: StringType;
96
+ readonly status: StringType;
97
+ readonly due: DateTimeType;
98
+ readonly quantity: IntegerType;
99
+ readonly urgent: BooleanType;
100
+ readonly tags: SetType<StringType>;
101
+ readonly operations: ArrayType<StructType<{
102
+ readonly key: StringType;
103
+ readonly label: StringType;
104
+ readonly start: DateTimeType;
105
+ readonly end: DateTimeType;
106
+ }>>;
107
+ }>>;
108
+ }>;
109
+ patch: DictType<StringType, import("@elaraai/east").VariantType<{
110
+ delete: StructType<{
111
+ readonly reference: StringType;
112
+ readonly job: StringType;
113
+ readonly status: StringType;
114
+ readonly due: DateTimeType;
115
+ readonly quantity: IntegerType;
116
+ readonly urgent: BooleanType;
117
+ readonly tags: SetType<StringType>;
118
+ readonly operations: ArrayType<StructType<{
119
+ readonly key: StringType;
120
+ readonly label: StringType;
121
+ readonly start: DateTimeType;
122
+ readonly end: DateTimeType;
123
+ }>>;
124
+ }>;
125
+ insert: StructType<{
126
+ readonly reference: StringType;
127
+ readonly job: StringType;
128
+ readonly status: StringType;
129
+ readonly due: DateTimeType;
130
+ readonly quantity: IntegerType;
131
+ readonly urgent: BooleanType;
132
+ readonly tags: SetType<StringType>;
133
+ readonly operations: ArrayType<StructType<{
134
+ readonly key: StringType;
135
+ readonly label: StringType;
136
+ readonly start: DateTimeType;
137
+ readonly end: DateTimeType;
138
+ }>>;
139
+ }>;
140
+ update: import("@elaraai/east").VariantType<{
141
+ unchanged: import("@elaraai/east").NullType;
142
+ replace: StructType<{
143
+ before: StructType<{
144
+ readonly reference: StringType;
145
+ readonly job: StringType;
146
+ readonly status: StringType;
147
+ readonly due: DateTimeType;
148
+ readonly quantity: IntegerType;
149
+ readonly urgent: BooleanType;
150
+ readonly tags: SetType<StringType>;
151
+ readonly operations: ArrayType<StructType<{
152
+ readonly key: StringType;
153
+ readonly label: StringType;
154
+ readonly start: DateTimeType;
155
+ readonly end: DateTimeType;
156
+ }>>;
157
+ }>;
158
+ after: StructType<{
159
+ readonly reference: StringType;
160
+ readonly job: StringType;
161
+ readonly status: StringType;
162
+ readonly due: DateTimeType;
163
+ readonly quantity: IntegerType;
164
+ readonly urgent: BooleanType;
165
+ readonly tags: SetType<StringType>;
166
+ readonly operations: ArrayType<StructType<{
167
+ readonly key: StringType;
168
+ readonly label: StringType;
169
+ readonly start: DateTimeType;
170
+ readonly end: DateTimeType;
171
+ }>>;
172
+ }>;
173
+ }>;
174
+ patch: StructType<{
175
+ readonly reference: import("@elaraai/east").VariantType<{
176
+ unchanged: import("@elaraai/east").NullType;
177
+ replace: StructType<{
178
+ before: StringType;
179
+ after: StringType;
180
+ }>;
181
+ }>;
182
+ readonly job: import("@elaraai/east").VariantType<{
183
+ unchanged: import("@elaraai/east").NullType;
184
+ replace: StructType<{
185
+ before: StringType;
186
+ after: StringType;
187
+ }>;
188
+ }>;
189
+ readonly status: import("@elaraai/east").VariantType<{
190
+ unchanged: import("@elaraai/east").NullType;
191
+ replace: StructType<{
192
+ before: StringType;
193
+ after: StringType;
194
+ }>;
195
+ }>;
196
+ readonly due: import("@elaraai/east").VariantType<{
197
+ unchanged: import("@elaraai/east").NullType;
198
+ replace: StructType<{
199
+ before: DateTimeType;
200
+ after: DateTimeType;
201
+ }>;
202
+ }>;
203
+ readonly quantity: import("@elaraai/east").VariantType<{
204
+ unchanged: import("@elaraai/east").NullType;
205
+ replace: StructType<{
206
+ before: IntegerType;
207
+ after: IntegerType;
208
+ }>;
209
+ }>;
210
+ readonly urgent: import("@elaraai/east").VariantType<{
211
+ unchanged: import("@elaraai/east").NullType;
212
+ replace: StructType<{
213
+ before: BooleanType;
214
+ after: BooleanType;
215
+ }>;
216
+ }>;
217
+ readonly tags: import("@elaraai/east").VariantType<{
218
+ unchanged: import("@elaraai/east").NullType;
219
+ replace: StructType<{
220
+ before: SetType<StringType>;
221
+ after: SetType<StringType>;
222
+ }>;
223
+ patch: DictType<StringType, import("@elaraai/east").VariantType<{
224
+ delete: import("@elaraai/east").NullType;
225
+ insert: import("@elaraai/east").NullType;
226
+ }>>;
227
+ }>;
228
+ readonly operations: import("@elaraai/east").VariantType<{
229
+ unchanged: import("@elaraai/east").NullType;
230
+ replace: StructType<{
231
+ before: ArrayType<StructType<{
232
+ readonly key: StringType;
233
+ readonly label: StringType;
234
+ readonly start: DateTimeType;
235
+ readonly end: DateTimeType;
236
+ }>>;
237
+ after: ArrayType<StructType<{
238
+ readonly key: StringType;
239
+ readonly label: StringType;
240
+ readonly start: DateTimeType;
241
+ readonly end: DateTimeType;
242
+ }>>;
243
+ }>;
244
+ patch: ArrayType<StructType<{
245
+ key: IntegerType;
246
+ offset: IntegerType;
247
+ operation: import("@elaraai/east").VariantType<{
248
+ delete: StructType<{
249
+ readonly key: StringType;
250
+ readonly label: StringType;
251
+ readonly start: DateTimeType;
252
+ readonly end: DateTimeType;
253
+ }>;
254
+ insert: StructType<{
255
+ readonly key: StringType;
256
+ readonly label: StringType;
257
+ readonly start: DateTimeType;
258
+ readonly end: DateTimeType;
259
+ }>;
260
+ update: import("@elaraai/east").VariantType<{
261
+ unchanged: import("@elaraai/east").NullType;
262
+ replace: StructType<{
263
+ before: StructType<{
264
+ readonly key: StringType;
265
+ readonly label: StringType;
266
+ readonly start: DateTimeType;
267
+ readonly end: DateTimeType;
268
+ }>;
269
+ after: StructType<{
270
+ readonly key: StringType;
271
+ readonly label: StringType;
272
+ readonly start: DateTimeType;
273
+ readonly end: DateTimeType;
274
+ }>;
275
+ }>;
276
+ patch: StructType<{
277
+ readonly key: import("@elaraai/east").VariantType<{
278
+ unchanged: import("@elaraai/east").NullType;
279
+ replace: StructType<{
280
+ before: StringType;
281
+ after: StringType;
282
+ }>;
283
+ }>;
284
+ readonly label: import("@elaraai/east").VariantType<{
285
+ unchanged: import("@elaraai/east").NullType;
286
+ replace: StructType<{
287
+ before: StringType;
288
+ after: StringType;
289
+ }>;
290
+ }>;
291
+ readonly start: import("@elaraai/east").VariantType<{
292
+ unchanged: import("@elaraai/east").NullType;
293
+ replace: StructType<{
294
+ before: DateTimeType;
295
+ after: DateTimeType;
296
+ }>;
297
+ }>;
298
+ readonly end: import("@elaraai/east").VariantType<{
299
+ unchanged: import("@elaraai/east").NullType;
300
+ replace: StructType<{
301
+ before: DateTimeType;
302
+ after: DateTimeType;
303
+ }>;
304
+ }>;
305
+ }>;
306
+ }>;
307
+ }>;
308
+ }>>;
309
+ }>;
310
+ }>;
311
+ }>;
312
+ }>>;
313
+ }>]>;
314
+ export declare const indexedWorkByStatusDue: import("@elaraai/e3").RecordIndexDef<"by_status_due", DictType<StringType, StructType<{
315
+ readonly reference: StringType;
316
+ readonly job: StringType;
317
+ readonly status: StringType;
318
+ readonly due: DateTimeType;
319
+ readonly quantity: IntegerType;
320
+ readonly urgent: BooleanType;
321
+ readonly tags: SetType<StringType>;
322
+ readonly operations: ArrayType<StructType<{
323
+ readonly key: StringType;
324
+ readonly label: StringType;
325
+ readonly start: DateTimeType;
326
+ readonly end: DateTimeType;
327
+ }>>;
328
+ }>>, StructType<{
329
+ status: StringType;
330
+ due: DateTimeType;
331
+ }>, import("@elaraai/east").NullType, readonly ["status", "due"]> & {
332
+ interval: undefined;
333
+ };
334
+ export declare const indexedWorkByDue: import("@elaraai/e3").RecordIndexDef<"by_due", DictType<StringType, StructType<{
335
+ readonly reference: StringType;
336
+ readonly job: StringType;
337
+ readonly status: StringType;
338
+ readonly due: DateTimeType;
339
+ readonly quantity: IntegerType;
340
+ readonly urgent: BooleanType;
341
+ readonly tags: SetType<StringType>;
342
+ readonly operations: ArrayType<StructType<{
343
+ readonly key: StringType;
344
+ readonly label: StringType;
345
+ readonly start: DateTimeType;
346
+ readonly end: DateTimeType;
347
+ }>>;
348
+ }>>, DateTimeType, import("@elaraai/east").NullType, readonly ["due"]> & {
349
+ interval: undefined;
350
+ };
351
+ export declare const indexedWorkByJob: import("@elaraai/e3").RecordIndexDef<"by_job", DictType<StringType, StructType<{
352
+ readonly reference: StringType;
353
+ readonly job: StringType;
354
+ readonly status: StringType;
355
+ readonly due: DateTimeType;
356
+ readonly quantity: IntegerType;
357
+ readonly urgent: BooleanType;
358
+ readonly tags: SetType<StringType>;
359
+ readonly operations: ArrayType<StructType<{
360
+ readonly key: StringType;
361
+ readonly label: StringType;
362
+ readonly start: DateTimeType;
363
+ readonly end: DateTimeType;
364
+ }>>;
365
+ }>>, StringType, import("@elaraai/east").NullType, readonly ["job"]> & {
366
+ interval: undefined;
367
+ };
368
+ export declare const indexedWorkByQuantity: import("@elaraai/e3").RecordIndexDef<"by_quantity", DictType<StringType, StructType<{
369
+ readonly reference: StringType;
370
+ readonly job: StringType;
371
+ readonly status: StringType;
372
+ readonly due: DateTimeType;
373
+ readonly quantity: IntegerType;
374
+ readonly urgent: BooleanType;
375
+ readonly tags: SetType<StringType>;
376
+ readonly operations: ArrayType<StructType<{
377
+ readonly key: StringType;
378
+ readonly label: StringType;
379
+ readonly start: DateTimeType;
380
+ readonly end: DateTimeType;
381
+ }>>;
382
+ }>>, IntegerType, import("@elaraai/east").NullType, readonly ["quantity"]> & {
383
+ interval: undefined;
384
+ };
385
+ export declare const indexedWorkByUrgent: import("@elaraai/e3").RecordIndexDef<"by_urgent", DictType<StringType, StructType<{
386
+ readonly reference: StringType;
387
+ readonly job: StringType;
388
+ readonly status: StringType;
389
+ readonly due: DateTimeType;
390
+ readonly quantity: IntegerType;
391
+ readonly urgent: BooleanType;
392
+ readonly tags: SetType<StringType>;
393
+ readonly operations: ArrayType<StructType<{
394
+ readonly key: StringType;
395
+ readonly label: StringType;
396
+ readonly start: DateTimeType;
397
+ readonly end: DateTimeType;
398
+ }>>;
399
+ }>>, BooleanType, import("@elaraai/east").NullType, readonly ["urgent"]> & {
400
+ interval: undefined;
401
+ };
402
+ export declare const indexedWorkByTag: import("@elaraai/e3").RecordIndexDef<"by_tag", DictType<StringType, StructType<{
403
+ readonly reference: StringType;
404
+ readonly job: StringType;
405
+ readonly status: StringType;
406
+ readonly due: DateTimeType;
407
+ readonly quantity: IntegerType;
408
+ readonly urgent: BooleanType;
409
+ readonly tags: SetType<StringType>;
410
+ readonly operations: ArrayType<StructType<{
411
+ readonly key: StringType;
412
+ readonly label: StringType;
413
+ readonly start: DateTimeType;
414
+ readonly end: DateTimeType;
415
+ }>>;
416
+ }>>, StringType, import("@elaraai/east").NullType, readonly ["tags"]> & {
417
+ interval: undefined;
418
+ };
419
+ export declare const sheetRecordIndexes: import("@elaraai/east").ExampleDef<[], any>;
420
+ export declare const sheetRecordIndexesMobile: import("@elaraai/east").ExampleDef<[], any>;
421
+ //# sourceMappingURL=sheet-records.examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet-records.examples.d.ts","sourceRoot":"","sources":["../../../test/sheet/sheet-records.examples.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wCAAwC;AAExC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAQ,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAW,OAAO,EAAE,MAAM,eAAe,CAAC;AAKrJ,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB;;;;;EAA6F,CAAC;AAC3H,gFAAgF;AAChF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;EAAgN,CAAC;AAyBzO,eAAO,MAAM,gBAAgB,qHAAwE,CAAC;AACtG,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;yGAAsE,CAAC;AACxG,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;4EAAiF,CAAC;AAChH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAuC,CAAC;AACrE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;CAAgF,CAAC;AACpH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC7F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC7F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;CAAyE,CAAC;AAC5G,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAAqE,CAAC;AACtG,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAAgE,CAAC;AAE9F,eAAO,MAAM,kBAAkB,6CAqB7B,CAAC;AAEH,eAAO,MAAM,wBAAwB,6CAqBnC,CAAC"}
@@ -0,0 +1,79 @@
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
+ import { ArrayType, BooleanType, DateTimeType, DictType, East, IntegerType, SetType, StringType, StructType, example, variant } from "@elaraai/east";
8
+ import { Box, Reactive, Slice, State, UIComponentType } from "@elaraai/east-ui";
9
+ import { Data, Record, Sheet } from "@elaraai/e3-ui";
10
+ import e3 from "@elaraai/e3";
11
+ /** The same work order can be edited as a Sheet row or scheduled on a Plan. */
12
+ export const IndexedOperation = StructType({ key: StringType, label: StringType, start: DateTimeType, end: DateTimeType });
13
+ /** Work orders retain their original String record keys through every index. */
14
+ export const IndexedWork = StructType({ reference: StringType, job: StringType, status: StringType, due: DateTimeType, quantity: IntegerType, urgent: BooleanType, tags: SetType(StringType), operations: ArrayType(IndexedOperation) });
15
+ const Work = DictType(StringType, IndexedWork);
16
+ /** The same pure generator seeds the example record and runs as an e3 task. */
17
+ const generateWork = East.function([IntegerType], Work, ($, count) => {
18
+ const rows = $.let(new Map(), Work);
19
+ const statuses = $.const(["Ready", "Scheduled", "Done"], ArrayType(StringType));
20
+ const jobs = $.const(["Cut panels", "Edge band", "Inspect", "Pack"], ArrayType(StringType));
21
+ const start = $.const(new Date("2026-10-01T00:00:00Z"));
22
+ const i = $.let(0n);
23
+ $.while(i.less(count), ($) => {
24
+ const reference = $.const(East.str `JOB-${i.add(10000n)}`);
25
+ const due = $.const(start.addMilliseconds(i.multiply(37n).remainder(90n).multiply(86400000n)));
26
+ $(rows.insert(reference, {
27
+ reference, job: jobs.get(i.remainder(4n)), status: statuses.get(i.remainder(3n)),
28
+ due,
29
+ quantity: i.remainder(24n).add(1n).multiply(100n), urgent: i.remainder(5n).equal(0n),
30
+ tags: i.remainder(2n).equal(0n).ifElse(() => new Set(["Production"]), () => new Set(["Dispatch"])),
31
+ operations: [{ key: East.str `${reference}-run`, label: jobs.get(i.remainder(4n)), start: due.addMilliseconds(21600000n), end: due.addMilliseconds(50400000n) }],
32
+ }));
33
+ $.assign(i, i.add(1n));
34
+ });
35
+ return rows;
36
+ });
37
+ export const indexedWorkCount = e3.input("indexed_work_count", IntegerType, variant("value", 50000n));
38
+ export const indexedWorkGenerated = e3.task("indexed_work_generated", [indexedWorkCount], generateWork);
39
+ export const indexedWorkOrders = e3.record("indexed_work_orders", Work, East.compile(generateWork, [])(50000n));
40
+ export const indexedWorkPatch = e3.mutation.patch(indexedWorkOrders);
41
+ export const indexedWorkByStatusDue = e3.recordIndex("by_status_due", indexedWorkOrders, { on: ["status", "due"] });
42
+ export const indexedWorkByDue = e3.recordIndex("by_due", indexedWorkOrders, { on: ["due"] });
43
+ export const indexedWorkByJob = e3.recordIndex("by_job", indexedWorkOrders, { on: ["job"] });
44
+ export const indexedWorkByQuantity = e3.recordIndex("by_quantity", indexedWorkOrders, { on: ["quantity"] });
45
+ export const indexedWorkByUrgent = e3.recordIndex("by_urgent", indexedWorkOrders, { on: ["urgent"] });
46
+ export const indexedWorkByTag = e3.recordIndex("by_tag", indexedWorkOrders, { on: ["tags"] });
47
+ export const sheetRecordIndexes = example({
48
+ keywords: ["Sheet", "Slice.bindRecord", "Data.bindPaged", "Record", "recordIndex", "saved views", "paging", "primary key", "filter"],
49
+ description: "50,000 work orders, narrowed by maintained record indexes. Choose Ready and Scheduled together, then a Due range: their disjoint index ranges form one paged view. Save retains original keys and hidden drafts; saved tabs retain the query.",
50
+ fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: ($) => {
51
+ const record = $.let(Record.bind(indexedWorkOrders, [indexedWorkPatch]));
52
+ const source = $.let(Data.bindPaged(indexedWorkOrders, { indexes: [indexedWorkByStatusDue, indexedWorkByDue, indexedWorkByJob, indexedWorkByQuantity, indexedWorkByUrgent, indexedWorkByTag] }));
53
+ const slice = $.let(Slice.bindRecord("ex.sheetRecordIndexes.scope", source, {
54
+ fields: { status: { label: "Status", hints: ["Ready", "Scheduled", "Done"] }, due: { label: "Due" }, job: { label: "Job" }, quantity: { label: "Quantity" }, urgent: { label: "Urgent" }, tags: { label: "Tag", hints: ["Production", "Dispatch"] } },
55
+ range: "due", search: ["job"], initial: { status: ["Ready"] },
56
+ presets: [{ id: "ready", name: "Ready", where: { status: ["Ready"] } }, { id: "urgent", name: "Urgent", where: { urgent: [true] } }],
57
+ }));
58
+ const views = $.let(State.bind([ArrayType(Sheet.Types.RecordView)], "ex.sheetRecordIndexes.views", []));
59
+ return _jsx(Box, { width: "100%", height: "760px", children: _jsx(Sheet, { name: "sheetRecordIndexes", data: Slice.rows(slice), slice: slice, views: views, columns: { reference: Sheet.column.text(IndexedWork, { header: "Reference", width: "136px" }), job: Sheet.column.text(IndexedWork, { header: "Job", width: "180px" }), status: Sheet.column.text(IndexedWork, { header: "Status", width: "120px" }), due: Sheet.column.date(IndexedWork, { header: "Due", width: "144px" }), quantity: Sheet.column.integer(IndexedWork, { header: "Quantity", width: "112px" }) }, onApply: Record.onApply(record, { keyed: true }), edits: { insertRows: false } }) });
60
+ } }))),
61
+ inputs: [],
62
+ });
63
+ export const sheetRecordIndexesMobile = example({
64
+ keywords: ["Sheet", "Slice.bindRecord", "mobile", "record", "filters", "saved views"],
65
+ description: "The same indexed work orders in a phone-width frame, with shared Slice controls on the toolbar's responsive ladder.",
66
+ fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: ($) => {
67
+ const record = $.let(Record.bind(indexedWorkOrders, [indexedWorkPatch]));
68
+ const source = $.let(Data.bindPaged(indexedWorkOrders, { indexes: [indexedWorkByStatusDue, indexedWorkByDue, indexedWorkByJob, indexedWorkByQuantity, indexedWorkByUrgent, indexedWorkByTag] }));
69
+ const slice = $.let(Slice.bindRecord("ex.sheetRecordIndexesMobile.scope", source, {
70
+ fields: { status: { label: "Status", hints: ["Ready", "Scheduled", "Done"] }, due: { label: "Due" }, job: { label: "Job" }, quantity: { label: "Quantity" }, urgent: { label: "Urgent" }, tags: { label: "Tag", hints: ["Production", "Dispatch"] } },
71
+ range: "due", search: ["job"], initial: { status: ["Ready"] },
72
+ presets: [{ id: "ready", name: "Ready", where: { status: ["Ready"] } }, { id: "urgent", name: "Urgent", where: { urgent: [true] } }],
73
+ }));
74
+ const views = $.let(State.bind([ArrayType(Sheet.Types.RecordView)], "ex.sheetRecordIndexesMobile.views", []));
75
+ return _jsx(Box, { width: "390px", maxWidth: "100%", height: "760px", children: _jsx(Sheet, { name: "sheetRecordIndexesMobile", data: Slice.rows(slice), slice: slice, views: views, columns: { reference: Sheet.column.text(IndexedWork, { header: "Reference", width: "136px" }), job: Sheet.column.text(IndexedWork, { header: "Job", width: "180px" }), status: Sheet.column.text(IndexedWork, { header: "Status", width: "120px" }), due: Sheet.column.date(IndexedWork, { header: "Due", width: "144px" }), quantity: Sheet.column.integer(IndexedWork, { header: "Quantity", width: "112px" }) }, onApply: Record.onApply(record, { keyed: true }), edits: { insertRows: false } }) });
76
+ } }))),
77
+ inputs: [],
78
+ });
79
+ //# sourceMappingURL=sheet-records.examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet-records.examples.js","sourceRoot":"","sources":["../../../test/sheet/sheet-records.examples.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,wCAAwC;AAExC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACrJ,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;AAC3H,gFAAgF;AAChF,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACzO,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAE/C,+EAA+E;AAC/E,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,C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AAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,EAClZ,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,GAAI,GACpF,CAAC;QACX,CAAC,GAAY,CAChB,CAAC;IACF,MAAM,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,7 @@
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
+ export declare const sheetApplyBatch: import("@elaraai/east").ExampleDef<[], any>;
6
+ export declare const sheetApplyEntries: import("@elaraai/east").ExampleDef<[], any>;
7
+ //# sourceMappingURL=sheet-transactions.examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet-transactions.examples.d.ts","sourceRoot":"","sources":["../../../test/sheet/sheet-transactions.examples.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,eAAO,MAAM,eAAe,6CAkB1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,6CA8B5B,CAAC"}
@@ -0,0 +1,58 @@
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
+ import { ArrayType, East, IntegerType, OptionType, StringType, StructType, example, none, some, variant } from "@elaraai/east";
6
+ import { Sheet } from "@elaraai/e3-ui";
7
+ const Job = StructType({ id: StringType, task: StringType, qty: IntegerType });
8
+ export const sheetApplyBatch = example({
9
+ keywords: ["Sheet", "apply", "ChangeSet", "patch", "atomic", "snapshot", "batch"],
10
+ description: "Apply an entry patch against the complete inline snapshot",
11
+ fn: East.function([], ArrayType(Job), ($) => {
12
+ const before = $.const({ id: "a", task: "Cut", qty: 2n }, Job);
13
+ const after = $.const({ id: "a", task: "Cut", qty: 3n }, Job);
14
+ const rows = $.const([before], ArrayType(Job));
15
+ const oldEntry = $.const(some(before), OptionType(Job));
16
+ const newEntry = $.const(some(after), OptionType(Job));
17
+ const batch = $.const({
18
+ requestId: "example-request", base: variant("snapshot", rows), label: "Set quantity",
19
+ changes: [{ id: "a", patch: East.diff(oldEntry, newEntry), place: none }],
20
+ }, Sheet.Types.ChangeSet(Job));
21
+ const apply = $.const(Sheet.apply(Job, "id"));
22
+ return apply(rows, batch, none).unwrap("applied");
23
+ }),
24
+ inputs: [],
25
+ returns: [{ id: "a", task: "Cut", qty: 3n }],
26
+ });
27
+ export const sheetApplyEntries = example({
28
+ keywords: ["Sheet", "Types", "Entry", "group", "row", "child", "variant", "apply", "ChangeSet", "batch", "atomic"],
29
+ description: "Apply a batch to work packages and loose tasks in one collection — Sheet.Types.Entry names the group-or-row union by its child field, and one entry patch reorders a package's tasks",
30
+ fn: East.function([], ArrayType(StringType), ($) => {
31
+ const TaskType = StructType({ id: StringType, task: StringType });
32
+ const PackageType = StructType({ id: StringType, name: StringType, tasks: ArrayType(TaskType) });
33
+ const Entry = Sheet.Types.Entry(PackageType, "tasks");
34
+ const before = $.const(variant("group", { id: "p1", name: "C-18 nesting", tasks: [
35
+ { id: "t1", task: "Cut panels" }, { id: "t2", task: "Inspect batches" },
36
+ ] }), Entry);
37
+ const after = $.const(variant("group", { id: "p1", name: "C-18 nesting", tasks: [
38
+ { id: "t2", task: "Inspect batches" }, { id: "t1", task: "Cut panels" },
39
+ ] }), Entry);
40
+ const loose = $.const(variant("row", { id: "t9", task: "Pack for delivery" }), Entry);
41
+ const entries = $.const([before, loose], ArrayType(Entry));
42
+ const oldEntry = $.const(some(before), OptionType(Entry));
43
+ const newEntry = $.const(some(after), OptionType(Entry));
44
+ const batch = $.const({
45
+ requestId: "reorder-nesting", base: variant("snapshot", entries), label: "Move a task",
46
+ changes: [{ id: "p1", patch: East.diff(oldEntry, newEntry), place: none }],
47
+ }, Sheet.Types.ChangeSet(Entry));
48
+ const apply = $.const(Sheet.apply(Entry, "id"));
49
+ const applied = $.const(apply(entries, batch, none).unwrap("applied"));
50
+ return applied.map((_$, entry) => entry.match({
51
+ group: (_$2, p) => East.str `${p.name}: ${p.tasks.map((_$3, t) => t.task).stringJoin(" → ")}`,
52
+ row: (_$2, t) => t.task,
53
+ }));
54
+ }),
55
+ inputs: [],
56
+ returns: ["C-18 nesting: Inspect batches → Cut panels", "Pack for delivery"],
57
+ });
58
+ //# sourceMappingURL=sheet-transactions.examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet-transactions.examples.js","sourceRoot":"","sources":["../../../test/sheet/sheet-transactions.examples.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC/H,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,GAAG,GAAG,UAAU,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAA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