bitboss-ui 2.0.23 → 2.0.24

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 (487) hide show
  1. package/dist/index.js +138 -140
  2. package/dist/index10.js +78 -8
  3. package/dist/{index101.js → index100.js} +2 -3
  4. package/dist/{index103.js → index102.js} +2 -3
  5. package/dist/index104.js +289 -0
  6. package/dist/{index107.js → index106.js} +9 -10
  7. package/dist/{index109.js → index108.js} +2 -3
  8. package/dist/index11.js +35 -75
  9. package/dist/{index111.js → index110.js} +2 -3
  10. package/dist/{index113.js → index112.js} +2 -3
  11. package/dist/{index115.js → index114.js} +2 -3
  12. package/dist/{index117.js → index116.js} +6 -7
  13. package/dist/{index119.js → index118.js} +1 -2
  14. package/dist/index12.js +189 -37
  15. package/dist/index120.js +42 -0
  16. package/dist/index121.js +38 -35
  17. package/dist/index122.js +38 -39
  18. package/dist/index123.js +42 -40
  19. package/dist/index124.js +31 -44
  20. package/dist/index125.js +2 -36
  21. package/dist/index126.js +21 -3
  22. package/dist/index127.js +2 -22
  23. package/dist/index128.js +312 -3
  24. package/dist/index129.js +21 -310
  25. package/dist/index13.js +78 -190
  26. package/dist/index130.js +2 -25
  27. package/dist/index131.js +5 -3
  28. package/dist/index132.js +9 -6
  29. package/dist/index133.js +5 -9
  30. package/dist/index134.js +3 -7
  31. package/dist/index135.js +1 -2
  32. package/dist/index136.js +1 -2
  33. package/dist/index137.js +1 -2
  34. package/dist/index138.js +1 -2
  35. package/dist/index139.js +1 -2
  36. package/dist/index140.js +1 -2
  37. package/dist/index141.js +1 -2
  38. package/dist/index142.js +1 -2
  39. package/dist/index143.js +1 -2
  40. package/dist/index144.js +1 -2
  41. package/dist/index145.js +1 -2
  42. package/dist/index146.js +1 -2
  43. package/dist/index147.js +1 -2
  44. package/dist/index148.js +1 -2
  45. package/dist/index149.js +1 -2
  46. package/dist/{index16.js → index15.js} +3 -4
  47. package/dist/index150.js +1 -2
  48. package/dist/index151.js +1 -2
  49. package/dist/index152.js +1 -2
  50. package/dist/index153.js +1 -2
  51. package/dist/index154.js +1 -2
  52. package/dist/index155.js +1 -2
  53. package/dist/index156.js +1 -2
  54. package/dist/index157.js +1 -2
  55. package/dist/index158.js +1 -2
  56. package/dist/index159.js +1 -2
  57. package/dist/index160.js +2 -3
  58. package/dist/{index161.js → index162.js} +0 -1
  59. package/dist/index164.js +5 -0
  60. package/dist/index165.js +1 -2
  61. package/dist/index166.js +1 -2
  62. package/dist/index167.js +1 -2
  63. package/dist/index168.js +1 -2
  64. package/dist/index169.js +1 -2
  65. package/dist/{index18.js → index17.js} +3 -4
  66. package/dist/index170.js +2 -3
  67. package/dist/index172.js +4 -0
  68. package/dist/index173.js +3 -3
  69. package/dist/index174.js +1 -2
  70. package/dist/index175.js +1 -2
  71. package/dist/index176.js +1 -2
  72. package/dist/index177.js +1 -2
  73. package/dist/index178.js +1 -2
  74. package/dist/index179.js +1 -2
  75. package/dist/index180.js +1 -2
  76. package/dist/index181.js +1 -2
  77. package/dist/index182.js +1 -2
  78. package/dist/index183.js +1 -2
  79. package/dist/index184.js +1 -2
  80. package/dist/{index185.js → index186.js} +0 -1
  81. package/dist/index188.js +5 -0
  82. package/dist/index189.js +1 -2
  83. package/dist/{index20.js → index19.js} +17 -19
  84. package/dist/index190.js +1 -2
  85. package/dist/index191.js +1 -2
  86. package/dist/index192.js +1 -2
  87. package/dist/index193.js +1 -2
  88. package/dist/index194.js +1 -2
  89. package/dist/index195.js +1 -2
  90. package/dist/index196.js +1 -2
  91. package/dist/index197.js +1 -2
  92. package/dist/index198.js +2 -4
  93. package/dist/index199.js +81 -3
  94. package/dist/index200.js +7 -81
  95. package/dist/index201.js +3 -45
  96. package/dist/index202.js +4 -0
  97. package/dist/index203.js +4 -14
  98. package/dist/index204.js +2 -4
  99. package/dist/index205.js +1 -2
  100. package/dist/index206.js +3 -4
  101. package/dist/index207.js +0 -1
  102. package/dist/index208.js +0 -1
  103. package/dist/index209.js +41 -7
  104. package/dist/{index22.js → index21.js} +18 -19
  105. package/dist/index211.js +13 -6
  106. package/dist/index212.js +122 -120
  107. package/dist/index213.js +5 -20
  108. package/dist/index214.js +120 -14
  109. package/dist/index215.js +18 -16
  110. package/dist/index216.js +16 -3
  111. package/dist/index217.js +16 -3
  112. package/dist/index218.js +2 -175
  113. package/dist/index219.js +2 -6
  114. package/dist/index220.js +158 -354
  115. package/dist/index221.js +5 -20
  116. package/dist/index222.js +367 -26
  117. package/dist/index223.js +158 -4
  118. package/dist/index224.js +77 -243
  119. package/dist/index226.js +19 -45
  120. package/dist/index227.js +27 -6
  121. package/dist/index228.js +3 -50
  122. package/dist/index229.js +245 -155
  123. package/dist/{index24.js → index23.js} +3 -4
  124. package/dist/index230.js +45 -78
  125. package/dist/index231.js +46 -0
  126. package/dist/index232.js +5 -3
  127. package/dist/index233.js +49 -5
  128. package/dist/index234.js +2 -3
  129. package/dist/index235.js +106 -3
  130. package/dist/index237.js +47 -54
  131. package/dist/index239.js +2 -101
  132. package/dist/{index236.js → index240.js} +1 -2
  133. package/dist/index241.js +10 -3
  134. package/dist/index242.js +2 -10
  135. package/dist/index243.js +224 -4
  136. package/dist/index244.js +4 -4
  137. package/dist/index245.js +429 -8
  138. package/dist/index246.js +89 -24
  139. package/dist/index247.js +3 -10
  140. package/dist/index249.js +7 -17
  141. package/dist/{index26.js → index25.js} +5 -6
  142. package/dist/index250.js +200 -225
  143. package/dist/index251.js +1 -2
  144. package/dist/index252.js +11 -0
  145. package/dist/index253.js +23 -8
  146. package/dist/index254.js +277 -428
  147. package/dist/index255.js +5 -89
  148. package/dist/index256.js +2 -282
  149. package/dist/index257.js +2 -7
  150. package/dist/index258.js +2 -3
  151. package/dist/index259.js +2 -3
  152. package/dist/index260.js +0 -1
  153. package/dist/index261.js +126 -3
  154. package/dist/index262.js +22 -3
  155. package/dist/index264.js +9 -23
  156. package/dist/{index248.js → index265.js} +0 -1
  157. package/dist/index266.js +15 -200
  158. package/dist/index267.js +436 -3
  159. package/dist/index268.js +127 -3
  160. package/dist/index269.js +3 -3
  161. package/dist/{index28.js → index27.js} +3 -4
  162. package/dist/index270.js +12 -3
  163. package/dist/index271.js +9 -3
  164. package/dist/index272.js +9 -3
  165. package/dist/index273.js +14 -26
  166. package/dist/index274.js +2 -23
  167. package/dist/{index307.js → index275.js} +0 -1
  168. package/dist/index276.js +2 -437
  169. package/dist/index277.js +2 -128
  170. package/dist/index278.js +2 -3
  171. package/dist/index279.js +2 -10
  172. package/dist/index280.js +28 -4
  173. package/dist/index281.js +22 -13
  174. package/dist/index283.js +3 -18
  175. package/dist/index284.js +2 -66
  176. package/dist/index285.js +211 -6
  177. package/dist/index286.js +2 -5
  178. package/dist/index287.js +65 -3
  179. package/dist/index288.js +5 -4
  180. package/dist/index289.js +35 -212
  181. package/dist/{index30.js → index29.js} +2 -3
  182. package/dist/index290.js +0 -1
  183. package/dist/index291.js +2 -3
  184. package/dist/index293.js +0 -1
  185. package/dist/index294.js +0 -1
  186. package/dist/index295.js +0 -1
  187. package/dist/index296.js +6 -35
  188. package/dist/index297.js +7 -3
  189. package/dist/index298.js +18 -11
  190. package/dist/index299.js +46 -7
  191. package/dist/index300.js +10 -7
  192. package/dist/index301.js +2 -20
  193. package/dist/index303.js +2 -3
  194. package/dist/index304.js +423 -0
  195. package/dist/index305.js +42 -417
  196. package/dist/index306.js +2 -48
  197. package/dist/{index32.js → index31.js} +3 -4
  198. package/dist/{index34.js → index33.js} +4 -5
  199. package/dist/{index36.js → index35.js} +20 -22
  200. package/dist/{index38.js → index37.js} +7 -8
  201. package/dist/{index40.js → index39.js} +2 -3
  202. package/dist/index4.js +16 -0
  203. package/dist/{index42.js → index41.js} +3 -4
  204. package/dist/{index44.js → index43.js} +10 -12
  205. package/dist/{index46.js → index45.js} +3 -4
  206. package/dist/{index48.js → index47.js} +2 -3
  207. package/dist/{index50.js → index49.js} +3 -4
  208. package/dist/index5.js +40 -15
  209. package/dist/{index52.js → index51.js} +2 -3
  210. package/dist/{index54.js → index53.js} +2 -3
  211. package/dist/{index56.js → index55.js} +2 -3
  212. package/dist/{index58.js → index57.js} +1 -2
  213. package/dist/{index60.js → index59.js} +7 -9
  214. package/dist/index6.js +76 -39
  215. package/dist/{index62.js → index61.js} +2 -3
  216. package/dist/{index64.js → index63.js} +2 -3
  217. package/dist/{index66.js → index65.js} +4 -5
  218. package/dist/{index68.js → index67.js} +2 -3
  219. package/dist/{index70.js → index69.js} +1 -2
  220. package/dist/index7.js +62 -79
  221. package/dist/{index72.js → index71.js} +7 -8
  222. package/dist/{index74.js → index73.js} +15 -17
  223. package/dist/{index76.js → index75.js} +4 -5
  224. package/dist/index77.js +46 -0
  225. package/dist/index78.js +120 -38
  226. package/dist/index8.js +18 -61
  227. package/dist/{index81.js → index80.js} +2 -3
  228. package/dist/{index83.js → index82.js} +4 -6
  229. package/dist/{index85.js → index84.js} +4 -5
  230. package/dist/{index87.js → index86.js} +2 -3
  231. package/dist/{index89.js → index88.js} +2 -3
  232. package/dist/index9.js +7 -20
  233. package/dist/{index91.js → index90.js} +2 -3
  234. package/dist/{index93.js → index92.js} +2 -3
  235. package/dist/{index95.js → index94.js} +0 -1
  236. package/dist/{index97.js → index96.js} +2 -3
  237. package/dist/{index99.js → index98.js} +2 -3
  238. package/dist/style.css +1 -1
  239. package/package.json +2 -2
  240. package/dist/index.js.map +0 -1
  241. package/dist/index10.js.map +0 -1
  242. package/dist/index101.js.map +0 -1
  243. package/dist/index103.js.map +0 -1
  244. package/dist/index105.js +0 -273
  245. package/dist/index105.js.map +0 -1
  246. package/dist/index107.js.map +0 -1
  247. package/dist/index109.js.map +0 -1
  248. package/dist/index11.js.map +0 -1
  249. package/dist/index111.js.map +0 -1
  250. package/dist/index113.js.map +0 -1
  251. package/dist/index115.js.map +0 -1
  252. package/dist/index117.js.map +0 -1
  253. package/dist/index119.js.map +0 -1
  254. package/dist/index12.js.map +0 -1
  255. package/dist/index121.js.map +0 -1
  256. package/dist/index122.js.map +0 -1
  257. package/dist/index123.js.map +0 -1
  258. package/dist/index124.js.map +0 -1
  259. package/dist/index125.js.map +0 -1
  260. package/dist/index126.js.map +0 -1
  261. package/dist/index127.js.map +0 -1
  262. package/dist/index128.js.map +0 -1
  263. package/dist/index129.js.map +0 -1
  264. package/dist/index13.js.map +0 -1
  265. package/dist/index130.js.map +0 -1
  266. package/dist/index131.js.map +0 -1
  267. package/dist/index132.js.map +0 -1
  268. package/dist/index133.js.map +0 -1
  269. package/dist/index134.js.map +0 -1
  270. package/dist/index135.js.map +0 -1
  271. package/dist/index136.js.map +0 -1
  272. package/dist/index137.js.map +0 -1
  273. package/dist/index138.js.map +0 -1
  274. package/dist/index139.js.map +0 -1
  275. package/dist/index14.js +0 -85
  276. package/dist/index14.js.map +0 -1
  277. package/dist/index140.js.map +0 -1
  278. package/dist/index141.js.map +0 -1
  279. package/dist/index142.js.map +0 -1
  280. package/dist/index143.js.map +0 -1
  281. package/dist/index144.js.map +0 -1
  282. package/dist/index145.js.map +0 -1
  283. package/dist/index146.js.map +0 -1
  284. package/dist/index147.js.map +0 -1
  285. package/dist/index148.js.map +0 -1
  286. package/dist/index149.js.map +0 -1
  287. package/dist/index150.js.map +0 -1
  288. package/dist/index151.js.map +0 -1
  289. package/dist/index152.js.map +0 -1
  290. package/dist/index153.js.map +0 -1
  291. package/dist/index154.js.map +0 -1
  292. package/dist/index155.js.map +0 -1
  293. package/dist/index156.js.map +0 -1
  294. package/dist/index157.js.map +0 -1
  295. package/dist/index158.js.map +0 -1
  296. package/dist/index159.js.map +0 -1
  297. package/dist/index16.js.map +0 -1
  298. package/dist/index160.js.map +0 -1
  299. package/dist/index161.js.map +0 -1
  300. package/dist/index163.js +0 -6
  301. package/dist/index163.js.map +0 -1
  302. package/dist/index165.js.map +0 -1
  303. package/dist/index166.js.map +0 -1
  304. package/dist/index167.js.map +0 -1
  305. package/dist/index168.js.map +0 -1
  306. package/dist/index169.js.map +0 -1
  307. package/dist/index170.js.map +0 -1
  308. package/dist/index171.js +0 -6
  309. package/dist/index171.js.map +0 -1
  310. package/dist/index173.js.map +0 -1
  311. package/dist/index174.js.map +0 -1
  312. package/dist/index175.js.map +0 -1
  313. package/dist/index176.js.map +0 -1
  314. package/dist/index177.js.map +0 -1
  315. package/dist/index178.js.map +0 -1
  316. package/dist/index179.js.map +0 -1
  317. package/dist/index18.js.map +0 -1
  318. package/dist/index180.js.map +0 -1
  319. package/dist/index181.js.map +0 -1
  320. package/dist/index182.js.map +0 -1
  321. package/dist/index183.js.map +0 -1
  322. package/dist/index184.js.map +0 -1
  323. package/dist/index185.js.map +0 -1
  324. package/dist/index187.js +0 -6
  325. package/dist/index187.js.map +0 -1
  326. package/dist/index189.js.map +0 -1
  327. package/dist/index190.js.map +0 -1
  328. package/dist/index191.js.map +0 -1
  329. package/dist/index192.js.map +0 -1
  330. package/dist/index193.js.map +0 -1
  331. package/dist/index194.js.map +0 -1
  332. package/dist/index195.js.map +0 -1
  333. package/dist/index196.js.map +0 -1
  334. package/dist/index197.js.map +0 -1
  335. package/dist/index198.js.map +0 -1
  336. package/dist/index199.js.map +0 -1
  337. package/dist/index20.js.map +0 -1
  338. package/dist/index200.js.map +0 -1
  339. package/dist/index201.js.map +0 -1
  340. package/dist/index203.js.map +0 -1
  341. package/dist/index204.js.map +0 -1
  342. package/dist/index205.js.map +0 -1
  343. package/dist/index206.js.map +0 -1
  344. package/dist/index207.js.map +0 -1
  345. package/dist/index208.js.map +0 -1
  346. package/dist/index209.js.map +0 -1
  347. package/dist/index210.js +0 -129
  348. package/dist/index210.js.map +0 -1
  349. package/dist/index211.js.map +0 -1
  350. package/dist/index212.js.map +0 -1
  351. package/dist/index213.js.map +0 -1
  352. package/dist/index214.js.map +0 -1
  353. package/dist/index215.js.map +0 -1
  354. package/dist/index216.js.map +0 -1
  355. package/dist/index217.js.map +0 -1
  356. package/dist/index218.js.map +0 -1
  357. package/dist/index219.js.map +0 -1
  358. package/dist/index22.js.map +0 -1
  359. package/dist/index220.js.map +0 -1
  360. package/dist/index221.js.map +0 -1
  361. package/dist/index222.js.map +0 -1
  362. package/dist/index223.js.map +0 -1
  363. package/dist/index224.js.map +0 -1
  364. package/dist/index225.js +0 -55
  365. package/dist/index225.js.map +0 -1
  366. package/dist/index226.js.map +0 -1
  367. package/dist/index227.js.map +0 -1
  368. package/dist/index228.js.map +0 -1
  369. package/dist/index229.js.map +0 -1
  370. package/dist/index230.js.map +0 -1
  371. package/dist/index232.js.map +0 -1
  372. package/dist/index233.js.map +0 -1
  373. package/dist/index234.js.map +0 -1
  374. package/dist/index235.js.map +0 -1
  375. package/dist/index236.js.map +0 -1
  376. package/dist/index237.js.map +0 -1
  377. package/dist/index239.js.map +0 -1
  378. package/dist/index24.js.map +0 -1
  379. package/dist/index241.js.map +0 -1
  380. package/dist/index242.js.map +0 -1
  381. package/dist/index243.js.map +0 -1
  382. package/dist/index244.js.map +0 -1
  383. package/dist/index245.js.map +0 -1
  384. package/dist/index246.js.map +0 -1
  385. package/dist/index247.js.map +0 -1
  386. package/dist/index248.js.map +0 -1
  387. package/dist/index249.js.map +0 -1
  388. package/dist/index250.js.map +0 -1
  389. package/dist/index251.js.map +0 -1
  390. package/dist/index253.js.map +0 -1
  391. package/dist/index254.js.map +0 -1
  392. package/dist/index255.js.map +0 -1
  393. package/dist/index256.js.map +0 -1
  394. package/dist/index257.js.map +0 -1
  395. package/dist/index258.js.map +0 -1
  396. package/dist/index259.js.map +0 -1
  397. package/dist/index26.js.map +0 -1
  398. package/dist/index260.js.map +0 -1
  399. package/dist/index261.js.map +0 -1
  400. package/dist/index262.js.map +0 -1
  401. package/dist/index263.js +0 -129
  402. package/dist/index263.js.map +0 -1
  403. package/dist/index264.js.map +0 -1
  404. package/dist/index266.js.map +0 -1
  405. package/dist/index267.js.map +0 -1
  406. package/dist/index268.js.map +0 -1
  407. package/dist/index269.js.map +0 -1
  408. package/dist/index270.js.map +0 -1
  409. package/dist/index271.js.map +0 -1
  410. package/dist/index272.js.map +0 -1
  411. package/dist/index273.js.map +0 -1
  412. package/dist/index274.js.map +0 -1
  413. package/dist/index276.js.map +0 -1
  414. package/dist/index277.js.map +0 -1
  415. package/dist/index278.js.map +0 -1
  416. package/dist/index279.js.map +0 -1
  417. package/dist/index28.js.map +0 -1
  418. package/dist/index280.js.map +0 -1
  419. package/dist/index281.js.map +0 -1
  420. package/dist/index282.js +0 -12
  421. package/dist/index282.js.map +0 -1
  422. package/dist/index283.js.map +0 -1
  423. package/dist/index284.js.map +0 -1
  424. package/dist/index285.js.map +0 -1
  425. package/dist/index286.js.map +0 -1
  426. package/dist/index287.js.map +0 -1
  427. package/dist/index288.js.map +0 -1
  428. package/dist/index289.js.map +0 -1
  429. package/dist/index290.js.map +0 -1
  430. package/dist/index291.js.map +0 -1
  431. package/dist/index293.js.map +0 -1
  432. package/dist/index294.js.map +0 -1
  433. package/dist/index295.js.map +0 -1
  434. package/dist/index296.js.map +0 -1
  435. package/dist/index297.js.map +0 -1
  436. package/dist/index298.js.map +0 -1
  437. package/dist/index299.js.map +0 -1
  438. package/dist/index30.js.map +0 -1
  439. package/dist/index300.js.map +0 -1
  440. package/dist/index301.js.map +0 -1
  441. package/dist/index302.js +0 -50
  442. package/dist/index302.js.map +0 -1
  443. package/dist/index303.js.map +0 -1
  444. package/dist/index305.js.map +0 -1
  445. package/dist/index306.js.map +0 -1
  446. package/dist/index307.js.map +0 -1
  447. package/dist/index32.js.map +0 -1
  448. package/dist/index34.js.map +0 -1
  449. package/dist/index36.js.map +0 -1
  450. package/dist/index38.js.map +0 -1
  451. package/dist/index40.js.map +0 -1
  452. package/dist/index42.js.map +0 -1
  453. package/dist/index44.js.map +0 -1
  454. package/dist/index46.js.map +0 -1
  455. package/dist/index48.js.map +0 -1
  456. package/dist/index5.js.map +0 -1
  457. package/dist/index50.js.map +0 -1
  458. package/dist/index52.js.map +0 -1
  459. package/dist/index54.js.map +0 -1
  460. package/dist/index56.js.map +0 -1
  461. package/dist/index58.js.map +0 -1
  462. package/dist/index6.js.map +0 -1
  463. package/dist/index60.js.map +0 -1
  464. package/dist/index62.js.map +0 -1
  465. package/dist/index64.js.map +0 -1
  466. package/dist/index66.js.map +0 -1
  467. package/dist/index68.js.map +0 -1
  468. package/dist/index7.js.map +0 -1
  469. package/dist/index70.js.map +0 -1
  470. package/dist/index72.js.map +0 -1
  471. package/dist/index74.js.map +0 -1
  472. package/dist/index76.js.map +0 -1
  473. package/dist/index78.js.map +0 -1
  474. package/dist/index79.js +0 -130
  475. package/dist/index79.js.map +0 -1
  476. package/dist/index8.js.map +0 -1
  477. package/dist/index81.js.map +0 -1
  478. package/dist/index83.js.map +0 -1
  479. package/dist/index85.js.map +0 -1
  480. package/dist/index87.js.map +0 -1
  481. package/dist/index89.js.map +0 -1
  482. package/dist/index9.js.map +0 -1
  483. package/dist/index91.js.map +0 -1
  484. package/dist/index93.js.map +0 -1
  485. package/dist/index95.js.map +0 -1
  486. package/dist/index97.js.map +0 -1
  487. package/dist/index99.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index13.js","sources":["../src/composables/useWizard.ts"],"sourcesContent":["import { cloneDeep } from '@/utilities/functions/cloneDeep';\nimport { computed, provide, reactive, watch, toValue } from 'vue';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { mapValues } from '@/utilities/functions/mapValues';\nimport { useRoute } from './useRoute';\nimport { useRouter } from './useRouter';\nimport { useStepper } from '@vueuse/core';\nimport type { ComputedRef, MaybeRef } from 'vue';\n\nexport const wizardInjectionKey = Symbol();\nexport type Step<U> = {\n\t/**\n\t * Function that accepts a state object and returns a boolean.\n\t * When step are accessed at the end of the pipeline the result\n\t * is provided so you don't have to run the function yourself.\n\t * It determines if the validation has passed for the step.\n\t */\n\tisValid?: (state: U) => boolean | boolean;\n\t/**\n\t * Function that accepts a state object and returns a boolean.\n\t * When step are accessed at the end of the pipeline the result\n\t * is provided so you don't have to run the function yourself.\n\t * Steps that do not pass the condition are removed.\n\t */\n\tcondition?: (state: U) => boolean;\n\t[key: string]: any;\n};\nexport type WizardState<T extends Record<string, any>> = ReturnType<\n\ttypeof useWizard<T>\n>;\n\nconst regexMatchStep =\n\t/((step\\/)(?<step>[\\s\\S]+?)(?=[/?]))|((step\\/)(?<step2>[\\s\\S]+))/;\n/**\n * With a url that follows the rule xyz.com/anything/step/:nameofthestep[/?query]\n * will match the :nameofthestep substring\n */\nconst extractStepFromUrl = (url: string) => {\n\tconst match = url.match(regexMatchStep);\n\treturn match?.groups?.step ?? match?.groups?.step2 ?? null;\n};\nexport const useWizard = <T extends object>(params: {\n\t/**\n\t * The steps definition for the wizard\n\t */\n\tsteps: MaybeRef<Record<string, Step<T>>>;\n\t/**\n\t * Name of the wizard used to persist state\n\t */\n\tname: string;\n\t/**\n\t * Initial set of data to be made available throughout\n\t */\n\tinitialState: T;\n\t/**\n\t * When navogation is enabled, to whether use the query parameters or an entire substring of the URL like xyz/steps/....\n\t * The latter useful with nuxt so you can leverage the automatic import of components based on the URL.\n\t */\n\tnavigationMode?: 'query' | 'route';\n\t/**\n\t * Whether to use navigation at all. When disabled no query or URL is changed.\n\t */\n\tuseNavigation?: boolean;\n\t/**\n\t *\n\t */\n\tpersist?: boolean;\n}) => {\n\tif (!params.name) {\n\t\tthrow new Error(\n\t\t\t'You need to provide a unique name for the current wizard instance to be used to save data'\n\t\t);\n\t}\n\tconst route = useRoute();\n\tconst router = useRouter();\n\n\tconst useNavigation = params.useNavigation ?? true;\n\tconst navigationMode = params.navigationMode ?? 'query';\n\tconst persist = params.persist ?? true;\n\n\tif (useNavigation && (!route.value || !router)) {\n\t\tthrow new Error(\n\t\t\t'Navigation is enabled but could not retrieve the router instance in useWizard.'\n\t\t);\n\t}\n\n\tconst initialStateCopy = cloneDeep(params.initialState);\n\t/**\n\t * Initial state is either read from session storage or the one provided\n\t */\n\tconst innerState = reactive<typeof params.initialState>(\n\t\tpersist && sessionStorage.getItem(params.name)\n\t\t\t? {\n\t\t\t\t\t...initialStateCopy,\n\t\t\t\t\t...JSON.parse(sessionStorage.getItem(params.name)!),\n\t\t\t\t}\n\t\t\t: initialStateCopy\n\t);\n\n\tif (persist) {\n\t\t/**\n\t\t * Every time the state changes save it to sessionStorage\n\t\t */\n\t\twatch(innerState, () => {\n\t\t\tsessionStorage.setItem(params.name, JSON.stringify(innerState));\n\t\t});\n\t}\n\n\t/**\n\t * Steps can be passed as ref so we need to unwrap them\n\t */\n\tconst unwrappedSteps = toValue(params.steps);\n\tconst filteredSteps = computed(() =>\n\t\tObject.entries(unwrappedSteps).reduce(\n\t\t\t(acc: typeof unwrappedSteps, [key, step]) => {\n\t\t\t\tif (step.condition) {\n\t\t\t\t\tif (!step.condition(innerState as T)) {\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tacc[key] = { ...step, key };\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{}\n\t\t)\n\t);\n\n\t/**\n\t * Steps can have a isValid function that receives the current state\n\t * but we don't want to have to call it every single time so we call it once here\n\t */\n\tconst mappedSteps = computed(() =>\n\t\tmapValues(\n\t\t\tfilteredSteps.value,\n\t\t\t(step): Omit<Step<T>, 'isValid'> & { isValid: boolean } => {\n\t\t\t\tif (typeof step.isValid === 'function') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...step,\n\t\t\t\t\t\tisValid: step.isValid(innerState as T),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t...step,\n\t\t\t\t\tisValid: step.isValid ?? true,\n\t\t\t\t};\n\t\t\t}\n\t\t)\n\t);\n\n\t/**\n\t * Get the initial step from the query.\n\t * If it exists check that every step before it is also valid\n\t * so user cannot manually jump by changing the URL\n\t */\n\tlet initialStep = null;\n\tif (useNavigation && isNotNil(route.value)) {\n\t\tlet step: string | null = null;\n\t\tif (navigationMode === 'query') {\n\t\t\tif (route.value.query.step) {\n\t\t\t\tstep = route.value.query.step as string;\n\t\t\t}\n\t\t} else {\n\t\t\tconst stepFromUrl = extractStepFromUrl(route.value.fullPath);\n\t\t\tif (stepFromUrl) {\n\t\t\t\tstep = stepFromUrl;\n\t\t\t}\n\t\t}\n\t\tinitialStep = step;\n\t}\n\n\tif (initialStep) {\n\t\tfor (const stepName in filteredSteps.value) {\n\t\t\tif (stepName === initialStep) break;\n\t\t\tconst current = mappedSteps.value[stepName];\n\t\t\tif (!current || !current.isValid) {\n\t\t\t\tinitialStep = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Define the state of the wizard\n\t * A few data come from useStepper\n\t */\n\tconst {\n\t\tsteps,\n\t\tcurrent,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tgoTo,\n\t\tindex,\n\t\tat,\n\t\tget,\n\t\tgoBackTo,\n\t\tisAfter,\n\t\tisBefore,\n\t\tisCurrent,\n\t\tisFirst,\n\t\tisLast,\n\t\tisNext,\n\t\tisPrevious,\n\t\tnext,\n\t\tprevious,\n\t\tstepNames,\n\t} = useStepper(\n\t\tmappedSteps,\n\t\tinitialStep || Object.values(filteredSteps.value)[0].key\n\t);\n\n\tconst key = computed(() => Object.keys(filteredSteps.value)[index.value]);\n\n\t/**\n\t * Complete state object\n\t */\n\tconst state = {\n\t\tat,\n\t\tcurrent: current as ComputedRef<Step<T> & { isValid: boolean }>,\n\t\tdata: innerState,\n\t\tget,\n\t\tgoBackTo,\n\t\tgoTo,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tisAfter,\n\t\tisBefore,\n\t\tisCurrent,\n\t\tisFirst,\n\t\tisLast,\n\t\tisNext,\n\t\tisPrevious,\n\t\tkey,\n\t\tnext,\n\t\tprevious,\n\t\tstepNames,\n\t\tsteps,\n\t};\n\n\tprovide(wizardInjectionKey, state);\n\n\tif (useNavigation) {\n\t\tif (navigationMode === 'query') {\n\t\t\t/**\n\t\t\t * Every time the current step changes update route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\tkey,\n\t\t\t\t() => {\n\t\t\t\t\tif (isNotNil(router) && isNotNil(route.value)) {\n\t\t\t\t\t\trouter.push({\n\t\t\t\t\t\t\t...route,\n\t\t\t\t\t\t\tquery: { ...route.value.query, step: key.value ?? null },\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ immediate: true }\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Every time the route changes align the current step to the route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\t() => route.value?.query.step,\n\t\t\t\t(value) => {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tconst stepAsString = value as string;\n\t\t\t\t\t\tif (stepAsString in filteredSteps.value) {\n\t\t\t\t\t\t\tconst stepAsKey = stepAsString;\n\t\t\t\t\t\t\tconst stepKeys = Object.keys(filteredSteps.value);\n\t\t\t\t\t\t\tconst stepsPriorToTarget = stepKeys.slice(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstepKeys.indexOf(stepAsKey)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst allValid = stepsPriorToTarget.every(\n\t\t\t\t\t\t\t\t(key) => mappedSteps.value[key]?.isValid\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (allValid) {\n\t\t\t\t\t\t\t\tgoTo(stepAsKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst key = Object.keys(steps)[0];\n\t\t\t\t\t\tgoTo(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tconst stepFromUrl = computed(() => {\n\t\t\t\tif (isNotNil(route.value)) {\n\t\t\t\t\treturn extractStepFromUrl(route.value.fullPath);\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * Every time the current step changes update route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\tkey,\n\t\t\t\t(value) => {\n\t\t\t\t\tif (isNotNil(route.value) && isNotNil(router) && value) {\n\t\t\t\t\t\tif (route.value.path.includes('step')) {\n\t\t\t\t\t\t\trouter.push({\n\t\t\t\t\t\t\t\tquery: route.value.query,\n\t\t\t\t\t\t\t\tpath: route.value.path.replace(regexMatchStep, `step/${value}`),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trouter.push({\n\t\t\t\t\t\t\t\tquery: route.value.query,\n\t\t\t\t\t\t\t\t// Normalizes paths with / and without\n\t\t\t\t\t\t\t\tpath: (route.value.path + `/step/${value}`).replace('//', '/'),\n\t\t\t\t\t\t\t\treplace: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ immediate: true }\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Every time the route changes align the current step to the route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\t() => stepFromUrl.value,\n\t\t\t\t(value) => {\n\t\t\t\t\tif (value && value !== key.value) {\n\t\t\t\t\t\tconst stepAsString = value as string;\n\t\t\t\t\t\tif (stepAsString in filteredSteps.value) {\n\t\t\t\t\t\t\tconst stepAsKey = stepAsString;\n\t\t\t\t\t\t\tconst stepKeys = Object.keys(filteredSteps.value);\n\t\t\t\t\t\t\tconst stepsPriorToTarget = stepKeys.slice(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstepKeys.indexOf(stepAsKey)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst allValid = stepsPriorToTarget.every(\n\t\t\t\t\t\t\t\t(key) => filteredSteps.value[key]?.isValid\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (allValid) {\n\t\t\t\t\t\t\t\tgoTo(stepAsKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\treturn state;\n};\n"],"names":["wizardInjectionKey","regexMatchStep","extractStepFromUrl","url","match","_a","_b","useWizard","params","route","useRoute","router","useRouter","useNavigation","navigationMode","persist","initialStateCopy","cloneDeep","innerState","reactive","watch","unwrappedSteps","toValue","filteredSteps","computed","acc","key","step","mappedSteps","mapValues","initialStep","isNotNil","stepFromUrl","stepName","current","steps","goToNext","goToPrevious","goTo","index","at","get","goBackTo","isAfter","isBefore","isCurrent","isFirst","isLast","isNext","isPrevious","next","previous","stepNames","useStepper","state","provide","value","stepAsString","stepAsKey","stepKeys"],"mappings":";;;;;;;AASO,MAAMA,KAAqB,OAAO,GAsBnCC,IACL,mEAKKC,IAAqB,CAACC,MAAgB;;AACrC,QAAAC,IAAQD,EAAI,MAAMF,CAAc;AACtC,WAAOI,IAAAD,KAAA,gBAAAA,EAAO,WAAP,gBAAAC,EAAe,WAAQC,IAAAF,KAAA,gBAAAA,EAAO,WAAP,gBAAAE,EAAe,UAAS;AACvD,GACaC,KAAY,CAAmBC,MA0BtC;AACD,MAAA,CAACA,EAAO;AACX,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAGF,QAAMC,IAAQC,KACRC,IAASC,KAETC,IAAgBL,EAAO,iBAAiB,IACxCM,IAAiBN,EAAO,kBAAkB,SAC1CO,IAAUP,EAAO,WAAW;AAElC,MAAIK,MAAkB,CAACJ,EAAM,SAAS,CAACE;AACtC,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAII,QAAAK,IAAmBC,EAAUT,EAAO,YAAY,GAIhDU,IAAaC;AAAA,IAClBJ,KAAW,eAAe,QAAQP,EAAO,IAAI,IAC1C;AAAA,MACA,GAAGQ;AAAA,MACH,GAAG,KAAK,MAAM,eAAe,QAAQR,EAAO,IAAI,CAAE;AAAA,IAAA,IAElDQ;AAAA,EAAA;AAGJ,EAAID,KAIHK,EAAMF,GAAY,MAAM;AACvB,mBAAe,QAAQV,EAAO,MAAM,KAAK,UAAUU,CAAU,CAAC;AAAA,EAAA,CAC9D;AAMI,QAAAG,IAAiBC,EAAQd,EAAO,KAAK,GACrCe,IAAgBC;AAAA,IAAS,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;AACxC,oBAAMmC,IAAYD,GACZE,IAAW,OAAO,KAAKpC,EAAc,KAAK;AAQhD,cAP2BoC,EAAS;AAAA,gBACnC;AAAA,gBACAA,EAAS,QAAQD,CAAS;AAAA,cAAA,EAES;AAAA,gBACnC,CAAChC,MAAAA;;AAAQ,0BAAArB,IAAAkB,EAAc,MAAMG,CAAG,MAAvB,gBAAArB,EAA0B;AAAA;AAAA,cAAA,KAGnCiC,EAAKoB,CAAS;AAAA,YAEhB;AAAA,UACD;AAAA,QACD;AAAA,MAAA;AAAA,IAEF;AAGM,SAAAJ;AACR;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index130.js","sources":["../node_modules/copy-anything/dist/index.js"],"sourcesContent":["import { isArray, isPlainObject } from 'is-what';\n\nfunction assignProp(carry, key, newVal, originalObject, includeNonenumerable) {\n const propType = {}.propertyIsEnumerable.call(originalObject, key) ? \"enumerable\" : \"nonenumerable\";\n if (propType === \"enumerable\")\n carry[key] = newVal;\n if (includeNonenumerable && propType === \"nonenumerable\") {\n Object.defineProperty(carry, key, {\n value: newVal,\n enumerable: false,\n writable: true,\n configurable: true\n });\n }\n}\nfunction copy(target, options = {}) {\n if (isArray(target)) {\n return target.map((item) => copy(item, options));\n }\n if (!isPlainObject(target)) {\n return target;\n }\n const props = Object.getOwnPropertyNames(target);\n const symbols = Object.getOwnPropertySymbols(target);\n return [...props, ...symbols].reduce((carry, key) => {\n if (isArray(options.props) && !options.props.includes(key)) {\n return carry;\n }\n const val = target[key];\n const newVal = copy(val, options);\n assignProp(carry, key, newVal, target, options.nonenumerable);\n return carry;\n }, {});\n}\n\nexport { copy };\n"],"names":["assignProp","carry","key","newVal","originalObject","includeNonenumerable","propType","copy","target","options","isArray","item","isPlainObject","props","symbols","val"],"mappings":";AAEA,SAASA,EAAWC,GAAOC,GAAKC,GAAQC,GAAgBC,GAAsB;AAC5E,QAAMC,IAAW,CAAE,EAAC,qBAAqB,KAAKF,GAAgBF,CAAG,IAAI,eAAe;AACpF,EAAII,MAAa,iBACfL,EAAMC,CAAG,IAAIC,IACXE,KAAwBC,MAAa,mBACvC,OAAO,eAAeL,GAAOC,GAAK;AAAA,IAChC,OAAOC;AAAA,IACP,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EACpB,CAAK;AAEL;AACA,SAASI,EAAKC,GAAQC,IAAU,IAAI;AAClC,MAAIC,EAAQF,CAAM;AAChB,WAAOA,EAAO,IAAI,CAACG,MAASJ,EAAKI,GAAMF,CAAO,CAAC;AAEjD,MAAI,CAACG,EAAcJ,CAAM;AACvB,WAAOA;AAET,QAAMK,IAAQ,OAAO,oBAAoBL,CAAM,GACzCM,IAAU,OAAO,sBAAsBN,CAAM;AACnD,SAAO,CAAC,GAAGK,GAAO,GAAGC,CAAO,EAAE,OAAO,CAACb,GAAOC,MAAQ;AACnD,QAAIQ,EAAQD,EAAQ,KAAK,KAAK,CAACA,EAAQ,MAAM,SAASP,CAAG;AACvD,aAAOD;AAET,UAAMc,IAAMP,EAAON,CAAG,GAChBC,IAASI,EAAKQ,GAAKN,CAAO;AAChC,WAAAT,EAAWC,GAAOC,GAAKC,GAAQK,GAAQC,EAAQ,aAAa,GACrDR;AAAA,EACR,GAAE,CAAE,CAAA;AACP;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index131.js","sources":["../src/utilities/functions/isNotNil.ts"],"sourcesContent":["/**\n * Returns true if the item is not null or undefined\n * @param value The item to check\n * @returns true | false\n */\nexport const isNotNil = <T>(\n\tvalue: T\n): value is Exclude<T, null | undefined> => {\n\tif (typeof value === 'undefined') return false;\n\tif (value === null) return false;\n\treturn true;\n};\n"],"names":["isNotNil","value"],"mappings":"AAKa,MAAAA,IAAW,CACvBC,MAEI,SAAOA,IAAU,OACjBA,MAAU;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index132.js","sources":["../src/utilities/functions/mapValues.ts"],"sourcesContent":["/*\nMaps the values of an object.\nIteratee is run with value, key, object as arguments\n\n*/\nexport const mapValues = <T extends Record<string, unknown>, U>(\n\tobj: T,\n\tfn: (v: T[keyof T], k: keyof T, o: T) => U\n): { [Property in keyof T]: ReturnType<typeof fn> } =>\n\t(Object.keys(obj) as (keyof T)[]).reduce(\n\t\t(acc, k) => {\n\t\t\tacc[k] = fn(obj[k], k, obj);\n\t\t\treturn acc;\n\t\t},\n\t\t{} as { [Property in keyof T]: ReturnType<typeof fn> }\n\t);\n"],"names":["mapValues","obj","fn","acc","k"],"mappings":"AAKO,MAAMA,IAAY,CACxBC,GACAC,MAEC,OAAO,KAAKD,CAAG,EAAkB;AAAA,EACjC,CAACE,GAAKC,OACLD,EAAIC,CAAC,IAAIF,EAAGD,EAAIG,CAAC,GAAGA,GAAGH,CAAG,GACnBE;AAAA,EAER,CAAC;AACF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index133.js","sources":["../src/composables/useRoute.ts"],"sourcesContent":["import { computed, getCurrentInstance, type Ref } from 'vue';\nimport type { RouteLocationNormalizedLoaded } from 'vue-router';\n\nexport function useRoute(): Ref<RouteLocationNormalizedLoaded | undefined> {\n\tconst vm = getCurrentInstance();\n\n\treturn computed(() => vm?.proxy?.$route);\n}\n"],"names":["useRoute","vm","getCurrentInstance","computed","_a"],"mappings":";AAGO,SAASA,IAA2D;AAC1E,QAAMC,IAAKC;AAEX,SAAOC,EAAS,MAAM;;AAAA,YAAAC,IAAAH,KAAA,gBAAAA,EAAI,UAAJ,gBAAAG,EAAW;AAAA,GAAM;AACxC;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index134.js","sources":["../src/composables/useRouter.ts"],"sourcesContent":["import { getCurrentInstance } from 'vue';\nimport type { Router } from 'vue-router';\n\nexport function useRouter(): Router | undefined {\n\treturn getCurrentInstance()?.proxy?.$router;\n}\n"],"names":["useRouter","_b","_a","getCurrentInstance"],"mappings":";AAGO,SAASA,IAAgC;;AACxC,UAAAC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,gBAAAD,EAA6B;AACrC;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index135.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index136.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index137.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index138.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index139.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index14.js DELETED
@@ -1,85 +0,0 @@
1
- import { defineComponent as y, getCurrentInstance as p, computed as s, resolveComponent as d, openBlock as k, createBlock as h, resolveDynamicComponent as C, mergeProps as x, withCtx as S, renderSlot as L, createTextVNode as B, toDisplayString as N } from "vue";
2
- import { _config as o } from "./index5.js";
3
- import { useLogger as m } from "./index209.js";
4
- const P = /* @__PURE__ */ y({
5
- __name: "BaseButton",
6
- props: {
7
- activeClass: {},
8
- ariaCurrentValue: {},
9
- block: { type: Boolean },
10
- data: {},
11
- disabled: { type: Boolean },
12
- exactActiveClass: {},
13
- headers: {},
14
- href: {},
15
- method: {},
16
- onBefore: {},
17
- onCancel: {},
18
- onCancelToken: {},
19
- onFinish: {},
20
- only: {},
21
- onProgress: {},
22
- onStart: {},
23
- onSuccess: {},
24
- preserveScroll: { type: [Boolean, Function] },
25
- preserveState: { type: [Boolean, Function, null] },
26
- queryStringArrayFormat: {},
27
- replace: { type: Boolean },
28
- tag: { default: "button" },
29
- target: {},
30
- text: {},
31
- to: {},
32
- type: { default: "button" }
33
- },
34
- setup(f) {
35
- var i, l, u, c;
36
- const t = f, a = !!((l = (i = p()) == null ? void 0 : i.proxy) != null && l.$inertia), g = !!((c = (u = p()) == null ? void 0 : u.proxy) != null && c.$nuxt), n = s(() => {
37
- if (t.href || t.to && t.disabled) {
38
- if (a && !t.disabled && !t.target) {
39
- const e = d(o.inertiaLinkName);
40
- if (typeof e == "string") {
41
- const { warn: r } = m();
42
- r(
43
- `Inertia link component "${o.inertiaLinkName}" could not be resolved. Ensure you app registers a link component with the name "${o.inertiaLinkName}" or set bitboss-ui config key "inertiaLinkName" to the correct value globally. Please visit ${o.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
44
- );
45
- }
46
- return e;
47
- }
48
- return "a";
49
- }
50
- if (t.to) {
51
- if (g) {
52
- const e = d(o.nuxtLinkName);
53
- if (typeof e == "string") {
54
- const { warn: r } = m();
55
- r(
56
- `Nuxt link component "${o.nuxtLinkName}" could not be resolved. Ensure you app registers a link component with the name "${o.nuxtLinkName}" or set bitboss-ui config key "nuxtLInkName" to the correct value globally. Please visit ${o.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
57
- );
58
- }
59
- return e;
60
- }
61
- return "router-link";
62
- }
63
- return t.tag;
64
- }), b = s(() => ({
65
- "base-btn": !0,
66
- "base-btn--block": t.block,
67
- "base-btn--disabled": t.disabled
68
- })), v = s(() => {
69
- const e = {};
70
- return n.value === "button" ? (e.disabled = t.disabled, e.type = t.type) : n.value === "a" || a && typeof n.value != "string" && n.value.name === "Link" ? t.disabled ? (e["aria-disabled"] = !0, e.role = "link") : (e.href = t.href, e.target = t.target, a && (e.data = t.data, e.headers = t.headers, e.method = t.method, e.onBefore = t.onBefore, e.onCancel = t.onCancel, e.onCancelToken = t.onCancelToken, e.onFinish = t.onFinish, e.only = t.only, e.onProgress = t.onProgress, e.onStart = t.onStart, e.onSuccess = t.onSuccess, e.preserveScroll = t.preserveScroll, e.preserveState = t.preserveState, e.queryStringArrayFormat = t.queryStringArrayFormat, e.replace = t.replace)) : (n.value === "router-link" || typeof n.value != "string" && n.value.name === "NuxtLink") && (e.activeClass = t.activeClass, e.ariaCurrentValue = t.ariaCurrentValue, e.exactActiveClass = t.exactActiveClass, e.replace = t.replace, e.target = t.target, e.to = t.to), e;
71
- });
72
- return (e, r) => (k(), h(C(n.value), x({ class: b.value }, v.value), {
73
- default: S(() => [
74
- L(e.$slots, "default", {}, () => [
75
- B(N(e.text), 1)
76
- ])
77
- ]),
78
- _: 3
79
- }, 16, ["class"]));
80
- }
81
- });
82
- export {
83
- P as default
84
- };
85
- //# sourceMappingURL=index14.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index14.js","sources":["../src/components/BaseButton/BaseButton.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" :class=\"classes\" v-bind=\"attributes\">\n\t\t<slot>{{ text }}</slot>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, resolveComponent } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\nimport { _config } from '@/composables/useBbConfig';\nimport { useLogger } from '@/composables/useLogger';\n\nexport type BaseButtonProps = {\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\n\nconst props = withDefaults(defineProps<BaseButtonProps>(), {\n\ttag: 'button',\n\ttype: 'button',\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst tag = computed(() => {\n\t// For disabled links always render a\n\tif (props.href || (props.to && props.disabled)) {\n\t\t// Prevent rendering inertia links if target is passed (inertia doesn't support external links)\n\t\tif (isInertia && !props.disabled && !props.target) {\n\t\t\tconst resolved = resolveComponent(_config.inertiaLinkName);\n\t\t\tif (typeof resolved === 'string') {\n\t\t\t\tconst { warn } = useLogger();\n\t\t\t\twarn(\n\t\t\t\t\t`Inertia link component \"${_config.inertiaLinkName}\" could not be resolved. Ensure you app registers a link component with the name \"${_config.inertiaLinkName}\" or set bitboss-ui config key \"inertiaLinkName\" to the correct value globally. Please visit ${_config.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn resolved;\n\t\t}\n\n\t\treturn 'a';\n\t}\n\tif (props.to) {\n\t\tif (isNuxt) {\n\t\t\tconst resolved = resolveComponent(_config.nuxtLinkName);\n\t\t\tif (typeof resolved === 'string') {\n\t\t\t\tconst { warn } = useLogger();\n\t\t\t\twarn(\n\t\t\t\t\t`Nuxt link component \"${_config.nuxtLinkName}\" could not be resolved. Ensure you app registers a link component with the name \"${_config.nuxtLinkName}\" or set bitboss-ui config key \"nuxtLInkName\" to the correct value globally. Please visit ${_config.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn resolved;\n\t\t}\n\t\treturn 'router-link';\n\t}\n\treturn props.tag;\n});\n\nconst classes = computed(() => ({\n\t'base-btn': true,\n\t'base-btn--block': props.block,\n\t'base-btn--disabled': props.disabled,\n}));\n\nconst attributes = computed(() => {\n\ttype PossibleAttributes = {\n\t\tactiveClass: BaseButtonProps['activeClass'];\n\t\t'aria-disabled': boolean;\n\t\tariaCurrentValue: BaseButtonProps['ariaCurrentValue'];\n\t\tdata: BaseButtonProps['data'];\n\t\tdisabled: boolean;\n\t\texactActiveClass: BaseButtonProps['exactActiveClass'];\n\t\theaders: BaseButtonProps['headers'];\n\t\thref: string;\n\t\tmethod: BaseButtonProps['method'];\n\t\tonBefore: BaseButtonProps['onBefore'];\n\t\tonCancel: BaseButtonProps['onCancel'];\n\t\tonCancelToken: BaseButtonProps['onCancelToken'];\n\t\tonFinish: BaseButtonProps['onFinish'];\n\t\tonly: BaseButtonProps['only'];\n\t\tonProgress: BaseButtonProps['onProgress'];\n\t\tonStart: BaseButtonProps['onStart'];\n\t\tonSuccess: BaseButtonProps['onSuccess'];\n\t\tpreserveScroll: BaseButtonProps['preserveScroll'];\n\t\tpreserveState: BaseButtonProps['preserveState'];\n\t\tqueryStringArrayFormat: BaseButtonProps['queryStringArrayFormat'];\n\t\treplace: BaseButtonProps['replace'];\n\t\trole: string;\n\t\tstyle: { [rule: string]: string };\n\t\ttarget: string;\n\t\tto: BaseButtonProps['to'];\n\t\ttype: string;\n\t};\n\tconst initial: Partial<PossibleAttributes> = {};\n\n\tif (tag.value === 'button') {\n\t\tinitial.disabled = props.disabled;\n\t\tinitial.type = props.type;\n\t} else if (\n\t\ttag.value === 'a' ||\n\t\t(isInertia && typeof tag.value !== 'string' && tag.value.name === 'Link')\n\t) {\n\t\t// When rendering as anchor prevent navigation if disabled\n\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\tif (props.disabled) {\n\t\t\tinitial['aria-disabled'] = true;\n\t\t\tinitial.role = 'link';\n\t\t} else {\n\t\t\t// Only attach the href to active links\n\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\tinitial.href = props.href;\n\t\t\tinitial.target = props.target;\n\n\t\t\tif (isInertia) {\n\t\t\t\tinitial.data = props.data;\n\t\t\t\tinitial.headers = props.headers;\n\t\t\t\tinitial.method = props.method;\n\t\t\t\tinitial.onBefore = props.onBefore;\n\t\t\t\tinitial.onCancel = props.onCancel;\n\t\t\t\tinitial.onCancelToken = props.onCancelToken;\n\t\t\t\tinitial.onFinish = props.onFinish;\n\t\t\t\tinitial.only = props.only;\n\t\t\t\tinitial.onProgress = props.onProgress;\n\t\t\t\tinitial.onStart = props.onStart;\n\t\t\t\tinitial.onSuccess = props.onSuccess;\n\t\t\t\tinitial.preserveScroll = props.preserveScroll;\n\t\t\t\tinitial.preserveState = props.preserveState;\n\t\t\t\tinitial.queryStringArrayFormat = props.queryStringArrayFormat;\n\t\t\t\tinitial.replace = props.replace;\n\t\t\t}\n\t\t}\n\t} else if (\n\t\ttag.value === 'router-link' ||\n\t\t(typeof tag.value !== 'string' && tag.value.name === 'NuxtLink')\n\t) {\n\t\tinitial.activeClass = props.activeClass;\n\t\tinitial.ariaCurrentValue = props.ariaCurrentValue;\n\t\tinitial.exactActiveClass = props.exactActiveClass;\n\t\tinitial.replace = props.replace;\n\t\tinitial.target = props.target;\n\t\tinitial.to = props.to;\n\t}\n\n\treturn initial;\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseButton';\n</style>\n"],"names":["props","__props","isInertia","_b","_a","getCurrentInstance","isNuxt","_d","_c","tag","computed","resolved","resolveComponent","_config","warn","useLogger","classes","attributes","initial"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoHA,UAAMA,IAAQC,GAWRC,IAAY,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,WAG3CG,IAAS,CAAC,GAACC,KAAAC,IAAAH,EAAA,MAAA,gBAAAG,EAAsB,UAAtB,QAAAD,EAA6B,QAExCE,IAAMC,EAAS,MAAM;AAE1B,UAAIV,EAAM,QAASA,EAAM,MAAMA,EAAM,UAAW;AAE/C,YAAIE,KAAa,CAACF,EAAM,YAAY,CAACA,EAAM,QAAQ;AAC5C,gBAAAW,IAAWC,EAAiBC,EAAQ,eAAe;AACrD,cAAA,OAAOF,KAAa,UAAU;AAC3B,kBAAA,EAAE,MAAAG,MAASC;AACjB,YAAAD;AAAA,cACC,2BAA2BD,EAAQ,eAAe,qFAAqFA,EAAQ,eAAe,gGAAgGA,EAAQ,gBAAgB;AAAA,YAAA;AAAA,UAExR;AACO,iBAAAF;AAAA,QACR;AAEO,eAAA;AAAA,MACR;AACA,UAAIX,EAAM,IAAI;AACb,YAAIM,GAAQ;AACL,gBAAAK,IAAWC,EAAiBC,EAAQ,YAAY;AAClD,cAAA,OAAOF,KAAa,UAAU;AAC3B,kBAAA,EAAE,MAAAG,MAASC;AACjB,YAAAD;AAAA,cACC,wBAAwBD,EAAQ,YAAY,qFAAqFA,EAAQ,YAAY,6FAA6FA,EAAQ,gBAAgB;AAAA,YAAA;AAAA,UAE5Q;AACO,iBAAAF;AAAA,QACR;AACO,eAAA;AAAA,MACR;AACA,aAAOX,EAAM;AAAA,IAAA,CACb,GAEKgB,IAAUN,EAAS,OA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version":3,"file":"index140.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index141.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index142.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index143.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index144.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index145.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index146.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index147.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index148.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index149.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index150.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index151.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index152.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index153.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index154.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index155.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index156.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index157.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index158.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index159.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index16.js","sources":["../src/components/BaseCheckbox/BaseCheckbox.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\">\n\t\t<input v-if=\"!checked && submitWhenFalse\" v-bind=\"hiddenInputAttributes\" />\n\t\t<input v-bind=\"inputAttributes\" ref=\"checkboxInput\" />\n\t\t<span aria-hidden=\"true\" class=\"bb-base-checkbox-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"bb-base-checkbox-container__icon\"\n\t\t\t\t\tviewBox=\"276.411 158.834 114.971 114.97\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M 297.574 224.786 L 318.309 243.134 L 371.568 189.232\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-width=\"14px\"\n\t\t\t\t\t></path>\n\t\t\t\t</svg>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport { booleanishToBoolean } from '@/utilities/functions/booleanishToBoolean';\n\nexport type BaseCheckboxProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: boolean | 'true' | 'false';\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n};\n\nexport type BaseCheckboxEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type SlotAttributes = {\n\tchecked: boolean;\n\tdisabled: boolean;\n\tfalseValue: any;\n\tfocused: boolean;\n\thasErrors: boolean;\n\tid: BaseCheckboxProps['id'];\n\tname: BaseCheckboxProps['name'];\n\tparsedValue: any;\n\treadonly: BaseCheckboxProps['readonly'];\n\ttrueValue: any;\n\tvalue: any;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxProps>(), {\n\ttrueValue: true,\n\tfalseValue: false,\n});\n\nconst emit = defineEmits<BaseCheckboxEvents>();\n\ndefineSlots<{\n\ticon?: (props: SlotAttributes) => any;\n}>();\n\nconst checkboxInput = ref<HTMLInputElement | null>(null);\n\nconst checked = computed(() => {\n\tif (props.checked) return booleanishToBoolean(props.checked);\n\treturn JSON.stringify(props.trueValue) === JSON.stringify(props.modelValue);\n});\nconst hasFocus = ref(false);\n\nconst containerAttributes = computed(() => {\n\tconst attributes: Record<string, any> = {\n\t\tclass: {\n\t\t\t'bb-base-checkbox': true,\n\t\t\t'bb-base-checkbox--disabled': props.disabled,\n\t\t\t'bb-base-checkbox--errors': props.hasErrors,\n\t\t\t'bb-base-checkbox--indeterminate': props.indeterminate,\n\t\t\t'bb-base-checkbox--readonly': props.readonly,\n\t\t\t[`bb-base-checkbox--${props.color}`]:\n\t\t\t\tprops.color && !isCssColor(props.color),\n\t\t},\n\t};\n\tif (props.color && isCssColor(props.color)) {\n\t\tattributes['style'] = `--color: ${props.color}`;\n\t}\n\treturn attributes;\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputAttributes = computed(() => {\n\tconst value = makeInputValue(props.falseValue);\n\treturn {\n\t\tdisabled: props.disabled,\n\t\tname: props.name,\n\t\ttype: 'hidden',\n\t\tvalue: value,\n\t};\n});\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.trueValue);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\n\tconst onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tlet value = event.target.checked ? props.trueValue : props.falseValue;\n\n\t\t\temit('change', event);\n\t\t\temit('update:modelValue', value);\n\t\t}\n\t};\n\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t\tonInput: (event: Event) => emit('input', event),\n\t};\n\n\treturn {\n\t\t'aria-describedby': props.ariaDescribedby,\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly checkbox so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tindeterminate: props.indeterminate,\n\t\tname: props.name,\n\t\trequired: props.required,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'checkbox',\n\t\tvalue: value,\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfalseValue: props.falseValue,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\trequired: props.required,\n\ttrueValue: props.trueValue,\n\tvalue: checked.value ? props.trueValue : props.falseValue,\n}));\n\n/**\n * Indeterminate is a very volatile prop that is reset upon clicking,\n * this keeps the state and the prop aligned\n */\nwatch(\n\t() => [props.modelValue, props.checked, props.indeterminate],\n\t() => {\n\t\tif (checkboxInput.value) {\n\t\t\tcheckboxInput.value.indeterminate = !!props.indeterminate;\n\t\t}\n\t}\n);\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckbox';\n</style>\n"],"names":["props","__props","emit","__emit","checkboxInput","ref","checked","computed","booleanishToBoolean","hasFocus","containerAttributes","attributes","isCssColor","makeInputValue","when","item","hiddenInputAttributes","value","inputAttributes","eventListeners","event","slotAttributes","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,UAAMA,IAAQC,GAKRC,IAAOC,GAMPC,IAAgBC,EAA6B,IAAI,GAEjDC,IAAUC,EAAS,MACpBP,EAAM,UAAgBQ,EAAoBR,EAAM,OAAO,IACpD,KAAK,UAAUA,EAAM,SAAS,MAAM,KAAK,UAAUA,EAAM,UAAU,CAC1E,GACKS,IAAWJ,EAAI,EAAK,GAEpBK,IAAsBH,EAAS,MAAM;AAC1C,YAAMI,IAAkC;AAAA,QACvC,OAAO;AAAA,UACN,oBAAoB;AAAA,UACpB,8BAA8BX,EAAM;AAAA,UACpC,4BAA4BA,EAAM;AAAA,UAClC,mCAAmCA,EAAM;AAAA,UACzC,8BAA8BA,EAAM;AAAA,UACpC,CAAC,qBAAqBA,EAAM,KAAK,EAAE,GAClCA,EAAM,SAAS,CAACY,EAAWZ,EAAM,KAAK;AAAA,QACxC;AAAA,MAAA;AAED,aAAIA,EAAM,SAASY,EAAWZ,EAAM,KAAK,MACxCW,EAAW,QAAW,YAAYX,EAAM,KAAK,KAEvCW;AAAA,IAAA,CACP,GAMKE,IAAiBC;AAAA,MACtB,CAACC,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAC,IAAwBT,EAAS,MAAM;AACtC,YAAAU,IAAQJ,EAAeb,EAAM,UAAU;AACtC,aAAA;AAAA,QACN,UAAUA,EAAM;AAAA,QAChB,MAAMA,EAAM;AAAA,QACZ,MAAM;AAAA,QACN,OAAAiB;AAAA,MAAA;AAAA,IACD,CACA,GAEKC,IAAkBX,EAAS,MAAM;AAChC,YAAAU,IAAQJ,EAAeb,EAAM,SAAS,GAqBtCmB,IAAiB;AAAA,QACtB,QApBc,CAACC,MAA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AM;AAAA,MACZ,aAAakB,EAAgB,MAAM;AAAA,MACnC,UAAUlB,EAAM;AAAA,MAChB,UAAUA,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,OAAOM,EAAQ,QAAQN,EAAM,YAAYA,EAAM;AAAA,IAC9C,EAAA;AAMF,WAAAsB;AAAA,MACC,MAAM,CAACtB,EAAM,YAAYA,EAAM,SAASA,EAAM,aAAa;AAAA,MAC3D,MAAM;AACL,QAAII,EAAc,UACjBA,EAAc,MAAM,gBAAgB,CAAC,CAACJ,EAAM;AAAA,MAE9C;AAAA,IAAA;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index160.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index161.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index163.js DELETED
@@ -1,6 +0,0 @@
1
- import o from "./index122.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };
6
- //# sourceMappingURL=index163.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index163.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index165.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index166.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index167.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index168.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index169.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index170.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index171.js DELETED
@@ -1,6 +0,0 @@
1
- import o from "./index123.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };
6
- //# sourceMappingURL=index171.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index171.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index173.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index174.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index175.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index176.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index177.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index178.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index179.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index18.js","sources":["../src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue"],"sourcesContent":["<template>\n\t<OptionsContainer\n\t\tclass=\"bb-base-checkbox-group\"\n\t\t:direction=\"direction\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:loading=\"!!loading\"\n\t\t:loading-text=\"loadingText\"\n\t\t:no-data-text=\"noDataText\"\n\t\t:options=\"options\"\n\t>\n\t\t<template #prepend><slot name=\"prepend\"></slot></template>\n\t\t<template #loading><slot name=\"loading\"></slot></template>\n\t\t<template #no-data><slot name=\"no-data\"></slot></template>\n\t\t<template #option:prepend=\"data\"\n\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot\n\t\t></template>\n\t\t<template #input=\"{ option, index }\">\n\t\t\t<BaseCheckbox\n\t\t\t\t:id=\"option.valueHash\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus && !index\"\n\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:true-value=\"option.value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t@change=\"(event: Event) => onChange(event, option)\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:item=\"option.item\"\n\t\t\t\t\t\tname=\"icon\"\n\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\tv-bind=\"data\" /></template\n\t\t\t></BaseCheckbox>\n\t\t</template>\n\t\t<template #option:append=\"data\"\n\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot\n\t\t></template>\n\t\t<template #append><slot name=\"prepend\"></slot></template>\n\t</OptionsContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport { ref, toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport BaseCheckbox from '../BaseCheckbox/BaseCheckbox.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { Option } from '@/types/Option';\nimport type { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';\nimport OptionsContainer from '../OptionsContainer.vue';\n\nexport type BaseCheckboxGroupProps<T> = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| T[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<T[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => T[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => any) | undefined;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Used by v-model. Can be an array of any serializable type.\n\t */\n\tmodelValue: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n};\n\nexport type BaseCheckboxGroupEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxGroupProps<T>>(), {\n\tdepsDebounceTime: 0,\n\tdirection: 'horizontal',\n\titems: () => [],\n\tloadingText: 'Caricamento...',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n});\n\nconst emit = defineEmits<BaseCheckboxGroupEvents>();\n\ndefineSlots<{\n\tprepend?: (props: object) => any;\n\tloading?: (props: object) => any;\n\t'no-data'?: (props: object) => any;\n\t'option:prepend'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\ticon?: (\n\t\tprops: SlotAttributes & {\n\t\t\titem: T;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: T; text: string; checked: boolean }) => any;\n\t'option:append'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\tappend?: (props: object) => any;\n}>();\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst {\n\tinnerLoading: loading,\n\toptions,\n\tselectOption,\n\tunselectOption,\n} = useOptions({\n\tdependencies: toRef(props, 'dependencies'),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tdisabled: toRef(props, 'disabled'),\n\temit,\n\tenforceCoherence: props.enforceCoherence,\n\titems: toRef(props, 'items'),\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tmultiple: true,\n\tprefill: true,\n\tqueryDebounceTime: 0,\n\tresetQueryOnOptionSelected: false,\n\tstash: false,\n});\n\nconst onChange = (event: Event, option: Option) => {\n\temit('change', event);\n\tif (!option.selected) {\n\t\tselectOption(option);\n\t} else {\n\t\tunselectOption(option);\n\t}\n};\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tif (!active.value) {\n\t\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\t\tdocument.addEventListener('click', onDocumentClick, { passive: true });\n\t\tactive.value = true;\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus,\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckboxGroup';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","active","loading","options","selectOption","unselectOption","useOptions","toRef","onChange","event","option","eventListeners","onDocumentFocus","onDocumentClick","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyLA,UAAMA,IAAQC,GASRC,IAAOC,GA8BPC,IAAYC,KACZC,IAASD,EAAI,EAAK,GAElB;AAAA,MACL,cAAcE;AAAA,MACd,SAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,QACGC,EAAW;AAAA,MACd,cAAcC,EAAMZ,GAAO,cAAc;AAAA,MACzC,kBAAkBA,EAAM;AAAA,MACxB,UAAUY,EAAMZ,GAAO,UAAU;AAAA,MACjC,MAAAE;AAAA,MACA,kBAAkBF,EAAM;AAAA,MACxB,OAAOY,EAAMZ,GAAO,OAAO;AAAA,MAC3B,UAAUA,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,YAAYY,EAAMZ,GAAO,YAAY;AAAA,MACrC,wBAAwBA,EAAM;AAAA,MAC9B,UAAU;AAAA,MACV,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,4BAA4B;AAAA,MAC5B,OAAO;AAAA,IAAA,CACP,GAEKa,IAAW,CAACC,GAAcC,MAAmB;AAClD,MAAAb,EAAK,UAAUY,CAAK,GACfC,EAAO,WAGXL,EAAeK,CAAM,IAFrBN,EAAaM,CAAM;AAAA,IAGpB,GAYKC,IAAiB;AAAA,MACtB,QAAQ,CAACF,MAAsBZ,EAAK,QAAQY,CAAK;AAAA,MACjD,SAAS,CAACA,MAAsBZ,EAAK,SAASY,CAAK;AAAA,MACnD,SAZe,CAACA,MAAsB;AACtC,QAAAZ,EAAK,SAASY,CAAK,GACdR,EAAO,UACX,SAAS,iBAAiB,WAAWW,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,SAASC,GAAiB,EAAE,SAAS,IAAM,GACrEZ,EAAO,QAAQ;AAAA,MAChB;AAAA,MAOA,SAAS,CAACQ,MAAiBZ,EAAK,SAASY,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBZ,EAAK,WAAWY,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBZ,EAAK,aAAaY,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBZ,EAAK,WAAWY,CAAK;AAAA,IAAA,GAGlDG,IAAkB,CAACH,MAAsB;;AAC1C,MAAAA,EAAM,kBAAkB,iBACtBK,IAAAf,EAAU,UAAV,QAAAe,EAAiB,SAASL,EAAM,YACpCZ,EAAK,UAAU,GACfI,EAAO,QAAQ,IACN,SAAA,oBAAoB,WAAWW,CAAe,GAC9C,SAAA,oBAAoB,SAASC,CAAe;AAAA,IAEvD,GAGKA,IAAkB,CAACJ,MAAsB;;AAC1C,MAAAA,EAAM,kBAAkB,iBACtBK,IAAAf,EAAU,UAAV,QAAAe,EAAiB,SAASL,EAAM,YACpCZ,EAAK,UAAU,GACfI,EAAO,QAAQ,IACN,SAAA,oBAAoB,WAAWW,CAAe,GAC9C,SAAA,oBAAoB,SAASC,CAAe;AAAA,IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index180.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index181.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index182.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index183.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index184.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index185.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index187.js DELETED
@@ -1,6 +0,0 @@
1
- import o from "./index125.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };
6
- //# sourceMappingURL=index187.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index187.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index189.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index190.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index191.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index192.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index193.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index194.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index195.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index196.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index197.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index198.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index199.js","sources":["../src/utilities/functions/clamp.ts"],"sourcesContent":["/**\n * Returns value ensuring it doesn't go below min and exceed max.\n * EXAMPLE: clamp(5, 7, 20) === 7\n * @param value The value to clamp\n * @param min Minimum bound\n * @param max Maximum bound\n * @returns\n */\n\nexport const clamp = (value: number, min: number, max: number) => {\n\treturn Math.min(Math.max(value, min), max);\n};\n"],"names":["clamp","value","min","max"],"mappings":"AASO,MAAMA,IAAQ,CAACC,GAAeC,GAAaC,MAC1C,KAAK,IAAI,KAAK,IAAIF,GAAOC,CAAG,GAAGC,CAAG;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index20.js","sources":["../src/components/BaseDatePicker/BaseDatePicker.vue"],"sourcesContent":["<template>\n\t<div class=\"bb-base-date-picker\">\n\t\t<Header :cursor=\"cursor\" :disabled=\"!!disabled\" :hidden=\"!header\" />\n\t\t<div class=\"bb-base-date-picker__body\">\n\t\t\t<div class=\"bb-base-date-picker__controls\">\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control bb-base-date-picker__month-control\"\n\t\t\t\t\t@click=\"toggleMode('month')\"\n\t\t\t\t>\n\t\t\t\t\t{{ cursor.format('MMMM YYYY') }}\n\t\t\t\t\t<span class=\"sr-only\">Seleziona un mese</span>\n\t\t\t\t</BaseButton>\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control bb-base-date-picker__year-control\"\n\t\t\t\t\t@click=\"toggleMode('year')\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\theight=\"6\"\n\t\t\t\t\t\tviewBox=\"0 0 10 6\"\n\t\t\t\t\t\twidth=\"10\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"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\"\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span class=\"sr-only\">Seleziona anno</span>\n\t\t\t\t</BaseButton>\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control\"\n\t\t\t\t\t:disabled=\"disabled || mode !== 'day'\"\n\t\t\t\t\t@click=\"decreaseMonth\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\twidth=\"24px\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\"\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span class=\"sr-only\">Vai indietro di un mese</span>\n\t\t\t\t</BaseButton>\n\t\t\t\t<BaseButton\n\t\t\t\t\tclass=\"bb-base-date-picker__control\"\n\t\t\t\t\t:disabled=\"disabled || mode !== 'day'\"\n\t\t\t\t\t@click=\"increaseMonth\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tstyle=\"transform: rotate(180deg)\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\twidth=\"24px\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\"\n\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<span class=\"sr-only\">Vai avanti di un mese</span>\n\t\t\t\t</BaseButton>\n\t\t\t</div>\n\t\t\t<div class=\"bb-base-date-picker__content\">\n\t\t\t\t<DaySelector\n\t\t\t\t\t:current=\"mode === 'day'\"\n\t\t\t\t\t:cursor=\"cursor\"\n\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t:first-day-of-week=\"firstDayOfWeek!\"\n\t\t\t\t\t:inert=\"mode !== 'day'\"\n\t\t\t\t\t:max=\"max\"\n\t\t\t\t\t:min=\"min\"\n\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t:multiple=\"multiple\"\n\t\t\t\t\t:range=\"range\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t\t@update:cursor=\"(value) => (cursor = value)\"\n\t\t\t\t\t@update:model-value=\"updateModelValue\"\n\t\t\t\t/>\n\t\t\t\t<SlideTransition direction=\"right\" :duration=\"500\" :gap=\"30\">\n\t\t\t\t\t<MonthSelector\n\t\t\t\t\t\tv-if=\"mode === 'month'\"\n\t\t\t\t\t\t:cursor=\"cursor\"\n\t\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t\t@update:month=\"\n\t\t\t\t\t\t\t(month) => {\n\t\t\t\t\t\t\t\tupdateMonth(month);\n\t\t\t\t\t\t\t\tmode = 'day';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\"\n\t\t\t\t\t/>\n\t\t\t\t</SlideTransition>\n\t\t\t\t<SlideTransition direction=\"top\" :duration=\"500\" :gap=\"30\">\n\t\t\t\t\t<YearSelector\n\t\t\t\t\t\tv-if=\"mode === 'year'\"\n\t\t\t\t\t\t:cursor=\"cursor\"\n\t\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t\t@update:year=\"\n\t\t\t\t\t\t\t(year) => {\n\t\t\t\t\t\t\t\tupdateYear(year);\n\t\t\t\t\t\t\t\tmode = 'day';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\"\n\t\t\t\t\t/>\n\t\t\t\t</SlideTransition>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { BaseButton } from '@/index';\nimport { Dayjs, default as dayjs } from 'dayjs';\nimport { default as isSameOrAfter } from 'dayjs/plugin/isSameOrAfter';\nimport { default as isSameOrBefore } from 'dayjs/plugin/isSameOrBefore';\nimport { default as it } from 'dayjs/locale/it';\nimport { default as updateLocale } from 'dayjs/plugin/updateLocale';\nimport { default as weekOfYear } from 'dayjs/plugin/weekOfYear';\nimport { hash } from '@/utilities/functions/hash';\nimport { last } from '@/utilities/functions/last';\nimport { ref } from 'vue';\nimport { useLogger } from '@/composables/useLogger';\nimport { watch } from 'vue';\nimport DaySelector from './BaseDatePickerInputDaySelector.vue';\nimport Header from './BaseDatePickerHeader.vue';\nimport MonthSelector from './BaseDatePickerMonthSelector.vue';\nimport SlideTransition from '@/components/Transitions/Slide.vue';\nimport YearSelector from './BaseDatePickerYearSelector.vue';\n\ndayjs.extend(weekOfYear);\ndayjs.extend(updateLocale);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\ndayjs.locale(it);\n\nexport type BaseDatePickerProps = {\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Shows or hides the header of the component\n\t */\n\theader?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: boolean;\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n};\n\nconst emit = defineEmits<{\n\t(event: 'update:modelValue', value: any): void;\n}>();\n\nconst props = withDefaults(defineProps<BaseDatePickerProps>(), {\n\tfirstDayOfWeek: 1,\n});\n\ndayjs.updateLocale('it', {\n\tweekStart: props.firstDayOfWeek,\n});\n\nconst logger = useLogger();\nif (props.multiple && props.range) {\n\tlogger.throw('Date picker cannot be both multiple and range.');\n}\nif (props.multiple || props.range) {\n\tif (!Array.isArray(props.modelValue)) {\n\t\tlogger.throw(\n\t\t\t'Date picker is set to select multiple dates but modelValue is not an array.'\n\t\t);\n\t}\n}\n\nconst cursor = ref<Dayjs>(dayjs());\nconst setCursor = (value: typeof props.modelValue) => {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length) {\n\t\t\t\tconst datesAsNumber = value.map((el) => dayjs(el).valueOf());\n\t\t\t\tif (datesAsNumber.includes(cursor.value.valueOf())) {\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tcursor.value = dayjs(last(value)).startOf('day');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tcursor.value = dayjs(value).startOf('day');\n\t\t}\n\t} else {\n\t\tcursor.value = dayjs().startOf('day');\n\t}\n};\nsetCursor(props.modelValue);\ntype Mode = 'day' | 'month' | 'year';\nconst mode = ref<Mode>('day');\nconst toggleMode = (target: Mode) => {\n\tif (mode.value === target) mode.value = 'day';\n\telse mode.value = target;\n};\n\nconst updateMonth = (monthNumber: number) => {\n\tcursor.value = cursor.value.set('month', monthNumber);\n};\n\nconst increaseMonth = () => {\n\tcursor.value = cursor.value.add(1, 'month');\n};\nconst decreaseMonth = () => {\n\tcursor.value = cursor.value.subtract(1, 'month');\n};\n\nconst updateYear = (yearNumber: number) => {\n\tcursor.value = cursor.value.set('year', yearNumber);\n};\n\nconst lastValue = ref(props.modelValue);\nconst updateModelValue = (value: any) => {\n\tlastValue.value = value;\n\temit('update:modelValue', value);\n};\n\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (hash(props.modelValue) !== hash(lastValue.value)) {\n\t\t\tlastValue.value = props.modelValue;\n\t\t\tsetCursor(props.modelValue);\n\t\t}\n\t}\n);\n\nconst resetStatus = () => {\n\tmode.value = 'day';\n};\n\ndefineExpose({\n\tresetStatus,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDatePicker';\n</style>\n"],"names":["dayjs","weekOfYear","updateLocale","isSameOrAfter","isSameOrBefore","it","emit","__emit","props","__props","logger","useLogger","cursor","ref","setCursor","value","el","last","mode","toggleMode","target","updateMonth","monthNumber","increaseMonth","decreaseMonth","updateYear","yearNumber","lastValue","updateModelValue","watch","hash","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,IAAAA,EAAM,OAAOC,CAAU,GACvBD,EAAM,OAAOE,CAAY,GACzBF,EAAM,OAAOG,CAAa,GAC1BH,EAAM,OAAOI,CAAc,GAC3BJ,EAAM,OAAOK,CAAE;AAuDf,UAAMC,IAAOC,GAIPC,IAAQC;AAId,IAAAT,EAAM,aAAa,MAAM;AAAA,MACxB,WAAWQ,EAAM;AAAA,IAAA,CACjB;AAED,UAAME,IAASC;AACX,IAAAH,EAAM,YAAYA,EAAM,SAC3BE,EAAO,MAAM,gDAAgD,IAE1DF,EAAM,YAAYA,EAAM,WACtB,MAAM,QAAQA,EAAM,UAAU,KAC3BE,EAAA;AAAA,MACN;AAAA,IAAA;AAKG,UAAAE,IAASC,EAAWb,EAAA,CAAO,GAC3Bc,IAAY,CAACC,MAAmC;AACrD,UAAIA;AACC,YAAA,MAAM,QAAQA,CAAK;AACtB,cAAIA,EAAM,QAAQ;AAEjB,gBADsBA,EAAM,IAAI,CAACC,MAAOhB,EAAMgB,CAAE,EAAE,QAAA,CAAS,EACzC,SAASJ,EAAO,MAAM,QAAS,CAAA;AAChD;AAEA,YAAAA,EAAO,QAAQZ,EAAMiB,EAAKF,CAAK,CAAC,EAAE,QAAQ,KAAK;AAC/C;AAAA,UAEF;AAAA;AAEA,UAAAH,EAAO,QAAQZ,EAAMe,CAAK,EAAE,QAAQ,KAAK;AAAA;AAG1C,QAAAH,EAAO,QAAQZ,EAAQ,EAAA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