@elaraai/e3-ui 1.0.96 → 1.0.98

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 (304) hide show
  1. package/dist/src/allocation/index.d.ts +258 -7
  2. package/dist/src/allocation/index.d.ts.map +1 -1
  3. package/dist/src/allocation/index.js +30 -1
  4. package/dist/src/allocation/index.js.map +1 -1
  5. package/dist/src/allocation/types.d.ts +41 -0
  6. package/dist/src/allocation/types.d.ts.map +1 -1
  7. package/dist/src/allocation/types.js +35 -0
  8. package/dist/src/allocation/types.js.map +1 -1
  9. package/dist/src/bind/data-indexed.d.ts +31 -4
  10. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  11. package/dist/src/bind/data-indexed.js +54 -10
  12. package/dist/src/bind/data-indexed.js.map +1 -1
  13. package/dist/src/calendar/index.d.ts +540 -14
  14. package/dist/src/calendar/index.d.ts.map +1 -1
  15. package/dist/src/calendar/index.js +43 -7
  16. package/dist/src/calendar/index.js.map +1 -1
  17. package/dist/src/calendar/paged.d.ts +89 -0
  18. package/dist/src/calendar/paged.d.ts.map +1 -0
  19. package/dist/src/calendar/paged.js +148 -0
  20. package/dist/src/calendar/paged.js.map +1 -0
  21. package/dist/src/flowchart/payload.d.ts +156 -0
  22. package/dist/src/flowchart/payload.d.ts.map +1 -1
  23. package/dist/src/flowchart/window.d.ts +12 -0
  24. package/dist/src/flowchart/window.d.ts.map +1 -1
  25. package/dist/src/index.d.ts +11 -2
  26. package/dist/src/index.d.ts.map +1 -1
  27. package/dist/src/index.js +19 -0
  28. package/dist/src/index.js.map +1 -1
  29. package/dist/src/internal.d.ts +11 -5
  30. package/dist/src/internal.d.ts.map +1 -1
  31. package/dist/src/internal.js +28 -7
  32. package/dist/src/internal.js.map +1 -1
  33. package/dist/src/plan/builders.d.ts +12 -8
  34. package/dist/src/plan/builders.d.ts.map +1 -1
  35. package/dist/src/plan/builders.js +12 -8
  36. package/dist/src/plan/builders.js.map +1 -1
  37. package/dist/src/plan/event-rows.d.ts +228 -156
  38. package/dist/src/plan/event-rows.d.ts.map +1 -1
  39. package/dist/src/plan/event-rows.js +239 -54
  40. package/dist/src/plan/event-rows.js.map +1 -1
  41. package/dist/src/plan/index.d.ts +5 -0
  42. package/dist/src/plan/index.d.ts.map +1 -1
  43. package/dist/src/plan/index.js +3 -0
  44. package/dist/src/plan/index.js.map +1 -1
  45. package/dist/src/plan/ir.d.ts +70 -0
  46. package/dist/src/plan/ir.d.ts.map +1 -1
  47. package/dist/src/plan/ordered-source.d.ts +2038 -1
  48. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  49. package/dist/src/plan/ordered-source.js +19 -11
  50. package/dist/src/plan/ordered-source.js.map +1 -1
  51. package/dist/src/plan/plan.d.ts +513 -32
  52. package/dist/src/plan/plan.d.ts.map +1 -1
  53. package/dist/src/plan/plan.js +119 -32
  54. package/dist/src/plan/plan.js.map +1 -1
  55. package/dist/src/plan/root.d.ts +4 -2
  56. package/dist/src/plan/root.d.ts.map +1 -1
  57. package/dist/src/plan/root.js +6 -4
  58. package/dist/src/plan/root.js.map +1 -1
  59. package/dist/src/plan/series.d.ts +13 -0
  60. package/dist/src/plan/series.d.ts.map +1 -1
  61. package/dist/src/plan/series.js +61 -7
  62. package/dist/src/plan/series.js.map +1 -1
  63. package/dist/src/plan/types.d.ts +14 -0
  64. package/dist/src/plan/types.d.ts.map +1 -1
  65. package/dist/src/plan/types.js +8 -0
  66. package/dist/src/plan/types.js.map +1 -1
  67. package/dist/src/roster/index.d.ts +608 -20
  68. package/dist/src/roster/index.d.ts.map +1 -1
  69. package/dist/src/roster/index.js +103 -29
  70. package/dist/src/roster/index.js.map +1 -1
  71. package/dist/src/roster/library.d.ts +12 -2
  72. package/dist/src/roster/library.d.ts.map +1 -1
  73. package/dist/src/roster/library.js +8 -0
  74. package/dist/src/roster/library.js.map +1 -1
  75. package/dist/src/roster/lists.d.ts +59 -12
  76. package/dist/src/roster/lists.d.ts.map +1 -1
  77. package/dist/src/roster/lists.js +51 -58
  78. package/dist/src/roster/lists.js.map +1 -1
  79. package/dist/src/roster/times.d.ts +402 -0
  80. package/dist/src/roster/times.d.ts.map +1 -1
  81. package/dist/src/roster/types.d.ts +913 -1
  82. package/dist/src/roster/types.d.ts.map +1 -1
  83. package/dist/src/roster/types.js +43 -3
  84. package/dist/src/roster/types.js.map +1 -1
  85. package/dist/src/schedule/cell-checks.d.ts +85 -0
  86. package/dist/src/schedule/cell-checks.d.ts.map +1 -0
  87. package/dist/src/schedule/cell-checks.js +211 -0
  88. package/dist/src/schedule/cell-checks.js.map +1 -0
  89. package/dist/src/schedule/events.d.ts +42 -10
  90. package/dist/src/schedule/events.d.ts.map +1 -1
  91. package/dist/src/schedule/events.js +349 -155
  92. package/dist/src/schedule/events.js.map +1 -1
  93. package/dist/src/schedule/fields.d.ts +134 -0
  94. package/dist/src/schedule/fields.d.ts.map +1 -0
  95. package/dist/src/schedule/fields.js +207 -0
  96. package/dist/src/schedule/fields.js.map +1 -0
  97. package/dist/src/schedule/library.d.ts +11 -3
  98. package/dist/src/schedule/library.d.ts.map +1 -1
  99. package/dist/src/schedule/library.js +9 -6
  100. package/dist/src/schedule/library.js.map +1 -1
  101. package/dist/src/schedule/optimise.d.ts +124 -0
  102. package/dist/src/schedule/optimise.d.ts.map +1 -0
  103. package/dist/src/schedule/optimise.js +140 -0
  104. package/dist/src/schedule/optimise.js.map +1 -0
  105. package/dist/src/schedule/pages.d.ts +76 -0
  106. package/dist/src/schedule/pages.d.ts.map +1 -0
  107. package/dist/src/schedule/pages.js +86 -0
  108. package/dist/src/schedule/pages.js.map +1 -0
  109. package/dist/src/schedule/record-window.d.ts +119 -6
  110. package/dist/src/schedule/record-window.d.ts.map +1 -1
  111. package/dist/src/schedule/record-window.js +139 -60
  112. package/dist/src/schedule/record-window.js.map +1 -1
  113. package/dist/src/schedule/resources.d.ts +8 -4
  114. package/dist/src/schedule/resources.d.ts.map +1 -1
  115. package/dist/src/schedule/resources.js +35 -15
  116. package/dist/src/schedule/resources.js.map +1 -1
  117. package/dist/src/schedule/session.d.ts +14 -0
  118. package/dist/src/schedule/session.d.ts.map +1 -1
  119. package/dist/src/schedule/session.js +29 -17
  120. package/dist/src/schedule/session.js.map +1 -1
  121. package/dist/src/schedule/types.d.ts +426 -36
  122. package/dist/src/schedule/types.d.ts.map +1 -1
  123. package/dist/src/schedule/types.js +63 -17
  124. package/dist/src/schedule/types.js.map +1 -1
  125. package/dist/src/schedule/window.d.ts +30 -9
  126. package/dist/src/schedule/window.d.ts.map +1 -1
  127. package/dist/src/schedule/window.js +101 -49
  128. package/dist/src/schedule/window.js.map +1 -1
  129. package/dist/src/schematic/index.d.ts +277 -0
  130. package/dist/src/schematic/index.d.ts.map +1 -0
  131. package/dist/src/schematic/index.js +206 -0
  132. package/dist/src/schematic/index.js.map +1 -0
  133. package/dist/src/schematic/kinds.d.ts +501 -0
  134. package/dist/src/schematic/kinds.d.ts.map +1 -0
  135. package/dist/src/schematic/kinds.js +1027 -0
  136. package/dist/src/schematic/kinds.js.map +1 -0
  137. package/dist/src/schematic/layers.d.ts +74 -0
  138. package/dist/src/schematic/layers.d.ts.map +1 -0
  139. package/dist/src/schematic/layers.js +99 -0
  140. package/dist/src/schematic/layers.js.map +1 -0
  141. package/dist/src/schematic/library.d.ts +202 -0
  142. package/dist/src/schematic/library.d.ts.map +1 -0
  143. package/dist/src/schematic/library.js +244 -0
  144. package/dist/src/schematic/library.js.map +1 -0
  145. package/dist/src/schematic/payload.d.ts +8360 -0
  146. package/dist/src/schematic/payload.d.ts.map +1 -0
  147. package/dist/src/schematic/payload.js +446 -0
  148. package/dist/src/schematic/payload.js.map +1 -0
  149. package/dist/src/schematic/schematic.d.ts +27 -0
  150. package/dist/src/schematic/schematic.d.ts.map +1 -0
  151. package/dist/src/schematic/schematic.js +17 -0
  152. package/dist/src/schematic/schematic.js.map +1 -0
  153. package/dist/src/schematic/shapes.d.ts +150 -0
  154. package/dist/src/schematic/shapes.d.ts.map +1 -0
  155. package/dist/src/schematic/shapes.js +171 -0
  156. package/dist/src/schematic/shapes.js.map +1 -0
  157. package/dist/src/schematic/templates.d.ts +96 -0
  158. package/dist/src/schematic/templates.d.ts.map +1 -0
  159. package/dist/src/schematic/templates.js +91 -0
  160. package/dist/src/schematic/templates.js.map +1 -0
  161. package/dist/src/schematic/types.d.ts +5766 -0
  162. package/dist/src/schematic/types.d.ts.map +1 -0
  163. package/dist/src/schematic/types.js +688 -0
  164. package/dist/src/schematic/types.js.map +1 -0
  165. package/dist/src/schematic/window.d.ts +212 -0
  166. package/dist/src/schematic/window.d.ts.map +1 -0
  167. package/dist/src/schematic/window.js +337 -0
  168. package/dist/src/schematic/window.js.map +1 -0
  169. package/dist/src/sheet/editing-bridge.d.ts +4 -2
  170. package/dist/src/sheet/editing-bridge.d.ts.map +1 -1
  171. package/dist/src/sheet/editing-bridge.js +8 -2
  172. package/dist/src/sheet/editing-bridge.js.map +1 -1
  173. package/dist/src/sheet/editing-types.d.ts +9 -5
  174. package/dist/src/sheet/editing-types.d.ts.map +1 -1
  175. package/dist/src/sheet/editing-types.js +9 -5
  176. package/dist/src/sheet/editing-types.js.map +1 -1
  177. package/dist/src/sheet/index.d.ts +18 -8
  178. package/dist/src/sheet/index.d.ts.map +1 -1
  179. package/dist/src/sheet/index.js +15 -7
  180. package/dist/src/sheet/index.js.map +1 -1
  181. package/dist/src/sheet/optimise.d.ts +69 -0
  182. package/dist/src/sheet/optimise.d.ts.map +1 -0
  183. package/dist/src/sheet/optimise.js +81 -0
  184. package/dist/src/sheet/optimise.js.map +1 -0
  185. package/dist/src/sheet/registers.d.ts +5 -5
  186. package/dist/src/sheet/registers.js +5 -5
  187. package/dist/src/sheet/root.d.ts +2 -0
  188. package/dist/src/sheet/root.d.ts.map +1 -1
  189. package/dist/src/sheet/root.js +2 -2
  190. package/dist/src/sheet/root.js.map +1 -1
  191. package/dist/src/sheet/sheet.d.ts +753 -573
  192. package/dist/src/sheet/sheet.d.ts.map +1 -1
  193. package/dist/src/sheet/sheet.js +45 -13
  194. package/dist/src/sheet/sheet.js.map +1 -1
  195. package/dist/src/sheet/types.d.ts +92 -12
  196. package/dist/src/sheet/types.d.ts.map +1 -1
  197. package/dist/src/sheet/types.js +4 -8
  198. package/dist/src/sheet/types.js.map +1 -1
  199. package/dist/src/utils/keyed-rows.d.ts +41 -0
  200. package/dist/src/utils/keyed-rows.d.ts.map +1 -0
  201. package/dist/src/utils/keyed-rows.js +64 -0
  202. package/dist/src/utils/keyed-rows.js.map +1 -0
  203. package/dist/src/utils/optimise.d.ts +79 -0
  204. package/dist/src/utils/optimise.d.ts.map +1 -0
  205. package/dist/src/utils/optimise.js +46 -0
  206. package/dist/src/utils/optimise.js.map +1 -0
  207. package/dist/test/allocation/allocation.examples.d.ts +6 -18
  208. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  209. package/dist/test/allocation/allocation.examples.js +3 -3
  210. package/dist/test/allocation/allocation.examples.js.map +1 -1
  211. package/dist/test/allocation/optimise.examples.d.ts +109 -0
  212. package/dist/test/allocation/optimise.examples.d.ts.map +1 -0
  213. package/dist/test/allocation/optimise.examples.js +223 -0
  214. package/dist/test/allocation/optimise.examples.js.map +1 -0
  215. package/dist/test/bind/data/data.examples.d.ts +540 -36
  216. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  217. package/dist/test/bind/data/data.examples.js +66 -2
  218. package/dist/test/bind/data/data.examples.js.map +1 -1
  219. package/dist/test/bind/record/record.examples.d.ts +1 -3
  220. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  221. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  222. package/dist/test/calendar/calendar-records.examples.js +3 -3
  223. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  224. package/dist/test/calendar/calendar-windows.examples.d.ts +9 -0
  225. package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -0
  226. package/dist/test/calendar/calendar-windows.examples.js +111 -0
  227. package/dist/test/calendar/calendar-windows.examples.js.map +1 -0
  228. package/dist/test/calendar/calendar.examples.d.ts +7 -21
  229. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  230. package/dist/test/calendar/calendar.examples.js +7 -7
  231. package/dist/test/calendar/calendar.examples.js.map +1 -1
  232. package/dist/test/calendar/optimise.examples.d.ts +132 -0
  233. package/dist/test/calendar/optimise.examples.d.ts.map +1 -0
  234. package/dist/test/calendar/optimise.examples.js +75 -0
  235. package/dist/test/calendar/optimise.examples.js.map +1 -0
  236. package/dist/test/examples-package.d.ts +46 -10
  237. package/dist/test/examples-package.d.ts.map +1 -1
  238. package/dist/test/examples-package.js +142 -32
  239. package/dist/test/examples-package.js.map +1 -1
  240. package/dist/test/flowchart/flowchart.examples.d.ts +10 -30
  241. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  242. package/dist/test/plan/optimise.examples.d.ts +207 -0
  243. package/dist/test/plan/optimise.examples.d.ts.map +1 -0
  244. package/dist/test/plan/optimise.examples.js +98 -0
  245. package/dist/test/plan/optimise.examples.js.map +1 -0
  246. package/dist/test/plan/plan-events.examples.d.ts +8 -24
  247. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  248. package/dist/test/plan/plan-events.examples.js +3 -3
  249. package/dist/test/plan/plan-events.examples.js.map +1 -1
  250. package/dist/test/plan/plan-records.examples.d.ts +200 -19
  251. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  252. package/dist/test/plan/plan-records.examples.js +125 -28
  253. package/dist/test/plan/plan-records.examples.js.map +1 -1
  254. package/dist/test/plan/plan-windows.examples.d.ts +853 -36
  255. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  256. package/dist/test/plan/plan-windows.examples.js +166 -29
  257. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  258. package/dist/test/plan/plan.examples.d.ts +7 -21
  259. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  260. package/dist/test/plan/plan.examples.js +11 -9
  261. package/dist/test/plan/plan.examples.js.map +1 -1
  262. package/dist/test/roster/domain.examples.d.ts +804 -0
  263. package/dist/test/roster/domain.examples.d.ts.map +1 -1
  264. package/dist/test/roster/domain.examples.js +3 -3
  265. package/dist/test/roster/domain.examples.js.map +1 -1
  266. package/dist/test/roster/optimise.examples.d.ts +485 -0
  267. package/dist/test/roster/optimise.examples.d.ts.map +1 -0
  268. package/dist/test/roster/optimise.examples.js +155 -0
  269. package/dist/test/roster/optimise.examples.js.map +1 -0
  270. package/dist/test/roster/roster-records.examples.d.ts +6 -18
  271. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  272. package/dist/test/roster/roster-records.examples.js +1 -1
  273. package/dist/test/roster/roster-records.examples.js.map +1 -1
  274. package/dist/test/roster/roster.examples.d.ts +3391 -21
  275. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  276. package/dist/test/roster/roster.examples.js +54 -7
  277. package/dist/test/roster/roster.examples.js.map +1 -1
  278. package/dist/test/roster/warehouse.d.ts +150 -7
  279. package/dist/test/roster/warehouse.d.ts.map +1 -1
  280. package/dist/test/roster/warehouse.js +36 -11
  281. package/dist/test/roster/warehouse.js.map +1 -1
  282. package/dist/test/schedule/schedule.examples.d.ts +1 -3
  283. package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
  284. package/dist/test/schematic/schematic-records.examples.d.ts +444 -0
  285. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -0
  286. package/dist/test/schematic/schematic-records.examples.js +205 -0
  287. package/dist/test/schematic/schematic-records.examples.js.map +1 -0
  288. package/dist/test/schematic/schematic.examples.d.ts +2289 -0
  289. package/dist/test/schematic/schematic.examples.d.ts.map +1 -0
  290. package/dist/test/schematic/schematic.examples.js +453 -0
  291. package/dist/test/schematic/schematic.examples.js.map +1 -0
  292. package/dist/test/sheet/optimise.examples.d.ts +177 -0
  293. package/dist/test/sheet/optimise.examples.d.ts.map +1 -0
  294. package/dist/test/sheet/optimise.examples.js +75 -0
  295. package/dist/test/sheet/optimise.examples.js.map +1 -0
  296. package/dist/test/sheet/sheet-records.examples.d.ts +95 -204
  297. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  298. package/dist/test/sheet/sheet-records.examples.js +42 -17
  299. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  300. package/dist/test/sheet/sheet.examples.d.ts +17 -33
  301. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  302. package/dist/test/sheet/sheet.examples.js +18 -15
  303. package/dist/test/sheet/sheet.examples.js.map +1 -1
  304. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAc,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EACvH,UAAU,EAAE,WAAW,EAAuB,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EACtG,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAA0B,aAAa,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAElH,OAAO,EAA2C,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAA2C,KAAK,sBAAsB,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAC7I,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAA2C,MAAM,sBAAsB,CAAC;AAE5H,iFAAiF;AACjF,eAAO,MAAM,kBAAkB;;;;EAA+E,CAAC;AAC/G,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB;;;;EAAkE,CAAC;AACl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hG;AAED,yDAAyD;AACzD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACvE,wCAAwC;IACxC,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,mCAAmC;IACnC,OAAO,EAAE;QAAE,SAAS,EAAE,OAAO,YAAY,CAAC;QAAC,OAAO,EAAE,OAAO,UAAU,CAAC;QAAC,GAAG,EAAE,OAAO,SAAS,CAAA;KAAE,CAAC;IAC/F,mHAAmH;IACnH,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG;QAChC,MAAM,EAAE,OAAO,kBAAkB,CAAC;QAAC,MAAM,EAAE,OAAO,kBAAkB,CAAC;QAAC,IAAI,EAAE,OAAO,gBAAgB,CAAC;QACpG,iJAAiJ;QACjJ,eAAe,EAAE,OAAO,8BAA8B,CAAC;QACvD,mEAAmE;QACnE,cAAc,EAAE,OAAO,6BAA6B,CAAC;KACxD,CAAC;CACL;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,QAAQ,EAAE,iBAKtB,CAAC"}
