bitboss-ui 0.2.76 → 1.0.0

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 (491) hide show
  1. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +4 -0
  2. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -3
  3. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +4 -1
  4. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +10 -4
  5. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +9 -0
  6. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -0
  7. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +4 -0
  8. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +10 -3
  9. package/dist/components/BaseRating/BaseRating.vue.d.ts +5 -1
  10. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -0
  11. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +48 -11
  12. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +6 -3
  13. package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -0
  14. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +10 -6
  15. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +4 -0
  16. package/dist/components/BbButton/BbButton.vue.d.ts +12 -0
  17. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +35 -27
  18. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +38 -24
  19. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +15 -3
  20. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +33 -25
  21. package/dist/components/BbRadio/BbRadio.vue.d.ts +33 -25
  22. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +38 -24
  23. package/dist/components/BbRating/BbRating.vue.d.ts +9 -1
  24. package/dist/components/BbSelect/BbSelect.vue.d.ts +18 -4
  25. package/dist/components/BbSlider/BbSlider.vue.d.ts +44 -11
  26. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +9 -3
  27. package/dist/components/BbTag/BbTag.vue.d.ts +11 -3
  28. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +33 -25
  29. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +9 -1
  30. package/dist/composables/useQueue.d.ts +58 -0
  31. package/dist/index.js +186 -185
  32. package/dist/index.js.map +1 -1
  33. package/dist/index10.js +65 -1
  34. package/dist/index10.js.map +1 -1
  35. package/dist/index100.js +227 -1
  36. package/dist/index100.js.map +1 -1
  37. package/dist/index101.js +1 -437
  38. package/dist/index101.js.map +1 -1
  39. package/dist/index102.js +437 -1
  40. package/dist/index102.js.map +1 -1
  41. package/dist/index103.js +1 -94
  42. package/dist/index103.js.map +1 -1
  43. package/dist/index104.js +103 -1
  44. package/dist/index104.js.map +1 -1
  45. package/dist/index105.js +1 -88
  46. package/dist/index105.js.map +1 -1
  47. package/dist/index106.js +97 -1
  48. package/dist/index106.js.map +1 -1
  49. package/dist/index107.js +1 -89
  50. package/dist/index107.js.map +1 -1
  51. package/dist/index108.js +98 -1
  52. package/dist/index108.js.map +1 -1
  53. package/dist/index109.js +1 -29
  54. package/dist/index109.js.map +1 -1
  55. package/dist/index11.js +1 -131
  56. package/dist/index11.js.map +1 -1
  57. package/dist/index110.js +29 -1
  58. package/dist/index110.js.map +1 -1
  59. package/dist/index111.js +1 -151
  60. package/dist/index111.js.map +1 -1
  61. package/dist/index112.js +151 -1
  62. package/dist/index112.js.map +1 -1
  63. package/dist/index113.js +1 -122
  64. package/dist/index113.js.map +1 -1
  65. package/dist/index114.js +122 -1
  66. package/dist/index114.js.map +1 -1
  67. package/dist/index115.js +1 -46
  68. package/dist/index115.js.map +1 -1
  69. package/dist/index116.js +40 -33
  70. package/dist/index116.js.map +1 -1
  71. package/dist/index117.js +32 -39
  72. package/dist/index117.js.map +1 -1
  73. package/dist/index118.js +39 -42
  74. package/dist/index118.js.map +1 -1
  75. package/dist/index119.js +43 -39
  76. package/dist/index119.js.map +1 -1
  77. package/dist/index12.js +128 -1
  78. package/dist/index12.js.map +1 -1
  79. package/dist/index120.js +43 -2
  80. package/dist/index120.js.map +1 -1
  81. package/dist/index121.js +2 -21
  82. package/dist/index121.js.map +1 -1
  83. package/dist/index122.js +21 -2
  84. package/dist/index122.js.map +1 -1
  85. package/dist/index123.js +2 -224
  86. package/dist/index123.js.map +1 -1
  87. package/dist/index124.js +224 -2
  88. package/dist/index124.js.map +1 -1
  89. package/dist/index125.js +2 -18
  90. package/dist/index125.js.map +1 -1
  91. package/dist/index126.js +16 -10
  92. package/dist/index126.js.map +1 -1
  93. package/dist/index127.js +12 -24
  94. package/dist/index127.js.map +1 -1
  95. package/dist/index128.js +24 -5
  96. package/dist/index128.js.map +1 -1
  97. package/dist/index129.js +5 -9
  98. package/dist/index129.js.map +1 -1
  99. package/dist/index13.js +1 -159
  100. package/dist/index13.js.map +1 -1
  101. package/dist/index130.js +8 -5
  102. package/dist/index130.js.map +1 -1
  103. package/dist/index131.js +5 -69
  104. package/dist/index131.js.map +1 -1
  105. package/dist/index132.js +70 -3
  106. package/dist/index132.js.map +1 -1
  107. package/dist/index133.js +2 -2
  108. package/dist/index134.js +2 -2
  109. package/dist/index135.js +2 -2
  110. package/dist/index136.js +2 -2
  111. package/dist/index137.js +2 -2
  112. package/dist/index138.js +2 -2
  113. package/dist/index139.js +2 -2
  114. package/dist/index14.js +161 -1
  115. package/dist/index14.js.map +1 -1
  116. package/dist/index140.js +2 -2
  117. package/dist/index141.js +2 -2
  118. package/dist/index142.js +2 -2
  119. package/dist/index143.js +2 -2
  120. package/dist/index144.js +2 -2
  121. package/dist/index145.js +2 -2
  122. package/dist/index146.js +2 -2
  123. package/dist/index147.js +2 -2
  124. package/dist/index148.js +2 -2
  125. package/dist/index149.js +2 -2
  126. package/dist/index15.js +1 -457
  127. package/dist/index15.js.map +1 -1
  128. package/dist/index150.js +2 -2
  129. package/dist/index151.js +2 -2
  130. package/dist/index152.js +2 -2
  131. package/dist/index153.js +2 -2
  132. package/dist/index154.js +2 -2
  133. package/dist/index155.js +2 -2
  134. package/dist/index156.js +2 -2
  135. package/dist/index157.js +2 -2
  136. package/dist/index158.js +5 -1
  137. package/dist/index158.js.map +1 -1
  138. package/dist/index159.js +1 -5
  139. package/dist/index159.js.map +1 -1
  140. package/dist/index16.js +514 -1
  141. package/dist/index16.js.map +1 -1
  142. package/dist/index160.js +5 -1
  143. package/dist/index160.js.map +1 -1
  144. package/dist/index161.js +1 -5
  145. package/dist/index161.js.map +1 -1
  146. package/dist/index162.js +2 -2
  147. package/dist/index163.js +2 -2
  148. package/dist/index164.js +2 -2
  149. package/dist/index165.js +2 -2
  150. package/dist/index166.js +2 -2
  151. package/dist/index167.js +3 -2
  152. package/dist/index167.js.map +1 -1
  153. package/dist/index168.js +2 -3
  154. package/dist/index168.js.map +1 -1
  155. package/dist/index169.js +5 -1
  156. package/dist/index169.js.map +1 -1
  157. package/dist/index17.js +1 -211
  158. package/dist/index17.js.map +1 -1
  159. package/dist/index170.js +1 -4
  160. package/dist/index170.js.map +1 -1
  161. package/dist/index171.js +2 -3
  162. package/dist/index171.js.map +1 -1
  163. package/dist/index172.js +2 -2
  164. package/dist/index173.js +2 -2
  165. package/dist/index174.js +2 -2
  166. package/dist/index175.js +2 -2
  167. package/dist/index176.js +2 -2
  168. package/dist/index177.js +2 -2
  169. package/dist/index178.js +2 -2
  170. package/dist/index179.js +2 -2
  171. package/dist/index18.js +220 -1
  172. package/dist/index18.js.map +1 -1
  173. package/dist/index180.js +2 -2
  174. package/dist/index181.js +2 -2
  175. package/dist/index182.js +2 -2
  176. package/dist/index183.js +5 -1
  177. package/dist/index183.js.map +1 -1
  178. package/dist/index184.js +1 -5
  179. package/dist/index184.js.map +1 -1
  180. package/dist/index185.js +5 -1
  181. package/dist/index185.js.map +1 -1
  182. package/dist/index186.js +1 -5
  183. package/dist/index186.js.map +1 -1
  184. package/dist/index187.js +2 -2
  185. package/dist/index188.js +2 -2
  186. package/dist/index189.js +2 -2
  187. package/dist/index19.js +1 -239
  188. package/dist/index19.js.map +1 -1
  189. package/dist/index190.js +2 -2
  190. package/dist/index191.js +2 -2
  191. package/dist/index192.js +2 -2
  192. package/dist/index193.js +2 -2
  193. package/dist/index194.js +2 -2
  194. package/dist/index195.js +2 -2
  195. package/dist/index196.js +3 -10
  196. package/dist/index196.js.map +1 -1
  197. package/dist/index198.js +2 -3
  198. package/dist/index198.js.map +1 -1
  199. package/dist/index199.js +4 -3
  200. package/dist/index199.js.map +1 -1
  201. package/dist/index2.js +1 -42
  202. package/dist/index2.js.map +1 -1
  203. package/dist/index20.js +239 -1
  204. package/dist/index20.js.map +1 -1
  205. package/dist/index200.js +5 -368
  206. package/dist/index200.js.map +1 -1
  207. package/dist/index201.js +13 -131
  208. package/dist/index201.js.map +1 -1
  209. package/dist/index202.js +16 -5
  210. package/dist/index202.js.map +1 -1
  211. package/dist/index203.js +3 -3
  212. package/dist/index204.js +20 -2
  213. package/dist/index204.js.map +1 -1
  214. package/dist/index205.js +29 -2
  215. package/dist/index205.js.map +1 -1
  216. package/dist/index206.js +8 -174
  217. package/dist/index206.js.map +1 -1
  218. package/dist/index207.js +2 -23
  219. package/dist/index207.js.map +1 -1
  220. package/dist/index208.js +111 -363
  221. package/dist/index208.js.map +1 -1
  222. package/dist/index209.js +131 -13
  223. package/dist/index209.js.map +1 -1
  224. package/dist/index21.js +1 -115
  225. package/dist/index21.js.map +1 -1
  226. package/dist/index210.js +2 -16
  227. package/dist/index210.js.map +1 -1
  228. package/dist/index211.js +35 -20
  229. package/dist/index211.js.map +1 -1
  230. package/dist/index212.js +172 -27
  231. package/dist/index212.js.map +1 -1
  232. package/dist/index213.js +6 -8
  233. package/dist/index213.js.map +1 -1
  234. package/dist/index214.js +346 -213
  235. package/dist/index214.js.map +1 -1
  236. package/dist/index215.js +373 -3
  237. package/dist/index215.js.map +1 -1
  238. package/dist/index216.js +3 -35
  239. package/dist/index216.js.map +1 -1
  240. package/dist/index217.js +3 -6
  241. package/dist/index217.js.map +1 -1
  242. package/dist/index218.js +235 -2
  243. package/dist/index218.js.map +1 -1
  244. package/dist/index219.js +3 -2
  245. package/dist/index219.js.map +1 -1
  246. package/dist/index22.js +131 -1
  247. package/dist/index22.js.map +1 -1
  248. package/dist/index220.js +2 -4
  249. package/dist/index220.js.map +1 -1
  250. package/dist/index221.js +8 -119
  251. package/dist/index221.js.map +1 -1
  252. package/dist/index222.js +2 -2
  253. package/dist/index222.js.map +1 -1
  254. package/dist/index224.js +23 -6
  255. package/dist/index224.js.map +1 -1
  256. package/dist/index225.js +4 -17
  257. package/dist/index225.js.map +1 -1
  258. package/dist/index226.js +294 -78
  259. package/dist/index226.js.map +1 -1
  260. package/dist/index227.js +6 -2
  261. package/dist/index227.js.map +1 -1
  262. package/dist/index228.js +2 -160
  263. package/dist/index228.js.map +1 -1
  264. package/dist/index229.js +4 -1
  265. package/dist/index229.js.map +1 -1
  266. package/dist/index23.js +1 -115
  267. package/dist/index23.js.map +1 -1
  268. package/dist/index230.js +2 -5
  269. package/dist/index230.js.map +1 -1
  270. package/dist/index231.js +2 -69
  271. package/dist/index231.js.map +1 -1
  272. package/dist/index232.js +2 -224
  273. package/dist/index232.js.map +1 -1
  274. package/dist/index233.js +2 -258
  275. package/dist/index233.js.map +1 -1
  276. package/dist/index234.js +78 -5
  277. package/dist/index234.js.map +1 -1
  278. package/dist/index235.js +6 -2
  279. package/dist/index235.js.map +1 -1
  280. package/dist/index236.js +17 -295
  281. package/dist/index236.js.map +1 -1
  282. package/dist/index237.js +2 -2
  283. package/dist/index238.js +106 -2
  284. package/dist/index238.js.map +1 -1
  285. package/dist/index239.js +428 -110
  286. package/dist/index239.js.map +1 -1
  287. package/dist/index24.js +119 -1
  288. package/dist/index24.js.map +1 -1
  289. package/dist/index240.js +218 -100
  290. package/dist/index240.js.map +1 -1
  291. package/dist/index241.js +255 -12
  292. package/dist/index241.js.map +1 -1
  293. package/dist/index242.js +117 -2
  294. package/dist/index242.js.map +1 -1
  295. package/dist/index243.js +200 -2
  296. package/dist/index243.js.map +1 -1
  297. package/dist/index244.js +2 -2
  298. package/dist/index244.js.map +1 -1
  299. package/dist/index245.js +69 -2
  300. package/dist/index245.js.map +1 -1
  301. package/dist/index246.js +5 -435
  302. package/dist/index246.js.map +1 -1
  303. package/dist/index247.js +163 -88
  304. package/dist/index247.js.map +1 -1
  305. package/dist/index248.js +1 -202
  306. package/dist/index248.js.map +1 -1
  307. package/dist/index249.js +2 -4
  308. package/dist/index249.js.map +1 -1
  309. package/dist/index25.js +1 -92
  310. package/dist/index25.js.map +1 -1
  311. package/dist/index250.js +89 -2
  312. package/dist/index250.js.map +1 -1
  313. package/dist/index251.js +15 -4
  314. package/dist/index251.js.map +1 -1
  315. package/dist/index252.js +4 -4
  316. package/dist/index252.js.map +1 -1
  317. package/dist/index253.js +4 -61
  318. package/dist/index253.js.map +1 -1
  319. package/dist/index254.js +61 -2
  320. package/dist/index254.js.map +1 -1
  321. package/dist/index255.js +2 -3
  322. package/dist/index255.js.map +1 -1
  323. package/dist/index256.js +3 -2
  324. package/dist/index256.js.map +1 -1
  325. package/dist/index257.js +5 -0
  326. package/dist/index257.js.map +1 -0
  327. package/dist/index26.js +94 -1
  328. package/dist/index26.js.map +1 -1
  329. package/dist/index27.js +1 -157
  330. package/dist/index27.js.map +1 -1
  331. package/dist/index28.js +160 -1
  332. package/dist/index28.js.map +1 -1
  333. package/dist/index29.js +1 -124
  334. package/dist/index29.js.map +1 -1
  335. package/dist/index3.js +38 -76
  336. package/dist/index3.js.map +1 -1
  337. package/dist/index30.js +126 -1
  338. package/dist/index30.js.map +1 -1
  339. package/dist/index31.js +1 -691
  340. package/dist/index31.js.map +1 -1
  341. package/dist/index32.js +693 -1
  342. package/dist/index32.js.map +1 -1
  343. package/dist/index33.js +1 -145
  344. package/dist/index33.js.map +1 -1
  345. package/dist/index34.js +302 -1
  346. package/dist/index34.js.map +1 -1
  347. package/dist/index35.js +1 -118
  348. package/dist/index35.js.map +1 -1
  349. package/dist/index36.js +120 -1
  350. package/dist/index36.js.map +1 -1
  351. package/dist/index37.js +1 -154
  352. package/dist/index37.js.map +1 -1
  353. package/dist/index38.js +156 -1
  354. package/dist/index38.js.map +1 -1
  355. package/dist/index39.js +1 -83
  356. package/dist/index39.js.map +1 -1
  357. package/dist/index4.js +78 -62
  358. package/dist/index4.js.map +1 -1
  359. package/dist/index40.js +87 -1
  360. package/dist/index40.js.map +1 -1
  361. package/dist/index41.js +1 -61
  362. package/dist/index41.js.map +1 -1
  363. package/dist/index42.js +64 -1
  364. package/dist/index42.js.map +1 -1
  365. package/dist/index43.js +1 -65
  366. package/dist/index43.js.map +1 -1
  367. package/dist/index44.js +65 -1
  368. package/dist/index44.js.map +1 -1
  369. package/dist/index45.js +1 -96
  370. package/dist/index45.js.map +1 -1
  371. package/dist/index46.js +96 -1
  372. package/dist/index46.js.map +1 -1
  373. package/dist/index47.js +1 -61
  374. package/dist/index47.js.map +1 -1
  375. package/dist/index48.js +61 -1
  376. package/dist/index48.js.map +1 -1
  377. package/dist/index49.js +1 -49
  378. package/dist/index49.js.map +1 -1
  379. package/dist/index5.js +60 -38
  380. package/dist/index5.js.map +1 -1
  381. package/dist/index50.js +49 -1
  382. package/dist/index50.js.map +1 -1
  383. package/dist/index51.js +1 -62
  384. package/dist/index51.js.map +1 -1
  385. package/dist/index52.js +62 -1
  386. package/dist/index52.js.map +1 -1
  387. package/dist/index53.js +1 -45
  388. package/dist/index53.js.map +1 -1
  389. package/dist/index54.js +69 -1
  390. package/dist/index54.js.map +1 -1
  391. package/dist/index55.js +1 -89
  392. package/dist/index55.js.map +1 -1
  393. package/dist/index56.js +98 -1
  394. package/dist/index56.js.map +1 -1
  395. package/dist/index57.js +1 -120
  396. package/dist/index57.js.map +1 -1
  397. package/dist/index58.js +129 -1
  398. package/dist/index58.js.map +1 -1
  399. package/dist/index59.js +1 -85
  400. package/dist/index59.js.map +1 -1
  401. package/dist/index6.js +37 -171
  402. package/dist/index6.js.map +1 -1
  403. package/dist/index60.js +85 -1
  404. package/dist/index60.js.map +1 -1
  405. package/dist/index61.js +1 -88
  406. package/dist/index61.js.map +1 -1
  407. package/dist/index62.js +98 -1
  408. package/dist/index62.js.map +1 -1
  409. package/dist/index63.js +1 -59
  410. package/dist/index63.js.map +1 -1
  411. package/dist/index64.js +59 -1
  412. package/dist/index64.js.map +1 -1
  413. package/dist/index65.js +1 -313
  414. package/dist/index65.js.map +1 -1
  415. package/dist/index66.js +313 -1
  416. package/dist/index66.js.map +1 -1
  417. package/dist/index67.js +1 -129
  418. package/dist/index67.js.map +1 -1
  419. package/dist/index68.js +129 -1
  420. package/dist/index68.js.map +1 -1
  421. package/dist/index69.js +1 -225
  422. package/dist/index69.js.map +1 -1
  423. package/dist/index7.js +172 -18
  424. package/dist/index7.js.map +1 -1
  425. package/dist/index70.js +225 -1
  426. package/dist/index70.js.map +1 -1
  427. package/dist/index71.js +1 -24
  428. package/dist/index71.js.map +1 -1
  429. package/dist/index72.js +19 -41
  430. package/dist/index72.js.map +1 -1
  431. package/dist/index73.js +37 -86
  432. package/dist/index73.js.map +1 -1
  433. package/dist/index74.js +104 -1
  434. package/dist/index74.js.map +1 -1
  435. package/dist/index75.js +1 -227
  436. package/dist/index75.js.map +1 -1
  437. package/dist/index76.js +227 -1
  438. package/dist/index76.js.map +1 -1
  439. package/dist/index77.js +1 -143
  440. package/dist/index77.js.map +1 -1
  441. package/dist/index78.js +165 -1
  442. package/dist/index78.js.map +1 -1
  443. package/dist/index79.js +1 -213
  444. package/dist/index79.js.map +1 -1
  445. package/dist/index8.js +18 -192
  446. package/dist/index8.js.map +1 -1
  447. package/dist/index80.js +213 -1
  448. package/dist/index80.js.map +1 -1
  449. package/dist/index81.js +1 -35
  450. package/dist/index81.js.map +1 -1
  451. package/dist/index82.js +35 -1
  452. package/dist/index82.js.map +1 -1
  453. package/dist/index83.js +1 -83
  454. package/dist/index83.js.map +1 -1
  455. package/dist/index84.js +92 -1
  456. package/dist/index84.js.map +1 -1
  457. package/dist/index85.js +1 -120
  458. package/dist/index85.js.map +1 -1
  459. package/dist/index86.js +129 -1
  460. package/dist/index86.js.map +1 -1
  461. package/dist/index87.js +1 -83
  462. package/dist/index87.js.map +1 -1
  463. package/dist/index88.js +92 -1
  464. package/dist/index88.js.map +1 -1
  465. package/dist/index89.js +1 -30
  466. package/dist/index89.js.map +1 -1
  467. package/dist/index9.js +192 -61
  468. package/dist/index9.js.map +1 -1
  469. package/dist/index90.js +30 -1
  470. package/dist/index90.js.map +1 -1
  471. package/dist/index91.js +1 -157
  472. package/dist/index91.js.map +1 -1
  473. package/dist/index92.js +166 -1
  474. package/dist/index92.js.map +1 -1
  475. package/dist/index93.js +1 -86
  476. package/dist/index93.js.map +1 -1
  477. package/dist/index94.js +112 -1
  478. package/dist/index94.js.map +1 -1
  479. package/dist/index95.js +1 -89
  480. package/dist/index95.js.map +1 -1
  481. package/dist/index96.js +98 -1
  482. package/dist/index96.js.map +1 -1
  483. package/dist/index97.js +1 -119
  484. package/dist/index97.js.map +1 -1
  485. package/dist/index98.js +129 -1
  486. package/dist/index98.js.map +1 -1
  487. package/dist/index99.js +1 -227
  488. package/dist/index99.js.map +1 -1
  489. package/dist/style.css +1 -1
  490. package/dist/utilities/functions/last.d.ts +1 -1
  491. package/package.json +1 -1
