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.
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +4 -0
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -3
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +4 -1
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +10 -4
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +9 -0
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -0
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +4 -0
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +10 -3
- package/dist/components/BaseRating/BaseRating.vue.d.ts +5 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -0
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +48 -11
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +6 -3
- package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -0
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +10 -6
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +4 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +12 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +35 -27
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +38 -24
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +15 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +33 -25
- package/dist/components/BbRadio/BbRadio.vue.d.ts +33 -25
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +38 -24
- package/dist/components/BbRating/BbRating.vue.d.ts +9 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +18 -4
- package/dist/components/BbSlider/BbSlider.vue.d.ts +44 -11
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +9 -3
- package/dist/components/BbTag/BbTag.vue.d.ts +11 -3
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +33 -25
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +9 -1
- package/dist/composables/useQueue.d.ts +58 -0
- package/dist/index.js +186 -185
- package/dist/index.js.map +1 -1
- package/dist/index10.js +65 -1
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +227 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -437
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +437 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +1 -94
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +103 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -88
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +97 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +1 -89
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +98 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +1 -29
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +1 -131
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +29 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -151
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +151 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -122
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +122 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +1 -46
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +40 -33
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +32 -39
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +39 -42
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +43 -39
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +128 -1
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +43 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +2 -21
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +21 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -224
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +224 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -18
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +16 -10
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +12 -24
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +24 -5
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +5 -9
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +1 -159
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +8 -5
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +5 -69
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +70 -3
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +2 -2
- package/dist/index134.js +2 -2
- package/dist/index135.js +2 -2
- package/dist/index136.js +2 -2
- package/dist/index137.js +2 -2
- package/dist/index138.js +2 -2
- package/dist/index139.js +2 -2
- package/dist/index14.js +161 -1
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +2 -2
- package/dist/index141.js +2 -2
- package/dist/index142.js +2 -2
- package/dist/index143.js +2 -2
- package/dist/index144.js +2 -2
- package/dist/index145.js +2 -2
- package/dist/index146.js +2 -2
- package/dist/index147.js +2 -2
- package/dist/index148.js +2 -2
- package/dist/index149.js +2 -2
- package/dist/index15.js +1 -457
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +2 -2
- package/dist/index151.js +2 -2
- package/dist/index152.js +2 -2
- package/dist/index153.js +2 -2
- package/dist/index154.js +2 -2
- package/dist/index155.js +2 -2
- package/dist/index156.js +2 -2
- package/dist/index157.js +2 -2
- package/dist/index158.js +5 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +1 -5
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +514 -1
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +5 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -5
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +2 -2
- package/dist/index163.js +2 -2
- package/dist/index164.js +2 -2
- package/dist/index165.js +2 -2
- package/dist/index166.js +2 -2
- package/dist/index167.js +3 -2
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +2 -3
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +5 -1
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +1 -211
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +1 -4
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +2 -3
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +2 -2
- package/dist/index173.js +2 -2
- package/dist/index174.js +2 -2
- package/dist/index175.js +2 -2
- package/dist/index176.js +2 -2
- package/dist/index177.js +2 -2
- package/dist/index178.js +2 -2
- package/dist/index179.js +2 -2
- package/dist/index18.js +220 -1
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +2 -2
- package/dist/index181.js +2 -2
- package/dist/index182.js +2 -2
- package/dist/index183.js +5 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -5
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +5 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +1 -5
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +2 -2
- package/dist/index188.js +2 -2
- package/dist/index189.js +2 -2
- package/dist/index19.js +1 -239
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +2 -2
- package/dist/index191.js +2 -2
- package/dist/index192.js +2 -2
- package/dist/index193.js +2 -2
- package/dist/index194.js +2 -2
- package/dist/index195.js +2 -2
- package/dist/index196.js +3 -10
- package/dist/index196.js.map +1 -1
- package/dist/index198.js +2 -3
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +4 -3
- package/dist/index199.js.map +1 -1
- package/dist/index2.js +1 -42
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +239 -1
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +5 -368
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +13 -131
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +16 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +3 -3
- package/dist/index204.js +20 -2
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +29 -2
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +8 -174
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -23
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +111 -363
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +131 -13
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +1 -115
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +2 -16
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +35 -20
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +172 -27
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -8
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +346 -213
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +373 -3
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +3 -35
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -6
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +235 -2
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +3 -2
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +131 -1
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +2 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +8 -119
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -2
- package/dist/index222.js.map +1 -1
- package/dist/index224.js +23 -6
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +4 -17
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +294 -78
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +6 -2
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +2 -160
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +4 -1
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -115
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +2 -5
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +2 -69
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -224
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -258
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +78 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +6 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +17 -295
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -2
- package/dist/index238.js +106 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +428 -110
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +119 -1
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +218 -100
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +255 -12
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +117 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +200 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +69 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +5 -435
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +163 -88
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +1 -202
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -4
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +1 -92
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +89 -2
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +15 -4
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +4 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +4 -61
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +61 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +3 -2
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -0
- package/dist/index257.js.map +1 -0
- package/dist/index26.js +94 -1
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +1 -157
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +160 -1
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +1 -124
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +38 -76
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +126 -1
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +1 -691
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +693 -1
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +1 -145
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +302 -1
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +1 -118
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +120 -1
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +1 -154
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +156 -1
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +1 -83
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +78 -62
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +87 -1
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +1 -61
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +64 -1
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +1 -65
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +65 -1
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +1 -96
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +96 -1
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +1 -61
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +61 -1
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +1 -49
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +60 -38
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +49 -1
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +1 -62
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +62 -1
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +1 -45
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +69 -1
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +1 -89
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +98 -1
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +1 -120
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +129 -1
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +1 -85
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +37 -171
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +85 -1
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +1 -88
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +98 -1
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +1 -59
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +59 -1
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +1 -313
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +313 -1
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +1 -129
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +129 -1
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +1 -225
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +172 -18
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +225 -1
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +1 -24
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +19 -41
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +37 -86
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +104 -1
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +1 -227
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +227 -1
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +1 -143
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +165 -1
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -213
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +18 -192
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +213 -1
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +1 -35
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +35 -1
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +1 -83
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +92 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -120
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +129 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -83
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +92 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -30
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +192 -61
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +30 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -157
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +166 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -86
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +112 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -89
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +98 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -119
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +129 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -227
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utilities/functions/last.d.ts +1 -1
- package/package.json +1 -1
package/dist/index88.js
CHANGED
|
@@ -1,2 +1,93 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as g, ref as v, computed as y, openBlock as w, createBlock as B, withCtx as r, renderSlot as i, normalizeProps as a, guardReactiveProps as l, createVNode as k, mergeProps as P } from "vue";
|
|
2
|
+
import V from "./index22.js";
|
|
3
|
+
import "./index23.js";
|
|
4
|
+
import z from "./index30.js";
|
|
5
|
+
import "./index31.js";
|
|
6
|
+
const M = /* @__PURE__ */ g({
|
|
7
|
+
__name: "BbRating",
|
|
8
|
+
props: {
|
|
9
|
+
autofocus: {},
|
|
10
|
+
color: {},
|
|
11
|
+
disabled: { type: Boolean },
|
|
12
|
+
hasErrors: { type: Boolean },
|
|
13
|
+
id: {},
|
|
14
|
+
modelValue: {},
|
|
15
|
+
hint: {},
|
|
16
|
+
name: {},
|
|
17
|
+
persistentHint: { type: Boolean },
|
|
18
|
+
readonly: {},
|
|
19
|
+
stars: {},
|
|
20
|
+
errors: {},
|
|
21
|
+
inputPosition: { default: "left" },
|
|
22
|
+
reverse: { type: Boolean },
|
|
23
|
+
hideLegend: { type: Boolean },
|
|
24
|
+
legend: {},
|
|
25
|
+
legendPosition: {},
|
|
26
|
+
size: {}
|
|
27
|
+
},
|
|
28
|
+
emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
|
29
|
+
setup(t, { emit: d }) {
|
|
30
|
+
const u = t, o = d, n = v(!1), p = y(() => u.persistentHint || n.value), m = {
|
|
31
|
+
onBlur: (e) => o("blur", e),
|
|
32
|
+
onChange: (e) => o("change", e),
|
|
33
|
+
onClick: (e) => o("click", e),
|
|
34
|
+
onFocus: (e) => {
|
|
35
|
+
n.value = !0, o("focus", e);
|
|
36
|
+
},
|
|
37
|
+
onInactive: () => {
|
|
38
|
+
n.value = !1, o("inactive");
|
|
39
|
+
},
|
|
40
|
+
onInput: (e) => o("input", e),
|
|
41
|
+
onKeydown: (e) => o("keydown", e),
|
|
42
|
+
onMousedown: (e) => o("mousedown", e),
|
|
43
|
+
onMouseup: (e) => o("mouseup", e),
|
|
44
|
+
"onUpdate:modelValue": (e) => o("update:modelValue", e)
|
|
45
|
+
};
|
|
46
|
+
return (e, C) => (w(), B(V, {
|
|
47
|
+
direction: "vertical",
|
|
48
|
+
errors: e.errors,
|
|
49
|
+
"has-errors": e.hasErrors,
|
|
50
|
+
"hide-label": e.hideLegend,
|
|
51
|
+
hint: e.hint,
|
|
52
|
+
id: e.id,
|
|
53
|
+
"input-position": e.inputPosition,
|
|
54
|
+
"label-position": e.legendPosition,
|
|
55
|
+
"label-tag": "legend",
|
|
56
|
+
label: e.legend,
|
|
57
|
+
name: e.name,
|
|
58
|
+
reverse: e.reverse,
|
|
59
|
+
"show-hint": p.value,
|
|
60
|
+
tag: "fieldset",
|
|
61
|
+
class: "bb-rating"
|
|
62
|
+
}, {
|
|
63
|
+
label: r((s) => [
|
|
64
|
+
i(e.$slots, "legend", a(l(s)))
|
|
65
|
+
]),
|
|
66
|
+
input: r(({ id: s, name: c, hasErrors: h, ariaDescribedby: b }) => [
|
|
67
|
+
k(z, P({
|
|
68
|
+
"aria-describedby": b,
|
|
69
|
+
autofocus: e.autofocus,
|
|
70
|
+
color: e.color,
|
|
71
|
+
disabled: e.disabled,
|
|
72
|
+
"has-errors": h,
|
|
73
|
+
id: s,
|
|
74
|
+
"model-value": e.modelValue,
|
|
75
|
+
name: c,
|
|
76
|
+
readonly: e.readonly,
|
|
77
|
+
size: e.size,
|
|
78
|
+
stars: e.stars
|
|
79
|
+
}, m), {
|
|
80
|
+
icon: r((f) => [
|
|
81
|
+
i(e.$slots, "icon", a(l(f)))
|
|
82
|
+
]),
|
|
83
|
+
_: 2
|
|
84
|
+
}, 1040, ["aria-describedby", "autofocus", "color", "disabled", "has-errors", "id", "model-value", "name", "readonly", "size", "stars"])
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
}, 8, ["errors", "has-errors", "hide-label", "hint", "id", "input-position", "label-position", "label", "name", "reverse", "show-hint"]));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
M as default
|
|
92
|
+
};
|
|
2
93
|
//# sourceMappingURL=index88.js.map
|
package/dist/index88.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index88.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index88.js","sources":["../src/components/BbRating/BbRating.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:direction=\"'vertical'\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLegend\"\n\t\t:hint=\"hint\"\n\t\t:id=\"id\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label-position=\"legendPosition\"\n\t\t:label-tag=\"'legend'\"\n\t\t:label=\"legend\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'fieldset'\"\n\t\tclass=\"bb-rating\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"legend\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseRating\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:id=\"id\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:size=\"size\"\n\t\t\t\t:stars=\"stars\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #icon=\"data\"><slot name=\"icon\" v-bind=\"data\" /></template>\n\t\t\t</BaseRating>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRating from '../BaseRating/BaseRating.vue';\nimport type {\n\tBaseRatingEvents,\n\tBaseRatingSlots,\n} from '../BaseRating/BaseRating.vue';\nimport type { BbIconProps } from '../BbIcon/BbIcon.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbRatingProps = {\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 * Disables the component\n\t */\n\tdisabled?: 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 * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: null | number;\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 * Defines the name of the input.\n\t */\n\tname: Exclude<InputHTMLAttributes['name'], undefined>;\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\t/**\n\t * Maximum number of stars to render and maximum value of the component\n\t */\n\tstars?: number;\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 * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\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\t/**\n\t * Visually hides the legend of the fieldset while maintaining accessibility.\n\t */\n\thideLegend?: boolean;\n\n\t/**\n\t * Text content of the legend.\n\t */\n\tlegend: string;\n\t/**\n\t * Sets the text alignment of the legend.\n\t */\n\tlegendPosition?: 'left' | 'center' | 'right';\n} & Pick<BbIconProps, 'size'>;\n\nconst props = withDefaults(defineProps<BbRatingProps>(), {\n\tinputPosition: 'left',\n});\n\nexport type BbRatingEvents = BaseRatingEvents;\nconst emit = defineEmits<BbRatingEvents>();\n\ndefineSlots<\n\tBaseRatingSlots & {\n\t\tlegend?: (props: { text: string; hasErrors: boolean }) => any;\n\t}\n>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInactive: () => {\n\t\tactive.value = false;\n\t\temit('inactive');\n\t},\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\t'onUpdate:modelValue': (event: any) => emit('update:modelValue', event),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbRating';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,UAAMA,IAAQC,GAKRC,IAAOC,GAQPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBP,EAAK,QAAQO,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,YAAY,MAAM;AACjB,QAAAL,EAAO,QAAQ,IACfF,EAAK,UAAU;AAAA,MAChB;AAAA,MACA,SAAS,CAACO,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACA,MAAeP,EAAK,qBAAqBO,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index89.js
CHANGED
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
const f = /* @__PURE__ */ l({
|
|
3
|
-
__name: "BbRatio",
|
|
4
|
-
props: {
|
|
5
|
-
ratio: { default: 1 },
|
|
6
|
-
tag: { default: "div" }
|
|
7
|
-
},
|
|
8
|
-
setup(s) {
|
|
9
|
-
return (t, d) => (e(), o(a(t.tag), {
|
|
10
|
-
class: "bb-ratio",
|
|
11
|
-
style: n({
|
|
12
|
-
width: "100%",
|
|
13
|
-
paddingBottom: `${(1 / t.ratio * 100).toFixed(2)}%`
|
|
14
|
-
})
|
|
15
|
-
}, {
|
|
16
|
-
default: r(() => [
|
|
17
|
-
(e(), o(a(t.tag), { class: "bb-ratio__inner" }, {
|
|
18
|
-
default: r(() => [
|
|
19
|
-
i(t.$slots, "default")
|
|
20
|
-
]),
|
|
21
|
-
_: 3
|
|
22
|
-
}))
|
|
23
|
-
]),
|
|
24
|
-
_: 3
|
|
25
|
-
}, 8, ["style"]));
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
f as default
|
|
30
|
-
};
|
|
1
|
+
|
|
31
2
|
//# sourceMappingURL=index89.js.map
|
package/dist/index89.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index89.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index89.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index9.js
CHANGED
|
@@ -1,66 +1,197 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
e.disabled ? (t["aria-disabled"] = !0, t.role = "link") : t.href = e.href;
|
|
46
|
-
break;
|
|
47
|
-
case "router-link":
|
|
48
|
-
t.to = e.to;
|
|
49
|
-
break;
|
|
1
|
+
import { copy as D } from "./index128.js";
|
|
2
|
+
import { reactive as G, watch as v, toValue as H, computed as g, provide as Q } from "vue";
|
|
3
|
+
import { isNotNil as a } from "./index125.js";
|
|
4
|
+
import { mapValues as X } from "./index129.js";
|
|
5
|
+
import { useRoute as Z } from "./index130.js";
|
|
6
|
+
import { useRouter as _ } from "./index131.js";
|
|
7
|
+
import { useStepper as ee } from "./index132.js";
|
|
8
|
+
const te = Symbol(), x = /((step\/)(?<step>[\s\S]+?)(?=[/?]))|((step\/)(?<step2>[\s\S]+))/, O = (i) => {
|
|
9
|
+
var r, u;
|
|
10
|
+
const e = i.match(x);
|
|
11
|
+
return ((r = e == null ? void 0 : e.groups) == null ? void 0 : r.step) ?? ((u = e == null ? void 0 : e.groups) == null ? void 0 : u.step2) ?? null;
|
|
12
|
+
}, le = (i) => {
|
|
13
|
+
if (!i.name)
|
|
14
|
+
throw new Error(
|
|
15
|
+
"You need to provide a unique name for the current wizard instance to be used to save data"
|
|
16
|
+
);
|
|
17
|
+
const e = Z(), r = _(), u = i.useNavigation ?? !0, h = i.navigationMode ?? "query", V = i.persist ?? !0;
|
|
18
|
+
if (u && (!e.value || !r))
|
|
19
|
+
throw new Error(
|
|
20
|
+
"Navigation is enabled but could not retrieve the router instance in useWizard."
|
|
21
|
+
);
|
|
22
|
+
const q = D(i.initialState), l = G(
|
|
23
|
+
V && sessionStorage.getItem(i.name) ? {
|
|
24
|
+
...q,
|
|
25
|
+
...JSON.parse(sessionStorage.getItem(i.name))
|
|
26
|
+
} : q
|
|
27
|
+
);
|
|
28
|
+
V && v(l, () => {
|
|
29
|
+
sessionStorage.setItem(i.name, JSON.stringify(l));
|
|
30
|
+
});
|
|
31
|
+
const w = H(i.steps), o = g(
|
|
32
|
+
() => Object.entries(w).reduce(
|
|
33
|
+
(t, [s, n]) => (n.condition && !n.condition(l) || (t[s] = { ...n, key: s }), t),
|
|
34
|
+
{}
|
|
35
|
+
)
|
|
36
|
+
), m = g(
|
|
37
|
+
() => X(
|
|
38
|
+
o.value,
|
|
39
|
+
(t) => typeof t.isValid == "function" ? {
|
|
40
|
+
...t,
|
|
41
|
+
isValid: t.isValid(l)
|
|
42
|
+
} : {
|
|
43
|
+
...t,
|
|
44
|
+
isValid: t.isValid ?? !0
|
|
50
45
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
let p = null;
|
|
49
|
+
if (u && a(e.value)) {
|
|
50
|
+
let t = null;
|
|
51
|
+
if (h === "query")
|
|
52
|
+
e.value.query.step && (t = e.value.query.step);
|
|
53
|
+
else {
|
|
54
|
+
const s = O(e.value.fullPath);
|
|
55
|
+
s && (t = s);
|
|
56
|
+
}
|
|
57
|
+
p = t;
|
|
61
58
|
}
|
|
62
|
-
|
|
59
|
+
if (p)
|
|
60
|
+
for (const t in o.value) {
|
|
61
|
+
if (t === p)
|
|
62
|
+
break;
|
|
63
|
+
const s = m.value[t];
|
|
64
|
+
if (!s || !s.isValid) {
|
|
65
|
+
p = null;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const {
|
|
70
|
+
steps: b,
|
|
71
|
+
current: P,
|
|
72
|
+
goToNext: j,
|
|
73
|
+
goToPrevious: A,
|
|
74
|
+
goTo: d,
|
|
75
|
+
index: K,
|
|
76
|
+
at: z,
|
|
77
|
+
get: F,
|
|
78
|
+
goBackTo: I,
|
|
79
|
+
isAfter: M,
|
|
80
|
+
isBefore: U,
|
|
81
|
+
isCurrent: B,
|
|
82
|
+
isFirst: C,
|
|
83
|
+
isLast: E,
|
|
84
|
+
isNext: J,
|
|
85
|
+
isPrevious: R,
|
|
86
|
+
next: W,
|
|
87
|
+
previous: $,
|
|
88
|
+
stepNames: L
|
|
89
|
+
} = ee(
|
|
90
|
+
m,
|
|
91
|
+
p || Object.values(o.value)[0].key
|
|
92
|
+
), c = g(() => Object.keys(o.value)[K.value]), T = {
|
|
93
|
+
at: z,
|
|
94
|
+
current: P,
|
|
95
|
+
data: l,
|
|
96
|
+
get: F,
|
|
97
|
+
goBackTo: I,
|
|
98
|
+
goTo: d,
|
|
99
|
+
goToNext: j,
|
|
100
|
+
goToPrevious: A,
|
|
101
|
+
isAfter: M,
|
|
102
|
+
isBefore: U,
|
|
103
|
+
isCurrent: B,
|
|
104
|
+
isFirst: C,
|
|
105
|
+
isLast: E,
|
|
106
|
+
isNext: J,
|
|
107
|
+
isPrevious: R,
|
|
108
|
+
key: c,
|
|
109
|
+
next: W,
|
|
110
|
+
previous: $,
|
|
111
|
+
stepNames: L,
|
|
112
|
+
steps: b
|
|
113
|
+
};
|
|
114
|
+
if (Q(te, T), u)
|
|
115
|
+
if (h === "query")
|
|
116
|
+
v(
|
|
117
|
+
c,
|
|
118
|
+
() => {
|
|
119
|
+
a(r) && a(e.value) && r.push({
|
|
120
|
+
...e,
|
|
121
|
+
query: { ...e.value.query, step: c.value ?? null }
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
{ immediate: !0 }
|
|
125
|
+
), v(
|
|
126
|
+
() => {
|
|
127
|
+
var t;
|
|
128
|
+
return (t = e.value) == null ? void 0 : t.query.step;
|
|
129
|
+
},
|
|
130
|
+
(t) => {
|
|
131
|
+
if (t) {
|
|
132
|
+
const s = t;
|
|
133
|
+
if (s in o.value) {
|
|
134
|
+
const n = s, f = Object.keys(o.value);
|
|
135
|
+
f.slice(
|
|
136
|
+
0,
|
|
137
|
+
f.indexOf(n)
|
|
138
|
+
).every(
|
|
139
|
+
(N) => {
|
|
140
|
+
var y;
|
|
141
|
+
return (y = m.value[N]) == null ? void 0 : y.isValid;
|
|
142
|
+
}
|
|
143
|
+
) && d(n);
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
const s = Object.keys(b)[0];
|
|
147
|
+
d(s);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
else {
|
|
152
|
+
const t = g(() => {
|
|
153
|
+
if (a(e.value))
|
|
154
|
+
return O(e.value.fullPath);
|
|
155
|
+
});
|
|
156
|
+
v(
|
|
157
|
+
c,
|
|
158
|
+
(s) => {
|
|
159
|
+
a(e.value) && a(r) && s && (e.value.path.includes("step") ? r.push({
|
|
160
|
+
query: e.value.query,
|
|
161
|
+
path: e.value.path.replace(x, `step/${s}`)
|
|
162
|
+
}) : r.push({
|
|
163
|
+
query: e.value.query,
|
|
164
|
+
// Normalizes paths with / and without
|
|
165
|
+
path: (e.value.path + `/step/${s}`).replace("//", "/"),
|
|
166
|
+
replace: !0
|
|
167
|
+
}));
|
|
168
|
+
},
|
|
169
|
+
{ immediate: !0 }
|
|
170
|
+
), v(
|
|
171
|
+
() => t.value,
|
|
172
|
+
(s) => {
|
|
173
|
+
if (s && s !== c.value) {
|
|
174
|
+
const n = s;
|
|
175
|
+
if (n in o.value) {
|
|
176
|
+
const f = n, S = Object.keys(o.value);
|
|
177
|
+
S.slice(
|
|
178
|
+
0,
|
|
179
|
+
S.indexOf(f)
|
|
180
|
+
).every(
|
|
181
|
+
(y) => {
|
|
182
|
+
var k;
|
|
183
|
+
return (k = o.value[y]) == null ? void 0 : k.isValid;
|
|
184
|
+
}
|
|
185
|
+
) && d(f);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
return T;
|
|
192
|
+
};
|
|
63
193
|
export {
|
|
64
|
-
|
|
194
|
+
le as useWizard,
|
|
195
|
+
te as wizardInjectionKey
|
|
65
196
|
};
|
|
66
197
|
//# sourceMappingURL=index9.js.map
|
package/dist/index9.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index9.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';\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\tif (isInertia && !props.disabled) return resolveComponent('Link');\n\t\treturn 'a';\n\t}\n\tif (props.to) {\n\t\tif (isNuxt) return resolveComponent('NuxtLink');\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\n\t\t'aria-disabled': boolean;\n\n\t\tariaCurrentValue: BaseButtonProps['ariaCurrentValue'];\n\n\t\tdata: BaseButtonProps['data'];\n\n\t\tdisabled: boolean;\n\n\t\texactActiveClass: BaseButtonProps['exactActiveClass'];\n\n\t\theaders: BaseButtonProps['headers'];\n\n\t\thref: string;\n\n\t\tmethod: BaseButtonProps['method'];\n\n\t\tonBefore: BaseButtonProps['onBefore'];\n\n\t\tonCancel: BaseButtonProps['onCancel'];\n\n\t\tonCancelToken: BaseButtonProps['onCancelToken'];\n\n\t\tonFinish: BaseButtonProps['onFinish'];\n\n\t\tonly: BaseButtonProps['only'];\n\n\t\tonProgress: BaseButtonProps['onProgress'];\n\n\t\tonStart: BaseButtonProps['onStart'];\n\n\t\tonSuccess: BaseButtonProps['onSuccess'];\n\n\t\tpreserveScroll: BaseButtonProps['preserveScroll'];\n\n\t\tpreserveState: BaseButtonProps['preserveState'];\n\n\t\tqueryStringArrayFormat: BaseButtonProps['queryStringArrayFormat'];\n\n\t\treplace: BaseButtonProps['replace'];\n\n\t\trole: string;\n\n\t\tstyle: { [rule: string]: string };\n\n\t\ttarget: string;\n\n\t\tto: BaseButtonProps['to'];\n\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\tswitch (tag.value) {\n\t\tcase 'button':\n\t\t\tinitial.disabled = props.disabled;\n\t\t\tinitial.type = props.type;\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t// When rendering as anchor prevent navigation if disabled\n\t\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\t\tif (props.disabled) {\n\t\t\t\tinitial['aria-disabled'] = true;\n\t\t\t\tinitial.role = 'link';\n\t\t\t} else {\n\t\t\t\t// Only attach the href to active links\n\t\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\t\tinitial.href = props.href;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'router-link':\n\t\t\tinitial.to = props.to;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\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","resolveComponent","classes","attributes","initial"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,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,MAEhBV,EAAM,QAASA,EAAM,MAAMA,EAAM,WAChCE,KAAa,CAACF,EAAM,WAAiBW,EAAiB,MAAM,IACzD,MAEJX,EAAM,KACLM,IAAeK,EAAiB,UAAU,IACvC,gBAEDX,EAAM,GACb,GAEKY,IAAUF,EAAS,OAAO;AAAA,MAC/B,YAAY;AAAA,MACZ,mBAAmBV,EAAM;AAAA,MACzB,sBAAsBA,EAAM;AAAA,IAC3B,EAAA,GAEIa,IAAaH,EAAS,MAAM;AAsDjC,YAAMI,IAAuC,CAAA;AAkD7C,cAhDIL,EAAI,UAAU,YACjBK,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM,QAErBS,EAAI,UAAU,OACbP,KAAa,OAAOO,EAAI,SAAU,YAAYA,EAAI,MAAM,SAAS,SAI9DT,EAAM,YACTc,EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,WAIfA,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,SAASd,EAAM,QAEnBE,MACHY,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,SAASd,EAAM,QACvBc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,gBAAgBd,EAAM,eAC9Bc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,aAAad,EAAM,YAC3Bc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,YAAYd,EAAM,WAC1Bc,EAAQ,iBAAiBd,EAAM,gBAC/Bc,EAAQ,gBAAgBd,EAAM,eAC9Bc,EAAQ,yBAAyBd,EAAM,wBACvCc,EAAQ,UAAUd,EAAM,aAI1BS,EAAI,UAAU,iBACb,OAAOA,EAAI,SAAU,YAAYA,EAAI,MAAM,SAAS,gBAErDK,EAAQ,cAAcd,EAAM,aAC5Bc,EAAQ,mBAAmBd,EAAM,kBACjCc,EAAQ,mBAAmBd,EAAM,kBACjCc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,SAASd,EAAM,QACvBc,EAAQ,KAAKd,EAAM,KAGZS,EAAI,OAAO;AAAA,QAClB,KAAK;AACJ,UAAAK,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM;AACrB;AAAA,QACD,KAAK;AAGJ,UAAIA,EAAM,YACTc,EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,UAIfA,EAAQ,OAAOd,EAAM;AAEtB;AAAA,QACD,KAAK;AACJ,UAAAc,EAAQ,KAAKd,EAAM;AACnB;AAAA,MAGF;AACO,aAAAc;AAAA,IAAA,CACP;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index9.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":"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"}
|
package/dist/index90.js
CHANGED
|
@@ -1,2 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as l, openBlock as e, createBlock as o, resolveDynamicComponent as a, normalizeStyle as n, withCtx as r, renderSlot as i } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ l({
|
|
3
|
+
__name: "BbRatio",
|
|
4
|
+
props: {
|
|
5
|
+
ratio: { default: 1 },
|
|
6
|
+
tag: { default: "div" }
|
|
7
|
+
},
|
|
8
|
+
setup(s) {
|
|
9
|
+
return (t, d) => (e(), o(a(t.tag), {
|
|
10
|
+
class: "bb-ratio",
|
|
11
|
+
style: n({
|
|
12
|
+
width: "100%",
|
|
13
|
+
paddingBottom: `${(1 / t.ratio * 100).toFixed(2)}%`
|
|
14
|
+
})
|
|
15
|
+
}, {
|
|
16
|
+
default: r(() => [
|
|
17
|
+
(e(), o(a(t.tag), { class: "bb-ratio__inner" }, {
|
|
18
|
+
default: r(() => [
|
|
19
|
+
i(t.$slots, "default")
|
|
20
|
+
]),
|
|
21
|
+
_: 3
|
|
22
|
+
}))
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 8, ["style"]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
f as default
|
|
30
|
+
};
|
|
2
31
|
//# sourceMappingURL=index90.js.map
|
package/dist/index90.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index90.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index90.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|