@elaraai/e3-ui 1.0.94 → 1.0.96

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 (303) hide show
  1. package/dist/src/allocation/adapters.d.ts +159 -0
  2. package/dist/src/allocation/adapters.d.ts.map +1 -0
  3. package/dist/src/allocation/adapters.js +241 -0
  4. package/dist/src/allocation/adapters.js.map +1 -0
  5. package/dist/src/allocation/functions.d.ts +664 -0
  6. package/dist/src/allocation/functions.d.ts.map +1 -0
  7. package/dist/src/allocation/functions.js +782 -0
  8. package/dist/src/allocation/functions.js.map +1 -0
  9. package/dist/src/allocation/index.d.ts +2985 -0
  10. package/dist/src/allocation/index.d.ts.map +1 -0
  11. package/dist/src/allocation/index.js +499 -0
  12. package/dist/src/allocation/index.js.map +1 -0
  13. package/dist/src/allocation/types.d.ts +832 -0
  14. package/dist/src/allocation/types.d.ts.map +1 -0
  15. package/dist/src/allocation/types.js +360 -0
  16. package/dist/src/allocation/types.js.map +1 -0
  17. package/dist/src/bind/func.d.ts +14 -0
  18. package/dist/src/bind/func.d.ts.map +1 -1
  19. package/dist/src/bind/func.js +22 -1
  20. package/dist/src/bind/func.js.map +1 -1
  21. package/dist/src/calendar/index.d.ts +510 -1639
  22. package/dist/src/calendar/index.d.ts.map +1 -1
  23. package/dist/src/calendar/index.js +56 -29
  24. package/dist/src/calendar/index.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +9 -21
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -1
  27. package/dist/src/flowchart/canvas.js +10 -22
  28. package/dist/src/flowchart/canvas.js.map +1 -1
  29. package/dist/src/flowchart/flowchart.d.ts +19 -13
  30. package/dist/src/flowchart/flowchart.d.ts.map +1 -1
  31. package/dist/src/flowchart/flowchart.js.map +1 -1
  32. package/dist/src/flowchart/index.d.ts +44 -21
  33. package/dist/src/flowchart/index.d.ts.map +1 -1
  34. package/dist/src/flowchart/index.js +43 -20
  35. package/dist/src/flowchart/index.js.map +1 -1
  36. package/dist/src/flowchart/library.d.ts +166 -81
  37. package/dist/src/flowchart/library.d.ts.map +1 -1
  38. package/dist/src/flowchart/library.js +232 -105
  39. package/dist/src/flowchart/library.js.map +1 -1
  40. package/dist/src/flowchart/over.d.ts +9 -16
  41. package/dist/src/flowchart/over.d.ts.map +1 -1
  42. package/dist/src/flowchart/over.js +9 -16
  43. package/dist/src/flowchart/over.js.map +1 -1
  44. package/dist/src/flowchart/payload.d.ts +710 -508
  45. package/dist/src/flowchart/payload.d.ts.map +1 -1
  46. package/dist/src/flowchart/payload.js +128 -74
  47. package/dist/src/flowchart/payload.js.map +1 -1
  48. package/dist/src/flowchart/window.d.ts +132 -347
  49. package/dist/src/flowchart/window.d.ts.map +1 -1
  50. package/dist/src/flowchart/window.js +48 -55
  51. package/dist/src/flowchart/window.js.map +1 -1
  52. package/dist/src/index.d.ts +11 -7
  53. package/dist/src/index.d.ts.map +1 -1
  54. package/dist/src/index.js +14 -6
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/src/internal.d.ts +18 -7
  57. package/dist/src/internal.d.ts.map +1 -1
  58. package/dist/src/internal.js +28 -9
  59. package/dist/src/internal.js.map +1 -1
  60. package/dist/src/plan/event-rows.d.ts +26 -10
  61. package/dist/src/plan/event-rows.d.ts.map +1 -1
  62. package/dist/src/plan/event-rows.js +39 -13
  63. package/dist/src/plan/event-rows.js.map +1 -1
  64. package/dist/src/plan/ir.d.ts +244 -815
  65. package/dist/src/plan/ir.d.ts.map +1 -1
  66. package/dist/src/plan/ir.js +8 -6
  67. package/dist/src/plan/ir.js.map +1 -1
  68. package/dist/src/plan/library.d.ts +3 -0
  69. package/dist/src/plan/library.d.ts.map +1 -1
  70. package/dist/src/plan/library.js +1 -1
  71. package/dist/src/plan/library.js.map +1 -1
  72. package/dist/src/plan/ordered-source.d.ts +1 -0
  73. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  74. package/dist/src/plan/plan.d.ts +559 -1667
  75. package/dist/src/plan/plan.d.ts.map +1 -1
  76. package/dist/src/plan/plan.js +123 -45
  77. package/dist/src/plan/plan.js.map +1 -1
  78. package/dist/src/plan/root.d.ts +16 -20
  79. package/dist/src/plan/root.d.ts.map +1 -1
  80. package/dist/src/plan/root.js +23 -33
  81. package/dist/src/plan/root.js.map +1 -1
  82. package/dist/src/roster/coverage.d.ts +17 -231
  83. package/dist/src/roster/coverage.d.ts.map +1 -1
  84. package/dist/src/roster/coverage.js +94 -90
  85. package/dist/src/roster/coverage.js.map +1 -1
  86. package/dist/src/roster/fit.d.ts +59 -0
  87. package/dist/src/roster/fit.d.ts.map +1 -0
  88. package/dist/src/roster/fit.js +155 -0
  89. package/dist/src/roster/fit.js.map +1 -0
  90. package/dist/src/roster/index.d.ts +2862 -3662
  91. package/dist/src/roster/index.d.ts.map +1 -1
  92. package/dist/src/roster/index.js +383 -81
  93. package/dist/src/roster/index.js.map +1 -1
  94. package/dist/src/roster/library.d.ts +37 -92
  95. package/dist/src/roster/library.d.ts.map +1 -1
  96. package/dist/src/roster/library.js +25 -64
  97. package/dist/src/roster/library.js.map +1 -1
  98. package/dist/src/roster/lists.d.ts +195 -0
  99. package/dist/src/roster/lists.d.ts.map +1 -0
  100. package/dist/src/roster/lists.js +233 -0
  101. package/dist/src/roster/lists.js.map +1 -0
  102. package/dist/src/roster/rules.d.ts +17 -260
  103. package/dist/src/roster/rules.d.ts.map +1 -1
  104. package/dist/src/roster/rules.js +135 -132
  105. package/dist/src/roster/rules.js.map +1 -1
  106. package/dist/src/roster/targets.d.ts +115 -0
  107. package/dist/src/roster/targets.d.ts.map +1 -0
  108. package/dist/src/roster/targets.js +213 -0
  109. package/dist/src/roster/targets.js.map +1 -0
  110. package/dist/src/roster/times.d.ts +251 -0
  111. package/dist/src/roster/times.d.ts.map +1 -0
  112. package/dist/src/roster/times.js +174 -0
  113. package/dist/src/roster/times.js.map +1 -0
  114. package/dist/src/roster/types.d.ts +828 -183
  115. package/dist/src/roster/types.d.ts.map +1 -1
  116. package/dist/src/roster/types.js +224 -97
  117. package/dist/src/roster/types.js.map +1 -1
  118. package/dist/src/schedule/accessor.d.ts +28 -0
  119. package/dist/src/schedule/accessor.d.ts.map +1 -0
  120. package/dist/src/schedule/accessor.js +39 -0
  121. package/dist/src/schedule/accessor.js.map +1 -0
  122. package/dist/src/schedule/events.d.ts +170 -42
  123. package/dist/src/schedule/events.d.ts.map +1 -1
  124. package/dist/src/schedule/events.js +431 -171
  125. package/dist/src/schedule/events.js.map +1 -1
  126. package/dist/src/schedule/index.d.ts +41 -4
  127. package/dist/src/schedule/index.d.ts.map +1 -1
  128. package/dist/src/schedule/index.js +35 -3
  129. package/dist/src/schedule/index.js.map +1 -1
  130. package/dist/src/schedule/library.d.ts +13 -3
  131. package/dist/src/schedule/library.d.ts.map +1 -1
  132. package/dist/src/schedule/library.js +11 -4
  133. package/dist/src/schedule/library.js.map +1 -1
  134. package/dist/src/schedule/periods.d.ts +115 -0
  135. package/dist/src/schedule/periods.d.ts.map +1 -0
  136. package/dist/src/schedule/periods.js +215 -0
  137. package/dist/src/schedule/periods.js.map +1 -0
  138. package/dist/src/schedule/record-window.d.ts +25 -3
  139. package/dist/src/schedule/record-window.d.ts.map +1 -1
  140. package/dist/src/schedule/record-window.js +31 -18
  141. package/dist/src/schedule/record-window.js.map +1 -1
  142. package/dist/src/schedule/resources.d.ts +82 -4
  143. package/dist/src/schedule/resources.d.ts.map +1 -1
  144. package/dist/src/schedule/resources.js +44 -14
  145. package/dist/src/schedule/resources.js.map +1 -1
  146. package/dist/src/schedule/session.d.ts +69 -0
  147. package/dist/src/schedule/session.d.ts.map +1 -0
  148. package/dist/src/schedule/session.js +121 -0
  149. package/dist/src/schedule/session.js.map +1 -0
  150. package/dist/src/schedule/templates.d.ts +14 -2
  151. package/dist/src/schedule/templates.d.ts.map +1 -1
  152. package/dist/src/schedule/templates.js +5 -3
  153. package/dist/src/schedule/templates.js.map +1 -1
  154. package/dist/src/schedule/types.d.ts +1671 -37
  155. package/dist/src/schedule/types.d.ts.map +1 -1
  156. package/dist/src/schedule/types.js +196 -5
  157. package/dist/src/schedule/types.js.map +1 -1
  158. package/dist/src/schedule/window.d.ts +14 -0
  159. package/dist/src/schedule/window.d.ts.map +1 -1
  160. package/dist/src/schedule/window.js +14 -4
  161. package/dist/src/schedule/window.js.map +1 -1
  162. package/dist/src/schedule/words.d.ts +22 -0
  163. package/dist/src/schedule/words.d.ts.map +1 -0
  164. package/dist/src/schedule/words.js +25 -0
  165. package/dist/src/schedule/words.js.map +1 -0
  166. package/dist/src/sheet/index.d.ts +61 -27
  167. package/dist/src/sheet/index.d.ts.map +1 -1
  168. package/dist/src/sheet/index.js +59 -25
  169. package/dist/src/sheet/index.js.map +1 -1
  170. package/dist/src/sheet/library.d.ts +21 -3
  171. package/dist/src/sheet/library.d.ts.map +1 -1
  172. package/dist/src/sheet/library.js +23 -6
  173. package/dist/src/sheet/library.js.map +1 -1
  174. package/dist/src/sheet/registers.d.ts +100 -85
  175. package/dist/src/sheet/registers.d.ts.map +1 -1
  176. package/dist/src/sheet/registers.js +100 -85
  177. package/dist/src/sheet/registers.js.map +1 -1
  178. package/dist/src/sheet/root.d.ts +8 -12
  179. package/dist/src/sheet/root.d.ts.map +1 -1
  180. package/dist/src/sheet/root.js +6 -40
  181. package/dist/src/sheet/root.js.map +1 -1
  182. package/dist/src/sheet/sheet.d.ts +598 -2349
  183. package/dist/src/sheet/sheet.d.ts.map +1 -1
  184. package/dist/src/sheet/sheet.js +124 -37
  185. package/dist/src/sheet/sheet.js.map +1 -1
  186. package/dist/src/sheet/sub-rows.d.ts +74 -28
  187. package/dist/src/sheet/sub-rows.d.ts.map +1 -1
  188. package/dist/src/sheet/sub-rows.js +74 -28
  189. package/dist/src/sheet/sub-rows.js.map +1 -1
  190. package/dist/src/sheet/templates.d.ts +98 -34
  191. package/dist/src/sheet/templates.d.ts.map +1 -1
  192. package/dist/src/sheet/templates.js +102 -58
  193. package/dist/src/sheet/templates.js.map +1 -1
  194. package/dist/src/sheet/types.d.ts +289 -1359
  195. package/dist/src/sheet/types.d.ts.map +1 -1
  196. package/dist/src/sheet/types.js +20 -26
  197. package/dist/src/sheet/types.js.map +1 -1
  198. package/dist/src/sheet/views.d.ts +10 -11
  199. package/dist/src/sheet/views.d.ts.map +1 -1
  200. package/dist/src/sheet/views.js +15 -20
  201. package/dist/src/sheet/views.js.map +1 -1
  202. package/dist/src/{roster/visibility.d.ts → utils/key-visibility.d.ts} +42 -7
  203. package/dist/src/utils/key-visibility.d.ts.map +1 -0
  204. package/dist/src/utils/key-visibility.js +36 -0
  205. package/dist/src/utils/key-visibility.js.map +1 -0
  206. package/dist/src/utils/ordered-source.d.ts +1 -0
  207. package/dist/src/utils/ordered-source.d.ts.map +1 -1
  208. package/dist/src/utils/ordered-source.js +8 -3
  209. package/dist/src/utils/ordered-source.js.map +1 -1
  210. package/dist/src/utils/record-sources.d.ts +107 -0
  211. package/dist/src/utils/record-sources.d.ts.map +1 -0
  212. package/dist/src/utils/record-sources.js +132 -0
  213. package/dist/src/utils/record-sources.js.map +1 -0
  214. package/dist/test/allocation/allocation.examples.d.ts +2902 -0
  215. package/dist/test/allocation/allocation.examples.d.ts.map +1 -0
  216. package/dist/test/allocation/allocation.examples.js +643 -0
  217. package/dist/test/allocation/allocation.examples.js.map +1 -0
  218. package/dist/test/allocation/fit.examples.d.ts +546 -0
  219. package/dist/test/allocation/fit.examples.d.ts.map +1 -0
  220. package/dist/test/allocation/fit.examples.js +171 -0
  221. package/dist/test/allocation/fit.examples.js.map +1 -0
  222. package/dist/test/allocation/kiln-yard.d.ts +181 -0
  223. package/dist/test/allocation/kiln-yard.d.ts.map +1 -0
  224. package/dist/test/allocation/kiln-yard.js +228 -0
  225. package/dist/test/allocation/kiln-yard.js.map +1 -0
  226. package/dist/test/bind/data/data.examples.d.ts +651 -1
  227. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  228. package/dist/test/bind/data/data.examples.js +140 -2
  229. package/dist/test/bind/data/data.examples.js.map +1 -1
  230. package/dist/test/bind/func/func.examples.d.ts +10 -1
  231. package/dist/test/bind/func/func.examples.d.ts.map +1 -1
  232. package/dist/test/bind/func/func.examples.js +8 -1
  233. package/dist/test/bind/func/func.examples.js.map +1 -1
  234. package/dist/test/bind/record/record.examples.d.ts +633 -1
  235. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  236. package/dist/test/bind/record/record.examples.js +26 -2
  237. package/dist/test/bind/record/record.examples.js.map +1 -1
  238. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  239. package/dist/test/calendar/calendar-records.examples.js +18 -14
  240. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  241. package/dist/test/calendar/calendar.examples.d.ts +521 -16
  242. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  243. package/dist/test/calendar/calendar.examples.js +182 -135
  244. package/dist/test/calendar/calendar.examples.js.map +1 -1
  245. package/dist/test/examples-package.d.ts +75 -0
  246. package/dist/test/examples-package.d.ts.map +1 -0
  247. package/dist/test/examples-package.js +263 -0
  248. package/dist/test/examples-package.js.map +1 -0
  249. package/dist/test/flowchart/flowchart.examples.d.ts +211 -19
  250. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  251. package/dist/test/flowchart/flowchart.examples.js +102 -75
  252. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  253. package/dist/test/plan/plan-events.examples.d.ts +1439 -209
  254. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  255. package/dist/test/plan/plan-events.examples.js +199 -59
  256. package/dist/test/plan/plan-events.examples.js.map +1 -1
  257. package/dist/test/plan/plan-records.examples.d.ts +420 -0
  258. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  259. package/dist/test/plan/plan-records.examples.js +70 -19
  260. package/dist/test/plan/plan-records.examples.js.map +1 -1
  261. package/dist/test/plan/plan-windows.examples.d.ts +636 -55
  262. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  263. package/dist/test/plan/plan-windows.examples.js +69 -33
  264. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  265. package/dist/test/plan/plan.examples.d.ts +153 -31
  266. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  267. package/dist/test/plan/plan.examples.js +178 -101
  268. package/dist/test/plan/plan.examples.js.map +1 -1
  269. package/dist/test/roster/domain.examples.d.ts +467 -250
  270. package/dist/test/roster/domain.examples.d.ts.map +1 -1
  271. package/dist/test/roster/domain.examples.js +92 -29
  272. package/dist/test/roster/domain.examples.js.map +1 -1
  273. package/dist/test/roster/roster-records.examples.d.ts +430 -586
  274. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  275. package/dist/test/roster/roster-records.examples.js +102 -43
  276. package/dist/test/roster/roster-records.examples.js.map +1 -1
  277. package/dist/test/roster/roster.examples.d.ts +2319 -606
  278. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  279. package/dist/test/roster/roster.examples.js +456 -148
  280. package/dist/test/roster/roster.examples.js.map +1 -1
  281. package/dist/test/roster/warehouse.d.ts +172 -63
  282. package/dist/test/roster/warehouse.d.ts.map +1 -1
  283. package/dist/test/roster/warehouse.js +172 -39
  284. package/dist/test/roster/warehouse.js.map +1 -1
  285. package/dist/test/schedule/schedule.examples.d.ts +3499 -0
  286. package/dist/test/schedule/schedule.examples.d.ts.map +1 -0
  287. package/dist/test/schedule/schedule.examples.js +192 -0
  288. package/dist/test/schedule/schedule.examples.js.map +1 -0
  289. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  290. package/dist/test/sheet/sheet-records.examples.js +22 -18
  291. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  292. package/dist/test/sheet/sheet.examples.d.ts +715 -26
  293. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  294. package/dist/test/sheet/sheet.examples.js +204 -130
  295. package/dist/test/sheet/sheet.examples.js.map +1 -1
  296. package/package.json +17 -10
  297. package/dist/src/roster/people.d.ts +0 -50
  298. package/dist/src/roster/people.d.ts.map +0 -1
  299. package/dist/src/roster/people.js +0 -32
  300. package/dist/src/roster/people.js.map +0 -1
  301. package/dist/src/roster/visibility.d.ts.map +0 -1
  302. package/dist/src/roster/visibility.js +0 -25
  303. package/dist/src/roster/visibility.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/allocation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAc,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAE9I,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAC1E,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,eAAe,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAA0B,aAAa,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAClH,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EACH,kBAAkB,EAA2G,KAAK,kBAAkB,EACvJ,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,eAAe,EAChI,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAMhC;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;EAA2D,C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QAAC,UAAU,EAAE,OAAO,CAAC,CAAC,wBAAwB,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC,CAAC,kBAAkB,CAAC;QACvI,MAAM,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC;KACzC,CAAC;CACL;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,mBAwBxB,CAAC"}
