bitboss-ui 2.0.4 → 2.0.7

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 (442) hide show
  1. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +1 -3
  2. package/dist/composables/useOptions.d.ts +1 -1
  3. package/dist/index.js +138 -137
  4. package/dist/index.js.map +1 -1
  5. package/dist/index10.js +74 -35
  6. package/dist/index10.js.map +1 -1
  7. package/dist/{index99.js → index100.js} +3 -3
  8. package/dist/index100.js.map +1 -0
  9. package/dist/{index101.js → index102.js} +3 -3
  10. package/dist/{index101.js.map → index102.js.map} +1 -1
  11. package/dist/{index103.js → index104.js} +8 -8
  12. package/dist/{index103.js.map → index104.js.map} +1 -1
  13. package/dist/{index105.js → index106.js} +10 -10
  14. package/dist/{index105.js.map → index106.js.map} +1 -1
  15. package/dist/{index107.js → index108.js} +3 -3
  16. package/dist/{index107.js.map → index108.js.map} +1 -1
  17. package/dist/index11.js +36 -189
  18. package/dist/index11.js.map +1 -1
  19. package/dist/{index109.js → index110.js} +3 -3
  20. package/dist/{index109.js.map → index110.js.map} +1 -1
  21. package/dist/{index111.js → index112.js} +3 -3
  22. package/dist/{index111.js.map → index112.js.map} +1 -1
  23. package/dist/{index113.js → index114.js} +3 -3
  24. package/dist/{index113.js.map → index114.js.map} +1 -1
  25. package/dist/{index115.js → index116.js} +8 -8
  26. package/dist/{index115.js.map → index116.js.map} +1 -1
  27. package/dist/{index117.js → index118.js} +2 -2
  28. package/dist/{index117.js.map → index118.js.map} +1 -1
  29. package/dist/index12.js +189 -78
  30. package/dist/index12.js.map +1 -1
  31. package/dist/index120.js +34 -38
  32. package/dist/index120.js.map +1 -1
  33. package/dist/index121.js +38 -38
  34. package/dist/index121.js.map +1 -1
  35. package/dist/index122.js +39 -42
  36. package/dist/index122.js.map +1 -1
  37. package/dist/index123.js +43 -31
  38. package/dist/index123.js.map +1 -1
  39. package/dist/index124.js +35 -2
  40. package/dist/index124.js.map +1 -1
  41. package/dist/index125.js +2 -21
  42. package/dist/index125.js.map +1 -1
  43. package/dist/index126.js +21 -2
  44. package/dist/index126.js.map +1 -1
  45. package/dist/index127.js +2 -312
  46. package/dist/index127.js.map +1 -1
  47. package/dist/index128.js +309 -21
  48. package/dist/index128.js.map +1 -1
  49. package/dist/index129.js +24 -2
  50. package/dist/index129.js.map +1 -1
  51. package/dist/index13.js +85 -0
  52. package/dist/index13.js.map +1 -0
  53. package/dist/index130.js +2 -5
  54. package/dist/index130.js.map +1 -1
  55. package/dist/index131.js +5 -9
  56. package/dist/index131.js.map +1 -1
  57. package/dist/index132.js +8 -5
  58. package/dist/index132.js.map +1 -1
  59. package/dist/index133.js +6 -3
  60. package/dist/index133.js.map +1 -1
  61. package/dist/index134.js +1 -1
  62. package/dist/index135.js +1 -1
  63. package/dist/index136.js +1 -1
  64. package/dist/index137.js +1 -1
  65. package/dist/index138.js +1 -1
  66. package/dist/index139.js +1 -1
  67. package/dist/index140.js +1 -1
  68. package/dist/index141.js +1 -1
  69. package/dist/index142.js +1 -1
  70. package/dist/index143.js +1 -1
  71. package/dist/index144.js +1 -1
  72. package/dist/index145.js +1 -1
  73. package/dist/index146.js +1 -1
  74. package/dist/index147.js +1 -1
  75. package/dist/index148.js +1 -1
  76. package/dist/index149.js +1 -1
  77. package/dist/{index14.js → index15.js} +4 -4
  78. package/dist/{index14.js.map → index15.js.map} +1 -1
  79. package/dist/index150.js +1 -1
  80. package/dist/index151.js +1 -1
  81. package/dist/index152.js +1 -1
  82. package/dist/index153.js +1 -1
  83. package/dist/index154.js +1 -1
  84. package/dist/index155.js +1 -1
  85. package/dist/index156.js +1 -1
  86. package/dist/index157.js +1 -1
  87. package/dist/index158.js +1 -1
  88. package/dist/index159.js +2 -2
  89. package/dist/{index161.js → index160.js} +1 -1
  90. package/dist/index160.js.map +1 -0
  91. package/dist/index162.js +6 -0
  92. package/dist/index162.js.map +1 -0
  93. package/dist/index164.js +1 -1
  94. package/dist/index165.js +1 -1
  95. package/dist/index166.js +1 -1
  96. package/dist/index167.js +1 -1
  97. package/dist/index168.js +1 -1
  98. package/dist/index169.js +2 -2
  99. package/dist/{index16.js → index17.js} +4 -4
  100. package/dist/{index16.js.map → index17.js.map} +1 -1
  101. package/dist/index170.js +6 -0
  102. package/dist/index170.js.map +1 -0
  103. package/dist/index172.js +2 -3
  104. package/dist/index172.js.map +1 -1
  105. package/dist/index173.js +1 -1
  106. package/dist/index174.js +1 -1
  107. package/dist/index175.js +1 -1
  108. package/dist/index176.js +1 -1
  109. package/dist/index177.js +1 -1
  110. package/dist/index178.js +1 -1
  111. package/dist/index179.js +1 -1
  112. package/dist/index180.js +1 -1
  113. package/dist/index181.js +1 -1
  114. package/dist/index182.js +1 -1
  115. package/dist/index183.js +2 -2
  116. package/dist/{index185.js → index184.js} +1 -1
  117. package/dist/index184.js.map +1 -0
  118. package/dist/index186.js +6 -0
  119. package/dist/index186.js.map +1 -0
  120. package/dist/index188.js +1 -1
  121. package/dist/index189.js +1 -1
  122. package/dist/{index18.js → index19.js} +76 -74
  123. package/dist/index19.js.map +1 -0
  124. package/dist/index190.js +1 -1
  125. package/dist/index191.js +1 -1
  126. package/dist/index192.js +1 -1
  127. package/dist/index193.js +1 -1
  128. package/dist/index194.js +1 -1
  129. package/dist/index195.js +1 -1
  130. package/dist/index196.js +1 -1
  131. package/dist/index197.js +3 -2
  132. package/dist/index197.js.map +1 -1
  133. package/dist/index198.js +77 -154
  134. package/dist/index198.js.map +1 -1
  135. package/dist/index199.js +2 -84
  136. package/dist/index199.js.map +1 -1
  137. package/dist/index200.js +5 -0
  138. package/dist/index200.js.map +1 -0
  139. package/dist/index201.js +4 -2
  140. package/dist/index201.js.map +1 -1
  141. package/dist/index202.js +2 -4
  142. package/dist/index202.js.map +1 -1
  143. package/dist/index203.js +8 -2
  144. package/dist/index203.js.map +1 -1
  145. package/dist/index204.js +117 -72
  146. package/dist/index204.js.map +1 -1
  147. package/dist/index205.js +5 -126
  148. package/dist/index205.js.map +1 -1
  149. package/dist/index206.js +123 -5
  150. package/dist/index206.js.map +1 -1
  151. package/dist/index207.js +17 -121
  152. package/dist/index207.js.map +1 -1
  153. package/dist/index208.js +15 -18
  154. package/dist/index208.js.map +1 -1
  155. package/dist/index209.js +10 -10
  156. package/dist/index209.js.map +1 -1
  157. package/dist/{index20.js → index21.js} +26 -27
  158. package/dist/index21.js.map +1 -0
  159. package/dist/index210.js +2 -16
  160. package/dist/index210.js.map +1 -1
  161. package/dist/index211.js +2 -2
  162. package/dist/index211.js.map +1 -1
  163. package/dist/index212.js +35 -2
  164. package/dist/index212.js.map +1 -1
  165. package/dist/index213.js +172 -33
  166. package/dist/index213.js.map +1 -1
  167. package/dist/index214.js +6 -174
  168. package/dist/index214.js.map +1 -1
  169. package/dist/index215.js +42 -5
  170. package/dist/index215.js.map +1 -1
  171. package/dist/index217.js +16 -0
  172. package/dist/index217.js.map +1 -0
  173. package/dist/index218.js +4 -12
  174. package/dist/index218.js.map +1 -1
  175. package/dist/index219.js +369 -5
  176. package/dist/index219.js.map +1 -1
  177. package/dist/index220.js +17 -367
  178. package/dist/index220.js.map +1 -1
  179. package/dist/index221.js +27 -8
  180. package/dist/index221.js.map +1 -1
  181. package/dist/index222.js +3 -3
  182. package/dist/index222.js.map +1 -1
  183. package/dist/index223.js +249 -7
  184. package/dist/index223.js.map +1 -1
  185. package/dist/index224.js +51 -18
  186. package/dist/index224.js.map +1 -1
  187. package/dist/index225.js +44 -27
  188. package/dist/index225.js.map +1 -1
  189. package/dist/index226.js +5 -3
  190. package/dist/index226.js.map +1 -1
  191. package/dist/index227.js +43 -243
  192. package/dist/index227.js.map +1 -1
  193. package/dist/index228.js +6 -0
  194. package/dist/{index233.js.map → index228.js.map} +1 -1
  195. package/dist/index229.js +3 -52
  196. package/dist/index229.js.map +1 -1
  197. package/dist/{index22.js → index23.js} +74 -76
  198. package/dist/index23.js.map +1 -0
  199. package/dist/index230.js +7 -37
  200. package/dist/index230.js.map +1 -1
  201. package/dist/index231.js +158 -5
  202. package/dist/index231.js.map +1 -1
  203. package/dist/index232.js +77 -34
  204. package/dist/index232.js.map +1 -1
  205. package/dist/index234.js +2 -2
  206. package/dist/index234.js.map +1 -1
  207. package/dist/index235.js +18 -3
  208. package/dist/index235.js.map +1 -1
  209. package/dist/index236.js +105 -17
  210. package/dist/index236.js.map +1 -1
  211. package/dist/{index239.js → index238.js} +3 -3
  212. package/dist/{index239.js.map → index238.js.map} +1 -1
  213. package/dist/index240.js +5 -0
  214. package/dist/index240.js.map +1 -0
  215. package/dist/index244.js +3 -3
  216. package/dist/index248.js +9 -3
  217. package/dist/index248.js.map +1 -1
  218. package/dist/index249.js +281 -12
  219. package/dist/index249.js.map +1 -1
  220. package/dist/{index24.js → index25.js} +6 -6
  221. package/dist/{index24.js.map → index25.js.map} +1 -1
  222. package/dist/index250.js +5 -8
  223. package/dist/index250.js.map +1 -1
  224. package/dist/index251.js +2 -9
  225. package/dist/index251.js.map +1 -1
  226. package/dist/index252.js +2 -17
  227. package/dist/index252.js.map +1 -1
  228. package/dist/index253.js +2 -281
  229. package/dist/index253.js.map +1 -1
  230. package/dist/index254.js +2 -6
  231. package/dist/index254.js.map +1 -1
  232. package/dist/index255.js +2 -2
  233. package/dist/index256.js +126 -2
  234. package/dist/index256.js.map +1 -1
  235. package/dist/index257.js +431 -2
  236. package/dist/index257.js.map +1 -1
  237. package/dist/index258.js +3 -2
  238. package/dist/index258.js.map +1 -1
  239. package/dist/index260.js +7 -126
  240. package/dist/index260.js.map +1 -1
  241. package/dist/index261.js +20 -429
  242. package/dist/index261.js.map +1 -1
  243. package/dist/{index259.js → index263.js} +1 -1
  244. package/dist/index263.js.map +1 -0
  245. package/dist/index264.js +2 -7
  246. package/dist/index264.js.map +1 -1
  247. package/dist/index265.js +1 -21
  248. package/dist/index265.js.map +1 -1
  249. package/dist/index266.js +5 -0
  250. package/dist/index266.js.map +1 -0
  251. package/dist/index267.js +2 -9
  252. package/dist/index267.js.map +1 -1
  253. package/dist/index268.js +2 -200
  254. package/dist/index268.js.map +1 -1
  255. package/dist/index269.js +23 -431
  256. package/dist/index269.js.map +1 -1
  257. package/dist/{index26.js → index27.js} +4 -4
  258. package/dist/{index26.js.map → index27.js.map} +1 -1
  259. package/dist/index270.js +21 -126
  260. package/dist/index270.js.map +1 -1
  261. package/dist/index272.js +224 -2
  262. package/dist/index272.js.map +1 -1
  263. package/dist/index273.js +89 -2
  264. package/dist/index273.js.map +1 -1
  265. package/dist/index274.js +200 -3
  266. package/dist/index274.js.map +1 -1
  267. package/dist/index275.js +436 -2
  268. package/dist/index275.js.map +1 -1
  269. package/dist/index276.js +127 -2
  270. package/dist/index276.js.map +1 -1
  271. package/dist/index277.js +5 -2
  272. package/dist/index277.js.map +1 -1
  273. package/dist/index278.js +2 -28
  274. package/dist/index278.js.map +1 -1
  275. package/dist/index279.js +7 -20
  276. package/dist/index279.js.map +1 -1
  277. package/dist/index280.js +72 -0
  278. package/dist/index280.js.map +1 -0
  279. package/dist/index281.js +3 -2
  280. package/dist/index281.js.map +1 -1
  281. package/dist/index282.js +12 -5
  282. package/dist/index282.js.map +1 -1
  283. package/dist/index283.js +8 -68
  284. package/dist/index283.js.map +1 -1
  285. package/dist/index284.js +17 -224
  286. package/dist/index284.js.map +1 -1
  287. package/dist/index285.js +1 -1
  288. package/dist/index286.js +1 -1
  289. package/dist/index287.js +12 -12
  290. package/dist/index287.js.map +1 -1
  291. package/dist/index288.js +18 -0
  292. package/dist/index288.js.map +1 -0
  293. package/dist/index289.js +4 -15
  294. package/dist/index289.js.map +1 -1
  295. package/dist/{index28.js → index29.js} +19 -19
  296. package/dist/index29.js.map +1 -0
  297. package/dist/index290.js +4 -4
  298. package/dist/index290.js.map +1 -1
  299. package/dist/index291.js +59 -4
  300. package/dist/index291.js.map +1 -1
  301. package/dist/index292.js +34 -58
  302. package/dist/index292.js.map +1 -1
  303. package/dist/index293.js +6 -10
  304. package/dist/index293.js.map +1 -1
  305. package/dist/index294.js +18 -34
  306. package/dist/index294.js.map +1 -1
  307. package/dist/index295.js +6 -6
  308. package/dist/index295.js.map +1 -1
  309. package/dist/index296.js +2 -19
  310. package/dist/index296.js.map +1 -1
  311. package/dist/index297.js +10 -6
  312. package/dist/index297.js.map +1 -1
  313. package/dist/index298.js +47 -2
  314. package/dist/index298.js.map +1 -1
  315. package/dist/index300.js +424 -0
  316. package/dist/index300.js.map +1 -0
  317. package/dist/index301.js +42 -416
  318. package/dist/index301.js.map +1 -1
  319. package/dist/{index30.js → index31.js} +4 -4
  320. package/dist/{index30.js.map → index31.js.map} +1 -1
  321. package/dist/{index32.js → index33.js} +41 -40
  322. package/dist/index33.js.map +1 -0
  323. package/dist/{index34.js → index35.js} +23 -22
  324. package/dist/{index34.js.map → index35.js.map} +1 -1
  325. package/dist/{index36.js → index37.js} +9 -8
  326. package/dist/index37.js.map +1 -0
  327. package/dist/{index38.js → index39.js} +4 -3
  328. package/dist/index39.js.map +1 -0
  329. package/dist/index4.js +14 -40
  330. package/dist/index4.js.map +1 -1
  331. package/dist/{index40.js → index41.js} +4 -4
  332. package/dist/{index40.js.map → index41.js.map} +1 -1
  333. package/dist/{index42.js → index43.js} +34 -33
  334. package/dist/{index42.js.map → index43.js.map} +1 -1
  335. package/dist/{index44.js → index45.js} +9 -9
  336. package/dist/index45.js.map +1 -0
  337. package/dist/{index46.js → index47.js} +3 -3
  338. package/dist/{index46.js.map → index47.js.map} +1 -1
  339. package/dist/{index48.js → index49.js} +4 -4
  340. package/dist/{index48.js.map → index49.js.map} +1 -1
  341. package/dist/index5.js +38 -76
  342. package/dist/index5.js.map +1 -1
  343. package/dist/index51.js +95 -0
  344. package/dist/index51.js.map +1 -0
  345. package/dist/{index52.js → index53.js} +3 -3
  346. package/dist/{index52.js.map → index53.js.map} +1 -1
  347. package/dist/{index54.js → index55.js} +3 -3
  348. package/dist/{index54.js.map → index55.js.map} +1 -1
  349. package/dist/{index56.js → index57.js} +2 -2
  350. package/dist/{index56.js.map → index57.js.map} +1 -1
  351. package/dist/{index58.js → index59.js} +7 -6
  352. package/dist/{index58.js.map → index59.js.map} +1 -1
  353. package/dist/index6.js +78 -62
  354. package/dist/index6.js.map +1 -1
  355. package/dist/{index60.js → index61.js} +3 -3
  356. package/dist/{index60.js.map → index61.js.map} +1 -1
  357. package/dist/{index62.js → index63.js} +3 -3
  358. package/dist/{index62.js.map → index63.js.map} +1 -1
  359. package/dist/{index64.js → index65.js} +5 -5
  360. package/dist/{index64.js.map → index65.js.map} +1 -1
  361. package/dist/{index66.js → index67.js} +3 -3
  362. package/dist/{index66.js.map → index67.js.map} +1 -1
  363. package/dist/{index68.js → index69.js} +2 -2
  364. package/dist/{index68.js.map → index69.js.map} +1 -1
  365. package/dist/index7.js +60 -18
  366. package/dist/index7.js.map +1 -1
  367. package/dist/{index70.js → index71.js} +7 -7
  368. package/dist/{index70.js.map → index71.js.map} +1 -1
  369. package/dist/{index72.js → index73.js} +3 -3
  370. package/dist/{index72.js.map → index73.js.map} +1 -1
  371. package/dist/{index74.js → index75.js} +3 -3
  372. package/dist/{index74.js.map → index75.js.map} +1 -1
  373. package/dist/index77.js +37 -120
  374. package/dist/index77.js.map +1 -1
  375. package/dist/index78.js +130 -0
  376. package/dist/index78.js.map +1 -0
  377. package/dist/index8.js +19 -7
  378. package/dist/index8.js.map +1 -1
  379. package/dist/{index79.js → index80.js} +5 -5
  380. package/dist/{index79.js.map → index80.js.map} +1 -1
  381. package/dist/{index81.js → index82.js} +7 -6
  382. package/dist/{index81.js.map → index82.js.map} +1 -1
  383. package/dist/{index83.js → index84.js} +7 -7
  384. package/dist/{index83.js.map → index84.js.map} +1 -1
  385. package/dist/{index85.js → index86.js} +3 -3
  386. package/dist/{index85.js.map → index86.js.map} +1 -1
  387. package/dist/{index87.js → index88.js} +3 -3
  388. package/dist/{index87.js.map → index88.js.map} +1 -1
  389. package/dist/index9.js +7 -78
  390. package/dist/index9.js.map +1 -1
  391. package/dist/{index89.js → index90.js} +3 -3
  392. package/dist/{index89.js.map → index90.js.map} +1 -1
  393. package/dist/{index91.js → index92.js} +3 -3
  394. package/dist/{index91.js.map → index92.js.map} +1 -1
  395. package/dist/{index93.js → index94.js} +1 -1
  396. package/dist/index94.js.map +1 -0
  397. package/dist/{index95.js → index96.js} +3 -3
  398. package/dist/{index95.js.map → index96.js.map} +1 -1
  399. package/dist/{index97.js → index98.js} +3 -3
  400. package/dist/{index97.js.map → index98.js.map} +1 -1
  401. package/dist/style.css +1 -1
  402. package/package.json +1 -1
  403. package/dist/index119.js +0 -47
  404. package/dist/index119.js.map +0 -1
  405. package/dist/index161.js.map +0 -1
  406. package/dist/index163.js +0 -6
  407. package/dist/index163.js.map +0 -1
  408. package/dist/index171.js +0 -5
  409. package/dist/index171.js.map +0 -1
  410. package/dist/index18.js.map +0 -1
  411. package/dist/index185.js.map +0 -1
  412. package/dist/index187.js +0 -6
  413. package/dist/index187.js.map +0 -1
  414. package/dist/index20.js.map +0 -1
  415. package/dist/index216.js +0 -45
  416. package/dist/index216.js.map +0 -1
  417. package/dist/index22.js.map +0 -1
  418. package/dist/index233.js +0 -6
  419. package/dist/index237.js +0 -109
  420. package/dist/index237.js.map +0 -1
  421. package/dist/index259.js.map +0 -1
  422. package/dist/index262.js +0 -6
  423. package/dist/index262.js.map +0 -1
  424. package/dist/index271.js +0 -92
  425. package/dist/index271.js.map +0 -1
  426. package/dist/index28.js.map +0 -1
  427. package/dist/index299.js +0 -50
  428. package/dist/index299.js.map +0 -1
  429. package/dist/index3.js +0 -17
  430. package/dist/index3.js.map +0 -1
  431. package/dist/index302.js +0 -50
  432. package/dist/index302.js.map +0 -1
  433. package/dist/index32.js.map +0 -1
  434. package/dist/index36.js.map +0 -1
  435. package/dist/index38.js.map +0 -1
  436. package/dist/index44.js.map +0 -1
  437. package/dist/index50.js +0 -97
  438. package/dist/index50.js.map +0 -1
  439. package/dist/index76.js +0 -47
  440. package/dist/index76.js.map +0 -1
  441. package/dist/index93.js.map +0 -1
  442. package/dist/index99.js.map +0 -1
