@coreui/vue-pro 4.0.3 → 4.1.2
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 +1 -1
- package/dist/components/accordion/CAccordion.d.ts +18 -10
- package/dist/components/accordion/CAccordionBody.d.ts +1 -1
- package/dist/components/accordion/CAccordionButton.d.ts +1 -1
- package/dist/components/accordion/CAccordionCollapse.d.ts +9 -5
- package/dist/components/accordion/CAccordionHeader.d.ts +1 -1
- package/dist/components/accordion/CAccordionItem.d.ts +10 -5
- package/dist/components/alert/CAlert.d.ts +38 -12
- package/dist/components/alert/CAlertHeading.d.ts +10 -5
- package/dist/components/alert/CAlertLink.d.ts +1 -1
- package/dist/components/avatar/CAvatar.d.ts +59 -15
- package/dist/components/backdrop/CBackdrop.d.ts +10 -5
- package/dist/components/badge/CBadge.d.ts +59 -16
- package/dist/components/breadcrumb/CBreadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/CBreadcrumbItem.d.ts +17 -8
- package/dist/components/button/CButton.d.ts +73 -20
- package/dist/components/button-group/CButtonGroup.d.ts +20 -8
- package/dist/components/button-group/CButtonToolbar.d.ts +1 -1
- package/dist/components/callout/CCallout.d.ts +11 -5
- package/dist/components/card/CCard.d.ts +20 -7
- package/dist/components/card/CCardBody.d.ts +1 -1
- package/dist/components/card/CCardFooter.d.ts +1 -1
- package/dist/components/card/CCardGroup.d.ts +1 -1
- package/dist/components/card/CCardHeader.d.ts +10 -5
- package/dist/components/card/CCardImage.d.ts +21 -8
- package/dist/components/card/CCardImageOverlay.d.ts +1 -1
- package/dist/components/card/CCardLink.d.ts +10 -5
- package/dist/components/card/CCardSubtitle.d.ts +10 -5
- package/dist/components/card/CCardText.d.ts +10 -5
- package/dist/components/card/CCardTitle.d.ts +10 -5
- package/dist/components/carousel/CCarousel.d.ts +58 -19
- package/dist/components/carousel/CCarouselCaption.d.ts +1 -1
- package/dist/components/carousel/CCarouselItem.d.ts +25 -9
- package/dist/components/close-button/CCloseButton.d.ts +16 -7
- package/dist/components/collapse/CCollapse.d.ts +24 -5
- package/dist/components/dropdown/CDropdown.d.ts +82 -22
- package/dist/components/dropdown/CDropdownDivider.d.ts +1 -1
- package/dist/components/dropdown/CDropdownHeader.d.ts +10 -5
- package/dist/components/dropdown/CDropdownItem.d.ts +32 -12
- package/dist/components/dropdown/CDropdownMenu.d.ts +12 -5
- package/dist/components/dropdown/CDropdownToggle.d.ts +78 -22
- package/dist/components/element-cover/CElementCover.d.ts +22 -7
- package/dist/components/element-cover/index.d.ts +6 -0
- package/dist/components/footer/CFooter.d.ts +13 -5
- package/dist/components/form/CForm.d.ts +9 -5
- package/dist/components/form/CFormCheck.d.ts +66 -23
- package/dist/components/form/CFormControl.d.ts +61 -20
- package/dist/components/form/CFormFeedback.d.ts +22 -11
- package/dist/components/form/CFormFloating.d.ts +1 -1
- package/dist/components/form/CFormInput.d.ts +66 -20
- package/dist/components/form/CFormLabel.d.ts +10 -5
- package/dist/components/form/CFormRange.d.ts +59 -18
- package/dist/components/form/CFormSelect.d.ts +66 -18
- package/dist/components/form/CFormSwitch.d.ts +61 -18
- package/dist/components/form/CFormText.d.ts +10 -5
- package/dist/components/form/CFormTextarea.d.ts +45 -16
- package/dist/components/form/CInputGroup.d.ts +13 -5
- package/dist/components/form/CInputGroupText.d.ts +10 -5
- package/dist/components/grid/CCol.d.ts +62 -15
- package/dist/components/grid/CContainer.d.ts +44 -15
- package/dist/components/grid/CRow.d.ts +57 -15
- package/dist/components/header/CHeader.d.ts +24 -7
- package/dist/components/header/CHeaderBrand.d.ts +10 -5
- package/dist/components/header/CHeaderDivider.d.ts +1 -1
- package/dist/components/header/CHeaderNav.d.ts +10 -5
- package/dist/components/header/CHeaderText.d.ts +1 -1
- package/dist/components/header/CHeaderToggler.d.ts +1 -1
- package/dist/components/image/CImage.d.ts +34 -12
- package/dist/components/index.d.ts +2 -0
- package/dist/components/link/CLink.d.ts +32 -12
- package/dist/components/list-group/CListGroup.d.ts +28 -10
- package/dist/components/list-group/CListGroupItem.d.ts +33 -12
- package/dist/components/modal/CModal.d.ts +97 -23
- package/dist/components/modal/CModalBody.d.ts +1 -1
- package/dist/components/modal/CModalFooter.d.ts +1 -1
- package/dist/components/modal/CModalHeader.d.ts +10 -5
- package/dist/components/modal/CModalTitle.d.ts +10 -5
- package/dist/components/multi-select/CMultiSelect.d.ts +131 -30
- package/dist/components/multi-select/CMultiSelectNativeSelect.d.ts +26 -11
- package/dist/components/multi-select/CMultiSelectOptions.d.ts +40 -11
- package/dist/components/multi-select/CMultiSelectSelection.d.ts +47 -13
- package/dist/components/nav/CNav.d.ts +32 -10
- package/dist/components/nav/CNavGroup.d.ts +10 -7
- package/dist/components/nav/CNavGroupItems.d.ts +1 -1
- package/dist/components/nav/CNavLink.d.ts +32 -12
- package/dist/components/nav/CNavTitle.d.ts +1 -1
- package/dist/components/navbar/CNavbar.d.ts +63 -16
- package/dist/components/navbar/CNavbarBrand.d.ts +19 -8
- package/dist/components/navbar/CNavbarNav.d.ts +10 -5
- package/dist/components/navbar/CNavbarText.d.ts +1 -1
- package/dist/components/navbar/CNavbarToggler.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvas.d.ts +44 -14
- package/dist/components/offcanvas/COffcanvasBody.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvasHeader.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvasTitle.d.ts +10 -5
- package/dist/components/pagination/CPagination.d.ts +24 -7
- package/dist/components/pagination/CPaginationItem.d.ts +32 -12
- package/dist/components/pagination/CSmartPagination.d.ts +120 -28
- package/dist/components/placeholder/CPlaceholder.d.ts +189 -0
- package/dist/components/placeholder/index.d.ts +6 -0
- package/dist/components/popover/CPopover.d.ts +51 -17
- package/dist/components/progress/CProgressBar.d.ts +37 -12
- package/dist/components/sidebar/CSidebar.d.ts +59 -20
- package/dist/components/sidebar/CSidebarBrand.d.ts +1 -1
- package/dist/components/sidebar/CSidebarFooter.d.ts +1 -1
- package/dist/components/sidebar/CSidebarHeader.d.ts +1 -1
- package/dist/components/sidebar/CSidebarNav.d.ts +1 -1
- package/dist/components/sidebar/CSidebarToggler.d.ts +1 -1
- package/dist/components/smart-table/CSmartTable.d.ts +281 -69
- package/dist/components/smart-table/CSmartTableBody.d.ts +37 -20
- package/dist/components/smart-table/CSmartTableCleaner.d.ts +7 -5
- package/dist/components/smart-table/CSmartTableFilter.d.ts +17 -9
- package/dist/components/smart-table/CSmartTableHead.d.ts +42 -23
- package/dist/components/smart-table/CSmartTableItemsPerPageSelector.d.ts +17 -10
- package/dist/components/spinner/CSpinner.d.ts +51 -14
- package/dist/components/table/CTable.d.ts +89 -25
- package/dist/components/table/CTableBody.d.ts +11 -5
- package/dist/components/table/CTableCaption.d.ts +2 -4
- package/dist/components/table/CTableDataCell.d.ts +29 -10
- package/dist/components/table/CTableFoot.d.ts +11 -5
- package/dist/components/table/CTableHead.d.ts +11 -5
- package/dist/components/table/CTableHeaderCell.d.ts +11 -5
- package/dist/components/table/CTableRow.d.ts +29 -10
- package/dist/components/tabs/CTabContent.d.ts +1 -1
- package/dist/components/tabs/CTabPane.d.ts +10 -5
- package/dist/components/toast/CToast.d.ts +59 -18
- package/dist/components/toast/CToastBody.d.ts +1 -1
- package/dist/components/toast/CToastHeader.d.ts +9 -5
- package/dist/components/toast/CToaster.d.ts +13 -5
- package/dist/components/tooltip/CTooltip.d.ts +42 -14
- package/dist/components/widgets/CWidgetStatsA.d.ts +23 -10
- package/dist/components/widgets/CWidgetStatsB.d.ts +46 -18
- package/dist/components/widgets/CWidgetStatsC.d.ts +37 -15
- package/dist/components/widgets/CWidgetStatsD.d.ts +19 -8
- package/dist/components/widgets/CWidgetStatsE.d.ts +18 -8
- package/dist/components/widgets/CWidgetStatsF.d.ts +43 -15
- package/dist/directives/index.d.ts +3 -2
- package/dist/directives/v-c-placeholder.d.ts +6 -0
- package/dist/directives/v-c-visible.d.ts +6 -0
- package/dist/index.es.js +760 -455
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +763 -453
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/components/accordion/__tests__/__snapshots__/CAccordionBody.spec.ts.snap +1 -1
- package/src/components/button/CButton.ts +1 -0
- package/src/components/collapse/CCollapse.ts +49 -21
- package/src/components/collapse/__test__/__snapshots__/CCollapse.spec.ts.snap +1 -1
- package/src/components/element-cover/index.ts +10 -0
- package/src/components/form/CFormInput.ts +6 -6
- package/src/components/form/CFormSelect.ts +21 -6
- package/src/components/form/__tests__/__snapshots__/CFormCheck.spec.ts.snap +8 -2
- package/src/components/form/__tests__/__snapshots__/CFormSelect.spec.ts.snap +1 -1
- package/src/components/grid/CCol.ts +8 -8
- package/src/components/grid/CContainer.ts +3 -3
- package/src/components/grid/CRow.ts +6 -6
- package/src/components/index.ts +2 -0
- package/src/components/modal/CModal.ts +68 -40
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.ts.snap +1 -2
- package/src/components/offcanvas/COffcanvas.ts +30 -20
- package/src/components/offcanvas/__tests__/COffcanvas.spec.ts +1 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.ts.snap +2 -2
- package/src/components/placeholder/CPlaceholder.ts +139 -0
- package/src/components/placeholder/__tests__/CPlaceholder.spec.ts +44 -0
- package/src/components/placeholder/__tests__/__snapshots__/CPlaceholder.spec.ts.snap +15 -0
- package/src/components/placeholder/index.ts +10 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebar.spec.ts.snap +2 -8
- package/src/components/smart-table/CSmartTable.ts +38 -36
- package/src/components/smart-table/CSmartTableHead.ts +54 -44
- package/src/directives/index.ts +3 -2
- package/src/directives/v-c-placeholder.ts +32 -0
- package/src/directives/v-c-visible.ts +33 -0
- package/src/index.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -36,9 +36,45 @@ const CAccordion = vue.defineComponent({
|
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
+
const vVisible = {
|
|
40
|
+
beforeMount(el, { value }, { transition }) {
|
|
41
|
+
el._vod = el.style.display === 'none' ? '' : el.style.display;
|
|
42
|
+
if (transition && value) {
|
|
43
|
+
transition.beforeEnter(el);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
mounted(el, { value }, { transition }) {
|
|
47
|
+
if (transition && value) {
|
|
48
|
+
transition.enter(el);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
52
|
+
if (!value === !oldValue)
|
|
53
|
+
return;
|
|
54
|
+
if (transition) {
|
|
55
|
+
if (value) {
|
|
56
|
+
transition.beforeEnter(el);
|
|
57
|
+
transition.enter(el);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
transition.leave(el, () => {
|
|
61
|
+
// setDisplay(el, false)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
39
68
|
const CCollapse = vue.defineComponent({
|
|
40
69
|
name: 'CCollapse',
|
|
41
70
|
props: {
|
|
71
|
+
/**
|
|
72
|
+
* Set horizontal collapsing to transition the width instead of height.
|
|
73
|
+
*/
|
|
74
|
+
horizontal: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
required: false,
|
|
77
|
+
},
|
|
42
78
|
/**
|
|
43
79
|
* Toggle the visibility of component.
|
|
44
80
|
*/
|
|
@@ -58,42 +94,58 @@ const CCollapse = vue.defineComponent({
|
|
|
58
94
|
'show',
|
|
59
95
|
],
|
|
60
96
|
setup(props, { slots, emit }) {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
97
|
+
const collapsing = vue.ref(false);
|
|
98
|
+
const show = vue.ref(props.visible);
|
|
99
|
+
const handleBeforeEnter = () => {
|
|
100
|
+
collapsing.value = true;
|
|
64
101
|
};
|
|
65
102
|
const handleEnter = (el, done) => {
|
|
66
103
|
emit('show');
|
|
67
104
|
el.addEventListener('transitionend', () => {
|
|
68
|
-
el.classList.add('collapse', 'show');
|
|
69
105
|
done();
|
|
70
106
|
});
|
|
71
|
-
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
if (props.horizontal) {
|
|
109
|
+
el.style.width = `${el.scrollWidth}px`;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
113
|
+
}, 1);
|
|
72
114
|
};
|
|
73
115
|
const handleAfterEnter = (el) => {
|
|
74
|
-
|
|
75
|
-
|
|
116
|
+
show.value = true;
|
|
117
|
+
collapsing.value = false;
|
|
118
|
+
props.horizontal ? el.style.removeProperty('width') : el.style.removeProperty('height');
|
|
76
119
|
};
|
|
77
120
|
const handleBeforeLeave = (el) => {
|
|
78
|
-
|
|
121
|
+
collapsing.value = true;
|
|
122
|
+
show.value = false;
|
|
123
|
+
if (props.horizontal) {
|
|
124
|
+
el.style.width = `${el.scrollWidth}px`;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
79
127
|
el.style.height = `${el.scrollHeight}px`;
|
|
80
128
|
};
|
|
81
129
|
const handleLeave = (el, done) => {
|
|
82
130
|
emit('hide');
|
|
83
|
-
el.classList.remove('collapse', 'show');
|
|
84
|
-
el.classList.add('collapsing');
|
|
85
131
|
el.addEventListener('transitionend', () => {
|
|
86
132
|
done();
|
|
87
133
|
});
|
|
88
|
-
|
|
134
|
+
setTimeout(() => {
|
|
135
|
+
if (props.horizontal) {
|
|
136
|
+
el.style.width = '0px';
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
el.style.height = '0px';
|
|
140
|
+
}, 1);
|
|
89
141
|
};
|
|
90
142
|
const handleAfterLeave = (el) => {
|
|
91
|
-
|
|
92
|
-
el.
|
|
143
|
+
collapsing.value = false;
|
|
144
|
+
props.horizontal ? el.style.removeProperty('width') : el.style.removeProperty('height');
|
|
93
145
|
};
|
|
94
146
|
return () => vue.h(vue.Transition, {
|
|
95
|
-
|
|
96
|
-
onBeforeEnter: (
|
|
147
|
+
css: false,
|
|
148
|
+
onBeforeEnter: () => handleBeforeEnter(),
|
|
97
149
|
onEnter: (el, done) => handleEnter(el, done),
|
|
98
150
|
onAfterEnter: (el) => handleAfterEnter(el),
|
|
99
151
|
onBeforeLeave: (el) => handleBeforeLeave(el),
|
|
@@ -101,12 +153,10 @@ const CCollapse = vue.defineComponent({
|
|
|
101
153
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
102
154
|
}, () => vue.withDirectives(vue.h('div', {
|
|
103
155
|
class: [
|
|
104
|
-
'collapse',
|
|
105
|
-
{
|
|
106
|
-
show: props.visible,
|
|
107
|
-
},
|
|
156
|
+
collapsing.value ? 'collapsing' : 'collapse',
|
|
157
|
+
{ 'collapse-horizontal': props.horizontal, show: show.value },
|
|
108
158
|
],
|
|
109
|
-
}, slots.default && slots.default()), [[
|
|
159
|
+
}, slots.default && slots.default()), [[vVisible, props.visible]]));
|
|
110
160
|
},
|
|
111
161
|
});
|
|
112
162
|
|
|
@@ -800,6 +850,7 @@ const CButton = vue.defineComponent({
|
|
|
800
850
|
],
|
|
801
851
|
disabled: props.disabled && props.component !== 'a',
|
|
802
852
|
...(props.component === 'a' && props.disabled && { 'aria-disabled': true, tabIndex: -1 }),
|
|
853
|
+
...(props.component === 'a' && props.href && { href: props.href }),
|
|
803
854
|
}, slots.default && slots.default());
|
|
804
855
|
},
|
|
805
856
|
});
|
|
@@ -1614,29 +1665,32 @@ function getBasePlacement(placement) {
|
|
|
1614
1665
|
return placement.split('-')[0];
|
|
1615
1666
|
}
|
|
1616
1667
|
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1668
|
+
var max = Math.max;
|
|
1669
|
+
var min = Math.min;
|
|
1670
|
+
var round = Math.round;
|
|
1671
|
+
|
|
1672
|
+
function getBoundingClientRect(element, includeScale) {
|
|
1673
|
+
if (includeScale === void 0) {
|
|
1674
|
+
includeScale = false;
|
|
1675
|
+
}
|
|
1620
1676
|
|
|
1621
1677
|
var rect = element.getBoundingClientRect();
|
|
1622
1678
|
var scaleX = 1;
|
|
1623
|
-
var scaleY = 1;
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
// }
|
|
1639
|
-
// }
|
|
1679
|
+
var scaleY = 1;
|
|
1680
|
+
|
|
1681
|
+
if (isHTMLElement(element) && includeScale) {
|
|
1682
|
+
var offsetHeight = element.offsetHeight;
|
|
1683
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1684
|
+
// Fallback to 1 in case both values are `0`
|
|
1685
|
+
|
|
1686
|
+
if (offsetWidth > 0) {
|
|
1687
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
if (offsetHeight > 0) {
|
|
1691
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1640
1694
|
|
|
1641
1695
|
return {
|
|
1642
1696
|
width: rect.width / scaleX,
|
|
@@ -1791,13 +1845,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
1791
1845
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1792
1846
|
}
|
|
1793
1847
|
|
|
1794
|
-
var max = Math.max;
|
|
1795
|
-
var min = Math.min;
|
|
1796
|
-
var round = Math.round;
|
|
1797
|
-
|
|
1798
1848
|
function within(min$1, value, max$1) {
|
|
1799
1849
|
return max(min$1, min(value, max$1));
|
|
1800
1850
|
}
|
|
1851
|
+
function withinMaxClamp(min, value, max) {
|
|
1852
|
+
var v = within(min, value, max);
|
|
1853
|
+
return v > max ? max : v;
|
|
1854
|
+
}
|
|
1801
1855
|
|
|
1802
1856
|
function getFreshSideObject() {
|
|
1803
1857
|
return {
|
|
@@ -1929,8 +1983,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
1929
1983
|
var win = window;
|
|
1930
1984
|
var dpr = win.devicePixelRatio || 1;
|
|
1931
1985
|
return {
|
|
1932
|
-
x: round(
|
|
1933
|
-
y: round(
|
|
1986
|
+
x: round(x * dpr) / dpr || 0,
|
|
1987
|
+
y: round(y * dpr) / dpr || 0
|
|
1934
1988
|
};
|
|
1935
1989
|
}
|
|
1936
1990
|
|
|
@@ -1945,14 +1999,23 @@ function mapToStyles(_ref2) {
|
|
|
1945
1999
|
position = _ref2.position,
|
|
1946
2000
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
1947
2001
|
adaptive = _ref2.adaptive,
|
|
1948
|
-
roundOffsets = _ref2.roundOffsets
|
|
1949
|
-
|
|
1950
|
-
var
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2002
|
+
roundOffsets = _ref2.roundOffsets,
|
|
2003
|
+
isFixed = _ref2.isFixed;
|
|
2004
|
+
var _offsets$x = offsets.x,
|
|
2005
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
2006
|
+
_offsets$y = offsets.y,
|
|
2007
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
2008
|
+
|
|
2009
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
2010
|
+
x: x,
|
|
2011
|
+
y: y
|
|
2012
|
+
}) : {
|
|
2013
|
+
x: x,
|
|
2014
|
+
y: y
|
|
2015
|
+
};
|
|
1955
2016
|
|
|
2017
|
+
x = _ref3.x;
|
|
2018
|
+
y = _ref3.y;
|
|
1956
2019
|
var hasX = offsets.hasOwnProperty('x');
|
|
1957
2020
|
var hasY = offsets.hasOwnProperty('y');
|
|
1958
2021
|
var sideX = left;
|
|
@@ -1977,16 +2040,18 @@ function mapToStyles(_ref2) {
|
|
|
1977
2040
|
offsetParent = offsetParent;
|
|
1978
2041
|
|
|
1979
2042
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
1980
|
-
sideY = bottom;
|
|
1981
|
-
|
|
1982
|
-
|
|
2043
|
+
sideY = bottom;
|
|
2044
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
2045
|
+
offsetParent[heightProp];
|
|
2046
|
+
y -= offsetY - popperRect.height;
|
|
1983
2047
|
y *= gpuAcceleration ? 1 : -1;
|
|
1984
2048
|
}
|
|
1985
2049
|
|
|
1986
2050
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
1987
|
-
sideX = right;
|
|
1988
|
-
|
|
1989
|
-
|
|
2051
|
+
sideX = right;
|
|
2052
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
2053
|
+
offsetParent[widthProp];
|
|
2054
|
+
x -= offsetX - popperRect.width;
|
|
1990
2055
|
x *= gpuAcceleration ? 1 : -1;
|
|
1991
2056
|
}
|
|
1992
2057
|
}
|
|
@@ -1995,6 +2060,17 @@ function mapToStyles(_ref2) {
|
|
|
1995
2060
|
position: position
|
|
1996
2061
|
}, adaptive && unsetSides);
|
|
1997
2062
|
|
|
2063
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
2064
|
+
x: x,
|
|
2065
|
+
y: y
|
|
2066
|
+
}) : {
|
|
2067
|
+
x: x,
|
|
2068
|
+
y: y
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
x = _ref4.x;
|
|
2072
|
+
y = _ref4.y;
|
|
2073
|
+
|
|
1998
2074
|
if (gpuAcceleration) {
|
|
1999
2075
|
var _Object$assign;
|
|
2000
2076
|
|
|
@@ -2004,9 +2080,9 @@ function mapToStyles(_ref2) {
|
|
|
2004
2080
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
2005
2081
|
}
|
|
2006
2082
|
|
|
2007
|
-
function computeStyles(
|
|
2008
|
-
var state =
|
|
2009
|
-
options =
|
|
2083
|
+
function computeStyles(_ref5) {
|
|
2084
|
+
var state = _ref5.state,
|
|
2085
|
+
options = _ref5.options;
|
|
2010
2086
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
2011
2087
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
2012
2088
|
_options$adaptive = options.adaptive,
|
|
@@ -2029,7 +2105,8 @@ function computeStyles(_ref4) {
|
|
|
2029
2105
|
variation: getVariation(state.placement),
|
|
2030
2106
|
popper: state.elements.popper,
|
|
2031
2107
|
popperRect: state.rects.popper,
|
|
2032
|
-
gpuAcceleration: gpuAcceleration
|
|
2108
|
+
gpuAcceleration: gpuAcceleration,
|
|
2109
|
+
isFixed: state.options.strategy === 'fixed'
|
|
2033
2110
|
};
|
|
2034
2111
|
|
|
2035
2112
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -2287,7 +2364,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
2287
2364
|
}
|
|
2288
2365
|
|
|
2289
2366
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
2290
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
2367
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2291
2368
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2292
2369
|
// clipping (or hiding) overflowing elements with a position different from
|
|
2293
2370
|
// `initial`
|
|
@@ -2804,6 +2881,14 @@ function preventOverflow(_ref) {
|
|
|
2804
2881
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
2805
2882
|
placement: state.placement
|
|
2806
2883
|
})) : tetherOffset;
|
|
2884
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
2885
|
+
mainAxis: tetherOffsetValue,
|
|
2886
|
+
altAxis: tetherOffsetValue
|
|
2887
|
+
} : Object.assign({
|
|
2888
|
+
mainAxis: 0,
|
|
2889
|
+
altAxis: 0
|
|
2890
|
+
}, tetherOffsetValue);
|
|
2891
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
2807
2892
|
var data = {
|
|
2808
2893
|
x: 0,
|
|
2809
2894
|
y: 0
|
|
@@ -2813,13 +2898,15 @@ function preventOverflow(_ref) {
|
|
|
2813
2898
|
return;
|
|
2814
2899
|
}
|
|
2815
2900
|
|
|
2816
|
-
if (checkMainAxis
|
|
2901
|
+
if (checkMainAxis) {
|
|
2902
|
+
var _offsetModifierState$;
|
|
2903
|
+
|
|
2817
2904
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
2818
2905
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
2819
2906
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2820
2907
|
var offset = popperOffsets[mainAxis];
|
|
2821
|
-
var min$1 =
|
|
2822
|
-
var max$1 =
|
|
2908
|
+
var min$1 = offset + overflow[mainSide];
|
|
2909
|
+
var max$1 = offset - overflow[altSide];
|
|
2823
2910
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
2824
2911
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
2825
2912
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -2839,36 +2926,45 @@ function preventOverflow(_ref) {
|
|
|
2839
2926
|
// width or height)
|
|
2840
2927
|
|
|
2841
2928
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
2842
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
2843
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
2929
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
2930
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
2844
2931
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
2845
2932
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
2846
|
-
var offsetModifierValue =
|
|
2847
|
-
var tetherMin =
|
|
2848
|
-
var tetherMax =
|
|
2933
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
2934
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
2935
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
2936
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
2937
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
2938
|
+
data[mainAxis] = preventedOffset - offset;
|
|
2939
|
+
}
|
|
2849
2940
|
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
2853
|
-
data[mainAxis] = preventedOffset - offset;
|
|
2854
|
-
}
|
|
2941
|
+
if (checkAltAxis) {
|
|
2942
|
+
var _offsetModifierState$2;
|
|
2855
2943
|
|
|
2856
|
-
|
|
2857
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2944
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2858
2945
|
|
|
2859
|
-
|
|
2946
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
2860
2947
|
|
|
2861
|
-
|
|
2948
|
+
var _offset = popperOffsets[altAxis];
|
|
2862
2949
|
|
|
2863
|
-
|
|
2950
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
2864
2951
|
|
|
2865
|
-
|
|
2952
|
+
var _min = _offset + overflow[_mainSide];
|
|
2866
2953
|
|
|
2867
|
-
|
|
2954
|
+
var _max = _offset - overflow[_altSide];
|
|
2868
2955
|
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2956
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
2957
|
+
|
|
2958
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
2959
|
+
|
|
2960
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
2961
|
+
|
|
2962
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
2963
|
+
|
|
2964
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
2965
|
+
|
|
2966
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
2967
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
2872
2968
|
}
|
|
2873
2969
|
|
|
2874
2970
|
state.modifiersData[name] = data;
|
|
@@ -2900,8 +2996,8 @@ function getNodeScroll(node) {
|
|
|
2900
2996
|
|
|
2901
2997
|
function isElementScaled(element) {
|
|
2902
2998
|
var rect = element.getBoundingClientRect();
|
|
2903
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
2904
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
2999
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
3000
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
2905
3001
|
return scaleX !== 1 || scaleY !== 1;
|
|
2906
3002
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
2907
3003
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -2913,9 +3009,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2913
3009
|
}
|
|
2914
3010
|
|
|
2915
3011
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2916
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
3012
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2917
3013
|
var documentElement = getDocumentElement(offsetParent);
|
|
2918
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
3014
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
2919
3015
|
var scroll = {
|
|
2920
3016
|
scrollLeft: 0,
|
|
2921
3017
|
scrollTop: 0
|
|
@@ -2932,7 +3028,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2932
3028
|
}
|
|
2933
3029
|
|
|
2934
3030
|
if (isHTMLElement(offsetParent)) {
|
|
2935
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
3031
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
2936
3032
|
offsets.x += offsetParent.clientLeft;
|
|
2937
3033
|
offsets.y += offsetParent.clientTop;
|
|
2938
3034
|
} else if (documentElement) {
|
|
@@ -3852,6 +3948,176 @@ const CDropdownPlugin = {
|
|
|
3852
3948
|
},
|
|
3853
3949
|
};
|
|
3854
3950
|
|
|
3951
|
+
const CSpinner = vue.defineComponent({
|
|
3952
|
+
name: 'CSpinner',
|
|
3953
|
+
props: {
|
|
3954
|
+
/**
|
|
3955
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
3956
|
+
*
|
|
3957
|
+
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
|
|
3958
|
+
*/
|
|
3959
|
+
color: {
|
|
3960
|
+
type: String,
|
|
3961
|
+
default: undefined,
|
|
3962
|
+
required: false,
|
|
3963
|
+
validator: (value) => {
|
|
3964
|
+
return [
|
|
3965
|
+
'primary',
|
|
3966
|
+
'secondary',
|
|
3967
|
+
'success',
|
|
3968
|
+
'danger',
|
|
3969
|
+
'warning',
|
|
3970
|
+
'info',
|
|
3971
|
+
'dark',
|
|
3972
|
+
'light',
|
|
3973
|
+
].includes(value);
|
|
3974
|
+
},
|
|
3975
|
+
},
|
|
3976
|
+
/**
|
|
3977
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
3978
|
+
*/
|
|
3979
|
+
component: {
|
|
3980
|
+
type: String,
|
|
3981
|
+
default: 'div',
|
|
3982
|
+
required: false,
|
|
3983
|
+
},
|
|
3984
|
+
/**
|
|
3985
|
+
* Size the component small.
|
|
3986
|
+
*
|
|
3987
|
+
* @values 'sm'
|
|
3988
|
+
*/
|
|
3989
|
+
size: {
|
|
3990
|
+
type: String,
|
|
3991
|
+
default: undefined,
|
|
3992
|
+
required: false,
|
|
3993
|
+
validator: (value) => {
|
|
3994
|
+
return value === 'sm';
|
|
3995
|
+
},
|
|
3996
|
+
},
|
|
3997
|
+
/**
|
|
3998
|
+
* Set the button variant to an outlined button or a ghost button.
|
|
3999
|
+
*
|
|
4000
|
+
* @values 'border', 'grow'
|
|
4001
|
+
*/
|
|
4002
|
+
variant: {
|
|
4003
|
+
type: String,
|
|
4004
|
+
default: 'border',
|
|
4005
|
+
required: false,
|
|
4006
|
+
validator: (value) => {
|
|
4007
|
+
return ['border', 'grow'].includes(value);
|
|
4008
|
+
},
|
|
4009
|
+
},
|
|
4010
|
+
/**
|
|
4011
|
+
* Set visually hidden label for accessibility purposes.
|
|
4012
|
+
*/
|
|
4013
|
+
visuallyHiddenLabel: {
|
|
4014
|
+
type: String,
|
|
4015
|
+
default: 'Loading...',
|
|
4016
|
+
required: false,
|
|
4017
|
+
},
|
|
4018
|
+
},
|
|
4019
|
+
setup(props) {
|
|
4020
|
+
return () => vue.h(props.component, {
|
|
4021
|
+
class: [
|
|
4022
|
+
`spinner-${props.variant}`,
|
|
4023
|
+
`text-${props.color}`,
|
|
4024
|
+
props.size && `spinner-${props.variant}-${props.size}`,
|
|
4025
|
+
],
|
|
4026
|
+
role: 'status',
|
|
4027
|
+
}, vue.h('span', { class: ['visually-hidden'] }, props.visuallyHiddenLabel));
|
|
4028
|
+
},
|
|
4029
|
+
});
|
|
4030
|
+
|
|
4031
|
+
const CSpinnerPlugin = {
|
|
4032
|
+
install: (app) => {
|
|
4033
|
+
app.component(CSpinner.name, CSpinner);
|
|
4034
|
+
},
|
|
4035
|
+
};
|
|
4036
|
+
|
|
4037
|
+
const CElementCover = vue.defineComponent({
|
|
4038
|
+
name: 'CElementCover',
|
|
4039
|
+
props: {
|
|
4040
|
+
/**
|
|
4041
|
+
* Array of custom boundaries. Use to create custom cover area (instead of parent element area). Area is defined by four sides: 'top', 'bottom', 'right', 'left'. If side is not defined by any custom boundary it is equal to parent element boundary. Each custom boundary is object with keys:
|
|
4042
|
+
* - sides (array) - select boundaries of element to define boundaries. Sides names: 'top', 'bottom', 'right', 'left'.
|
|
4043
|
+
* - query (string) - query used to get element which define boundaries. Search will be done only inside parent element, by parent.querySelector(query) function. [docs]
|
|
4044
|
+
*
|
|
4045
|
+
* @type {sides: string[], query: string}[]
|
|
4046
|
+
*/
|
|
4047
|
+
boundaries: {
|
|
4048
|
+
// TODO: check if this is correct, TJ
|
|
4049
|
+
type: Array,
|
|
4050
|
+
require: true,
|
|
4051
|
+
},
|
|
4052
|
+
/**
|
|
4053
|
+
* Opacity of the cover. [docs]
|
|
4054
|
+
*
|
|
4055
|
+
* @type number
|
|
4056
|
+
*/
|
|
4057
|
+
opacity: {
|
|
4058
|
+
type: Number,
|
|
4059
|
+
require: false,
|
|
4060
|
+
},
|
|
4061
|
+
},
|
|
4062
|
+
setup(props) {
|
|
4063
|
+
let containerCoords = {};
|
|
4064
|
+
const elementRef = vue.ref();
|
|
4065
|
+
const getCustomBoundaries = () => {
|
|
4066
|
+
if (!props.boundaries || elementRef === null) {
|
|
4067
|
+
return {};
|
|
4068
|
+
}
|
|
4069
|
+
const parent = elementRef.value.parentElement;
|
|
4070
|
+
if (!parent) {
|
|
4071
|
+
return {};
|
|
4072
|
+
}
|
|
4073
|
+
const parentCoords = parent.getBoundingClientRect();
|
|
4074
|
+
const customBoundaries = {};
|
|
4075
|
+
props.boundaries.forEach((value) => {
|
|
4076
|
+
const element = parent.querySelector(value.query);
|
|
4077
|
+
if (!element || !value.sides) {
|
|
4078
|
+
return;
|
|
4079
|
+
}
|
|
4080
|
+
const coords = element.getBoundingClientRect();
|
|
4081
|
+
value.sides.forEach((side) => {
|
|
4082
|
+
const sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
4083
|
+
customBoundaries[side] = `${sideMargin}px`;
|
|
4084
|
+
});
|
|
4085
|
+
});
|
|
4086
|
+
return customBoundaries;
|
|
4087
|
+
};
|
|
4088
|
+
vue.onMounted(function () {
|
|
4089
|
+
vue.nextTick(function () {
|
|
4090
|
+
containerCoords = getCustomBoundaries();
|
|
4091
|
+
});
|
|
4092
|
+
});
|
|
4093
|
+
return () => vue.h('div', {
|
|
4094
|
+
style: {
|
|
4095
|
+
...containerCoords,
|
|
4096
|
+
position: 'absolute',
|
|
4097
|
+
'background-color': `rgb(255,255,255,${props.opacity})`,
|
|
4098
|
+
},
|
|
4099
|
+
ref: elementRef,
|
|
4100
|
+
}, vue.h('div', // TODO: use slot to override this
|
|
4101
|
+
{
|
|
4102
|
+
style: {
|
|
4103
|
+
position: 'absolute',
|
|
4104
|
+
top: '50%',
|
|
4105
|
+
left: '50%',
|
|
4106
|
+
transform: 'translateX(-50%) translateY(-50%)',
|
|
4107
|
+
},
|
|
4108
|
+
}, vue.h(CSpinner, {
|
|
4109
|
+
variant: 'grow',
|
|
4110
|
+
color: 'primary',
|
|
4111
|
+
})));
|
|
4112
|
+
},
|
|
4113
|
+
});
|
|
4114
|
+
|
|
4115
|
+
const CElementCoverPlugin = {
|
|
4116
|
+
install: (app) => {
|
|
4117
|
+
app.component(CElementCover.name, CElementCover);
|
|
4118
|
+
},
|
|
4119
|
+
};
|
|
4120
|
+
|
|
3855
4121
|
const CFooter = vue.defineComponent({
|
|
3856
4122
|
name: 'CFooter',
|
|
3857
4123
|
props: {
|
|
@@ -4254,11 +4520,11 @@ const CFormInput = vue.defineComponent({
|
|
|
4254
4520
|
'update:modelValue',
|
|
4255
4521
|
],
|
|
4256
4522
|
setup(props, { emit, slots }) {
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4523
|
+
const handleChange = (event) => {
|
|
4524
|
+
const target = event.target;
|
|
4525
|
+
emit('change', event);
|
|
4526
|
+
emit('update:modelValue', target.value);
|
|
4527
|
+
};
|
|
4262
4528
|
const handleInput = (event) => {
|
|
4263
4529
|
const target = event.target;
|
|
4264
4530
|
emit('input', event);
|
|
@@ -4275,7 +4541,7 @@ const CFormInput = vue.defineComponent({
|
|
|
4275
4541
|
},
|
|
4276
4542
|
],
|
|
4277
4543
|
disabled: props.disabled,
|
|
4278
|
-
|
|
4544
|
+
onChange: (event) => handleChange(event),
|
|
4279
4545
|
onInput: (event) => handleInput(event),
|
|
4280
4546
|
readonly: props.readonly,
|
|
4281
4547
|
type: props.type,
|
|
@@ -4397,10 +4663,14 @@ const CFormSelect = vue.defineComponent({
|
|
|
4397
4663
|
* The default name for a value passed using v-model.
|
|
4398
4664
|
*/
|
|
4399
4665
|
modelValue: {
|
|
4400
|
-
type: String,
|
|
4666
|
+
type: [String, Array],
|
|
4401
4667
|
default: undefined,
|
|
4402
4668
|
require: false,
|
|
4403
4669
|
},
|
|
4670
|
+
multiple: {
|
|
4671
|
+
type: Boolean,
|
|
4672
|
+
required: false,
|
|
4673
|
+
},
|
|
4404
4674
|
/**
|
|
4405
4675
|
* Options list of the select component. Available keys: `label`, `value`, `disabled`.
|
|
4406
4676
|
* Examples:
|
|
@@ -4449,25 +4719,35 @@ const CFormSelect = vue.defineComponent({
|
|
|
4449
4719
|
const selected = Array.from(target.options)
|
|
4450
4720
|
.filter((option) => option.selected)
|
|
4451
4721
|
.map((option) => option.value);
|
|
4452
|
-
const value = target.multiple ? selected : selected[0];
|
|
4453
4722
|
emit('change', event);
|
|
4454
|
-
emit('update:modelValue',
|
|
4723
|
+
emit('update:modelValue', target.multiple ? selected : selected[0]);
|
|
4455
4724
|
};
|
|
4456
4725
|
return () => vue.h('select', {
|
|
4457
4726
|
class: [
|
|
4458
4727
|
'form-select',
|
|
4459
4728
|
{
|
|
4460
4729
|
[`form-select-${props.size}`]: props.size,
|
|
4730
|
+
'is-invalid': props.invalid,
|
|
4731
|
+
'is-valid': props.valid,
|
|
4461
4732
|
},
|
|
4462
4733
|
],
|
|
4734
|
+
multiple: props.multiple,
|
|
4463
4735
|
onChange: (event) => handleChange(event),
|
|
4464
4736
|
size: props.htmlSize,
|
|
4737
|
+
...(props.modelValue && !props.multiple && { value: props.modelValue }),
|
|
4465
4738
|
}, props.options
|
|
4466
4739
|
? props.options.map((option) => {
|
|
4467
4740
|
return vue.h('option', {
|
|
4468
|
-
...(typeof option === 'object' &&
|
|
4469
|
-
option.disabled && { disabled: option.disabled }),
|
|
4470
|
-
|
|
4741
|
+
...(typeof option === 'object' && {
|
|
4742
|
+
...(option.disabled && { disabled: option.disabled }),
|
|
4743
|
+
...(option.selected && { selected: option.selected }),
|
|
4744
|
+
...(option.value && {
|
|
4745
|
+
value: option.value,
|
|
4746
|
+
...(props.modelValue &&
|
|
4747
|
+
props.multiple &&
|
|
4748
|
+
props.modelValue.includes(option.value) && { selected: true }),
|
|
4749
|
+
}),
|
|
4750
|
+
}),
|
|
4471
4751
|
}, typeof option === 'string' ? option : option.label);
|
|
4472
4752
|
})
|
|
4473
4753
|
: slots.default && slots.default());
|
|
@@ -4766,7 +5046,7 @@ const CFormPlugin = {
|
|
|
4766
5046
|
},
|
|
4767
5047
|
};
|
|
4768
5048
|
|
|
4769
|
-
const BREAKPOINTS$
|
|
5049
|
+
const BREAKPOINTS$4 = [
|
|
4770
5050
|
'xxl',
|
|
4771
5051
|
'xl',
|
|
4772
5052
|
'lg',
|
|
@@ -4839,40 +5119,40 @@ const CCol = vue.defineComponent({
|
|
|
4839
5119
|
},
|
|
4840
5120
|
},
|
|
4841
5121
|
setup(props, { slots }) {
|
|
4842
|
-
const
|
|
4843
|
-
BREAKPOINTS$
|
|
5122
|
+
const repsonsiveClassNames = [];
|
|
5123
|
+
BREAKPOINTS$4.forEach((bp) => {
|
|
4844
5124
|
const breakpoint = props[bp];
|
|
4845
5125
|
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
4846
5126
|
if (breakpoint) {
|
|
4847
5127
|
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
4848
|
-
|
|
5128
|
+
repsonsiveClassNames.push(`col${infix}-${breakpoint}`);
|
|
4849
5129
|
}
|
|
4850
5130
|
if (typeof breakpoint === 'boolean') {
|
|
4851
|
-
|
|
5131
|
+
repsonsiveClassNames.push(`col${infix}`);
|
|
4852
5132
|
}
|
|
4853
5133
|
}
|
|
4854
5134
|
if (breakpoint && typeof breakpoint === 'object') {
|
|
4855
5135
|
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
4856
|
-
|
|
5136
|
+
repsonsiveClassNames.push(`col${infix}-${breakpoint.span}`);
|
|
4857
5137
|
}
|
|
4858
5138
|
if (typeof breakpoint.span === 'boolean') {
|
|
4859
|
-
|
|
5139
|
+
repsonsiveClassNames.push(`col${infix}`);
|
|
4860
5140
|
}
|
|
4861
5141
|
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
4862
|
-
|
|
5142
|
+
repsonsiveClassNames.push(`order${infix}-${breakpoint.order}`);
|
|
4863
5143
|
}
|
|
4864
5144
|
if (typeof breakpoint.offset === 'number') {
|
|
4865
|
-
|
|
5145
|
+
repsonsiveClassNames.push(`offset${infix}-${breakpoint.offset}`);
|
|
4866
5146
|
}
|
|
4867
5147
|
}
|
|
4868
5148
|
});
|
|
4869
5149
|
return () => vue.h('div', {
|
|
4870
|
-
class: [
|
|
5150
|
+
class: [repsonsiveClassNames.length ? repsonsiveClassNames : 'col'],
|
|
4871
5151
|
}, slots.default && slots.default());
|
|
4872
5152
|
},
|
|
4873
5153
|
});
|
|
4874
5154
|
|
|
4875
|
-
const BREAKPOINTS$
|
|
5155
|
+
const BREAKPOINTS$3 = [
|
|
4876
5156
|
'xxl',
|
|
4877
5157
|
'xl',
|
|
4878
5158
|
'lg',
|
|
@@ -4927,18 +5207,18 @@ const CContainer = vue.defineComponent({
|
|
|
4927
5207
|
},
|
|
4928
5208
|
},
|
|
4929
5209
|
setup(props, { slots }) {
|
|
4930
|
-
const
|
|
4931
|
-
BREAKPOINTS$
|
|
5210
|
+
const repsonsiveClassNames = [];
|
|
5211
|
+
BREAKPOINTS$3.forEach((bp) => {
|
|
4932
5212
|
const breakpoint = props[bp];
|
|
4933
|
-
breakpoint &&
|
|
5213
|
+
breakpoint && repsonsiveClassNames.push(`container-${bp}`);
|
|
4934
5214
|
});
|
|
4935
5215
|
return () => vue.h('div', {
|
|
4936
|
-
class: [
|
|
5216
|
+
class: [repsonsiveClassNames.length ? repsonsiveClassNames : 'container'],
|
|
4937
5217
|
}, slots.default && slots.default());
|
|
4938
5218
|
},
|
|
4939
5219
|
});
|
|
4940
5220
|
|
|
4941
|
-
const BREAKPOINTS = [
|
|
5221
|
+
const BREAKPOINTS$2 = [
|
|
4942
5222
|
'xxl',
|
|
4943
5223
|
'xl',
|
|
4944
5224
|
'lg',
|
|
@@ -5011,27 +5291,27 @@ const CRow = vue.defineComponent({
|
|
|
5011
5291
|
},
|
|
5012
5292
|
},
|
|
5013
5293
|
setup(props, { slots }) {
|
|
5014
|
-
const
|
|
5015
|
-
BREAKPOINTS.forEach((bp) => {
|
|
5294
|
+
const repsonsiveClassNames = [];
|
|
5295
|
+
BREAKPOINTS$2.forEach((bp) => {
|
|
5016
5296
|
const breakpoint = props[bp];
|
|
5017
5297
|
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
5018
5298
|
if (typeof breakpoint === 'object') {
|
|
5019
5299
|
if (breakpoint.cols) {
|
|
5020
|
-
|
|
5300
|
+
repsonsiveClassNames.push(`row-cols${infix}-${breakpoint.cols}`);
|
|
5021
5301
|
}
|
|
5022
5302
|
if (typeof breakpoint.gutter === 'number') {
|
|
5023
|
-
|
|
5303
|
+
repsonsiveClassNames.push(`g${infix}-${breakpoint.gutter}`);
|
|
5024
5304
|
}
|
|
5025
5305
|
if (typeof breakpoint.gutterX === 'number') {
|
|
5026
|
-
|
|
5306
|
+
repsonsiveClassNames.push(`gx${infix}-${breakpoint.gutterX}`);
|
|
5027
5307
|
}
|
|
5028
5308
|
if (typeof breakpoint.gutterY === 'number') {
|
|
5029
|
-
|
|
5309
|
+
repsonsiveClassNames.push(`gy${infix}-${breakpoint.gutterY}`);
|
|
5030
5310
|
}
|
|
5031
5311
|
}
|
|
5032
5312
|
});
|
|
5033
5313
|
return () => vue.h('div', {
|
|
5034
|
-
class: ['row',
|
|
5314
|
+
class: ['row', repsonsiveClassNames],
|
|
5035
5315
|
}, slots.default && slots.default());
|
|
5036
5316
|
},
|
|
5037
5317
|
});
|
|
@@ -5325,86 +5605,6 @@ const CListGroupPlugin = {
|
|
|
5325
5605
|
},
|
|
5326
5606
|
};
|
|
5327
5607
|
|
|
5328
|
-
const CSpinner = vue.defineComponent({
|
|
5329
|
-
name: 'CSpinner',
|
|
5330
|
-
props: {
|
|
5331
|
-
/**
|
|
5332
|
-
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
5333
|
-
*
|
|
5334
|
-
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
|
|
5335
|
-
*/
|
|
5336
|
-
color: {
|
|
5337
|
-
type: String,
|
|
5338
|
-
default: undefined,
|
|
5339
|
-
required: false,
|
|
5340
|
-
validator: (value) => {
|
|
5341
|
-
return [
|
|
5342
|
-
'primary',
|
|
5343
|
-
'secondary',
|
|
5344
|
-
'success',
|
|
5345
|
-
'danger',
|
|
5346
|
-
'warning',
|
|
5347
|
-
'info',
|
|
5348
|
-
'dark',
|
|
5349
|
-
'light',
|
|
5350
|
-
].includes(value);
|
|
5351
|
-
},
|
|
5352
|
-
},
|
|
5353
|
-
/**
|
|
5354
|
-
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
5355
|
-
*/
|
|
5356
|
-
component: {
|
|
5357
|
-
type: String,
|
|
5358
|
-
default: 'div',
|
|
5359
|
-
required: false,
|
|
5360
|
-
},
|
|
5361
|
-
/**
|
|
5362
|
-
* Size the component small.
|
|
5363
|
-
*
|
|
5364
|
-
* @values 'sm'
|
|
5365
|
-
*/
|
|
5366
|
-
size: {
|
|
5367
|
-
type: String,
|
|
5368
|
-
default: undefined,
|
|
5369
|
-
required: false,
|
|
5370
|
-
validator: (value) => {
|
|
5371
|
-
return value === 'sm';
|
|
5372
|
-
},
|
|
5373
|
-
},
|
|
5374
|
-
/**
|
|
5375
|
-
* Set the button variant to an outlined button or a ghost button.
|
|
5376
|
-
*
|
|
5377
|
-
* @values 'border', 'grow'
|
|
5378
|
-
*/
|
|
5379
|
-
variant: {
|
|
5380
|
-
type: String,
|
|
5381
|
-
default: 'border',
|
|
5382
|
-
required: false,
|
|
5383
|
-
validator: (value) => {
|
|
5384
|
-
return ['border', 'grow'].includes(value);
|
|
5385
|
-
},
|
|
5386
|
-
},
|
|
5387
|
-
/**
|
|
5388
|
-
* Set visually hidden label for accessibility purposes.
|
|
5389
|
-
*/
|
|
5390
|
-
visuallyHiddenLabel: {
|
|
5391
|
-
type: String,
|
|
5392
|
-
default: 'Loading...',
|
|
5393
|
-
required: false,
|
|
5394
|
-
},
|
|
5395
|
-
},
|
|
5396
|
-
setup(props) {
|
|
5397
|
-
return () => vue.h(props.component, {
|
|
5398
|
-
class: [
|
|
5399
|
-
`spinner-${props.variant}`,
|
|
5400
|
-
`text-${props.color}`,
|
|
5401
|
-
props.size && `spinner-${props.variant}-${props.size}`,
|
|
5402
|
-
],
|
|
5403
|
-
role: 'status',
|
|
5404
|
-
}, vue.h('span', { class: ['visually-hidden'] }, props.visuallyHiddenLabel));
|
|
5405
|
-
},
|
|
5406
|
-
});
|
|
5407
|
-
|
|
5408
5608
|
const CLoadingButton = vue.defineComponent({
|
|
5409
5609
|
name: 'CLoadingButton',
|
|
5410
5610
|
props: {
|
|
@@ -5573,6 +5773,14 @@ const CModal = vue.defineComponent({
|
|
|
5573
5773
|
default: true,
|
|
5574
5774
|
required: false,
|
|
5575
5775
|
},
|
|
5776
|
+
/**
|
|
5777
|
+
* By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
|
|
5778
|
+
*/
|
|
5779
|
+
unmountOnClose: {
|
|
5780
|
+
type: Boolean,
|
|
5781
|
+
default: true,
|
|
5782
|
+
required: false,
|
|
5783
|
+
},
|
|
5576
5784
|
/**
|
|
5577
5785
|
* Toggle the visibility of alert component.
|
|
5578
5786
|
*/
|
|
@@ -5611,7 +5819,7 @@ const CModal = vue.defineComponent({
|
|
|
5611
5819
|
emit('show');
|
|
5612
5820
|
};
|
|
5613
5821
|
const handleAfterEnter = () => {
|
|
5614
|
-
window.addEventListener('
|
|
5822
|
+
window.addEventListener('mousedown', handleMouseDown);
|
|
5615
5823
|
window.addEventListener('keyup', handleKeyUp);
|
|
5616
5824
|
};
|
|
5617
5825
|
const handleLeave = (el, done) => {
|
|
@@ -5622,7 +5830,7 @@ const CModal = vue.defineComponent({
|
|
|
5622
5830
|
el.classList.remove('show');
|
|
5623
5831
|
};
|
|
5624
5832
|
const handleAfterLeave = (el) => {
|
|
5625
|
-
window.removeEventListener('
|
|
5833
|
+
window.removeEventListener('mousedown', handleMouseDown);
|
|
5626
5834
|
window.removeEventListener('keyup', handleKeyUp);
|
|
5627
5835
|
el.style.display = 'none';
|
|
5628
5836
|
};
|
|
@@ -5644,7 +5852,10 @@ const CModal = vue.defineComponent({
|
|
|
5644
5852
|
}
|
|
5645
5853
|
}
|
|
5646
5854
|
};
|
|
5647
|
-
const
|
|
5855
|
+
const handleMouseDown = (event) => {
|
|
5856
|
+
window.addEventListener('mouseup', () => handleMouseUp(event), { once: true });
|
|
5857
|
+
};
|
|
5858
|
+
const handleMouseUp = (event) => {
|
|
5648
5859
|
if (modalContentRef.value && !modalContentRef.value.contains(event.target)) {
|
|
5649
5860
|
if (props.backdrop !== 'static') {
|
|
5650
5861
|
handleDismiss();
|
|
@@ -5658,35 +5869,38 @@ const CModal = vue.defineComponent({
|
|
|
5658
5869
|
}
|
|
5659
5870
|
};
|
|
5660
5871
|
vue.provide('handleDismiss', handleDismiss);
|
|
5872
|
+
const modal = () => vue.h('div', {
|
|
5873
|
+
class: [
|
|
5874
|
+
'modal',
|
|
5875
|
+
{
|
|
5876
|
+
['fade']: props.transition,
|
|
5877
|
+
},
|
|
5878
|
+
attrs.class,
|
|
5879
|
+
],
|
|
5880
|
+
ref: modalRef,
|
|
5881
|
+
}, vue.h('div', {
|
|
5882
|
+
class: [
|
|
5883
|
+
'modal-dialog',
|
|
5884
|
+
{
|
|
5885
|
+
'modal-dialog-centered': props.alignment === 'center',
|
|
5886
|
+
[`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
|
|
5887
|
+
'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
|
|
5888
|
+
['modal-dialog-scrollable']: props.scrollable,
|
|
5889
|
+
[`modal-${props.size}`]: props.size,
|
|
5890
|
+
},
|
|
5891
|
+
],
|
|
5892
|
+
role: 'dialog',
|
|
5893
|
+
}, vue.h('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())));
|
|
5661
5894
|
return () => [
|
|
5662
5895
|
vue.h(vue.Transition, {
|
|
5896
|
+
css: false,
|
|
5663
5897
|
onEnter: (el, done) => handleEnter(el, done),
|
|
5664
5898
|
onAfterEnter: () => handleAfterEnter(),
|
|
5665
5899
|
onLeave: (el, done) => handleLeave(el, done),
|
|
5666
5900
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
5667
|
-
}, () =>
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
'modal',
|
|
5671
|
-
{
|
|
5672
|
-
['fade']: props.transition,
|
|
5673
|
-
},
|
|
5674
|
-
attrs.class,
|
|
5675
|
-
],
|
|
5676
|
-
ref: modalRef,
|
|
5677
|
-
}, vue.h('div', {
|
|
5678
|
-
class: [
|
|
5679
|
-
'modal-dialog',
|
|
5680
|
-
{
|
|
5681
|
-
'modal-dialog-centered': props.alignment === 'center',
|
|
5682
|
-
[`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
|
|
5683
|
-
'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
|
|
5684
|
-
['modal-dialog-scrollable']: props.scrollable,
|
|
5685
|
-
[`modal-${props.size}`]: props.size,
|
|
5686
|
-
},
|
|
5687
|
-
],
|
|
5688
|
-
role: 'dialog',
|
|
5689
|
-
}, vue.h('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())))),
|
|
5901
|
+
}, () => props.unmountOnClose
|
|
5902
|
+
? visible.value && modal()
|
|
5903
|
+
: vue.withDirectives(modal(), [[vue.vShow, visible.value]])),
|
|
5690
5904
|
props.backdrop &&
|
|
5691
5905
|
vue.h(CBackdrop, {
|
|
5692
5906
|
class: 'modal-backdrop',
|
|
@@ -6853,19 +7067,20 @@ const COffcanvas = vue.defineComponent({
|
|
|
6853
7067
|
}, 1);
|
|
6854
7068
|
};
|
|
6855
7069
|
const handleAfterEnter = () => {
|
|
6856
|
-
window.addEventListener('
|
|
7070
|
+
window.addEventListener('mousedown', handleMouseDown);
|
|
7071
|
+
// window.addEventListener('click', handleClickOutside)
|
|
6857
7072
|
window.addEventListener('keyup', handleKeyUp);
|
|
6858
7073
|
};
|
|
6859
7074
|
const handleLeave = (el, done) => {
|
|
6860
7075
|
el.addEventListener('transitionend', () => {
|
|
6861
7076
|
done();
|
|
6862
7077
|
});
|
|
7078
|
+
window.removeEventListener('mousedown', handleMouseDown);
|
|
7079
|
+
window.removeEventListener('keyup', handleKeyUp);
|
|
6863
7080
|
el.classList.remove('show');
|
|
6864
7081
|
};
|
|
6865
7082
|
const handleAfterLeave = (el) => {
|
|
6866
7083
|
el.style.visibility = 'hidden';
|
|
6867
|
-
window.removeEventListener('click', handleClickOutside);
|
|
6868
|
-
window.removeEventListener('keyup', handleKeyUp);
|
|
6869
7084
|
};
|
|
6870
7085
|
const handleDismiss = () => {
|
|
6871
7086
|
visible.value = false;
|
|
@@ -6878,31 +7093,34 @@ const COffcanvas = vue.defineComponent({
|
|
|
6878
7093
|
}
|
|
6879
7094
|
}
|
|
6880
7095
|
};
|
|
6881
|
-
const
|
|
7096
|
+
const handleMouseDown = (event) => {
|
|
7097
|
+
window.addEventListener('mouseup', () => handleMouseUp(event), { once: true });
|
|
7098
|
+
};
|
|
7099
|
+
const handleMouseUp = (event) => {
|
|
6882
7100
|
if (offcanvasRef.value && !offcanvasRef.value.contains(event.target)) {
|
|
6883
7101
|
props.backdrop && handleDismiss();
|
|
6884
7102
|
}
|
|
6885
7103
|
};
|
|
6886
7104
|
return () => [
|
|
6887
7105
|
vue.h(vue.Transition, {
|
|
7106
|
+
css: false,
|
|
6888
7107
|
onEnter: (el, done) => handleEnter(el, done),
|
|
6889
7108
|
onAfterEnter: () => handleAfterEnter(),
|
|
6890
7109
|
onLeave: (el, done) => handleLeave(el, done),
|
|
6891
7110
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
6892
|
-
}, () =>
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
{
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
}, slots.default && slots.default())),
|
|
7111
|
+
}, () => vue.withDirectives(vue.h('div', {
|
|
7112
|
+
class: [
|
|
7113
|
+
'offcanvas',
|
|
7114
|
+
{
|
|
7115
|
+
[`offcanvas-${props.placement}`]: props.placement,
|
|
7116
|
+
},
|
|
7117
|
+
],
|
|
7118
|
+
ref: offcanvasRef,
|
|
7119
|
+
role: 'dialog',
|
|
7120
|
+
}, slots.default && slots.default()), [[vVisible, props.visible]])),
|
|
6903
7121
|
props.backdrop &&
|
|
6904
7122
|
vue.h(CBackdrop, {
|
|
6905
|
-
class: '
|
|
7123
|
+
class: 'offcanvas-backdrop',
|
|
6906
7124
|
visible: visible.value,
|
|
6907
7125
|
}),
|
|
6908
7126
|
];
|
|
@@ -7349,6 +7567,137 @@ const CPaginationPlugin = {
|
|
|
7349
7567
|
},
|
|
7350
7568
|
};
|
|
7351
7569
|
|
|
7570
|
+
const BREAKPOINTS$1 = [
|
|
7571
|
+
'xxl',
|
|
7572
|
+
'xl',
|
|
7573
|
+
'lg',
|
|
7574
|
+
'md',
|
|
7575
|
+
'sm',
|
|
7576
|
+
'xs',
|
|
7577
|
+
];
|
|
7578
|
+
const CPlaceholder = vue.defineComponent({
|
|
7579
|
+
name: 'CPlaceholder',
|
|
7580
|
+
props: {
|
|
7581
|
+
/**
|
|
7582
|
+
* Set animation type to better convey the perception of something being actively loaded.
|
|
7583
|
+
*
|
|
7584
|
+
* @values 'glow', 'wave'
|
|
7585
|
+
*/
|
|
7586
|
+
animation: {
|
|
7587
|
+
type: String,
|
|
7588
|
+
default: undefined,
|
|
7589
|
+
require: false,
|
|
7590
|
+
validator: (value) => {
|
|
7591
|
+
return ['glow', 'wave'].includes(value);
|
|
7592
|
+
},
|
|
7593
|
+
},
|
|
7594
|
+
/**
|
|
7595
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
7596
|
+
*
|
|
7597
|
+
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
|
|
7598
|
+
*/
|
|
7599
|
+
color: Color,
|
|
7600
|
+
/**
|
|
7601
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
7602
|
+
*/
|
|
7603
|
+
component: {
|
|
7604
|
+
type: String,
|
|
7605
|
+
default: 'span',
|
|
7606
|
+
required: false,
|
|
7607
|
+
},
|
|
7608
|
+
/**
|
|
7609
|
+
* Size the component extra small, small, or large.
|
|
7610
|
+
*
|
|
7611
|
+
* @values 'xs', 'sm', 'lg'
|
|
7612
|
+
*/
|
|
7613
|
+
size: {
|
|
7614
|
+
type: String,
|
|
7615
|
+
default: undefined,
|
|
7616
|
+
required: false,
|
|
7617
|
+
validator: (value) => {
|
|
7618
|
+
return ['xs', 'sm', 'lg'].includes(value);
|
|
7619
|
+
},
|
|
7620
|
+
},
|
|
7621
|
+
/**
|
|
7622
|
+
* The number of columns on extra small devices (<576px).
|
|
7623
|
+
*/
|
|
7624
|
+
xs: {
|
|
7625
|
+
type: Number,
|
|
7626
|
+
default: undefined,
|
|
7627
|
+
require: false,
|
|
7628
|
+
},
|
|
7629
|
+
/**
|
|
7630
|
+
* The number of columns on small devices (<768px).
|
|
7631
|
+
*/
|
|
7632
|
+
sm: {
|
|
7633
|
+
type: Number,
|
|
7634
|
+
default: undefined,
|
|
7635
|
+
require: false,
|
|
7636
|
+
},
|
|
7637
|
+
/**
|
|
7638
|
+
* The number of columns on medium devices (<992px).
|
|
7639
|
+
*/
|
|
7640
|
+
md: {
|
|
7641
|
+
type: Number,
|
|
7642
|
+
default: undefined,
|
|
7643
|
+
require: false,
|
|
7644
|
+
},
|
|
7645
|
+
/**
|
|
7646
|
+
* The number of columns on large devices (<1200px).
|
|
7647
|
+
*/
|
|
7648
|
+
lg: {
|
|
7649
|
+
type: Number,
|
|
7650
|
+
default: undefined,
|
|
7651
|
+
require: false,
|
|
7652
|
+
},
|
|
7653
|
+
/**
|
|
7654
|
+
* The number of columns on X-Large devices (<1400px).
|
|
7655
|
+
*/
|
|
7656
|
+
xl: {
|
|
7657
|
+
type: Number,
|
|
7658
|
+
default: undefined,
|
|
7659
|
+
require: false,
|
|
7660
|
+
},
|
|
7661
|
+
/**
|
|
7662
|
+
* The number of columns on XX-Large devices (≥1400px).
|
|
7663
|
+
*/
|
|
7664
|
+
xxl: {
|
|
7665
|
+
type: Number,
|
|
7666
|
+
default: undefined,
|
|
7667
|
+
require: false,
|
|
7668
|
+
},
|
|
7669
|
+
},
|
|
7670
|
+
setup(props, { slots }) {
|
|
7671
|
+
const repsonsiveClassNames = [];
|
|
7672
|
+
BREAKPOINTS$1.forEach((bp) => {
|
|
7673
|
+
const breakpoint = props[bp];
|
|
7674
|
+
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
7675
|
+
if (typeof breakpoint === 'number') {
|
|
7676
|
+
repsonsiveClassNames.push(`col${infix}-${breakpoint}`);
|
|
7677
|
+
}
|
|
7678
|
+
if (typeof breakpoint === 'boolean') {
|
|
7679
|
+
repsonsiveClassNames.push(`col${infix}`);
|
|
7680
|
+
}
|
|
7681
|
+
});
|
|
7682
|
+
return () => vue.h(props.component, {
|
|
7683
|
+
class: [
|
|
7684
|
+
props.animation ? `placeholder-${props.animation}` : 'placeholder',
|
|
7685
|
+
{
|
|
7686
|
+
[`bg-${props.color}`]: props.color,
|
|
7687
|
+
[`placeholder-${props.size}`]: props.size,
|
|
7688
|
+
},
|
|
7689
|
+
repsonsiveClassNames,
|
|
7690
|
+
],
|
|
7691
|
+
}, slots.default && slots.default());
|
|
7692
|
+
},
|
|
7693
|
+
});
|
|
7694
|
+
|
|
7695
|
+
const CPlaceholderPlugin = {
|
|
7696
|
+
install: (app) => {
|
|
7697
|
+
app.component(CPlaceholder.name, CPlaceholder);
|
|
7698
|
+
},
|
|
7699
|
+
};
|
|
7700
|
+
|
|
7352
7701
|
const CProgressBar = vue.defineComponent({
|
|
7353
7702
|
name: 'CProgressBar',
|
|
7354
7703
|
props: {
|
|
@@ -7866,90 +8215,6 @@ const CSidebarPlugin = {
|
|
|
7866
8215
|
},
|
|
7867
8216
|
};
|
|
7868
8217
|
|
|
7869
|
-
const CSpinnerPlugin = {
|
|
7870
|
-
install: (app) => {
|
|
7871
|
-
app.component(CSpinner.name, CSpinner);
|
|
7872
|
-
},
|
|
7873
|
-
};
|
|
7874
|
-
|
|
7875
|
-
const CElementCover = vue.defineComponent({
|
|
7876
|
-
name: 'CElementCover',
|
|
7877
|
-
props: {
|
|
7878
|
-
/**
|
|
7879
|
-
* Array of custom boundaries. Use to create custom cover area (instead of parent element area). Area is defined by four sides: 'top', 'bottom', 'right', 'left'. If side is not defined by any custom boundary it is equal to parent element boundary. Each custom boundary is object with keys:
|
|
7880
|
-
* - sides (array) - select boundaries of element to define boundaries. Sides names: 'top', 'bottom', 'right', 'left'.
|
|
7881
|
-
* - query (string) - query used to get element which define boundaries. Search will be done only inside parent element, by parent.querySelector(query) function. [docs]
|
|
7882
|
-
*
|
|
7883
|
-
* @type {sides: string[], query: string}[]
|
|
7884
|
-
*/
|
|
7885
|
-
boundaries: {
|
|
7886
|
-
// TODO: check if this is correct, TJ
|
|
7887
|
-
type: Array,
|
|
7888
|
-
require: true,
|
|
7889
|
-
},
|
|
7890
|
-
/**
|
|
7891
|
-
* Opacity of the cover. [docs]
|
|
7892
|
-
*
|
|
7893
|
-
* @type number
|
|
7894
|
-
*/
|
|
7895
|
-
opacity: {
|
|
7896
|
-
type: Number,
|
|
7897
|
-
require: false,
|
|
7898
|
-
},
|
|
7899
|
-
},
|
|
7900
|
-
setup(props) {
|
|
7901
|
-
let containerCoords = {};
|
|
7902
|
-
const elementRef = vue.ref();
|
|
7903
|
-
const getCustomBoundaries = () => {
|
|
7904
|
-
if (!props.boundaries || elementRef === null) {
|
|
7905
|
-
return {};
|
|
7906
|
-
}
|
|
7907
|
-
const parent = elementRef.value.parentElement;
|
|
7908
|
-
if (!parent) {
|
|
7909
|
-
return {};
|
|
7910
|
-
}
|
|
7911
|
-
const parentCoords = parent.getBoundingClientRect();
|
|
7912
|
-
const customBoundaries = {};
|
|
7913
|
-
props.boundaries.forEach((value) => {
|
|
7914
|
-
const element = parent.querySelector(value.query);
|
|
7915
|
-
if (!element || !value.sides) {
|
|
7916
|
-
return;
|
|
7917
|
-
}
|
|
7918
|
-
const coords = element.getBoundingClientRect();
|
|
7919
|
-
value.sides.forEach((side) => {
|
|
7920
|
-
const sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
7921
|
-
customBoundaries[side] = `${sideMargin}px`;
|
|
7922
|
-
});
|
|
7923
|
-
});
|
|
7924
|
-
return customBoundaries;
|
|
7925
|
-
};
|
|
7926
|
-
vue.onMounted(function () {
|
|
7927
|
-
vue.nextTick(function () {
|
|
7928
|
-
containerCoords = getCustomBoundaries();
|
|
7929
|
-
});
|
|
7930
|
-
});
|
|
7931
|
-
return () => vue.h('div', {
|
|
7932
|
-
style: {
|
|
7933
|
-
...containerCoords,
|
|
7934
|
-
position: 'absolute',
|
|
7935
|
-
'background-color': `rgb(255,255,255,${props.opacity})`,
|
|
7936
|
-
},
|
|
7937
|
-
ref: elementRef,
|
|
7938
|
-
}, vue.h('div', // TODO: use slot to override this
|
|
7939
|
-
{
|
|
7940
|
-
style: {
|
|
7941
|
-
position: 'absolute',
|
|
7942
|
-
top: '50%',
|
|
7943
|
-
left: '50%',
|
|
7944
|
-
transform: 'translateX(-50%) translateY(-50%)',
|
|
7945
|
-
},
|
|
7946
|
-
}, vue.h(CSpinner, {
|
|
7947
|
-
variant: 'grow',
|
|
7948
|
-
color: 'primary',
|
|
7949
|
-
})));
|
|
7950
|
-
},
|
|
7951
|
-
});
|
|
7952
|
-
|
|
7953
8218
|
const CTable = vue.defineComponent({
|
|
7954
8219
|
name: 'CTable',
|
|
7955
8220
|
props: {
|
|
@@ -8400,9 +8665,12 @@ const CSmartTableHead = vue.defineComponent({
|
|
|
8400
8665
|
},
|
|
8401
8666
|
columnFilter: {
|
|
8402
8667
|
type: [Boolean, Object],
|
|
8403
|
-
default: undefined,
|
|
8404
8668
|
require: false,
|
|
8405
8669
|
},
|
|
8670
|
+
columnFilterValue: {
|
|
8671
|
+
type: Object,
|
|
8672
|
+
required: false,
|
|
8673
|
+
},
|
|
8406
8674
|
columnSorter: {
|
|
8407
8675
|
type: [Boolean, Object],
|
|
8408
8676
|
default: undefined,
|
|
@@ -8524,30 +8792,31 @@ const CSmartTableHead = vue.defineComponent({
|
|
|
8524
8792
|
})),
|
|
8525
8793
|
],
|
|
8526
8794
|
}),
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
: typeof column.filter === 'undefined'
|
|
8795
|
+
props.columnFilter &&
|
|
8796
|
+
vue.h(CTableRow, {}, {
|
|
8797
|
+
default: () => [
|
|
8798
|
+
props.selectable && vue.h(CTableHeaderCell),
|
|
8799
|
+
props.columns.map((column) => vue.h(CTableHeaderCell, {
|
|
8800
|
+
...tableHeaderCellProps(column),
|
|
8801
|
+
}, {
|
|
8802
|
+
default: () => (typeof column !== 'object'
|
|
8536
8803
|
? true
|
|
8537
|
-
: column.filter
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8804
|
+
: typeof column.filter === 'undefined'
|
|
8805
|
+
? true
|
|
8806
|
+
: column.filter) &&
|
|
8807
|
+
vue.h(CFormInput, {
|
|
8808
|
+
size: 'sm',
|
|
8809
|
+
onInput: (event) => handleFilterInput(key(column), event.target.value),
|
|
8810
|
+
onChange: (event) => handleFilterChange(key(column), event.target.value),
|
|
8811
|
+
'aria-label': `column name: '${label(column)}' filter input`,
|
|
8812
|
+
...(props.columnFilterValue &&
|
|
8813
|
+
props.columnFilterValue[key(column)] && {
|
|
8814
|
+
value: props.columnFilterValue[key(column)],
|
|
8815
|
+
}),
|
|
8546
8816
|
}),
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
}),
|
|
8817
|
+
})),
|
|
8818
|
+
],
|
|
8819
|
+
}),
|
|
8551
8820
|
],
|
|
8552
8821
|
});
|
|
8553
8822
|
},
|
|
@@ -8835,7 +9104,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
8835
9104
|
*/
|
|
8836
9105
|
cleaner: {
|
|
8837
9106
|
type: Boolean,
|
|
8838
|
-
default: true,
|
|
8839
9107
|
required: false,
|
|
8840
9108
|
},
|
|
8841
9109
|
/**
|
|
@@ -8857,7 +9125,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
8857
9125
|
*/
|
|
8858
9126
|
columnFilter: {
|
|
8859
9127
|
type: [Boolean, Object],
|
|
8860
|
-
default: undefined,
|
|
8861
9128
|
required: false,
|
|
8862
9129
|
},
|
|
8863
9130
|
/**
|
|
@@ -8934,7 +9201,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
8934
9201
|
*/
|
|
8935
9202
|
itemsPerPage: {
|
|
8936
9203
|
type: Number,
|
|
8937
|
-
default: 10,
|
|
8938
9204
|
required: false,
|
|
8939
9205
|
},
|
|
8940
9206
|
/**
|
|
@@ -9006,7 +9272,8 @@ const CSmartTable = vue.defineComponent({
|
|
|
9006
9272
|
*/
|
|
9007
9273
|
selectable: Boolean,
|
|
9008
9274
|
/**
|
|
9009
|
-
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes.
|
|
9275
|
+
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes. eg.:
|
|
9276
|
+
* { column: 'status', state: 'asc' }
|
|
9010
9277
|
*
|
|
9011
9278
|
* @type SorterValue
|
|
9012
9279
|
*/
|
|
@@ -9046,7 +9313,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
9046
9313
|
*/
|
|
9047
9314
|
tableFilter: {
|
|
9048
9315
|
type: [Boolean, Object],
|
|
9049
|
-
default: undefined,
|
|
9050
9316
|
required: false,
|
|
9051
9317
|
},
|
|
9052
9318
|
/**
|
|
@@ -9168,6 +9434,7 @@ const CSmartTable = vue.defineComponent({
|
|
|
9168
9434
|
const selectedAll = vue.ref();
|
|
9169
9435
|
vue.watch(items, () => {
|
|
9170
9436
|
const selected = items.value.filter((item) => item._selected === true);
|
|
9437
|
+
emit('selectedItemsChange', selected);
|
|
9171
9438
|
if (selected.length === items.value.length) {
|
|
9172
9439
|
selectedAll.value = true;
|
|
9173
9440
|
return;
|
|
@@ -9179,9 +9446,8 @@ const CSmartTable = vue.defineComponent({
|
|
|
9179
9446
|
if (selected.length !== 0 && selected.length !== items.value.length) {
|
|
9180
9447
|
selectedAll.value = 'indeterminate';
|
|
9181
9448
|
}
|
|
9182
|
-
emit('selectedItemsChange', selected);
|
|
9183
9449
|
});
|
|
9184
|
-
const itemsPerPage = vue.ref(props.itemsPerPage);
|
|
9450
|
+
const itemsPerPage = vue.ref(props.itemsPerPage || items.value.length);
|
|
9185
9451
|
const activePage = vue.ref(props.activePage);
|
|
9186
9452
|
const sorterState = vue.reactive(props.sorterValue || {});
|
|
9187
9453
|
const columnFilterState = vue.ref(props.columnFilterValue ? props.columnFilterValue : {});
|
|
@@ -9219,7 +9485,12 @@ const CSmartTable = vue.defineComponent({
|
|
|
9219
9485
|
state.state = 'desc';
|
|
9220
9486
|
}
|
|
9221
9487
|
else {
|
|
9222
|
-
|
|
9488
|
+
if (typeof props.columnSorter === 'object' && !props.columnSorter.resetable) {
|
|
9489
|
+
state.state = 'asc';
|
|
9490
|
+
}
|
|
9491
|
+
else {
|
|
9492
|
+
state.state = 0;
|
|
9493
|
+
}
|
|
9223
9494
|
}
|
|
9224
9495
|
}
|
|
9225
9496
|
else {
|
|
@@ -9360,22 +9631,25 @@ const CSmartTable = vue.defineComponent({
|
|
|
9360
9631
|
Object.values(columnFilterState.value).join(''));
|
|
9361
9632
|
});
|
|
9362
9633
|
return () => vue.h('div', {}, [
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9634
|
+
(props.tableFilter || props.cleaner) &&
|
|
9635
|
+
vue.h('div', {
|
|
9636
|
+
class: 'row my-2 mx-0',
|
|
9637
|
+
}, [
|
|
9638
|
+
props.tableFilter &&
|
|
9639
|
+
vue.h('div', {
|
|
9640
|
+
class: 'col-auto p-0',
|
|
9641
|
+
}, props.tableFilter &&
|
|
9642
|
+
vue.h(CSmartTableFilter, {
|
|
9643
|
+
filterLabel: props.tableFilterLabel,
|
|
9644
|
+
filterPlaceholder: props.tableFilterPlaceholder,
|
|
9645
|
+
onFilterInput: (value) => tableFilterChange(value, 'input'),
|
|
9646
|
+
onFilterChange: (value) => tableFilterChange(value, 'change'),
|
|
9647
|
+
value: tableFilterState.value,
|
|
9648
|
+
})),
|
|
9649
|
+
props.cleaner &&
|
|
9650
|
+
vue.h('div', {
|
|
9651
|
+
class: 'col-auto p-0',
|
|
9652
|
+
}, vue.h(CSmartTableCleaner, {
|
|
9379
9653
|
onClick: () => clean(),
|
|
9380
9654
|
isFiltered: isFiltered.value,
|
|
9381
9655
|
}, {
|
|
@@ -9384,8 +9658,7 @@ const CSmartTable = vue.defineComponent({
|
|
|
9384
9658
|
? slots.cleanerIcon()
|
|
9385
9659
|
: vue.h(CIcon, { width: '18', content: cilFilterX }),
|
|
9386
9660
|
})),
|
|
9387
|
-
],
|
|
9388
|
-
}),
|
|
9661
|
+
]),
|
|
9389
9662
|
vue.h('div', {
|
|
9390
9663
|
class: 'position-relative',
|
|
9391
9664
|
}, {
|
|
@@ -9398,7 +9671,8 @@ const CSmartTable = vue.defineComponent({
|
|
|
9398
9671
|
vue.h(CSmartTableHead, {
|
|
9399
9672
|
component: 'head',
|
|
9400
9673
|
...props.tableHeadProps,
|
|
9401
|
-
columnFilter:
|
|
9674
|
+
columnFilter: props.columnFilter,
|
|
9675
|
+
columnFilterValue: columnFilterState.value,
|
|
9402
9676
|
columns: props.columns,
|
|
9403
9677
|
columnSorter: props.columnSorter,
|
|
9404
9678
|
selectable: props.selectable,
|
|
@@ -10520,6 +10794,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10520
10794
|
CDropdownDivider: CDropdownDivider,
|
|
10521
10795
|
CDropdownMenu: CDropdownMenu,
|
|
10522
10796
|
CDropdownToggle: CDropdownToggle,
|
|
10797
|
+
CElementCoverPlugin: CElementCoverPlugin,
|
|
10798
|
+
CElementCover: CElementCover,
|
|
10523
10799
|
CFooterPlugin: CFooterPlugin,
|
|
10524
10800
|
CFooter: CFooter,
|
|
10525
10801
|
CFormPlugin: CFormPlugin,
|
|
@@ -10586,6 +10862,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10586
10862
|
CPagination: CPagination,
|
|
10587
10863
|
CPaginationItem: CPaginationItem,
|
|
10588
10864
|
CSmartPagination: CSmartPagination,
|
|
10865
|
+
CPlaceholderPlugin: CPlaceholderPlugin,
|
|
10866
|
+
CPlaceholder: CPlaceholder,
|
|
10589
10867
|
CProgressPlugin: CProgressPlugin,
|
|
10590
10868
|
CProgress: CProgress,
|
|
10591
10869
|
CProgressBar: CProgressBar,
|
|
@@ -10631,49 +10909,79 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10631
10909
|
CWidgetStatsF: CWidgetStatsF
|
|
10632
10910
|
});
|
|
10633
10911
|
|
|
10912
|
+
const BREAKPOINTS = [
|
|
10913
|
+
'xxl',
|
|
10914
|
+
'xl',
|
|
10915
|
+
'lg',
|
|
10916
|
+
'md',
|
|
10917
|
+
'sm',
|
|
10918
|
+
'xs',
|
|
10919
|
+
];
|
|
10920
|
+
var vcplaceholder = {
|
|
10921
|
+
name: 'c-placeholder',
|
|
10922
|
+
mounted(el, binding) {
|
|
10923
|
+
const value = binding.value;
|
|
10924
|
+
el.classList.add(value.animation ? `placeholder-${value.animation}` : 'placeholder');
|
|
10925
|
+
BREAKPOINTS.forEach((bp) => {
|
|
10926
|
+
const breakpoint = value[bp];
|
|
10927
|
+
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
10928
|
+
if (typeof breakpoint === 'number') {
|
|
10929
|
+
el.classList.add(`col${infix}-${breakpoint}`);
|
|
10930
|
+
}
|
|
10931
|
+
if (typeof breakpoint === 'boolean') {
|
|
10932
|
+
el.classList.add(`col${infix}`);
|
|
10933
|
+
}
|
|
10934
|
+
});
|
|
10935
|
+
},
|
|
10936
|
+
};
|
|
10937
|
+
|
|
10634
10938
|
const getUID$1 = (prefix) => {
|
|
10635
10939
|
do {
|
|
10636
10940
|
prefix += Math.floor(Math.random() * 1000000);
|
|
10637
10941
|
} while (document.getElementById(prefix));
|
|
10638
10942
|
return prefix;
|
|
10639
10943
|
};
|
|
10640
|
-
const
|
|
10641
|
-
const
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
<div class="
|
|
10647
|
-
|
|
10944
|
+
const createPopoverElement = (id, header, content) => {
|
|
10945
|
+
const popover = document.createElement('div');
|
|
10946
|
+
popover.id = id;
|
|
10947
|
+
popover.classList.add('popover', 'bs-popover-auto', 'fade');
|
|
10948
|
+
popover.setAttribute('role', 'popover');
|
|
10949
|
+
popover.innerHTML = `<div class="popover-arrow" data-popper-arrow></div>
|
|
10950
|
+
<div class="popover-header">${header}</div>
|
|
10951
|
+
<div class="popover-body" id="">${content}</div>`;
|
|
10952
|
+
return popover;
|
|
10648
10953
|
};
|
|
10649
|
-
const
|
|
10650
|
-
document.body.appendChild(
|
|
10651
|
-
createPopper(el,
|
|
10954
|
+
const addPopoverElement = (popover, el, popperOptions) => {
|
|
10955
|
+
document.body.appendChild(popover);
|
|
10956
|
+
createPopper(el, popover, popperOptions);
|
|
10652
10957
|
setTimeout(() => {
|
|
10653
|
-
|
|
10958
|
+
popover.classList.add('show');
|
|
10654
10959
|
}, 1);
|
|
10655
10960
|
};
|
|
10656
|
-
const
|
|
10657
|
-
|
|
10961
|
+
const removePopoverElement = (popover) => {
|
|
10962
|
+
popover.classList.remove('show');
|
|
10658
10963
|
setTimeout(() => {
|
|
10659
|
-
document.body.removeChild(
|
|
10964
|
+
document.body.removeChild(popover);
|
|
10660
10965
|
}, 300);
|
|
10661
10966
|
};
|
|
10662
|
-
const
|
|
10663
|
-
const popperElement = document.getElementById(
|
|
10967
|
+
const togglePopoverElement = (popover, el, popperOptions) => {
|
|
10968
|
+
const popperElement = document.getElementById(popover.id);
|
|
10664
10969
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10665
|
-
|
|
10970
|
+
removePopoverElement(popover);
|
|
10666
10971
|
return;
|
|
10667
10972
|
}
|
|
10668
|
-
|
|
10973
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10669
10974
|
};
|
|
10670
|
-
var
|
|
10975
|
+
var vcpopover = {
|
|
10976
|
+
name: 'c-popover',
|
|
10977
|
+
uid: '',
|
|
10671
10978
|
mounted(el, binding) {
|
|
10672
10979
|
const value = binding.value;
|
|
10673
10980
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10674
|
-
const
|
|
10981
|
+
const header = value.header ? value.header : '';
|
|
10982
|
+
const trigger = value.trigger ? value.trigger : 'click';
|
|
10675
10983
|
// Popper Config
|
|
10676
|
-
const offset = value.offset ? value.offset : [0,
|
|
10984
|
+
const offset = value.offset ? value.offset : [0, 8];
|
|
10677
10985
|
const placement = value.placement ? value.placement : 'top';
|
|
10678
10986
|
const popperOptions = {
|
|
10679
10987
|
placement: placement,
|
|
@@ -10686,33 +10994,33 @@ var vctooltip = {
|
|
|
10686
10994
|
},
|
|
10687
10995
|
],
|
|
10688
10996
|
};
|
|
10689
|
-
const
|
|
10690
|
-
binding.arg =
|
|
10691
|
-
const
|
|
10997
|
+
const popoverUID = getUID$1('popover');
|
|
10998
|
+
binding.arg = popoverUID;
|
|
10999
|
+
const popover = createPopoverElement(popoverUID, header, content);
|
|
10692
11000
|
trigger.includes('click') &&
|
|
10693
11001
|
el.addEventListener('click', () => {
|
|
10694
|
-
|
|
11002
|
+
togglePopoverElement(popover, el, popperOptions);
|
|
10695
11003
|
});
|
|
10696
11004
|
if (trigger.includes('focus')) {
|
|
10697
11005
|
el.addEventListener('focus', () => {
|
|
10698
|
-
|
|
11006
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10699
11007
|
});
|
|
10700
11008
|
el.addEventListener('blur', () => {
|
|
10701
|
-
|
|
11009
|
+
removePopoverElement(popover);
|
|
10702
11010
|
});
|
|
10703
11011
|
}
|
|
10704
11012
|
if (trigger.includes('hover')) {
|
|
10705
11013
|
el.addEventListener('mouseenter', () => {
|
|
10706
|
-
|
|
11014
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10707
11015
|
});
|
|
10708
11016
|
el.addEventListener('mouseleave', () => {
|
|
10709
|
-
|
|
11017
|
+
removePopoverElement(popover);
|
|
10710
11018
|
});
|
|
10711
11019
|
}
|
|
10712
11020
|
},
|
|
10713
|
-
|
|
10714
|
-
const
|
|
10715
|
-
|
|
11021
|
+
unmounted(binding) {
|
|
11022
|
+
const popover = binding.arg && document.getElementById(binding.arg);
|
|
11023
|
+
popover && popover.remove();
|
|
10716
11024
|
},
|
|
10717
11025
|
};
|
|
10718
11026
|
|
|
@@ -10722,47 +11030,43 @@ const getUID = (prefix) => {
|
|
|
10722
11030
|
} while (document.getElementById(prefix));
|
|
10723
11031
|
return prefix;
|
|
10724
11032
|
};
|
|
10725
|
-
const
|
|
10726
|
-
const
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
<div class="
|
|
10732
|
-
|
|
10733
|
-
return popover;
|
|
11033
|
+
const createTooltipElement = (id, content) => {
|
|
11034
|
+
const tooltip = document.createElement('div');
|
|
11035
|
+
tooltip.id = id;
|
|
11036
|
+
tooltip.classList.add('tooltip', 'bs-tooltip-auto', 'fade');
|
|
11037
|
+
tooltip.setAttribute('role', 'tooltip');
|
|
11038
|
+
tooltip.innerHTML = `<div class="tooltip-arrow" data-popper-arrow></div>
|
|
11039
|
+
<div class="tooltip-inner" id="">${content}</div>`;
|
|
11040
|
+
return tooltip;
|
|
10734
11041
|
};
|
|
10735
|
-
const
|
|
10736
|
-
document.body.appendChild(
|
|
10737
|
-
createPopper(el,
|
|
11042
|
+
const addTooltipElement = (tooltip, el, popperOptions) => {
|
|
11043
|
+
document.body.appendChild(tooltip);
|
|
11044
|
+
createPopper(el, tooltip, popperOptions);
|
|
10738
11045
|
setTimeout(() => {
|
|
10739
|
-
|
|
11046
|
+
tooltip.classList.add('show');
|
|
10740
11047
|
}, 1);
|
|
10741
11048
|
};
|
|
10742
|
-
const
|
|
10743
|
-
|
|
11049
|
+
const removeTooltipElement = (tooltip) => {
|
|
11050
|
+
tooltip.classList.remove('show');
|
|
10744
11051
|
setTimeout(() => {
|
|
10745
|
-
document.body.removeChild(
|
|
11052
|
+
document.body.removeChild(tooltip);
|
|
10746
11053
|
}, 300);
|
|
10747
11054
|
};
|
|
10748
|
-
const
|
|
10749
|
-
const popperElement = document.getElementById(
|
|
11055
|
+
const toggleTooltipElement = (tooltip, el, popperOptions) => {
|
|
11056
|
+
const popperElement = document.getElementById(tooltip.id);
|
|
10750
11057
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10751
|
-
|
|
11058
|
+
removeTooltipElement(tooltip);
|
|
10752
11059
|
return;
|
|
10753
11060
|
}
|
|
10754
|
-
|
|
11061
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10755
11062
|
};
|
|
10756
|
-
var
|
|
10757
|
-
name: 'c-popover',
|
|
10758
|
-
uid: '',
|
|
11063
|
+
var vctooltip = {
|
|
10759
11064
|
mounted(el, binding) {
|
|
10760
11065
|
const value = binding.value;
|
|
10761
11066
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10762
|
-
const
|
|
10763
|
-
const trigger = value.trigger ? value.trigger : 'click';
|
|
11067
|
+
const trigger = value.trigger ? value.trigger : 'hover';
|
|
10764
11068
|
// Popper Config
|
|
10765
|
-
const offset = value.offset ? value.offset : [0,
|
|
11069
|
+
const offset = value.offset ? value.offset : [0, 0];
|
|
10766
11070
|
const placement = value.placement ? value.placement : 'top';
|
|
10767
11071
|
const popperOptions = {
|
|
10768
11072
|
placement: placement,
|
|
@@ -10775,33 +11079,33 @@ var vcpopover = {
|
|
|
10775
11079
|
},
|
|
10776
11080
|
],
|
|
10777
11081
|
};
|
|
10778
|
-
const
|
|
10779
|
-
binding.arg =
|
|
10780
|
-
const
|
|
11082
|
+
const tooltipUID = getUID('tooltip');
|
|
11083
|
+
binding.arg = tooltipUID;
|
|
11084
|
+
const tooltip = createTooltipElement(tooltipUID, content);
|
|
10781
11085
|
trigger.includes('click') &&
|
|
10782
11086
|
el.addEventListener('click', () => {
|
|
10783
|
-
|
|
11087
|
+
toggleTooltipElement(tooltip, el, popperOptions);
|
|
10784
11088
|
});
|
|
10785
11089
|
if (trigger.includes('focus')) {
|
|
10786
11090
|
el.addEventListener('focus', () => {
|
|
10787
|
-
|
|
11091
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10788
11092
|
});
|
|
10789
11093
|
el.addEventListener('blur', () => {
|
|
10790
|
-
|
|
11094
|
+
removeTooltipElement(tooltip);
|
|
10791
11095
|
});
|
|
10792
11096
|
}
|
|
10793
11097
|
if (trigger.includes('hover')) {
|
|
10794
11098
|
el.addEventListener('mouseenter', () => {
|
|
10795
|
-
|
|
11099
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10796
11100
|
});
|
|
10797
11101
|
el.addEventListener('mouseleave', () => {
|
|
10798
|
-
|
|
11102
|
+
removeTooltipElement(tooltip);
|
|
10799
11103
|
});
|
|
10800
11104
|
}
|
|
10801
11105
|
},
|
|
10802
|
-
|
|
10803
|
-
const
|
|
10804
|
-
|
|
11106
|
+
beforeUnmount(binding) {
|
|
11107
|
+
const tooltip = binding.arg && document.getElementById(binding.arg);
|
|
11108
|
+
tooltip && tooltip.remove();
|
|
10805
11109
|
},
|
|
10806
11110
|
};
|
|
10807
11111
|
|
|
@@ -10828,6 +11132,7 @@ const CoreuiVue = {
|
|
|
10828
11132
|
// for (const directive in pluginDirectives) {
|
|
10829
11133
|
// app.directive(directive, Directives[directive])
|
|
10830
11134
|
// }
|
|
11135
|
+
app.directive('c-placeholder', vcplaceholder);
|
|
10831
11136
|
app.directive('c-popover', vcpopover);
|
|
10832
11137
|
app.directive('c-tooltip', vctooltip);
|
|
10833
11138
|
},
|
|
@@ -10890,6 +11195,8 @@ exports.CDropdownItem = CDropdownItem;
|
|
|
10890
11195
|
exports.CDropdownMenu = CDropdownMenu;
|
|
10891
11196
|
exports.CDropdownPlugin = CDropdownPlugin;
|
|
10892
11197
|
exports.CDropdownToggle = CDropdownToggle;
|
|
11198
|
+
exports.CElementCover = CElementCover;
|
|
11199
|
+
exports.CElementCoverPlugin = CElementCoverPlugin;
|
|
10893
11200
|
exports.CFooter = CFooter;
|
|
10894
11201
|
exports.CFooterPlugin = CFooterPlugin;
|
|
10895
11202
|
exports.CForm = CForm;
|
|
@@ -10951,6 +11258,8 @@ exports.COffcanvasTitle = COffcanvasTitle;
|
|
|
10951
11258
|
exports.CPagination = CPagination;
|
|
10952
11259
|
exports.CPaginationItem = CPaginationItem;
|
|
10953
11260
|
exports.CPaginationPlugin = CPaginationPlugin;
|
|
11261
|
+
exports.CPlaceholder = CPlaceholder;
|
|
11262
|
+
exports.CPlaceholderPlugin = CPlaceholderPlugin;
|
|
10954
11263
|
exports.CPopover = CPopover;
|
|
10955
11264
|
exports.CPopoverPlugin = CPopoverPlugin;
|
|
10956
11265
|
exports.CProgress = CProgress;
|
|
@@ -10997,6 +11306,7 @@ exports.CWidgetStatsE = CWidgetStatsE;
|
|
|
10997
11306
|
exports.CWidgetStatsF = CWidgetStatsF;
|
|
10998
11307
|
exports.CWidgetsStatsPlugin = CWidgetsStatsPlugin;
|
|
10999
11308
|
exports["default"] = CoreuiVue;
|
|
11309
|
+
exports.vcplaceholder = vcplaceholder;
|
|
11000
11310
|
exports.vcpopover = vcpopover;
|
|
11001
11311
|
exports.vctooltip = vctooltip;
|
|
11002
11312
|
//# sourceMappingURL=index.js.map
|