buefy 0.9.21 → 0.9.23
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/README.md +4 -0
- package/dist/buefy.css +76 -24
- package/dist/buefy.esm.js +103 -89
- package/dist/buefy.esm.min.js +2 -2
- package/dist/buefy.js +103 -88
- package/dist/buefy.min.css +1 -1
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +2 -2
- package/dist/cjs/{chunk-dddb035c.js → chunk-37e64a78.js} +6 -2
- package/dist/cjs/{chunk-f8eb56c6.js → chunk-4702fda4.js} +1 -1
- package/dist/cjs/{chunk-bcab8905.js → chunk-6e9f64e7.js} +3 -3
- package/dist/cjs/{chunk-eba24a95.js → chunk-8ab08774.js} +5 -5
- package/dist/cjs/{chunk-85b00a19.js → chunk-94bbc46e.js} +4 -4
- package/dist/cjs/{chunk-befea70a.js → chunk-994f8066.js} +22 -8
- package/dist/cjs/{chunk-95c4b826.js → chunk-a39776c7.js} +4 -1
- package/dist/cjs/{chunk-cc9676a6.js → chunk-b7163607.js} +2 -1
- package/dist/cjs/clockpicker.js +3 -3
- package/dist/cjs/colorpicker-a5bbcf7b.js +1774 -0
- package/dist/cjs/colorpicker.js +14 -1750
- package/dist/cjs/datepicker.js +4 -4
- package/dist/cjs/datetimepicker.js +5 -5
- package/dist/cjs/dialog.js +1 -1
- package/dist/cjs/dropdown.js +1 -1
- package/dist/cjs/field.js +1 -1
- package/dist/cjs/index.js +12 -11
- package/dist/cjs/input.js +1 -1
- package/dist/cjs/message.js +1 -1
- package/dist/cjs/modal.js +1 -1
- package/dist/cjs/navbar.js +4 -1
- package/dist/cjs/notification.js +1 -1
- package/dist/cjs/numberinput.js +7 -2
- package/dist/cjs/sidebar.js +6 -44
- package/dist/cjs/steps.js +1 -1
- package/dist/cjs/table.js +5 -5
- package/dist/cjs/tabs.js +1 -1
- package/dist/cjs/taginput.js +7 -3
- package/dist/cjs/timepicker.js +4 -4
- package/dist/components/autocomplete/index.js +26 -9
- package/dist/components/autocomplete/index.min.js +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/breadcrumb/index.min.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.min.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.min.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.min.js +1 -1
- package/dist/components/clockpicker/index.js +12 -5
- package/dist/components/clockpicker/index.min.js +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/collapse/index.min.js +1 -1
- package/dist/components/colorpicker/index.js +46 -21
- package/dist/components/colorpicker/index.min.js +2 -2
- package/dist/components/datepicker/index.js +13 -6
- package/dist/components/datepicker/index.min.js +2 -2
- package/dist/components/datetimepicker/index.js +13 -6
- package/dist/components/datetimepicker/index.min.js +2 -2
- package/dist/components/dialog/index.js +3 -2
- package/dist/components/dialog/index.min.js +2 -2
- package/dist/components/dropdown/index.js +7 -3
- package/dist/components/dropdown/index.min.js +2 -2
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/index.min.js +2 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/index.min.js +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/image/index.min.js +1 -1
- package/dist/components/input/index.js +5 -2
- package/dist/components/input/index.min.js +2 -2
- package/dist/components/loading/index.js +1 -1
- package/dist/components/loading/index.min.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.min.js +1 -1
- package/dist/components/message/index.js +2 -2
- package/dist/components/message/index.min.js +2 -2
- package/dist/components/modal/index.js +3 -2
- package/dist/components/modal/index.min.js +2 -2
- package/dist/components/navbar/index.js +5 -2
- package/dist/components/navbar/index.min.js +2 -2
- package/dist/components/notification/index.js +2 -2
- package/dist/components/notification/index.min.js +2 -2
- package/dist/components/numberinput/index.js +11 -3
- package/dist/components/numberinput/index.min.js +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.min.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.min.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.min.js +1 -1
- package/dist/components/rate/index.js +1 -1
- package/dist/components/rate/index.min.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.min.js +1 -1
- package/dist/components/sidebar/index.js +7 -48
- package/dist/components/sidebar/index.min.js +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/index.min.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.min.js +1 -1
- package/dist/components/snackbar/index.js +1 -1
- package/dist/components/snackbar/index.min.js +1 -1
- package/dist/components/steps/index.js +6 -6
- package/dist/components/steps/index.min.js +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.min.js +1 -1
- package/dist/components/table/index.js +9 -6
- package/dist/components/table/index.min.js +2 -2
- package/dist/components/tabs/index.js +6 -6
- package/dist/components/tabs/index.min.js +2 -2
- package/dist/components/tag/index.js +1 -1
- package/dist/components/tag/index.min.js +1 -1
- package/dist/components/taginput/index.js +31 -10
- package/dist/components/taginput/index.min.js +2 -2
- package/dist/components/timepicker/index.js +12 -5
- package/dist/components/timepicker/index.min.js +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.min.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.min.js +1 -1
- package/dist/components/upload/index.js +1 -1
- package/dist/components/upload/index.min.js +1 -1
- package/dist/esm/autocomplete.js +6 -6
- package/dist/esm/button.js +4 -4
- package/dist/esm/carousel.js +4 -4
- package/dist/esm/{chunk-293c457c.js → chunk-007b3ff8.js} +7 -7
- package/dist/esm/{chunk-c5284276.js → chunk-048831a9.js} +2 -2
- package/dist/esm/{chunk-493ff0a9.js → chunk-07da0ba7.js} +1 -1
- package/dist/esm/{chunk-ade5b253.js → chunk-0c67e5e7.js} +8 -4
- package/dist/esm/{chunk-9b0b8225.js → chunk-18dce47f.js} +1 -1
- package/dist/esm/{chunk-6e56b8bc.js → chunk-27ec55c7.js} +1 -1
- package/dist/esm/{chunk-7e17a637.js → chunk-4b289821.js} +1 -1
- package/dist/esm/{chunk-d46e7ff0.js → chunk-6a7209ee.js} +2 -2
- package/dist/esm/{chunk-b5576437.js → chunk-6b514c98.js} +2 -2
- package/dist/esm/{chunk-f32d0228.js → chunk-6efa106e.js} +9 -9
- package/dist/esm/{chunk-60a03517.js → chunk-70481141.js} +1 -1
- package/dist/esm/{chunk-455cdeae.js → chunk-851d1b8f.js} +1 -1
- package/dist/esm/{chunk-33e1434e.js → chunk-8e497030.js} +2 -1
- package/dist/esm/{chunk-b0123b89.js → chunk-9bd1f33e.js} +24 -10
- package/dist/esm/{chunk-4e788733.js → chunk-bf29bc31.js} +3 -3
- package/dist/esm/{chunk-7bb9107f.js → chunk-d62aa1f5.js} +2 -2
- package/dist/esm/{chunk-83c8b459.js → chunk-d77d421b.js} +7 -4
- package/dist/esm/{chunk-6c64686f.js → chunk-dc931ea5.js} +8 -8
- package/dist/esm/clockpicker.js +8 -8
- package/dist/esm/colorpicker-91643f19.js +1770 -0
- package/dist/esm/colorpicker.js +13 -1754
- package/dist/esm/config.js +1 -1
- package/dist/esm/datepicker.js +10 -10
- package/dist/esm/datetimepicker.js +11 -11
- package/dist/esm/dialog.js +4 -4
- package/dist/esm/dropdown.js +4 -4
- package/dist/esm/field.js +3 -3
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/icon.js +3 -3
- package/dist/esm/image.js +3 -3
- package/dist/esm/index.js +24 -24
- package/dist/esm/input.js +5 -5
- package/dist/esm/loading.js +3 -3
- package/dist/esm/menu.js +2 -2
- package/dist/esm/message.js +4 -4
- package/dist/esm/modal.js +3 -3
- package/dist/esm/navbar.js +5 -2
- package/dist/esm/notification.js +5 -5
- package/dist/esm/numberinput.js +10 -5
- package/dist/esm/pagination.js +4 -4
- package/dist/esm/progress.js +2 -2
- package/dist/esm/rate.js +2 -2
- package/dist/esm/select.js +5 -5
- package/dist/esm/sidebar.js +8 -46
- package/dist/esm/slider.js +2 -2
- package/dist/esm/snackbar.js +2 -2
- package/dist/esm/steps.js +5 -5
- package/dist/esm/table.js +12 -12
- package/dist/esm/tabs.js +5 -5
- package/dist/esm/taginput.js +10 -6
- package/dist/esm/timepicker.js +11 -11
- package/dist/esm/toast.js +2 -2
- package/dist/esm/tooltip.js +3 -3
- package/dist/esm/upload.js +2 -2
- package/dist/vetur/attributes.json +12 -0
- package/dist/vetur/tags.json +5 -2
- package/package.json +3 -2
- package/src/components/autocomplete/Autocomplete.vue +23 -4
- package/src/components/autocomplete/index.js +1 -1
- package/src/components/breadcrumb/Breadcrumb.vue +0 -2
- package/src/components/breadcrumb/BreadcrumbItem.spec.js +1 -1
- package/src/components/breadcrumb/BreadcrumbItem.vue +0 -3
- package/src/components/breadcrumb/index.js +2 -2
- package/src/components/button/Button.vue +1 -1
- package/src/components/button/index.js +1 -1
- package/src/components/carousel/Carousel.vue +1 -1
- package/src/components/carousel/CarouselList.vue +2 -2
- package/src/components/carousel/index.js +3 -3
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/CheckboxButton.vue +1 -1
- package/src/components/checkbox/index.js +2 -2
- package/src/components/clockpicker/Clockpicker.vue +5 -5
- package/src/components/clockpicker/index.js +1 -1
- package/src/components/collapse/index.js +1 -1
- package/src/components/colorpicker/Colorpicker.vue +50 -31
- package/src/components/colorpicker/ColorpickerAlphaSlider.spec.js +3 -1
- package/src/components/colorpicker/ColorpickerAlphaSlider.vue +1 -1
- package/src/components/colorpicker/index.js +1 -1
- package/src/components/datepicker/Datepicker.spec.js +4 -4
- package/src/components/datepicker/Datepicker.vue +14 -13
- package/src/components/datepicker/DatepickerTable.vue +1 -1
- package/src/components/datepicker/index.js +1 -1
- package/src/components/datetimepicker/Datetimepicker.vue +2 -2
- package/src/components/datetimepicker/index.js +1 -1
- package/src/components/dialog/Dialog.vue +3 -3
- package/src/components/dialog/index.js +1 -1
- package/src/components/dropdown/Dropdown.vue +6 -2
- package/src/components/dropdown/index.js +2 -2
- package/src/components/field/Field.spec.js +11 -2
- package/src/components/field/Field.vue +6 -2
- package/src/components/field/index.js +1 -1
- package/src/components/icon/index.js +1 -1
- package/src/components/image/index.js +1 -1
- package/src/components/input/Input.spec.js +11 -0
- package/src/components/input/Input.vue +5 -2
- package/src/components/input/index.js +1 -1
- package/src/components/loading/index.js +1 -1
- package/src/components/menu/MenuItem.vue +1 -1
- package/src/components/menu/index.js +3 -3
- package/src/components/message/Message.vue +2 -1
- package/src/components/message/index.js +1 -1
- package/src/components/modal/Modal.vue +2 -1
- package/src/components/modal/index.js +1 -1
- package/src/components/navbar/NavBar.spec.js +1 -1
- package/src/components/navbar/{NavbarBurger.spec.js → NavBarBurger.spec.js} +1 -1
- package/src/components/navbar/NavBarItem.spec.js +1 -1
- package/src/components/navbar/NavbarDropdown.spec.js +1 -1
- package/src/components/navbar/NavbarDropdown.vue +10 -1
- package/src/components/navbar/index.js +3 -3
- package/src/components/notification/Notification.vue +3 -2
- package/src/components/notification/NotificationNotice.vue +1 -1
- package/src/components/notification/index.js +2 -2
- package/src/components/numberinput/Numberinput.spec.js +31 -0
- package/src/components/numberinput/Numberinput.vue +8 -3
- package/src/components/numberinput/index.js +1 -1
- package/src/components/pagination/Pagination.vue +2 -2
- package/src/components/pagination/index.js +2 -2
- package/src/components/progress/index.js +2 -2
- package/src/components/radio/Radio.vue +1 -1
- package/src/components/radio/RadioButton.vue +1 -1
- package/src/components/radio/index.js +2 -2
- package/src/components/rate/Rate.vue +1 -1
- package/src/components/rate/index.js +1 -1
- package/src/components/select/Select.vue +1 -1
- package/src/components/select/index.js +1 -1
- package/src/components/sidebar/Sidebar.vue +6 -25
- package/src/components/sidebar/index.js +1 -1
- package/src/components/skeleton/index.js +1 -1
- package/src/components/slider/Slider.vue +2 -2
- package/src/components/slider/SliderThumb.vue +1 -1
- package/src/components/slider/index.js +2 -2
- package/src/components/snackbar/Snackbar.vue +1 -1
- package/src/components/snackbar/index.js +1 -1
- package/src/components/steps/StepItem.vue +1 -1
- package/src/components/steps/Steps.vue +2 -2
- package/src/components/steps/index.js +2 -2
- package/src/components/switch/index.js +1 -1
- package/src/components/table/Table.vue +31 -19
- package/src/components/table/TableColumn.vue +121 -121
- package/src/components/table/TableMobileSort.vue +2 -2
- package/src/components/table/TablePagination.vue +1 -1
- package/src/components/table/index.js +2 -2
- package/src/components/tabs/TabItem.vue +1 -1
- package/src/components/tabs/Tabs.vue +1 -1
- package/src/components/tabs/index.js +2 -2
- package/src/components/tag/index.js +2 -2
- package/src/components/taginput/Taginput.vue +7 -3
- package/src/components/taginput/index.js +1 -1
- package/src/components/timepicker/Timepicker.vue +6 -6
- package/src/components/timepicker/index.js +1 -1
- package/src/components/toast/Toast.vue +1 -1
- package/src/components/toast/index.js +1 -1
- package/src/components/tooltip/Tooltip.spec.js +35 -0
- package/src/components/tooltip/index.js +1 -1
- package/src/components/upload/index.js +1 -1
- package/src/index.js +1 -0
- package/src/scss/components/_colorpicker.scss +1 -1
- package/src/scss/components/_datepicker.scss +2 -2
- package/src/scss/components/_message.scss +8 -2
- package/src/scss/components/_notification.scss +5 -5
- package/src/scss/components/_radio.scss +3 -0
- package/src/scss/components/_table.scss +1 -0
- package/src/utils/MessageMixin.js +1 -1
- package/src/utils/TabbedChildMixin.js +1 -1
- package/src/utils/TabbedMixin.js +1 -1
- package/src/utils/color.js +3 -2
- package/src/utils/color.spec.js +3 -1
- package/CHANGELOG.md +0 -1741
- /package/dist/esm/{chunk-6d0f2352.js → chunk-241dbe8d.js} +0 -0
- /package/dist/esm/{chunk-17b33cd2.js → chunk-6ca75105.js} +0 -0
- /package/dist/esm/{chunk-c9c18b2f.js → chunk-f37c671e.js} +0 -0
- /package/dist/esm/{chunk-a32d1427.js → chunk-f4922148.js} +0 -0
- /package/src/components/colorpicker/__snapshots__/{ColorPickerHSLRepresentationSquare.spec.js.snap → ColorpickerHSLRepresentationSquare.spec.js.snap} +0 -0
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { toCssWidth } from '../../utils/helpers'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
name: 'BTableColumn',
|
|
6
|
-
inject: {
|
|
7
|
-
$table: { name: '$table', default: false }
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
label: String,
|
|
11
|
-
customKey: [String, Number],
|
|
12
|
-
field: String,
|
|
13
|
-
meta: [String, Number, Boolean, Function, Object, Array],
|
|
14
|
-
width: [Number, String],
|
|
15
|
-
numeric: Boolean,
|
|
16
|
-
centered: Boolean,
|
|
17
|
-
searchable: Boolean,
|
|
18
|
-
sortable: Boolean,
|
|
19
|
-
visible: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: true
|
|
22
|
-
},
|
|
23
|
-
subheading: [String, Number],
|
|
24
|
-
customSort: Function,
|
|
25
|
-
customSearch: Function,
|
|
26
|
-
sticky: Boolean,
|
|
27
|
-
headerSelectable: Boolean,
|
|
28
|
-
headerClass: String,
|
|
29
|
-
cellClass: String,
|
|
30
|
-
thAttrs: {
|
|
31
|
-
type: Function,
|
|
32
|
-
default: () => ({})
|
|
33
|
-
},
|
|
34
|
-
tdAttrs: {
|
|
35
|
-
type: Function,
|
|
36
|
-
default: () => ({})
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
newKey: this.customKey || this.label,
|
|
42
|
-
_isTableColumn: true
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
thClasses() {
|
|
47
|
-
const attrs = this.thAttrs(this)
|
|
48
|
-
const classes = [this.headerClass, {
|
|
49
|
-
'is-sortable': this.sortable,
|
|
50
|
-
'is-sticky': this.sticky,
|
|
51
|
-
'is-unselectable': this.isHeaderUnSelectable
|
|
52
|
-
}]
|
|
53
|
-
if (attrs && attrs.class) {
|
|
54
|
-
classes.push(attrs.class)
|
|
55
|
-
}
|
|
56
|
-
return classes
|
|
57
|
-
},
|
|
58
|
-
thStyle() {
|
|
59
|
-
const attrs = this.thAttrs(this)
|
|
60
|
-
const style = [this.style]
|
|
61
|
-
if (attrs && attrs.style) {
|
|
62
|
-
style.push(attrs.style)
|
|
63
|
-
}
|
|
64
|
-
return style
|
|
65
|
-
},
|
|
66
|
-
rootClasses() {
|
|
67
|
-
return [this.cellClass, {
|
|
68
|
-
'has-text-right': this.numeric && !this.centered,
|
|
69
|
-
'has-text-centered': this.centered,
|
|
70
|
-
'is-sticky': this.sticky
|
|
71
|
-
}]
|
|
72
|
-
},
|
|
73
|
-
style() {
|
|
74
|
-
return {
|
|
75
|
-
width: toCssWidth(this.width)
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
hasDefaultSlot() {
|
|
79
|
-
return !!this.$scopedSlots.default
|
|
80
|
-
},
|
|
81
|
-
/**
|
|
82
|
-
* Return if column header is un-selectable
|
|
83
|
-
*/
|
|
84
|
-
isHeaderUnSelectable() {
|
|
85
|
-
return !this.headerSelectable && this.sortable
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
methods: {
|
|
89
|
-
getRootClasses(row) {
|
|
90
|
-
const attrs = this.tdAttrs(row, this)
|
|
91
|
-
const classes = [this.rootClasses]
|
|
92
|
-
if (attrs && attrs.class) {
|
|
93
|
-
classes.push(attrs.class)
|
|
94
|
-
}
|
|
95
|
-
return classes
|
|
96
|
-
},
|
|
97
|
-
getRootStyle(row) {
|
|
98
|
-
const attrs = this.tdAttrs(row, this)
|
|
99
|
-
const style = []
|
|
100
|
-
if (attrs && attrs.style) {
|
|
101
|
-
style.push(attrs.style)
|
|
102
|
-
}
|
|
103
|
-
return style
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
created() {
|
|
107
|
-
if (!this.$table) {
|
|
108
|
-
this.$destroy()
|
|
109
|
-
throw new Error('You should wrap bTableColumn on a bTable')
|
|
110
|
-
}
|
|
111
|
-
this.$table.refreshSlots()
|
|
112
|
-
},
|
|
113
|
-
beforeDestroy() {
|
|
114
|
-
this.$table.refreshSlots()
|
|
115
|
-
},
|
|
116
|
-
render(createElement) {
|
|
117
|
-
// renderless
|
|
118
|
-
return null
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
</script>
|
|
1
|
+
<script>
|
|
2
|
+
import { toCssWidth } from '../../utils/helpers'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'BTableColumn',
|
|
6
|
+
inject: {
|
|
7
|
+
$table: { name: '$table', default: false }
|
|
8
|
+
},
|
|
9
|
+
props: {
|
|
10
|
+
label: String,
|
|
11
|
+
customKey: [String, Number],
|
|
12
|
+
field: String,
|
|
13
|
+
meta: [String, Number, Boolean, Function, Object, Array],
|
|
14
|
+
width: [Number, String],
|
|
15
|
+
numeric: Boolean,
|
|
16
|
+
centered: Boolean,
|
|
17
|
+
searchable: Boolean,
|
|
18
|
+
sortable: Boolean,
|
|
19
|
+
visible: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true
|
|
22
|
+
},
|
|
23
|
+
subheading: [String, Number],
|
|
24
|
+
customSort: Function,
|
|
25
|
+
customSearch: Function,
|
|
26
|
+
sticky: Boolean,
|
|
27
|
+
headerSelectable: Boolean,
|
|
28
|
+
headerClass: String,
|
|
29
|
+
cellClass: String,
|
|
30
|
+
thAttrs: {
|
|
31
|
+
type: Function,
|
|
32
|
+
default: () => ({})
|
|
33
|
+
},
|
|
34
|
+
tdAttrs: {
|
|
35
|
+
type: Function,
|
|
36
|
+
default: () => ({})
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
newKey: this.customKey || this.label,
|
|
42
|
+
_isTableColumn: true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
thClasses() {
|
|
47
|
+
const attrs = this.thAttrs(this)
|
|
48
|
+
const classes = [this.headerClass, {
|
|
49
|
+
'is-sortable': this.sortable,
|
|
50
|
+
'is-sticky': this.sticky,
|
|
51
|
+
'is-unselectable': this.isHeaderUnSelectable
|
|
52
|
+
}]
|
|
53
|
+
if (attrs && attrs.class) {
|
|
54
|
+
classes.push(attrs.class)
|
|
55
|
+
}
|
|
56
|
+
return classes
|
|
57
|
+
},
|
|
58
|
+
thStyle() {
|
|
59
|
+
const attrs = this.thAttrs(this)
|
|
60
|
+
const style = [this.style]
|
|
61
|
+
if (attrs && attrs.style) {
|
|
62
|
+
style.push(attrs.style)
|
|
63
|
+
}
|
|
64
|
+
return style
|
|
65
|
+
},
|
|
66
|
+
rootClasses() {
|
|
67
|
+
return [this.cellClass, {
|
|
68
|
+
'has-text-right': this.numeric && !this.centered,
|
|
69
|
+
'has-text-centered': this.centered,
|
|
70
|
+
'is-sticky': this.sticky
|
|
71
|
+
}]
|
|
72
|
+
},
|
|
73
|
+
style() {
|
|
74
|
+
return {
|
|
75
|
+
width: toCssWidth(this.width)
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
hasDefaultSlot() {
|
|
79
|
+
return !!this.$scopedSlots.default
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* Return if column header is un-selectable
|
|
83
|
+
*/
|
|
84
|
+
isHeaderUnSelectable() {
|
|
85
|
+
return !this.headerSelectable && this.sortable
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
methods: {
|
|
89
|
+
getRootClasses(row) {
|
|
90
|
+
const attrs = this.tdAttrs(row, this)
|
|
91
|
+
const classes = [this.rootClasses]
|
|
92
|
+
if (attrs && attrs.class) {
|
|
93
|
+
classes.push(attrs.class)
|
|
94
|
+
}
|
|
95
|
+
return classes
|
|
96
|
+
},
|
|
97
|
+
getRootStyle(row) {
|
|
98
|
+
const attrs = this.tdAttrs(row, this)
|
|
99
|
+
const style = []
|
|
100
|
+
if (attrs && attrs.style) {
|
|
101
|
+
style.push(attrs.style)
|
|
102
|
+
}
|
|
103
|
+
return style
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
created() {
|
|
107
|
+
if (!this.$table) {
|
|
108
|
+
this.$destroy()
|
|
109
|
+
throw new Error('You should wrap bTableColumn on a bTable')
|
|
110
|
+
}
|
|
111
|
+
this.$table.refreshSlots()
|
|
112
|
+
},
|
|
113
|
+
beforeDestroy() {
|
|
114
|
+
this.$table.refreshSlots()
|
|
115
|
+
},
|
|
116
|
+
render(createElement) {
|
|
117
|
+
// renderless
|
|
118
|
+
return null
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Table from './Table'
|
|
2
|
-
import TableColumn from './TableColumn'
|
|
1
|
+
import Table from './Table.vue'
|
|
2
|
+
import TableColumn from './TableColumn.vue'
|
|
3
3
|
|
|
4
4
|
import { use, registerComponent } from '../../utils/plugins'
|
|
5
5
|
import { VueInstance, setVueInstance } from '../../utils/config'
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
:loading="loading"
|
|
44
44
|
:autocomplete="nativeAutocomplete"
|
|
45
45
|
:open-on-focus="openOnFocus"
|
|
46
|
-
:keep-open="
|
|
46
|
+
:keep-open="keepOpen"
|
|
47
47
|
:keep-first="keepFirst"
|
|
48
48
|
:group-field="groupField"
|
|
49
49
|
:group-options="groupOptions"
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
|
|
99
99
|
<script>
|
|
100
100
|
import { getValueByPath } from '../../utils/helpers'
|
|
101
|
-
import Tag from '../tag/Tag'
|
|
102
|
-
import Autocomplete from '../autocomplete/Autocomplete'
|
|
101
|
+
import Tag from '../tag/Tag.vue'
|
|
102
|
+
import Autocomplete from '../autocomplete/Autocomplete.vue'
|
|
103
103
|
import config from '../../utils/config'
|
|
104
104
|
import FormElementMixin from '../../utils/FormElementMixin'
|
|
105
105
|
|
|
@@ -147,6 +147,10 @@ export default {
|
|
|
147
147
|
groupOptions: String,
|
|
148
148
|
nativeAutocomplete: String,
|
|
149
149
|
openOnFocus: Boolean,
|
|
150
|
+
keepOpen: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
default: true
|
|
153
|
+
},
|
|
150
154
|
keepFirst: Boolean,
|
|
151
155
|
disabled: Boolean,
|
|
152
156
|
ellipsis: Boolean,
|
|
@@ -129,12 +129,12 @@
|
|
|
129
129
|
|
|
130
130
|
<script>
|
|
131
131
|
import TimepickerMixin from '../../utils/TimepickerMixin'
|
|
132
|
-
import Dropdown from '../dropdown/Dropdown'
|
|
133
|
-
import DropdownItem from '../dropdown/DropdownItem'
|
|
134
|
-
import Input from '../input/Input'
|
|
135
|
-
import Field from '../field/Field'
|
|
136
|
-
import Select from '../select/Select'
|
|
137
|
-
import Icon from '../icon/Icon'
|
|
132
|
+
import Dropdown from '../dropdown/Dropdown.vue'
|
|
133
|
+
import DropdownItem from '../dropdown/DropdownItem.vue'
|
|
134
|
+
import Input from '../input/Input.vue'
|
|
135
|
+
import Field from '../field/Field.vue'
|
|
136
|
+
import Select from '../select/Select.vue'
|
|
137
|
+
import Icon from '../icon/Icon.vue'
|
|
138
138
|
|
|
139
139
|
export default {
|
|
140
140
|
name: 'BTimepicker',
|
|
@@ -16,4 +16,39 @@ describe('BTooltip', () => {
|
|
|
16
16
|
it('render correctly', () => {
|
|
17
17
|
expect(wrapper.html()).toMatchSnapshot()
|
|
18
18
|
})
|
|
19
|
+
|
|
20
|
+
it('tests isActive watch', async () => {
|
|
21
|
+
await wrapper.setProps({appendToBody: true})
|
|
22
|
+
wrapper.vm.updateAppendToBody = jest.fn()
|
|
23
|
+
wrapper.vm.isActive = true
|
|
24
|
+
expect(wrapper.vm.updateAppendToBody).toHaveBeenCalled()
|
|
25
|
+
expect(wrapper.emitted().open).toBeTruthy()
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('tests onHover method', async () => {
|
|
29
|
+
const onHover = jest.spyOn(wrapper.vm, 'onHover')
|
|
30
|
+
const open = jest.spyOn(wrapper.vm, 'open')
|
|
31
|
+
await wrapper.setProps({triggers: ['hover']})
|
|
32
|
+
wrapper.vm.onHover()
|
|
33
|
+
expect(onHover).toHaveBeenCalled()
|
|
34
|
+
expect(open).toHaveBeenCalled()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('tests onContextMenu method', async () => {
|
|
38
|
+
const onContextMenu = jest.spyOn(wrapper.vm, 'onContextMenu')
|
|
39
|
+
const open = jest.spyOn(wrapper.vm, 'open')
|
|
40
|
+
await wrapper.setProps({triggers: ['contextmenu']})
|
|
41
|
+
wrapper.vm.onContextMenu({preventDefault: jest.fn()})
|
|
42
|
+
expect(onContextMenu).toHaveBeenCalled()
|
|
43
|
+
expect(open).toHaveBeenCalled()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
it('tests onFocus method', async () => {
|
|
47
|
+
const onFocus = jest.spyOn(wrapper.vm, 'onFocus')
|
|
48
|
+
const open = jest.spyOn(wrapper.vm, 'open')
|
|
49
|
+
await wrapper.setProps({triggers: ['focus']})
|
|
50
|
+
wrapper.vm.onFocus()
|
|
51
|
+
expect(onFocus).toHaveBeenCalled()
|
|
52
|
+
expect(open).toHaveBeenCalled()
|
|
53
|
+
})
|
|
19
54
|
})
|
package/src/index.js
CHANGED
|
@@ -36,5 +36,6 @@ export { NotificationProgrammatic } from './components/notification'
|
|
|
36
36
|
export { SnackbarProgrammatic } from './components/snackbar'
|
|
37
37
|
export { ToastProgrammatic } from './components/toast'
|
|
38
38
|
export { default as ConfigProgrammatic } from './utils/ConfigComponent'
|
|
39
|
+
export { default as Color } from './utils/color'
|
|
39
40
|
// export helpers
|
|
40
41
|
export * from './utils/helpers'
|
|
@@ -210,10 +210,10 @@ $datepicker-item-selected-background-color: $primary !default;
|
|
|
210
210
|
margin-left: 5px;
|
|
211
211
|
display: flex;
|
|
212
212
|
}
|
|
213
|
-
.dropdown-
|
|
213
|
+
.dropdown-horizontal-timepicker {
|
|
214
214
|
display: flex;
|
|
215
215
|
}
|
|
216
|
-
.content-
|
|
216
|
+
.content-horizontal-timepicker {
|
|
217
217
|
border-right: 1px solid #dbdbdb;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
padding-top: 0;
|
|
5
5
|
border: 0;
|
|
6
6
|
}
|
|
7
|
-
progress {
|
|
8
|
-
|
|
7
|
+
.auto-close-progress {
|
|
8
|
+
progress {
|
|
9
|
+
border-top-left-radius: 0!important;
|
|
10
|
+
border-top-right-radius: 0!important;
|
|
11
|
+
border-bottom-left-radius: 0!important;
|
|
12
|
+
border-bottom-right-radius: 0!important;
|
|
13
|
+
height: 10px!important;
|
|
14
|
+
}
|
|
9
15
|
}
|
|
10
16
|
}
|
|
@@ -62,8 +62,8 @@ export default (parentCmp) => ({
|
|
|
62
62
|
name: 'show',
|
|
63
63
|
value: this.isActive && this.visible
|
|
64
64
|
}],
|
|
65
|
+
staticClass: this.elementClass,
|
|
65
66
|
attrs: {
|
|
66
|
-
'class': this.elementClass,
|
|
67
67
|
'role': this.elementRole,
|
|
68
68
|
'id': `${this.value}-content`,
|
|
69
69
|
'aria-labelledby': this.elementRole ? `${this.value}-label` : null,
|
package/src/utils/TabbedMixin.js
CHANGED
package/src/utils/color.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const colorChannels = ['red', 'green', 'blue', 'alpha']
|
|
2
2
|
|
|
3
3
|
export const colorsNammed = {
|
|
4
|
+
transparent: '#00000000',
|
|
4
5
|
black: '#000000',
|
|
5
6
|
silver: '#c0c0c0',
|
|
6
7
|
gray: '#808080',
|
|
@@ -328,12 +329,12 @@ class Color {
|
|
|
328
329
|
]
|
|
329
330
|
|
|
330
331
|
return Color.fromRGB(...channels.map((value) => Number(value)))
|
|
331
|
-
} else if ((
|
|
332
|
+
} else if ((args[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))) {
|
|
332
333
|
throw new Error('Color expression not implemented yet')
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
336
|
|
|
336
|
-
|
|
337
|
+
throw new Error('Invalid color expression')
|
|
337
338
|
}
|
|
338
339
|
|
|
339
340
|
static parseObject(object) {
|
package/src/utils/color.spec.js
CHANGED
|
@@ -7,8 +7,10 @@ describe('Color', () => {
|
|
|
7
7
|
|
|
8
8
|
expect(red.$channels).toEqual(new Uint8Array([255, 0, 0, 255]))
|
|
9
9
|
expect(transparentBlue.$channels).toEqual(new Uint8Array([0, 0, 255, 6]))
|
|
10
|
+
expect(() => Color.parse('#1234567')).toThrow()
|
|
11
|
+
expect(() => Color.parse('#123456789')).toThrow()
|
|
10
12
|
})
|
|
11
|
-
it('parse
|
|
13
|
+
it('parse named color', () => {
|
|
12
14
|
const lime = Color.parse('lime')
|
|
13
15
|
const transparent = Color.parse('transparent')
|
|
14
16
|
|