@coreui/vue-pro 4.0.4 → 4.1.3
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 +280 -68
- 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 +724 -425
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +727 -423
- 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 +26 -20
- package/src/components/smart-table/CSmartTableHead.ts +14 -5
- 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,
|
|
@@ -8541,9 +8809,9 @@ const CSmartTableHead = vue.defineComponent({
|
|
|
8541
8809
|
onInput: (event) => handleFilterInput(key(column), event.target.value),
|
|
8542
8810
|
onChange: (event) => handleFilterChange(key(column), event.target.value),
|
|
8543
8811
|
'aria-label': `column name: '${label(column)}' filter input`,
|
|
8544
|
-
...(props.
|
|
8545
|
-
props.
|
|
8546
|
-
value: props.
|
|
8812
|
+
...(props.columnFilterValue &&
|
|
8813
|
+
props.columnFilterValue[key(column)] && {
|
|
8814
|
+
value: props.columnFilterValue[key(column)],
|
|
8547
8815
|
}),
|
|
8548
8816
|
}),
|
|
8549
8817
|
})),
|
|
@@ -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
|
/**
|
|
@@ -8885,7 +9152,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
8885
9152
|
*/
|
|
8886
9153
|
columns: {
|
|
8887
9154
|
type: Array,
|
|
8888
|
-
default: () => [],
|
|
8889
9155
|
required: false,
|
|
8890
9156
|
},
|
|
8891
9157
|
/**
|
|
@@ -8934,7 +9200,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
8934
9200
|
*/
|
|
8935
9201
|
itemsPerPage: {
|
|
8936
9202
|
type: Number,
|
|
8937
|
-
default: 10,
|
|
8938
9203
|
required: false,
|
|
8939
9204
|
},
|
|
8940
9205
|
/**
|
|
@@ -9006,7 +9271,8 @@ const CSmartTable = vue.defineComponent({
|
|
|
9006
9271
|
*/
|
|
9007
9272
|
selectable: Boolean,
|
|
9008
9273
|
/**
|
|
9009
|
-
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes.
|
|
9274
|
+
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes. eg.:
|
|
9275
|
+
* { column: 'status', state: 'asc' }
|
|
9010
9276
|
*
|
|
9011
9277
|
* @type SorterValue
|
|
9012
9278
|
*/
|
|
@@ -9180,7 +9446,7 @@ const CSmartTable = vue.defineComponent({
|
|
|
9180
9446
|
selectedAll.value = 'indeterminate';
|
|
9181
9447
|
}
|
|
9182
9448
|
});
|
|
9183
|
-
const itemsPerPage = vue.ref(props.itemsPerPage);
|
|
9449
|
+
const itemsPerPage = vue.ref(props.itemsPerPage || items.value.length);
|
|
9184
9450
|
const activePage = vue.ref(props.activePage);
|
|
9185
9451
|
const sorterState = vue.reactive(props.sorterValue || {});
|
|
9186
9452
|
const columnFilterState = vue.ref(props.columnFilterValue ? props.columnFilterValue : {});
|
|
@@ -9193,7 +9459,7 @@ const CSmartTable = vue.defineComponent({
|
|
|
9193
9459
|
});
|
|
9194
9460
|
// functions
|
|
9195
9461
|
const isSortable = (i) => {
|
|
9196
|
-
const isDataColumn = itemsDataColumns.value.includes(rawColumnNames[i]);
|
|
9462
|
+
const isDataColumn = itemsDataColumns.value.includes(rawColumnNames.value[i]);
|
|
9197
9463
|
let column;
|
|
9198
9464
|
if (props.columns)
|
|
9199
9465
|
column = props.columns[i];
|
|
@@ -9291,16 +9557,16 @@ const CSmartTable = vue.defineComponent({
|
|
|
9291
9557
|
sorterState.state = '';
|
|
9292
9558
|
};
|
|
9293
9559
|
// computed
|
|
9294
|
-
const genCols = Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_');
|
|
9295
|
-
const rawColumnNames = props.columns
|
|
9560
|
+
const genCols = vue.computed(() => Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_'));
|
|
9561
|
+
const rawColumnNames = vue.computed(() => props.columns
|
|
9296
9562
|
? props.columns.map((column) => {
|
|
9297
9563
|
if (typeof column === 'object')
|
|
9298
9564
|
return column.key;
|
|
9299
9565
|
else
|
|
9300
9566
|
return column;
|
|
9301
9567
|
})
|
|
9302
|
-
: genCols; //! || el
|
|
9303
|
-
const itemsDataColumns = vue.computed(() => rawColumnNames.filter((name) => genCols.includes(name)));
|
|
9568
|
+
: genCols.value); //! || el
|
|
9569
|
+
const itemsDataColumns = vue.computed(() => rawColumnNames.value.filter((name) => genCols.value.includes(name)));
|
|
9304
9570
|
// variables
|
|
9305
9571
|
const columnFiltered = () => {
|
|
9306
9572
|
let _items = items.value;
|
|
@@ -9373,6 +9639,8 @@ const CSmartTable = vue.defineComponent({
|
|
|
9373
9639
|
class: 'col-auto p-0',
|
|
9374
9640
|
}, props.tableFilter &&
|
|
9375
9641
|
vue.h(CSmartTableFilter, {
|
|
9642
|
+
filterLabel: props.tableFilterLabel,
|
|
9643
|
+
filterPlaceholder: props.tableFilterPlaceholder,
|
|
9376
9644
|
onFilterInput: (value) => tableFilterChange(value, 'input'),
|
|
9377
9645
|
onFilterChange: (value) => tableFilterChange(value, 'change'),
|
|
9378
9646
|
value: tableFilterState.value,
|
|
@@ -9402,8 +9670,9 @@ const CSmartTable = vue.defineComponent({
|
|
|
9402
9670
|
vue.h(CSmartTableHead, {
|
|
9403
9671
|
component: 'head',
|
|
9404
9672
|
...props.tableHeadProps,
|
|
9405
|
-
columnFilter:
|
|
9406
|
-
|
|
9673
|
+
columnFilter: props.columnFilter,
|
|
9674
|
+
columnFilterValue: columnFilterState.value,
|
|
9675
|
+
columns: rawColumnNames.value,
|
|
9407
9676
|
columnSorter: props.columnSorter,
|
|
9408
9677
|
selectable: props.selectable,
|
|
9409
9678
|
selectAll: selectedAll.value,
|
|
@@ -9450,12 +9719,12 @@ const CSmartTable = vue.defineComponent({
|
|
|
9450
9719
|
currentItems: currentItems.value,
|
|
9451
9720
|
firstItemOnActivePageIndex: firstItemOnActivePageIndex.value,
|
|
9452
9721
|
noItemsLabel: props.noItemsLabel,
|
|
9453
|
-
columns:
|
|
9722
|
+
columns: rawColumnNames.value,
|
|
9454
9723
|
scopedSlots: slots,
|
|
9455
9724
|
selectable: props.selectable,
|
|
9456
9725
|
onRowChecked: (id, value) => handleRowChecked(id, value),
|
|
9457
9726
|
onRowClick: (item, index, columnName, event) => handleRowClick(item, index, columnName, event),
|
|
9458
|
-
rawColumnNames: rawColumnNames,
|
|
9727
|
+
rawColumnNames: rawColumnNames.value,
|
|
9459
9728
|
clickableRows: props.clickableRows,
|
|
9460
9729
|
...props.tableBodyProps,
|
|
9461
9730
|
}),
|
|
@@ -9465,7 +9734,7 @@ const CSmartTable = vue.defineComponent({
|
|
|
9465
9734
|
...props.tableFootProps,
|
|
9466
9735
|
columnFilter: false,
|
|
9467
9736
|
columnSorter: false,
|
|
9468
|
-
columns:
|
|
9737
|
+
columns: rawColumnNames.value,
|
|
9469
9738
|
selectable: props.selectable,
|
|
9470
9739
|
selectAll: selectedAll.value,
|
|
9471
9740
|
onFilterInput: (key, value) => columnFilterChange(key, value, 'input'),
|
|
@@ -9495,7 +9764,6 @@ const CSmartTable = vue.defineComponent({
|
|
|
9495
9764
|
pages: numberOfPages.value,
|
|
9496
9765
|
activePage: activePage.value,
|
|
9497
9766
|
onActivePageChange: handleActivePageChange,
|
|
9498
|
-
limit: itemsPerPage.value,
|
|
9499
9767
|
})
|
|
9500
9768
|
: ''),
|
|
9501
9769
|
vue.h('div', {
|
|
@@ -10524,6 +10792,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10524
10792
|
CDropdownDivider: CDropdownDivider,
|
|
10525
10793
|
CDropdownMenu: CDropdownMenu,
|
|
10526
10794
|
CDropdownToggle: CDropdownToggle,
|
|
10795
|
+
CElementCoverPlugin: CElementCoverPlugin,
|
|
10796
|
+
CElementCover: CElementCover,
|
|
10527
10797
|
CFooterPlugin: CFooterPlugin,
|
|
10528
10798
|
CFooter: CFooter,
|
|
10529
10799
|
CFormPlugin: CFormPlugin,
|
|
@@ -10590,6 +10860,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10590
10860
|
CPagination: CPagination,
|
|
10591
10861
|
CPaginationItem: CPaginationItem,
|
|
10592
10862
|
CSmartPagination: CSmartPagination,
|
|
10863
|
+
CPlaceholderPlugin: CPlaceholderPlugin,
|
|
10864
|
+
CPlaceholder: CPlaceholder,
|
|
10593
10865
|
CProgressPlugin: CProgressPlugin,
|
|
10594
10866
|
CProgress: CProgress,
|
|
10595
10867
|
CProgressBar: CProgressBar,
|
|
@@ -10635,49 +10907,79 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10635
10907
|
CWidgetStatsF: CWidgetStatsF
|
|
10636
10908
|
});
|
|
10637
10909
|
|
|
10910
|
+
const BREAKPOINTS = [
|
|
10911
|
+
'xxl',
|
|
10912
|
+
'xl',
|
|
10913
|
+
'lg',
|
|
10914
|
+
'md',
|
|
10915
|
+
'sm',
|
|
10916
|
+
'xs',
|
|
10917
|
+
];
|
|
10918
|
+
var vcplaceholder = {
|
|
10919
|
+
name: 'c-placeholder',
|
|
10920
|
+
mounted(el, binding) {
|
|
10921
|
+
const value = binding.value;
|
|
10922
|
+
el.classList.add(value.animation ? `placeholder-${value.animation}` : 'placeholder');
|
|
10923
|
+
BREAKPOINTS.forEach((bp) => {
|
|
10924
|
+
const breakpoint = value[bp];
|
|
10925
|
+
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
10926
|
+
if (typeof breakpoint === 'number') {
|
|
10927
|
+
el.classList.add(`col${infix}-${breakpoint}`);
|
|
10928
|
+
}
|
|
10929
|
+
if (typeof breakpoint === 'boolean') {
|
|
10930
|
+
el.classList.add(`col${infix}`);
|
|
10931
|
+
}
|
|
10932
|
+
});
|
|
10933
|
+
},
|
|
10934
|
+
};
|
|
10935
|
+
|
|
10638
10936
|
const getUID$1 = (prefix) => {
|
|
10639
10937
|
do {
|
|
10640
10938
|
prefix += Math.floor(Math.random() * 1000000);
|
|
10641
10939
|
} while (document.getElementById(prefix));
|
|
10642
10940
|
return prefix;
|
|
10643
10941
|
};
|
|
10644
|
-
const
|
|
10645
|
-
const
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
<div class="
|
|
10651
|
-
|
|
10942
|
+
const createPopoverElement = (id, header, content) => {
|
|
10943
|
+
const popover = document.createElement('div');
|
|
10944
|
+
popover.id = id;
|
|
10945
|
+
popover.classList.add('popover', 'bs-popover-auto', 'fade');
|
|
10946
|
+
popover.setAttribute('role', 'popover');
|
|
10947
|
+
popover.innerHTML = `<div class="popover-arrow" data-popper-arrow></div>
|
|
10948
|
+
<div class="popover-header">${header}</div>
|
|
10949
|
+
<div class="popover-body" id="">${content}</div>`;
|
|
10950
|
+
return popover;
|
|
10652
10951
|
};
|
|
10653
|
-
const
|
|
10654
|
-
document.body.appendChild(
|
|
10655
|
-
createPopper(el,
|
|
10952
|
+
const addPopoverElement = (popover, el, popperOptions) => {
|
|
10953
|
+
document.body.appendChild(popover);
|
|
10954
|
+
createPopper(el, popover, popperOptions);
|
|
10656
10955
|
setTimeout(() => {
|
|
10657
|
-
|
|
10956
|
+
popover.classList.add('show');
|
|
10658
10957
|
}, 1);
|
|
10659
10958
|
};
|
|
10660
|
-
const
|
|
10661
|
-
|
|
10959
|
+
const removePopoverElement = (popover) => {
|
|
10960
|
+
popover.classList.remove('show');
|
|
10662
10961
|
setTimeout(() => {
|
|
10663
|
-
document.body.removeChild(
|
|
10962
|
+
document.body.removeChild(popover);
|
|
10664
10963
|
}, 300);
|
|
10665
10964
|
};
|
|
10666
|
-
const
|
|
10667
|
-
const popperElement = document.getElementById(
|
|
10965
|
+
const togglePopoverElement = (popover, el, popperOptions) => {
|
|
10966
|
+
const popperElement = document.getElementById(popover.id);
|
|
10668
10967
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10669
|
-
|
|
10968
|
+
removePopoverElement(popover);
|
|
10670
10969
|
return;
|
|
10671
10970
|
}
|
|
10672
|
-
|
|
10971
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10673
10972
|
};
|
|
10674
|
-
var
|
|
10973
|
+
var vcpopover = {
|
|
10974
|
+
name: 'c-popover',
|
|
10975
|
+
uid: '',
|
|
10675
10976
|
mounted(el, binding) {
|
|
10676
10977
|
const value = binding.value;
|
|
10677
10978
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10678
|
-
const
|
|
10979
|
+
const header = value.header ? value.header : '';
|
|
10980
|
+
const trigger = value.trigger ? value.trigger : 'click';
|
|
10679
10981
|
// Popper Config
|
|
10680
|
-
const offset = value.offset ? value.offset : [0,
|
|
10982
|
+
const offset = value.offset ? value.offset : [0, 8];
|
|
10681
10983
|
const placement = value.placement ? value.placement : 'top';
|
|
10682
10984
|
const popperOptions = {
|
|
10683
10985
|
placement: placement,
|
|
@@ -10690,33 +10992,33 @@ var vctooltip = {
|
|
|
10690
10992
|
},
|
|
10691
10993
|
],
|
|
10692
10994
|
};
|
|
10693
|
-
const
|
|
10694
|
-
binding.arg =
|
|
10695
|
-
const
|
|
10995
|
+
const popoverUID = getUID$1('popover');
|
|
10996
|
+
binding.arg = popoverUID;
|
|
10997
|
+
const popover = createPopoverElement(popoverUID, header, content);
|
|
10696
10998
|
trigger.includes('click') &&
|
|
10697
10999
|
el.addEventListener('click', () => {
|
|
10698
|
-
|
|
11000
|
+
togglePopoverElement(popover, el, popperOptions);
|
|
10699
11001
|
});
|
|
10700
11002
|
if (trigger.includes('focus')) {
|
|
10701
11003
|
el.addEventListener('focus', () => {
|
|
10702
|
-
|
|
11004
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10703
11005
|
});
|
|
10704
11006
|
el.addEventListener('blur', () => {
|
|
10705
|
-
|
|
11007
|
+
removePopoverElement(popover);
|
|
10706
11008
|
});
|
|
10707
11009
|
}
|
|
10708
11010
|
if (trigger.includes('hover')) {
|
|
10709
11011
|
el.addEventListener('mouseenter', () => {
|
|
10710
|
-
|
|
11012
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10711
11013
|
});
|
|
10712
11014
|
el.addEventListener('mouseleave', () => {
|
|
10713
|
-
|
|
11015
|
+
removePopoverElement(popover);
|
|
10714
11016
|
});
|
|
10715
11017
|
}
|
|
10716
11018
|
},
|
|
10717
|
-
|
|
10718
|
-
const
|
|
10719
|
-
|
|
11019
|
+
unmounted(binding) {
|
|
11020
|
+
const popover = binding.arg && document.getElementById(binding.arg);
|
|
11021
|
+
popover && popover.remove();
|
|
10720
11022
|
},
|
|
10721
11023
|
};
|
|
10722
11024
|
|
|
@@ -10726,47 +11028,43 @@ const getUID = (prefix) => {
|
|
|
10726
11028
|
} while (document.getElementById(prefix));
|
|
10727
11029
|
return prefix;
|
|
10728
11030
|
};
|
|
10729
|
-
const
|
|
10730
|
-
const
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
<div class="
|
|
10736
|
-
|
|
10737
|
-
return popover;
|
|
11031
|
+
const createTooltipElement = (id, content) => {
|
|
11032
|
+
const tooltip = document.createElement('div');
|
|
11033
|
+
tooltip.id = id;
|
|
11034
|
+
tooltip.classList.add('tooltip', 'bs-tooltip-auto', 'fade');
|
|
11035
|
+
tooltip.setAttribute('role', 'tooltip');
|
|
11036
|
+
tooltip.innerHTML = `<div class="tooltip-arrow" data-popper-arrow></div>
|
|
11037
|
+
<div class="tooltip-inner" id="">${content}</div>`;
|
|
11038
|
+
return tooltip;
|
|
10738
11039
|
};
|
|
10739
|
-
const
|
|
10740
|
-
document.body.appendChild(
|
|
10741
|
-
createPopper(el,
|
|
11040
|
+
const addTooltipElement = (tooltip, el, popperOptions) => {
|
|
11041
|
+
document.body.appendChild(tooltip);
|
|
11042
|
+
createPopper(el, tooltip, popperOptions);
|
|
10742
11043
|
setTimeout(() => {
|
|
10743
|
-
|
|
11044
|
+
tooltip.classList.add('show');
|
|
10744
11045
|
}, 1);
|
|
10745
11046
|
};
|
|
10746
|
-
const
|
|
10747
|
-
|
|
11047
|
+
const removeTooltipElement = (tooltip) => {
|
|
11048
|
+
tooltip.classList.remove('show');
|
|
10748
11049
|
setTimeout(() => {
|
|
10749
|
-
document.body.removeChild(
|
|
11050
|
+
document.body.removeChild(tooltip);
|
|
10750
11051
|
}, 300);
|
|
10751
11052
|
};
|
|
10752
|
-
const
|
|
10753
|
-
const popperElement = document.getElementById(
|
|
11053
|
+
const toggleTooltipElement = (tooltip, el, popperOptions) => {
|
|
11054
|
+
const popperElement = document.getElementById(tooltip.id);
|
|
10754
11055
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10755
|
-
|
|
11056
|
+
removeTooltipElement(tooltip);
|
|
10756
11057
|
return;
|
|
10757
11058
|
}
|
|
10758
|
-
|
|
11059
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10759
11060
|
};
|
|
10760
|
-
var
|
|
10761
|
-
name: 'c-popover',
|
|
10762
|
-
uid: '',
|
|
11061
|
+
var vctooltip = {
|
|
10763
11062
|
mounted(el, binding) {
|
|
10764
11063
|
const value = binding.value;
|
|
10765
11064
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10766
|
-
const
|
|
10767
|
-
const trigger = value.trigger ? value.trigger : 'click';
|
|
11065
|
+
const trigger = value.trigger ? value.trigger : 'hover';
|
|
10768
11066
|
// Popper Config
|
|
10769
|
-
const offset = value.offset ? value.offset : [0,
|
|
11067
|
+
const offset = value.offset ? value.offset : [0, 0];
|
|
10770
11068
|
const placement = value.placement ? value.placement : 'top';
|
|
10771
11069
|
const popperOptions = {
|
|
10772
11070
|
placement: placement,
|
|
@@ -10779,33 +11077,33 @@ var vcpopover = {
|
|
|
10779
11077
|
},
|
|
10780
11078
|
],
|
|
10781
11079
|
};
|
|
10782
|
-
const
|
|
10783
|
-
binding.arg =
|
|
10784
|
-
const
|
|
11080
|
+
const tooltipUID = getUID('tooltip');
|
|
11081
|
+
binding.arg = tooltipUID;
|
|
11082
|
+
const tooltip = createTooltipElement(tooltipUID, content);
|
|
10785
11083
|
trigger.includes('click') &&
|
|
10786
11084
|
el.addEventListener('click', () => {
|
|
10787
|
-
|
|
11085
|
+
toggleTooltipElement(tooltip, el, popperOptions);
|
|
10788
11086
|
});
|
|
10789
11087
|
if (trigger.includes('focus')) {
|
|
10790
11088
|
el.addEventListener('focus', () => {
|
|
10791
|
-
|
|
11089
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10792
11090
|
});
|
|
10793
11091
|
el.addEventListener('blur', () => {
|
|
10794
|
-
|
|
11092
|
+
removeTooltipElement(tooltip);
|
|
10795
11093
|
});
|
|
10796
11094
|
}
|
|
10797
11095
|
if (trigger.includes('hover')) {
|
|
10798
11096
|
el.addEventListener('mouseenter', () => {
|
|
10799
|
-
|
|
11097
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10800
11098
|
});
|
|
10801
11099
|
el.addEventListener('mouseleave', () => {
|
|
10802
|
-
|
|
11100
|
+
removeTooltipElement(tooltip);
|
|
10803
11101
|
});
|
|
10804
11102
|
}
|
|
10805
11103
|
},
|
|
10806
|
-
|
|
10807
|
-
const
|
|
10808
|
-
|
|
11104
|
+
beforeUnmount(binding) {
|
|
11105
|
+
const tooltip = binding.arg && document.getElementById(binding.arg);
|
|
11106
|
+
tooltip && tooltip.remove();
|
|
10809
11107
|
},
|
|
10810
11108
|
};
|
|
10811
11109
|
|
|
@@ -10832,6 +11130,7 @@ const CoreuiVue = {
|
|
|
10832
11130
|
// for (const directive in pluginDirectives) {
|
|
10833
11131
|
// app.directive(directive, Directives[directive])
|
|
10834
11132
|
// }
|
|
11133
|
+
app.directive('c-placeholder', vcplaceholder);
|
|
10835
11134
|
app.directive('c-popover', vcpopover);
|
|
10836
11135
|
app.directive('c-tooltip', vctooltip);
|
|
10837
11136
|
},
|
|
@@ -10894,6 +11193,8 @@ exports.CDropdownItem = CDropdownItem;
|
|
|
10894
11193
|
exports.CDropdownMenu = CDropdownMenu;
|
|
10895
11194
|
exports.CDropdownPlugin = CDropdownPlugin;
|
|
10896
11195
|
exports.CDropdownToggle = CDropdownToggle;
|
|
11196
|
+
exports.CElementCover = CElementCover;
|
|
11197
|
+
exports.CElementCoverPlugin = CElementCoverPlugin;
|
|
10897
11198
|
exports.CFooter = CFooter;
|
|
10898
11199
|
exports.CFooterPlugin = CFooterPlugin;
|
|
10899
11200
|
exports.CForm = CForm;
|
|
@@ -10955,6 +11256,8 @@ exports.COffcanvasTitle = COffcanvasTitle;
|
|
|
10955
11256
|
exports.CPagination = CPagination;
|
|
10956
11257
|
exports.CPaginationItem = CPaginationItem;
|
|
10957
11258
|
exports.CPaginationPlugin = CPaginationPlugin;
|
|
11259
|
+
exports.CPlaceholder = CPlaceholder;
|
|
11260
|
+
exports.CPlaceholderPlugin = CPlaceholderPlugin;
|
|
10958
11261
|
exports.CPopover = CPopover;
|
|
10959
11262
|
exports.CPopoverPlugin = CPopoverPlugin;
|
|
10960
11263
|
exports.CProgress = CProgress;
|
|
@@ -11001,6 +11304,7 @@ exports.CWidgetStatsE = CWidgetStatsE;
|
|
|
11001
11304
|
exports.CWidgetStatsF = CWidgetStatsF;
|
|
11002
11305
|
exports.CWidgetsStatsPlugin = CWidgetsStatsPlugin;
|
|
11003
11306
|
exports["default"] = CoreuiVue;
|
|
11307
|
+
exports.vcplaceholder = vcplaceholder;
|
|
11004
11308
|
exports.vcpopover = vcpopover;
|
|
11005
11309
|
exports.vctooltip = vctooltip;
|
|
11006
11310
|
//# sourceMappingURL=index.js.map
|