bitboss-ui 2.1.129 → 2.1.130

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 (447) hide show
  1. package/dist/ai/BbTable.md +71 -14
  2. package/dist/components/BaseButton/BaseButton.vue.d.ts +10 -5
  3. package/dist/components/BaseButton/RouterComponent.vue.d.ts +15 -12
  4. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +24 -10
  5. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +17 -22
  6. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +205 -6
  7. package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +10 -3
  8. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +11 -6
  9. package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +2 -3
  10. package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +35 -27
  11. package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +2 -3
  12. package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +4 -3
  13. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +345 -6
  14. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +22 -8
  15. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +15 -6
  16. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +15 -6
  17. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +11 -6
  18. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +17 -22
  19. package/dist/components/BaseRating/BaseRating.vue.d.ts +15 -6
  20. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +15 -20
  21. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +21 -6
  22. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +15 -6
  23. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +17 -22
  24. package/dist/components/BaseTag/BaseTag.vue.d.ts +353 -6
  25. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +15 -6
  26. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +15 -6
  27. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +11 -6
  28. package/dist/components/BbAlert/BbAlert.vue.d.ts +10 -5
  29. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +15 -6
  30. package/dist/components/BbBadge/BbBadge.vue.d.ts +10 -5
  31. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +34 -7
  32. package/dist/components/BbButton/BbButton.vue.d.ts +11 -7
  33. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +11 -6
  34. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +17 -22
  35. package/dist/components/BbChip/BbChip.vue.d.ts +11 -6
  36. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +10 -5
  37. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +16 -7
  38. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +77 -6
  39. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +1 -2
  40. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +29 -14
  41. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +11 -6
  42. package/dist/components/BbDialog/BbDialog.vue.d.ts +12 -8
  43. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +232 -7
  44. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +30 -7
  45. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +15 -6
  46. package/dist/components/BbIcon/BbIcon.vue.d.ts +2 -3
  47. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +15 -6
  48. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +284 -7
  49. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +22 -8
  50. package/dist/components/BbPagination/BbPagination.vue.d.ts +18 -8
  51. package/dist/components/BbPopover/BbPopover.vue.d.ts +217 -8
  52. package/dist/components/BbProgress/BbProgress.vue.d.ts +2 -3
  53. package/dist/components/BbRadio/BbRadio.vue.d.ts +11 -6
  54. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +17 -22
  55. package/dist/components/BbRating/BbRating.vue.d.ts +16 -7
  56. package/dist/components/BbRatio/BbRatio.vue.d.ts +10 -5
  57. package/dist/components/BbRows/BbRows.vue.d.ts +49 -14
  58. package/dist/components/BbSelect/BbSelect.vue.d.ts +15 -20
  59. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -20
  60. package/dist/components/BbSlider/BbSlider.vue.d.ts +16 -7
  61. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +17 -6
  62. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +2 -3
  63. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +11 -6
  64. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +17 -22
  65. package/dist/components/BbTab/BbTab.vue.d.ts +18 -15
  66. package/dist/components/BbTable/BbTable.vue.d.ts +83 -25
  67. package/dist/components/BbTag/BbTag.vue.d.ts +11 -6
  68. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +16 -7
  69. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +16 -7
  70. package/dist/components/BbToast/BbToast.vue.d.ts +2 -3
  71. package/dist/components/BbToast/BbToastMessage.vue.d.ts +2 -3
  72. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +216 -8
  73. package/dist/components/BbTree/BbTree.vue.d.ts +10 -5
  74. package/dist/components/ChipsBox/ChipsBox.vue.d.ts +1 -2
  75. package/dist/components/ClearableButton/ClearableButton.vue.d.ts +1 -2
  76. package/dist/components/CommaBox/CommaBox.vue.d.ts +1 -2
  77. package/dist/components/CommonInputInnerContainer/CommonInputInnerContainer.vue.d.ts +15 -6
  78. package/dist/components/CommonInputOuterContainer/CommonInputOuterContainer.vue.d.ts +10 -5
  79. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +18 -8
  80. package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +1 -2
  81. package/dist/components/FlatListBox/FlatListBox.vue.d.ts +11 -16
  82. package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +11 -16
  83. package/dist/components/ListBox/ListBox.vue.d.ts +11 -16
  84. package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +6 -11
  85. package/dist/components/Transitions/ScaleFade.vue.d.ts +15 -7
  86. package/dist/components/Transitions/Slide.vue.d.ts +15 -7
  87. package/dist/index.css +1 -2
  88. package/dist/index.js +226 -80
  89. package/dist/index10.js +81 -4
  90. package/dist/index101.js +94 -300
  91. package/dist/index103.js +136 -16
  92. package/dist/index105.js +102 -4
  93. package/dist/index107.js +24 -9
  94. package/dist/index109.js +142 -19
  95. package/dist/index11.js +39 -41
  96. package/dist/index110.js +532 -12
  97. package/dist/index112.js +190 -24
  98. package/dist/index114.js +116 -7
  99. package/dist/index116.js +58 -5
  100. package/dist/index118.js +40 -5
  101. package/dist/index12.js +41 -10
  102. package/dist/index120.js +100 -5
  103. package/dist/index122.js +137 -5
  104. package/dist/index124.js +368 -51
  105. package/dist/index126.js +819 -222
  106. package/dist/index128.js +124 -6
  107. package/dist/index13.js +185 -92
  108. package/dist/index130.js +118 -25
  109. package/dist/index132.js +126 -5
  110. package/dist/index134.js +28 -0
  111. package/dist/index136.js +155 -13
  112. package/dist/index138.js +122 -0
  113. package/dist/index14.js +128 -306
  114. package/dist/index140.js +32 -224
  115. package/dist/index141.js +29 -5
  116. package/dist/index142.js +71 -4
  117. package/dist/index144.js +14 -0
  118. package/dist/index146.js +12 -7
  119. package/dist/index147.js +4 -182
  120. package/dist/index148.js +421 -0
  121. package/dist/index149.js +11 -6
  122. package/dist/index150.js +10 -5
  123. package/dist/index151.js +27 -4
  124. package/dist/index152.js +4 -95
  125. package/dist/index153.js +7 -0
  126. package/dist/index154.js +8 -6
  127. package/dist/index155.js +7 -168
  128. package/dist/index156.js +5 -0
  129. package/dist/index157.js +5 -6
  130. package/dist/index158.js +5 -145
  131. package/dist/index159.js +5 -0
  132. package/dist/index16.js +152 -58
  133. package/dist/index160.js +5 -6
  134. package/dist/index161.js +5 -53
  135. package/dist/index162.js +5 -0
  136. package/dist/index163.js +5 -6
  137. package/dist/index164.js +4 -15
  138. package/dist/index165.js +4 -18
  139. package/dist/index166.js +5 -35
  140. package/dist/index167.js +5 -0
  141. package/dist/index168.js +5 -6
  142. package/dist/index169.js +5 -89
  143. package/dist/index170.js +5 -0
  144. package/dist/index171.js +5 -6
  145. package/dist/index172.js +5 -82
  146. package/dist/index173.js +5 -0
  147. package/dist/index174.js +5 -6
  148. package/dist/index175.js +4 -37
  149. package/dist/index176.js +4 -460
  150. package/dist/index177.js +5 -28
  151. package/dist/index178.js +5 -66
  152. package/dist/index179.js +5 -17
  153. package/dist/index18.js +138 -34
  154. package/dist/index180.js +5 -162
  155. package/dist/index181.js +5 -5
  156. package/dist/index182.js +5 -217
  157. package/dist/index183.js +5 -5
  158. package/dist/index184.js +5 -112
  159. package/dist/index185.js +5 -5
  160. package/dist/index186.js +4 -459
  161. package/dist/index187.js +5 -0
  162. package/dist/index188.js +4 -6
  163. package/dist/index189.js +5 -4
  164. package/dist/index190.js +4 -7
  165. package/dist/index191.js +5 -7
  166. package/dist/index192.js +5 -268
  167. package/dist/index193.js +5 -0
  168. package/dist/index194.js +5 -6
  169. package/dist/index195.js +4 -124
  170. package/dist/index196.js +5 -0
  171. package/dist/index197.js +5 -6
  172. package/dist/index198.js +5 -174
  173. package/dist/index199.js +5 -0
  174. package/dist/index20.js +195 -8
  175. package/dist/index200.js +4 -5
  176. package/dist/index201.js +5 -224
  177. package/dist/index202.js +5 -0
  178. package/dist/index203.js +4 -5
  179. package/dist/index204.js +5 -135
  180. package/dist/index205.js +4 -0
  181. package/dist/index206.js +4 -5
  182. package/dist/index207.js +5 -5
  183. package/dist/index208.js +5 -170
  184. package/dist/index209.js +5 -0
  185. package/dist/index210.js +4 -5
  186. package/dist/index211.js +5 -37
  187. package/dist/index212.js +5 -0
  188. package/dist/index213.js +4 -5
  189. package/dist/index214.js +5 -63
  190. package/dist/index215.js +5 -0
  191. package/dist/index216.js +4 -5
  192. package/dist/index217.js +5 -74
  193. package/dist/index218.js +5 -0
  194. package/dist/index219.js +4 -5
  195. package/dist/index22.js +245 -6
  196. package/dist/index220.js +5 -65
  197. package/dist/index221.js +46 -0
  198. package/dist/index222.js +4 -5
  199. package/dist/index223.js +5 -67
  200. package/dist/index224.js +140 -0
  201. package/dist/index225.js +4 -6
  202. package/dist/index226.js +4 -41
  203. package/dist/index227.js +7 -0
  204. package/dist/index228.js +10 -6
  205. package/dist/index229.js +34 -9
  206. package/dist/index230.js +30 -22
  207. package/dist/index232.js +4 -286
  208. package/dist/index233.js +4 -0
  209. package/dist/index234.js +4 -6
  210. package/dist/index235.js +15 -47
  211. package/dist/index236.js +87 -164
  212. package/dist/index238.js +32 -6
  213. package/dist/index239.js +19 -10
  214. package/dist/index24.js +616 -9
  215. package/dist/index240.js +19 -159
  216. package/dist/index241.js +53 -0
  217. package/dist/index242.js +20 -6
  218. package/dist/index243.js +5 -134
  219. package/dist/index244.js +14 -0
  220. package/dist/index245.js +7 -6
  221. package/dist/index246.js +7 -167
  222. package/dist/index247.js +7 -0
  223. package/dist/index248.js +7 -6
  224. package/dist/index249.js +7 -147
  225. package/dist/index250.js +7 -0
  226. package/dist/index251.js +5 -6
  227. package/dist/index252.js +9 -34
  228. package/dist/index253.js +162 -0
  229. package/dist/index255.js +7 -65
  230. package/dist/index256.js +4 -0
  231. package/dist/index257.js +8 -6
  232. package/dist/index258.js +269 -18
  233. package/dist/index259.js +54 -5
  234. package/dist/index26.js +184 -4
  235. package/dist/index260.js +53 -159
  236. package/dist/index261.js +34 -0
  237. package/dist/index262.js +62 -6
  238. package/dist/index263.js +6 -60
  239. package/dist/index264.js +375 -0
  240. package/dist/index266.js +6 -134
  241. package/dist/index267.js +9 -0
  242. package/dist/index268.js +4 -6
  243. package/dist/index269.js +15 -12
  244. package/dist/index270.js +15 -206
  245. package/dist/index271.js +11 -0
  246. package/dist/index272.js +25 -6
  247. package/dist/index273.js +25 -85
  248. package/dist/index274.js +5 -5
  249. package/dist/index275.js +13 -55
  250. package/dist/index276.js +36 -5
  251. package/dist/index277.js +5 -164
  252. package/dist/index278.js +27 -0
  253. package/dist/index279.js +6 -6
  254. package/dist/index28.js +148 -8
  255. package/dist/index280.js +22 -145
  256. package/dist/index281.js +11 -0
  257. package/dist/index282.js +46 -6
  258. package/dist/index283.js +55 -11
  259. package/dist/index284.js +20 -200
  260. package/dist/index285.js +14 -0
  261. package/dist/index286.js +108 -6
  262. package/dist/index288.js +102 -0
  263. package/dist/index290.js +108 -20
  264. package/dist/index291.js +11 -0
  265. package/dist/index292.js +8 -6
  266. package/dist/index293.js +18 -125
  267. package/dist/index294.js +7 -0
  268. package/dist/index295.js +190 -6
  269. package/dist/index296.js +5 -161
  270. package/dist/index297.js +23 -0
  271. package/dist/index298.js +8 -6
  272. package/dist/index299.js +68 -126
  273. package/dist/index30.js +177 -117
  274. package/dist/index300.js +5 -0
  275. package/dist/index301.js +12 -6
  276. package/dist/index302.js +5 -20
  277. package/dist/index303.js +4 -0
  278. package/dist/index304.js +9 -6
  279. package/dist/index305.js +9 -116
  280. package/dist/index306.js +5 -5
  281. package/dist/index307.js +18 -506
  282. package/dist/index308.js +30 -0
  283. package/dist/index309.js +7 -6
  284. package/dist/index310.js +9 -196
  285. package/dist/index311.js +4 -0
  286. package/dist/index312.js +6 -6
  287. package/dist/index314.js +9 -0
  288. package/dist/index315.js +4 -5
  289. package/dist/index316.js +5 -134
  290. package/dist/index317.js +5 -0
  291. package/dist/index318.js +282 -6
  292. package/dist/index319.js +4 -162
  293. package/dist/index32.js +99 -27
  294. package/dist/index320.js +18 -0
  295. package/dist/index321.js +4 -6
  296. package/dist/index322.js +18 -319
  297. package/dist/index323.js +4 -0
  298. package/dist/index324.js +29 -6
  299. package/dist/index325.js +4 -40
  300. package/dist/index326.js +3 -42
  301. package/dist/index327.js +4 -664
  302. package/dist/index328.js +4 -0
  303. package/dist/index329.js +4 -6
  304. package/dist/index330.js +4 -155
  305. package/dist/index331.js +127 -0
  306. package/dist/index332.js +4 -6
  307. package/dist/index333.js +17 -142
  308. package/dist/index334.js +4 -0
  309. package/dist/index335.js +21 -6
  310. package/dist/index336.js +4 -155
  311. package/dist/index337.js +5 -0
  312. package/dist/index338.js +4 -5
  313. package/dist/index339.js +4 -58
  314. package/dist/index34.js +176 -111
  315. package/dist/index340.js +6 -5
  316. package/dist/index341.js +721 -20
  317. package/dist/index342.js +368 -0
  318. package/dist/index343.js +59 -6
  319. package/dist/index344.js +8 -142
  320. package/dist/index345.js +4 -0
  321. package/dist/index346.js +69 -6
  322. package/dist/index347.js +69 -4
  323. package/dist/index348.js +95 -109
  324. package/dist/index349.js +7 -0
  325. package/dist/index350.js +9 -6
  326. package/dist/index351.js +20 -54
  327. package/dist/index352.js +11 -24
  328. package/dist/index353.js +17 -23
  329. package/dist/index354.js +6 -838
  330. package/dist/index355.js +8 -473
  331. package/dist/index356.js +36 -51
  332. package/dist/index357.js +132 -7
  333. package/dist/index358.js +401 -0
  334. package/dist/index359.js +202 -0
  335. package/dist/index36.js +133 -6
  336. package/dist/index360.js +261 -0
  337. package/dist/index361.js +24 -0
  338. package/dist/index363.js +136 -0
  339. package/dist/index364.js +4 -0
  340. package/dist/index365.js +4 -0
  341. package/dist/index366.js +230 -0
  342. package/dist/index367.js +484 -0
  343. package/dist/index368.js +130 -0
  344. package/dist/index369.js +49 -0
  345. package/dist/index370.js +72 -0
  346. package/dist/index371.js +522 -0
  347. package/dist/index372.js +52 -0
  348. package/dist/index38.js +491 -62
  349. package/dist/index4.js +35 -0
  350. package/dist/index40.js +334 -8
  351. package/dist/index42.js +127 -8
  352. package/dist/index44.js +184 -20
  353. package/dist/index46.js +239 -384
  354. package/dist/index48.js +140 -6
  355. package/dist/index5.js +41 -34
  356. package/dist/index50.js +156 -11
  357. package/dist/index52.js +64 -105
  358. package/dist/index54.js +91 -97
  359. package/dist/index56.js +68 -27
  360. package/dist/index58.js +53 -156
  361. package/dist/index6.js +61 -37
  362. package/dist/index60.js +225 -5
  363. package/dist/index62.js +168 -5
  364. package/dist/index64.js +99 -7
  365. package/dist/index66.js +137 -25
  366. package/dist/index68.js +43 -6
  367. package/dist/index7.js +64 -58
  368. package/dist/index70.js +46 -0
  369. package/dist/index72.js +120 -13
  370. package/dist/index74.js +125 -6
  371. package/dist/index75.js +84 -158
  372. package/dist/index77.js +21 -6
  373. package/dist/index78.js +129 -4
  374. package/dist/index8.js +14 -4
  375. package/dist/index80.js +62 -54
  376. package/dist/index82.js +324 -5
  377. package/dist/index84.js +154 -0
  378. package/dist/index86.js +220 -64
  379. package/dist/index88.js +84 -6
  380. package/dist/index9.js +9 -10
  381. package/dist/index90.js +45 -18
  382. package/dist/index91.js +134 -17
  383. package/dist/index93.js +176 -33
  384. package/dist/index95.js +234 -15
  385. package/dist/index97.js +249 -17
  386. package/dist/index99.js +33 -0
  387. package/package.json +1 -1
  388. package/dist/index100.js +0 -6
  389. package/dist/index102.js +0 -16
  390. package/dist/index104.js +0 -27
  391. package/dist/index106.js +0 -7
  392. package/dist/index108.js +0 -4
  393. package/dist/index111.js +0 -19
  394. package/dist/index115.js +0 -241
  395. package/dist/index117.js +0 -42
  396. package/dist/index119.js +0 -53
  397. package/dist/index121.js +0 -32
  398. package/dist/index123.js +0 -8
  399. package/dist/index125.js +0 -5
  400. package/dist/index129.js +0 -162
  401. package/dist/index131.js +0 -51
  402. package/dist/index133.js +0 -607
  403. package/dist/index135.js +0 -6
  404. package/dist/index137.js +0 -153
  405. package/dist/index139.js +0 -6
  406. package/dist/index143.js +0 -128
  407. package/dist/index145.js +0 -6
  408. package/dist/index15.js +0 -10
  409. package/dist/index17.js +0 -11
  410. package/dist/index19.js +0 -4
  411. package/dist/index2.js +0 -20
  412. package/dist/index21.js +0 -35
  413. package/dist/index23.js +0 -7
  414. package/dist/index231.js +0 -24
  415. package/dist/index25.js +0 -24
  416. package/dist/index254.js +0 -6
  417. package/dist/index265.js +0 -6
  418. package/dist/index27.js +0 -4
  419. package/dist/index287.js +0 -241
  420. package/dist/index289.js +0 -6
  421. package/dist/index29.js +0 -7
  422. package/dist/index31.js +0 -10
  423. package/dist/index313.js +0 -142
  424. package/dist/index33.js +0 -5
  425. package/dist/index37.js +0 -6
  426. package/dist/index39.js +0 -63
  427. package/dist/index41.js +0 -9
  428. package/dist/index43.js +0 -179
  429. package/dist/index45.js +0 -6
  430. package/dist/index49.js +0 -33
  431. package/dist/index51.js +0 -8
  432. package/dist/index53.js +0 -330
  433. package/dist/index55.js +0 -328
  434. package/dist/index57.js +0 -102
  435. package/dist/index61.js +0 -131
  436. package/dist/index65.js +0 -35
  437. package/dist/index69.js +0 -54
  438. package/dist/index71.js +0 -6
  439. package/dist/index79.js +0 -4
  440. package/dist/index81.js +0 -5
  441. package/dist/index83.js +0 -141
  442. package/dist/index85.js +0 -6
  443. package/dist/index89.js +0 -30
  444. package/dist/index92.js +0 -9
  445. package/dist/index94.js +0 -4
  446. package/dist/index96.js +0 -10
  447. package/dist/index98.js +0 -189