@@ -0,0 +1,499 @@
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
+ * `<Allocation>` (#1371, `Builder Interfaces Spec.md` §6, `Allocation Spec.md`):
7
+ * a day's arrivals booked into timed lane slots, and each bin allocated to
8
+ * resources with room and time for its hold, over the app's own records, in the
9
+ * renderer's BuilderFrame. It writes the app's bins through the bin kind's roles
10
+ * (`Schedule.events`), reads its lanes and its resources (`Schedule.resources`)
11
+ * and what it books from (`Allocation.arrivals`), and publishes the app's days
12
+ * (`Schedule.periods`). It stores nothing in a shape of its own.
13
+ *
14
+ * The tag validates, builds the lanes, the resources and the arrivals from
15
+ * their accessors, and assembles the closed payload; it composes no East UI
16
+ * component and emits no layout, session or gesture program. The app's bin row
17
+ * type `R` crosses the payload as beast2 bytes, as Schedule's kinds' rows do:
18
+ * the app's `check` over bytes at `CheckContext(R)`, its columns over bytes at
19
+ * `R`, and the fit's binding checked against `FitRequest(R)`. The renderer
20
+ * compiles the Allocation's functions over `R`, the bin kind's `rowType`, and
21
+ * calls the fit, the app's `e3.function`, by name: it computes no fit of its own.
22
+ *
23
+ * @packageDocumentation
24
+ */
25
+ import { ArrayType, BlobType, BooleanType, DateTimeType, East, Expr, FloatType, FunctionType, NullType, OptionType, StringType, StructType, VariantType, isTypeEqual, none, printType, some, variant, } from "@elaraai/east";
26
+ import { EastUI, StatusTokenType, TimeStepType } from "@elaraai/east-ui";
27
+ import { RecordSlicesChromeType, RowSourceType } from "@elaraai/east-ui/internal";
28
+ import { FuncBindingType, boundFuncSignature } from "../bind/func.js";
29
+ import { scheduleCheck } from "../schedule/index.js";
30
+ import { SCHEDULE_DEF } from "../schedule/resources.js";
31
+ import { ScheduleAllocationKindType, SchedulePeriodsKindType } from "../schedule/types.js";
32
+ import { recordSources } from "../utils/record-sources.js";
33
+ import { allocationArrivals, allocationArrivalsOf, allocationInitial, allocationLanesOf, allocationResourcesOf, isAllocationArrivals, } from "./adapters.js";
34
+ import { allocationAnswer, allocationCandidates, allocationCheck, allocationFit, allocationLoads, allocationLookahead, allocationSlots, } from "./functions.js";
35
+ import * as T from "./types.js";
36
+ // ============================================================================
37
+ // The payload
38
+ // ============================================================================
39
+ /**
40
+ * A declared library tab.
41
+ *
42
+ * @property arrivals - Arrivals: overdue, ready, removed from the plan, booked
43
+ * @property resources - Resources: free, loading and busy today
44
+ */
45
+ export const AllocationLibraryTabType = VariantType({ arrivals: NullType, resources: NullType });
46
+ /**
47
+ * One of the app's bin fields shown as a Table column and an inspector row.
48
+ *
49
+ * @property key - Its key
50
+ * @property label - Its heading (`Spec`)
51
+ * @property text - Its text, from the bin's row as bytes at the row type
52
+ * @property tone - Its tone, from the row as bytes; `none` for plain text
53
+ * @property table - Whether the Table shows it; the inspector always does
54
+ */
55
+ export const AllocationColumnType = StructType({
56
+ key: StringType, label: StringType, text: FunctionType([BlobType], StringType),
57
+ tone: OptionType(FunctionType([BlobType], OptionType(StatusTokenType))), table: BooleanType,
58
+ });
59
+ /**
60
+ * One of the board's nouns, resolved: as a heading writes it, its plural, and its article.
61
+ *
62
+ * @property one - The singular, as a heading writes it (`Bay`)
63
+ * @property other - The plural (`Bays`)
64
+ * @property article - `a` or `an`, before the singular in running text
65
+ */
66
+ export const AllocationNounType = StructType({ one: StringType, other: StringType, article: StringType });
67
+ /**
68
+ * The board's nouns, the app's, everywhere the board writes them (D12).
69
+ *
70
+ * @property lane - A lane (`Lane`)
71
+ * @property arrival - What the board books from (`Arrival`)
72
+ * @property resource - A resource (`Resource`)
73
+ * @property quantity - The quantity's heading word (`QTY`)
74
+ */
75
+ export const AllocationLabelsType = StructType({ lane: AllocationNounType, arrival: AllocationNounType, resource: AllocationNounType, quantity: StringType });
76
+ /**
77
+ * One of the Table's time bands: it runs from its hour to the next band's, the last to midnight.
78
+ *
79
+ * @property from - Its first hour of the day, `0 ≤ from < 24` (a fraction is minutes: `7.5` is 07:30)
80
+ * @property label - Its heading; `none`, its hours (`06:00–12:00`)
81
+ */
82
+ export const AllocationBandType = StructType({ from: FloatType, label: OptionType(StringType) });
83
+ /**
84
+ * The Table's options.
85
+ *
86
+ * @property bands - Its time bands, the first from 00:00, each later than the one before
87
+ */
88
+ export const AllocationTableOptionsType = StructType({ bands: ArrayType(AllocationBandType) });
89
+ /**
90
+ * The board's settings.
91
+ *
92
+ * @property layout - The first layout
93
+ * @property date - The first day; today when `none`
94
+ * @property horizon - The Timeline's resource axis around the day
95
+ * @property title - The summary's heading
96
+ * @property readOnly - No edits; a published day is always read-only
97
+ */
98
+ export const AllocationSettingsType = StructType({
99
+ layout: T.AllocationLayoutType, date: OptionType(DateTimeType), horizon: StructType({ before: TimeStepType, after: TimeStepType }),
100
+ title: StringType, readOnly: BooleanType,
101
+ });
102
+ /**
103
+ * The closed renderer payload (`Builder Interfaces Spec.md` §6). BuilderFrame
104
+ * is internal to the renderer.
105
+ *
106
+ * @property bin - The bin kind: the app's bins read and written through their roles, over bytes at the row type — its `unit` the quantity's, its `values` the fields no role maps
107
+ * @property lanes - Every lane, in order, from the lanes' resource kind's accessors
108
+ * @property every - The slot spacing
109
+ * @property resources - Every resource, from the resources' kind's accessors: the calculation scope, whatever the slice shows
110
+ * @property arrivals - Every arrival the day may book, from `Allocation.arrivals`' accessors
111
+ * @property initial - A booked bin's own fields, by its arrival's key, as bytes at the bin kind's `values`: what its `create` takes; `none`, their types' defaults
112
+ * @property periods - The app's days: their status, and Publish; `none`, no status chip and no Publish
113
+ * @property narrowed - Each narrowed source's keys, paged through its part of `slice`: the lanes, the resources and the arrivals that show
114
+ * @property fit - The app's fit, by its `e3.function`'s name
115
+ * @property check - The app's issues, from a `CheckContext(R)` as bytes
116
+ * @property columns - The app's bin fields as columns and inspector rows
117
+ * @property rules - The built-in rules
118
+ * @property library - The library's tabs, in order
119
+ * @property inspector - Whether the inspector pane shows: the bin kind's own `inspector`, or its form over `fields`, draws in it
120
+ * @property slice - The narrowing's chrome: a Slice over the bins', the lanes', the resources' and the arrivals' records, one rail
121
+ * @property settings - The board's settings
122
+ * @property id - Storage keys and drag-source ids
123
+ * @property labels - The board's nouns
124
+ * @property table - The Table's options
125
+ */
126
+ export const AllocationPayloadType = StructType({
127
+ bin: ScheduleAllocationKindType,
128
+ lanes: ArrayType(T.AllocationLaneType),
129
+ every: TimeStepType,
130
+ resources: ArrayType(T.AllocationResourceType),
131
+ arrivals: ArrayType(T.AllocationArrivalType),
132
+ initial: FunctionType([StringType], OptionType(BlobType)),
133
+ periods: OptionType(SchedulePeriodsKindType),
134
+ narrowed: StructType({
135
+ lanes: OptionType(RowSourceType(ArrayType(StringType))), resources: OptionType(RowSourceType(ArrayType(StringType))),
136
+ arrivals: OptionType(RowSourceType(ArrayType(StringType))),
137
+ }),
138
+ fit: FuncBindingType,
139
+ check: OptionType(FunctionType([BlobType], ArrayType(T.AllocationIssueType))),
140
+ columns: ArrayType(AllocationColumnType),
141
+ rules: T.AllocationRulesType,
142
+ library: ArrayType(AllocationLibraryTabType),
143
+ inspector: BooleanType,
144
+ slice: OptionType(RecordSlicesChromeType),
145
+ settings: AllocationSettingsType,
146
+ id: OptionType(StringType),
147
+ labels: AllocationLabelsType,
148
+ table: AllocationTableOptionsType,
149
+ });
150
+ /** Carrier registered by e3-ui-components. */
151
+ export const AllocationComponent = EastUI.component("Allocation", AllocationPayloadType, { optional: true });
152
+ /** The bin kind, as the refusals write it. */
153
+ const BINS = "events={{ bin: Schedule.events(Record.bind(bins, [binsPatch]), { at, resource, arrival, quantity, parts, hold }) }}";
154
+ /** The arrivals' declaration, as the refusals write it. */
155
+ const ARRIVALS = "Allocation.arrivals(rows, { label, quantity, hold, … })";
156
+ /** The props §2 removed, each refused by name with the form that replaces it (B4). */
157
+ const REMOVED = [
158
+ ["days", `\`days\` is gone — the Allocation writes the app's own bins, ${BINS}, and publishes the app's own days, ` +
159
+ "periods={Schedule.periods(Record.bind(days, [daysPatch]), { every: \"day\", status })}"],
160
+ ["window", "`window` is gone — the Allocation reads a day's bins through the bin kind's source of its slice, an interval index from `at` to `at`: " +
161
+ "slice={{ slice: Slice.bindRecords(key, { bin: { source: Data.bindPaged(bins, { indexes: [byTime] }), range: \"at\" } }) }}, the kind given " +
162
+ "`entries`; or the record whole"],
163
+ ["lanes", "`lanes` moves to `resources`: resources={{ <lanes>: Schedule.resources(rows, { name, icon, label, offset }), … }}, under the slot " +
164
+ "the bin kind's `resource.of` names — Allocation.lanes is gone"],
165
+ ["publish", "`publish` is gone — Publish is the app's own days, periods={Schedule.periods(Record.bind(days, [daysPatch]), { every: \"day\", status })}; " +
166
+ "leave `periods` out for no Publish"],
167
+ ["quantity", "`quantity` is gone — the unit is the bin kind's `quantity` role's: Schedule.events(record, { …, quantity: { field, unit: \"m³\" } })"],
168
+ ];
169
+ /** A noun, resolved: its plural the singular and `s`, its article `an` before a vowel letter, unless given. */
170
+ function nounOf(input, fallback, prop) {
171
+ const given = input === undefined ? { one: fallback } : typeof input === "string" ? { one: input } : input;
172
+ if (given.one.trim() === "")
173
+ throw new Error(`Allocation: \`labels.${prop}\` must not be empty`);
174
+ return { one: given.one, other: given.other ?? `${given.one}s`, article: given.article ?? (/^[aeiou]/i.test(given.one) ? "an" : "a") };
175
+ }
176
+ /**
177
+ * The board's nouns, resolved (D12): each the app's, or Lane, Arrival and
178
+ * Resource, with its plural and article; the quantity's heading `QTY`.
179
+ *
180
+ * @param labels - The `labels` prop, if given
181
+ * @returns The nouns, as the payload carries them
182
+ * @throws {Error} For `labels.event`, which is gone, naming `labels.arrival`; and for a noun that is empty
183
+ * @internal
184
+ */
185
+ export function allocationLabels(labels) {
186
+ if (labels !== undefined && labels["event"] !== undefined) {
187
+ throw new Error("Allocation: `labels.event` is gone — the board's noun for what it books is `labels.arrival`, \"Arrival\" by default");
188
+ }
189
+ return {
190
+ lane: nounOf(labels?.lane, "Lane", "lane"), arrival: nounOf(labels?.arrival, "Arrival", "arrival"),
191
+ resource: nounOf(labels?.resource, "Resource", "resource"), quantity: labels?.quantity ?? "QTY",
192
+ };
193
+ }
194
+ /**
195
+ * The Table's bands, checked: from 00:00, increasing, inside the day; four by
196
+ * default.
197
+ *
198
+ * @param bands - `table.bands`, if given
199
+ * @returns The bands, as the payload carries them
200
+ * @throws {Error} When there is none, the first is not from 0, one does not start after the one before, or one starts outside the day
201
+ * @internal
202
+ */
203
+ export function allocationBands(bands) {
204
+ const given = bands ?? [{ from: 0 }, { from: 6 }, { from: 12 }, { from: 18 }];
205
+ if (given.length === 0)
206
+ throw new Error("Allocation: `table.bands` needs at least one band, from 0");
207
+ given.forEach((band, i) => {
208
+ if (!Number.isFinite(band.from) || band.from < 0 || band.from >= 24)
209
+ throw new Error(`Allocation: \`table.bands\`' band ${i + 1} starts at ${band.from}: a band starts within the day, 0 to under 24`);
210
+ if (i === 0 && band.from !== 0)
211
+ throw new Error("Allocation: `table.bands`' first band starts at 0, so every slot of the day is in one");
212
+ if (i > 0 && band.from <= given[i - 1].from)
213
+ throw new Error(`Allocation: \`table.bands\` start in order: band ${i + 1} starts at ${band.from}, not after ${given[i - 1].from}`);
214
+ });
215
+ return given.map(band => ({ from: band.from, label: band.label === undefined ? none : some(band.label) }));
216
+ }
217
+ /**
218
+ * An app's function over a request of the bin row type, checked, then wrapped
219
+ * so the request crosses as bytes.
220
+ *
221
+ * @param fn - The app's function
222
+ * @param asks - The request type over the bin row type
223
+ * @param answers - What it answers
224
+ * @param refusal - What a function of another type is refused with, naming the prop
225
+ * @returns The function over bytes
226
+ * @throws {Error} With `refusal` when the function asks or answers another type
227
+ */
228
+ function overBytes(fn, asks, answers, refusal) {
229
+ const author = East.value(fn);
230
+ const type = Expr.type(author);
231
+ if (type.type !== "Function" || type.inputs.length !== 1 || !isTypeEqual(type.inputs[0], asks) || !isTypeEqual(type.output, answers)) {
232
+ throw new Error(refusal);
233
+ }
234
+ return East.function([BlobType], answers, ($, bytes) => {
235
+ const call = $.const(author);
236
+ return call(bytes.decodeBeast(asks, "v2"));
237
+ });
238
+ }
239
+ /**
240
+ * The fit's binding, checked: `Func.bind` of an `e3.function` from `Allocation.Types.FitRequest(R)` to `Allocation.Types.FitResult`.
241
+ *
242
+ * @param fit - What the app passed as `fit`
243
+ * @param rowType - The bin kind's row type
244
+ * @returns The binding's descriptor, which names the function
245
+ * @throws {Error} When it is not a `Func.bind` handle, or its function asks or answers another type, naming it — a fit over
246
+ * another row type naming both row types
247
+ */
248
+ function fitBinding(fit, rowType) {
249
+ const signature = boundFuncSignature(fit);
250
+ if (signature === undefined) {
251
+ throw new Error("Allocation: `fit` is Func.bind of the app's e3.function from Allocation.Types.FitRequest(R) to Allocation.Types.FitResult, R the bins' row type");
252
+ }
253
+ const asked = signature.asks;
254
+ if (!isTypeEqual(asked, T.AllocationFitRequestTypeFor(rowType))) {
255
+ // A FitRequest over another row: its day's bins' row.
256
+ const plan = asked.type === "Struct" ? asked.fields["plan"] : undefined;
257
+ const bins = plan?.type === "Struct" ? plan.fields["bins"] : undefined;
258
+ const theirs = bins?.type === "Dict" && bins.value.type === "Struct" ? bins.value.fields["row"] : undefined;
259
+ throw new Error(theirs !== undefined && isTypeEqual(asked, T.AllocationFitRequestTypeFor(theirs))
260
+ ? `Allocation: \`fit\` is bound over bin rows ${printType(theirs)}, and the bin kind's rows are ${printType(rowType)} — bind a fit over Allocation.Types.FitRequest of the bins' row type`
261
+ : `Allocation: \`fit\` asks ${printType(asked)}, not Allocation.Types.FitRequest(${printType(rowType)})`);
262
+ }
263
+ if (!isTypeEqual(signature.answers, T.AllocationFitResultType)) {
264
+ throw new Error(`Allocation: \`fit\` answers ${printType(signature.answers)}, not Allocation.Types.FitResult`);
265
+ }
266
+ return fit.binding;
267
+ }
268
+ /**
269
+ * Validates the declarations and assembles the Allocation's interface. View
270
+ * and interaction behaviour belong to the renderer, not this factory.
271
+ *
272
+ * @typeParam R - The app's bin row type
273
+ * @param props - The board's props
274
+ * @returns The closed payload
275
+ * @throws {Error} Naming the change to make (B4): a removed prop — `days`, `window`, `lanes`, `publish`, `quantity`,
276
+ * `resources` as values, `inspector={{ bin }}` or `labels.event`; `events` holding other than one kind; a bin kind with
277
+ * no lane (`resource`) or no `parts`, or whose slot, lanes' slot or resources' slot names a source of the slice twice;
278
+ * `resources` holding other than the lanes' kind and the resources' kind, one read a window at a time, resources keyed
279
+ * by anything but String, or a resources kind with no `min` or `max`; `arrivals` that is not `Allocation.arrivals`, and
280
+ * its `values` returning another struct than the bin kind's own fields; `periods` that is not `Schedule.periods`; a
281
+ * `fit` that is not `Func.bind` of a function from `FitRequest(R)` to `FitResult`, one over another row type naming
282
+ * both; a `check` of another type; a library tab or a column key listed twice; a label that is empty; the Table's
283
+ * bands not starting at 0 and rising within the day; and as `Schedule`'s checks, the bin kind's build
284
+ * (`buildAllocation`) and the slice's (`recordSources`) do
285
+ * @internal
286
+ */
287
+ export function createAllocationPayload(props) {
288
+ const given = props;
289
+ for (const [prop, refusal] of REMOVED) {
290
+ if (given[prop] !== undefined)
291
+ throw new Error(`Allocation: ${refusal}`);
292
+ }
293
+ if (given["resources"] instanceof Expr) {
294
+ throw new Error("Allocation: `resources` holds Schedule.resources kinds by slot — the lanes' (the bin kind's `resource.of`) and the resources' " +
295
+ "(its `parts.of`): resources={{ bays: Schedule.resources(rows, { …, offset }), kilns: Schedule.resources(rows, { …, min, max }) }} — " +
296
+ "Allocation.resources values are gone");
297
+ }
298
+ if (props.inspector !== undefined && typeof props.inspector !== "boolean") {
299
+ throw new Error("Allocation: `inspector` is true or false — a bin's own form is the bin kind's `inspector` (Schedule.events(record, { …, inspector }))");
300
+ }
301
+ const labels = allocationLabels(props.labels);
302
+ const bands = allocationBands(props.table?.bands);
303
+ // The bins: exactly one event kind.
304
+ const events = given["events"];
305
+ if (events instanceof Expr || (events !== undefined && (typeof events !== "object" || events === null))) {
306
+ throw new Error(`Allocation: \`events\` holds the bins, one Schedule.events kind — ${BINS}; what the board books from is arrivals={${ARRIVALS}}`);
307
+ }
308
+ const kinds = Object.entries(props.events ?? {});
309
+ if (kinds.length !== 1) {
310
+ throw new Error(kinds.length === 0
311
+ ? `Allocation: \`events\` holds the bins — ${BINS}`
312
+ : `Allocation: \`events\` holds one kind, the bins — and it holds ${kinds.length} (${kinds.map(([slot]) => slot).join(", ")})`);
313
+ }
314
+ const [slot, kind] = kinds[0];
315
+ const resources = props.resources ?? {};
316
+ scheduleCheck(resources, props.events, "Allocation");
317
+ // The lanes' slot, the bin kind's `resource.of`; and the resources', its `parts.of`.
318
+ if (kind.takes.length === 0) {
319
+ throw new Error(`Allocation: events.${slot} books each bin into one lane — give it a \`resource\`, a String field naming a key of the lanes' kind: ` +
320
+ "resource: { field, of: \"<lanes>\" }");
321
+ }
322
+ if (kind.takes.length > 1) {
323
+ throw new Error(`Allocation: events.${slot} books each bin into one lane — its \`resource\` is a String field naming a key of the lanes' kind, ` +
324
+ `and this one names a kind per case (${kind.takes.join(", ")})`);
325
+ }
326
+ const lanesSlot = kind.takes[0];
327
+ const partsSlot = kind.partsOf;
328
+ if (partsSlot === undefined) {
329
+ throw new Error(`Allocation: events.${slot} allocates each bin to resources — give it \`parts\`, a Dict of String to Float field and the resources' slot: ` +
330
+ "parts: { field, of: \"<resources>\" }");
331
+ }
332
+ // The slice names a source after each: the bins, the lanes, the resources and the arrivals.
333
+ if (slot === "arrivals" || lanesSlot === "arrivals" || partsSlot === "arrivals" || slot === lanesSlot || slot === partsSlot) {
334
+ throw new Error(`Allocation: the slice names a source after the bins' slot ("${slot}"), the lanes' ("${lanesSlot}"), the resources' ("${partsSlot}") ` +
335
+ "and the arrivals (`arrivals`) — give the bins a slot of their own, and none of them `arrivals`");
336
+ }
337
+ for (const name of Object.keys(resources)) {
338
+ if (name !== lanesSlot && name !== partsSlot) {
339
+ throw new Error(`Allocation: \`resources\` holds the lanes' kind (\`${lanesSlot}\`, the slot events.${slot}'s resource names) and the resources' kind ` +
340
+ `(\`${partsSlot}\`, the slot its parts name) — and it holds \`${name}\``);
341
+ }
342
+ }
343
+ const resourcesKind = resources[partsSlot];
344
+ if (resourcesKind === undefined) {
345
+ throw new Error(`Allocation: events.${slot}'s parts name the slot "${partsSlot}", and \`resources\` has no slot of that name (${Object.keys(resources).join(", ") || "none"})`);
346
+ }
347
+ if (!isTypeEqual(resourcesKind.keyType, StringType)) {
348
+ throw new Error(`Allocation: events.${slot}'s parts hold String keys of resources.${partsSlot}, which is keyed by ${printType(resourcesKind.keyType)} — key the resources by String`);
349
+ }
350
+ // The lanes' kind is there and keyed by String: `scheduleCheck` holds the slot the bin kind's resource names to it.
351
+ const lanesKind = resources[lanesSlot];
352
+ for (const [name, resourceKind, reads] of [
353
+ [lanesSlot, lanesKind, "the board draws every lane, and slots and checks read every one"],
354
+ [partsSlot, resourcesKind, "fits, checks and totals read every one"],
355
+ ]) {
356
+ if (resourceKind.source === undefined) {
357
+ throw new Error(`Allocation: resources.${name} is read whole — ${reads} — so give the rows as a Dict, usually a record's read(), not a paged read`);
358
+ }
359
+ }
360
+ if (resourcesKind.accessors.min === undefined || resourcesKind.accessors.max === undefined) {
361
+ throw new Error(`Allocation: resources.${partsSlot} gives each resource's \`min\` and \`max\` — ` +
362
+ `Schedule.resources(${partsSlot}.read(), { …, min: (k) => k.min, max: (k) => k.max })`);
363
+ }
364
+ // What the board books from.
365
+ if (!isAllocationArrivals(given["arrivals"])) {
366
+ throw new Error(`Allocation: \`arrivals\` is ${ARRIVALS} over the app's rows — every arrival the day may book` +
367
+ (given["arrivals"] instanceof Expr ? " — Allocation.Types.Arrival values are gone" : ""));
368
+ }
369
+ const arrivals = given["arrivals"];
370
+ const periods = props.periods;
371
+ if (periods !== undefined && periods[SCHEDULE_DEF] !== "periods") {
372
+ throw new Error("Allocation: `periods` is what the board publishes, the app's days — periods={Schedule.periods(Record.bind(days, [daysPatch]), { every: \"day\", status })}");
373
+ }
374
+ // The app's functions over the bin row type.
375
+ const rowType = kind.rowType;
376
+ const fit = fitBinding(props.fit, rowType);
377
+ const check = props.check === undefined ? undefined : overBytes(props.check, T.AllocationCheckContextTypeFor(rowType), ArrayType(T.AllocationIssueType), `Allocation: \`check\` is an East function from Allocation.Types.CheckContext(${printType(rowType)}) to Array<Allocation.Types.Issue>`);
378
+ // A booked bin's own fields, the ones no role maps: each arrival's `values`, at the bin kind's (B13).
379
+ const initial = allocationInitial(arrivals, kind.allocationValues);
380
+ // The app's columns over its bin row, as bytes.
381
+ const keys = new Set();
382
+ const columns = (props.columns ?? []).map(column => {
383
+ if (keys.has(column.key))
384
+ throw new Error(`Allocation: duplicate column ${column.key}`);
385
+ keys.add(column.key);
386
+ // An author's accessor may return a subtype (a tone of one case): widened to the column's type here.
387
+ const text = East.function([rowType], StringType, (_$, row) => East.as(column.text(row), StringType));
388
+ const tone = column.tone === undefined ? undefined
389
+ : East.function([rowType], OptionType(StatusTokenType), (_$, row) => East.as(column.tone(row), OptionType(StatusTokenType)));
390
+ return East.value({
391
+ key: column.key, label: column.label,
392
+ text: East.function([BlobType], StringType, ($, bytes) => {
393
+ const textOf = $.const(text);
394
+ return textOf(bytes.decodeBeast(rowType, "v2"));
395
+ }),
396
+ tone: tone === undefined ? none : some(East.function([BlobType], OptionType(StatusTokenType), ($, bytes) => {
397
+ const toneOf = $.const(tone);
398
+ return toneOf(bytes.decodeBeast(rowType, "v2"));
399
+ })),
400
+ table: column.table ?? true,
401
+ }, AllocationColumnType);
402
+ });
403
+ // The library's tabs, each once.
404
+ const seen = new Set();
405
+ const library = (props.library ?? []).map(tab => {
406
+ if (tab.kind !== "arrivals" && tab.kind !== "resources") {
407
+ throw new Error(`Allocation: a library tab is Allocation.library.arrivals() or Allocation.library.resources() — and this one is ${String(tab.kind)}`);
408
+ }
409
+ if (seen.has(tab.kind))
410
+ throw new Error(`Allocation: duplicate library tab ${tab.kind}`);
411
+ seen.add(tab.kind);
412
+ return East.value(variant(tab.kind, null), AllocationLibraryTabType);
413
+ });
414
+ // The narrowing: a source per record it narrows, named after what it narrows.
415
+ const narrowing = recordSources(props.slice, {
416
+ builder: "Allocation", names: [...new Set([slot, lanesSlot, partsSlot, "arrivals"])],
417
+ what: `its bins (${slot}), its lanes (${lanesSlot}), its resources (${partsSlot}) and its arrivals`,
418
+ });
419
+ return Expr.block($ => {
420
+ const bound = narrowing.bind($);
421
+ const shown = (name) => {
422
+ const source = bound.keys[name];
423
+ return source === undefined ? none : some(source);
424
+ };
425
+ return East.value({
426
+ // The bins, narrowed through their own source of the slice when the slice has one.
427
+ bin: kind.buildAllocation(slot, bound.parts[slot]),
428
+ lanes: allocationLanesOf(lanesKind),
429
+ every: props.every ?? variant("hours", 1.0),
430
+ resources: allocationResourcesOf(resourcesKind),
431
+ arrivals: allocationArrivalsOf(arrivals),
432
+ initial,
433
+ periods: periods === undefined ? none : some(periods.build()),
434
+ narrowed: { lanes: shown(lanesSlot), resources: shown(partsSlot), arrivals: shown("arrivals") },
435
+ fit,
436
+ check: check === undefined ? none : some(check),
437
+ columns,
438
+ rules: { under: props.rules?.under ?? true },
439
+ library,
440
+ inspector: props.inspector ?? false,
441
+ slice: narrowing.chrome,
442
+ settings: {
443
+ layout: variant(props.view?.layout ?? "timeline", null), date: props.view?.date === undefined ? none : some(props.view.date),
444
+ horizon: { before: props.horizon?.before ?? variant("days", 3.0), after: props.horizon?.after ?? variant("days", 10.0) },
445
+ title: props.title ?? "Allocation", readOnly: props.readOnly ?? false,
446
+ },
447
+ id: props.id === undefined ? none : some(props.id),
448
+ labels,
449
+ table: { bands },
450
+ }, AllocationPayloadType);
451
+ });
452
+ }
453
+ // ============================================================================
454
+ // The namespace
455
+ // ============================================================================
456
+ /** Declares the Arrivals tab. */
457
+ function allocationArrivalsTab() { return { kind: "arrivals" }; }
458
+ /** Declares the Resources tab. */
459
+ function allocationResourcesTab() { return { kind: "resources" }; }
460
+ /**
461
+ * Refuses a removed helper by name, with the form that replaces it.
462
+ *
463
+ * @param refusal - The words
464
+ * @returns A function that refuses
465
+ */
466
+ function removed(refusal) {
467
+ return () => { throw new Error(refusal); };
468
+ }
469
+ /**
470
+ * Books a day's arrivals into timed lane slots and allocates each bin to
471
+ * resources, over the app's own records, in an internal BuilderFrame.
472
+ *
473
+ * @param props - The bins, the lanes and resources, the arrivals and the fit, and the optional days, check, library, inspector and narrowing
474
+ * @returns The Allocation extension
475
+ * @remarks Every gesture is one undo step; Save sends each record's changes as its own request, and Publish saves, then the day's status. Issues never block either. Below 480px of main the same commands are explicit card actions.
476
+ */
477
+ export const Allocation = Object.assign((props) => AllocationComponent.Root(createAllocationPayload(props)), {
478
+ arrivals: allocationArrivals, fit: allocationFit, loads: allocationLoads, candidates: allocationCandidates, answer: allocationAnswer,
479
+ lookahead: allocationLookahead, check: allocationCheck, slots: allocationSlots,
480
+ library: {
481
+ arrivals: allocationArrivalsTab, resources: allocationResourcesTab,
482
+ events: removed("Allocation.library.events is gone — the Arrivals tab is Allocation.library.arrivals()"),
483
+ },
484
+ events: removed(`Allocation.events is gone — what the board books from is arrivals={${ARRIVALS}}, and its \`events\` are its bins, ${BINS}`),
485
+ lanes: removed("Allocation.lanes is gone — the lanes are a Schedule.resources kind under the slot the bin kind's `resource` names: " +
486
+ "resources={{ <lanes>: Schedule.resources(rows, { name, icon, label, offset }), … }}"),
487
+ resources: removed("Allocation.resources is gone — the resources are a Schedule.resources kind under the slot the bin kind's `parts` name: " +
488
+ "resources={{ …, <resources>: Schedule.resources(rows, { name, icon, label, min, max }) }}"),
489
+ Types: {
490
+ Lane: T.AllocationLaneType, Status: T.AllocationStatusType, Bin: T.AllocationBinTypeFor, Day: T.AllocationDayTypeFor,
491
+ Interval: T.AllocationIntervalType, Job: T.AllocationJobType, Detail: T.AllocationDetailType, Arrival: T.AllocationArrivalType,
492
+ Resource: T.AllocationResourceType, Rules: T.AllocationRulesType, Context: T.AllocationContextType, LoadState: T.AllocationLoadStateType,
493
+ Load: T.AllocationLoadType, Candidate: T.AllocationCandidateType, Refusal: T.AllocationRefusalType, Fit: T.AllocationFitType,
494
+ FitAsk: T.AllocationFitAskType, FitRequest: T.AllocationFitRequestTypeFor, FitResult: T.AllocationFitResultType, Fix: T.AllocationFixType,
495
+ IssueKind: T.AllocationIssueKindType, Issue: T.AllocationIssueType, CheckContext: T.AllocationCheckContextTypeFor,
496
+ SlotStatus: T.AllocationSlotStatusType, Slot: T.AllocationSlotType, Layout: T.AllocationLayoutType,
497
+ },
498
+ });
499
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/allocation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAC9I,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,GAE9C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAkB,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAkC,MAAM,2BAA2B,CAAC;AAClH,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAkB,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAA6B,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC3F,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