optikos 0.4.0 → 0.5.1

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 (340) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/build.js +2 -0
  3. package/dist/build.js.map +7 -0
  4. package/dist/{chunk-FCJI2JF7.js → chunk-34KVSA2V.js} +2 -2
  5. package/dist/{chunk-M7FNPRV4.js → chunk-4DW5WBZB.js} +2 -2
  6. package/dist/chunk-4QAHVGGE.js +2 -0
  7. package/dist/chunk-4QAHVGGE.js.map +7 -0
  8. package/dist/{chunk-I5A74NMJ.js → chunk-4Z4E3BZ2.js} +2 -2
  9. package/dist/chunk-5H533QXN.js +2 -0
  10. package/dist/chunk-5H533QXN.js.map +7 -0
  11. package/dist/chunk-5KJ5Y4GY.js +2 -0
  12. package/dist/chunk-5KJ5Y4GY.js.map +7 -0
  13. package/dist/chunk-5WE2JOBY.js +2 -0
  14. package/dist/chunk-5WE2JOBY.js.map +7 -0
  15. package/dist/{chunk-SEW5OCQF.js → chunk-6IXVTWFH.js} +2 -2
  16. package/dist/{chunk-NJ5IFOPR.js → chunk-6S4BKUGD.js} +2 -2
  17. package/dist/{chunk-CWIE74NX.js → chunk-6VWSTY32.js} +2 -2
  18. package/dist/{chunk-F4HZUAKM.js → chunk-72ESP5DB.js} +2 -2
  19. package/dist/chunk-74IVU356.js +3 -0
  20. package/dist/chunk-74IVU356.js.map +7 -0
  21. package/dist/chunk-76A4MY7P.js +2 -0
  22. package/dist/chunk-76A4MY7P.js.map +7 -0
  23. package/dist/{chunk-3BG75P7T.js → chunk-7SE4B4TC.js} +2 -2
  24. package/dist/{chunk-PGVLRMTQ.js → chunk-A5N2AJCE.js} +2 -2
  25. package/dist/{chunk-3QRA3XOA.js → chunk-ALNUVKDT.js} +2 -2
  26. package/dist/{chunk-NQV4THNE.js → chunk-ANR27GED.js} +2 -2
  27. package/dist/{chunk-EXIADWI7.js → chunk-AZUWS2C5.js} +2 -2
  28. package/dist/{chunk-Z6L55FTN.js → chunk-BHKI2SU3.js} +2 -2
  29. package/dist/{chunk-GZIDE5K2.js → chunk-BIQX75P2.js} +2 -2
  30. package/dist/{chunk-MNSDGJKA.js → chunk-BPCD37A2.js} +2 -2
  31. package/dist/chunk-CGSCBLG2.js +2 -0
  32. package/dist/chunk-CGSCBLG2.js.map +7 -0
  33. package/dist/{chunk-R32HPK7R.js → chunk-DHUBCB4H.js} +2 -2
  34. package/dist/chunk-DY3ZYMXD.js +2 -0
  35. package/dist/chunk-DY3ZYMXD.js.map +7 -0
  36. package/dist/{chunk-JSEI44A7.js → chunk-EKRWJJ65.js} +2 -2
  37. package/dist/chunk-EO2IXU2W.js +2 -0
  38. package/dist/chunk-EO2IXU2W.js.map +7 -0
  39. package/dist/{chunk-JE56CJX2.js → chunk-EQ4IWYLW.js} +2 -2
  40. package/dist/{chunk-5PYJ6FJK.js → chunk-EXBGOHG7.js} +2 -2
  41. package/dist/{chunk-UQRQH2JW.js → chunk-FTZMF2QX.js} +2 -2
  42. package/dist/{chunk-XFIREDWO.js → chunk-G7NNOLOG.js} +2 -2
  43. package/dist/chunk-GPEA3UWY.js +2 -0
  44. package/dist/chunk-GPEA3UWY.js.map +7 -0
  45. package/dist/{chunk-4OB2IM5L.js → chunk-GX32KEG2.js} +2 -2
  46. package/dist/{chunk-ZSPJZ3ZH.js → chunk-GYGX4VYF.js} +2 -2
  47. package/dist/{chunk-BIGL3ZVD.js → chunk-H2EC3QP4.js} +2 -2
  48. package/dist/{chunk-HRW25TMU.js → chunk-H2KFAM7L.js} +2 -2
  49. package/dist/{chunk-6LJK4QWF.js → chunk-HHOSKOO6.js} +2 -2
  50. package/dist/{chunk-JJLOUMCJ.js → chunk-I5KHVFJ4.js} +2 -2
  51. package/dist/{chunk-N2LS4JD6.js → chunk-IB5T27PW.js} +2 -2
  52. package/dist/{chunk-5BMG5ZBY.js → chunk-IE7KRNFJ.js} +2 -2
  53. package/dist/chunk-IODSL7KU.js +2 -0
  54. package/dist/chunk-IODSL7KU.js.map +7 -0
  55. package/dist/{chunk-3FK52VQX.js → chunk-J2YP2YD3.js} +2 -2
  56. package/dist/{chunk-3FCIZKIN.js → chunk-J6D4T4WY.js} +2 -2
  57. package/dist/{chunk-H25XXQVH.js → chunk-JF4WPGJQ.js} +2 -2
  58. package/dist/chunk-K44IJHPF.js +2 -0
  59. package/dist/{chunk-UDXO3KM3.js → chunk-KMBTJ5AG.js} +2 -2
  60. package/dist/chunk-KMBTJ5AG.js.map +7 -0
  61. package/dist/chunk-KNWO4NXX.js +2 -0
  62. package/dist/chunk-KNWO4NXX.js.map +7 -0
  63. package/dist/{chunk-JLKIHXZP.js → chunk-KP7O5MVL.js} +2 -2
  64. package/dist/{chunk-HLS5FI55.js → chunk-KVUELLYF.js} +2 -2
  65. package/dist/chunk-LLHDEUIA.js +2 -0
  66. package/dist/chunk-LLHDEUIA.js.map +7 -0
  67. package/dist/{chunk-CMV3F6HR.js → chunk-LRUKKIYA.js} +2 -2
  68. package/dist/{chunk-DWTDNKXX.js → chunk-M2XOIEPY.js} +2 -2
  69. package/dist/{chunk-P4O57S6N.js → chunk-MBRCE5A7.js} +2 -2
  70. package/dist/{chunk-CFGCB37K.js → chunk-MMPPDQ2E.js} +2 -2
  71. package/dist/{chunk-643FOYQB.js → chunk-MRDX3RVJ.js} +2 -2
  72. package/dist/{chunk-6PZPBPAD.js → chunk-NAWQBQ57.js} +2 -2
  73. package/dist/{chunk-RG6SHPHF.js → chunk-NBR5IRZT.js} +2 -2
  74. package/dist/chunk-NSUAVAWO.js +2 -0
  75. package/dist/chunk-NSUAVAWO.js.map +7 -0
  76. package/dist/chunk-NYXRPWIB.js +2 -0
  77. package/dist/chunk-NYXRPWIB.js.map +7 -0
  78. package/dist/{chunk-J5QPFJ7M.js → chunk-OK3SN5PN.js} +2 -2
  79. package/dist/{chunk-NNR2FNHG.js → chunk-OQFQDTLL.js} +2 -2
  80. package/dist/chunk-OVEQUN4V.js +2 -0
  81. package/dist/chunk-OVEQUN4V.js.map +7 -0
  82. package/dist/{chunk-GEBAYD6N.js → chunk-PMIIQMVH.js} +2 -2
  83. package/dist/{chunk-DIOJGTUN.js → chunk-QT5JRZZJ.js} +2 -2
  84. package/dist/{chunk-IUOEPAWG.js → chunk-R52OSARY.js} +2 -2
  85. package/dist/{chunk-XR677UYD.js → chunk-RI62AESU.js} +2 -2
  86. package/dist/{chunk-6BOM5KZR.js → chunk-RRGAJ7T4.js} +2 -2
  87. package/dist/{chunk-2YRQULDC.js → chunk-SQTM4QFP.js} +2 -2
  88. package/dist/{chunk-FPU53CCV.js → chunk-TAFHKT6O.js} +2 -2
  89. package/dist/{chunk-3TCITFUU.js → chunk-TBM35UV6.js} +2 -2
  90. package/dist/{chunk-YDX2PCVL.js → chunk-TBOQ6HZZ.js} +2 -2
  91. package/dist/{chunk-GEJKFE4X.js → chunk-TJJL2GSJ.js} +2 -2
  92. package/dist/{chunk-3F4MN2BU.js → chunk-TJXH3F7Z.js} +2 -2
  93. package/dist/chunk-TMBGEZSD.js +2 -0
  94. package/dist/chunk-TMBGEZSD.js.map +7 -0
  95. package/dist/{chunk-BQEFLPDA.js → chunk-U5RENLU4.js} +2 -2
  96. package/dist/chunk-U5RENLU4.js.map +7 -0
  97. package/dist/chunk-UXL7KG46.js +2 -0
  98. package/dist/chunk-UXL7KG46.js.map +7 -0
  99. package/dist/{chunk-DWA45BWR.js → chunk-VADYSXHY.js} +2 -2
  100. package/dist/{chunk-Q6FY4L2F.js → chunk-VBLCO5Q7.js} +2 -2
  101. package/dist/{chunk-ESCLDVFS.js → chunk-VCK5WWMQ.js} +2 -2
  102. package/dist/{chunk-BCVOUMJJ.js → chunk-VCYCNSJY.js} +2 -2
  103. package/dist/{chunk-4AZ44KV4.js → chunk-VOCGAAG7.js} +2 -2
  104. package/dist/{chunk-AT7VFZRB.js → chunk-WHWPLMIG.js} +2 -2
  105. package/dist/{chunk-S2CMWKVB.js → chunk-WVJSNE6Q.js} +2 -2
  106. package/dist/chunk-WWETTEUZ.js +2 -0
  107. package/dist/{chunk-YXOKWCYS.js.map → chunk-WWETTEUZ.js.map} +4 -4
  108. package/dist/chunk-XFDNXSU5.js +2 -0
  109. package/dist/{chunk-XQHATUKN.js.map → chunk-XFDNXSU5.js.map} +3 -3
  110. package/dist/{chunk-U5L76VVB.js → chunk-XI4IBUE3.js} +2 -2
  111. package/dist/{chunk-4S3HRFQB.js → chunk-YAKKOVRI.js} +2 -2
  112. package/dist/{chunk-HG7OOHGD.js → chunk-YF5GWNM7.js} +2 -2
  113. package/dist/{chunk-4CWYF4O7.js → chunk-YRCR5ELY.js} +2 -2
  114. package/dist/{chunk-C3MWS7P2.js → chunk-YVEGWCYD.js} +2 -2
  115. package/dist/{chunk-MQ5BYGFY.js → chunk-ZYHMTPW4.js} +2 -2
  116. package/dist/components/alert.js +2 -0
  117. package/dist/components/alert.js.map +7 -0
  118. package/dist/components/avatar.js +1 -1
  119. package/dist/components/badge.js +1 -1
  120. package/dist/components/breadcrumb.js +1 -1
  121. package/dist/components/button.js +1 -1
  122. package/dist/components/calendar.js +1 -1
  123. package/dist/components/carousel.js +1 -1
  124. package/dist/components/chart.js +1 -1
  125. package/dist/components/chat.js +1 -1
  126. package/dist/components/checkbox.js +1 -1
  127. package/dist/components/checkboxgroup.js +1 -1
  128. package/dist/components/chip.js +1 -1
  129. package/dist/components/codeviewer.js +1 -1
  130. package/dist/components/columntotals.js +2 -0
  131. package/dist/components/columntotals.js.map +7 -0
  132. package/dist/components/combobox.js +1 -1
  133. package/dist/components/commandpalette.js +1 -1
  134. package/dist/components/container.js +1 -1
  135. package/dist/components/dataview.js +1 -1
  136. package/dist/components/datefield.js +1 -1
  137. package/dist/components/daterangefield.js +1 -1
  138. package/dist/components/datetimefield.js +1 -1
  139. package/dist/components/dial.js +1 -1
  140. package/dist/components/dropdown.js +1 -1
  141. package/dist/components/exportbar.js +2 -0
  142. package/dist/components/exportbar.js.map +7 -0
  143. package/dist/components/fieldgroup.js +1 -1
  144. package/dist/components/fieldlist.js +1 -1
  145. package/dist/components/fieldset.js +1 -1
  146. package/dist/components/filterbuilder.js +1 -1
  147. package/dist/components/form.js +1 -1
  148. package/dist/components/formactions.js +1 -1
  149. package/dist/components/formerrors.js +1 -1
  150. package/dist/components/formsection.js +1 -1
  151. package/dist/components/grid.js +1 -1
  152. package/dist/components/gridexport.js +1 -1
  153. package/dist/components/grouping.js +1 -1
  154. package/dist/components/icon.js +1 -1
  155. package/dist/components/image.js +1 -1
  156. package/dist/components/imagecanvas.js +1 -1
  157. package/dist/components/imagefield.js +1 -1
  158. package/dist/components/inputgroup.js +1 -1
  159. package/dist/components/label.js +1 -1
  160. package/dist/components/listbox.js +1 -1
  161. package/dist/components/lookupfield.js +1 -1
  162. package/dist/components/maskfield.js +1 -1
  163. package/dist/components/menu.js +1 -1
  164. package/dist/components/messagebox.js +1 -1
  165. package/dist/components/navmenu.js +1 -1
  166. package/dist/components/numberfield.js +1 -1
  167. package/dist/components/pagination.js +1 -1
  168. package/dist/components/panel.js +1 -1
  169. package/dist/components/pickerfield.js +1 -1
  170. package/dist/components/quicksearch.js +2 -0
  171. package/dist/components/quicksearch.js.map +7 -0
  172. package/dist/components/radiogroup.js +1 -1
  173. package/dist/components/searchgrid.js +1 -1
  174. package/dist/components/secretfield.js +1 -1
  175. package/dist/components/select.js +1 -1
  176. package/dist/components/shortcuts.js +1 -1
  177. package/dist/components/slider.js +1 -1
  178. package/dist/components/spacer.js +1 -1
  179. package/dist/components/spinner.js +1 -1
  180. package/dist/components/stat.js +1 -1
  181. package/dist/components/stepform.js +1 -1
  182. package/dist/components/stepper.js +1 -1
  183. package/dist/components/suggestfield.js +1 -1
  184. package/dist/components/table.js +1 -1
  185. package/dist/components/tabs.js +1 -1
  186. package/dist/components/textarea.js +1 -1
  187. package/dist/components/textfield.js +1 -1
  188. package/dist/components/timeentry.js +2 -0
  189. package/dist/components/timeentry.js.map +7 -0
  190. package/dist/components/timefield.js +1 -1
  191. package/dist/components/timeline.js +1 -1
  192. package/dist/components/toast.js +1 -1
  193. package/dist/components/toggle.js +1 -1
  194. package/dist/components/toolbar.js +1 -1
  195. package/dist/components/tree.js +1 -1
  196. package/dist/components/treegrid.js +1 -1
  197. package/dist/components/viewmanager.js +1 -1
  198. package/dist/components/viewport.js +1 -1
  199. package/dist/components/widget.js +1 -1
  200. package/dist/components/window.js +1 -1
  201. package/dist/core.js +1 -1
  202. package/dist/css/alert.css +60 -0
  203. package/dist/css/carousel.css +60 -0
  204. package/dist/css/columntotals.css +56 -0
  205. package/dist/css/exportbar.css +9 -0
  206. package/dist/css/grid.css +12 -0
  207. package/dist/css/grouping.css +7 -0
  208. package/dist/css/label.css +14 -0
  209. package/dist/css/quicksearch.css +13 -0
  210. package/dist/css/stat.css +14 -0
  211. package/dist/css/timeentry.css +116 -0
  212. package/dist/css/timeline.css +45 -0
  213. package/dist/data.js +1 -1
  214. package/dist/dev.js +1 -1
  215. package/dist/dev.js.map +2 -2
  216. package/dist/index.js +6 -6
  217. package/dist/index.js.map +1 -1
  218. package/dist/optikos.css +411 -0
  219. package/dist/types/build/build.d.ts +49 -0
  220. package/dist/types/build/index.d.ts +1 -0
  221. package/dist/types/components/alert.d.ts +1 -0
  222. package/dist/types/components/base/label/label.d.ts +11 -1
  223. package/dist/types/components/charts/stat/stat.d.ts +7 -1
  224. package/dist/types/components/columntotals.d.ts +1 -0
  225. package/dist/types/components/data/columntotals/columntotals.d.ts +24 -0
  226. package/dist/types/components/data/exportbar/exportbar.d.ts +24 -0
  227. package/dist/types/components/data/grid/footer.d.ts +6 -0
  228. package/dist/types/components/data/grouping/controls.d.ts +27 -0
  229. package/dist/types/components/data/grouping/grouping.d.ts +15 -3
  230. package/dist/types/components/data/quicksearch/quicksearch.d.ts +13 -0
  231. package/dist/types/components/data/timeentry/timeentry.d.ts +37 -0
  232. package/dist/types/components/data/timeline/timeline.d.ts +3 -0
  233. package/dist/types/components/exportbar.d.ts +1 -0
  234. package/dist/types/components/feedback/alert/alert.d.ts +28 -0
  235. package/dist/types/components/fields/datetimefield/datetimefield.d.ts +2 -0
  236. package/dist/types/components/fields/maskfield/maskfield.d.ts +23 -4
  237. package/dist/types/components/layout/carousel/carousel.d.ts +8 -0
  238. package/dist/types/components/navigation/navmenu/navmenu.d.ts +4 -0
  239. package/dist/types/components/quicksearch.d.ts +1 -0
  240. package/dist/types/components/timeentry.d.ts +1 -0
  241. package/dist/types/core/component.d.ts +6 -3
  242. package/dist/types/core/container.d.ts +2 -0
  243. package/dist/types/data/column.d.ts +4 -2
  244. package/dist/types/index.d.ts +6 -0
  245. package/dist/types/layout/layout.d.ts +5 -0
  246. package/dist/ui.js +1 -1
  247. package/package.json +5 -1
  248. package/dist/chunk-2HNQ2XRY.js +0 -2
  249. package/dist/chunk-2HNQ2XRY.js.map +0 -7
  250. package/dist/chunk-5PWPAN62.js +0 -2
  251. package/dist/chunk-5PWPAN62.js.map +0 -7
  252. package/dist/chunk-AQ3RTHG5.js +0 -2
  253. package/dist/chunk-AQ3RTHG5.js.map +0 -7
  254. package/dist/chunk-BJWREA76.js +0 -2
  255. package/dist/chunk-BJWREA76.js.map +0 -7
  256. package/dist/chunk-BQEFLPDA.js.map +0 -7
  257. package/dist/chunk-DJUSVBD5.js +0 -2
  258. package/dist/chunk-DJUSVBD5.js.map +0 -7
  259. package/dist/chunk-GFFZTFQH.js +0 -2
  260. package/dist/chunk-GFFZTFQH.js.map +0 -7
  261. package/dist/chunk-PMOXLQ72.js +0 -2
  262. package/dist/chunk-PMOXLQ72.js.map +0 -7
  263. package/dist/chunk-SB4ICXBV.js +0 -2
  264. package/dist/chunk-SB4ICXBV.js.map +0 -7
  265. package/dist/chunk-SWCB2GMN.js +0 -2
  266. package/dist/chunk-SWCB2GMN.js.map +0 -7
  267. package/dist/chunk-TQPQ4UEA.js +0 -2
  268. package/dist/chunk-TQPQ4UEA.js.map +0 -7
  269. package/dist/chunk-UDXO3KM3.js.map +0 -7
  270. package/dist/chunk-XQHATUKN.js +0 -2
  271. package/dist/chunk-YJTUFK4P.js +0 -2
  272. package/dist/chunk-YXOKWCYS.js +0 -2
  273. /package/dist/{chunk-FCJI2JF7.js.map → chunk-34KVSA2V.js.map} +0 -0
  274. /package/dist/{chunk-M7FNPRV4.js.map → chunk-4DW5WBZB.js.map} +0 -0
  275. /package/dist/{chunk-I5A74NMJ.js.map → chunk-4Z4E3BZ2.js.map} +0 -0
  276. /package/dist/{chunk-SEW5OCQF.js.map → chunk-6IXVTWFH.js.map} +0 -0
  277. /package/dist/{chunk-NJ5IFOPR.js.map → chunk-6S4BKUGD.js.map} +0 -0
  278. /package/dist/{chunk-CWIE74NX.js.map → chunk-6VWSTY32.js.map} +0 -0
  279. /package/dist/{chunk-F4HZUAKM.js.map → chunk-72ESP5DB.js.map} +0 -0
  280. /package/dist/{chunk-3BG75P7T.js.map → chunk-7SE4B4TC.js.map} +0 -0
  281. /package/dist/{chunk-PGVLRMTQ.js.map → chunk-A5N2AJCE.js.map} +0 -0
  282. /package/dist/{chunk-3QRA3XOA.js.map → chunk-ALNUVKDT.js.map} +0 -0
  283. /package/dist/{chunk-NQV4THNE.js.map → chunk-ANR27GED.js.map} +0 -0
  284. /package/dist/{chunk-EXIADWI7.js.map → chunk-AZUWS2C5.js.map} +0 -0
  285. /package/dist/{chunk-Z6L55FTN.js.map → chunk-BHKI2SU3.js.map} +0 -0
  286. /package/dist/{chunk-GZIDE5K2.js.map → chunk-BIQX75P2.js.map} +0 -0
  287. /package/dist/{chunk-MNSDGJKA.js.map → chunk-BPCD37A2.js.map} +0 -0
  288. /package/dist/{chunk-R32HPK7R.js.map → chunk-DHUBCB4H.js.map} +0 -0
  289. /package/dist/{chunk-JSEI44A7.js.map → chunk-EKRWJJ65.js.map} +0 -0
  290. /package/dist/{chunk-JE56CJX2.js.map → chunk-EQ4IWYLW.js.map} +0 -0
  291. /package/dist/{chunk-5PYJ6FJK.js.map → chunk-EXBGOHG7.js.map} +0 -0
  292. /package/dist/{chunk-UQRQH2JW.js.map → chunk-FTZMF2QX.js.map} +0 -0
  293. /package/dist/{chunk-XFIREDWO.js.map → chunk-G7NNOLOG.js.map} +0 -0
  294. /package/dist/{chunk-4OB2IM5L.js.map → chunk-GX32KEG2.js.map} +0 -0
  295. /package/dist/{chunk-ZSPJZ3ZH.js.map → chunk-GYGX4VYF.js.map} +0 -0
  296. /package/dist/{chunk-BIGL3ZVD.js.map → chunk-H2EC3QP4.js.map} +0 -0
  297. /package/dist/{chunk-HRW25TMU.js.map → chunk-H2KFAM7L.js.map} +0 -0
  298. /package/dist/{chunk-6LJK4QWF.js.map → chunk-HHOSKOO6.js.map} +0 -0
  299. /package/dist/{chunk-JJLOUMCJ.js.map → chunk-I5KHVFJ4.js.map} +0 -0
  300. /package/dist/{chunk-N2LS4JD6.js.map → chunk-IB5T27PW.js.map} +0 -0
  301. /package/dist/{chunk-5BMG5ZBY.js.map → chunk-IE7KRNFJ.js.map} +0 -0
  302. /package/dist/{chunk-3FK52VQX.js.map → chunk-J2YP2YD3.js.map} +0 -0
  303. /package/dist/{chunk-3FCIZKIN.js.map → chunk-J6D4T4WY.js.map} +0 -0
  304. /package/dist/{chunk-H25XXQVH.js.map → chunk-JF4WPGJQ.js.map} +0 -0
  305. /package/dist/{chunk-YJTUFK4P.js.map → chunk-K44IJHPF.js.map} +0 -0
  306. /package/dist/{chunk-JLKIHXZP.js.map → chunk-KP7O5MVL.js.map} +0 -0
  307. /package/dist/{chunk-HLS5FI55.js.map → chunk-KVUELLYF.js.map} +0 -0
  308. /package/dist/{chunk-CMV3F6HR.js.map → chunk-LRUKKIYA.js.map} +0 -0
  309. /package/dist/{chunk-DWTDNKXX.js.map → chunk-M2XOIEPY.js.map} +0 -0
  310. /package/dist/{chunk-P4O57S6N.js.map → chunk-MBRCE5A7.js.map} +0 -0
  311. /package/dist/{chunk-CFGCB37K.js.map → chunk-MMPPDQ2E.js.map} +0 -0
  312. /package/dist/{chunk-643FOYQB.js.map → chunk-MRDX3RVJ.js.map} +0 -0
  313. /package/dist/{chunk-6PZPBPAD.js.map → chunk-NAWQBQ57.js.map} +0 -0
  314. /package/dist/{chunk-RG6SHPHF.js.map → chunk-NBR5IRZT.js.map} +0 -0
  315. /package/dist/{chunk-J5QPFJ7M.js.map → chunk-OK3SN5PN.js.map} +0 -0
  316. /package/dist/{chunk-NNR2FNHG.js.map → chunk-OQFQDTLL.js.map} +0 -0
  317. /package/dist/{chunk-GEBAYD6N.js.map → chunk-PMIIQMVH.js.map} +0 -0
  318. /package/dist/{chunk-DIOJGTUN.js.map → chunk-QT5JRZZJ.js.map} +0 -0
  319. /package/dist/{chunk-IUOEPAWG.js.map → chunk-R52OSARY.js.map} +0 -0
  320. /package/dist/{chunk-XR677UYD.js.map → chunk-RI62AESU.js.map} +0 -0
  321. /package/dist/{chunk-6BOM5KZR.js.map → chunk-RRGAJ7T4.js.map} +0 -0
  322. /package/dist/{chunk-2YRQULDC.js.map → chunk-SQTM4QFP.js.map} +0 -0
  323. /package/dist/{chunk-FPU53CCV.js.map → chunk-TAFHKT6O.js.map} +0 -0
  324. /package/dist/{chunk-3TCITFUU.js.map → chunk-TBM35UV6.js.map} +0 -0
  325. /package/dist/{chunk-YDX2PCVL.js.map → chunk-TBOQ6HZZ.js.map} +0 -0
  326. /package/dist/{chunk-GEJKFE4X.js.map → chunk-TJJL2GSJ.js.map} +0 -0
  327. /package/dist/{chunk-3F4MN2BU.js.map → chunk-TJXH3F7Z.js.map} +0 -0
  328. /package/dist/{chunk-DWA45BWR.js.map → chunk-VADYSXHY.js.map} +0 -0
  329. /package/dist/{chunk-Q6FY4L2F.js.map → chunk-VBLCO5Q7.js.map} +0 -0
  330. /package/dist/{chunk-ESCLDVFS.js.map → chunk-VCK5WWMQ.js.map} +0 -0
  331. /package/dist/{chunk-BCVOUMJJ.js.map → chunk-VCYCNSJY.js.map} +0 -0
  332. /package/dist/{chunk-4AZ44KV4.js.map → chunk-VOCGAAG7.js.map} +0 -0
  333. /package/dist/{chunk-AT7VFZRB.js.map → chunk-WHWPLMIG.js.map} +0 -0
  334. /package/dist/{chunk-S2CMWKVB.js.map → chunk-WVJSNE6Q.js.map} +0 -0
  335. /package/dist/{chunk-U5L76VVB.js.map → chunk-XI4IBUE3.js.map} +0 -0
  336. /package/dist/{chunk-4S3HRFQB.js.map → chunk-YAKKOVRI.js.map} +0 -0
  337. /package/dist/{chunk-HG7OOHGD.js.map → chunk-YF5GWNM7.js.map} +0 -0
  338. /package/dist/{chunk-4CWYF4O7.js.map → chunk-YRCR5ELY.js.map} +0 -0
  339. /package/dist/{chunk-C3MWS7P2.js.map → chunk-YVEGWCYD.js.map} +0 -0
  340. /package/dist/{chunk-MQ5BYGFY.js.map → chunk-ZYHMTPW4.js.map} +0 -0