package/dist/index126.js CHANGED
@@ -1,223 +1,820 @@
1
- import { __toESM as e } from "./index2.js";
2
- import { _config as t } from "./index5.js";
3
- import { useId as n } from "./index12.js";
4
- import { useLogger as r } from "./index31.js";
5
- import i from "./index36.js";
6
- import { useLocale as ee } from "./index42.js";
7
- import { hash as a } from "./index81.js";
8
- import { require_dayjs_min as o } from "./index101.js";
9
- import { require_isSameOrAfter as s } from "./index102.js";
10
- import { require_isSameOrBefore as c } from "./index103.js";
11
- import { require_weekOfYear as l } from "./index104.js";
12
- import { last as te } from "./index105.js";
13
- import { validateDateFormat as u } from "./index106.js";
14
- import d from "./index116.js";
15
- import f from "./index118.js";
16
- import p from "./index120.js";
17
- import m from "./index122.js";
18
- import h from "./index125.js";
19
- import { computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as S, createVNode as C, defineComponent as w, guardReactiveProps as T, normalizeProps as ne, openBlock as E, ref as D, renderList as re, renderSlot as O, toDisplayString as k, unref as A, watch as j, withCtx as M } from "vue";
20
- //#region src/components/BaseDatePicker/BaseDatePicker.vue?vue&type=script&setup=true&lang.ts
21
- var N = /* @__PURE__ */ e(o(), 1), P = /* @__PURE__ */ e(s(), 1), F = /* @__PURE__ */ e(c(), 1), I = /* @__PURE__ */ e(l(), 1), L = { class: "bb-base-date-picker" }, R = { class: "bb-base-date-picker__body" }, z = { class: "bb-base-date-picker__controls" }, B = { class: "sr-only" }, V = { class: "sr-only" }, H = { class: "sr-only" }, U = {
22
- style: { transform: "rotate(180deg)" },
23
- viewBox: "0 0 24 24",
24
- width: "24px",
25
- xmlns: "http://www.w3.org/2000/svg"
26
- }, ie = { class: "sr-only" }, W = { class: "bb-base-date-picker__content" }, G = ["id"], K = /* @__PURE__ */ w({
27
- __name: "BaseDatePicker",
28
- props: {
29
- disabled: { type: Boolean },
30
- firstDayOfWeek: { default: 1 },
31
- floating: { type: Boolean },
32
- id: {},
33
- header: { type: Boolean },
34
- max: {},
35
- min: {},
36
- modelValue: {},
37
- multiple: { type: Boolean },
38
- range: { type: Boolean },
39
- readonly: { type: Boolean },
40
- selectable: {}
41
- },
42
- emits: ["update:modelValue"],
43
- setup(e, { expose: o, emit: s }) {
44
- N.default.extend(I.default), N.default.extend(P.default), N.default.extend(F.default);
45
- let c = s, l = e, { t: w } = ee(), K = l.id || n().id, q = r();
46
- l.multiple && l.range && q.throw("Date picker cannot be both multiple and range."), (l.multiple || l.range) && (Array.isArray(l.modelValue) || q.throw("Date picker is set to select multiple dates but modelValue is not an array.")), l.min && u(l.min, "Min"), l.max && u(l.max, "Max");
47
- let J = D((0, N.default)()), Y = (e) => {
48
- if (!e) {
49
- J.value = (0, N.default)().startOf("day");
50
- return;
51
- }
52
- if (Array.isArray(e)) {
53
- if (e.length === 0) {
54
- J.value = (0, N.default)().startOf("day");
55
- return;
56
- }
57
- let t = e.map((e) => (0, N.default)(e).valueOf()), n = J.value.valueOf();
58
- if (t.includes(n)) return;
59
- J.value = (0, N.default)(te(e)).startOf("day");
60
- return;
61
- }
62
- J.value = (0, N.default)(e).startOf("day");
63
- };
64
- Y(l.modelValue);
65
- let X = D("day"), Z = (e) => {
66
- X.value === e ? X.value = "day" : X.value = e;
67
- }, ae = g(() => J.value.locale(t.locale).format("MMMM YYYY")), oe = g(() => X.value === "month" ? "Selecting month" : X.value === "year" ? "Selecting year" : ""), se = (e) => {
68
- J.value = J.value.set("month", e);
69
- }, ce = () => {
70
- J.value = J.value.add(1, "month");
71
- }, le = () => {
72
- J.value = J.value.subtract(1, "month");
73
- }, ue = (e) => {
74
- J.value = J.value.set("year", e);
75
- }, Q = (e) => {
76
- se(e), X.value = "day";
77
- }, de = (e) => {
78
- ue(e), X.value = "day";
79
- }, fe = (e) => {
80
- J.value = e;
81
- }, $ = D(l.modelValue), pe = (e) => {
82
- $.value = e, c("update:modelValue", e);
83
- };
84
- return j(() => l.modelValue, () => {
85
- a(l.modelValue) !== a($.value) && ($.value = l.modelValue, Y(l.modelValue));
86
- }), o({ resetStatus: () => {
87
- X.value = "day";
88
- } }), (e, t) => (E(), y("div", L, [
89
- C(f, {
90
- cursor: J.value,
91
- disabled: e.disabled,
92
- hidden: !e.header
93
- }, null, 8, [
94
- "cursor",
95
- "disabled",
96
- "hidden"
97
- ]),
98
- b("div", R, [b("div", z, [
99
- C(A(i), {
100
- "aria-expanded": X.value === "month",
101
- "aria-label": "Select month",
102
- class: "bb-base-date-picker__control bb-base-date-picker__month-control",
103
- disabled: e.disabled,
104
- onClick: t[0] ||= (e) => Z("month")
105
- }, {
106
- default: M(() => [S(k(ae.value) + " ", 1), b("span", B, k(A(w)("datePicker.monthLabel")), 1)]),
107
- _: 1
108
- }, 8, ["aria-expanded", "disabled"]),
109
- C(A(i), {
110
- "aria-expanded": X.value === "year",
111
- "aria-label": "Select year",
112
- class: "bb-base-date-picker__control bb-base-date-picker__year-control",
113
- disabled: e.disabled,
114
- onClick: t[1] ||= (e) => Z("year")
115
- }, {
116
- default: M(() => [t[2] ||= b("svg", {
117
- fill: "none",
118
- height: "6",
119
- viewBox: "0 0 10 6",
120
- width: "10",
121
- xmlns: "http://www.w3.org/2000/svg"
122
- }, [b("path", {
123
- d: "M5.24124 5.81871L9.52771 1.39839C9.79517 1.12257 9.63305 0.595276 9.28077 0.595276H0.707839C0.355562 0.595276 0.193433 1.12257 0.460901 1.39839L4.74736 5.81871C4.88946 5.96524 5.09914 5.96524 5.24124 5.81871Z",
124
- fill: "currentColor"
125
- })], -1), b("span", V, k(A(w)("datePicker.yearLabel")), 1)]),
126
- _: 1
127
- }, 8, ["aria-expanded", "disabled"]),
128
- C(A(i), {
129
- "aria-label": A(w)("datePicker.previousMonthLabel"),
130
- class: "bb-base-date-picker__control",
131
- disabled: e.disabled || X.value !== "day",
132
- onClick: le
133
- }, {
134
- default: M(() => [t[3] ||= b("svg", {
135
- viewBox: "0 0 24 24",
136
- width: "24px",
137
- xmlns: "http://www.w3.org/2000/svg"
138
- }, [b("path", {
139
- d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
140
- fill: "currentColor"
141
- })], -1), b("span", H, k(A(w)("datePicker.previousMonthLabel")), 1)]),
142
- _: 1
143
- }, 8, ["aria-label", "disabled"]),
144
- C(A(i), {
145
- "aria-label": A(w)("datePicker.nextMonthLabel"),
146
- class: "bb-base-date-picker__control",
147
- disabled: e.disabled || X.value !== "day",
148
- onClick: ce
149
- }, {
150
- default: M(() => [(E(), y("svg", U, t[4] ||= [b("path", {
151
- d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
152
- fill: "currentColor"
153
- }, null, -1)])), b("span", ie, k(A(w)("datePicker.nextMonthLabel")), 1)]),
154
- _: 1
155
- }, 8, ["aria-label", "disabled"])
156
- ]), b("div", W, [
157
- C(d, {
158
- id: A(K),
159
- current: X.value === "day",
160
- cursor: J.value,
161
- disabled: e.disabled,
162
- "first-day-of-week": e.firstDayOfWeek,
163
- floating: e.floating,
164
- inert: X.value !== "day",
165
- max: e.max,
166
- min: e.min,
167
- "model-value": e.modelValue,
168
- multiple: e.multiple,
169
- range: e.range,
170
- readonly: e.readonly,
171
- selectable: e.selectable,
172
- "onUpdate:cursor": fe,
173
- "onUpdate:modelValue": pe
174
- }, x({ _: 2 }, [re(e.$slots, (t, n) => ({
175
- name: n,
176
- fn: M((t) => [O(e.$slots, n, ne(T(t)))])
177
- }))]), 1032, [
178
- "id",
179
- "current",
180
- "cursor",
181
- "disabled",
182
- "first-day-of-week",
183
- "floating",
184
- "inert",
185
- "max",
186
- "min",
187
- "model-value",
188
- "multiple",
189
- "range",
190
- "readonly",
191
- "selectable"
192
- ]),
193
- C(m, { duration: 200 }, {
194
- default: M(() => [X.value === "month" ? (E(), _(p, {
195
- key: 0,
196
- cursor: J.value,
197
- disabled: e.disabled,
198
- "onUpdate:month": Q
199
- }, null, 8, ["cursor", "disabled"])) : v("", !0)]),
200
- _: 1
201
- }),
202
- C(m, { duration: 200 }, {
203
- default: M(() => [X.value === "year" ? (E(), _(h, {
204
- key: 0,
205
- cursor: J.value,
206
- disabled: e.disabled,
207
- "onUpdate:year": de
208
- }, null, 8, ["cursor", "disabled"])) : v("", !0)]),
209
- _: 1
210
- })
211
- ])]),
212
- b("div", {
213
- id: `${A(K)}-status`,
214
- "aria-atomic": "true",
215
- "aria-live": "polite",
216
- class: "sr-only",
217
- role: "status"
218
- }, k(oe.value), 9, G)
219
- ]));
220
- }
1
+ import { defineComponent as Et, mergeModels as Ge, ref as R, computed as i, reactive as Je, onMounted as Wt, nextTick as Qe, onBeforeUnmount as St, watch as te, toRef as ge, useModel as Xe, createBlock as Ye, openBlock as o, resolveDynamicComponent as Ht, normalizeStyle as N, unref as T, normalizeClass as g, withCtx as Rt, createElementBlock as r, createCommentVNode as w, createElementVNode as c, toDisplayString as x, Fragment as I, renderList as W, renderSlot as _, createVNode as Ze, createTextVNode as Nt, mergeProps as Mt } from "vue";
2
+ import { clamp as Ft } from "./index226.js";
3
+ import { hash as le } from "./index243.js";
4
+ import { isNil as M } from "./index268.js";
5
+ import { when as Lt } from "./index266.js";
6
+ import { useId as Ot } from "./index8.js";
7
+ import { useItemValue as Dt } from "./index281.js";
8
+ import { useItemsGetter as Pt } from "./index238.js";
9
+ import { usePrefill as zt } from "./index239.js";
10
+ import { useIndexById as et } from "./index240.js";
11
+ import { useBaseOptions as qt } from "./index241.js";
12
+ import { useHashedWatcher as jt } from "./index244.js";
13
+ import { useTableWidthContext as Kt } from "./index282.js";
14
+ import { useLocale as Ut } from "./index235.js";
15
+ import tt from "./index18.js";
16
+ /* empty css */
17
+ import Gt from "./index32.js";
18
+ /* empty css */
19
+ import { columnKeyToSlotName as Jt, mergeHeaderClasses as Qt, applyFixedTableColumns as Xt, mergeCellClasses as Yt } from "./index283.js";
20
+ import { useLogger as Zt } from "./index252.js";
21
+ const el = {
22
+ key: 0,
23
+ class: "sr-only"
24
+ }, tl = ["aria-rowindex"], ll = { class: "bb-table-header__content" }, al = { class: "bb-table-check__label-text sr-only" }, sl = {
25
+ key: 1,
26
+ class: "bb-table-radio__label-text sr-only"
27
+ }, nl = ["aria-sort"], ol = { class: "bb-table-header__content" }, rl = { class: "bb-table-header__content sr-only" }, dl = ["aria-rowindex"], il = {
28
+ key: 0,
29
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
30
+ }, cl = {
31
+ key: 0,
32
+ class: "bb-table-skeleton__cell-content"
33
+ }, ul = {
34
+ key: 1,
35
+ class: "bb-table-skeleton__avatar"
36
+ }, bl = {
37
+ key: 2,
38
+ class: "bb-table-skeleton__avatar-text"
39
+ }, pl = { class: "bb-table-skeleton__cell-content" }, hl = {
40
+ key: 3,
41
+ class: "bb-table-skeleton__image"
42
+ }, fl = {
43
+ key: 4,
44
+ class: "bb-table-skeleton__badge"
45
+ }, vl = {
46
+ key: 1,
47
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
48
+ }, ml = ["aria-rowindex"], yl = ["colspan"], kl = { class: "bb-table-loading__text sr-only" }, gl = ["aria-rowindex"], _l = ["colspan"], wl = { class: "bb-table-no-data__text" }, xl = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], Cl = { class: "bb-table-check__label-text sr-only" }, Tl = { class: "bb-table-radio__label-text sr-only" }, $l = ["aria-rowindex", "id"], Il = ["colspan"], Gl = /* @__PURE__ */ Et({
49
+ __name: "BbTable",
50
+ props: /* @__PURE__ */ Ge({
51
+ accessibleLabel: {},
52
+ actions: { type: Boolean },
53
+ actionsText: { default: "Azioni" },
54
+ align: { default: "left" },
55
+ id: {},
56
+ inheritColumnWidths: { type: [Boolean, String], default: !0 },
57
+ allowSelectAll: { type: Boolean, default: !0 },
58
+ caption: {},
59
+ compact: { type: Boolean },
60
+ dependencies: { default: () => [] },
61
+ depsDebounceTime: { default: 0 },
62
+ disabled: { type: Boolean },
63
+ displayCaption: { type: Boolean },
64
+ fixed: { type: Boolean },
65
+ fixedColumns: { default: () => [] },
66
+ fixedHeaders: { type: Boolean },
67
+ items: { type: [Array, Function], default: () => [] },
68
+ itemValue: {},
69
+ legend: {},
70
+ loading: { type: Boolean },
71
+ loadingText: {},
72
+ max: { default: 1 / 0 },
73
+ modelValue: { default: () => [] },
74
+ multiple: { type: Boolean, default: !0 },
75
+ name: {},
76
+ noDataText: {},
77
+ page: {},
78
+ perPage: {},
79
+ readonly: { type: Boolean },
80
+ selectAll: { type: Boolean },
81
+ selectable: { type: [Boolean, Function] },
82
+ selectAllLabel: {},
83
+ selectText: {},
84
+ tdClass: {},
85
+ thClass: {},
86
+ totalItems: {},
87
+ unselectedItems: { default: () => [] },
88
+ columns: { default: () => [] }
89
+ }, {
90
+ selectAll: { type: Boolean, required: !1, default: !1 },
91
+ selectAllModifiers: {},
92
+ expandedItems: {
93
+ required: !1,
94
+ default: () => []
95
+ },
96
+ expandedItemsModifiers: {}
97
+ }),
98
+ emits: /* @__PURE__ */ Ge(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "update:expandedItems", "update:unselectedItems", "item:selected", "item:unselected"], ["update:selectAll", "update:expandedItems"]),
99
+ setup(ae, { emit: lt }) {
100
+ const { getItemValue: at } = Dt(), _e = Ot().id.value, a = ae, k = lt;
101
+ a.multiple && !Array.isArray(a.modelValue) && Zt().throw(
102
+ "BbTable is set for multiple selection but modelValue is not an array."
103
+ );
104
+ const { t: F } = Ut(), A = R(), L = R(), {
105
+ id: st,
106
+ parentId: O,
107
+ parentNode: U,
108
+ cssVars: nt,
109
+ parentVar: we,
110
+ setTracks: ot
111
+ } = Kt({
112
+ id: () => a.id,
113
+ container: () => L.value,
114
+ inheritFrom: () => typeof a.inheritColumnWidths == "string" ? a.inheritColumnWidths : void 0
115
+ }), D = i(() => a.inheritColumnWidths !== !1), G = i(
116
+ () => a.fixed || a.columns.some((e) => e.width != null) || D.value && !!O.value
117
+ ), J = i(
118
+ () => D.value && !!O.value
119
+ ), rt = J, xe = (e) => {
120
+ if (typeof e == "number") return `${e}px`;
121
+ const l = e.trim();
122
+ return /^-?\d*\.?\d+$/.test(l) ? `${l}px` : l;
123
+ }, dt = (e, l) => {
124
+ const t = xe(e);
125
+ if (/^-?\d*\.?\d+px$/.test(t)) return parseFloat(t);
126
+ const s = document.createElement("div");
127
+ s.style.position = "absolute", s.style.visibility = "hidden", s.style.pointerEvents = "none", s.style.width = t, l.appendChild(s);
128
+ const n = s.getBoundingClientRect().width;
129
+ return l.removeChild(s), Number.isFinite(n) && n > 0 ? n : null;
130
+ }, Ce = i(() => {
131
+ const e = U.value?.tracks;
132
+ return e ? Object.keys(e).filter((l) => /^\d+$/.test(l)).length : 0;
133
+ }), Te = i(() => {
134
+ const e = U.value?.tracks ?? {}, l = [];
135
+ "select" in e && l.push("select");
136
+ for (let t = 0; t < Ce.value; t++) l.push(String(t));
137
+ return "actions" in e && l.push("actions"), l;
138
+ }), $e = i(
139
+ () => "select" in (U.value?.tracks ?? {}) ? 1 : 0
140
+ ), Ie = i(
141
+ () => $e.value + Ce.value
142
+ ), it = i(() => Te.value.length), ct = (e) => {
143
+ const l = Te.value[e];
144
+ return l ? we(l, "0px") : "0px";
145
+ }, se = (e, l) => {
146
+ if (!O.value || l - e <= 1e-6) return null;
147
+ const t = [];
148
+ for (let s = Math.floor(e); s < Math.ceil(l - 1e-6); s++) {
149
+ const n = Math.min(l, s + 1) - Math.max(e, s);
150
+ if (n <= 1e-6) continue;
151
+ const d = ct(s);
152
+ t.push(
153
+ n >= 1 - 1e-6 ? d : `${Number(n.toFixed(4))} * ${d}`
154
+ );
155
+ }
156
+ return t.length ? t.length === 1 && !t[0].includes("*") ? t[0] : `calc(${t.join(" + ")})` : null;
157
+ }, Q = i(() => {
158
+ const e = a.columns, l = e.map(
159
+ (s) => typeof s.snap == "number" ? s.snap : Array.isArray(s.snap) ? s.snap[0] : null
160
+ );
161
+ let t = $e.value;
162
+ return e.map((s, n) => {
163
+ const d = l[n] ?? t;
164
+ let p;
165
+ if (Array.isArray(s.snap))
166
+ p = s.snap[1] === -1 ? Ie.value : s.snap[1];
167
+ else {
168
+ const m = l[n + 1];
169
+ p = m != null && m > d ? m : Math.floor(d) + 1;
170
+ }
171
+ return t = p, { start: d, end: p };
172
+ });
173
+ }), Ae = (e) => J.value && e.start >= Ie.value, ne = i(
174
+ () => Q.value.some(Ae)
175
+ ), X = (e) => a.columns[e]?.width == null && !J.value, Y = i(() => {
176
+ if (!J.value) return -1;
177
+ for (let e = a.columns.length - 1; e >= 0; e--) {
178
+ const l = a.columns[e];
179
+ if (l.width == null && l.snap == null) return e;
180
+ }
181
+ return -1;
182
+ }), oe = i(() => {
183
+ const e = Q.value[0];
184
+ if (!D.value || !O.value || !e) return null;
185
+ const l = se(0, e.start), t = a.selectable ? C.select : null;
186
+ return t ? `calc(${l ?? "0px"} - ${t})` : l;
187
+ }), re = i(() => {
188
+ const e = Q.value, l = e[e.length - 1];
189
+ if (!D.value || !O.value || !l || ne.value || Y.value === a.columns.length - 1) return null;
190
+ const t = se(l.end, it.value), s = a.actions ? C.actions : null;
191
+ return s ? `calc(${t ?? "0px"} - ${s})` : t;
192
+ }), ut = i(() => oe.value !== null), bt = i(() => re.value !== null), C = Je({ select: null, actions: null }), de = i(() => {
193
+ const e = (n) => D.value ? we(n) : "auto", l = (n) => G.value && C[n] ? C[n] : e(n), t = [];
194
+ a.selectable && t.push({ key: "select", width: l("select"), locked: !1 });
195
+ const s = a.columns.length - 1;
196
+ return a.columns.forEach((n, d) => {
197
+ const p = String(d), m = n.width != null ? xe(n.width) : null, v = Q.value[d];
198
+ if (d === Y.value && !ne.value) {
199
+ t.push({ key: p, width: "auto", locked: !1 });
200
+ return;
201
+ }
202
+ let h;
203
+ m != null ? h = m : X(d) ? h = G.value && Be.value[d] || null : Ae(v) ? h = Ee.value[d] ?? null : h = se(v.start, v.end);
204
+ const $ = [];
205
+ d === 0 && ut.value && $.push("var(--bb-table-offset-internal-start)"), d === s && bt.value && $.push("var(--bb-table-offset-internal-end)");
206
+ const f = $.length ? `calc(${[...$, h ?? "0px"].join(" + ")})` : h ?? "auto";
207
+ t.push({ key: p, width: f, locked: m != null });
208
+ }), a.actions && t.push({ key: "actions", width: l("actions"), locked: !1 }), t;
209
+ }), pt = i(() => {
210
+ const e = {};
211
+ return oe.value && (e["--bb-table-offset-start"] = oe.value), re.value && (e["--bb-table-offset-end"] = re.value), e;
212
+ }), ht = i(() => {
213
+ const e = {
214
+ ...nt.value,
215
+ ...pt.value
216
+ };
217
+ return ce.value && (e["--bb-table-natural-width"] = ce.value), P.value > 0 && (e["--bb-table-fill"] = `${P.value}px`), e;
218
+ }), ie = () => Array.from(
219
+ A.value?.querySelectorAll(
220
+ ":scope > thead > tr.bb-table-header-row > th"
221
+ ) ?? []
222
+ ), ft = () => {
223
+ const e = de.value.map((t) => t.key), l = {};
224
+ ie().forEach((t, s) => {
225
+ const n = e[s];
226
+ n != null && (l[n] = `${t.getBoundingClientRect().width}px`);
227
+ }), ot(l);
228
+ }, vt = () => {
229
+ const e = A.value;
230
+ if (!e) return;
231
+ const l = (t) => {
232
+ let s = 0;
233
+ return e.querySelectorAll(t).forEach((n) => {
234
+ let d = 1 / 0, p = -1 / 0;
235
+ n.querySelectorAll(":scope > *").forEach(($) => {
236
+ const f = $.getBoundingClientRect();
237
+ d = Math.min(d, f.left), p = Math.max(p, f.right);
238
+ });
239
+ const m = p > d ? p - d : 0, v = getComputedStyle(n), h = parseFloat(v.paddingLeft) + parseFloat(v.paddingRight);
240
+ s = Math.max(s, m + h);
241
+ }), s > 0 ? `${Math.ceil(s)}px` : null;
242
+ };
243
+ C.select = a.selectable ? l(
244
+ ":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select"
245
+ ) : null, C.actions = a.actions ? l(
246
+ ":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions"
247
+ ) : null;
248
+ }, Ve = () => {
249
+ vt(), ft();
250
+ }, Be = R([]), Ee = R([]), P = R(0), ce = R(null), mt = (e) => {
251
+ const l = e.parentElement?.clientWidth ?? 0, t = e.clientWidth || e.getBoundingClientRect().width, s = e.offsetWidth, n = l || t || s;
252
+ return Number.isFinite(n) && n > 0 ? n : 0;
253
+ }, We = () => {
254
+ const e = L.value;
255
+ if (!e || !G.value || !a.columns.some((u) => u.width != null) && !ne.value && Y.value < 0)
256
+ return;
257
+ const l = mt(e);
258
+ if (l <= 0) return;
259
+ const t = a.selectable ? 1 : 0, s = C.select ? parseFloat(C.select) : 0, n = C.actions ? parseFloat(C.actions) : 0, d = ie();
260
+ let p = 0, m = 0;
261
+ a.columns.forEach((u, y) => {
262
+ const b = d[t + y]?.getBoundingClientRect().width ?? 0, Ue = (u.width != null ? dt(u.width, e) : null) ?? b;
263
+ u.width != null && (p += Ue), X(y) || (m += Ue);
264
+ });
265
+ const v = document.createElement("div");
266
+ v.style.cssText = [
267
+ "position:absolute",
268
+ "top:-9999px",
269
+ "left:-9999px",
270
+ "visibility:hidden",
271
+ "pointer-events:none",
272
+ `width:${l}px`,
273
+ `height:${e.offsetHeight}px`,
274
+ "overflow:visible"
275
+ ].join(";");
276
+ const h = e.cloneNode(!0);
277
+ h.classList.remove("bb-table--fixed"), h.querySelectorAll(".bb-table-expand__row").forEach((u) => u.remove());
278
+ const $ = Array.from(h.querySelectorAll("col"));
279
+ a.columns.forEach((u, y) => {
280
+ if (u.width == null) {
281
+ const b = $[t + y];
282
+ b && (b.style.width = "");
283
+ }
284
+ });
285
+ const f = h.querySelector("table");
286
+ f && (f.style.width = "min-content", f.style.minWidth = "0"), v.appendChild(h), document.body.appendChild(v);
287
+ const ze = v.querySelector(
288
+ "table thead tr.bb-table-header-row"
289
+ ), Vt = ze ? Array.from(ze.querySelectorAll(":scope > th")) : [], ee = a.columns.map((u, y) => {
290
+ if (u.width != null) return 0;
291
+ const b = Vt[t + y];
292
+ return b ? b.getBoundingClientRect().width : 0;
293
+ });
294
+ document.body.removeChild(v);
295
+ const qe = a.columns.reduce(
296
+ (u, y, b) => u + (X(b) ? ee[b] : 0),
297
+ 0
298
+ ), je = l - m - s - n, ke = (u) => `${Number(u.toFixed(3))}px`;
299
+ if (Be.value = a.columns.map((u, y) => {
300
+ if (!X(y)) return null;
301
+ const b = ee[y];
302
+ if (qe <= 0) return ke(b);
303
+ const H = je > 0 ? je * (b / qe) : 0;
304
+ return ke(Math.max(b, H));
305
+ }), Ee.value = ee.map((u) => u > 0 ? ke(u) : null), Y.value >= 0) {
306
+ const u = Object.values(U.value?.tracks ?? {}).reduce(
307
+ (b, H) => b + (parseFloat(H) || 0),
308
+ 0
309
+ ), y = d.reduce(
310
+ (b, H) => b + H.getBoundingClientRect().width,
311
+ 0
312
+ );
313
+ P.value = Math.max(0, u - y + P.value);
314
+ } else
315
+ P.value = 0;
316
+ const Bt = ee.reduce((u, y) => u + y, 0), Ke = p + Bt + s + n;
317
+ ce.value = Ke > 0 ? `${Math.ceil(Ke)}px` : null;
318
+ };
319
+ let S = null, ue;
320
+ const Se = () => {
321
+ S !== null && clearTimeout(S), S = setTimeout(() => {
322
+ S = null, We();
323
+ }, 200);
324
+ };
325
+ let z, be;
326
+ const He = () => {
327
+ z && (z.disconnect(), ie().forEach((e) => z?.observe(e)), Ve());
328
+ };
329
+ Wt(() => {
330
+ z = new ResizeObserver(() => Ve()), He(), Qe(We), A.value && (ue = new MutationObserver(Se), ue.observe(A.value, {
331
+ childList: !0,
332
+ subtree: !0,
333
+ characterData: !0
334
+ })), L.value && (be = new ResizeObserver(Se), be.observe(L.value));
335
+ }), St(() => {
336
+ z?.disconnect(), be?.disconnect(), ue?.disconnect(), S !== null && clearTimeout(S);
337
+ }), te(de, () => Qe(He), { flush: "post" });
338
+ const yt = (e) => [F("table.select").value, ...e.map((l) => l.content)].join(" "), kt = i(() => a.selectable ? "fieldset" : "div"), pe = i(() => a.loading || _t.value), V = i(
339
+ () => !M(a.page) && !M(a.perPage) && !M(a.totalItems)
340
+ ), gt = i(() => ({
341
+ "bb-table": !0,
342
+ [`bb-table--align-${a.align}`]: !0,
343
+ "bb-table--compact": a.compact,
344
+ "bb-table--fixed": G.value,
345
+ "bb-table--inherit-widths": rt.value,
346
+ "bb-table--fixed-header": a.fixedHeaders,
347
+ "bb-table--loading": pe.value,
348
+ "bb-table--empty": !q.value.length,
349
+ "bb-table--selectable": !!a.selectable,
350
+ "scrollbar-border": !0
351
+ })), he = i(
352
+ () => a.columns.length + +!!a.selectable + +!!a.actions
353
+ ), Re = i(
354
+ () => Object.fromEntries(
355
+ a.columns.map((e) => [e.key, Jt(e.key)])
356
+ )
357
+ ), {
358
+ getter: Ne,
359
+ items: fe,
360
+ loading: _t
361
+ } = Pt({
362
+ items: ge(a, "items")
363
+ }), { hasPrefilled: wt } = zt({
364
+ trigger: !0,
365
+ fn: async (e) => {
366
+ await Ne(e, a.modelValue);
367
+ }
368
+ }), { data: Me } = et({
369
+ items: ge(a, "modelValue")
370
+ }), { options: q } = qt({
371
+ disabled: ge(a, "disabled"),
372
+ items: fe,
373
+ itemText: void 0,
374
+ itemValue: a.itemValue,
375
+ max: a.max,
376
+ selectable: !0,
377
+ selectedIndexedByHash: Me
378
+ }), xt = async (e) => {
379
+ a.multiple ? k("update:modelValue", a.modelValue.concat(e.value)) : k("update:modelValue", e.value);
380
+ }, Ct = async (e) => {
381
+ if (a.multiple) {
382
+ const l = { ...Me.value };
383
+ delete l[e.valueHash], k("update:modelValue", Object.values(l));
384
+ } else
385
+ k("update:modelValue", null);
386
+ };
387
+ jt(
388
+ () => [a.dependencies, a.items],
389
+ async () => {
390
+ wt.value && await Ne(!1, a.modelValue);
391
+ },
392
+ {
393
+ debounce: a.depsDebounceTime
394
+ }
395
+ );
396
+ const Tt = (e, l) => {
397
+ const t = Re.value[e.key], s = e.align ?? "left";
398
+ let n = at(l.item, e.key);
399
+ return e.formatter && (!M(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, l.item)), e.placeholder && M(n) && (n = e.placeholder), {
400
+ align: s,
401
+ classes: Yt(
402
+ [`bb-table-data__cell--${s}`],
403
+ a.tdClass,
404
+ e.tdClass,
405
+ n,
406
+ e.key,
407
+ l.item
408
+ ),
409
+ content: n,
410
+ key: e.key,
411
+ label: e.label,
412
+ slotName: t
413
+ };
414
+ }, Fe = i(
415
+ () => a.columns.map((e) => {
416
+ const l = e.align ?? "left", t = `header:${Re.value[e.key]}`, s = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
417
+ return {
418
+ align: l,
419
+ key: e.key,
420
+ label: e.label,
421
+ slotName: t,
422
+ classes: Qt(
423
+ [`bb-table-header--${l}`],
424
+ a.thClass,
425
+ e.thClass
426
+ ),
427
+ sortDirection: s
428
+ };
429
+ })
430
+ ), Le = i(() => {
431
+ let e = 0;
432
+ return q.value.map((l, t) => {
433
+ const s = !a.selectable || typeof a.selectable == "function" && !a.selectable(l.item) || !!l.disabled, n = (a.page ?? -1) * (a.perPage ?? 0), d = 1, p = t + 1, m = n + d + p + e, v = a.columns.map(
434
+ (f) => Tt(f, l)
435
+ ), h = ve.value[l.valueHash] ?? !1;
436
+ return h && e++, {
437
+ accessibleLabel: yt(v),
438
+ cols: v,
439
+ expanded: h,
440
+ onRowClick: (f) => k("click:row", f, l, !!l.selected),
441
+ onRowContextMenu: (f) => k("contextmenu:row", f, l, !!l.selected),
442
+ onRowDblClick: (f) => k("dblclick:row", f, l, !!l.selected),
443
+ item: l.item,
444
+ text: l.text,
445
+ rowIndex: m,
446
+ valueHash: l.valueHash,
447
+ value: l.value,
448
+ selected: l.selected,
449
+ disabled: s
450
+ };
451
+ });
452
+ }), B = Xe(ae, "selectAll"), j = Xe(ae, "expandedItems"), { data: ve } = et({
453
+ items: j
454
+ }), $t = (e, l) => {
455
+ e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), K(l)));
456
+ }, me = (e) => ({
457
+ "aria-controls": M(ve.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
458
+ "aria-expanded": e.expanded ? "true" : "false",
459
+ onClick: (l) => {
460
+ l.stopPropagation(), K(e.valueHash);
461
+ },
462
+ onKeydown: (l) => $t(l, e.valueHash)
463
+ }), K = (e) => {
464
+ const l = q.value.find((t) => t.valueHash === e);
465
+ l && (e in ve.value ? j.value = j.value.filter(
466
+ (t) => le(t) !== e
467
+ ) : j.value = [...j.value, l.value]);
468
+ };
469
+ te(B, () => {
470
+ E.clear(), k("update:unselectedItems", []), k("update:modelValue", []);
471
+ });
472
+ const Oe = i(() => !!(a.multiple && a.modelValue.length > 0 && !a.selectAll || B.value && E.size > 0)), E = Je(/* @__PURE__ */ new Set());
473
+ te(
474
+ () => a.unselectedItems,
475
+ () => {
476
+ E.clear(), a.unselectedItems.forEach((e) => {
477
+ E.add(le(e));
478
+ });
479
+ }
480
+ );
481
+ const De = (e) => {
482
+ if (ye(e)) {
483
+ Ct(e), k("item:unselected", e.value), E.add(e.valueHash), k("update:unselectedItems", [...a.unselectedItems, e.value]);
484
+ return;
485
+ }
486
+ B.value || xt(e), k("item:selected", e.value), E.delete(e.valueHash), k(
487
+ "update:unselectedItems",
488
+ a.unselectedItems.filter((l) => le(l) !== le(e.value))
489
+ );
490
+ }, ye = (e) => E.has(e.valueHash) ? !1 : e.selected || B.value, It = Lt(
491
+ (e) => typeof e != "string",
492
+ JSON.stringify
493
+ ), At = i(
494
+ () => [].concat(a.modelValue ?? []).map((e) => ({
495
+ disabled: a.disabled,
496
+ name: a.name,
497
+ type: "hidden",
498
+ value: It(e)
499
+ }))
500
+ ), Z = [70, 45, 85, 55], Pe = i(
501
+ () => Ft(q.value.length || a.columns.length || 1, 4, 10)
502
+ );
503
+ return te(
504
+ () => [Le.value, a.fixedColumns],
505
+ () => {
506
+ A.value && a.fixedColumns?.length && Xt(A.value, a.fixedColumns);
507
+ },
508
+ { flush: "post" }
509
+ ), (e, l) => (o(), Ye(Ht(kt.value), {
510
+ ref_key: "containerRef",
511
+ ref: L,
512
+ "aria-busy": pe.value,
513
+ "aria-rowcount": V.value ? a.totalItems : void 0,
514
+ class: g(gt.value),
515
+ "data-bb-table-id": T(st),
516
+ inert: e.disabled,
517
+ style: N(ht.value)
518
+ }, {
519
+ default: Rt(() => [
520
+ e.selectable ? (o(), r("legend", el, x(e.legend), 1)) : w("", !0),
521
+ c("table", {
522
+ ref_key: "tableRef",
523
+ ref: A
524
+ }, [
525
+ e.caption ? (o(), r("caption", {
526
+ key: 0,
527
+ class: g({
528
+ "bb-table-caption": !0,
529
+ "sr-only": !e.displayCaption
530
+ })
531
+ }, x(e.caption), 3)) : w("", !0),
532
+ c("colgroup", null, [
533
+ (o(!0), r(I, null, W(de.value, (t) => (o(), r("col", {
534
+ key: t.key,
535
+ style: N({
536
+ width: t.width,
537
+ minWidth: t.locked ? t.width : void 0,
538
+ maxWidth: t.locked ? t.width : void 0
539
+ })
540
+ }, null, 4))), 128))
541
+ ]),
542
+ c("thead", null, [
543
+ _(e.$slots, "thead", {}, () => [
544
+ c("tr", {
545
+ "aria-rowindex": V.value ? 1 : void 0,
546
+ class: "bb-table-header-row"
547
+ }, [
548
+ e.selectable ? (o(), r("th", {
549
+ key: 0,
550
+ class: g(["bb-table-header bb-table-header--select", e.thClass]),
551
+ scope: "col"
552
+ }, [
553
+ _(e.$slots, "header:select", {
554
+ multiple: e.multiple,
555
+ selectAll: !!B.value,
556
+ text: e.selectText || T(F)("table.selectText").value
557
+ }, () => [
558
+ c("span", ll, [
559
+ e.allowSelectAll && e.multiple ? (o(), r("label", {
560
+ key: 0,
561
+ class: g(["bb-table-check__label", {
562
+ "bb-table-check__label--disabled": e.disabled
563
+ }])
564
+ }, [
565
+ (o(), Ye(tt, {
566
+ key: Oe.value.toString(),
567
+ modelValue: B.value,
568
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => B.value = t),
569
+ class: "bb-table-check",
570
+ disabled: e.disabled,
571
+ indeterminate: Oe.value,
572
+ name: `select_all_${e.name || ""}`,
573
+ readonly: e.readonly
574
+ }, null, 8, ["modelValue", "disabled", "indeterminate", "name", "readonly"])),
575
+ c("span", al, x(e.selectAllLabel || T(F)("table.selectAllLabel").value), 1)
576
+ ], 2)) : e.multiple ? w("", !0) : (o(), r("span", sl, x(e.selectText || T(F)("table.selectText").value), 1))
577
+ ])
578
+ ])
579
+ ], 2)) : w("", !0),
580
+ (o(!0), r(I, null, W(Fe.value, (t, s) => (o(), r("th", {
581
+ key: t.key,
582
+ "aria-sort": t.sortDirection,
583
+ class: g(["bb-table-header", [
584
+ t.classes,
585
+ {
586
+ "bb-table-header--edge-start": s === 0,
587
+ "bb-table-header--edge-end": s === Fe.value.length - 1
588
+ }
589
+ ]]),
590
+ scope: "col"
591
+ }, [
592
+ _(e.$slots, t.slotName, {
593
+ classes: t.classes,
594
+ items: T(fe),
595
+ label: t.label
596
+ }, () => [
597
+ c("span", ol, x(t.label), 1)
598
+ ])
599
+ ], 10, nl))), 128)),
600
+ e.actions ? (o(), r("th", {
601
+ key: 1,
602
+ class: g(["bb-table-header bb-table-header--actions", e.thClass]),
603
+ scope: "col"
604
+ }, [
605
+ _(e.$slots, "header:actions", { text: e.actionsText }, () => [
606
+ c("span", rl, x(e.actionsText), 1)
607
+ ])
608
+ ], 2)) : w("", !0)
609
+ ], 8, tl)
610
+ ])
611
+ ]),
612
+ c("tbody", null, [
613
+ pe.value ? _(e.$slots, "loading", {
614
+ key: 0,
615
+ items: T(fe)
616
+ }, () => [
617
+ (o(!0), r(I, null, W(Pe.value, (t, s) => (o(), r("tr", {
618
+ key: s,
619
+ "aria-rowindex": V.value ? s + 2 : void 0,
620
+ class: "bb-table-skeleton__row"
621
+ }, [
622
+ e.selectable ? (o(), r("td", il, l[1] || (l[1] = [
623
+ c("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
624
+ ]))) : w("", !0),
625
+ (o(!0), r(I, null, W(a.columns, (n, d) => (o(), r("td", {
626
+ key: n.key,
627
+ class: g([
628
+ "bb-table-skeleton__cell",
629
+ `bb-table-skeleton__cell--${n.skeleton ?? "text"}`
630
+ ])
631
+ }, [
632
+ !n.skeleton || n.skeleton === "text" ? (o(), r("div", cl, [
633
+ c("div", {
634
+ class: "bb-table-skeleton__line",
635
+ style: N({
636
+ width: `${Z[(s + d) % 4]}%`
637
+ })
638
+ }, null, 4),
639
+ c("div", {
640
+ class: "bb-table-skeleton__line",
641
+ style: N({
642
+ width: `${Z[(s + d + 2) % 4]}%`
643
+ })
644
+ }, null, 4)
645
+ ])) : n.skeleton === "avatar" ? (o(), r("div", ul)) : n.skeleton === "avatar-text" ? (o(), r("div", bl, [
646
+ l[2] || (l[2] = c("div", { class: "bb-table-skeleton__avatar" }, null, -1)),
647
+ c("div", pl, [
648
+ c("div", {
649
+ class: "bb-table-skeleton__line",
650
+ style: N({
651
+ width: `${Z[(s + d) % 4]}%`
652
+ })
653
+ }, null, 4),
654
+ c("div", {
655
+ class: "bb-table-skeleton__line",
656
+ style: N({
657
+ width: `${Z[(s + d + 2) % 4]}%`
658
+ })
659
+ }, null, 4)
660
+ ])
661
+ ])) : n.skeleton === "image" ? (o(), r("div", hl)) : n.skeleton === "badge" ? (o(), r("div", fl)) : w("", !0)
662
+ ], 2))), 128)),
663
+ e.actions ? (o(), r("td", vl, l[3] || (l[3] = [
664
+ c("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
665
+ ]))) : w("", !0)
666
+ ], 8, dl))), 128)),
667
+ c("tr", {
668
+ "aria-rowindex": V.value ? Pe.value + 2 : void 0,
669
+ class: "bb-table-loading__row bb-table-loading__row--sr-only"
670
+ }, [
671
+ c("td", {
672
+ colspan: he.value,
673
+ class: "bb-table-loading__cell",
674
+ "aria-live": "polite",
675
+ role: "status"
676
+ }, [
677
+ c("span", kl, x(e.loadingText), 1)
678
+ ], 8, yl)
679
+ ], 8, ml)
680
+ ]) : T(q).length ? _(e.$slots, "tbody", { key: 2 }, () => [
681
+ (o(!0), r(I, null, W(Le.value, (t) => (o(), r(I, {
682
+ key: t.valueHash
683
+ }, [
684
+ c("tr", {
685
+ "aria-rowindex": V.value && t.rowIndex ? t.rowIndex : void 0,
686
+ class: "bb-table-data__row",
687
+ onClick: t.onRowClick,
688
+ onContextmenu: t.onRowContextMenu,
689
+ onDblclick: t.onRowDblClick
690
+ }, [
691
+ e.selectable ? (o(), r("td", {
692
+ key: 0,
693
+ class: g(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
694
+ }, [
695
+ _(e.$slots, "select", {
696
+ checked: ye(t),
697
+ disabled: !!t.disabled,
698
+ inputName: T(_e),
699
+ item: t.item,
700
+ readonly: !!e.readonly,
701
+ value: t.value
702
+ }, () => [
703
+ e.multiple ? (o(), r("label", {
704
+ key: 0,
705
+ class: g(["bb-table-check__label", {
706
+ "bb-table-check__label--disabled": t.disabled
707
+ }])
708
+ }, [
709
+ Ze(tt, {
710
+ checked: ye(t),
711
+ class: "bb-table-check",
712
+ disabled: t.disabled,
713
+ readonly: e.readonly,
714
+ onChange: () => De(t)
715
+ }, null, 8, ["checked", "disabled", "readonly", "onChange"]),
716
+ c("span", Cl, x(t.accessibleLabel), 1)
717
+ ], 2)) : (o(), r("label", {
718
+ key: 1,
719
+ class: g(["bb-table-radio__label", {
720
+ "bb-table-radio__label--disabled": t.disabled
721
+ }])
722
+ }, [
723
+ Ze(Gt, {
724
+ checked: t.selected,
725
+ class: "bb-table-radio",
726
+ disabled: t.disabled,
727
+ name: T(_e),
728
+ readonly: e.readonly,
729
+ value: t.value,
730
+ onChange: () => De(t)
731
+ }, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
732
+ c("span", Tl, x(t.accessibleLabel), 1)
733
+ ], 2))
734
+ ])
735
+ ], 2)) : w("", !0),
736
+ (o(!0), r(I, null, W(t.cols, (s, n) => (o(), r("td", {
737
+ key: s.key,
738
+ class: g(["bb-table-data__cell", [
739
+ s.classes,
740
+ {
741
+ "bb-table-data__cell--edge-start": n === 0,
742
+ "bb-table-data__cell--edge-end": n === t.cols.length - 1
743
+ }
744
+ ]])
745
+ }, [
746
+ _(e.$slots, s.slotName, {
747
+ classes: s.classes,
748
+ content: s.content,
749
+ expanded: t.expanded,
750
+ item: t.item,
751
+ expandProps: me(t),
752
+ toggleExpanded: () => K(t.valueHash),
753
+ value: t.value
754
+ }, () => [
755
+ Nt(x(s.content), 1)
756
+ ])
757
+ ], 2))), 128)),
758
+ e.actions ? (o(), r("td", {
759
+ key: 1,
760
+ class: g(["bb-table__cell bb-table__cell--actions", e.tdClass])
761
+ }, [
762
+ _(e.$slots, "actions", {
763
+ expanded: t.expanded,
764
+ item: t.item,
765
+ expandProps: me(t),
766
+ toggleExpanded: () => K(t.valueHash),
767
+ value: t.value
768
+ })
769
+ ], 2)) : w("", !0)
770
+ ], 40, xl),
771
+ t.expanded ? (o(), r("tr", {
772
+ key: 0,
773
+ "aria-rowindex": V.value && t.rowIndex ? t.rowIndex + 1 : void 0,
774
+ id: `expanded_${t.valueHash}`,
775
+ class: "bb-table-expand__row"
776
+ }, [
777
+ c("td", {
778
+ colspan: he.value,
779
+ class: "bb-table-expand__cell"
780
+ }, [
781
+ _(e.$slots, "expand", {
782
+ expanded: t.expanded,
783
+ item: t.item,
784
+ expandProps: me(t),
785
+ toggleExpanded: () => K(t.valueHash),
786
+ value: t.value
787
+ })
788
+ ], 8, Il)
789
+ ], 8, $l)) : w("", !0)
790
+ ], 64))), 128))
791
+ ]) : _(e.$slots, "no-data", { key: 1 }, () => [
792
+ c("tr", {
793
+ "aria-rowindex": V.value ? 2 : void 0,
794
+ class: "bb-table-no-data__row"
795
+ }, [
796
+ c("td", {
797
+ class: "bb-table-no-data__cell",
798
+ colspan: he.value
799
+ }, [
800
+ c("span", wl, x(e.noDataText || T(F)("table.noDataText").value), 1)
801
+ ], 8, _l)
802
+ ], 8, gl)
803
+ ])
804
+ ]),
805
+ c("tfoot", null, [
806
+ _(e.$slots, "tfoot")
807
+ ])
808
+ ], 512),
809
+ (o(!0), r(I, null, W(At.value, (t) => (o(), r("input", Mt({
810
+ key: t.value,
811
+ ref_for: !0
812
+ }, t), null, 16))), 128))
813
+ ]),
814
+ _: 3
815
+ }, 8, ["aria-busy", "aria-rowcount", "class", "data-bb-table-id", "inert", "style"]));
816
+ }
221
817
  });
222
- //#endregion
223
- export { K as default };
818
+ export {
819
+ Gl as default
820
+ };