bitboss-ui 2.1.129 → 2.1.131

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 +19 -11
  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 +806 -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 +4 -0
  201. package/dist/index225.js +140 -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 +5 -9
  206. package/dist/index230.js +15 -22
  207. package/dist/index231.js +374 -23
  208. package/dist/index233.js +162 -0
  209. package/dist/index235.js +27 -47
  210. package/dist/index236.js +4 -165
  211. package/dist/index237.js +4 -0
  212. package/dist/index238.js +4 -6
  213. package/dist/index239.js +8 -10
  214. package/dist/index24.js +616 -9
  215. package/dist/index240.js +4 -159
  216. package/dist/index241.js +9 -0
  217. package/dist/index242.js +5 -6
  218. package/dist/index243.js +35 -133
  219. package/dist/index244.js +7 -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 +5 -0
  226. package/dist/index251.js +10 -6
  227. package/dist/index252.js +5 -35
  228. package/dist/index253.js +20 -0
  229. package/dist/index254.js +14 -6
  230. package/dist/index255.js +53 -65
  231. package/dist/index256.js +20 -0
  232. package/dist/index257.js +14 -6
  233. package/dist/index258.js +19 -19
  234. package/dist/index259.js +32 -5
  235. package/dist/index26.js +184 -4
  236. package/dist/index260.js +20 -160
  237. package/dist/index261.js +6 -0
  238. package/dist/index262.js +108 -6
  239. package/dist/index264.js +102 -0
  240. package/dist/index266.js +108 -133
  241. package/dist/index267.js +15 -0
  242. package/dist/index268.js +13 -6
  243. package/dist/index269.js +12 -12
  244. package/dist/index270.js +5 -206
  245. package/dist/index271.js +5 -0
  246. package/dist/index272.js +88 -6
  247. package/dist/index274.js +11 -5
  248. package/dist/index275.js +25 -55
  249. package/dist/index276.js +25 -5
  250. package/dist/index277.js +15 -164
  251. package/dist/index278.js +9 -0
  252. package/dist/index279.js +11 -6
  253. package/dist/index28.js +148 -8
  254. package/dist/index280.js +7 -145
  255. package/dist/index281.js +4 -0
  256. package/dist/index282.js +190 -6
  257. package/dist/index283.js +5 -11
  258. package/dist/index284.js +35 -200
  259. package/dist/index285.js +30 -0
  260. package/dist/index287.js +10 -240
  261. package/dist/index288.js +46 -0
  262. package/dist/index289.js +55 -6
  263. package/dist/index290.js +4 -21
  264. package/dist/index291.js +7 -0
  265. package/dist/index292.js +8 -6
  266. package/dist/index293.js +269 -124
  267. package/dist/index294.js +54 -0
  268. package/dist/index295.js +54 -6
  269. package/dist/index296.js +33 -160
  270. package/dist/index297.js +62 -0
  271. package/dist/index298.js +5 -6
  272. package/dist/index299.js +23 -127
  273. package/dist/index30.js +177 -117
  274. package/dist/index300.js +69 -0
  275. package/dist/index301.js +8 -6
  276. package/dist/index302.js +6 -20
  277. package/dist/index303.js +22 -0
  278. package/dist/index304.js +8 -6
  279. package/dist/index305.js +18 -116
  280. package/dist/index306.js +6 -5
  281. package/dist/index307.js +9 -507
  282. package/dist/index308.js +5 -0
  283. package/dist/index309.js +7 -6
  284. package/dist/index310.js +4 -196
  285. package/dist/index312.js +9 -6
  286. package/dist/index313.js +5 -142
  287. package/dist/index314.js +282 -0
  288. package/dist/index315.js +4 -6
  289. package/dist/index316.js +127 -134
  290. package/dist/index317.js +4 -0
  291. package/dist/index318.js +17 -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 +21 -6
  299. package/dist/index325.js +4 -40
  300. package/dist/index326.js +4 -42
  301. package/dist/index327.js +5 -664
  302. package/dist/index328.js +19 -0
  303. package/dist/index329.js +30 -6
  304. package/dist/index330.js +5 -155
  305. package/dist/index331.js +5 -0
  306. package/dist/index332.js +4 -6
  307. package/dist/index333.js +6 -142
  308. package/dist/index334.js +7 -0
  309. package/dist/index335.js +29 -6
  310. package/dist/index336.js +4 -155
  311. package/dist/index337.js +4 -0
  312. package/dist/index338.js +4 -6
  313. package/dist/index339.js +4 -58
  314. package/dist/index34.js +176 -111
  315. package/dist/index340.js +4 -5
  316. package/dist/index341.js +4 -20
  317. package/dist/index342.js +4 -0
  318. package/dist/index343.js +721 -6
  319. package/dist/index344.js +368 -142
  320. package/dist/index345.js +59 -0
  321. package/dist/index346.js +69 -6
  322. package/dist/index347.js +69 -4
  323. package/dist/index348.js +230 -109
  324. package/dist/index349.js +8 -0
  325. package/dist/index350.js +37 -6
  326. package/dist/index351.js +131 -54
  327. package/dist/index352.js +401 -24
  328. package/dist/index353.js +95 -23
  329. package/dist/index354.js +201 -838
  330. package/dist/index355.js +260 -473
  331. package/dist/index356.js +8 -51
  332. package/dist/index357.js +21 -7
  333. package/dist/index358.js +11 -0
  334. package/dist/index359.js +17 -0
  335. package/dist/index36.js +133 -6
  336. package/dist/index360.js +7 -0
  337. package/dist/index361.js +9 -0
  338. package/dist/index362.js +136 -0
  339. package/dist/index363.js +24 -0
  340. package/dist/index365.js +4 -0
  341. package/dist/index366.js +4 -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/index232.js +0 -286
  415. package/dist/index234.js +0 -6
  416. package/dist/index25.js +0 -24
  417. package/dist/index263.js +0 -60
  418. package/dist/index265.js +0 -6
  419. package/dist/index27.js +0 -4
  420. package/dist/index273.js +0 -85
  421. package/dist/index286.js +0 -6
  422. package/dist/index29.js +0 -7
  423. package/dist/index31.js +0 -10
  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,807 @@
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 At, mergeModels as Ke, ref as R, computed as c, reactive as Ue, onMounted as Vt, nextTick as Ge, onBeforeUnmount as Bt, watch as te, toRef as ge, useModel as Je, createBlock as Qe, openBlock as o, resolveDynamicComponent as St, normalizeStyle as N, unref as T, normalizeClass as g, withCtx as Et, createElementBlock as r, createCommentVNode as w, createElementVNode as d, toDisplayString as x, Fragment as I, renderList as E, renderSlot as _, createVNode as Xe, createTextVNode as Ht, mergeProps as Rt } from "vue";
2
+ import { clamp as Nt } from "./index224.js";
3
+ import { hash as le } from "./index252.js";
4
+ import { isNil as L } from "./index238.js";
5
+ import { when as Lt } from "./index261.js";
6
+ import { useId as Mt } from "./index8.js";
7
+ import { useItemValue as Ot } from "./index287.js";
8
+ import { useItemsGetter as Wt } from "./index259.js";
9
+ import { usePrefill as Dt } from "./index260.js";
10
+ import { useIndexById as Ye } from "./index258.js";
11
+ import { useBaseOptions as Ft } from "./index255.js";
12
+ import { useHashedWatcher as Pt } from "./index257.js";
13
+ import { useTableWidthContext as zt } from "./index288.js";
14
+ import { useLocale as qt } from "./index230.js";
15
+ import Ze from "./index18.js";
16
+ /* empty css */
17
+ import jt from "./index32.js";
18
+ /* empty css */
19
+ import { columnKeyToSlotName as Kt, mergeHeaderClasses as Ut, applyFixedTableColumns as Gt, mergeCellClasses as Jt } from "./index289.js";
20
+ import { useLogger as Qt } from "./index251.js";
21
+ const Xt = {
22
+ key: 0,
23
+ class: "sr-only"
24
+ }, Yt = ["aria-rowindex"], Zt = { class: "bb-table-header__content" }, el = { class: "bb-table-check__label-text sr-only" }, tl = {
25
+ key: 1,
26
+ class: "bb-table-radio__label-text sr-only"
27
+ }, ll = ["aria-sort"], al = { class: "bb-table-header__content" }, sl = { class: "bb-table-header__content sr-only" }, nl = ["aria-rowindex"], ol = {
28
+ key: 0,
29
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
30
+ }, rl = {
31
+ key: 0,
32
+ class: "bb-table-skeleton__cell-content"
33
+ }, cl = {
34
+ key: 1,
35
+ class: "bb-table-skeleton__avatar"
36
+ }, ul = {
37
+ key: 2,
38
+ class: "bb-table-skeleton__avatar-text"
39
+ }, dl = { class: "bb-table-skeleton__cell-content" }, il = {
40
+ key: 3,
41
+ class: "bb-table-skeleton__image"
42
+ }, bl = {
43
+ key: 4,
44
+ class: "bb-table-skeleton__badge"
45
+ }, pl = {
46
+ key: 1,
47
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
48
+ }, fl = ["aria-rowindex"], hl = ["colspan"], vl = { class: "bb-table-loading__text sr-only" }, ml = ["aria-rowindex"], yl = ["colspan"], kl = { class: "bb-table-no-data__text" }, gl = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], _l = { class: "bb-table-check__label-text sr-only" }, wl = { class: "bb-table-radio__label-text sr-only" }, xl = ["aria-rowindex", "id"], Cl = ["colspan"], jl = /* @__PURE__ */ At({
49
+ __name: "BbTable",
50
+ props: /* @__PURE__ */ Ke({
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__ */ Ke(["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: et }) {
100
+ const { getItemValue: tt } = Ot(), _e = Mt().id.value, a = ae, m = et;
101
+ a.multiple && !Array.isArray(a.modelValue) && Qt().throw(
102
+ "BbTable is set for multiple selection but modelValue is not an array."
103
+ );
104
+ const { t: M } = qt(), A = R(), O = R(), {
105
+ id: lt,
106
+ parentId: W,
107
+ parentNode: U,
108
+ cssVars: at,
109
+ parentVar: we,
110
+ setTracks: st
111
+ } = zt({
112
+ id: () => a.id,
113
+ container: () => O.value,
114
+ inheritFrom: () => typeof a.inheritColumnWidths == "string" ? a.inheritColumnWidths : void 0
115
+ }), D = c(() => a.inheritColumnWidths !== !1), G = c(
116
+ () => a.fixed || a.columns.some((e) => e.width != null) || D.value && !!W.value
117
+ ), J = c(
118
+ () => D.value && !!W.value
119
+ ), nt = J, ot = (e) => {
120
+ if (typeof e == "number") return `${e}px`;
121
+ const l = e.trim();
122
+ return /^-?\d*\.?\d+$/.test(l) ? `${l}px` : l;
123
+ }, xe = c(() => {
124
+ const e = U.value?.tracks;
125
+ return e ? Object.keys(e).filter((l) => /^\d+$/.test(l)).length : 0;
126
+ }), Ce = c(() => {
127
+ const e = U.value?.tracks ?? {}, l = [];
128
+ "select" in e && l.push("select");
129
+ for (let t = 0; t < xe.value; t++) l.push(String(t));
130
+ return "actions" in e && l.push("actions"), l;
131
+ }), Te = c(
132
+ () => "select" in (U.value?.tracks ?? {}) ? 1 : 0
133
+ ), $e = c(
134
+ () => Te.value + xe.value
135
+ ), rt = c(() => Ce.value.length), ct = (e) => {
136
+ const l = Ce.value[e];
137
+ return l ? we(l, "0px") : "0px";
138
+ }, se = (e, l) => {
139
+ if (!W.value || l - e <= 1e-6) return null;
140
+ const t = [];
141
+ for (let s = Math.floor(e); s < Math.ceil(l - 1e-6); s++) {
142
+ const n = Math.min(l, s + 1) - Math.max(e, s);
143
+ if (n <= 1e-6) continue;
144
+ const u = ct(s);
145
+ t.push(
146
+ n >= 1 - 1e-6 ? u : `${Number(n.toFixed(4))} * ${u}`
147
+ );
148
+ }
149
+ return t.length ? t.length === 1 && !t[0].includes("*") ? t[0] : `calc(${t.join(" + ")})` : null;
150
+ }, Q = c(() => {
151
+ const e = a.columns, l = e.map(
152
+ (s) => typeof s.snap == "number" ? s.snap : Array.isArray(s.snap) ? s.snap[0] : null
153
+ );
154
+ let t = Te.value;
155
+ return e.map((s, n) => {
156
+ const u = l[n] ?? t;
157
+ let f;
158
+ if (Array.isArray(s.snap))
159
+ f = s.snap[1] === -1 ? $e.value : s.snap[1];
160
+ else {
161
+ const y = l[n + 1];
162
+ f = y != null && y > u ? y : Math.floor(u) + 1;
163
+ }
164
+ return t = f, { start: u, end: f };
165
+ });
166
+ }), Ie = (e) => J.value && e.start >= $e.value, ne = c(
167
+ () => Q.value.some(Ie)
168
+ ), X = (e) => a.columns[e]?.width == null && !J.value, Y = c(() => {
169
+ if (!J.value) return -1;
170
+ for (let e = a.columns.length - 1; e >= 0; e--) {
171
+ const l = a.columns[e];
172
+ if (l.width == null && l.snap == null) return e;
173
+ }
174
+ return -1;
175
+ }), oe = c(() => {
176
+ const e = Q.value[0];
177
+ if (!D.value || !W.value || !e) return null;
178
+ const l = se(0, e.start), t = a.selectable ? C.select : null;
179
+ return t ? `calc(${l ?? "0px"} - ${t})` : l;
180
+ }), re = c(() => {
181
+ const e = Q.value, l = e[e.length - 1];
182
+ if (!D.value || !W.value || !l || ne.value || Y.value === a.columns.length - 1) return null;
183
+ const t = se(l.end, rt.value), s = a.actions ? C.actions : null;
184
+ return s ? `calc(${t ?? "0px"} - ${s})` : t;
185
+ }), ut = c(() => oe.value !== null), dt = c(() => re.value !== null), C = Ue({ select: null, actions: null }), ce = c(() => {
186
+ const e = (n) => D.value ? we(n) : "auto", l = (n) => G.value && C[n] ? C[n] : e(n), t = [];
187
+ a.selectable && t.push({ key: "select", width: l("select") });
188
+ const s = a.columns.length - 1;
189
+ return a.columns.forEach((n, u) => {
190
+ const f = String(u), y = n.width != null ? ot(n.width) : null, h = Q.value[u];
191
+ if (u === Y.value && !ne.value) {
192
+ t.push({ key: f, width: "auto" });
193
+ return;
194
+ }
195
+ let b;
196
+ y != null ? b = y : X(u) ? b = G.value && Ve.value[u] || null : Ie(h) ? b = Be.value[u] ?? null : b = se(h.start, h.end);
197
+ const $ = [];
198
+ u === 0 && ut.value && $.push("var(--bb-table-offset-internal-start)"), u === s && dt.value && $.push("var(--bb-table-offset-internal-end)");
199
+ const k = $.length ? `calc(${[...$, b ?? "0px"].join(" + ")})` : b ?? "auto";
200
+ t.push({ key: f, width: k });
201
+ }), a.actions && t.push({ key: "actions", width: l("actions") }), t;
202
+ }), it = c(() => {
203
+ const e = {};
204
+ return oe.value && (e["--bb-table-offset-start"] = oe.value), re.value && (e["--bb-table-offset-end"] = re.value), e;
205
+ }), bt = c(() => {
206
+ const e = {
207
+ ...at.value,
208
+ ...it.value
209
+ };
210
+ return de.value && (e["--bb-table-natural-width"] = de.value), F.value > 0 && (e["--bb-table-fill"] = `${F.value}px`), e;
211
+ }), ue = () => Array.from(
212
+ A.value?.querySelectorAll(
213
+ ":scope > thead > tr.bb-table-header-row > th"
214
+ ) ?? []
215
+ ), pt = () => {
216
+ const e = ce.value.map((t) => t.key), l = {};
217
+ ue().forEach((t, s) => {
218
+ const n = e[s];
219
+ n != null && (l[n] = `${t.getBoundingClientRect().width}px`);
220
+ }), st(l);
221
+ }, ft = () => {
222
+ const e = A.value;
223
+ if (!e) return;
224
+ const l = (t) => {
225
+ let s = 0;
226
+ return e.querySelectorAll(t).forEach((n) => {
227
+ let u = 0;
228
+ n.querySelectorAll(":scope > *").forEach((h) => {
229
+ const b = getComputedStyle(h);
230
+ if (b.position === "absolute" || b.position === "fixed")
231
+ return;
232
+ const $ = parseFloat(b.marginLeft) + parseFloat(b.marginRight);
233
+ u += h.getBoundingClientRect().width + ($ || 0);
234
+ });
235
+ const f = getComputedStyle(n), y = parseFloat(f.paddingLeft) + parseFloat(f.paddingRight);
236
+ s = Math.max(s, u + y);
237
+ }), s > 0 ? `${Math.ceil(s)}px` : null;
238
+ };
239
+ C.select = a.selectable ? l(
240
+ ":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select"
241
+ ) : null, C.actions = a.actions ? l(
242
+ ":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions"
243
+ ) : null;
244
+ }, Ae = () => {
245
+ ft(), pt();
246
+ }, Ve = R([]), Be = R([]), F = R(0), de = R(null), Se = () => {
247
+ const e = O.value;
248
+ if (!e || !G.value || !a.columns.some((i) => i.width != null) && !ne.value && Y.value < 0)
249
+ return;
250
+ const l = e.offsetWidth, t = a.selectable ? 1 : 0, s = C.select ? parseFloat(C.select) : 0, n = C.actions ? parseFloat(C.actions) : 0, u = ue();
251
+ let f = 0, y = 0;
252
+ a.columns.forEach((i, v) => {
253
+ const p = u[t + v]?.getBoundingClientRect().width ?? 0;
254
+ i.width != null && (f += p), X(v) || (y += p);
255
+ });
256
+ const h = document.createElement("div");
257
+ h.style.cssText = [
258
+ "position:absolute",
259
+ "top:-9999px",
260
+ "left:-9999px",
261
+ "visibility:hidden",
262
+ "pointer-events:none",
263
+ `width:${l}px`,
264
+ `height:${e.offsetHeight}px`,
265
+ "overflow:visible"
266
+ ].join(";");
267
+ const b = e.cloneNode(!0);
268
+ b.classList.remove("bb-table--fixed"), b.querySelectorAll(".bb-table-expand__row").forEach((i) => i.remove());
269
+ const $ = Array.from(b.querySelectorAll("col"));
270
+ a.columns.forEach((i, v) => {
271
+ if (i.width == null) {
272
+ const p = $[t + v];
273
+ p && (p.style.width = "");
274
+ }
275
+ });
276
+ const k = b.querySelector("table");
277
+ k && (k.style.width = "min-content", k.style.minWidth = "0"), h.appendChild(b), document.body.appendChild(h);
278
+ const Pe = h.querySelector(
279
+ "table thead tr.bb-table-header-row"
280
+ ), $t = Pe ? Array.from(Pe.querySelectorAll(":scope > th")) : [], ee = a.columns.map((i, v) => {
281
+ if (i.width != null) return 0;
282
+ const p = $t[t + v];
283
+ return p ? p.getBoundingClientRect().width : 0;
284
+ });
285
+ document.body.removeChild(h);
286
+ const ze = a.columns.reduce(
287
+ (i, v, p) => i + (X(p) ? ee[p] : 0),
288
+ 0
289
+ ), qe = l - y - s - n, ke = (i) => `${Number(i.toFixed(3))}px`;
290
+ if (Ve.value = a.columns.map((i, v) => {
291
+ if (!X(v)) return null;
292
+ const p = ee[v];
293
+ if (ze <= 0) return ke(p);
294
+ const K = qe > 0 ? qe * (p / ze) : 0;
295
+ return ke(Math.max(p, K));
296
+ }), Be.value = ee.map((i) => i > 0 ? ke(i) : null), Y.value >= 0) {
297
+ const i = Object.values(U.value?.tracks ?? {}).reduce(
298
+ (p, K) => p + (parseFloat(K) || 0),
299
+ 0
300
+ ), v = u.reduce(
301
+ (p, K) => p + K.getBoundingClientRect().width,
302
+ 0
303
+ );
304
+ F.value = Math.max(0, i - v + F.value);
305
+ } else
306
+ F.value = 0;
307
+ const It = ee.reduce((i, v) => i + v, 0), je = f + It + s + n;
308
+ de.value = je > 0 ? `${Math.ceil(je)}px` : null;
309
+ };
310
+ let H = null, ie;
311
+ const Ee = () => {
312
+ H !== null && clearTimeout(H), H = setTimeout(() => {
313
+ H = null, Se();
314
+ }, 200);
315
+ };
316
+ let P, be;
317
+ const He = () => {
318
+ P && (P.disconnect(), ue().forEach((e) => P?.observe(e)), Ae());
319
+ };
320
+ Vt(() => {
321
+ P = new ResizeObserver(() => Ae()), He(), Ge(Se), A.value && (ie = new MutationObserver(Ee), ie.observe(A.value, {
322
+ childList: !0,
323
+ subtree: !0,
324
+ characterData: !0
325
+ })), O.value && (be = new ResizeObserver(Ee), be.observe(O.value));
326
+ }), Bt(() => {
327
+ P?.disconnect(), be?.disconnect(), ie?.disconnect(), H !== null && clearTimeout(H);
328
+ }), te(ce, () => Ge(He), { flush: "post" });
329
+ const ht = (e) => [M("table.select").value, ...e.map((l) => l.content)].join(" "), vt = c(() => a.selectable ? "fieldset" : "div"), pe = c(() => a.loading || yt.value), V = c(
330
+ () => !L(a.page) && !L(a.perPage) && !L(a.totalItems)
331
+ ), mt = c(() => ({
332
+ "bb-table": !0,
333
+ [`bb-table--align-${a.align}`]: !0,
334
+ "bb-table--compact": a.compact,
335
+ "bb-table--fixed": G.value,
336
+ "bb-table--inherit-widths": nt.value,
337
+ "bb-table--fixed-header": a.fixedHeaders,
338
+ "bb-table--loading": pe.value,
339
+ "bb-table--empty": !z.value.length,
340
+ "bb-table--selectable": !!a.selectable,
341
+ "scrollbar-border": !0
342
+ })), fe = c(
343
+ () => a.columns.length + +!!a.selectable + +!!a.actions
344
+ ), Re = c(
345
+ () => Object.fromEntries(
346
+ a.columns.map((e) => [e.key, Kt(e.key)])
347
+ )
348
+ ), {
349
+ getter: Ne,
350
+ items: he,
351
+ loading: yt
352
+ } = Wt({
353
+ items: ge(a, "items")
354
+ }), { hasPrefilled: kt } = Dt({
355
+ trigger: !0,
356
+ fn: async (e) => {
357
+ await Ne(e, a.modelValue);
358
+ }
359
+ }), { data: Le } = Ye({
360
+ items: ge(a, "modelValue")
361
+ }), { options: z } = Ft({
362
+ disabled: ge(a, "disabled"),
363
+ items: he,
364
+ itemText: void 0,
365
+ itemValue: a.itemValue,
366
+ max: a.max,
367
+ selectable: !0,
368
+ selectedIndexedByHash: Le
369
+ }), gt = async (e) => {
370
+ a.multiple ? m("update:modelValue", a.modelValue.concat(e.value)) : m("update:modelValue", e.value);
371
+ }, _t = async (e) => {
372
+ if (a.multiple) {
373
+ const l = { ...Le.value };
374
+ delete l[e.valueHash], m("update:modelValue", Object.values(l));
375
+ } else
376
+ m("update:modelValue", null);
377
+ };
378
+ Pt(
379
+ () => [a.dependencies, a.items],
380
+ async () => {
381
+ kt.value && await Ne(!1, a.modelValue);
382
+ },
383
+ {
384
+ debounce: a.depsDebounceTime
385
+ }
386
+ );
387
+ const wt = (e, l) => {
388
+ const t = Re.value[e.key], s = e.align ?? "left";
389
+ let n = tt(l.item, e.key);
390
+ return e.formatter && (!L(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, l.item)), e.placeholder && L(n) && (n = e.placeholder), {
391
+ align: s,
392
+ classes: Jt(
393
+ [`bb-table-data__cell--${s}`],
394
+ a.tdClass,
395
+ e.tdClass,
396
+ n,
397
+ e.key,
398
+ l.item
399
+ ),
400
+ content: n,
401
+ key: e.key,
402
+ label: e.label,
403
+ slotName: t
404
+ };
405
+ }, Me = c(
406
+ () => a.columns.map((e) => {
407
+ const l = e.align ?? "left", t = `header:${Re.value[e.key]}`, s = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
408
+ return {
409
+ align: l,
410
+ key: e.key,
411
+ label: e.label,
412
+ slotName: t,
413
+ classes: Ut(
414
+ [`bb-table-header--${l}`],
415
+ a.thClass,
416
+ e.thClass
417
+ ),
418
+ sortDirection: s
419
+ };
420
+ })
421
+ ), Oe = c(() => {
422
+ let e = 0;
423
+ return z.value.map((l, t) => {
424
+ const s = !a.selectable || typeof a.selectable == "function" && !a.selectable(l.item) || !!l.disabled, n = (a.page ?? -1) * (a.perPage ?? 0), u = 1, f = t + 1, y = n + u + f + e, h = a.columns.map(
425
+ (k) => wt(k, l)
426
+ ), b = ve.value[l.valueHash] ?? !1;
427
+ return b && e++, {
428
+ accessibleLabel: ht(h),
429
+ cols: h,
430
+ expanded: b,
431
+ onRowClick: (k) => m("click:row", k, l, !!l.selected),
432
+ onRowContextMenu: (k) => m("contextmenu:row", k, l, !!l.selected),
433
+ onRowDblClick: (k) => m("dblclick:row", k, l, !!l.selected),
434
+ item: l.item,
435
+ text: l.text,
436
+ rowIndex: y,
437
+ valueHash: l.valueHash,
438
+ value: l.value,
439
+ selected: l.selected,
440
+ disabled: s
441
+ };
442
+ });
443
+ }), B = Je(ae, "selectAll"), q = Je(ae, "expandedItems"), { data: ve } = Ye({
444
+ items: q
445
+ }), xt = (e, l) => {
446
+ e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), j(l)));
447
+ }, me = (e) => ({
448
+ "aria-controls": L(ve.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
449
+ "aria-expanded": e.expanded ? "true" : "false",
450
+ onClick: (l) => {
451
+ l.stopPropagation(), j(e.valueHash);
452
+ },
453
+ onKeydown: (l) => xt(l, e.valueHash)
454
+ }), j = (e) => {
455
+ const l = z.value.find((t) => t.valueHash === e);
456
+ l && (e in ve.value ? q.value = q.value.filter(
457
+ (t) => le(t) !== e
458
+ ) : q.value = [...q.value, l.value]);
459
+ };
460
+ te(B, () => {
461
+ S.clear(), m("update:unselectedItems", []), m("update:modelValue", []);
462
+ });
463
+ const We = c(() => !!(a.multiple && a.modelValue.length > 0 && !a.selectAll || B.value && S.size > 0)), S = Ue(/* @__PURE__ */ new Set());
464
+ te(
465
+ () => a.unselectedItems,
466
+ () => {
467
+ S.clear(), a.unselectedItems.forEach((e) => {
468
+ S.add(le(e));
469
+ });
470
+ }
471
+ );
472
+ const De = (e) => {
473
+ if (ye(e)) {
474
+ _t(e), m("item:unselected", e.value), S.add(e.valueHash), m("update:unselectedItems", [...a.unselectedItems, e.value]);
475
+ return;
476
+ }
477
+ B.value || gt(e), m("item:selected", e.value), S.delete(e.valueHash), m(
478
+ "update:unselectedItems",
479
+ a.unselectedItems.filter((l) => le(l) !== le(e.value))
480
+ );
481
+ }, ye = (e) => S.has(e.valueHash) ? !1 : e.selected || B.value, Ct = Lt(
482
+ (e) => typeof e != "string",
483
+ JSON.stringify
484
+ ), Tt = c(
485
+ () => [].concat(a.modelValue ?? []).map((e) => ({
486
+ disabled: a.disabled,
487
+ name: a.name,
488
+ type: "hidden",
489
+ value: Ct(e)
490
+ }))
491
+ ), Z = [70, 45, 85, 55], Fe = c(
492
+ () => Nt(z.value.length || a.columns.length || 1, 4, 10)
493
+ );
494
+ return te(
495
+ () => [Oe.value, a.fixedColumns],
496
+ () => {
497
+ A.value && a.fixedColumns?.length && Gt(A.value, a.fixedColumns);
498
+ },
499
+ { flush: "post" }
500
+ ), (e, l) => (o(), Qe(St(vt.value), {
501
+ ref_key: "containerRef",
502
+ ref: O,
503
+ "aria-busy": pe.value,
504
+ "aria-rowcount": V.value ? a.totalItems : void 0,
505
+ class: g(mt.value),
506
+ "data-bb-table-id": T(lt),
507
+ inert: e.disabled,
508
+ style: N(bt.value)
509
+ }, {
510
+ default: Et(() => [
511
+ e.selectable ? (o(), r("legend", Xt, x(e.legend), 1)) : w("", !0),
512
+ d("table", {
513
+ ref_key: "tableRef",
514
+ ref: A
515
+ }, [
516
+ e.caption ? (o(), r("caption", {
517
+ key: 0,
518
+ class: g({
519
+ "bb-table-caption": !0,
520
+ "sr-only": !e.displayCaption
521
+ })
522
+ }, x(e.caption), 3)) : w("", !0),
523
+ d("colgroup", null, [
524
+ (o(!0), r(I, null, E(ce.value, (t) => (o(), r("col", {
525
+ key: t.key,
526
+ style: N({ width: t.width })
527
+ }, null, 4))), 128))
528
+ ]),
529
+ d("thead", null, [
530
+ _(e.$slots, "thead", {}, () => [
531
+ d("tr", {
532
+ "aria-rowindex": V.value ? 1 : void 0,
533
+ class: "bb-table-header-row"
534
+ }, [
535
+ e.selectable ? (o(), r("th", {
536
+ key: 0,
537
+ class: g(["bb-table-header bb-table-header--select", e.thClass]),
538
+ scope: "col"
539
+ }, [
540
+ _(e.$slots, "header:select", {
541
+ multiple: e.multiple,
542
+ selectAll: !!B.value,
543
+ text: e.selectText || T(M)("table.selectText").value
544
+ }, () => [
545
+ d("span", Zt, [
546
+ e.allowSelectAll && e.multiple ? (o(), r("label", {
547
+ key: 0,
548
+ class: g(["bb-table-check__label", {
549
+ "bb-table-check__label--disabled": e.disabled
550
+ }])
551
+ }, [
552
+ (o(), Qe(Ze, {
553
+ key: We.value.toString(),
554
+ modelValue: B.value,
555
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => B.value = t),
556
+ class: "bb-table-check",
557
+ disabled: e.disabled,
558
+ indeterminate: We.value,
559
+ name: `select_all_${e.name || ""}`,
560
+ readonly: e.readonly
561
+ }, null, 8, ["modelValue", "disabled", "indeterminate", "name", "readonly"])),
562
+ d("span", el, x(e.selectAllLabel || T(M)("table.selectAllLabel").value), 1)
563
+ ], 2)) : e.multiple ? w("", !0) : (o(), r("span", tl, x(e.selectText || T(M)("table.selectText").value), 1))
564
+ ])
565
+ ])
566
+ ], 2)) : w("", !0),
567
+ (o(!0), r(I, null, E(Me.value, (t, s) => (o(), r("th", {
568
+ key: t.key,
569
+ "aria-sort": t.sortDirection,
570
+ class: g(["bb-table-header", [
571
+ t.classes,
572
+ {
573
+ "bb-table-header--edge-start": s === 0,
574
+ "bb-table-header--edge-end": s === Me.value.length - 1
575
+ }
576
+ ]]),
577
+ scope: "col"
578
+ }, [
579
+ _(e.$slots, t.slotName, {
580
+ classes: t.classes,
581
+ items: T(he),
582
+ label: t.label
583
+ }, () => [
584
+ d("span", al, x(t.label), 1)
585
+ ])
586
+ ], 10, ll))), 128)),
587
+ e.actions ? (o(), r("th", {
588
+ key: 1,
589
+ class: g(["bb-table-header bb-table-header--actions", e.thClass]),
590
+ scope: "col"
591
+ }, [
592
+ _(e.$slots, "header:actions", { text: e.actionsText }, () => [
593
+ d("span", sl, x(e.actionsText), 1)
594
+ ])
595
+ ], 2)) : w("", !0)
596
+ ], 8, Yt)
597
+ ])
598
+ ]),
599
+ d("tbody", null, [
600
+ pe.value ? _(e.$slots, "loading", {
601
+ key: 0,
602
+ items: T(he)
603
+ }, () => [
604
+ (o(!0), r(I, null, E(Fe.value, (t, s) => (o(), r("tr", {
605
+ key: s,
606
+ "aria-rowindex": V.value ? s + 2 : void 0,
607
+ class: "bb-table-skeleton__row"
608
+ }, [
609
+ e.selectable ? (o(), r("td", ol, l[1] || (l[1] = [
610
+ d("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
611
+ ]))) : w("", !0),
612
+ (o(!0), r(I, null, E(a.columns, (n, u) => (o(), r("td", {
613
+ key: n.key,
614
+ class: g([
615
+ "bb-table-skeleton__cell",
616
+ `bb-table-skeleton__cell--${n.skeleton ?? "text"}`
617
+ ])
618
+ }, [
619
+ !n.skeleton || n.skeleton === "text" ? (o(), r("div", rl, [
620
+ d("div", {
621
+ class: "bb-table-skeleton__line",
622
+ style: N({
623
+ width: `${Z[(s + u) % 4]}%`
624
+ })
625
+ }, null, 4),
626
+ d("div", {
627
+ class: "bb-table-skeleton__line",
628
+ style: N({
629
+ width: `${Z[(s + u + 2) % 4]}%`
630
+ })
631
+ }, null, 4)
632
+ ])) : n.skeleton === "avatar" ? (o(), r("div", cl)) : n.skeleton === "avatar-text" ? (o(), r("div", ul, [
633
+ l[2] || (l[2] = d("div", { class: "bb-table-skeleton__avatar" }, null, -1)),
634
+ d("div", dl, [
635
+ d("div", {
636
+ class: "bb-table-skeleton__line",
637
+ style: N({
638
+ width: `${Z[(s + u) % 4]}%`
639
+ })
640
+ }, null, 4),
641
+ d("div", {
642
+ class: "bb-table-skeleton__line",
643
+ style: N({
644
+ width: `${Z[(s + u + 2) % 4]}%`
645
+ })
646
+ }, null, 4)
647
+ ])
648
+ ])) : n.skeleton === "image" ? (o(), r("div", il)) : n.skeleton === "badge" ? (o(), r("div", bl)) : w("", !0)
649
+ ], 2))), 128)),
650
+ e.actions ? (o(), r("td", pl, l[3] || (l[3] = [
651
+ d("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
652
+ ]))) : w("", !0)
653
+ ], 8, nl))), 128)),
654
+ d("tr", {
655
+ "aria-rowindex": V.value ? Fe.value + 2 : void 0,
656
+ class: "bb-table-loading__row bb-table-loading__row--sr-only"
657
+ }, [
658
+ d("td", {
659
+ colspan: fe.value,
660
+ class: "bb-table-loading__cell",
661
+ "aria-live": "polite",
662
+ role: "status"
663
+ }, [
664
+ d("span", vl, x(e.loadingText), 1)
665
+ ], 8, hl)
666
+ ], 8, fl)
667
+ ]) : T(z).length ? _(e.$slots, "tbody", { key: 2 }, () => [
668
+ (o(!0), r(I, null, E(Oe.value, (t) => (o(), r(I, {
669
+ key: t.valueHash
670
+ }, [
671
+ d("tr", {
672
+ "aria-rowindex": V.value && t.rowIndex ? t.rowIndex : void 0,
673
+ class: "bb-table-data__row",
674
+ onClick: t.onRowClick,
675
+ onContextmenu: t.onRowContextMenu,
676
+ onDblclick: t.onRowDblClick
677
+ }, [
678
+ e.selectable ? (o(), r("td", {
679
+ key: 0,
680
+ class: g(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
681
+ }, [
682
+ _(e.$slots, "select", {
683
+ checked: ye(t),
684
+ disabled: !!t.disabled,
685
+ inputName: T(_e),
686
+ item: t.item,
687
+ readonly: !!e.readonly,
688
+ value: t.value
689
+ }, () => [
690
+ e.multiple ? (o(), r("label", {
691
+ key: 0,
692
+ class: g(["bb-table-check__label", {
693
+ "bb-table-check__label--disabled": t.disabled
694
+ }])
695
+ }, [
696
+ Xe(Ze, {
697
+ checked: ye(t),
698
+ class: "bb-table-check",
699
+ disabled: t.disabled,
700
+ readonly: e.readonly,
701
+ onChange: () => De(t)
702
+ }, null, 8, ["checked", "disabled", "readonly", "onChange"]),
703
+ d("span", _l, x(t.accessibleLabel), 1)
704
+ ], 2)) : (o(), r("label", {
705
+ key: 1,
706
+ class: g(["bb-table-radio__label", {
707
+ "bb-table-radio__label--disabled": t.disabled
708
+ }])
709
+ }, [
710
+ Xe(jt, {
711
+ checked: t.selected,
712
+ class: "bb-table-radio",
713
+ disabled: t.disabled,
714
+ name: T(_e),
715
+ readonly: e.readonly,
716
+ value: t.value,
717
+ onChange: () => De(t)
718
+ }, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
719
+ d("span", wl, x(t.accessibleLabel), 1)
720
+ ], 2))
721
+ ])
722
+ ], 2)) : w("", !0),
723
+ (o(!0), r(I, null, E(t.cols, (s, n) => (o(), r("td", {
724
+ key: s.key,
725
+ class: g(["bb-table-data__cell", [
726
+ s.classes,
727
+ {
728
+ "bb-table-data__cell--edge-start": n === 0,
729
+ "bb-table-data__cell--edge-end": n === t.cols.length - 1
730
+ }
731
+ ]])
732
+ }, [
733
+ _(e.$slots, s.slotName, {
734
+ classes: s.classes,
735
+ content: s.content,
736
+ expanded: t.expanded,
737
+ item: t.item,
738
+ expandProps: me(t),
739
+ toggleExpanded: () => j(t.valueHash),
740
+ value: t.value
741
+ }, () => [
742
+ Ht(x(s.content), 1)
743
+ ])
744
+ ], 2))), 128)),
745
+ e.actions ? (o(), r("td", {
746
+ key: 1,
747
+ class: g(["bb-table__cell bb-table__cell--actions", e.tdClass])
748
+ }, [
749
+ _(e.$slots, "actions", {
750
+ expanded: t.expanded,
751
+ item: t.item,
752
+ expandProps: me(t),
753
+ toggleExpanded: () => j(t.valueHash),
754
+ value: t.value
755
+ })
756
+ ], 2)) : w("", !0)
757
+ ], 40, gl),
758
+ t.expanded ? (o(), r("tr", {
759
+ key: 0,
760
+ "aria-rowindex": V.value && t.rowIndex ? t.rowIndex + 1 : void 0,
761
+ id: `expanded_${t.valueHash}`,
762
+ class: "bb-table-expand__row"
763
+ }, [
764
+ d("td", {
765
+ colspan: fe.value,
766
+ class: "bb-table-expand__cell"
767
+ }, [
768
+ _(e.$slots, "expand", {
769
+ expanded: t.expanded,
770
+ item: t.item,
771
+ expandProps: me(t),
772
+ toggleExpanded: () => j(t.valueHash),
773
+ value: t.value
774
+ })
775
+ ], 8, Cl)
776
+ ], 8, xl)) : w("", !0)
777
+ ], 64))), 128))
778
+ ]) : _(e.$slots, "no-data", { key: 1 }, () => [
779
+ d("tr", {
780
+ "aria-rowindex": V.value ? 2 : void 0,
781
+ class: "bb-table-no-data__row"
782
+ }, [
783
+ d("td", {
784
+ class: "bb-table-no-data__cell",
785
+ colspan: fe.value
786
+ }, [
787
+ d("span", kl, x(e.noDataText || T(M)("table.noDataText").value), 1)
788
+ ], 8, yl)
789
+ ], 8, ml)
790
+ ])
791
+ ]),
792
+ d("tfoot", null, [
793
+ _(e.$slots, "tfoot")
794
+ ])
795
+ ], 512),
796
+ (o(!0), r(I, null, E(Tt.value, (t) => (o(), r("input", Rt({
797
+ key: t.value,
798
+ ref_for: !0
799
+ }, t), null, 16))), 128))
800
+ ]),
801
+ _: 3
802
+ }, 8, ["aria-busy", "aria-rowcount", "class", "data-bb-table-id", "inert", "style"]));
803
+ }
221
804
  });
222
- //#endregion
223
- export { K as default };
805
+ export {
806
+ jl as default
807
+ };