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