@@ -4,11 +4,16 @@
4
4
  */
5
5
  import { ArrayType, BooleanType, DateTimeType, DictType, East, Expr, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, none, some, variant, } from "@elaraai/east";
6
6
  import { EastUI } from "@elaraai/east-ui";
7
- import { RecordSlicesChromeType, RowSourceType } from "@elaraai/east-ui/internal";
7
+ import { RecordSliceConfigType, RecordSlicesChromeType, RowSourceType } from "@elaraai/east-ui/internal";
8
+ import { FuncBindingType } from "../bind/func.js";
8
9
  import { recordSources, sliceSourceNames, templatesSource } from "../utils/record-sources.js";
9
10
  import { Schedule, scheduleCheck, scheduleTitled } from "../schedule/index.js";
11
+ import { checkSchedulePagedEventKinds, checkSchedulePagedKinds, checkedScheduleTilings } from "../schedule/cell-checks.js";
12
+ import { ScheduleOptimiseRequestTypeFor, ScheduleOptimiseResultTypeFor, scheduleOptimiseBinding } from "../schedule/optimise.js";
10
13
  import { ScheduleAuthorTabType, buildScheduleTab } from "../schedule/library.js";
11
14
  import { ScheduleCandidateType, ScheduleEventRefType, ScheduleKindType, ScheduleResourcesType } from "../schedule/types.js";
