bitboss-ui 2.1.133 → 2.1.134

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