@@ -1,6 +1,9 @@
1
1
  import type { Model } from '../../../data/model.js';
2
- import type { Column } from '../../../data/column.js';
2
+ import { summarize } from '../../../data/column.js';
3
+ import { type GroupChoice, type GroupingControl } from './controls.js';
3
4
  import type { GridPlugin } from '../grid/grid.js';
5
+ export { summarize };
6
+ export type { GroupChoice, GroupingControl };
4
7
  export interface GroupingOptions {
5
8
  /** Record field to group by. */
6
9
  field?: string;
@@ -12,6 +15,14 @@ export interface GroupingOptions {
12
15
  summary?: 'group' | 'grand' | 'both';
13
16
  /** Start with every group closed. */
14
17
  collapsed?: boolean;
18
+ /** Icon buttons inside the grid, beside the pager: expand all, collapse all and, with `choices`, a "Group by" menu. `false` leaves one out. */
19
+ controls?: boolean | {
20
+ expand?: boolean;
21
+ collapse?: boolean;
22
+ by?: boolean;
23
+ };
24
+ /** The ways to group offered by the controls' menu (a field or a function each). */
25
+ choices?: GroupChoice[];
15
26
  }
16
27
  export interface Grouping extends GridPlugin {
17
28
  expandAll(): void;
@@ -20,9 +31,10 @@ export interface Grouping extends GridPlugin {
20
31
  setGroupBy(by: string | ((rec: Model) => unknown) | null): void;
21
32
  /** Opens or closes one group by its key. */
22
33
  toggle(key: unknown, open?: boolean): void;
34
+ /** The in-grid controls: show or hide one. */
35
+ setControlVisible(control: GroupingControl, visible: boolean): void;
36
+ setControlDisabled(control: GroupingControl, disabled: boolean): void;
23
37
  }
24
- /** The value of a column's `summary` over some records. */
25
- export declare function summarize(col: Column, recs: Model[]): unknown;
26
38
  /**
27
39
  * Groups the rows of the current page (a remote store groups what it loaded, not the whole set) under a header with
28
40
  * its count; the header toggles by click, Enter/Space, → and ←. Sorting works inside each group. Group headers and total
@@ -0,0 +1,13 @@
1
+ import type { GridPlugin } from '../grid/grid.js';
2
+ export interface QuickSearchOptions {
3
+ /** The record fields the text is looked for in (any of them matching keeps the row). */
4
+ fields: string[];
5
+ /** ms after the last key before filtering. Default 250. */
6
+ delay?: number;
7
+ placeholder?: string;
8
+ }
9
+ /**
10
+ * A search box inside the grid, in the row with the pager: what is typed keeps the rows where any of `fields` contains
11
+ * it. Other filters (a FilterBuilder) keep working beside it; a filter that replaces them clears the box.
12
+ */
13
+ export declare function quickSearch(options: QuickSearchOptions): GridPlugin;
@@ -0,0 +1,37 @@
1
+ import type { TimelineItem, TimelinePlugin } from '../timeline/timeline.js';
2
+ export interface TimeEntryOptions {
3
+ /** Minutes everything snaps to. Default 15. */
4
+ step?: number;
5
+ /** Shortest entry, in minutes. Default `step`. */
6
+ minDuration?: number;
7
+ /** Length of an entry created with the keyboard, in minutes. Default 60. */
8
+ duration?: number;
9
+ /** `false` keeps two entries of one lane from overlapping: a drag stops at the neighbour, a move is refused. Default `true`. */
10
+ overlap?: boolean;
11
+ /** Let an entry change lane (drag up/down, ↑/↓). Default `false`. */
12
+ moveAcrossLanes?: boolean;
13
+ /** Minutes a lane should add up to: its total is `is-under`, `is-met` or `is-over` that. */
14
+ target?: number;
15
+ /** Return `false` to lock an entry (approved, invoiced): it cannot be moved, resized, edited or removed. */
16
+ editable?: (item: TimelineItem) => boolean;
17
+ /** Fields of a new entry besides `lane`, `start` and `end`. */
18
+ defaults?: Partial<TimelineItem>;
19
+ /**
20
+ * Opens your own dialog to fill a new entry (`'create'`, after the drag or Enter) or to edit one (`'edit'`, double click
21
+ * or Enter on a block). Resolve with the fields to set (`title`, `text`, ...), or with `false` to cancel.
22
+ */
23
+ form?: (item: TimelineItem, mode: 'create' | 'edit') => Promise<Partial<TimelineItem> | false | void> | Partial<TimelineItem> | false | void;
24
+ }
25
+ /** A duration in minutes as people write it: `7h30`, `8h`, `45m`. */
26
+ export declare function formatDuration(minutes: number): string;
27
+ /**
28
+ * Creates, moves, resizes and removes entries on a `range` Timeline: drag an empty lane to create, drag a block to move,
29
+ * its ends to resize; the same with the keyboard (see the ficha). Snaps to `step`, keeps to `from`/`to`, can forbid
30
+ * overlap and lock entries. Shows each lane's total (and a grand total) against `target`.
31
+ *
32
+ * Events on the timeline: `before-create({ lane, start, end })` → `create(item)`, `before-change(item, next, old)` →
33
+ * `change(item, next, old)`, `before-remove(item)` → `remove(item)`, `edit(item)` (double click, Enter). With a `store`
34
+ * the records are updated here (the app saves); without, the `items` are.
35
+ * Touch: a block drags at once; an empty lane needs a long press (about half a second) so a swipe still scrolls.
36
+ */
37
+ export declare function timeEntry(options?: TimeEntryOptions): TimelinePlugin;
@@ -27,6 +27,8 @@ export interface TimelineConfig extends ComponentConfig {
27
27
  to?: string;
28
28
  /** `range`: a marker at the current time. Default true. */
29
29
  now?: boolean;
30
+ /** `range`: `horizontal` (time runs left to right, one row per lane, default) or `vertical` (time runs top to bottom, one column per lane). */
31
+ direction?: 'horizontal' | 'vertical';
30
32
  /** Optional features (`timeEntry()`...). See `TimelinePlugin`. */
31
33
  plugins?: TimelinePlugin[];
32
34
  }
@@ -39,6 +41,7 @@ export interface TimelineScale {
39
41
  lo: number;
40
42
  hi: number;
41
43
  clock: boolean;
44
+ vertical: boolean;
42
45
  parse(v: string): number;
43
46
  format(ms: number): string;
44
47
  }
@@ -0,0 +1 @@
1
+ export * from '../components/data/exportbar/exportbar.js';
@@ -0,0 +1,28 @@
1
+ import { Component, type ComponentConfig } from '../../../core/component.js';
2
+ export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
3
+ export interface AlertConfig extends ComponentConfig {
4
+ /** Default `info`. */
5
+ tone?: AlertTone;
6
+ title?: string;
7
+ text?: string;
8
+ /** Default by tone; `false` leaves it out. */
9
+ icon?: string | false;
10
+ /** A close button: hides the alert and fires `close`. */
11
+ closable?: boolean;
12
+ /** Default `alert` for `warning` and `danger` (read at once), `status` for the others (read when idle). */
13
+ role?: 'alert' | 'status' | 'note';
14
+ }
15
+ /** A message in the page, not over it: a form error, "nothing here yet", a notice. */
16
+ export declare class Alert extends Component<AlertConfig> {
17
+ protected baseCls: string;
18
+ private titleEl;
19
+ private textEl;
20
+ private iconEl;
21
+ protected onRender(): void;
22
+ setTone(tone: AlertTone): void;
23
+ setIcon(icon: string | false | undefined): void;
24
+ setTitle(title: string): void;
25
+ setText(text: string): void;
26
+ /** Hides it and fires `close`; `show()` brings it back. */
27
+ close(): void;
28
+ }
@@ -7,6 +7,8 @@ export interface DateTimeFieldConfig extends FieldConfig<string | null> {
7
7
  step?: number;
8
8
  /** The value is the ISO instant (`2026-11-10T17:30:00.000Z`) of what the user typed, in their time zone. Default: the local `YYYY-MM-DDTHH:mm`. */
9
9
  utc?: boolean;
10
+ /** `HH:mm` used (and shown) when only the date is filled in, e.g. `'23:59'` for an end date. */
11
+ defaultTime?: string;
10
12
  }
11
13
  /** A date and a time of day side by side. The value is one ISO string (local, or UTC with `utc`) or null. */
12
14
  export declare class DateTimeField extends Field<string | null, DateTimeFieldConfig> {
@@ -1,5 +1,5 @@
1
1
  import { TextField, type TextFieldConfig } from '../textfield/textfield.js';
2
- export interface MaskFieldConfig extends TextFieldConfig {
2
+ export interface MaskFieldConfig extends TextFieldConfig<string | null> {
3
3
  /**
4
4
  * The pattern: `0` a digit, `A` a letter, `*` any character, `\` makes the next character a literal. A list picks the
5
5
  * pattern by length: `['000.000.000-00', '00.000.000/0000-00']` is a CPF until the 12th digit, then a CNPJ.
@@ -8,19 +8,38 @@ export interface MaskFieldConfig extends TextFieldConfig {
8
8
  mask: string | string[];
9
9
  /** The value is only what was typed into the slots (`12345678900`), not the formatted text (`123.456.789-00`). Default false. */
10
10
  raw?: boolean;
11
+ /**
12
+ * A value the app already holds but only shows masked (`'***.***.***-12'`): it is displayed read-only, `getValue()` is
13
+ * `null` while untouched (keep what is saved), and typing (or Enter) replaces it. Esc on an empty replacement keeps it.
14
+ */
15
+ stored?: string;
11
16
  }
12
17
  /** A text field that formats what is typed into a pattern (phone, tax id, postal code, plate...). */
13
- export declare class MaskField extends TextField<string, MaskFieldConfig> {
18
+ export declare class MaskField extends TextField<string | null, MaskFieldConfig> {
14
19
  protected baseCls: string;
15
20
  private masks;
21
+ private keeping;
22
+ constructor(config: MaskFieldConfig);
16
23
  private compiled;
17
24
  /** What was typed into the slots: the literals of the patterns are dropped (with a `*` slot, only where the text repeats one). */
18
25
  private extract;
19
26
  private pick;
20
27
  private format;
21
28
  private norm;
22
- protected display(v: string): string;
23
- setValue(v: string, silent?: boolean): void;
29
+ protected display(v: string | null): string;
30
+ /** A saved value that was not touched counts as filled in (so `required` is satisfied). */
31
+ protected isEmpty(v: string | null): boolean;
32
+ getValue(): string | null;
33
+ setValue(v: string | null, silent?: boolean): void;
34
+ /** `true` while the saved value is shown and nothing has replaced it. */
35
+ isStored(): boolean;
36
+ /** Back to the saved value (what Esc does on an empty replacement). */
37
+ keepStored(): void;
38
+ /** Opens the field for a new value. */
39
+ replaceStored(): void;
40
+ private showStored;
41
+ protected applyValue(v: string | null): void;
42
+ protected onRender(): void;
24
43
  protected createControl(): HTMLDivElement;
25
44
  protected onInput(): void;
26
45
  protected check(): string;
@@ -13,6 +13,12 @@ export interface CarouselConfig extends ContainerConfig {
13
13
  /** Default `true`. */
14
14
  arrows?: boolean;
15
15
  active?: number;
16
+ /** `slide` (default) scrolls the row; `fade` stacks the items and cross-fades them (one at a time, no swipe). */
17
+ transition?: 'slide' | 'fade';
18
+ /** Puts the dots, the play button and the caption over the bottom of the content, on a scrim. */
19
+ overlay?: boolean;
20
+ /** One caption per item, shown for the active one. */
21
+ captions?: string[];
16
22
  }
17
23
  /** Pages through its items on a scroll-snap row: images, cards or any component. */
18
24
  export declare class Carousel extends Container<CarouselConfig> {
@@ -22,6 +28,7 @@ export declare class Carousel extends Container<CarouselConfig> {
22
28
  private nextBtn;
23
29
  private dotsEl;
24
30
  private toggleBtn;
31
+ private captionEl;
25
32
  private index;
26
33
  private stopped;
27
34
  private scrollTimer?;
@@ -40,6 +47,7 @@ export declare class Carousel extends Container<CarouselConfig> {
40
47
  private set;
41
48
  /** Slides, dots, arrows: everything that follows the item count or the active one. */
42
49
  private refresh;
50
+ setCaptions(captions: string[]): void;
43
51
  getActive(): number;
44
52
  /** Goes to item `i` (kept between 0 and the last position). `before-change` can cancel. */
45
53
  goTo(i: number): void;
@@ -19,6 +19,8 @@ export interface NavMenuConfig extends ComponentConfig {
19
19
  active?: string;
20
20
  /** Rail: icons only. */
21
21
  collapsed?: boolean;
22
+ /** Width (px or CSS) the parent container takes while collapsed, and gives back on expand: the sidebar follows the rail. */
23
+ railWidth?: number | string;
22
24
  /** Opening a group closes the others at its level. */
23
25
  accordion?: boolean;
24
26
  }
@@ -36,6 +38,7 @@ export declare class NavMenu extends Component<NavMenuConfig> {
36
38
  private flyout?;
37
39
  private flyoutOf?;
38
40
  private hoverTimer?;
41
+ private parentWidth?;
39
42
  protected onRender(): void;
40
43
  getItem(id: string, list?: NavItem[]): NavItem | undefined;
41
44
  private parentsOf;
@@ -63,6 +66,7 @@ export declare class NavMenu extends Component<NavMenuConfig> {
63
66
  /** Rail mode: a group's children in a Menu beside its icon (title as the header, badges kept). */
64
67
  private openFlyout;
65
68
  setCollapsed(collapsed: boolean): void;
69
+ private fit;
66
70
  /** Hides what does not match and opens the groups that have a match; empty text clears the filter. */
67
71
  filter(text: string): void;
68
72
  private rows;
@@ -0,0 +1 @@
1
+ export * from '../components/data/quicksearch/quicksearch.js';
@@ -0,0 +1 @@
1
+ export * from '../components/data/timeentry/timeentry.js';
@@ -17,8 +17,11 @@ export interface ComponentConfig {
17
17
  /** A permission name: without it (per `setPermissionResolver`) the component is hidden, or disabled with `permissionMode: 'disable'`. */
18
18
  permission?: string;
19
19
  permissionMode?: 'hide' | 'disable';
20
- /** Component-scoped tokens: `{ radius: '0' }` on a button sets `--op-button-radius`. Keys starting with `--` are used as is. */
21
- theme?: Record<string, string | number>;
20
+ /**
21
+ * Component-scoped tokens: `{ radius: '0' }` on a button sets `--op-button-radius` (keys starting with `--` are used as is).
22
+ * A string names themes for this component and everything inside it: `'dark'`, `'dark tenant-dark'` (the `data-op-theme` attribute).
23
+ */
24
+ theme?: string | Record<string, string | number>;
22
25
  /**
23
26
  * Default `true`: the component keeps its size when only its *state* changes (loading, searching, invalid).
24
27
  * The CSS reserves room for the state's extra content instead of growing. `false` lets it fit the content.
@@ -92,7 +95,7 @@ export declare class Component<C extends ComponentConfig = ComponentConfig> exte
92
95
  setFlex(v: number | string): void;
93
96
  setStableSize(stable: boolean): void;
94
97
  setTooltip(text: string): void;
95
- setTheme(theme: Record<string, string | number>): void;
98
+ setTheme(theme: string | Record<string, string | number>): void;
96
99
  /** Shows (or removes) a loading mask. A string is shown as text under the spinner. */
97
100
  setLoading(loading: boolean | string): void;
98
101
  /** The element that receives focus on `focus()`. */
@@ -13,6 +13,8 @@ export interface TabPanelConfig {
13
13
  export interface ContainerConfig extends ComponentConfig, TabPanelConfig {
14
14
  items?: Array<AnyConfig | Component | string>;
15
15
  layout?: LayoutSpec;
16
+ /** Shortcut for the layout option of the same name: under this width (px) a `border` layout turns its west/east regions into drawers and numeric `columns` collapse to one. */
17
+ narrowBelow?: number;
16
18
  /** Config merged into every item that does not set the key itself. */
17
19
  defaults?: Record<string, unknown>;
18
20
  /** `type` used by items that do not declare one. */
@@ -20,13 +20,13 @@ export interface Column<T extends Record<string, any> = any> {
20
20
  hidden?: boolean;
21
21
  /** Pinned to the start or the end while the body scrolls sideways (give it a `width`; default 140). The columns of one edge stay together. */
22
22
  locked?: 'start' | 'end';
23
- /** With the `grouping()` plugin: what the total row shows for this column. */
23
+ /** With `grouping()` or `columnTotals()`: what the total shows. Numbers: `sum`, `avg`, `min`, `max`, `count`; dates: `min` (earliest), `max` (latest), `count`; or your own function of the values. */
24
24
  summary?: 'sum' | 'avg' | 'min' | 'max' | 'count' | ((values: any[], recs: Model<T>[]) => unknown);
25
25
  /** Text for the total of this column (default: the column's `format`, else the plain value). */
26
26
  summaryRenderer?: (value: any, col: Column<T>) => string | Node;
27
27
  /** Left out while `setPermissionResolver` denies it. */
28
28
  permission?: string;
29
- /** Name registered with `registerFormat` (`money`, `date`, `number`, `percent`, `bool`) or a function. */
29
+ /** Name registered with `registerFormat` (`money`, `date`, `number`, `percent`, `bool`, `duration`: minutes as `7h 30m`) or a function. */
30
30
  format?: string | Formatter;
31
31
  /** Full control over the cell content. Text is escaped; return a Node for markup. */
32
32
  renderer?: (value: any, rec: Model<T>, col: Column<T>) => string | Node;
@@ -38,3 +38,5 @@ export interface Column<T extends Record<string, any> = any> {
38
38
  }
39
39
  /** Cell content for a record: `renderer` first, then `format`, then the plain value. */
40
40
  export declare function cellContent<T extends Record<string, any>>(col: Column<T>, rec: Model<T>): string | Node;
41
+ /** The value of a column's `summary` over some records. */
42
+ export declare function summarize(col: Column, recs: Model[]): unknown;
@@ -3,6 +3,7 @@ export * from './data/index.js';
3
3
  export * from './themes/index.js';
4
4
  export * from './motion/index.js';
5
5
  export * from './ui/index.js';
6
+ export * from './build/index.js';
6
7
  export * from './components/base/avatar/avatar.js';
7
8
  export * from './components/base/badge/badge.js';
8
9
  export * from './components/base/button/button.js';
@@ -16,21 +17,26 @@ export * from './components/charts/chart/chart.js';
16
17
  export * from './components/charts/stat/stat.js';
17
18
  export * from './components/chat/chat/chat.js';
18
19
  export * from './components/data/cellediting/cellediting.js';
20
+ export * from './components/data/columntotals/columntotals.js';
19
21
  export * from './components/data/dataview/dataview.js';
22
+ export * from './components/data/exportbar/exportbar.js';
20
23
  export * from './components/data/filterbuilder/filterbuilder.js';
21
24
  export * from './components/data/grid/grid.js';
22
25
  export * from './components/data/gridexport/gridexport.js';
23
26
  export * from './components/data/gridstate/gridstate.js';
24
27
  export * from './components/data/grouping/grouping.js';
25
28
  export * from './components/data/pagination/pagination.js';
29
+ export * from './components/data/quicksearch/quicksearch.js';
26
30
  export * from './components/data/rowediting/rowediting.js';
27
31
  export * from './components/data/searchgrid/searchgrid.js';
28
32
  export * from './components/data/table/table.js';
33
+ export * from './components/data/timeentry/timeentry.js';
29
34
  export * from './components/data/timeline/timeline.js';
30
35
  export * from './components/data/tree/tree.js';
31
36
  export * from './components/data/treegrid/treegrid.js';
32
37
  export * from './components/data/viewmanager/viewmanager.js';
33
38
  export * from './components/dates/calendar/calendar.js';
39
+ export * from './components/feedback/alert/alert.js';
34
40
  export * from './components/feedback/spinner/spinner.js';
35
41
  export * from './components/fields/checkbox/checkbox.js';
36
42
  export * from './components/fields/checkboxgroup/checkboxgroup.js';
@@ -16,8 +16,13 @@ export interface Layout {
16
16
  isNarrow?(): boolean;
17
17
  setNarrow?(narrow: boolean): void;
18
18
  }
19
+ /** `type` plus that layout's options; the common ones are typed for the editor. */
19
20
  export type LayoutConfig = {
20
21
  type: string;
22
+ narrowBelow?: number;
23
+ gap?: number | string;
24
+ columns?: number | string;
25
+ open?: 'west' | 'east';
21
26
  [option: string]: unknown;
22
27
  };
23
28
  export type LayoutSpec = string | LayoutConfig | Layout;
package/dist/ui.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-YXOKWCYS.js";import"./chunk-DWA45BWR.js";import"./chunk-3FCIZKIN.js";import"./chunk-ZSPJZ3ZH.js";import"./chunk-NNR2FNHG.js";import"./chunk-CFGCB37K.js";import"./chunk-U5L76VVB.js";import"./chunk-P4O57S6N.js";import"./chunk-S2CMWKVB.js";import"./chunk-TQPQ4UEA.js";import"./chunk-M7FNPRV4.js";import"./chunk-6PZPBPAD.js";import"./chunk-JJLOUMCJ.js";import"./chunk-4CWYF4O7.js";import"./chunk-5PWPAN62.js";import"./chunk-5BMG5ZBY.js";import"./chunk-JE56CJX2.js";import"./chunk-UQRQH2JW.js";import"./chunk-HRW25TMU.js";import"./chunk-3F4MN2BU.js";import"./chunk-SEW5OCQF.js";import"./chunk-Z6L55FTN.js";import"./chunk-643FOYQB.js";import"./chunk-CMV3F6HR.js";import"./chunk-N2LS4JD6.js";import"./chunk-H25XXQVH.js";import"./chunk-IUOEPAWG.js";import"./chunk-AQ3RTHG5.js";import"./chunk-R32HPK7R.js";import"./chunk-4AZ44KV4.js";import"./chunk-GEJKFE4X.js";import"./chunk-GFFZTFQH.js";import"./chunk-BCVOUMJJ.js";import"./chunk-MNSDGJKA.js";import"./chunk-RG6SHPHF.js";import"./chunk-2YRQULDC.js";import"./chunk-HLS5FI55.js";import"./chunk-DIOJGTUN.js";import"./chunk-BQEFLPDA.js";import"./chunk-2GKIF7A6.js";import"./chunk-OWEQT2HN.js";import"./chunk-E4VNLYO2.js";import"./chunk-676AKAGF.js";import"./chunk-XR677UYD.js";import"./chunk-VV7CFMPZ.js";import"./chunk-TIPK3SCJ.js";import"./chunk-2HNQ2XRY.js";import"./chunk-XQHATUKN.js";import"./chunk-L5SQQFO7.js";import"./chunk-6NCXO5ZP.js";import"./chunk-4AA4FQEM.js";import"./chunk-2UPUC4RK.js";import"./chunk-V5G5JECN.js";import"./chunk-UDXO3KM3.js";import"./chunk-PZSHOSOS.js";import"./chunk-3VDLX7ET.js";import"./chunk-S4QD5NID.js";import"./chunk-4C666HHU.js";export{d as Direction,c as LabelPos,g as LayoutKind,j as Op,e as Region,h as Selection,f as Side,k as ThemeName,i as ToastType,b as Variant,a as ui};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"./chunk-LLHDEUIA.js";import{a}from"./chunk-WWETTEUZ.js";import"./chunk-VADYSXHY.js";import"./chunk-J6D4T4WY.js";import"./chunk-GYGX4VYF.js";import"./chunk-OQFQDTLL.js";import"./chunk-MMPPDQ2E.js";import"./chunk-XI4IBUE3.js";import"./chunk-MBRCE5A7.js";import"./chunk-EO2IXU2W.js";import"./chunk-4DW5WBZB.js";import"./chunk-NAWQBQ57.js";import"./chunk-I5KHVFJ4.js";import"./chunk-YRCR5ELY.js";import"./chunk-NYXRPWIB.js";import"./chunk-BHKI2SU3.js";import"./chunk-MRDX3RVJ.js";import"./chunk-LRUKKIYA.js";import"./chunk-IB5T27PW.js";import"./chunk-JF4WPGJQ.js";import"./chunk-WVJSNE6Q.js";import"./chunk-R52OSARY.js";import"./chunk-DHUBCB4H.js";import"./chunk-VOCGAAG7.js";import"./chunk-TJJL2GSJ.js";import"./chunk-5WE2JOBY.js";import"./chunk-IE7KRNFJ.js";import"./chunk-EQ4IWYLW.js";import"./chunk-FTZMF2QX.js";import"./chunk-H2KFAM7L.js";import"./chunk-TJXH3F7Z.js";import"./chunk-6IXVTWFH.js";import"./chunk-BPCD37A2.js";import"./chunk-NBR5IRZT.js";import"./chunk-SQTM4QFP.js";import"./chunk-OVEQUN4V.js";import"./chunk-VCYCNSJY.js";import"./chunk-KVUELLYF.js";import"./chunk-QT5JRZZJ.js";import"./chunk-2GKIF7A6.js";import"./chunk-OWEQT2HN.js";import"./chunk-U5RENLU4.js";import"./chunk-E4VNLYO2.js";import"./chunk-676AKAGF.js";import"./chunk-VV7CFMPZ.js";import"./chunk-RI62AESU.js";import"./chunk-TIPK3SCJ.js";import"./chunk-KMBTJ5AG.js";import"./chunk-PZSHOSOS.js";import"./chunk-IODSL7KU.js";import"./chunk-XFDNXSU5.js";import"./chunk-L5SQQFO7.js";import"./chunk-3VDLX7ET.js";import"./chunk-S4QD5NID.js";import"./chunk-6NCXO5ZP.js";import"./chunk-4AA4FQEM.js";import"./chunk-2UPUC4RK.js";import"./chunk-V5G5JECN.js";import"./chunk-4C666HHU.js";export{d as Direction,c as LabelPos,g as LayoutKind,j as Op,e as Region,h as Selection,f as Side,k as ThemeName,i as ToastType,b as Variant,a as ui};
2
2
  //# sourceMappingURL=ui.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optikos",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Declarative UI components in plain TypeScript: forms, grids, windows and themes. No runtime dependencies.",
5
5
  "keywords": [
6
6
  "ui",
@@ -51,6 +51,10 @@
51
51
  "types": "./dist/types/ui/index.d.ts",
52
52
  "import": "./dist/ui.js"
53
53
  },
54
+ "./build": {
55
+ "types": "./dist/types/build/index.d.ts",
56
+ "import": "./dist/build.js"
57
+ },
54
58
  "./testing": {
55
59
  "types": "./dist/types/testing/index.d.ts",
56
60
  "import": "./dist/testing.js"
@@ -1,2 +0,0 @@
1
- import{b as t}from"./chunk-XQHATUKN.js";function a(e,n){let r=n.data[e.field];return e.renderer?e.renderer(r,n,e):e.format?t(e.format,r):r==null?"":String(r)}export{a};
2
- //# sourceMappingURL=chunk-2HNQ2XRY.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/data/column.ts"],
4
- "sourcesContent": ["import { format, type Formatter } from './format';\nimport type { Model } from './model';\n\n/** A grid/table column. `T` is the record shape: `field` then autocompletes its keys (any string still works). */\nexport interface Column<T extends Record<string, any> = any> {\n field: Extract<keyof T, string> | (string & {});\n header?: string;\n /** Fixed width in px. */\n width?: number;\n /** Share of the free space (like CSS `fr`). Default 1 when there is no `width`. */\n flex?: number;\n /** A label that groups columns (\"Identification\", \"Values\"...): a band over the header and sections in the column menu. */\n group?: string;\n minWidth?: number;\n /** Upper bound when the user resizes it. */\n maxWidth?: number;\n /** `false` keeps a column's width fixed even when the grid has `resizableColumns`. */\n resizable?: boolean;\n align?: 'left' | 'center' | 'right';\n sortable?: boolean;\n hidden?: boolean;\n /** Pinned to the start or the end while the body scrolls sideways (give it a `width`; default 140). The columns of one edge stay together. */\n locked?: 'start' | 'end';\n /** With the `grouping()` plugin: what the total row shows for this column. */\n summary?: 'sum' | 'avg' | 'min' | 'max' | 'count' | ((values: any[], recs: Model<T>[]) => unknown);\n /** Text for the total of this column (default: the column's `format`, else the plain value). */\n summaryRenderer?: (value: any, col: Column<T>) => string | Node;\n /** Left out while `setPermissionResolver` denies it. */\n permission?: string;\n /** Name registered with `registerFormat` (`money`, `date`, `number`, `percent`, `bool`) or a function. */\n format?: string | Formatter;\n /** Full control over the cell content. Text is escaped; return a Node for markup. */\n renderer?: (value: any, rec: Model<T>, col: Column<T>) => string | Node;\n cls?: string;\n /** With the `cellEditing()` grid plugin: `true` (an editor for the value's type), a field type (`'select'`) or a field config. */\n editor?: boolean | string | Record<string, any>;\n /** With `cellEditing()`: whether this record's cell can be edited (default: every record, when `editor` is set). */\n editable?: (rec: Model<T>) => boolean;\n}\n\n/** Cell content for a record: `renderer` first, then `format`, then the plain value. */\nexport function cellContent<T extends Record<string, any>>(col: Column<T>, rec: Model<T>): string | Node {\n const v = rec.data[col.field];\n if (col.renderer) return col.renderer(v, rec, col);\n if (col.format) return format(col.format, v);\n return v == null ? '' : String(v);\n}\n"],
5
- "mappings": "wCAyCO,SAASA,EAA2CC,EAAgBC,EAA8B,CACvG,IAAMC,EAAID,EAAI,KAAKD,EAAI,KAAK,EAC5B,OAAIA,EAAI,SAAiBA,EAAI,SAASE,EAAGD,EAAKD,CAAG,EAC7CA,EAAI,OAAeG,EAAOH,EAAI,OAAQE,CAAC,EACpCA,GAAK,KAAO,GAAK,OAAOA,CAAC,CAClC",
6
- "names": ["cellContent", "col", "rec", "v", "format"]
7
- }
@@ -1,2 +0,0 @@
1
- import{a as g}from"./chunk-2YRQULDC.js";import{a as d}from"./chunk-TIPK3SCJ.js";import{e as h,f as m}from"./chunk-S4QD5NID.js";h("en",{maskIncomplete:"Complete the format {mask}"});h("pt-BR",{maskIncomplete:"Complete o formato {mask}"});var f={0:/\d/,A:/\p{L}/u,"*":/./su};function u(l){let t=[];for(let e=0;e<l.length;e++){let i=l[e];i==="\\"&&e+1<l.length?t.push({lit:l[++e]}):t.push(i in f?{kind:i}:{lit:i})}return t}var c=l=>l.filter(t=>"kind"in t).length,p=class extends g{baseCls="op-field op-textfield op-maskfield";masks=[];compiled(){let t=this.config.mask;return this.masks=(Array.isArray(t)?t:[t]).map(u).sort((e,i)=>c(e)-c(i))}extract(t){let e=this.masks.length?this.masks:this.compiled(),i=new Set(e.flatMap(r=>r.flatMap(o=>"lit"in o?[o.lit]:[]))),s=e.some(r=>r.some(o=>"kind"in o&&o.kind==="*")),n="";for(let r of t)i.has(r)&&(!s||!/[\p{L}\d]/u.test(r))||(n+=r);return n}pick(t){let e=this.masks.length?this.masks:this.compiled();return e.find(i=>c(i)>=t.length)??e[e.length-1]}format(t,e=this.pick(t)){let i="",s=0;for(let n of e){if(s>=t.length)break;if("lit"in n){i+=n.lit;continue}for(;s<t.length&&!f[n.kind].test(t[s]);)s++;s<t.length&&(i+=t[s++])}return i}norm(t){let e=this.format(this.extract(t??""));return this.config.raw?this.extract(e):e}display(t){return this.format(this.extract(t??""))}setValue(t,e=!1){super.setValue(this.norm(t),e)}createControl(){let t=super.createControl(),e=this.compiled()[0];return this.config.placeholder||(this.input.placeholder=e.map(i=>"lit"in i?i.lit:"_").join("")),this.masks.every(i=>i.every(s=>"lit"in s||s.kind==="0"))&&this.input.setAttribute("inputmode","numeric"),t}onInput(){let t=this.input,e=t.selectionStart??t.value.length,i=this.extract(t.value.slice(0,e)).length,s=this.extract(t.value),n=this.format(s),r=e>=t.value.length;if(t.value=n,!r&&document.activeElement===t){let o=0,a=0;for(;a<n.length&&o<i;)this.extract(n[a++]).length&&o++;t.setSelectionRange(a,a)}this.el.classList.toggle("has-value",!!n),this.commit(this.config.raw?this.extract(n):n),this.error&&this.validate()}check(){let t=super.check(),e=this.extract(this.value??"");if(t||!e)return t;let i=this.pick(e);return e.length<c(i)?m("maskIncomplete",{mask:i.map(s=>"lit"in s?s.lit:"_").join("")}):""}setMask(t){this.config.mask=t,this.compiled(),this.rendered&&this.setValue(this.value,!0)}};d("maskfield",p);export{p as a};
2
- //# sourceMappingURL=chunk-5PWPAN62.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/fields/maskfield/maskfield.ts"],
4
- "sourcesContent": ["import { TextField, type TextFieldConfig } from '../textfield/textfield';\nimport { register } from '../../../core/registry';\nimport { t, addMessages } from '../../../core/i18n';\n\naddMessages('en', { maskIncomplete: 'Complete the format {mask}' });\naddMessages('pt-BR', { maskIncomplete: 'Complete o formato {mask}' });\n\nexport interface MaskFieldConfig extends TextFieldConfig {\n /**\n * The pattern: `0` a digit, `A` a letter, `*` any character, `\\` makes the next character a literal. A list picks the\n * pattern by length: `['000.000.000-00', '00.000.000/0000-00']` is a CPF until the 12th digit, then a CNPJ.\n * The core knows no country: formats like these belong to the app.\n */\n mask: string | string[];\n /** The value is only what was typed into the slots (`12345678900`), not the formatted text (`123.456.789-00`). Default false. */\n raw?: boolean;\n}\n\ntype Slot = { kind: '0' | 'A' | '*' } | { lit: string };\nconst KINDS: Record<string, RegExp> = { 0: /\\d/, A: /\\p{L}/u, '*': /./su };\n\nfunction compile(mask: string): Slot[] {\n const out: Slot[] = [];\n for (let i = 0; i < mask.length; i++) {\n const ch = mask[i];\n if (ch === '\\\\' && i + 1 < mask.length) out.push({ lit: mask[++i] });\n else out.push(ch in KINDS ? { kind: ch as '0' | 'A' | '*' } : { lit: ch });\n }\n return out;\n}\nconst slots = (m: Slot[]) => m.filter((s) => 'kind' in s).length;\n\n/** A text field that formats what is typed into a pattern (phone, tax id, postal code, plate...). */\nexport class MaskField extends TextField<string, MaskFieldConfig> {\n protected override baseCls = 'op-field op-textfield op-maskfield';\n private masks: Slot[][] = [];\n\n private compiled(): Slot[][] {\n const m = this.config.mask;\n return (this.masks = (Array.isArray(m) ? m : [m]).map(compile).sort((a, b) => slots(a) - slots(b)));\n }\n\n /** What was typed into the slots: the literals of the patterns are dropped (with a `*` slot, only where the text repeats one). */\n private extract(text: string): string {\n const masks = this.masks.length ? this.masks : this.compiled();\n const lits = new Set(masks.flatMap((m) => m.flatMap((s) => ('lit' in s ? [s.lit] : []))));\n const wild = masks.some((m) => m.some((s) => 'kind' in s && s.kind === '*'));\n let out = '';\n for (const ch of text) if (!(lits.has(ch) && (!wild || !/[\\p{L}\\d]/u.test(ch)))) out += ch;\n return out;\n }\n\n private pick(raw: string): Slot[] {\n const masks = this.masks.length ? this.masks : this.compiled();\n return masks.find((m) => slots(m) >= raw.length) ?? masks[masks.length - 1];\n }\n\n private format(raw: string, mask = this.pick(raw)): string {\n let out = '';\n let i = 0;\n for (const s of mask) {\n if (i >= raw.length) break;\n if ('lit' in s) {\n out += s.lit;\n continue;\n }\n while (i < raw.length && !KINDS[s.kind].test(raw[i])) i++;\n if (i < raw.length) out += raw[i++];\n }\n return out;\n }\n\n private norm(v: string | null): string {\n const text = this.format(this.extract(v ?? ''));\n return this.config.raw ? this.extract(text) : text;\n }\n\n protected override display(v: string): string {\n return this.format(this.extract(v ?? ''));\n }\n\n override setValue(v: string, silent = false): void {\n super.setValue(this.norm(v), silent);\n }\n\n protected override createControl() {\n const wrap = super.createControl();\n const sample = this.compiled()[0];\n if (!this.config.placeholder) this.input.placeholder = sample.map((s) => ('lit' in s ? s.lit : '_')).join('');\n if (this.masks.every((m) => m.every((s) => 'lit' in s || s.kind === '0'))) this.input.setAttribute('inputmode', 'numeric');\n return wrap;\n }\n\n protected override onInput() {\n const input = this.input;\n const caret = input.selectionStart ?? input.value.length;\n const before = this.extract(input.value.slice(0, caret)).length;\n const raw = this.extract(input.value);\n const text = this.format(raw);\n const atEnd = caret >= input.value.length;\n input.value = text;\n if (!atEnd && document.activeElement === input) {\n // the caret stays after the same number of typed characters\n let n = 0;\n let pos = 0;\n while (pos < text.length && n < before) if (this.extract(text[pos++]).length) n++;\n input.setSelectionRange(pos, pos);\n }\n this.el.classList.toggle('has-value', !!text);\n this.commit(this.config.raw ? this.extract(text) : text);\n if (this.error) this.validate();\n }\n\n protected override check(): string {\n const base = super.check();\n const raw = this.extract(this.value ?? '');\n if (base || !raw) return base;\n const mask = this.pick(raw);\n if (raw.length < slots(mask)) return t('maskIncomplete', { mask: mask.map((s) => ('lit' in s ? s.lit : '_')).join('') });\n return '';\n }\n\n setMask(mask: string | string[]) {\n this.config.mask = mask;\n this.compiled();\n if (this.rendered) this.setValue(this.value, true);\n }\n}\nregister('maskfield', MaskField);\n"],
5
- "mappings": "+HAIAA,EAAY,KAAM,CAAE,eAAgB,4BAA6B,CAAC,EAClEA,EAAY,QAAS,CAAE,eAAgB,2BAA4B,CAAC,EAcpE,IAAMC,EAAgC,CAAE,EAAG,KAAM,EAAG,SAAU,IAAK,KAAM,EAEzE,SAASC,EAAQC,EAAsB,CACrC,IAAMC,EAAc,CAAC,EACrB,QAASC,EAAI,EAAGA,EAAIF,EAAK,OAAQE,IAAK,CACpC,IAAMC,EAAKH,EAAKE,CAAC,EACbC,IAAO,MAAQD,EAAI,EAAIF,EAAK,OAAQC,EAAI,KAAK,CAAE,IAAKD,EAAK,EAAEE,CAAC,CAAE,CAAC,EAC9DD,EAAI,KAAKE,KAAML,EAAQ,CAAE,KAAMK,CAAsB,EAAI,CAAE,IAAKA,CAAG,CAAC,CAC3E,CACA,OAAOF,CACT,CACA,IAAMG,EAASC,GAAcA,EAAE,OAAQC,GAAM,SAAUA,CAAC,EAAE,OAG7CC,EAAN,cAAwBC,CAAmC,CAC7C,QAAU,qCACrB,MAAkB,CAAC,EAEnB,UAAqB,CAC3B,IAAMH,EAAI,KAAK,OAAO,KACtB,OAAQ,KAAK,OAAS,MAAM,QAAQA,CAAC,EAAIA,EAAI,CAACA,CAAC,GAAG,IAAIN,CAAO,EAAE,KAAK,CAACU,EAAGC,IAAMN,EAAMK,CAAC,EAAIL,EAAMM,CAAC,CAAC,CACnG,CAGQ,QAAQC,EAAsB,CACpC,IAAMC,EAAQ,KAAK,MAAM,OAAS,KAAK,MAAQ,KAAK,SAAS,EACvDC,EAAO,IAAI,IAAID,EAAM,QA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E,IAAM,GAAI,EAAE,KAAK,EAAE,CAAE,CAAC,EAChH,EACT,CAEA,QAAQA,EAAyB,CAC/B,KAAK,OAAO,KAAOA,EACnB,KAAK,SAAS,EACV,KAAK,UAAU,KAAK,SAAS,KAAK,MAAO,EAAI,CACnD,CACF,EACA4B,EAAS,YAAarB,CAAS",
6
- "names": ["addMessages", "KINDS", "compile", "mask", "out", "i", "ch", "slots", "m", "s", "MaskField", "TextField", "a", "b", "text", "masks", "lits", "wild", "raw", "v", "silent", "wrap", "sample", "input", "caret", "before", "atEnd", "n", "pos", "base", "t", "register"]
7
- }
@@ -1,2 +0,0 @@
1
- import{a as n}from"./chunk-TIPK3SCJ.js";import{f as o}from"./chunk-UDXO3KM3.js";var t=class extends o{baseCls="op-label";build(){let e=document.createElement(this.config.for?"label":"span");return e.className="op-label",this.config.for&&(e.htmlFor=this.config.for),e}onRender(){this.setText(this.config.text??""),this.setVariant(this.config.variant??"default")}setText(e){this.config.text=e,this.rendered&&(this.el.textContent=e)}setVariant(e){if(this.config.variant=e,!!this.rendered)for(let i of["default","muted","title"])this.el.classList.toggle(`op-label--${i}`,i===e)}};n("label",t);export{t as a};
2
- //# sourceMappingURL=chunk-AQ3RTHG5.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/base/label/label.ts"],
4
- "sourcesContent": ["import { Component, type ComponentConfig } from '../../../core/component';\nimport { register } from '../../../core/registry';\n\nexport interface LabelConfig extends ComponentConfig {\n text?: string;\n /** Id of the field this label names (renders a `<label for>`). */\n for?: string;\n variant?: 'default' | 'muted' | 'title';\n}\n\nexport class Label extends Component<LabelConfig> {\n protected override baseCls = 'op-label';\n protected override build() {\n const el = document.createElement(this.config.for ? 'label' : 'span');\n el.className = 'op-label';\n if (this.config.for) (el as HTMLLabelElement).htmlFor = this.config.for;\n return el;\n }\n protected override onRender() {\n this.setText(this.config.text ?? '');\n this.setVariant(this.config.variant ?? 'default');\n }\n setText(text: string) {\n this.config.text = text;\n if (this.rendered) this.el.textContent = text;\n }\n setVariant(variant: NonNullable<LabelConfig['variant']>) {\n this.config.variant = variant;\n if (!this.rendered) return;\n for (const v of ['default', 'muted', 'title']) this.el.classList.toggle(`op-label--${v}`, v === variant);\n }\n}\nregister('label', Label);\n"],
5
- "mappings": "gFAUO,IAAMA,EAAN,cAAoBC,CAAuB,CAC7B,QAAU,WACV,OAAQ,CACzB,IAAMC,EAAK,SAAS,cAAc,KAAK,OAAO,IAAM,QAAU,MAAM,EACpE,OAAAA,EAAG,UAAY,WACX,KAAK,OAAO,MAAMA,EAAwB,QAAU,KAAK,OAAO,KAC7DA,CACT,CACmB,UAAW,CAC5B,KAAK,QAAQ,KAAK,OAAO,MAAQ,EAAE,EACnC,KAAK,WAAW,KAAK,OAAO,SAAW,SAAS,CAClD,CACA,QAAQC,EAAc,CACpB,KAAK,OAAO,KAAOA,EACf,KAAK,WAAU,KAAK,GAAG,YAAcA,EAC3C,CACA,WAAWC,EAA8C,CAEvD,GADA,KAAK,OAAO,QAAUA,EAClB,EAAC,KAAK,SACV,QAAWC,IAAK,CAAC,UAAW,QAAS,OAAO,EAAG,KAAK,GAAG,UAAU,OAAO,aAAaA,CAAC,GAAIA,IAAMD,CAAO,CACzG,CACF,EACAE,EAAS,QAASN,CAAK",
6
- "names": ["Label", "Component", "el", "text", "variant", "v", "register"]
7
- }
@@ -1,2 +0,0 @@
1
- import{c as T}from"./chunk-DIOJGTUN.js";import{b as S}from"./chunk-XQHATUKN.js";import{b as h}from"./chunk-PZSHOSOS.js";import{e as _,f as b}from"./chunk-S4QD5NID.js";_("en",{groupTotal:"Total",groupCount:"{n}",groupToggle:"Toggle group"});_("pt-BR",{groupTotal:"Total",groupCount:"{n}",groupToggle:"Alternar grupo"});var A=a=>typeof a=="number"?a:Number(a);function G(a,s){let p=s.map(r=>r.data[a.field]),l=p.filter(r=>r!=null&&r!==""&&!isNaN(A(r))).map(A),g=a.summary;return typeof g=="function"?g(p,s):g==="count"?p.filter(r=>r!=null&&r!=="").length:l.length?g==="sum"?l.reduce((r,y)=>r+y,0):g==="avg"?l.reduce((r,y)=>r+y,0)/l.length:g==="min"?Math.min(...l):Math.max(...l):null}function O(a={}){let s,p=a.by??(a.field?e=>e.data[a.field]:void 0),l=new Set,g=!!a.collapsed,r=[],y=[],M=a.summary??"group",v=e=>e.filter(o=>!o.classList.contains("op-grid__selcell")&&!o.classList.contains("op-grid__actcell"));function L(e,o,u){return{cls:`op-grid__row--total ${u}`,paint(d,f){f.setAttribute("aria-label",e);let t=s.getColumns();v(d).forEach((n,c)=>{let i=t[c];if(!i)return;let E=i.summary?(m=>i.summaryRenderer?i.summaryRenderer(m,i):m==null?"":i.format?S(i.format,m):String(m))(G(i,o)):c===0?e:"";n.replaceChildren(E),n.classList.toggle("op-grid__cell--right",i.align==="right")})}}}function w(){let o=s.getStore().getRange();if(!p)return s.setRowLayout(void 0);let u=new Map;for(let t of o){let n=p(t);u.set(n,[...u.get(n)??[],t])}if(r=[...u.keys()],g){for(let t of r)l.add(String(t));g=!1}let d=[],f=s.getColumns().some(t=>t.summary);for(let[t,n]of u){let c=!l.has(String(t));if(d.push({level:1,expanded:c,cls:"op-grid__row--group",paint(i,E){let[m]=v(i);m.classList.add("is-group-label"),m.replaceChildren(h("span","op-grid__twist",{"aria-hidden":"true"},T("chevron-down")),h("span","op-grid__group-name",{},a.label?a.label(t,n):String(t??"\u2014")),h("span","op-grid__group-count",{},b("groupCount",{n:n.length}))),E.dataset.group=String(t)}}),!!c){for(let i of n)d.push({rec:i,level:2,cls:"is-grouped"});f&&M!=="grand"&&d.push(L(b("groupTotal"),n,"is-group-total"))}}f&&M!=="group"&&d.push(L(b("groupTotal"),o,"is-grand-total")),s.setRowLayout(d)}function k(e,o){let u=String(e),d=o??l.has(u);d!==!l.has(u)&&(d?l.delete(u):l.add(u),w(),s.emit("group-toggle",e,d))}let R=e=>{let o=e?.closest(".op-grid__row--group");return o?r.find(u=>String(u)===o.dataset.group):void 0};return{init(e){s=e;let o=e.el,u=o.querySelector("[role=grid]"),d=t=>{let n=R(t.target);(n!==void 0||t.target.closest(".op-grid__row--group"))&&k(n)},f=t=>{if(t.target!==u)return;let n=s.getRowEntry(s.getActive());if(!n||n.rec||n.level!==1)return;let c=R(document.getElementById(`${s.id}-r${s.getActive()}`)),i=n.expanded;if(t.key==="Enter"||t.key===" ")k(c);else if(t.key==="ArrowRight"&&!i)k(c,!0);else if(t.key==="ArrowLeft"&&i)k(c,!1);else return;t.preventDefault(),t.stopPropagation()};return o.addEventListener("click",d),o.addEventListener("keydown",f,!0),y=[C(e),()=>o.removeEventListener("click",d),()=>o.removeEventListener("keydown",f,!0),()=>s.setRowLayout(void 0)],w(),()=>y.forEach(t=>t())},expandAll(){l.clear(),w()},collapseAll(){for(let e of r)l.add(String(e));w()},toggle:k,setGroupBy(e){p=e===null?void 0:typeof e=="string"?o=>o.data[e]:e,l.clear(),w()}};function C(e){return e.getStore().subscribe(o=>queueMicrotask(()=>!e.destroyed&&w()))}}export{G as a,O as b};
2
- //# sourceMappingURL=chunk-BJWREA76.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/data/grouping/grouping.ts"],
4
- "sourcesContent": ["// Row grouping with totals for the Grid, as a plugin: `plugins: [grouping({ field: 'event' })]`.\nimport { format } from '../../../data/format';\nimport type { Model } from '../../../data/model';\nimport type { Column } from '../../../data/column';\nimport { h } from '../../../core/dom';\nimport { t, addMessages } from '../../../core/i18n';\nimport { iconEl } from '../../base/icon/icon';\nimport type { Grid, GridPlugin, RowEntry } from '../grid/grid';\n\naddMessages('en', { groupTotal: 'Total', groupCount: '{n}', groupToggle: 'Toggle group' });\naddMessages('pt-BR', { groupTotal: 'Total', groupCount: '{n}', groupToggle: 'Alternar grupo' });\n\nexport interface GroupingOptions {\n /** Record field to group by. */\n field?: string;\n /** Or any function of the record (a year, a range): its result is the group. */\n by?: (rec: Model) => unknown;\n /** Text of a group header (before the count). Default: the key. */\n label?: (key: unknown, recs: Model[]) => string;\n /** Total rows of the columns that have a `summary`: `group` (under each group), `grand` (at the end) or `both`. Default `group`. */\n summary?: 'group' | 'grand' | 'both';\n /** Start with every group closed. */\n collapsed?: boolean;\n}\n\nexport interface Grouping extends GridPlugin {\n expandAll(): void;\n collapseAll(): void;\n /** Changes what to group by; `null` shows the plain list. */\n setGroupBy(by: string | ((rec: Model) => unknown) | null): void;\n /** Opens or closes one group by its key. */\n toggle(key: unknown, open?: boolean): void;\n}\n\nconst num = (v: unknown) => (typeof v === 'number' ? v : Number(v));\n\n/** The value of a column's `summary` over some records. */\nexport function summarize(col: Column, recs: Model[]): unknown {\n const values = recs.map((r) => r.data[col.field]);\n const nums = values.filter((v) => v != null && v !== '' && !isNaN(num(v))).map(num);\n const s = col.summary;\n if (typeof s === 'function') return s(values, recs);\n if (s === 'count') return values.filter((v) => v != null && v !== '').length;\n if (!nums.length) return null;\n if (s === 'sum') return nums.reduce((a, b) => a + b, 0);\n if (s === 'avg') return nums.reduce((a, b) => a + b, 0) / nums.length;\n return s === 'min' ? Math.min(...nums) : Math.max(...nums);\n}\n\n/**\n * Groups the rows of the current page (a remote store groups what it loaded, not the whole set) under a header with\n * its count; the header toggles by click, Enter/Space, \u2192 and \u2190. Sorting works inside each group. Group headers and total\n * rows are virtual rows like any other. Fires `group-toggle(key, open)` on the grid.\n */\nexport function grouping(options: GroupingOptions = {}): Grouping {\n let grid!: Grid;\n let by = options.by ?? (options.field ? (r: Model) => r.data[options.field!] : undefined);\n const closed = new Set<string>();\n let all = !!options.collapsed;\n let keys: unknown[] = [];\n let off: Array<() => void> = [];\n\n const where = options.summary ?? 'group';\n\n /** The cells of the user columns in a row (the checkbox and action cells are not). */\n const userCells = (cells: HTMLElement[]) => cells.filter((c) => !c.classList.contains('op-grid__selcell') && !c.classList.contains('op-grid__actcell'));\n\n function totals(label: string, recs: Model[], cls: string): RowEntry {\n return {\n cls: `op-grid__row--total ${cls}`,\n paint(cells, row) {\n row.setAttribute('aria-label', label);\n const cols = grid.getColumns();\n userCells(cells).forEach((cell, n) => {\n const col = cols[n];\n if (!col) return;\n const out = col.summary ? ((v) => (col.summaryRenderer ? col.summaryRenderer(v, col) : v == null ? '' : col.format ? format(col.format, v) : String(v)))(summarize(col, recs)) : n === 0 ? label : '';\n cell.replaceChildren(out);\n cell.classList.toggle('op-grid__cell--right', col.align === 'right');\n });\n },\n };\n }\n\n function build() {\n const store = grid.getStore();\n const recs = store.getRange();\n if (!by) return grid.setRowLayout(undefined);\n const groups = new Map<unknown, Model[]>();\n for (const r of recs) {\n const k = by(r);\n groups.set(k, [...(groups.get(k) ?? []), r]);\n }\n keys = [...groups.keys()];\n if (all) {\n for (const k of keys) closed.add(String(k));\n all = false;\n }\n const rows: RowEntry[] = [];\n const hasSummary = grid.getColumns().some((c) => c.summary);\n for (const [key, list] of groups) {\n const open = !closed.has(String(key));\n rows.push({\n level: 1,\n expanded: open,\n cls: 'op-grid__row--group',\n paint(cells, row) {\n const [label] = userCells(cells);\n label.classList.add('is-group-label');\n label.replaceChildren(\n h('span', 'op-grid__twist', { 'aria-hidden': 'true' }, iconEl('chevron-down')),\n h('span', 'op-grid__group-name', {}, options.label ? options.label(key, list) : String(key ?? '\u2014')),\n h('span', 'op-grid__group-count', {}, t('groupCount', { n: list.length })),\n );\n row.dataset.group = String(key);\n },\n });\n if (!open) continue;\n for (const rec of list) rows.push({ rec, level: 2, cls: 'is-grouped' });\n if (hasSummary && where !== 'grand') rows.push(totals(t('groupTotal'), list, 'is-group-total'));\n }\n if (hasSummary && where !== 'group') rows.push(totals(t('groupTotal'), recs, 'is-grand-total'));\n grid.setRowLayout(rows);\n }\n\n function toggle(key: unknown, open?: boolean) {\n const id = String(key);\n const to = open ?? closed.has(id);\n if (to === !closed.has(id)) return;\n if (to) closed.delete(id);\n else closed.add(id);\n build();\n grid.emit('group-toggle', key, to);\n }\n\n const keyOfRow = (el: Element | null) => {\n const row = el?.closest<HTMLElement>('.op-grid__row--group');\n return row ? keys.find((k) => String(k) === row.dataset.group) : undefined;\n };\n\n return {\n init(g) {\n grid = g;\n const el = g.el;\n const table = el.querySelector<HTMLElement>('[role=grid]')!;\n const onClick = (e: Event) => {\n const k = keyOfRow(e.target as Element);\n if (k !== undefined || (e.target as Element).closest('.op-grid__row--group')) toggle(k);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.target !== table) return;\n const active = grid.getRowEntry(grid.getActive());\n if (!active || active.rec || active.level !== 1) return;\n const k = keyOfRow(document.getElementById(`${grid.id}-r${grid.getActive()}`));\n const open = active.expanded;\n if (e.key === 'Enter' || e.key === ' ') toggle(k);\n else if (e.key === 'ArrowRight' && !open) toggle(k, true);\n else if (e.key === 'ArrowLeft' && open) toggle(k, false);\n else return;\n e.preventDefault();\n e.stopPropagation();\n };\n el.addEventListener('click', onClick);\n el.addEventListener('keydown', onKey, true);\n off = [store(g), () => el.removeEventListener('click', onClick), () => el.removeEventListener('keydown', onKey, true), () => grid.setRowLayout(undefined)];\n build();\n return () => off.forEach((f) => f());\n },\n expandAll() {\n closed.clear();\n build();\n },\n collapseAll() {\n for (const k of keys) closed.add(String(k));\n build();\n },\n toggle,\n setGroupBy(next) {\n by = next === null ? undefined : typeof next === 'string' ? (r: Model) => r.data[next] : next;\n closed.clear();\n build();\n },\n };\n\n function store(g: Grid) {\n return g.getStore().subscribe((c) => queueMicrotask(() => !g.destroyed && build()));\n }\n}\n"],
5
- "mappings": "uKASAA,EAAY,KAAM,CAAE,WAAY,QAAS,WAAY,MAAO,YAAa,cAAe,CAAC,EACzFA,EAAY,QAAS,CAAE,WAAY,QAAS,WAAY,MAAO,YAAa,gBAAiB,CAAC,EAwB9F,IAAMC,EAAOC,GAAgB,OAAOA,GAAM,SAAWA,EAAI,OAAOA,CAAC,EAG1D,SAASC,EAAUC,EAAaC,EAAwB,CAC7D,IAAMC,EAASD,EAAK,IAAK,GAAM,EAAE,KAAKD,EAAI,KAAK,CAAC,EAC1CG,EAAOD,EAAO,OAAQJ,GA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AAE,WAAahB,EAAM,CAAC,CAAC,CACpF,CACF",
6
- "names": ["addMessages", "num", "v", "summarize", "col", "recs", "values", "nums", "s", "a", "b", "grouping", "options", "grid", "by", "r", "closed", "all", "keys", "off", "where", "userCells", "cells", "c", "totals", "label", "cls", "row", "cols", "cell", "n", "out", "format", "build", "groups", "k", "rows", "hasSummary", "key", "list", "open", "iconEl", "t", "rec", "toggle", "id", "to", "keyOfRow", "el", "g", "table", "onClick", "e", "onKey", "active", "store", "f", "next"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/layout/layout.ts", "../src/core/container.ts"],
4
- "sourcesContent": ["import type { Component } from '../core/component';\nimport type { Container } from '../core/container';\nimport { px } from '../core/dom';\n\nexport interface Layout {\n init(c: Container): void;\n add?(c: Container, cmp: Component, index: number): void;\n remove?(c: Container, cmp: Component, index: number): void;\n /** Card only. */\n activate?(c: Container, cmp: Component): void;\n getActive?(c: Container): Component | undefined;\n /** Border only: below `narrowBelow` the west/east regions become drawers; these open and close them. */\n openRegion?(name: string): void;\n closeRegion?(name?: string): void;\n toggleRegion?(name: string): void;\n isRegionOpen?(name: string): boolean;\n /** Layouts that adapt to the width: whether the container is currently narrow, and a way to force it (tests, previews). */\n isNarrow?(): boolean;\n setNarrow?(narrow: boolean): void;\n}\n\nexport type LayoutConfig = { type: string; [option: string]: unknown };\nexport type LayoutSpec = string | LayoutConfig | Layout;\nexport type LayoutFactory = (config: Record<string, any>) => Layout;\n\nconst factories = new Map<string, LayoutFactory>();\n\n/** Registers a layout strategy under a name; users add their own the same way. */\nexport function registerLayout(name: string, factory: LayoutFactory): void {\n factories.set(name, factory);\n}\n\nexport function createLayout(spec: LayoutSpec): Layout {\n if (typeof spec === 'object' && 'init' in spec) return spec as Layout;\n const cfg = (typeof spec === 'string' ? { type: spec } : spec) as LayoutConfig;\n const f = factories.get(cfg.type);\n if (!f) throw new Error(`Optikos: unknown layout \"${cfg.type}\"`);\n return f(cfg);\n}\n\n/**\n * Keeps the class `is-narrow` on the container body while it is narrower than `below` px (a ResizeObserver on the\n * container itself, not the window, so a layout inside a small panel adapts too). Emits `narrow-change` on the container.\n */\nfunction watchNarrow(c: Container, below: number, on?: (narrow: boolean) => void) {\n const body = c.getBody();\n let narrow = false;\n const set = (n: boolean) => {\n if (n === narrow) return;\n narrow = n;\n body.classList.toggle('is-narrow', n);\n on?.(n);\n c.emit('narrow-change', n);\n };\n if (typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => body.clientWidth > 0 && set(body.clientWidth < below));\n ro.observe(body);\n c.own(() => ro.disconnect());\n }\n return { isNarrow: () => narrow, setNarrow: set };\n}\n\n/** Layouts that are only a class plus custom properties; the CSS does the work. */\nconst cssLayout =\n (name: string, vars: string[] = []): LayoutFactory =>\n (cfg) => ({\n init(c) {\n const body = c.getBody();\n body.classList.add('op-layout', `op-layout-${name}`);\n for (const v of vars) if (cfg[v] != null) body.style.setProperty(`--op-layout-${v}`, px(cfg[v]));\n },\n });\n\nregisterLayout('fit', cssLayout('fit'));\nconst hbox = cssLayout('hbox', ['gap', 'align', 'justify', 'wrap']);\n/** `stackBelow: 600`: under that width the row becomes a column. */\nregisterLayout('hbox', (cfg) => {\n const base = hbox(cfg);\n let w: ReturnType<typeof watchNarrow> | undefined;\n return {\n ...base,\n init(c) {\n base.init(c);\n if (cfg.stackBelow) {\n c.getBody().classList.add('op-layout-stack');\n w = watchNarrow(c, Number(cfg.stackBelow));\n }\n },\n isNarrow: () => !!w?.isNarrow(),\n setNarrow: (n) => w?.setNarrow(n),\n };\n});\nregisterLayout('vbox', cssLayout('vbox', ['gap', 'align', 'justify', 'wrap']));\n\n/** Numeric `columns` collapse to one column under `narrowBelow` px (default 480; `0` turns it off). */\nregisterLayout('grid', (cfg) => {\n let w: ReturnType<typeof watchNarrow> | undefined;\n return {\n init(c) {\n const body = c.getBody();\n body.classList.add('op-layout', 'op-layout-grid');\n if (cfg.gap != null) body.style.setProperty('--op-layout-gap', px(cfg.gap));\n const cols = cfg.columns ?? 1;\n if (typeof cols === 'number') {\n body.style.setProperty('--op-layout-columns', String(cols));\n const below = cfg.narrowBelow == null ? 480 : Number(cfg.narrowBelow);\n if (below > 0 && cols > 1) w = watchNarrow(c, below);\n } else body.style.gridTemplateColumns = cols;\n },\n add(_c, cmp) {\n const span = cmp.config.colspan;\n if (span) cmp.el.style.gridColumn = span === 'full' ? '1 / -1' : `span ${span}`;\n },\n isNarrow: () => !!w?.isNarrow(),\n setNarrow: (n) => w?.setNarrow(n),\n };\n});\n\n/**\n * Regions around a center. Under `narrowBelow` px (default 768) the west and east regions leave the grid and become\n * drawers over the center, closed until `openRegion('west')` (or `open: 'west'` in the layout config, to start open).\n * A scrim behind an open drawer closes it on click; Esc closes it too.\n */\nregisterLayout('border', (cfg) => {\n let w: ReturnType<typeof watchNarrow> | undefined;\n let cont!: Container;\n const regions = () => Array.from(cont.getBody().children).filter((e): e is HTMLElement => e instanceof HTMLElement && (e.dataset.region === 'west' || e.dataset.region === 'east'));\n const find = (name: string) => regions().find((e) => e.dataset.region === name);\n const sync = () => cont.getBody().classList.toggle('has-open-region', regions().some((e) => e.classList.contains('is-open')));\n const close = (name?: string) => {\n for (const e of regions()) if (!name || e.dataset.region === name) e.classList.remove('is-open');\n sync();\n };\n return {\n init(c) {\n cont = c;\n const body = c.getBody();\n body.classList.add('op-layout', 'op-layout-border');\n if (cfg.gap != null) body.style.setProperty('--op-layout-gap', px(cfg.gap));\n w = watchNarrow(c, cfg.narrowBelow == null ? 768 : Number(cfg.narrowBelow), (narrow) => {\n if (!narrow) close();\n else if (cfg.open) find(String(cfg.open))?.classList.add('is-open'), sync();\n });\n // the scrim is the body's own ::after: a click that lands on the body itself (not a child) closes the drawer\n c.listen(body, 'click', (e: Event) => e.target === body && close());\n c.listen(body, 'keydown', (e: KeyboardEvent) => {\n if (e.key === 'Escape' && body.classList.contains('has-open-region') && body.classList.contains('is-narrow')) {\n e.stopPropagation();\n close();\n }\n });\n },\n add(_c, cmp) {\n const region = cmp.config.region ?? 'center';\n cmp.el.style.gridArea = region;\n cmp.el.dataset.region = region;\n },\n openRegion(name) {\n const e = find(name);\n if (!e || !w?.isNarrow()) return;\n close();\n e.classList.add('is-open');\n sync();\n (e.querySelector<HTMLElement>('input,button,[tabindex]') ?? e).focus?.();\n },\n closeRegion: close,\n toggleRegion(name) {\n if (find(name)?.classList.contains('is-open')) close(name);\n else this.openRegion!(name);\n },\n isRegionOpen: (name) => !!find(name)?.classList.contains('is-open'),\n isNarrow: () => !!w?.isNarrow(),\n setNarrow: (n) => w?.setNarrow(n),\n };\n});\n\nregisterLayout('card', (cfg) => {\n let active: Component | undefined;\n // children that were never rendered (lazy tabs) only get the flag; their DOM is not built just to hide it\n const show = (c: Container, cmp: Component | undefined) => {\n active = cmp;\n for (const i of c.items) {\n if (i.rendered) i.el.hidden = i !== cmp;\n else i.config.hidden = i !== cmp;\n }\n c.emit('activate', cmp);\n };\n return {\n init(c) {\n c.getBody().classList.add('op-layout', 'op-layout-fit');\n const a = cfg.activeItem ?? c.config.activeItem ?? 0;\n show(c, typeof a === 'number' ? c.items[a] : c.items.find((i) => i.id === a));\n },\n add(c, cmp) {\n cmp.el.hidden = cmp !== active && !!active;\n if (!active) show(c, cmp);\n },\n remove(c, cmp, index) {\n if (cmp === active) show(c, c.items[Math.min(index, c.items.length - 1)]);\n },\n activate: show,\n getActive: () => active,\n };\n});\n", "import { Component, type ComponentConfig, type Parent } from './component';\nimport { create, type AnyConfig } from './registry';\nimport { createLayout, type Layout, type LayoutSpec } from '../layout/layout';\n\n/** What a Tabs header reads from its panel (any Container, not just Panel). */\nexport interface TabPanelConfig {\n title?: string;\n icon?: string;\n closable?: boolean;\n reloadable?: boolean;\n /** Called by the tab's \u21BB; a returned Promise keeps the tab busy until it settles. */\n onReload?: (panel: any) => void | Promise<unknown>;\n}\n\nexport interface ContainerConfig extends ComponentConfig, TabPanelConfig {\n items?: Array<AnyConfig | Component | string>;\n layout?: LayoutSpec;\n /** Config merged into every item that does not set the key itself. */\n defaults?: Record<string, unknown>;\n /** `type` used by items that do not declare one. */\n defaultType?: string;\n /** Layout `card`: initial visible child (index or id). */\n activeItem?: number | string;\n}\n\nexport class Container<C extends ContainerConfig = ContainerConfig> extends Component<C> implements Parent {\n protected override baseCls = 'op-container';\n protected defaultLayout: LayoutSpec | undefined;\n items: Component[] = [];\n layout?: Layout;\n\n constructor(config: C = {} as C) {\n super(config);\n this.items = (config.items ?? []).map((i) => this.make(i));\n }\n\n /** Element that holds the children. Panels override it. */\n getBody(): HTMLElement {\n return this.el;\n }\n\n /** Turns shorthand strings (`'->'`) into configs. Subclasses override; the base has none. */\n protected shorthand(s: string): AnyConfig {\n throw new Error(`Optikos: no shorthand for item \"${s}\" in ${this.baseCls}`);\n }\n\n private make(item: AnyConfig | Component | string): Component {\n if (typeof item === 'string') item = this.shorthand(item);\n const c = item instanceof Component ? item : create({ type: this.config.defaultType, ...this.config.defaults, ...item });\n c.parent = this;\n return c;\n }\n\n protected override onRender(): void {\n const spec = this.config.layout ?? this.defaultLayout;\n if (spec) (this.layout = createLayout(spec)).init(this);\n this.items.forEach((c, i) => this.attach(c, i));\n }\n\n protected attach(c: Component, index: number): void {\n const body = this.getBody();\n const next = this.items.slice(index + 1).find((x) => x.rendered && x.el.parentNode === body);\n body.insertBefore(c.el, next?.el ?? null);\n this.layout?.add?.(this, c, index);\n if (this.mounted) c.notifyMount();\n }\n\n add(item: AnyConfig | Component | string): Component {\n return this.insert(this.items.length, item);\n }\n\n insert(index: number, item: AnyConfig | Component | string): Component {\n const c = this.make(item);\n this.items.splice(index, 0, c);\n if (this.rendered) this.attach(c, index);\n this.emit('add', c);\n return c;\n }\n\n /** Removes a child (by instance, id or index). Destroys it unless `destroy` is `false`. */\n remove(child: Component | string | number, destroy = true): Component | undefined {\n const i = typeof child === 'number' ? child : this.items.findIndex((c) => c === child || c.id === child);\n const c = this.items[i];\n if (!c) return;\n this.items.splice(i, 1);\n c.parent = undefined;\n this.layout?.remove?.(this, c, i);\n if (destroy) c.destroy();\n else if (c.rendered) c.el.remove();\n this.emit('remove', c);\n return c;\n }\n\n removeAll(destroy = true): void {\n for (const c of [...this.items]) this.remove(c, destroy);\n }\n\n getItems(): Component[] {\n return this.items;\n }\n\n /** Direct child by id. */\n get(id: string): Component | undefined {\n return this.items.find((c) => c.id === id);\n }\n\n /** All descendants (depth-first) matching `fn`. */\n query(fn: (c: Component) => boolean): Component[] {\n const out: Component[] = [];\n for (const c of this.items) {\n if (fn(c)) out.push(c);\n if (c instanceof Container) out.push(...c.query(fn));\n }\n return out;\n }\n\n /** Layout `card`: which child is visible. */\n getActiveItem(): Component | undefined {\n return this.layout?.getActive?.(this);\n }\n setActiveItem(item: Component | string | number): void {\n const c = typeof item === 'number' ? this.items[item] : this.items.find((x) => x === item || x.id === item);\n if (c) this.layout?.activate?.(this, c);\n }\n\n override notifyMount(): void {\n super.notifyMount();\n for (const c of this.items) c.notifyMount();\n }\n\n protected override onDestroy(): void {\n for (const c of [...this.items]) c.destroy();\n }\n\n override setDisabled(disabled: boolean): void {\n super.setDisabled(disabled);\n for (const c of this.items) c.setDisabled(disabled);\n }\n}\n"],
5
- "mappings": "wHAyBA,IAAMA,EAAY,IAAI,IAGf,SAASC,EAAeC,EAAcC,EAA8B,CACzEH,EAAU,IAAIE,EAAMC,CAAO,CAC7B,CAEO,SAASC,EAAaC,EAA0B,CACrD,GAAI,OAAOA,GAAS,UAAY,SAAUA,EAAM,OAAOA,EACvD,IAAMC,EAAO,OAAOD,GAAS,SAAW,CAAE,KAAMA,CAAK,EAAIA,EACnDE,EAAIP,EAAU,IAAIM,EAAI,IAAI,EAChC,GAAI,CAACC,EAAG,MAAM,IAAI,MAAM,4BAA4BD,EAAI,IAAI,GAAG,EAC/D,OAAOC,EAAED,CAAG,CACd,CAMA,SAASE,EAAYC,EAAcC,EAAeC,EAAgC,CAChF,IAAMC,EAAOH,EAAE,QAAQ,EACnBI,EAAS,GACPC,EAAO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K,MAAOA,EAAE,YAAYa,CAAQ,CACpD,CACF",
6
- "names": ["factories", "registerLayout", "name", "factory", "createLayout", "spec", "cfg", "f", "watchNarrow", "c", "below", "on", "body", "narrow", "set", "n", "ro", "cssLayout", "vars", "v", "px", "hbox", "base", "w", "cols", "_c", "cmp", "span", "cont", "regions", "e", "find", "sync", "close", "region", "active", "show", "i", "a", "index", "Container", "_Container", "Component", "config", "i", "s", "item", "c", "create", "spec", "createLayout", "index", "body", "next", "x", "child", "destroy", "id", "fn", "out", "disabled"]
7
- }