package/dist/index6.js CHANGED
@@ -1,177 +1,43 @@
1
- import { ref as _, computed as T, watch as h } from "vue";
2
- import { deepEqual as j } from "./index123.js";
3
- import { isNotNil as o } from "./index124.js";
4
- import { useItemText as D } from "./index125.js";
5
- import { useItemValue as G } from "./index126.js";
6
- const U = ({
7
- /** Component dependencies */
8
- dependencies: q,
9
- /** Time the component will wait before triggering a response from changed dependencies */
10
- depsDebounceTime: b,
11
- /** Boolean, flag if the component is disabled, as a whole */
12
- disabled: g,
13
- /** Function used to emit update:modelValue */
14
- emitter: l,
15
- /** Flag to enforce coherence between the items and modelValue. If `enforceCoherence` is active whenever a change made to props would result in a modelValue that is not present among the selectable items, it will be reset */
16
- enforceCoherence: f,
17
- /** ID of the component */
18
- id: E,
19
- /** Flag to trigger immediate search for the items on first load. If set to false items are not retrieved until a change to props happens or getOptions is called */
20
- immediate: S,
21
- /** Items from which to compute options */
22
- initialItems: i,
23
- /** Transformer to obtain a text label for the item */
24
- itemText: k,
25
- /** Transformer to obtain a value for the option */
26
- itemValue: B,
27
- /** Strategy used to identify unique objects in the component */
28
- matchStrategy: d,
29
- /** modelValue of the component */
30
- modelValue: u,
31
- /** Time the component will wait before triggering a response from changed modelValue */
32
- modelValueDebounceTime: P,
33
- multiple: p
34
- }) => {
35
- const y = _(0), A = _([]), v = async ({ prefill: e = !1 }) => {
36
- let t = [];
37
- Array.isArray(i.value) ? t = i.value : typeof i.value == "function" && (y.value++, t = await i.value(e, u.value), y.value--), A.value = t;
38
- }, { getItemText: R } = D(), { getItemValue: W } = G(), w = T(() => A.value.map((e, t) => {
39
- const n = R(e, k), r = W(e, B);
40
- if (r === void 0)
41
- throw new Error(
42
- 'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
43
- );
44
- const s = JSON.stringify(r), c = e, I = !!(g != null && g.value || e != null && e.disabled);
45
- let x;
46
- (E || e != null && e.id) && (x = [E, o(e == null ? void 0 : e.id) ? e.id : s.replace(/\W/g, "_")].filter(o).join("_"));
47
- const J = z.value.get(r);
48
- return o(J) ? {
49
- disabled: I,
50
- id: x,
51
- index: t,
52
- jsonValue: s,
53
- original: c,
54
- selected: !0,
55
- selectedIndex: J,
56
- text: n,
57
- value: r
58
- } : {
59
- disabled: I,
60
- id: x,
61
- index: t,
62
- jsonValue: s,
63
- original: c,
64
- selected: !1,
65
- selectedIndex: J,
66
- text: n,
67
- value: r
68
- };
69
- })), a = T(() => {
70
- if (d === "string") {
71
- const e = w.value.reduce(
72
- (t, n) => (t[n.jsonValue] = n, t),
73
- {}
74
- );
75
- return {
76
- get: (t) => e[JSON.stringify(t)]
77
- };
78
- } else if (d === "equality") {
79
- const e = w.value.map((t) => [
80
- t.value,
81
- t
82
- ]);
83
- return {
84
- get: (t) => {
85
- var n;
86
- return (n = e.find((r) => j(r[0], t))) == null ? void 0 : n[1];
87
- }
88
- };
89
- } else
90
- throw new Error("No match strategy has been defined");
91
- }), z = T(() => {
92
- if (d === "string") {
93
- const e = {};
94
- return [].concat(u.value).forEach((t, n) => {
95
- e[JSON.stringify(t)] = n;
96
- }), {
97
- get: (t) => e[JSON.stringify(t)]
98
- };
99
- } else if (d === "equality") {
100
- const e = [].concat(u.value).map((t, n) => [t, n]);
101
- return {
102
- get: (t) => {
103
- var n;
104
- return (n = e.find((r) => j(r[0], t))) == null ? void 0 : n[1];
105
- }
106
- };
107
- } else
108
- throw new Error("No match strategy has been defined");
109
- });
110
- let N, F = !1;
111
- h(
112
- u,
113
- (e, t) => {
114
- N && clearTimeout(N), N = setTimeout(
115
- async () => {
116
- if (F = !0, p) {
117
- if (!Array.isArray(u.value))
118
- throw new Error("Passed modelValue is not an array.");
119
- let n = u.value.every(
120
- (r) => a.value.get(r)
121
- );
122
- if ((!n || t === void 0) && (await v({ prefill: !0 }), n = u.value.every(
123
- (r) => a.value.get(r)
124
- )), !n) {
125
- const r = e.filter((s) => a.value.get(s));
126
- f.value && l(r);
127
- }
128
- } else {
129
- let n = a.value.get(u.value);
130
- (!n && o(u.value) || t === void 0) && await v({ prefill: !0 }), n = a.value.get(u.value), n || f.value && o(e) && l(null);
131
- }
132
- },
133
- F || !S ? P : 0
134
- );
1
+ import { wait as p } from "./index123.js";
2
+ import { reactive as d } from "vue";
3
+ import { useId as h } from "./index8.js";
4
+ const i = d({
5
+ stack: []
6
+ }), b = () => {
7
+ const c = (t) => i.stack = i.stack.filter((o) => o.id !== t);
8
+ return {
9
+ toast: (t) => {
10
+ const o = h().id.value;
11
+ let l, e, n, s, f;
12
+ const u = 6e3;
13
+ if (typeof t == "string")
14
+ e = t;
15
+ else {
16
+ if (typeof t.timeout == "number" && t.timeout <= 0)
17
+ throw new Error("Toast messages cannot have a zero or less timeout");
18
+ n = t.icon, f = t.showClose, e = t.text, s = t.theme, l = t.title;
19
+ }
20
+ if (i.stack = i.stack.concat({
21
+ icon: n,
22
+ id: o,
23
+ showClose: f,
24
+ text: e,
25
+ theme: s,
26
+ title: l
27
+ }), typeof t == "object" && !t.persistent || typeof t == "string") {
28
+ let r;
29
+ typeof t == "object" && t.timeout ? r = t.timeout : r = u, p(r).then(() => {
30
+ c(o);
31
+ });
32
+ }
33
+ return o;
135
34
  },
136
- // Immediate here triggers first search for items
137
- { immediate: S, deep: !0 }
138
- ), h(i, async (e, t) => {
139
- if (typeof e == "function" || // Circumvent arrays defined in the template by the parent
140
- JSON.stringify(e) !== JSON.stringify(t))
141
- if (await v({ prefill: !0 }), p) {
142
- if (!u.value.every(
143
- (r) => a.value.get(r)
144
- ) && f) {
145
- const r = u.value.filter((s) => a.value.get(s));
146
- l(r);
147
- }
148
- } else
149
- !a.value.get(u.value) && f && o(u.value) && l(null);
150
- });
151
- let O;
152
- return h(
153
- q,
154
- (e, t) => {
155
- JSON.stringify(e) !== JSON.stringify(t) && (O && clearTimeout(O), O = setTimeout(async () => {
156
- if (await v({ prefill: !0 }), p) {
157
- if (!u.value.every(
158
- (r) => a.value.get(r)
159
- ) && f) {
160
- const r = u.value.filter((s) => a.value.get(s));
161
- l(r);
162
- }
163
- } else
164
- !a.value.get(u.value) && f && o(u.value) && l(null);
165
- }, b));
166
- },
167
- { deep: !0 }
168
- ), {
169
- getOptions: v,
170
- loading: y,
171
- options: w
35
+ dismiss: c,
36
+ dismissAll: () => i.stack = []
172
37
  };
173
38
  };
174
39
  export {
175
- U as useOptions
40
+ i as state,
41
+ b as useToast
176
42
  };
177
43
  //# sourceMappingURL=index6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index6.js","sources":["../src/composables/useOptions.ts"],"sourcesContent":["import { computed, ref, watch } from 'vue';\nimport { deepEqual } from 'fast-equals';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { useItemText } from '@/composables/useItemText';\nimport { useItemValue } from '@/composables/useItemValue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Ref } from 'vue';\n\nexport type BaseOption = {\n\tdisabled?: boolean;\n\tid?: string;\n\tjsonValue: string;\n\tname?: string;\n\toriginal: any;\n\treadonly?: boolean;\n\ttext: string;\n\tvalue: any;\n};\n\nexport type Option = BaseOption & { index: number } & (\n\t\t| {\n\t\t\t\tselected: true;\n\t\t\t\tselectedIndex: number;\n\t\t }\n\t\t| {\n\t\t\t\tselected: false;\n\t\t\t\tselectedIndex: undefined;\n\t\t }\n\t);\n\ntype Params = {\n\tdependencies: Ref<any[] | undefined>;\n\tdepsDebounceTime: number;\n\tdisabled?: Ref<boolean>;\n\temitter: (...args: any[]) => any;\n\tenforceCoherence: Ref<boolean>;\n\tid?: string;\n\timmediate: boolean;\n\tinitialItems: Ref<\n\t\t| any[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<any[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => any[])\n\t>;\n\titemText?: string | ((item: any) => string);\n\titemValue?: string | ((item: any) => any);\n\tmatchStrategy: Exclude<CommonProps['matchStrategy'], undefined>;\n\tmodelValue: Ref<any>;\n\tmodelValueDebounceTime: number;\n\tmultiple?: boolean;\n};\n\nexport const useOptions = ({\n\t/** Component dependencies */\n\tdependencies,\n\t/** Time the component will wait before triggering a response from changed dependencies */\n\tdepsDebounceTime,\n\t/** Boolean, flag if the component is disabled, as a whole */\n\tdisabled,\n\t/** Function used to emit update:modelValue */\n\temitter,\n\t/** Flag to enforce coherence between the items and modelValue. If `enforceCoherence` is active whenever a change made to props would result in a modelValue that is not present among the selectable items, it will be reset */\n\tenforceCoherence,\n\t/** ID of the component */\n\tid,\n\t/** Flag to trigger immediate search for the items on first load. If set to false items are not retrieved until a change to props happens or getOptions is called */\n\timmediate,\n\t/** Items from which to compute options */\n\tinitialItems,\n\t/** Transformer to obtain a text label for the item */\n\titemText,\n\t/** Transformer to obtain a value for the option */\n\titemValue,\n\t/** Strategy used to identify unique objects in the component */\n\tmatchStrategy,\n\t/** modelValue of the component */\n\tmodelValue,\n\t/** Time the component will wait before triggering a response from changed modelValue */\n\tmodelValueDebounceTime,\n\tmultiple,\n}: Params) => {\n\t/**\n\t * Loading is a counter so it can be accumulated\n\t */\n\tconst loading = ref(0);\n\n\t/**\n\t * Items as retrieved from outside\n\t */\n\tconst internalItems = ref<BaseOption[]>([]);\n\n\t/**\n\t * The option getter\n\t * @param options\n\t */\n\tconst getOptions = async ({ prefill = false }) => {\n\t\tlet items = [];\n\t\tif (Array.isArray(initialItems.value)) {\n\t\t\titems = initialItems.value;\n\t\t} else {\n\t\t\tif (typeof initialItems.value === 'function') {\n\t\t\t\tloading.value++;\n\t\t\t\titems = await initialItems.value(prefill, modelValue.value);\n\t\t\t\tloading.value--;\n\t\t\t}\n\t\t}\n\t\tinternalItems.value = items;\n\t};\n\n\t/**\n\t * Map the items returned from outside to a set of useful information.\n\t * If a value can't be obtained throw an error\n\t */\n\tconst { getItemText } = useItemText();\n\tconst { getItemValue } = useItemValue();\n\tconst options = computed<Option[]>(() => {\n\t\treturn internalItems.value.map((item: any, index: number) => {\n\t\t\tconst text = getItemText(item, itemText);\n\t\t\tconst value = getItemValue(item, itemValue);\n\n\t\t\t// Undefined is not JSONable\n\t\t\tif (value === undefined)\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'The result of extracting \"value\" from option was undefined. Affected item is ' +\n\t\t\t\t\t\tJSON.stringify(item) +\n\t\t\t\t\t\t' please check itemValue property is correct.'\n\t\t\t\t);\n\n\t\t\tconst jsonValue = JSON.stringify(value);\n\t\t\tconst original = item;\n\t\t\tconst _disabled = !!(disabled?.value || item?.disabled);\n\n\t\t\tlet _id;\n\n\t\t\t// Props that are handled externally\n\t\t\tif (id || item?.id) {\n\t\t\t\t_id = [id, isNotNil(item?.id) ? item.id : jsonValue.replace(/\\W/g, '_')]\n\t\t\t\t\t.filter(isNotNil)\n\t\t\t\t\t.join('_');\n\t\t\t}\n\n\t\t\tconst selectedIndex = modelValueIndexed.value.get(value);\n\n\t\t\t// Workaround for TS discriminated union not being resolved\n\t\t\tif (isNotNil(selectedIndex))\n\t\t\t\treturn {\n\t\t\t\t\tdisabled: _disabled,\n\t\t\t\t\tid: _id,\n\t\t\t\t\tindex,\n\t\t\t\t\tjsonValue,\n\t\t\t\t\toriginal,\n\t\t\t\t\tselected: true,\n\t\t\t\t\tselectedIndex,\n\t\t\t\t\ttext,\n\t\t\t\t\tvalue,\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tdisabled: _disabled,\n\t\t\t\tid: _id,\n\t\t\t\tindex,\n\t\t\t\tjsonValue,\n\t\t\t\toriginal,\n\t\t\t\tselected: false,\n\t\t\t\tselectedIndex,\n\t\t\t\ttext,\n\t\t\t\tvalue,\n\t\t\t};\n\t\t});\n\t});\n\n\t/**\n\t * Indexes options by their value\n\t * (using JSON to circumvent identical objects not being equal in JS)\n\t */\n\tconst optionsIndexedByValue = computed(() => {\n\t\tif (matchStrategy === 'string') {\n\t\t\tconst indexed = options.value.reduce(\n\t\t\t\t(acc: { [key: string]: BaseOption }, curr: BaseOption) => {\n\t\t\t\t\tacc[curr.jsonValue] = curr;\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tget: (key: any) => {\n\t\t\t\t\treturn indexed[JSON.stringify(key)];\n\t\t\t\t},\n\t\t\t};\n\t\t} else if (matchStrategy === 'equality') {\n\t\t\tconst indexed: [any, BaseOption][] = options.value.map((option) => [\n\t\t\t\toption.value,\n\t\t\t\toption,\n\t\t\t]);\n\n\t\t\treturn {\n\t\t\t\tget: (key: any) => {\n\t\t\t\t\treturn indexed.find((pairs) => deepEqual(pairs[0], key))?.[1];\n\t\t\t\t},\n\t\t\t};\n\t\t} else {\n\t\t\tthrow new Error('No match strategy has been defined');\n\t\t}\n\t});\n\n\t/**\n\t * Indexes modelValue to a map so when can easily know which values are selected\n\t * (using JSON to circumvent identical object not being equal in JS)\n\t */\n\tconst modelValueIndexed = computed(() => {\n\t\tif (matchStrategy === 'string') {\n\t\t\tconst map: { [key: string]: number } = {};\n\t\t\t[].concat(modelValue.value).forEach((value: any, index: number) => {\n\t\t\t\tmap[JSON.stringify(value)] = index;\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tget: (value: any) => map[JSON.stringify(value)],\n\t\t\t};\n\t\t} else if (matchStrategy === 'equality') {\n\t\t\tconst map = []\n\t\t\t\t.concat(modelValue.value)\n\t\t\t\t.map((value, index) => [value, index]);\n\n\t\t\treturn {\n\t\t\t\tget: (key: any) => {\n\t\t\t\t\treturn map.find((pairs) => deepEqual(pairs[0], key))?.[1];\n\t\t\t\t},\n\t\t\t};\n\t\t} else {\n\t\t\tthrow new Error('No match strategy has been defined');\n\t\t}\n\t});\n\n\t/**\n\t * When modelValue changes see if we already have the new value in the current options.\n\t * If we don't - try searching again in case the prefill might return the correct items\n\t * If not found and coherence is enforced reset modelValue\n\t */\n\tlet modelValueTimeout: ReturnType<typeof setTimeout>;\n\tlet hasRunOnce = false;\n\twatch(\n\t\tmodelValue,\n\t\t(current, previous) => {\n\t\t\tif (modelValueTimeout) clearTimeout(modelValueTimeout);\n\t\t\tmodelValueTimeout = setTimeout(\n\t\t\t\tasync () => {\n\t\t\t\t\thasRunOnce = true;\n\t\t\t\t\tif (multiple) {\n\t\t\t\t\t\tif (!Array.isArray(modelValue.value)) {\n\t\t\t\t\t\t\tthrow new Error('Passed modelValue is not an array.');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet allFound = modelValue.value.every((value: any) =>\n\t\t\t\t\t\t\toptionsIndexedByValue.value.get(value)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (!allFound || previous === undefined) {\n\t\t\t\t\t\t\tawait getOptions({ prefill: true });\n\t\t\t\t\t\t\tallFound = modelValue.value.every((value: any) =>\n\t\t\t\t\t\t\t\toptionsIndexedByValue.value.get(value)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!allFound) {\n\t\t\t\t\t\t\tconst coherent = current.filter((value: any) => {\n\t\t\t\t\t\t\t\tconst found = optionsIndexedByValue.value.get(value);\n\t\t\t\t\t\t\t\treturn found;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (enforceCoherence.value) {\n\t\t\t\t\t\t\t\temitter(coherent);\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\tlet found = optionsIndexedByValue.value.get(modelValue.value);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t(!found && isNotNil(modelValue.value)) ||\n\t\t\t\t\t\t\tprevious === undefined\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tawait getOptions({ prefill: true });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfound = optionsIndexedByValue.value.get(modelValue.value);\n\t\t\t\t\t\tif (!found) {\n\t\t\t\t\t\t\tif (enforceCoherence.value && isNotNil(current)) {\n\t\t\t\t\t\t\t\temitter(null);\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\t// Run immediately the first time to load intiial items\n\t\t\t\t},\n\t\t\t\thasRunOnce || !immediate ? modelValueDebounceTime : 0\n\t\t\t);\n\t\t},\n\t\t// Immediate here triggers first search for items\n\t\t{ immediate, deep: true }\n\t);\n\n\t/**\n\t * Refresh items on change.\n\t * To avoid refreshing every time the parent rerenders (happens when items are an array defined in the template)\n\t * we check by comparing the stringified version\n\t */\n\twatch(initialItems, async (current, previous) => {\n\t\tif (\n\t\t\ttypeof current === 'function' ||\n\t\t\t// Circumvent arrays defined in the template by the parent\n\t\t\tJSON.stringify(current) !== JSON.stringify(previous)\n\t\t) {\n\t\t\tawait getOptions({ prefill: true });\n\n\t\t\tif (multiple) {\n\t\t\t\tconst allFound = modelValue.value.every((value: any) =>\n\t\t\t\t\toptionsIndexedByValue.value.get(value)\n\t\t\t\t);\n\n\t\t\t\tif (!allFound) {\n\t\t\t\t\tif (enforceCoherence) {\n\t\t\t\t\t\tconst coherent = modelValue.value.filter((value: any) => {\n\t\t\t\t\t\t\tconst found = optionsIndexedByValue.value.get(value);\n\t\t\t\t\t\t\treturn found;\n\t\t\t\t\t\t});\n\t\t\t\t\t\temitter(coherent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst found = optionsIndexedByValue.value.get(modelValue.value);\n\t\t\t\tif (!found && enforceCoherence && isNotNil(modelValue.value)) {\n\t\t\t\t\temitter(null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * When dependencies change\n\t * Check dependencies are the same by value and not reference\n\t * Otherwise we search again for options as they might be different base on dependencies.\n\t * If coherence is enforced we set the state accordingly\n\t */\n\tlet depsTimeout: ReturnType<typeof setTimeout>;\n\twatch(\n\t\tdependencies,\n\t\t(current, previous) => {\n\t\t\t// Circumvent array defined in the template by the parent\n\t\t\tif (JSON.stringify(current) === JSON.stringify(previous)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (depsTimeout) clearTimeout(depsTimeout);\n\t\t\tdepsTimeout = setTimeout(async () => {\n\t\t\t\tawait getOptions({ prefill: true });\n\t\t\t\tif (multiple) {\n\t\t\t\t\tconst allFound = modelValue.value.every((value: any) =>\n\t\t\t\t\t\toptionsIndexedByValue.value.get(value)\n\t\t\t\t\t);\n\t\t\t\t\tif (!allFound && enforceCoherence) {\n\t\t\t\t\t\tconst coherent = modelValue.value.filter((value: any) => {\n\t\t\t\t\t\t\tconst found = optionsIndexedByValue.value.get(value);\n\t\t\t\t\t\t\treturn found;\n\t\t\t\t\t\t});\n\t\t\t\t\t\temitter(coherent);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst found = optionsIndexedByValue.value.get(modelValue.value);\n\t\t\t\t\tif (!found && enforceCoherence && isNotNil(modelValue.value)) {\n\t\t\t\t\t\temitter(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, depsDebounceTime);\n\t\t},\n\t\t{ deep: true }\n\t);\n\n\treturn {\n\t\tgetOptions,\n\t\tloading,\n\t\toptions,\n\t};\n};\n"],"names":["useOptions","dependencies","depsDebounceTime","disabled","emitter","enforceCoherence","id","immediate","initialItems","itemText","itemValue","matchStrategy","modelValue","modelValueDebounceTime","multiple","loading","ref","internalItems","getOptions","prefill","items","getItemText","useItemText","getItemValue","useItemValue","options","computed","item","index","text","value","jsonValue","original","_disabled","_id","isNotNil","selectedIndex","modelValueIndexed","optionsIndexedByValue","indexed","acc","curr","key","option","_a","pairs","deepEqual","map","modelValueTimeout","hasRunOnce","watch","current","previous","allFound","coherent","found","depsTimeout"],"mappings":"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"}
1
+ {"version":3,"file":"index6.js","sources":["../src/composables/useToast.ts"],"sourcesContent":["import { wait } from '@/utilities/functions/wait';\nimport { reactive } from 'vue';\nimport { useId } from './useId';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type Message = {\n\t/**\n\t * Title of the message. Displayed in a more prominant fashion.\n\t */\n\ttitle?: string;\n\t/**\n\t * Text content of the toast message.\n\t */\n\ttext: string;\n\t/**\n\t * Name of the icon to display.\n\t */\n\ticon?: string;\n\t/**\n\t * Theme of the toast message. By default the theme is `default`.\n\t */\n\ttheme?: string;\n\t/**\n\t * Identifier of the message\n\t */\n\tid: string;\n} & Pick<CommonProps, 'showClose'>;\n\ntype MessageParameter =\n\t| string\n\t| (Pick<Message, 'title' | 'text' | 'icon' | 'theme'> &\n\t\t\t/* These props are mutually exclusive */\n\t\t\t(| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout?: undefined;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent?: undefined | false;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is optional if the message is not persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose?: Message['showClose'];\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout: number;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent?: undefined | false;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is optional if the message is not persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose?: Message['showClose'];\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout?: undefined;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent: true;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is mandatory if the message is persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose: true;\n\t\t\t\t }\n\t\t\t));\n\nexport const state = reactive({\n\tstack: [] as Message[],\n});\n\nexport const useToast = () => {\n\t/**\n\t * Dismisses a specific message\n\t */\n\tconst dismiss = (id: Message['id']) =>\n\t\t(state.stack = state.stack.filter((el) => el.id !== id));\n\tconst dismissAll = () => (state.stack = []);\n\tconst toast = (message: MessageParameter) => {\n\t\tconst id = useId().id.value;\n\t\tlet title: Message['title'];\n\t\tlet text: Message['text'];\n\t\tlet icon: Message['icon'];\n\t\tlet theme: Message['theme'];\n\t\tlet showClose: Message['showClose'];\n\t\tconst defaultTimeout = 6000;\n\n\t\tif (typeof message === 'string') {\n\t\t\ttext = message;\n\t\t} else {\n\t\t\tif (typeof message.timeout === 'number' && message.timeout <= 0) {\n\t\t\t\tthrow new Error(`Toast messages cannot have a zero or less timeout`);\n\t\t\t}\n\t\t\ticon = message.icon;\n\t\t\tshowClose = message.showClose;\n\t\t\ttext = message.text;\n\t\t\ttheme = message.theme;\n\t\t\ttitle = message.title;\n\t\t}\n\t\tstate.stack = state.stack.concat({\n\t\t\ticon,\n\t\t\tid,\n\t\t\tshowClose,\n\t\t\ttext,\n\t\t\ttheme,\n\t\t\ttitle,\n\t\t});\n\t\tif (\n\t\t\t(typeof message === 'object' && !message.persistent) ||\n\t\t\ttypeof message === 'string'\n\t\t) {\n\t\t\tlet timeout: number;\n\n\t\t\tif (typeof message === 'object' && message.timeout) {\n\t\t\t\ttimeout = message.timeout;\n\t\t\t} else timeout = defaultTimeout;\n\n\t\t\twait(timeout).then(() => {\n\t\t\t\tdismiss(id);\n\t\t\t});\n\t\t}\n\t\treturn id;\n\t};\n\treturn {\n\t\ttoast,\n\t\tdismiss,\n\t\tdismissAll,\n\t};\n};\n"],"names":["state","reactive","useToast","dismiss","id","el","message","useId","title","text","icon","theme","showClose","defaultTimeout","timeout","wait"],"mappings":";;;AA+EO,MAAMA,IAAQC,EAAS;AAAA,EAC7B,OAAO,CAAC;AACT,CAAC,GAEYC,IAAW,MAAM;AAI7B,QAAMC,IAAU,CAACC,MACfJ,EAAM,QAAQA,EAAM,MAAM,OAAO,CAACK,MAAOA,EAAG,OAAOD,CAAE;AA+ChD,SAAA;AAAA,IACN,OA9Ca,CAACE,MAA8B;AACtC,YAAAF,IAAKG,IAAQ,GAAG;AAClB,UAAAC,GACAC,GACAC,GACAC,GACAC;AACJ,YAAMC,IAAiB;AAEnB,UAAA,OAAOP,KAAY;AACf,QAAAG,IAAAH;AAAA,WACD;AACN,YAAI,OAAOA,EAAQ,WAAY,YAAYA,EAAQ,WAAW;AACvD,gBAAA,IAAI,MAAM,mDAAmD;AAEpE,QAAAI,IAAOJ,EAAQ,MACfM,IAAYN,EAAQ,WACpBG,IAAOH,EAAQ,MACfK,IAAQL,EAAQ,OAChBE,IAAQF,EAAQ;AAAA,MACjB;AAUE,UATIN,EAAA,QAAQA,EAAM,MAAM,OAAO;AAAA,QAChC,MAAAU;AAAA,QACA,IAAAN;AAAA,QACA,WAAAQ;AAAA,QACA,MAAAH;AAAA,QACA,OAAAE;AAAA,QACA,OAAAH;AAAA,MAAA,CACA,GAEC,OAAOF,KAAY,YAAY,CAACA,EAAQ,cACzC,OAAOA,KAAY,UAClB;AACG,YAAAQ;AAEJ,QAAI,OAAOR,KAAY,YAAYA,EAAQ,UAC1CQ,IAAUR,EAAQ,UACFQ,IAAAD,GAEZE,EAAAD,CAAO,EAAE,KAAK,MAAM;AACxB,UAAAX,EAAQC,CAAE;AAAA,QAAA,CACV;AAAA,MACF;AACO,aAAAA;AAAA,IAAA;AAAA,IAIP,SAAAD;AAAA,IACA,YAjDkB,MAAOH,EAAM,QAAQ,CAAA;AAAA,EAiDvC;AAEF;"}
package/dist/index60.js CHANGED
@@ -1,2 +1,86 @@
1
-
1
+ import { defineComponent as k, computed as _, openBlock as n, createBlock as l, unref as e, createSlots as h, withCtx as s, createElementBlock as f, toDisplayString as c, createCommentVNode as m, renderSlot as d, createElementVNode as g, createVNode as C, renderList as $, normalizeProps as x, guardReactiveProps as V, mergeProps as z, createTextVNode as u } from "vue";
2
+ import { actions as p, state as o } from "./index4.js";
3
+ import v from "./index10.js";
4
+ import "./index11.js";
5
+ import A from "./index20.js";
6
+ import "./index21.js";
7
+ import B from "./index120.js";
8
+ import "./index186.js";
9
+ const N = {
10
+ key: 0,
11
+ class: "bb-confirm__content"
12
+ }, P = {
13
+ key: 0,
14
+ class: "bb-confirm__text"
15
+ }, S = { class: "bb-confirm__spinner" }, F = /* @__PURE__ */ k({
16
+ __name: "BbConfirm",
17
+ setup(E) {
18
+ const i = _(() => p.value[0]), r = _(() => p.value[1]), b = (t) => {
19
+ t ? r.value.handler() : i.value.handler();
20
+ };
21
+ return (t, U) => (n(), l(A, {
22
+ "model-value": e(o).open || e(o).loading,
23
+ "overlay-classes": ["bb-confirm", `bb-confirm--${e(o).theme}`],
24
+ size: e(o).size,
25
+ title: e(o).title,
26
+ "onUpdate:modelValue": b
27
+ }, h({
28
+ default: s(() => [
29
+ e(o).loading ? d(t.$slots, "spinner", { key: 1 }, () => [
30
+ g("div", S, [
31
+ C(B, { size: "36" })
32
+ ])
33
+ ]) : (n(), f("div", N, [
34
+ e(o).text ? (n(), f("div", P, c(e(o).text), 1)) : m("", !0)
35
+ ]))
36
+ ]),
37
+ _: 2
38
+ }, [
39
+ $(["header", "title", "close", "description"], (a) => ({
40
+ name: a,
41
+ fn: s((y) => [
42
+ d(t.$slots, a, x(V(y)))
43
+ ])
44
+ })),
45
+ !e(o).loading && e(o).actions ? {
46
+ name: "footer",
47
+ fn: s((a) => [
48
+ d(t.$slots, "footer", z({
49
+ actions: e(o).actions,
50
+ loading: e(o).loading,
51
+ no: e(o).no,
52
+ noAction: i.value,
53
+ yes: e(o).yes,
54
+ yesAction: r.value
55
+ }, a), () => [
56
+ e(o).no ? (n(), l(v, {
57
+ key: 0,
58
+ class: "bb-confirm__no",
59
+ onClick: i.value.handler
60
+ }, {
61
+ default: s(() => [
62
+ u(c(i.value.text), 1)
63
+ ]),
64
+ _: 1
65
+ }, 8, ["onClick"])) : m("", !0),
66
+ e(o).yes ? (n(), l(v, {
67
+ key: 1,
68
+ class: "bb-confirm__yes",
69
+ onClick: r.value.handler
70
+ }, {
71
+ default: s(() => [
72
+ u(c(r.value.text), 1)
73
+ ]),
74
+ _: 1
75
+ }, 8, ["onClick"])) : m("", !0)
76
+ ])
77
+ ]),
78
+ key: "0"
79
+ } : void 0
80
+ ]), 1032, ["model-value", "overlay-classes", "size", "title"]));
81
+ }
82
+ });
83
+ export {
84
+ F as default
85
+ };
2
86
  //# sourceMappingURL=index60.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index60.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index60.js","sources":["../src/components/BbConfirm/BbConfirm.vue"],"sourcesContent":["<template>\n\t<BaseDialog\n\t\t:model-value=\"state.open || state.loading\"\n\t\t:overlay-classes=\"['bb-confirm', `bb-confirm--${state.theme}`]\"\n\t\t:size=\"state.size\"\n\t\t:title=\"state.title\"\n\t\t@update:model-value=\"onModelValueUpdate\"\n\t>\n\t\t<!-- Transparently pass all slots that are not customized -->\n\t\t<template\n\t\t\tv-for=\"name in ['header', 'title', 'close', 'description']\"\n\t\t\t#[name]=\"data\"\n\t\t>\n\t\t\t<slot :name=\"name\" v-bind=\"data\"> </slot>\n\t\t</template>\n\t\t<div v-if=\"!state.loading\" class=\"bb-confirm__content\">\n\t\t\t<div v-if=\"state.text\" class=\"bb-confirm__text\">{{ state.text }}</div>\n\t\t</div>\n\t\t<slot v-else name=\"spinner\">\n\t\t\t<div class=\"bb-confirm__spinner\">\n\t\t\t\t<BbSpinner size=\"36\" />\n\t\t\t</div>\n\t\t</slot>\n\t\t<template v-if=\"!state.loading && state.actions\" #footer=\"data\">\n\t\t\t<slot\n\t\t\t\t:actions=\"state.actions\"\n\t\t\t\t:loading=\"state.loading\"\n\t\t\t\tname=\"footer\"\n\t\t\t\t:no=\"state.no\"\n\t\t\t\t:no-action=\"noAction\"\n\t\t\t\t:yes=\"state.yes\"\n\t\t\t\t:yes-action=\"yesAction\"\n\t\t\t\tv-bind=\"data\"\n\t\t\t>\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-if=\"state.no\"\n\t\t\t\t\tclass=\"bb-confirm__no\"\n\t\t\t\t\t@click=\"noAction.handler\"\n\t\t\t\t>\n\t\t\t\t\t{{ noAction.text }}\n\t\t\t\t</BaseButton>\n\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-if=\"state.yes\"\n\t\t\t\t\tclass=\"bb-confirm__yes\"\n\t\t\t\t\t@click=\"yesAction.handler\"\n\t\t\t\t>\n\t\t\t\t\t{{ yesAction.text }}\n\t\t\t\t</BaseButton>\n\t\t\t</slot>\n\t\t</template>\n\t</BaseDialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { actions, state } from '@/composables/useConfirm';\nimport { computed } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BaseDialog from '../BaseDialog/BaseDialog.vue';\nimport BbSpinner from '../BbSpinner/BbSpinner.vue';\n\nconst noAction = computed(() => actions.value[0]);\nconst yesAction = computed(() => actions.value[1]);\nconst onModelValueUpdate = (value: boolean) => {\n\tif (value) yesAction.value.handler();\n\telse noAction.value.handler();\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbConfirm';\n</style>\n"],"names":["noAction","computed","actions","yesAction","onModelValueUpdate","value"],"mappings":";;;;;;;;;;;;;;;;;AA6DA,UAAMA,IAAWC,EAAS,MAAMC,EAAQ,MAAM,CAAC,CAAC,GAC1CC,IAAYF,EAAS,MAAMC,EAAQ,MAAM,CAAC,CAAC,GAC3CE,IAAqB,CAACC,MAAmB;AAC1C,MAAAA,IAAOF,EAAU,MAAM,YACtBH,EAAS,MAAM;IAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index61.js CHANGED
@@ -1,89 +1,2 @@
1
- import { defineComponent as b, openBlock as f, createBlock as h, withCtx as a, renderSlot as i, normalizeProps as s, guardReactiveProps as n, createVNode as c, mergeProps as y, createSlots as v, renderList as w } from "vue";
2
- import g from "./index17.js";
3
- import "./index18.js";
4
- import B from "./index21.js";
5
- import "./index22.js";
6
- const C = /* @__PURE__ */ b({
7
- __name: "BbDatePickerInput",
8
- props: {
9
- allowWriting: { type: Boolean, default: !0 },
10
- autocomplete: {},
11
- autofocus: {},
12
- direction: {},
13
- disabled: { type: Boolean },
14
- errors: {},
15
- firstDayOfWeek: {},
16
- hasErrors: { type: Boolean },
17
- hideLabel: { type: Boolean },
18
- id: {},
19
- label: {},
20
- labelPosition: {},
21
- max: {},
22
- min: {},
23
- modelValue: {},
24
- name: {},
25
- placeholder: {},
26
- range: { type: Boolean },
27
- readonly: {},
28
- reverse: { type: Boolean },
29
- selectable: {},
30
- width: {}
31
- },
32
- emits: ["update:modelValue", "inactive", "error"],
33
- setup(k, { emit: t }) {
34
- const o = t, d = {
35
- onInactive: () => o("inactive"),
36
- onError: (e) => o("error", e),
37
- "onUpdate:modelValue": (e) => o("update:modelValue", e)
38
- };
39
- return (e, V) => (f(), h(B, {
40
- id: e.id,
41
- class: "bb-date-picker-input",
42
- direction: e.direction,
43
- errors: e.errors,
44
- "has-errors": e.hasErrors,
45
- "hide-label": e.hideLabel,
46
- label: e.label,
47
- "label-position": e.labelPosition,
48
- "model-value": e.modelValue,
49
- name: e.name,
50
- reverse: e.reverse
51
- }, {
52
- label: a((r) => [
53
- i(e.$slots, "label", s(n(r)))
54
- ]),
55
- input: a(({ id: r, name: m, hasErrors: p }) => [
56
- c(g, y({
57
- id: r,
58
- "allow-writing": e.allowWriting,
59
- autocomplete: e.autocomplete,
60
- autofocus: e.autofocus,
61
- disabled: e.disabled,
62
- "first-day-of-week": e.firstDayOfWeek,
63
- "has-errors": p,
64
- max: e.max,
65
- min: e.min,
66
- "model-value": e.modelValue,
67
- name: m,
68
- placeholder: e.placeholder,
69
- range: e.range,
70
- readonly: e.readonly,
71
- selectable: e.selectable,
72
- width: e.width
73
- }, d), v({ _: 2 }, [
74
- w(e.$slots, (P, l) => ({
75
- name: l,
76
- fn: a((u) => [
77
- i(e.$slots, l, s(n(u)))
78
- ])
79
- }))
80
- ]), 1040, ["id", "allow-writing", "autocomplete", "autofocus", "disabled", "first-day-of-week", "has-errors", "max", "min", "model-value", "name", "placeholder", "range", "readonly", "selectable", "width"])
81
- ]),
82
- _: 3
83
- }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "label", "label-position", "model-value", "name", "reverse"]));
84
- }
85
- });
86
- export {
87
- C as default
88
- };
1
+
89
2
  //# sourceMappingURL=index61.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index61.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-date-picker-input\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors }\">\n\t\t\t<BaseDatePickerInput\n\t\t\t\t:id=\"id\"\n\t\t\t\t:allow-writing=\"allowWriting\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:max=\"max\"\n\t\t\t\t:min=\"min\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:range=\"range\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t:width=\"width\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template v-for=\"(_, name) in $slots\" #[name]=\"data\">\n\t\t\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t\t\t</template>\n\t\t\t</BaseDatePickerInput>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseDatePickerInput from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type { BaseDatePickerInputEvents } from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { Locale } from 'dayjs/locale/it';\n\nexport type BbDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: Locale['weekStart'];\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 * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\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 * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\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?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: 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\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nwithDefaults(defineProps<BbDatePickerInputProps>(), {\n\tallowWriting: true,\n});\n\nexport type BbDatePickerInputEvents = BaseDatePickerInputEvents;\n\nconst emit = defineEmits<BbDatePickerInputEvents>();\n\ndefineSlots<\n\t{\n\t\t'prepend-outer'?: (props: object) => any;\n\t\tprepend?: (props: object) => any;\n\t\tappend?: (props: object) => any;\n\t\t'append-outer'?: (props: object) => any;\n\t\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\t} & BaseDatePickerSlots\n>();\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInactive: () => emit('inactive'),\n\tonError: (message: string) => emit('error', message),\n\t'onUpdate:modelValue': (value: BbDatePickerInputProps['modelValue']) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDatePickerInput';\n</style>\n"],"names":["emit","__emit","eventListeners","message","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAMA,IAAOC,GAePC,IAAiB;AAAA,MACtB,YAAY,MAAMF,EAAK,UAAU;AAAA,MACjC,SAAS,CAACG,MAAoBH,EAAK,SAASG,CAAO;AAAA,MACnD,uBAAuB,CAACC,MACvBJ,EAAK,qBAAqBI,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index61.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index62.js CHANGED
@@ -1,2 +1,99 @@
1
-
1
+ import { defineComponent as v, ref as w, computed as y, openBlock as g, createBlock as B, withCtx as l, renderSlot as t, normalizeProps as n, guardReactiveProps as s, createVNode as k, mergeProps as V, createSlots as P, renderList as $ } from "vue";
2
+ import L from "./index18.js";
3
+ import "./index19.js";
4
+ import W from "./index22.js";
5
+ import "./index23.js";
6
+ const z = /* @__PURE__ */ v({
7
+ __name: "BbDatePickerInput",
8
+ props: {
9
+ allowWriting: { type: Boolean, default: !0 },
10
+ autocomplete: {},
11
+ autofocus: {},
12
+ direction: {},
13
+ disabled: { type: Boolean },
14
+ errors: {},
15
+ firstDayOfWeek: {},
16
+ hasErrors: { type: Boolean },
17
+ hideLabel: { type: Boolean },
18
+ hint: {},
19
+ id: {},
20
+ label: {},
21
+ labelPosition: {},
22
+ max: {},
23
+ min: {},
24
+ modelValue: {},
25
+ name: {},
26
+ persistentHint: { type: Boolean },
27
+ placeholder: {},
28
+ range: { type: Boolean },
29
+ readonly: {},
30
+ reverse: { type: Boolean },
31
+ selectable: {},
32
+ width: {}
33
+ },
34
+ emits: ["active", "error", "focus", "inactive", "update:modelValue"],
35
+ setup(d, { emit: m }) {
36
+ const u = d, o = m, a = w(!1), p = y(() => u.persistentHint || a.value), h = {
37
+ onError: (e) => o("error", e),
38
+ onFocus: (e) => o("focus", e),
39
+ onActive: () => {
40
+ a.value = !0, o("active");
41
+ },
42
+ onInactive: () => {
43
+ a.value = !1, o("inactive");
44
+ },
45
+ "onUpdate:modelValue": (e) => o("update:modelValue", e)
46
+ };
47
+ return (e, D) => (g(), B(W, {
48
+ direction: e.direction,
49
+ errors: e.errors,
50
+ "has-errors": e.hasErrors,
51
+ "hide-label": e.hideLabel,
52
+ hint: e.hint,
53
+ id: e.id,
54
+ "label-position": e.labelPosition,
55
+ label: e.label,
56
+ "model-value": e.modelValue,
57
+ name: e.name,
58
+ reverse: e.reverse,
59
+ "show-hint": p.value,
60
+ class: "bb-date-picker-input"
61
+ }, {
62
+ label: l((r) => [
63
+ t(e.$slots, "label", n(s(r)))
64
+ ]),
65
+ input: l(({ id: r, name: f, hasErrors: b }) => [
66
+ k(L, V({
67
+ id: r,
68
+ "allow-writing": e.allowWriting,
69
+ autocomplete: e.autocomplete,
70
+ autofocus: e.autofocus,
71
+ disabled: e.disabled,
72
+ "first-day-of-week": e.firstDayOfWeek,
73
+ "has-errors": b,
74
+ max: e.max,
75
+ min: e.min,
76
+ "model-value": e.modelValue,
77
+ name: f,
78
+ placeholder: e.placeholder,
79
+ range: e.range,
80
+ readonly: e.readonly,
81
+ selectable: e.selectable,
82
+ width: e.width
83
+ }, h), P({ _: 2 }, [
84
+ $(e.$slots, (E, i) => ({
85
+ name: i,
86
+ fn: l((c) => [
87
+ t(e.$slots, i, n(s(c)))
88
+ ])
89
+ }))
90
+ ]), 1040, ["id", "allow-writing", "autocomplete", "autofocus", "disabled", "first-day-of-week", "has-errors", "max", "min", "model-value", "name", "placeholder", "range", "readonly", "selectable", "width"])
91
+ ]),
92
+ _: 3
93
+ }, 8, ["direction", "errors", "has-errors", "hide-label", "hint", "id", "label-position", "label", "model-value", "name", "reverse", "show-hint"]));
94
+ }
95
+ });
96
+ export {
97
+ z as default
98
+ };
2
99
  //# sourceMappingURL=index62.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index62.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index62.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:id=\"id\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label=\"label\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\tclass=\"bb-date-picker-input\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors }\">\n\t\t\t<BaseDatePickerInput\n\t\t\t\t:id=\"id\"\n\t\t\t\t:allow-writing=\"allowWriting\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:max=\"max\"\n\t\t\t\t:min=\"min\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:range=\"range\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t:width=\"width\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template v-for=\"(_, name) in $slots\" #[name]=\"data\">\n\t\t\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t\t\t</template>\n\t\t\t</BaseDatePickerInput>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseDatePickerInput from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type { BaseDatePickerInputEvents } from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\nimport type { Locale } from 'dayjs/locale/it';\n\nexport type BbDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: Locale['weekStart'];\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 * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\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 * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\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?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: 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\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbDatePickerInputProps>(), {\n\tallowWriting: true,\n});\n\nexport type BbDatePickerInputEvents = BaseDatePickerInputEvents;\n\nconst emit = defineEmits<BbDatePickerInputEvents>();\n\ndefineSlots<\n\t{\n\t\t'prepend-outer'?: (props: object) => any;\n\t\tprepend?: (props: object) => any;\n\t\tappend?: (props: object) => any;\n\t\t'append-outer'?: (props: object) => any;\n\t\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\t} & BaseDatePickerSlots\n>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonError: (message: string) => emit('error', message),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonActive: () => {\n\t\tactive.value = true;\n\t\temit('active');\n\t},\n\tonInactive: () => {\n\t\tactive.value = false;\n\t\temit('inactive');\n\t},\n\t'onUpdate:modelValue': (value: BbDatePickerInputProps['modelValue']) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDatePickerInput';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","message","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsLA,UAAMA,IAAQC,GAMRC,IAAOC,GAYPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAK9DI,IAAiB;AAAA,MACtB,SAAS,CAACC,MAAoBP,EAAK,SAASO,CAAO;AAAA,MACnD,SAAS,CAACC,MAAsBR,EAAK,SAASQ,CAAK;AAAA,MACnD,UAAU,MAAM;AACf,QAAAN,EAAO,QAAQ,IACfF,EAAK,QAAQ;AAAA,MACd;AAAA,MACA,YAAY,MAAM;AACjB,QAAAE,EAAO,QAAQ,IACfF,EAAK,UAAU;AAAA,MAChB;AAAA,MACA,uBAAuB,CAACS,MACvBT,EAAK,qBAAqBS,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index63.js CHANGED
@@ -1,60 +1,2 @@
1
- import { defineComponent as d, computed as m, openBlock as u, createBlock as f, mergeProps as y, withCtx as l, renderSlot as t, normalizeProps as a, guardReactiveProps as n } from "vue";
2
- import $ from "./index19.js";
3
- import "./index20.js";
4
- const b = /* @__PURE__ */ d({
5
- __name: "BbDialog",
6
- props: {
7
- closeLabel: {},
8
- compact: { type: Boolean },
9
- disabled: { type: Boolean },
10
- eager: { type: Boolean },
11
- panelClasses: {},
12
- overlayClasses: {},
13
- persistent: { type: Boolean },
14
- showClose: { type: Boolean, default: !0 },
15
- title: {},
16
- transition: {},
17
- transitionDuration: {},
18
- size: {},
19
- description: {},
20
- fullscreen: { type: Boolean },
21
- modelValue: { type: [Boolean, null] }
22
- },
23
- emits: ["shown", "hidden", "update:modelValue"],
24
- setup(i) {
25
- const r = i, p = m(() => {
26
- let e = ["bb-dialog"];
27
- return r.overlayClasses && (e = e.concat(r.overlayClasses)), e;
28
- });
29
- return (e, s) => (u(), f($, y(e.$props, {
30
- "overlay-classes": p.value,
31
- onHidden: s[0] || (s[0] = () => e.$emit("hidden")),
32
- onShown: s[1] || (s[1] = () => e.$emit("shown")),
33
- "onUpdate:modelValue": s[2] || (s[2] = (o) => e.$emit("update:modelValue", o))
34
- }), {
35
- close: l((o) => [
36
- t(e.$slots, "close", a(n(o)))
37
- ]),
38
- default: l((o) => [
39
- t(e.$slots, "default", a(n(o)))
40
- ]),
41
- description: l((o) => [
42
- t(e.$slots, "description", a(n(o)))
43
- ]),
44
- footer: l((o) => [
45
- t(e.$slots, "footer", a(n(o)))
46
- ]),
47
- header: l((o) => [
48
- t(e.$slots, "header", a(n(o)))
49
- ]),
50
- title: l((o) => [
51
- t(e.$slots, "title", a(n(o)))
52
- ]),
53
- _: 3
54
- }, 16, ["overlay-classes"]));
55
- }
56
- });
57
- export {
58
- b as default
59
- };
1
+
60
2
  //# sourceMappingURL=index63.js.map