package/dist/index232.js CHANGED
@@ -1,44 +1,87 @@
1
- import { defineComponent as m, ref as p, computed as y, onMounted as b, openBlock as n, createElementBlock as a, createElementVNode as f, Fragment as k, renderList as h, unref as g, normalizeClass as v, toDisplayString as B } from "vue";
2
- import { range as C } from "./index297.js";
3
- const w = { class: "year-selector__content" }, x = ["disabled", "onClick"], o = 100, E = /* @__PURE__ */ m({
4
- __name: "BaseDatePickerYearSelector",
1
+ import { defineComponent as b, openBlock as n, createElementBlock as s, normalizeClass as r, createElementVNode as l, renderSlot as t, createTextVNode as o, toDisplayString as d, createCommentVNode as h, Fragment as c, renderList as m } from "vue";
2
+ const p = { class: "bb-cr-container__container" }, u = {
3
+ key: 0,
4
+ class: "bb-cr-container__loading-container"
5
+ }, g = {
6
+ key: 1,
7
+ class: "bb-cr-container__no-data-container"
8
+ }, _ = /* @__PURE__ */ b({
9
+ __name: "OptionsContainer",
5
10
  props: {
6
- cursor: {},
7
- disabled: { type: Boolean }
11
+ direction: {},
12
+ hasErrors: { type: Boolean },
13
+ hideLabel: { type: Boolean },
14
+ loadingText: {},
15
+ loading: { type: Boolean },
16
+ noDataText: {},
17
+ options: {}
8
18
  },
9
- emits: ["update:year"],
10
- setup(c, { emit: l }) {
11
- const i = c, d = l, r = p(), u = y(() => i.cursor.year()), s = (/* @__PURE__ */ new Date()).getFullYear() - o / 2, _ = C(s, s + o).map((e) => ({
12
- text: e,
13
- key: e,
14
- selected: e === u.value,
15
- handler: () => d("update:year", e)
16
- }));
17
- return b(() => {
18
- if (!r.value) return;
19
- const e = r.value.querySelector(".year-selector__btn--selected");
20
- e && e.scrollIntoView({ inline: "nearest", block: "center" });
21
- }), (e, D) => (n(), a("div", {
22
- ref_key: "container",
23
- ref: r,
24
- class: "bb-base-date-picker__year-selector"
19
+ setup(k) {
20
+ return (a, $) => (n(), s("span", {
21
+ ref: "container",
22
+ class: r(["bb-cr-container", {
23
+ "bb-cr-container--errors": a.hasErrors,
24
+ "bb-cr-container--horizontal": a.direction === "horizontal",
25
+ "bb-cr-container--vertical": a.direction === "vertical"
26
+ }])
25
27
  }, [
26
- f("div", w, [
27
- (n(!0), a(k, null, h(g(_), (t) => (n(), a("button", {
28
- key: t.key,
29
- class: v({
30
- "year-selector__btn": !0,
31
- "year-selector__btn--selected": t.selected
28
+ l("span", p, [
29
+ t(a.$slots, "prepend"),
30
+ !a.options.length && a.loading ? (n(), s("span", u, [
31
+ t(a.$slots, "loading", {}, () => [
32
+ o(d(a.loadingText), 1)
33
+ ])
34
+ ])) : a.options.length ? h("", !0) : (n(), s("span", g, [
35
+ t(a.$slots, "no-data", {}, () => [
36
+ o(d(a.noDataText), 1)
37
+ ])
38
+ ])),
39
+ (n(!0), s(c, null, m(a.options, (e, i) => (n(), s(c, {
40
+ key: (e == null ? void 0 : e.id) || i
41
+ }, [
42
+ t(a.$slots, "option:prepend", {
43
+ id: e.valueHash,
44
+ checked: !!e.selected,
45
+ disabled: !!e.disabled,
46
+ item: e.item,
47
+ text: e.text
32
48
  }),
33
- disabled: e.disabled,
34
- type: "button",
35
- onClick: t.handler
36
- }, B(t.text), 11, x))), 128))
49
+ l("label", {
50
+ class: r(["bb-cr-container-option", { "bb-base-radio-selected": e.selected }])
51
+ }, [
52
+ t(a.$slots, "input", {
53
+ index: i,
54
+ option: e
55
+ }),
56
+ l("span", {
57
+ class: r({
58
+ "bb-cr-container-option__text": !0,
59
+ "bb-cr-container-option__text--hidden": a.hideLabel
60
+ })
61
+ }, [
62
+ t(a.$slots, "label", {
63
+ checked: !!e.selected,
64
+ item: e.item,
65
+ text: e.text
66
+ }, () => [
67
+ o(d(e.text), 1)
68
+ ])
69
+ ], 2)
70
+ ], 2),
71
+ t(a.$slots, "option:append", {
72
+ id: e.valueHash,
73
+ checked: !!e.selected,
74
+ disabled: !!e.disabled,
75
+ item: e.item,
76
+ text: e.text
77
+ })
78
+ ], 64))), 128)),
79
+ t(a.$slots, "append")
37
80
  ])
38
- ], 512));
81
+ ], 2));
39
82
  }
40
83
  });
41
84
  export {
42
- E as default
85
+ _ as default
43
86
  };
44
87
  //# sourceMappingURL=index232.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index232.js","sources":["../src/components/BaseDatePicker/BaseDatePickerYearSelector.vue"],"sourcesContent":["<template>\n\t<div ref=\"container\" class=\"bb-base-date-picker__year-selector\">\n\t\t<div class=\"year-selector__content\">\n\t\t\t<button\n\t\t\t\tv-for=\"option in options\"\n\t\t\t\t:key=\"option.key\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'year-selector__btn': true,\n\t\t\t\t\t'year-selector__btn--selected': option.selected,\n\t\t\t\t}\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t@click=\"option.handler\"\n\t\t\t>\n\t\t\t\t{{ option.text }}\n\t\t\t</button>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Dayjs } from 'dayjs';\nimport { computed, onMounted } from 'vue';\nimport { range } from '@/utilities/functions/range';\nimport { ref } from 'vue';\n\ntype Props = {\n\tcursor: Dayjs;\n\tdisabled: boolean;\n};\nconst props = defineProps<Props>();\nconst emit = defineEmits<{\n\t(event: 'update:year', value: number): void;\n}>();\n\nconst container = ref<HTMLElement>();\n\nconst year = computed(() => props.cursor.year());\n\nconst howMany = 100;\nconst startingYear = new Date().getFullYear() - howMany / 2;\n\nconst options = range(startingYear, startingYear + howMany).map((y) => {\n\treturn {\n\t\ttext: y,\n\t\tkey: y,\n\t\tselected: y === year.value,\n\t\thandler: () => emit('update:year', y),\n\t};\n});\nonMounted(() => {\n\tif (!container.value) return;\n\tconst el = container.value.querySelector('.year-selector__btn--selected');\n\tif (!el) return;\n\tel.scrollIntoView({ inline: 'nearest', block: 'center' });\n});\n</script>\n"],"names":["howMany","props","__props","emit","__emit","container","ref","year","computed","startingYear","options","range","y","onMounted","el"],"mappings":";;4EAuCMA,IAAU;;;;;;;;AAThB,UAAMC,IAAQC,GACRC,IAAOC,GAIPC,IAAYC,KAEZC,IAAOC,EAAS,MAAMP,EAAM,OAAO,MAAM,GAGzCQ,KAAmB,oBAAA,KAAA,GAAO,gBAAgBT,IAAU,GAEpDU,IAAUC,EAAMF,GAAcA,IAAeT,CAAO,EAAE,IAAI,CAACY,OACzD;AAAA,MACN,MAAMA;AAAA,MACN,KAAKA;AAAA,MACL,UAAUA,MAAML,EAAK;AAAA,MACrB,SAAS,MAAMJ,EAAK,eAAeS,CAAC;AAAA,IAAA,EAErC;AACD,WAAAC,EAAU,MAAM;AACX,UAAA,CAACR,EAAU,MAAO;AACtB,YAAMS,IAAKT,EAAU,MAAM,cAAc,+BAA+B;AACxE,MAAKS,KACLA,EAAG,eAAe,EAAE,QAAQ,WAAW,OAAO,UAAU;AAAA,IAAA,CACxD;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index232.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index234.js CHANGED
@@ -1,5 +1,5 @@
1
- const o = (e) => e[0];
1
+ import f from "./index287.js";
2
2
  export {
3
- o as head
3
+ f as default
4
4
  };
5
5
  //# sourceMappingURL=index234.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index234.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0];\n"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
1
+ {"version":3,"file":"index234.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index235.js CHANGED
@@ -1,6 +1,21 @@
1
- import o from "./index287.js";
2
- /* empty css */
1
+ import { isNil as c } from "./index125.js";
2
+ const a = (t, r) => {
3
+ if (!Object.prototype.hasOwnProperty.call(t, r))
4
+ throw new Error(
5
+ `Object ${JSON.stringify(t, null, 2)} has no property named "${r.toString()}"`
6
+ );
7
+ }, l = (t) => typeof t == "string" ? t.toLocaleLowerCase() : JSON.stringify(t).toLowerCase(), y = (t, r, s) => {
8
+ const i = s.toLocaleLowerCase();
9
+ for (let e = 0; e < r.length; e++) {
10
+ const n = r[e];
11
+ a(t, n);
12
+ const o = t[n];
13
+ if (c(o)) continue;
14
+ if (l(o).includes(i)) return !0;
15
+ }
16
+ return !1;
17
+ };
3
18
  export {
4
- o as default
19
+ y as matchAnyKey
5
20
  };
6
21
  //# sourceMappingURL=index235.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index235.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index235.js","sources":["../src/utilities/functions/matchAnyKey.ts"],"sourcesContent":["import { isNil } from './isNil';\n\nconst ensureKeyExists = <T extends object>(item: T, key: keyof T) => {\n\tif (!Object.prototype.hasOwnProperty.call(item, key)) {\n\t\tthrow new Error(\n\t\t\t`Object ${JSON.stringify(item, null, 2)} has no property named \"${key.toString()}\"`\n\t\t);\n\t}\n};\nconst asString = (value: any) => {\n\tif (typeof value === 'string') return value.toLocaleLowerCase();\n\treturn JSON.stringify(value).toLowerCase();\n};\n\n/**\n * Return true or false based on whether the query is included in the passed keys\n * @param item The object to test\n * @param keys The keys to be tested as haystack\n * @param query The query to searched as needle\n * @returns boolean\n */\nexport const matchAnyKey = <T extends object>(\n\titem: T,\n\tkeys: (keyof T)[],\n\tquery: string\n) => {\n\tconst lcQuery = query.toLocaleLowerCase();\n\tfor (let index = 0; index < keys.length; index++) {\n\t\tconst key = keys[index];\n\t\tensureKeyExists(item, key);\n\t\tconst value = item[key];\n\t\tif (isNil(value)) continue;\n\t\tconst valueAsString = asString(value);\n\t\tif (valueAsString.includes(lcQuery)) return true;\n\t}\n\treturn false;\n};\n"],"names":["ensureKeyExists","item","key","asString","value","matchAnyKey","keys","query","lcQuery","index","isNil"],"mappings":";AAEA,MAAMA,IAAkB,CAAmBC,GAASC,MAAiB;AACpE,MAAI,CAAC,OAAO,UAAU,eAAe,KAAKD,GAAMC,CAAG;AAClD,UAAM,IAAI;AAAA,MACT,UAAU,KAAK,UAAUD,GAAM,MAAM,CAAC,CAAC,2BAA2BC,EAAI,SAAA,CAAU;AAAA,IAAA;AAGnF,GACMC,IAAW,CAACC,MACb,OAAOA,KAAU,WAAiBA,EAAM,kBAAkB,IACvD,KAAK,UAAUA,CAAK,EAAE,YAAY,GAU7BC,IAAc,CAC1BJ,GACAK,GACAC,MACI;AACE,QAAAC,IAAUD,EAAM;AACtB,WAASE,IAAQ,GAAGA,IAAQH,EAAK,QAAQG,KAAS;AAC3C,UAAAP,IAAMI,EAAKG,CAAK;AACtB,IAAAT,EAAgBC,GAAMC,CAAG;AACnB,UAAAE,IAAQH,EAAKC,CAAG;AAClB,QAAAQ,EAAMN,CAAK,EAAG;AAElB,QADsBD,EAASC,CAAK,EAClB,SAASI,CAAO,EAAU,QAAA;AAAA,EAC7C;AACO,SAAA;AACR;"}
package/dist/index236.js CHANGED
@@ -1,21 +1,109 @@
1
- import { isNil as c } from "./index124.js";
2
- const a = (t, r) => {
3
- if (!Object.prototype.hasOwnProperty.call(t, r))
4
- throw new Error(
5
- `Object ${JSON.stringify(t, null, 2)} has no property named "${r.toString()}"`
6
- );
7
- }, l = (t) => typeof t == "string" ? t.toLocaleLowerCase() : JSON.stringify(t).toLowerCase(), y = (t, r, s) => {
8
- const i = s.toLocaleLowerCase();
9
- for (let e = 0; e < r.length; e++) {
10
- const n = r[e];
11
- a(t, n);
12
- const o = t[n];
13
- if (c(o)) continue;
14
- if (l(o).includes(i)) return !0;
1
+ import { defineComponent as y, ref as F, computed as H, watch as N, openBlock as p, createElementBlock as L, Fragment as S, renderList as V, createBlock as A, normalizeClass as O, withModifiers as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
2
+ import { hash as d } from "./index222.js";
3
+ import { isNil as l } from "./index125.js";
4
+ import E from "./index120.js";
5
+ /* empty css */
6
+ const K = /* @__PURE__ */ y({
7
+ __name: "ChipsBox",
8
+ props: {
9
+ options: {}
10
+ },
11
+ emits: ["option:unselected"],
12
+ setup(f, { expose: v, emit: h }) {
13
+ const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
14
+ const s = l(n.value) ? -1 : n.value;
15
+ let o = (s + e) % t.options.length;
16
+ for (; t.options[o].disabled && o !== s; )
17
+ o = a(e + 1);
18
+ return o;
19
+ }, x = () => {
20
+ if (!i.value) return;
21
+ const e = a();
22
+ n.value = e;
23
+ }, c = (e = 1) => {
24
+ const s = l(n.value) ? 0 : n.value;
25
+ let o = (s - e + t.options.length) % t.options.length;
26
+ for (; t.options[o].disabled && o !== s; )
27
+ o = c(e + 1);
28
+ return o;
29
+ }, m = async () => {
30
+ if (!i.value) return;
31
+ const e = c();
32
+ n.value = e;
33
+ }, w = () => {
34
+ if (!i.value) return;
35
+ let e = 0;
36
+ for (; t.options[e].disabled; )
37
+ e++;
38
+ n.value = e;
39
+ }, b = () => {
40
+ if (!i.value) return;
41
+ let e = t.options.length - 1;
42
+ for (; t.options[e].disabled && e !== 0; )
43
+ e--;
44
+ n.value = e;
45
+ }, I = () => {
46
+ if (!i.value) return;
47
+ let e = 0;
48
+ for (; !t.options[e].selected && t.options.length !== e; )
49
+ e++;
50
+ n.value = e;
51
+ }, g = () => {
52
+ if (!i.value) return;
53
+ let e = t.options.length - 1;
54
+ for (; t.options[e].selected && e !== 0; )
55
+ e--;
56
+ n.value = e;
57
+ }, _ = (e) => {
58
+ if (!i.value) return;
59
+ const s = t.options.findIndex(
60
+ (o) => o.valueHash === e
61
+ );
62
+ s >= 0 && (n.value = s);
63
+ }, r = () => {
64
+ n.value = null;
65
+ }, k = () => {
66
+ if (l(n.value)) return;
67
+ const e = t.options[n.value];
68
+ e.selected && u("option:unselected", e);
69
+ }, C = () => l(n.value) ? void 0 : t.options[n.value];
70
+ return N(
71
+ () => t.options,
72
+ (e, s) => {
73
+ d(e) !== d(s) && r();
74
+ },
75
+ {
76
+ flush: "post"
77
+ }
78
+ ), v({
79
+ focusNext: x,
80
+ focusPrevious: m,
81
+ focusFirst: w,
82
+ focusFirstSelected: I,
83
+ focusLast: b,
84
+ focusLastSelected: g,
85
+ blur: r,
86
+ confirmOption: k,
87
+ focusByHash: _,
88
+ getHighlighted: C
89
+ }), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
90
+ key: o.valueHash,
91
+ class: O({
92
+ "bb-chipsbox-item": !0,
93
+ "bb-chipsbox-item--focused": B === n.value
94
+ }),
95
+ clearable: !0,
96
+ text: o.text,
97
+ "onClick:clear": P((M) => u("option:unselected", o), ["stop"])
98
+ }, {
99
+ default: $(() => [
100
+ z(D(o.text), 1)
101
+ ]),
102
+ _: 2
103
+ }, 1032, ["class", "text", "onClick:clear"]))), 128));
15
104
  }
16
- return !1;
17
- };
105
+ });
18
106
  export {
19
- y as matchAnyKey
107
+ K as default
20
108
  };
21
109
  //# sourceMappingURL=index236.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index236.js","sources":["../src/utilities/functions/matchAnyKey.ts"],"sourcesContent":["import { isNil } from './isNil';\n\nconst ensureKeyExists = <T extends object>(item: T, key: keyof T) => {\n\tif (!Object.prototype.hasOwnProperty.call(item, key)) {\n\t\tthrow new Error(\n\t\t\t`Object ${JSON.stringify(item, null, 2)} has no property named \"${key.toString()}\"`\n\t\t);\n\t}\n};\nconst asString = (value: any) => {\n\tif (typeof value === 'string') return value.toLocaleLowerCase();\n\treturn JSON.stringify(value).toLowerCase();\n};\n\n/**\n * Return true or false based on whether the query is included in the passed keys\n * @param item The object to test\n * @param keys The keys to be tested as haystack\n * @param query The query to searched as needle\n * @returns boolean\n */\nexport const matchAnyKey = <T extends object>(\n\titem: T,\n\tkeys: (keyof T)[],\n\tquery: string\n) => {\n\tconst lcQuery = query.toLocaleLowerCase();\n\tfor (let index = 0; index < keys.length; index++) {\n\t\tconst key = keys[index];\n\t\tensureKeyExists(item, key);\n\t\tconst value = item[key];\n\t\tif (isNil(value)) continue;\n\t\tconst valueAsString = asString(value);\n\t\tif (valueAsString.includes(lcQuery)) return true;\n\t}\n\treturn false;\n};\n"],"names":["ensureKeyExists","item","key","asString","value","matchAnyKey","keys","query","lcQuery","index","isNil"],"mappings":";AAEA,MAAMA,IAAkB,CAAmBC,GAASC,MAAiB;AACpE,MAAI,CAAC,OAAO,UAAU,eAAe,KAAKD,GAAMC,CAAG;AAClD,UAAM,IAAI;AAAA,MACT,UAAU,KAAK,UAAUD,GAAM,MAAM,CAAC,CAAC,2BAA2BC,EAAI,SAAA,CAAU;AAAA,IAAA;AAGnF,GACMC,IAAW,CAACC,MACb,OAAOA,KAAU,WAAiBA,EAAM,kBAAkB,IACvD,KAAK,UAAUA,CAAK,EAAE,YAAY,GAU7BC,IAAc,CAC1BJ,GACAK,GACAC,MACI;AACE,QAAAC,IAAUD,EAAM;AACtB,WAASE,IAAQ,GAAGA,IAAQH,EAAK,QAAQG,KAAS;AAC3C,UAAAP,IAAMI,EAAKG,CAAK;AACtB,IAAAT,EAAgBC,GAAMC,CAAG;AACnB,UAAAE,IAAQH,EAAKC,CAAG;AAClB,QAAAQ,EAAMN,CAAK,EAAG;AAElB,QADsBD,EAASC,CAAK,EAClB,SAASI,CAAO,EAAU,QAAA;AAAA,EAC7C;AACO,SAAA;AACR;"}
1
+ {"version":3,"file":"index236.js","sources":["../src/components/ChipsBox.vue"],"sourcesContent":["<template>\n\t<BbChip\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-chipsbox-item': true,\n\t\t\t'bb-chipsbox-item--focused': index === focusedIndex,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</BbChip\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport BbChip from './BbChip/BbChip.vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/ChipsBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption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AAE;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAE;AAAA,MACA,WAAAD;AAAA,MACA,mBAAAE;AAAA,MACA,MAAAI;AAAA,MACA,eAAAC;AAAA,MACA,aAAAJ;AAAA,MACA,gBAAAM;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as F, ref as H, computed as L, watch as N, openBlock as d, createElementBlock as v, Fragment as S, renderList as A, normalizeClass as O, withModifiers as P, toDisplayString as V } from "vue";
2
- import { hash as f } from "./index226.js";
3
- import { isNil as i } from "./index124.js";
2
+ import { hash as f } from "./index222.js";
3
+ import { isNil as i } from "./index125.js";
4
4
  const z = ["text", "onClick:clear"], j = /* @__PURE__ */ F({
5
5
  __name: "CommaBox",
6
6
  props: {
@@ -100,4 +100,4 @@ const z = ["text", "onClick:clear"], j = /* @__PURE__ */ F({
100
100
  export {
101
101
  j as default
102
102
  };
103
- //# sourceMappingURL=index239.js.map
103
+ //# sourceMappingURL=index238.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index239.js","sources":["../src/components/CommaBox.vue"],"sourcesContent":["<template>\n\t<span\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-commabox-item': true,\n\t\t\t'bb-commabox-item--focused': index === focusedIndex,\n\t\t\t'bb-commabox-item--has-comma': index !== options.length - 1,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</span\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (!focusedIndex.value) return;\n\tconst option = props.options[focusedIndex.value];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/CommaBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;AA2BA,UAAMA,IAAQC,GAERC,IAAOC,GAQPC,IAAeC,EAAmB,IAAI,GAEtCC,IAAWC,EAAS,MAAMP,EAAM,QAAQ,KAAK,CAACQ,MAAM,CAACA,EAAE,QAAQ,CAAC,GAEhEC,IAAyB,CAACC,IAAS,MAAM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ourcesContent":["<template>\n\t<span\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-commabox-item': true,\n\t\t\t'bb-commabox-item--focused': index === focusedIndex,\n\t\t\t'bb-commabox-item--has-comma': index !== options.length - 1,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</span\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (!focusedIndex.value) return;\n\tconst option = props.options[focusedIndex.value];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/CommaBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;AA2BA,UAAMA,IAAQC,GAERC,IAAOC,GAQPC,IAAeC,EAAmB,IAAI,GAEtCC,IAAWC,EAAS,MAAMP,EAAM,QAAQ,KAAK,CAACQ,MAAM,CAACA,EAAE,QAAQ,CAAC,GAEhEC,IAAyB,CAACC,IAAS,MAAM;AAC9C,YAAMC,IAAeC,EAAMR,EAAa,KAAK,IAAI,KAAKA,EAAa;AACnE,UAAIS,KAAYF,IAAeD,KAAUV,EAAM,QAAQ;AACvD,aAAOA,EAAM,QAAQa,CAAQ,EAAE,YAAYA,MAAaF;AAC5C,QAAAE,IAAAJ,EAAuBC,IAAS,CAAC;AAEtC,aAAAG;AAAA,IAAA,GAGFC,IAAY,MAAM;AACnB,UAAA,CAACR,EAAS,MAAO;AACrB,YAAMO,IAAWJ;AACjB,MAAAL,EAAa,QAAQS;AAAA,IAAA,GAEhBE,IAA6B,CAACL,IAAS,MAAM;AAClD,YAAMC,IAAeC,EAAMR,EAAa,KAAK,IAAI,IAAIA,EAAa;AAClE,UAAIS,KACFF,IAAeD,IAASV,EAAM,QAAQ,UAAUA,EAAM,QAAQ;AAChE,aAAOA,EAAM,QAAQa,CAAQ,EAAE,YAAYA,MAAaF;AAC5C,QAAAE,IAAAE,EAA2BL,IAAS,CAAC;AAE1C,aAAAG;AAAA,IAAA,GAEFG,IAAgB,YAAY;AAC7B,UAAA,CAACV,EAAS,MAAO;AACrB,YAAMO,IAA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MAClBf,EAAMR,EAAa,KAAK,IAAG,SAChBJ,EAAM,QAAQI,EAAa,KAAM;AAIjD,WAAAwB;AAAA,MACC,MAAM5B,EAAM;AAAA,MACZ,CAAC6B,GAAOC,MAAa;AACpB,QAAIR,EAAKO,CAAK,MAAMP,EAAKQ,CAAQ,KAC3BN;MAEP;AAAA,MACA;AAAA,QACC,OAAO;AAAA,MACR;AAAA,IAAA,GAGYO,EAAA;AAAA,MACZ,WAAAjB;AAAA,MACA,eAAAE;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAE;AAAA,MACA,WAAAD;AAAA,MACA,mBAAAE;AAAA,MACA,MAAAI;AAAA,MACA,eAAAC;AAAA,MACA,aAAAJ;AAAA,MACA,gBAAAM;AAAA,IAAA,CACA;;;;;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ const o = (e) => e[0];
2
+ export {
3
+ o as head
4
+ };
5
+ //# sourceMappingURL=index240.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index240.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0];\n"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
package/dist/index244.js CHANGED
@@ -1,6 +1,6 @@
1
- import e from "./index290.js";
2
- import r from "./index291.js";
3
- import o from "./index292.js";
1
+ import e from "./index289.js";
2
+ import r from "./index290.js";
3
+ import o from "./index291.js";
4
4
  const f = new o(r, e)._freeze();
5
5
  export {
6
6
  o as Mime,
package/dist/index248.js CHANGED
@@ -1,6 +1,12 @@
1
- import o from "./index199.js";
2
- /* empty css */
1
+ function u(e, i) {
2
+ let t;
3
+ return function(...o) {
4
+ t !== void 0 && clearTimeout(t), t = setTimeout(() => {
5
+ e.apply(this, o);
6
+ }, i);
7
+ };
8
+ }
3
9
  export {
4
- o as default
10
+ u as debounce
5
11
  };
6
12
  //# sourceMappingURL=index248.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index248.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index248.js","sources":["../src/utilities/functions/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => any>(\n\tfunc: T,\n\twait: number\n): (...args: Parameters<T>) => void {\n\tlet timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n\treturn function (this: any, ...args: Parameters<T>) {\n\t\tif (timeoutId !== undefined) {\n\t\t\tclearTimeout(timeoutId);\n\t\t}\n\n\t\ttimeoutId = setTimeout(() => {\n\t\t\tfunc.apply(this, args);\n\t\t}, wait);\n\t};\n}\n"],"names":["debounce","func","wait","timeoutId","args"],"mappings":"AAAgB,SAAAA,EACfC,GACAC,GACmC;AAC/B,MAAAC;AAEJ,SAAO,YAAwBC,GAAqB;AACnD,IAAID,MAAc,UACjB,aAAaA,CAAS,GAGvBA,IAAY,WAAW,MAAM;AACvB,MAAAF,EAAA,MAAM,MAAMG,CAAI;AAAA,OACnBF,CAAI;AAAA,EAAA;AAET;"}