15
+ import { CalendarPagedType, createCalendarPaged } from "./paged.js";
16
+ export { CalendarPagedType, createCalendarPaged } from "./paged.js";
12
17
  /** Calendar's layout: a time grid, resource columns or a horizontal timeline. */
13
18
  export const CalendarLayoutType = VariantType({ calendar: NullType, resources: NullType, timeline: NullType });
14
19
  /** The stretch shown: a day, week or month. */
@@ -27,16 +32,21 @@ export const CalendarSettingsType = StructType({
27
32
  });
28
33
  /**
29
34
  * Calendar's closed interface to its React renderer. The frame is a renderer detail.
35
+ * @property resources - The resource kinds, their rows resolved — none for a kind paged a window at a time, whose resources come through `paged`
36
+ * @property paged - A paged resource kind's resources a window at a time (#1424) — of the narrowing's, when its source of the slice narrows it; `none` while no resource kind is paged
30
37
  * @property slice - The narrowing's chrome: a Slice over the event kinds', the resource kinds' and the templates' records, one rail (#1343)
31
38
  * @property narrowed - Each source's narrowed keys, paged through its own data, by the source's name — a resource
32
- * kind's narrow its columns, rows and Choosers, a templates list's and a tab's their cards; an event kind reads its
33
- * own narrowing through its part
39
+ * kind's read whole narrow its columns, rows and Choosers, a templates list's and a tab's their cards; an event kind
40
+ * reads its own narrowing through its part, and a paged resource kind its windows
41
+ * @property optimise - The app's optimiser, by its `e3.function`'s name (#1409): what the Elara eye calls over the window in
42
+ * view, its result one edit of the session; `none`, no eye
34
43
  */
35
44
  export const CalendarPayloadType = StructType({
36
- events: ArrayType(ScheduleKindType), resources: ArrayType(ScheduleResourcesType), settings: CalendarSettingsType,
45
+ events: ArrayType(ScheduleKindType), resources: ArrayType(ScheduleResourcesType), paged: OptionType(CalendarPagedType), settings: CalendarSettingsType,
37
46
  library: ArrayType(CalendarLibraryTabType), inspector: BooleanType, slice: OptionType(RecordSlicesChromeType),
38
47
  narrowed: DictType(StringType, RowSourceType(ArrayType(StringType))),
39
48
  canDrop: OptionType(FunctionType([ScheduleCandidateType], OptionType(StringType))),
49
+ optimise: OptionType(FuncBindingType),
40
50
  onSelect: OptionType(FunctionType([ScheduleEventRefType], NullType)), id: OptionType(StringType),
41
51
  });
42
52
  /** The extension carrier registered by e3-ui-components. */
@@ -62,12 +72,23 @@ function authorTab(rows, config) {
62
72
  * @throws {Error} When kinds or library tabs are invalid, a kind has no `title` (#1367), working hours are outside the
63
73
  * day, `slice` is not `Slice.bindRecords` or names a source no kind, templates list or tab names, a templates list is
64
74
  * written in the code or names no source of the slice (templates are records, #1340), or a tab names a source the
65
- * slice lacks
75
+ * slice lacks, or `optimise` is not `Func.bind` of a function from `OptimiseRequest(E, S)` to `OptimiseResult(E)` over
76
+ * the kinds' rows (#1409); more than one resource kind is paged, or an event kind is placed on the paged kind and on
77
+ * another, or with no source of the slice — its record read whole, or the days in view read through its day index —
78
+ * each naming the series and summary indexes to declare over the kind's own fields (#1424). The series and summary
79
+ * indexes an event kind's source lists are refused in the same words as the Calendar is evaluated, the source's
80
+ * indexes read only then: one filed by another field than the kind's resource, or over other times than its events';
81
+ * a series index for a kind not placed on the paged kind alone; two series, or two summaries, by one tile over the
82
+ * same fields; a series index with no summary beside it; and, for a kind on the paged kind, a source listing no
83
+ * series index
66
84
  * @internal
67
85
  */
68
86
  export function createCalendarPayload(props) {
69
87
  const resources = props.resources ?? {};
70
88
  scheduleCheck(resources, props.events, "Calendar");
89
+ // A calendar pages one resource kind (#1424), and an event kind placed on it is read a cell at a time.
90
+ const resourceKinds = Object.entries(resources);
91
+ checkSchedulePagedKinds(resourceKinds, "Calendar", "a calendar");
71
92
  // The Calendar draws each event's title, which `Schedule.events` takes as optional.
72
93
  scheduleTitled(props.events, "Calendar");
73
94
  if (Object.keys(props.events).length === 0)
@@ -76,6 +97,8 @@ export function createCalendarPayload(props) {
76
97
  if (hours.from < 0n || hours.to > 24n || hours.from >= hours.to)
77
98
  throw new Error("Calendar: hours must satisfy 0 <= from < to <= 24");
78
99
  const events = Object.entries(props.events);
100
+ // The app's optimiser (#1409), held to the kinds' rows by slot.
101
+ const optimise = props.optimise === undefined ? undefined : scheduleOptimiseBinding("Calendar", props.optimise, events, Object.entries(resources));
79
102
  // Every templates list is a record of its own, naming its source of the slice (#1340): one written in the code,
80
103
  // or naming none the slice holds, is refused before a source no list names is, so the refusal says the change. A
81
104
  // slice of another kind is refused below, as such.
@@ -92,6 +115,7 @@ export function createCalendarPayload(props) {
92
115
  ...(props.library ?? []).flatMap(tab => tab.kind === "tab" && tab.config.source !== undefined ? [tab.config.source] : [])]);
93
116
  const narrowing = recordSources(props.slice, { builder: "Calendar", names: [...named], what: "its event kinds, its resource kinds and the templates and tabs that name a source",
94
117
  takes: name => named.has(name) });
118
+ checkSchedulePagedEventKinds(resourceKinds, events, narrowing.names, "Calendar");
95
119
  const seen = new Set();
96
120
  const library = (props.library ?? []).map(tab => {
97
121
  const name = tab.kind === "tab" ? "tab:" + tab.config.name : tab.kind;
@@ -104,10 +128,20 @@ export function createCalendarPayload(props) {
104
128
  });
105
129
  return Expr.block($ => {
106
130
  const bound = narrowing.bind($);
131
+ // The series and summary indexes each event kind's source lists (#1424), its record's, read as the Calendar is evaluated.
132
+ for (const [slot, kind] of events) {
133
+ const part = bound.parts[slot];
134
+ if (part !== undefined)
135
+ $(checkedScheduleTilings(slot, kind, resourceKinds, part.config, "Calendar"));
136
+ }
137
+ // A paged resource kind its source of the slice narrows pages the narrowing's rows themselves (#1424).
138
+ const pagedSlot = resourceKinds.find(([, kind]) => kind.window !== undefined)?.[0];
139
+ const paged = createCalendarPaged(resourceKinds, pagedSlot === undefined ? undefined : bound.data[pagedSlot]);
107
140
  return East.value({
108
141
  // Each event kind narrowed through its own source of the slice, when the slice has one.
109
142
  events: events.map(([slot, kind]) => kind.build(slot, bound.parts[slot])),
110
- resources: Object.entries(resources).map(([slot, kind]) => kind.build(slot)),
143
+ resources: resourceKinds.map(([slot, kind]) => kind.build(slot)),
144
+ paged: paged === undefined ? East.value(none, OptionType(CalendarPagedType)) : East.value(some(paged), OptionType(CalendarPagedType)),
111
145
  settings: {
112
146
  layout: variant(props.view?.layout ?? "calendar", null), period: variant(props.view?.period ?? "week", null),
113
147
  date: props.view?.date === undefined ? none : some(props.view.date), hours,
@@ -119,6 +153,7 @@ export function createCalendarPayload(props) {
119
153
  slice: narrowing.chrome,
120
154
  narrowed: new Map(narrowing.names.map(source => [source, bound.keys[source]])),
121
155
  canDrop: props.canDrop === undefined ? none : some(props.canDrop),
156
+ optimise: optimise === undefined ? none : some(optimise),
122
157
  onSelect: props.onSelect === undefined ? none : some(props.onSelect), id: props.id === undefined ? none : some(props.id),
123
158
  }, CalendarPayloadType);
124
159
  });
@@ -158,5 +193,6 @@ export function createCalendarPayload(props) {
158
193
  * ```
159
194
  */
160
195
  export const Calendar = Object.assign((props) => CalendarComponent.Root(createCalendarPayload(props)), { ...Schedule, library: { templates: templatesTab, backlog: backlogTab, tab: authorTab },
161
- Types: { ...Schedule.Types, Layout: CalendarLayoutType, Period: CalendarPeriodType, View: CalendarViewType } });
196
+ Types: { ...Schedule.Types, Layout: CalendarLayoutType, Period: CalendarPeriodType, View: CalendarViewType,
197
+ OptimiseRequest: ScheduleOptimiseRequestTypeFor, OptimiseResult: ScheduleOptimiseResultTypeFor } });
162
198
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/calendar/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EACvH,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAC/C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAkB,MAAM,kBAAkB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;IACpF,KAAK,EAAE,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,gBAAgB;QACtG,eAAe,EAAE,8BAA8B,EAAE,cAAc,EAAE,6BAA6B,EAAE,EAAE,CAC7G,CAAC"}
@@ -0,0 +1,89 @@
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
+ * A Calendar's paged resource kind (#1424): its resources a window at a
7
+ * time, as the Plan's paged kind's are (#1199, #1344) — the timeline's rows and
8
+ * the Resources view's columns the windows around the view, through the
9
+ * payload's `paged`. The kind's windows are its own paged read's, in its
10
+ * resources' key order, or — its source of the slice narrowing it — that
11
+ * source's narrowed rows themselves, in the source's index's order
12
+ * (`schedule/pages.ts`). Its Choosers search its own resources by key, in
13
+ * their key order, through its own paged read (`seek`, `entries`), and one
14
+ * resource is read by its key where an event names it (`byKey`). Its
15
+ * resources are never read whole.
16
+ *
17
+ * @packageDocumentation
18
+ */
19
+ import { ArrayType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, type EastType, type ExprType } from "@elaraai/east";
20
+ import type { ScheduleResourceKind } from "../schedule/resources.js";
21
+ /**
22
+ * A Calendar's paged resource kind's resources (#1424): see the module docs.
23
+ *
24
+ * @property kind - The paged resource kind's slot
25
+ * @property id - The identity of its windows' source: the source's, the same under every narrowing, when its source of the slice narrows it
26
+ * @property rows - `(offset, limit)` → its resources `[offset, offset + limit)` as the Calendar takes them, in the order its rows and columns draw — their key order, or the narrowing's index's order when its source of the slice narrows the kind; `none` while the window is in flight
27
+ * @property keys - `(offset, limit)` → the texts of the same resources' keys, in the same order: what the Calendar's cell reader places its blocks by, making no row; `none` while the window is in flight
28
+ * @property total - How many resources it has — the narrowing holds, when its source narrows it — once known
29
+ * @property revision - The snapshot of the resources the windows are read at
30
+ * @property refresh - Moves the windows to a snapshot, or to the one they hold now
31
+ * @property query - The narrowing the windows and the total belong to, as text: it moves when a choice does, and the windows are read again under it; `none` when no source narrows the kind
32
+ * @property seek - Where a key search lands among the kind's own resources, in their key order, whatever narrows it: what a Chooser searches the kind by; `none` for a read with no key search
33
+ * @property entries - `(offset, limit)` → the kind's own resources `[offset, offset + limit)`, in their key order, as the Calendar takes them: what a Chooser lists; `none` while the window is in flight
34
+ * @property byKey - One resource by its key's text: `some(some(row))` once read, `some(none)` for a key the kind does not hold, `none` while the read is in flight
35
+ */
36
+ export declare const CalendarPagedType: StructType<{
37
+ readonly kind: StringType;
38
+ readonly id: StringType;
39
+ readonly rows: FunctionType<[IntegerType, IntegerType], OptionType<ArrayType<StructType<{
40
+ readonly key: StringType;
41
+ readonly label: StringType;
42
+ readonly meta: OptionType<StringType>;
43
+ }>>>>;
44
+ readonly keys: FunctionType<[IntegerType, IntegerType], OptionType<ArrayType<StringType>>>;
45
+ readonly total: FunctionType<[], OptionType<IntegerType>>;
46
+ readonly revision: FunctionType<[], OptionType<StringType>>;
47
+ readonly refresh: FunctionType<[OptionType<StringType>], NullType>;
48
+ readonly query: OptionType<FunctionType<[], StringType>>;
49
+ readonly seek: OptionType<FunctionType<[import("@elaraai/east").VariantType<{
50
+ readonly key: StringType;
51
+ readonly prefix: StringType;
52
+ readonly fields: StructType<{
53
+ readonly values: ArrayType<StringType>;
54
+ readonly prefix: OptionType<StringType>;
55
+ }>;
56
+ readonly range: StructType<{
57
+ readonly from: ArrayType<StringType>;
58
+ readonly to: ArrayType<StringType>;
59
+ }>;
60
+ }>], OptionType<StructType<{
61
+ readonly found: import("@elaraai/east").BooleanType;
62
+ readonly row: IntegerType;
63
+ readonly count: IntegerType;
64
+ }>>>>;
65
+ readonly entries: FunctionType<[IntegerType, IntegerType], OptionType<ArrayType<StructType<{
66
+ readonly key: StringType;
67
+ readonly label: StringType;
68
+ readonly meta: OptionType<StringType>;
69
+ }>>>>;
70
+ readonly byKey: FunctionType<[StringType], OptionType<OptionType<StructType<{
71
+ readonly key: StringType;
72
+ readonly label: StringType;
73
+ readonly meta: OptionType<StringType>;
74
+ }>>>>;
75
+ }>;
76
+ /** Type representing {@link CalendarPagedType}. */
77
+ export type CalendarPagedType = typeof CalendarPagedType;
78
+ /**
79
+ * The paged resource kind's resources (see {@link CalendarPagedType}), when a
80
+ * resource kind is given its resources as a paged read.
81
+ *
82
+ * @param resources - The resource kinds, by slot, in order — at most one of them paged (the Calendar refuses more)
83
+ * @param narrowed - The paged kind's source of the slice's narrowed data, when the slice names one after its slot: its windows are then the narrowing's rows
84
+ * @returns The paged resources, or `undefined` when no resource kind is paged
85
+ * @throws {Error} When the kind's paged read is not a paged source of its resources, or its source's rows are not the kind's
86
+ * @internal
87
+ */
88
+ export declare function createCalendarPaged(resources: readonly (readonly [string, ScheduleResourceKind<EastType, EastType>])[], narrowed?: ExprType<StructType>): ExprType<CalendarPagedType> | undefined;
89
+ //# sourceMappingURL=paged.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paged.d.ts","sourceRoot":"","sources":["../../../src/calendar/paged.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACH,SAAS,EAAQ,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EACzE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAC9C,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIrE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY5B,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AAiDzD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAC/B,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GACrH,QAAQ,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAyCzC"}
@@ -0,0 +1,148 @@
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
+ * A Calendar's paged resource kind (#1424): its resources a window at a
7
+ * time, as the Plan's paged kind's are (#1199, #1344) — the timeline's rows and
8
+ * the Resources view's columns the windows around the view, through the
9
+ * payload's `paged`. The kind's windows are its own paged read's, in its
10
+ * resources' key order, or — its source of the slice narrowing it — that
11
+ * source's narrowed rows themselves, in the source's index's order
12
+ * (`schedule/pages.ts`). Its Choosers search its own resources by key, in
13
+ * their key order, through its own paged read (`seek`, `entries`), and one
14
+ * resource is read by its key where an event names it (`byKey`). Its
15
+ * resources are never read whole.
16
+ *
17
+ * @packageDocumentation
18
+ */
19
+ import { ArrayType, East, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, none, some, } from "@elaraai/east";
20
+ import { SeekQueryType, SeekRangeType } from "@elaraai/east-ui";
21
+ import { scheduleNarrowedWindows, scheduleOwnWindows } from "../schedule/pages.js";
22
+ import { ScheduleResourceRowType } from "../schedule/types.js";
23
+ import { scheduleEntryByKey } from "../schedule/window.js";
24
+ /**
25
+ * A Calendar's paged resource kind's resources (#1424): see the module docs.
26
+ *
27
+ * @property kind - The paged resource kind's slot
28
+ * @property id - The identity of its windows' source: the source's, the same under every narrowing, when its source of the slice narrows it
29
+ * @property rows - `(offset, limit)` → its resources `[offset, offset + limit)` as the Calendar takes them, in the order its rows and columns draw — their key order, or the narrowing's index's order when its source of the slice narrows the kind; `none` while the window is in flight
30
+ * @property keys - `(offset, limit)` → the texts of the same resources' keys, in the same order: what the Calendar's cell reader places its blocks by, making no row; `none` while the window is in flight
31
+ * @property total - How many resources it has — the narrowing holds, when its source narrows it — once known
32
+ * @property revision - The snapshot of the resources the windows are read at
33
+ * @property refresh - Moves the windows to a snapshot, or to the one they hold now
34
+ * @property query - The narrowing the windows and the total belong to, as text: it moves when a choice does, and the windows are read again under it; `none` when no source narrows the kind
35
+ * @property seek - Where a key search lands among the kind's own resources, in their key order, whatever narrows it: what a Chooser searches the kind by; `none` for a read with no key search
36
+ * @property entries - `(offset, limit)` → the kind's own resources `[offset, offset + limit)`, in their key order, as the Calendar takes them: what a Chooser lists; `none` while the window is in flight
37
+ * @property byKey - One resource by its key's text: `some(some(row))` once read, `some(none)` for a key the kind does not hold, `none` while the read is in flight
38
+ */
39
+ export const CalendarPagedType = StructType({
40
+ kind: StringType,
41
+ id: StringType,
42
+ rows: FunctionType([IntegerType, IntegerType], OptionType(ArrayType(ScheduleResourceRowType))),
43
+ keys: FunctionType([IntegerType, IntegerType], OptionType(ArrayType(StringType))),
44
+ total: FunctionType([], OptionType(IntegerType)),
45
+ revision: FunctionType([], OptionType(StringType)),
46
+ refresh: FunctionType([OptionType(StringType)], NullType),
47
+ query: OptionType(FunctionType([], StringType)),
48
+ seek: OptionType(FunctionType([SeekQueryType], OptionType(SeekRangeType))),
49
+ entries: FunctionType([IntegerType, IntegerType], OptionType(ArrayType(ScheduleResourceRowType))),
50
+ byKey: FunctionType([StringType], OptionType(OptionType(ScheduleResourceRowType))),
51
+ });
52
+ /** A window of resources as the Calendar takes them, while it is in flight. */
53
+ const RowsType = OptionType(ArrayType(ScheduleResourceRowType));
54
+ /**
55
+ * A window read of a paged kind's resources, as the Calendar takes them: in the order the windows give their keys.
56
+ *
57
+ * @param windows - Where the windows come from
58
+ * @param kind - The paged resource kind: what makes each resource's row
59
+ * @returns `(offset, limit)` → the window's resources; `none` while it is in flight
60
+ */
61
+ function windowRows(windows, kind) {
62
+ return East.function([IntegerType, IntegerType], RowsType, ($, offset, limit) => {
63
+ const read = $.const(windows.read);
64
+ const make = $.const(kind.calendarRow);
65
+ const result = $.let(none, RowsType);
66
+ $.match(read(offset, limit), {
67
+ some: ($2, page) => {
68
+ // A paged kind is keyed by String (`Schedule.resources`): each resource by its key's text, in the order its rows draw.
69
+ const all = $2.let(windows.rows(page));
70
+ const keys = windows.keys($2, page);
71
+ $2.assign(result, some(keys.map(($3, key) => make(all.get(key), key))));
72
+ },
73
+ });
74
+ return result;
75
+ });
76
+ }
77
+ /** A window of keys' texts, while it is in flight. */
78
+ const KeysType = OptionType(ArrayType(StringType));
79
+ /**
80
+ * A window read of a paged kind's resources' keys' texts, in the order the windows give them.
81
+ *
82
+ * @param windows - Where the windows come from
83
+ * @returns `(offset, limit)` → the window's keys' texts; `none` while it is in flight
84
+ */
85
+ function windowKeys(windows) {
86
+ return East.function([IntegerType, IntegerType], KeysType, ($, offset, limit) => {
87
+ const read = $.const(windows.read);
88
+ const result = $.let(none, KeysType);
89
+ $.match(read(offset, limit), {
90
+ some: ($2, page) => { $2.assign(result, some(windows.keys($2, page))); },
91
+ });
92
+ return result;
93
+ });
94
+ }
95
+ /**
96
+ * The paged resource kind's resources (see {@link CalendarPagedType}), when a
97
+ * resource kind is given its resources as a paged read.
98
+ *
99
+ * @param resources - The resource kinds, by slot, in order — at most one of them paged (the Calendar refuses more)
100
+ * @param narrowed - The paged kind's source of the slice's narrowed data, when the slice names one after its slot: its windows are then the narrowing's rows
101
+ * @returns The paged resources, or `undefined` when no resource kind is paged
102
+ * @throws {Error} When the kind's paged read is not a paged source of its resources, or its source's rows are not the kind's
103
+ * @internal
104
+ */
105
+ export function createCalendarPaged(resources, narrowed) {
106
+ const at = resources.find(([, kind]) => kind.window !== undefined);
107
+ if (at === undefined)
108
+ return undefined;
109
+ const [slot, kind] = at;
110
+ const own = scheduleOwnWindows(kind, `Calendar: resources.${slot}`);
111
+ const pages = narrowed === undefined ? own : scheduleNarrowedWindows(kind, slot, narrowed, "Calendar");
112
+ const handle = pages.handle;
113
+ const find = scheduleEntryByKey(kind.window, kind.keyType, kind.rowType);
114
+ const ByKey = OptionType(OptionType(ScheduleResourceRowType));
115
+ const byKey = East.function([StringType], ByKey, ($, key) => {
116
+ const read = $.const(find);
117
+ const make = $.const(kind.calendarRow);
118
+ const result = $.let(none, ByKey);
119
+ $.match(read(key), {
120
+ held: ($2, row) => { $2.assign(result, some(some(make(row, key)))); },
121
+ absent: ($2) => { $2.assign(result, some(none)); },
122
+ });
123
+ return result;
124
+ });
125
+ // A source that names no snapshot is read at none, and moves nowhere.
126
+ const revision = pages.pinned
127
+ ? handle.revision
128
+ : East.function([], OptionType(StringType), (_$) => East.value(none, OptionType(StringType)));
129
+ const refresh = pages.pinned
130
+ ? handle.refresh
131
+ : East.function([OptionType(StringType)], NullType, (_$, _target) => East.value(null, NullType));
132
+ const Query = CalendarPagedType.fields.query;
133
+ return East.value({
134
+ kind: slot,
135
+ id: handle.id,
136
+ rows: windowRows(pages, kind),
137
+ keys: windowKeys(pages),
138
+ total: handle.total,
139
+ revision,
140
+ refresh,
141
+ query: pages.query ? East.value(some(handle.query), Query) : East.value(none, Query),
142
+ // The Choosers search the kind's own resources, in their key order, whatever narrows its windows.
143
+ seek: own.handle.seek,
144
+ entries: windowRows(own, kind),
145
+ byKey,
146
+ }, CalendarPagedType);
147
+ }
148
+ //# sourceMappingURL=paged.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paged.js","sourceRoot":"","sources":["../../../src/calendar/paged.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACH,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,GAEvG,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAgD,MAAM,sBAAsB,CAAC;AAE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