@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.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, provide, h as h$1, Transition, withDirectives,
|
|
1
|
+
import { defineComponent, ref, provide, h as h$1, Transition, withDirectives, inject, watch, reactive, onBeforeMount, onMounted, onUpdated, toRefs, onUnmounted, nextTick, vShow, computed, Teleport, onBeforeUnmount } from 'vue';
|
|
2
2
|
|
|
3
3
|
const CAccordion = defineComponent({
|
|
4
4
|
name: 'CAccordion',
|
|
@@ -32,9 +32,45 @@ const CAccordion = defineComponent({
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
const vVisible = {
|
|
36
|
+
beforeMount(el, { value }, { transition }) {
|
|
37
|
+
el._vod = el.style.display === 'none' ? '' : el.style.display;
|
|
38
|
+
if (transition && value) {
|
|
39
|
+
transition.beforeEnter(el);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
mounted(el, { value }, { transition }) {
|
|
43
|
+
if (transition && value) {
|
|
44
|
+
transition.enter(el);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
48
|
+
if (!value === !oldValue)
|
|
49
|
+
return;
|
|
50
|
+
if (transition) {
|
|
51
|
+
if (value) {
|
|
52
|
+
transition.beforeEnter(el);
|
|
53
|
+
transition.enter(el);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
transition.leave(el, () => {
|
|
57
|
+
// setDisplay(el, false)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
35
64
|
const CCollapse = defineComponent({
|
|
36
65
|
name: 'CCollapse',
|
|
37
66
|
props: {
|
|
67
|
+
/**
|
|
68
|
+
* Set horizontal collapsing to transition the width instead of height.
|
|
69
|
+
*/
|
|
70
|
+
horizontal: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
required: false,
|
|
73
|
+
},
|
|
38
74
|
/**
|
|
39
75
|
* Toggle the visibility of component.
|
|
40
76
|
*/
|
|
@@ -54,42 +90,58 @@ const CCollapse = defineComponent({
|
|
|
54
90
|
'show',
|
|
55
91
|
],
|
|
56
92
|
setup(props, { slots, emit }) {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
93
|
+
const collapsing = ref(false);
|
|
94
|
+
const show = ref(props.visible);
|
|
95
|
+
const handleBeforeEnter = () => {
|
|
96
|
+
collapsing.value = true;
|
|
60
97
|
};
|
|
61
98
|
const handleEnter = (el, done) => {
|
|
62
99
|
emit('show');
|
|
63
100
|
el.addEventListener('transitionend', () => {
|
|
64
|
-
el.classList.add('collapse', 'show');
|
|
65
101
|
done();
|
|
66
102
|
});
|
|
67
|
-
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
if (props.horizontal) {
|
|
105
|
+
el.style.width = `${el.scrollWidth}px`;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
109
|
+
}, 1);
|
|
68
110
|
};
|
|
69
111
|
const handleAfterEnter = (el) => {
|
|
70
|
-
|
|
71
|
-
|
|
112
|
+
show.value = true;
|
|
113
|
+
collapsing.value = false;
|
|
114
|
+
props.horizontal ? el.style.removeProperty('width') : el.style.removeProperty('height');
|
|
72
115
|
};
|
|
73
116
|
const handleBeforeLeave = (el) => {
|
|
74
|
-
|
|
117
|
+
collapsing.value = true;
|
|
118
|
+
show.value = false;
|
|
119
|
+
if (props.horizontal) {
|
|
120
|
+
el.style.width = `${el.scrollWidth}px`;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
75
123
|
el.style.height = `${el.scrollHeight}px`;
|
|
76
124
|
};
|
|
77
125
|
const handleLeave = (el, done) => {
|
|
78
126
|
emit('hide');
|
|
79
|
-
el.classList.remove('collapse', 'show');
|
|
80
|
-
el.classList.add('collapsing');
|
|
81
127
|
el.addEventListener('transitionend', () => {
|
|
82
128
|
done();
|
|
83
129
|
});
|
|
84
|
-
|
|
130
|
+
setTimeout(() => {
|
|
131
|
+
if (props.horizontal) {
|
|
132
|
+
el.style.width = '0px';
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
el.style.height = '0px';
|
|
136
|
+
}, 1);
|
|
85
137
|
};
|
|
86
138
|
const handleAfterLeave = (el) => {
|
|
87
|
-
|
|
88
|
-
el.
|
|
139
|
+
collapsing.value = false;
|
|
140
|
+
props.horizontal ? el.style.removeProperty('width') : el.style.removeProperty('height');
|
|
89
141
|
};
|
|
90
142
|
return () => h$1(Transition, {
|
|
91
|
-
|
|
92
|
-
onBeforeEnter: (
|
|
143
|
+
css: false,
|
|
144
|
+
onBeforeEnter: () => handleBeforeEnter(),
|
|
93
145
|
onEnter: (el, done) => handleEnter(el, done),
|
|
94
146
|
onAfterEnter: (el) => handleAfterEnter(el),
|
|
95
147
|
onBeforeLeave: (el) => handleBeforeLeave(el),
|
|
@@ -97,12 +149,10 @@ const CCollapse = defineComponent({
|
|
|
97
149
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
98
150
|
}, () => withDirectives(h$1('div', {
|
|
99
151
|
class: [
|
|
100
|
-
'collapse',
|
|
101
|
-
{
|
|
102
|
-
show: props.visible,
|
|
103
|
-
},
|
|
152
|
+
collapsing.value ? 'collapsing' : 'collapse',
|
|
153
|
+
{ 'collapse-horizontal': props.horizontal, show: show.value },
|
|
104
154
|
],
|
|
105
|
-
}, slots.default && slots.default()), [[
|
|
155
|
+
}, slots.default && slots.default()), [[vVisible, props.visible]]));
|
|
106
156
|
},
|
|
107
157
|
});
|
|
108
158
|
|
|
@@ -796,6 +846,7 @@ const CButton = defineComponent({
|
|
|
796
846
|
],
|
|
797
847
|
disabled: props.disabled && props.component !== 'a',
|
|
798
848
|
...(props.component === 'a' && props.disabled && { 'aria-disabled': true, tabIndex: -1 }),
|
|
849
|
+
...(props.component === 'a' && props.href && { href: props.href }),
|
|
799
850
|
}, slots.default && slots.default());
|
|
800
851
|
},
|
|
801
852
|
});
|
|
@@ -1610,29 +1661,32 @@ function getBasePlacement(placement) {
|
|
|
1610
1661
|
return placement.split('-')[0];
|
|
1611
1662
|
}
|
|
1612
1663
|
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1664
|
+
var max = Math.max;
|
|
1665
|
+
var min = Math.min;
|
|
1666
|
+
var round = Math.round;
|
|
1667
|
+
|
|
1668
|
+
function getBoundingClientRect(element, includeScale) {
|
|
1669
|
+
if (includeScale === void 0) {
|
|
1670
|
+
includeScale = false;
|
|
1671
|
+
}
|
|
1616
1672
|
|
|
1617
1673
|
var rect = element.getBoundingClientRect();
|
|
1618
1674
|
var scaleX = 1;
|
|
1619
|
-
var scaleY = 1;
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
// }
|
|
1635
|
-
// }
|
|
1675
|
+
var scaleY = 1;
|
|
1676
|
+
|
|
1677
|
+
if (isHTMLElement(element) && includeScale) {
|
|
1678
|
+
var offsetHeight = element.offsetHeight;
|
|
1679
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1680
|
+
// Fallback to 1 in case both values are `0`
|
|
1681
|
+
|
|
1682
|
+
if (offsetWidth > 0) {
|
|
1683
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
if (offsetHeight > 0) {
|
|
1687
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1636
1690
|
|
|
1637
1691
|
return {
|
|
1638
1692
|
width: rect.width / scaleX,
|
|
@@ -1787,13 +1841,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
1787
1841
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1788
1842
|
}
|
|
1789
1843
|
|
|
1790
|
-
var max = Math.max;
|
|
1791
|
-
var min = Math.min;
|
|
1792
|
-
var round = Math.round;
|
|
1793
|
-
|
|
1794
1844
|
function within(min$1, value, max$1) {
|
|
1795
1845
|
return max(min$1, min(value, max$1));
|
|
1796
1846
|
}
|
|
1847
|
+
function withinMaxClamp(min, value, max) {
|
|
1848
|
+
var v = within(min, value, max);
|
|
1849
|
+
return v > max ? max : v;
|
|
1850
|
+
}
|
|
1797
1851
|
|
|
1798
1852
|
function getFreshSideObject() {
|
|
1799
1853
|
return {
|
|
@@ -1925,8 +1979,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
1925
1979
|
var win = window;
|
|
1926
1980
|
var dpr = win.devicePixelRatio || 1;
|
|
1927
1981
|
return {
|
|
1928
|
-
x: round(
|
|
1929
|
-
y: round(
|
|
1982
|
+
x: round(x * dpr) / dpr || 0,
|
|
1983
|
+
y: round(y * dpr) / dpr || 0
|
|
1930
1984
|
};
|
|
1931
1985
|
}
|
|
1932
1986
|
|
|
@@ -1941,14 +1995,23 @@ function mapToStyles(_ref2) {
|
|
|
1941
1995
|
position = _ref2.position,
|
|
1942
1996
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
1943
1997
|
adaptive = _ref2.adaptive,
|
|
1944
|
-
roundOffsets = _ref2.roundOffsets
|
|
1945
|
-
|
|
1946
|
-
var
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1998
|
+
roundOffsets = _ref2.roundOffsets,
|
|
1999
|
+
isFixed = _ref2.isFixed;
|
|
2000
|
+
var _offsets$x = offsets.x,
|
|
2001
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
2002
|
+
_offsets$y = offsets.y,
|
|
2003
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
2004
|
+
|
|
2005
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
2006
|
+
x: x,
|
|
2007
|
+
y: y
|
|
2008
|
+
}) : {
|
|
2009
|
+
x: x,
|
|
2010
|
+
y: y
|
|
2011
|
+
};
|
|
1951
2012
|
|
|
2013
|
+
x = _ref3.x;
|
|
2014
|
+
y = _ref3.y;
|
|
1952
2015
|
var hasX = offsets.hasOwnProperty('x');
|
|
1953
2016
|
var hasY = offsets.hasOwnProperty('y');
|
|
1954
2017
|
var sideX = left;
|
|
@@ -1973,16 +2036,18 @@ function mapToStyles(_ref2) {
|
|
|
1973
2036
|
offsetParent = offsetParent;
|
|
1974
2037
|
|
|
1975
2038
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
1976
|
-
sideY = bottom;
|
|
1977
|
-
|
|
1978
|
-
|
|
2039
|
+
sideY = bottom;
|
|
2040
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
2041
|
+
offsetParent[heightProp];
|
|
2042
|
+
y -= offsetY - popperRect.height;
|
|
1979
2043
|
y *= gpuAcceleration ? 1 : -1;
|
|
1980
2044
|
}
|
|
1981
2045
|
|
|
1982
2046
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
1983
|
-
sideX = right;
|
|
1984
|
-
|
|
1985
|
-
|
|
2047
|
+
sideX = right;
|
|
2048
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
2049
|
+
offsetParent[widthProp];
|
|
2050
|
+
x -= offsetX - popperRect.width;
|
|
1986
2051
|
x *= gpuAcceleration ? 1 : -1;
|
|
1987
2052
|
}
|
|
1988
2053
|
}
|
|
@@ -1991,6 +2056,17 @@ function mapToStyles(_ref2) {
|
|
|
1991
2056
|
position: position
|
|
1992
2057
|
}, adaptive && unsetSides);
|
|
1993
2058
|
|
|
2059
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
2060
|
+
x: x,
|
|
2061
|
+
y: y
|
|
2062
|
+
}) : {
|
|
2063
|
+
x: x,
|
|
2064
|
+
y: y
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
x = _ref4.x;
|
|
2068
|
+
y = _ref4.y;
|
|
2069
|
+
|
|
1994
2070
|
if (gpuAcceleration) {
|
|
1995
2071
|
var _Object$assign;
|
|
1996
2072
|
|
|
@@ -2000,9 +2076,9 @@ function mapToStyles(_ref2) {
|
|
|
2000
2076
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
2001
2077
|
}
|
|
2002
2078
|
|
|
2003
|
-
function computeStyles(
|
|
2004
|
-
var state =
|
|
2005
|
-
options =
|
|
2079
|
+
function computeStyles(_ref5) {
|
|
2080
|
+
var state = _ref5.state,
|
|
2081
|
+
options = _ref5.options;
|
|
2006
2082
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
2007
2083
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
2008
2084
|
_options$adaptive = options.adaptive,
|
|
@@ -2025,7 +2101,8 @@ function computeStyles(_ref4) {
|
|
|
2025
2101
|
variation: getVariation(state.placement),
|
|
2026
2102
|
popper: state.elements.popper,
|
|
2027
2103
|
popperRect: state.rects.popper,
|
|
2028
|
-
gpuAcceleration: gpuAcceleration
|
|
2104
|
+
gpuAcceleration: gpuAcceleration,
|
|
2105
|
+
isFixed: state.options.strategy === 'fixed'
|
|
2029
2106
|
};
|
|
2030
2107
|
|
|
2031
2108
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -2283,7 +2360,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
2283
2360
|
}
|
|
2284
2361
|
|
|
2285
2362
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
2286
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
2363
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2287
2364
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2288
2365
|
// clipping (or hiding) overflowing elements with a position different from
|
|
2289
2366
|
// `initial`
|
|
@@ -2800,6 +2877,14 @@ function preventOverflow(_ref) {
|
|
|
2800
2877
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
2801
2878
|
placement: state.placement
|
|
2802
2879
|
})) : tetherOffset;
|
|
2880
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
2881
|
+
mainAxis: tetherOffsetValue,
|
|
2882
|
+
altAxis: tetherOffsetValue
|
|
2883
|
+
} : Object.assign({
|
|
2884
|
+
mainAxis: 0,
|
|
2885
|
+
altAxis: 0
|
|
2886
|
+
}, tetherOffsetValue);
|
|
2887
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
2803
2888
|
var data = {
|
|
2804
2889
|
x: 0,
|
|
2805
2890
|
y: 0
|
|
@@ -2809,13 +2894,15 @@ function preventOverflow(_ref) {
|
|
|
2809
2894
|
return;
|
|
2810
2895
|
}
|
|
2811
2896
|
|
|
2812
|
-
if (checkMainAxis
|
|
2897
|
+
if (checkMainAxis) {
|
|
2898
|
+
var _offsetModifierState$;
|
|
2899
|
+
|
|
2813
2900
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
2814
2901
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
2815
2902
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2816
2903
|
var offset = popperOffsets[mainAxis];
|
|
2817
|
-
var min$1 =
|
|
2818
|
-
var max$1 =
|
|
2904
|
+
var min$1 = offset + overflow[mainSide];
|
|
2905
|
+
var max$1 = offset - overflow[altSide];
|
|
2819
2906
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
2820
2907
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
2821
2908
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -2835,36 +2922,45 @@ function preventOverflow(_ref) {
|
|
|
2835
2922
|
// width or height)
|
|
2836
2923
|
|
|
2837
2924
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
2838
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
2839
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
2925
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
2926
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
2840
2927
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
2841
2928
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
2842
|
-
var offsetModifierValue =
|
|
2843
|
-
var tetherMin =
|
|
2844
|
-
var tetherMax =
|
|
2929
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
2930
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
2931
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
2932
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
2933
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
2934
|
+
data[mainAxis] = preventedOffset - offset;
|
|
2935
|
+
}
|
|
2845
2936
|
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
2849
|
-
data[mainAxis] = preventedOffset - offset;
|
|
2850
|
-
}
|
|
2937
|
+
if (checkAltAxis) {
|
|
2938
|
+
var _offsetModifierState$2;
|
|
2851
2939
|
|
|
2852
|
-
|
|
2853
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2940
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2854
2941
|
|
|
2855
|
-
|
|
2942
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
2856
2943
|
|
|
2857
|
-
|
|
2944
|
+
var _offset = popperOffsets[altAxis];
|
|
2858
2945
|
|
|
2859
|
-
|
|
2946
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
2860
2947
|
|
|
2861
|
-
|
|
2948
|
+
var _min = _offset + overflow[_mainSide];
|
|
2862
2949
|
|
|
2863
|
-
|
|
2950
|
+
var _max = _offset - overflow[_altSide];
|
|
2864
2951
|
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2952
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
2953
|
+
|
|
2954
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
2955
|
+
|
|
2956
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
2957
|
+
|
|
2958
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
2959
|
+
|
|
2960
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
2961
|
+
|
|
2962
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
2963
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
2868
2964
|
}
|
|
2869
2965
|
|
|
2870
2966
|
state.modifiersData[name] = data;
|
|
@@ -2896,8 +2992,8 @@ function getNodeScroll(node) {
|
|
|
2896
2992
|
|
|
2897
2993
|
function isElementScaled(element) {
|
|
2898
2994
|
var rect = element.getBoundingClientRect();
|
|
2899
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
2900
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
2995
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
2996
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
2901
2997
|
return scaleX !== 1 || scaleY !== 1;
|
|
2902
2998
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
2903
2999
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -2909,9 +3005,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2909
3005
|
}
|
|
2910
3006
|
|
|
2911
3007
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2912
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
3008
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2913
3009
|
var documentElement = getDocumentElement(offsetParent);
|
|
2914
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
3010
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
2915
3011
|
var scroll = {
|
|
2916
3012
|
scrollLeft: 0,
|
|
2917
3013
|
scrollTop: 0
|
|
@@ -2928,7 +3024,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2928
3024
|
}
|
|
2929
3025
|
|
|
2930
3026
|
if (isHTMLElement(offsetParent)) {
|
|
2931
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
3027
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
2932
3028
|
offsets.x += offsetParent.clientLeft;
|
|
2933
3029
|
offsets.y += offsetParent.clientTop;
|
|
2934
3030
|
} else if (documentElement) {
|
|
@@ -3848,6 +3944,176 @@ const CDropdownPlugin = {
|
|
|
3848
3944
|
},
|
|
3849
3945
|
};
|
|
3850
3946
|
|
|
3947
|
+
const CSpinner = defineComponent({
|
|
3948
|
+
name: 'CSpinner',
|
|
3949
|
+
props: {
|
|
3950
|
+
/**
|
|
3951
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
3952
|
+
*
|
|
3953
|
+
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
|
|
3954
|
+
*/
|
|
3955
|
+
color: {
|
|
3956
|
+
type: String,
|
|
3957
|
+
default: undefined,
|
|
3958
|
+
required: false,
|
|
3959
|
+
validator: (value) => {
|
|
3960
|
+
return [
|
|
3961
|
+
'primary',
|
|
3962
|
+
'secondary',
|
|
3963
|
+
'success',
|
|
3964
|
+
'danger',
|
|
3965
|
+
'warning',
|
|
3966
|
+
'info',
|
|
3967
|
+
'dark',
|
|
3968
|
+
'light',
|
|
3969
|
+
].includes(value);
|
|
3970
|
+
},
|
|
3971
|
+
},
|
|
3972
|
+
/**
|
|
3973
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
3974
|
+
*/
|
|
3975
|
+
component: {
|
|
3976
|
+
type: String,
|
|
3977
|
+
default: 'div',
|
|
3978
|
+
required: false,
|
|
3979
|
+
},
|
|
3980
|
+
/**
|
|
3981
|
+
* Size the component small.
|
|
3982
|
+
*
|
|
3983
|
+
* @values 'sm'
|
|
3984
|
+
*/
|
|
3985
|
+
size: {
|
|
3986
|
+
type: String,
|
|
3987
|
+
default: undefined,
|
|
3988
|
+
required: false,
|
|
3989
|
+
validator: (value) => {
|
|
3990
|
+
return value === 'sm';
|
|
3991
|
+
},
|
|
3992
|
+
},
|
|
3993
|
+
/**
|
|
3994
|
+
* Set the button variant to an outlined button or a ghost button.
|
|
3995
|
+
*
|
|
3996
|
+
* @values 'border', 'grow'
|
|
3997
|
+
*/
|
|
3998
|
+
variant: {
|
|
3999
|
+
type: String,
|
|
4000
|
+
default: 'border',
|
|
4001
|
+
required: false,
|
|
4002
|
+
validator: (value) => {
|
|
4003
|
+
return ['border', 'grow'].includes(value);
|
|
4004
|
+
},
|
|
4005
|
+
},
|
|
4006
|
+
/**
|
|
4007
|
+
* Set visually hidden label for accessibility purposes.
|
|
4008
|
+
*/
|
|
4009
|
+
visuallyHiddenLabel: {
|
|
4010
|
+
type: String,
|
|
4011
|
+
default: 'Loading...',
|
|
4012
|
+
required: false,
|
|
4013
|
+
},
|
|
4014
|
+
},
|
|
4015
|
+
setup(props) {
|
|
4016
|
+
return () => h$1(props.component, {
|
|
4017
|
+
class: [
|
|
4018
|
+
`spinner-${props.variant}`,
|
|
4019
|
+
`text-${props.color}`,
|
|
4020
|
+
props.size && `spinner-${props.variant}-${props.size}`,
|
|
4021
|
+
],
|
|
4022
|
+
role: 'status',
|
|
4023
|
+
}, h$1('span', { class: ['visually-hidden'] }, props.visuallyHiddenLabel));
|
|
4024
|
+
},
|
|
4025
|
+
});
|
|
4026
|
+
|
|
4027
|
+
const CSpinnerPlugin = {
|
|
4028
|
+
install: (app) => {
|
|
4029
|
+
app.component(CSpinner.name, CSpinner);
|
|
4030
|
+
},
|
|
4031
|
+
};
|
|
4032
|
+
|
|
4033
|
+
const CElementCover = defineComponent({
|
|
4034
|
+
name: 'CElementCover',
|
|
4035
|
+
props: {
|
|
4036
|
+
/**
|
|
4037
|
+
* 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:
|
|
4038
|
+
* - sides (array) - select boundaries of element to define boundaries. Sides names: 'top', 'bottom', 'right', 'left'.
|
|
4039
|
+
* - query (string) - query used to get element which define boundaries. Search will be done only inside parent element, by parent.querySelector(query) function. [docs]
|
|
4040
|
+
*
|
|
4041
|
+
* @type {sides: string[], query: string}[]
|
|
4042
|
+
*/
|
|
4043
|
+
boundaries: {
|
|
4044
|
+
// TODO: check if this is correct, TJ
|
|
4045
|
+
type: Array,
|
|
4046
|
+
require: true,
|
|
4047
|
+
},
|
|
4048
|
+
/**
|
|
4049
|
+
* Opacity of the cover. [docs]
|
|
4050
|
+
*
|
|
4051
|
+
* @type number
|
|
4052
|
+
*/
|
|
4053
|
+
opacity: {
|
|
4054
|
+
type: Number,
|
|
4055
|
+
require: false,
|
|
4056
|
+
},
|
|
4057
|
+
},
|
|
4058
|
+
setup(props) {
|
|
4059
|
+
let containerCoords = {};
|
|
4060
|
+
const elementRef = ref();
|
|
4061
|
+
const getCustomBoundaries = () => {
|
|
4062
|
+
if (!props.boundaries || elementRef === null) {
|
|
4063
|
+
return {};
|
|
4064
|
+
}
|
|
4065
|
+
const parent = elementRef.value.parentElement;
|
|
4066
|
+
if (!parent) {
|
|
4067
|
+
return {};
|
|
4068
|
+
}
|
|
4069
|
+
const parentCoords = parent.getBoundingClientRect();
|
|
4070
|
+
const customBoundaries = {};
|
|
4071
|
+
props.boundaries.forEach((value) => {
|
|
4072
|
+
const element = parent.querySelector(value.query);
|
|
4073
|
+
if (!element || !value.sides) {
|
|
4074
|
+
return;
|
|
4075
|
+
}
|
|
4076
|
+
const coords = element.getBoundingClientRect();
|
|
4077
|
+
value.sides.forEach((side) => {
|
|
4078
|
+
const sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
4079
|
+
customBoundaries[side] = `${sideMargin}px`;
|
|
4080
|
+
});
|
|
4081
|
+
});
|
|
4082
|
+
return customBoundaries;
|
|
4083
|
+
};
|
|
4084
|
+
onMounted(function () {
|
|
4085
|
+
nextTick(function () {
|
|
4086
|
+
containerCoords = getCustomBoundaries();
|
|
4087
|
+
});
|
|
4088
|
+
});
|
|
4089
|
+
return () => h$1('div', {
|
|
4090
|
+
style: {
|
|
4091
|
+
...containerCoords,
|
|
4092
|
+
position: 'absolute',
|
|
4093
|
+
'background-color': `rgb(255,255,255,${props.opacity})`,
|
|
4094
|
+
},
|
|
4095
|
+
ref: elementRef,
|
|
4096
|
+
}, h$1('div', // TODO: use slot to override this
|
|
4097
|
+
{
|
|
4098
|
+
style: {
|
|
4099
|
+
position: 'absolute',
|
|
4100
|
+
top: '50%',
|
|
4101
|
+
left: '50%',
|
|
4102
|
+
transform: 'translateX(-50%) translateY(-50%)',
|
|
4103
|
+
},
|
|
4104
|
+
}, h$1(CSpinner, {
|
|
4105
|
+
variant: 'grow',
|
|
4106
|
+
color: 'primary',
|
|
4107
|
+
})));
|
|
4108
|
+
},
|
|
4109
|
+
});
|
|
4110
|
+
|
|
4111
|
+
const CElementCoverPlugin = {
|
|
4112
|
+
install: (app) => {
|
|
4113
|
+
app.component(CElementCover.name, CElementCover);
|
|
4114
|
+
},
|
|
4115
|
+
};
|
|
4116
|
+
|
|
3851
4117
|
const CFooter = defineComponent({
|
|
3852
4118
|
name: 'CFooter',
|
|
3853
4119
|
props: {
|
|
@@ -4250,11 +4516,11 @@ const CFormInput = defineComponent({
|
|
|
4250
4516
|
'update:modelValue',
|
|
4251
4517
|
],
|
|
4252
4518
|
setup(props, { emit, slots }) {
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4519
|
+
const handleChange = (event) => {
|
|
4520
|
+
const target = event.target;
|
|
4521
|
+
emit('change', event);
|
|
4522
|
+
emit('update:modelValue', target.value);
|
|
4523
|
+
};
|
|
4258
4524
|
const handleInput = (event) => {
|
|
4259
4525
|
const target = event.target;
|
|
4260
4526
|
emit('input', event);
|
|
@@ -4271,7 +4537,7 @@ const CFormInput = defineComponent({
|
|
|
4271
4537
|
},
|
|
4272
4538
|
],
|
|
4273
4539
|
disabled: props.disabled,
|
|
4274
|
-
|
|
4540
|
+
onChange: (event) => handleChange(event),
|
|
4275
4541
|
onInput: (event) => handleInput(event),
|
|
4276
4542
|
readonly: props.readonly,
|
|
4277
4543
|
type: props.type,
|
|
@@ -4393,10 +4659,14 @@ const CFormSelect = defineComponent({
|
|
|
4393
4659
|
* The default name for a value passed using v-model.
|
|
4394
4660
|
*/
|
|
4395
4661
|
modelValue: {
|
|
4396
|
-
type: String,
|
|
4662
|
+
type: [String, Array],
|
|
4397
4663
|
default: undefined,
|
|
4398
4664
|
require: false,
|
|
4399
4665
|
},
|
|
4666
|
+
multiple: {
|
|
4667
|
+
type: Boolean,
|
|
4668
|
+
required: false,
|
|
4669
|
+
},
|
|
4400
4670
|
/**
|
|
4401
4671
|
* Options list of the select component. Available keys: `label`, `value`, `disabled`.
|
|
4402
4672
|
* Examples:
|
|
@@ -4445,25 +4715,35 @@ const CFormSelect = defineComponent({
|
|
|
4445
4715
|
const selected = Array.from(target.options)
|
|
4446
4716
|
.filter((option) => option.selected)
|
|
4447
4717
|
.map((option) => option.value);
|
|
4448
|
-
const value = target.multiple ? selected : selected[0];
|
|
4449
4718
|
emit('change', event);
|
|
4450
|
-
emit('update:modelValue',
|
|
4719
|
+
emit('update:modelValue', target.multiple ? selected : selected[0]);
|
|
4451
4720
|
};
|
|
4452
4721
|
return () => h$1('select', {
|
|
4453
4722
|
class: [
|
|
4454
4723
|
'form-select',
|
|
4455
4724
|
{
|
|
4456
4725
|
[`form-select-${props.size}`]: props.size,
|
|
4726
|
+
'is-invalid': props.invalid,
|
|
4727
|
+
'is-valid': props.valid,
|
|
4457
4728
|
},
|
|
4458
4729
|
],
|
|
4730
|
+
multiple: props.multiple,
|
|
4459
4731
|
onChange: (event) => handleChange(event),
|
|
4460
4732
|
size: props.htmlSize,
|
|
4733
|
+
...(props.modelValue && !props.multiple && { value: props.modelValue }),
|
|
4461
4734
|
}, props.options
|
|
4462
4735
|
? props.options.map((option) => {
|
|
4463
4736
|
return h$1('option', {
|
|
4464
|
-
...(typeof option === 'object' &&
|
|
4465
|
-
option.disabled && { disabled: option.disabled }),
|
|
4466
|
-
|
|
4737
|
+
...(typeof option === 'object' && {
|
|
4738
|
+
...(option.disabled && { disabled: option.disabled }),
|
|
4739
|
+
...(option.selected && { selected: option.selected }),
|
|
4740
|
+
...(option.value && {
|
|
4741
|
+
value: option.value,
|
|
4742
|
+
...(props.modelValue &&
|
|
4743
|
+
props.multiple &&
|
|
4744
|
+
props.modelValue.includes(option.value) && { selected: true }),
|
|
4745
|
+
}),
|
|
4746
|
+
}),
|
|
4467
4747
|
}, typeof option === 'string' ? option : option.label);
|
|
4468
4748
|
})
|
|
4469
4749
|
: slots.default && slots.default());
|
|
@@ -4762,7 +5042,7 @@ const CFormPlugin = {
|
|
|
4762
5042
|
},
|
|
4763
5043
|
};
|
|
4764
5044
|
|
|
4765
|
-
const BREAKPOINTS$
|
|
5045
|
+
const BREAKPOINTS$4 = [
|
|
4766
5046
|
'xxl',
|
|
4767
5047
|
'xl',
|
|
4768
5048
|
'lg',
|
|
@@ -4835,40 +5115,40 @@ const CCol = defineComponent({
|
|
|
4835
5115
|
},
|
|
4836
5116
|
},
|
|
4837
5117
|
setup(props, { slots }) {
|
|
4838
|
-
const
|
|
4839
|
-
BREAKPOINTS$
|
|
5118
|
+
const repsonsiveClassNames = [];
|
|
5119
|
+
BREAKPOINTS$4.forEach((bp) => {
|
|
4840
5120
|
const breakpoint = props[bp];
|
|
4841
5121
|
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
4842
5122
|
if (breakpoint) {
|
|
4843
5123
|
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
4844
|
-
|
|
5124
|
+
repsonsiveClassNames.push(`col${infix}-${breakpoint}`);
|
|
4845
5125
|
}
|
|
4846
5126
|
if (typeof breakpoint === 'boolean') {
|
|
4847
|
-
|
|
5127
|
+
repsonsiveClassNames.push(`col${infix}`);
|
|
4848
5128
|
}
|
|
4849
5129
|
}
|
|
4850
5130
|
if (breakpoint && typeof breakpoint === 'object') {
|
|
4851
5131
|
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
4852
|
-
|
|
5132
|
+
repsonsiveClassNames.push(`col${infix}-${breakpoint.span}`);
|
|
4853
5133
|
}
|
|
4854
5134
|
if (typeof breakpoint.span === 'boolean') {
|
|
4855
|
-
|
|
5135
|
+
repsonsiveClassNames.push(`col${infix}`);
|
|
4856
5136
|
}
|
|
4857
5137
|
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
4858
|
-
|
|
5138
|
+
repsonsiveClassNames.push(`order${infix}-${breakpoint.order}`);
|
|
4859
5139
|
}
|
|
4860
5140
|
if (typeof breakpoint.offset === 'number') {
|
|
4861
|
-
|
|
5141
|
+
repsonsiveClassNames.push(`offset${infix}-${breakpoint.offset}`);
|
|
4862
5142
|
}
|
|
4863
5143
|
}
|
|
4864
5144
|
});
|
|
4865
5145
|
return () => h$1('div', {
|
|
4866
|
-
class: [
|
|
5146
|
+
class: [repsonsiveClassNames.length ? repsonsiveClassNames : 'col'],
|
|
4867
5147
|
}, slots.default && slots.default());
|
|
4868
5148
|
},
|
|
4869
5149
|
});
|
|
4870
5150
|
|
|
4871
|
-
const BREAKPOINTS$
|
|
5151
|
+
const BREAKPOINTS$3 = [
|
|
4872
5152
|
'xxl',
|
|
4873
5153
|
'xl',
|
|
4874
5154
|
'lg',
|
|
@@ -4923,18 +5203,18 @@ const CContainer = defineComponent({
|
|
|
4923
5203
|
},
|
|
4924
5204
|
},
|
|
4925
5205
|
setup(props, { slots }) {
|
|
4926
|
-
const
|
|
4927
|
-
BREAKPOINTS$
|
|
5206
|
+
const repsonsiveClassNames = [];
|
|
5207
|
+
BREAKPOINTS$3.forEach((bp) => {
|
|
4928
5208
|
const breakpoint = props[bp];
|
|
4929
|
-
breakpoint &&
|
|
5209
|
+
breakpoint && repsonsiveClassNames.push(`container-${bp}`);
|
|
4930
5210
|
});
|
|
4931
5211
|
return () => h$1('div', {
|
|
4932
|
-
class: [
|
|
5212
|
+
class: [repsonsiveClassNames.length ? repsonsiveClassNames : 'container'],
|
|
4933
5213
|
}, slots.default && slots.default());
|
|
4934
5214
|
},
|
|
4935
5215
|
});
|
|
4936
5216
|
|
|
4937
|
-
const BREAKPOINTS = [
|
|
5217
|
+
const BREAKPOINTS$2 = [
|
|
4938
5218
|
'xxl',
|
|
4939
5219
|
'xl',
|
|
4940
5220
|
'lg',
|
|
@@ -5007,27 +5287,27 @@ const CRow = defineComponent({
|
|
|
5007
5287
|
},
|
|
5008
5288
|
},
|
|
5009
5289
|
setup(props, { slots }) {
|
|
5010
|
-
const
|
|
5011
|
-
BREAKPOINTS.forEach((bp) => {
|
|
5290
|
+
const repsonsiveClassNames = [];
|
|
5291
|
+
BREAKPOINTS$2.forEach((bp) => {
|
|
5012
5292
|
const breakpoint = props[bp];
|
|
5013
5293
|
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
5014
5294
|
if (typeof breakpoint === 'object') {
|
|
5015
5295
|
if (breakpoint.cols) {
|
|
5016
|
-
|
|
5296
|
+
repsonsiveClassNames.push(`row-cols${infix}-${breakpoint.cols}`);
|
|
5017
5297
|
}
|
|
5018
5298
|
if (typeof breakpoint.gutter === 'number') {
|
|
5019
|
-
|
|
5299
|
+
repsonsiveClassNames.push(`g${infix}-${breakpoint.gutter}`);
|
|
5020
5300
|
}
|
|
5021
5301
|
if (typeof breakpoint.gutterX === 'number') {
|
|
5022
|
-
|
|
5302
|
+
repsonsiveClassNames.push(`gx${infix}-${breakpoint.gutterX}`);
|
|
5023
5303
|
}
|
|
5024
5304
|
if (typeof breakpoint.gutterY === 'number') {
|
|
5025
|
-
|
|
5305
|
+
repsonsiveClassNames.push(`gy${infix}-${breakpoint.gutterY}`);
|
|
5026
5306
|
}
|
|
5027
5307
|
}
|
|
5028
5308
|
});
|
|
5029
5309
|
return () => h$1('div', {
|
|
5030
|
-
class: ['row',
|
|
5310
|
+
class: ['row', repsonsiveClassNames],
|
|
5031
5311
|
}, slots.default && slots.default());
|
|
5032
5312
|
},
|
|
5033
5313
|
});
|
|
@@ -5321,86 +5601,6 @@ const CListGroupPlugin = {
|
|
|
5321
5601
|
},
|
|
5322
5602
|
};
|
|
5323
5603
|
|
|
5324
|
-
const CSpinner = defineComponent({
|
|
5325
|
-
name: 'CSpinner',
|
|
5326
|
-
props: {
|
|
5327
|
-
/**
|
|
5328
|
-
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
5329
|
-
*
|
|
5330
|
-
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
|
|
5331
|
-
*/
|
|
5332
|
-
color: {
|
|
5333
|
-
type: String,
|
|
5334
|
-
default: undefined,
|
|
5335
|
-
required: false,
|
|
5336
|
-
validator: (value) => {
|
|
5337
|
-
return [
|
|
5338
|
-
'primary',
|
|
5339
|
-
'secondary',
|
|
5340
|
-
'success',
|
|
5341
|
-
'danger',
|
|
5342
|
-
'warning',
|
|
5343
|
-
'info',
|
|
5344
|
-
'dark',
|
|
5345
|
-
'light',
|
|
5346
|
-
].includes(value);
|
|
5347
|
-
},
|
|
5348
|
-
},
|
|
5349
|
-
/**
|
|
5350
|
-
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
5351
|
-
*/
|
|
5352
|
-
component: {
|
|
5353
|
-
type: String,
|
|
5354
|
-
default: 'div',
|
|
5355
|
-
required: false,
|
|
5356
|
-
},
|
|
5357
|
-
/**
|
|
5358
|
-
* Size the component small.
|
|
5359
|
-
*
|
|
5360
|
-
* @values 'sm'
|
|
5361
|
-
*/
|
|
5362
|
-
size: {
|
|
5363
|
-
type: String,
|
|
5364
|
-
default: undefined,
|
|
5365
|
-
required: false,
|
|
5366
|
-
validator: (value) => {
|
|
5367
|
-
return value === 'sm';
|
|
5368
|
-
},
|
|
5369
|
-
},
|
|
5370
|
-
/**
|
|
5371
|
-
* Set the button variant to an outlined button or a ghost button.
|
|
5372
|
-
*
|
|
5373
|
-
* @values 'border', 'grow'
|
|
5374
|
-
*/
|
|
5375
|
-
variant: {
|
|
5376
|
-
type: String,
|
|
5377
|
-
default: 'border',
|
|
5378
|
-
required: false,
|
|
5379
|
-
validator: (value) => {
|
|
5380
|
-
return ['border', 'grow'].includes(value);
|
|
5381
|
-
},
|
|
5382
|
-
},
|
|
5383
|
-
/**
|
|
5384
|
-
* Set visually hidden label for accessibility purposes.
|
|
5385
|
-
*/
|
|
5386
|
-
visuallyHiddenLabel: {
|
|
5387
|
-
type: String,
|
|
5388
|
-
default: 'Loading...',
|
|
5389
|
-
required: false,
|
|
5390
|
-
},
|
|
5391
|
-
},
|
|
5392
|
-
setup(props) {
|
|
5393
|
-
return () => h$1(props.component, {
|
|
5394
|
-
class: [
|
|
5395
|
-
`spinner-${props.variant}`,
|
|
5396
|
-
`text-${props.color}`,
|
|
5397
|
-
props.size && `spinner-${props.variant}-${props.size}`,
|
|
5398
|
-
],
|
|
5399
|
-
role: 'status',
|
|
5400
|
-
}, h$1('span', { class: ['visually-hidden'] }, props.visuallyHiddenLabel));
|
|
5401
|
-
},
|
|
5402
|
-
});
|
|
5403
|
-
|
|
5404
5604
|
const CLoadingButton = defineComponent({
|
|
5405
5605
|
name: 'CLoadingButton',
|
|
5406
5606
|
props: {
|
|
@@ -5569,6 +5769,14 @@ const CModal = defineComponent({
|
|
|
5569
5769
|
default: true,
|
|
5570
5770
|
required: false,
|
|
5571
5771
|
},
|
|
5772
|
+
/**
|
|
5773
|
+
* By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
|
|
5774
|
+
*/
|
|
5775
|
+
unmountOnClose: {
|
|
5776
|
+
type: Boolean,
|
|
5777
|
+
default: true,
|
|
5778
|
+
required: false,
|
|
5779
|
+
},
|
|
5572
5780
|
/**
|
|
5573
5781
|
* Toggle the visibility of alert component.
|
|
5574
5782
|
*/
|
|
@@ -5607,7 +5815,7 @@ const CModal = defineComponent({
|
|
|
5607
5815
|
emit('show');
|
|
5608
5816
|
};
|
|
5609
5817
|
const handleAfterEnter = () => {
|
|
5610
|
-
window.addEventListener('
|
|
5818
|
+
window.addEventListener('mousedown', handleMouseDown);
|
|
5611
5819
|
window.addEventListener('keyup', handleKeyUp);
|
|
5612
5820
|
};
|
|
5613
5821
|
const handleLeave = (el, done) => {
|
|
@@ -5618,7 +5826,7 @@ const CModal = defineComponent({
|
|
|
5618
5826
|
el.classList.remove('show');
|
|
5619
5827
|
};
|
|
5620
5828
|
const handleAfterLeave = (el) => {
|
|
5621
|
-
window.removeEventListener('
|
|
5829
|
+
window.removeEventListener('mousedown', handleMouseDown);
|
|
5622
5830
|
window.removeEventListener('keyup', handleKeyUp);
|
|
5623
5831
|
el.style.display = 'none';
|
|
5624
5832
|
};
|
|
@@ -5640,7 +5848,10 @@ const CModal = defineComponent({
|
|
|
5640
5848
|
}
|
|
5641
5849
|
}
|
|
5642
5850
|
};
|
|
5643
|
-
const
|
|
5851
|
+
const handleMouseDown = (event) => {
|
|
5852
|
+
window.addEventListener('mouseup', () => handleMouseUp(event), { once: true });
|
|
5853
|
+
};
|
|
5854
|
+
const handleMouseUp = (event) => {
|
|
5644
5855
|
if (modalContentRef.value && !modalContentRef.value.contains(event.target)) {
|
|
5645
5856
|
if (props.backdrop !== 'static') {
|
|
5646
5857
|
handleDismiss();
|
|
@@ -5654,35 +5865,38 @@ const CModal = defineComponent({
|
|
|
5654
5865
|
}
|
|
5655
5866
|
};
|
|
5656
5867
|
provide('handleDismiss', handleDismiss);
|
|
5868
|
+
const modal = () => h$1('div', {
|
|
5869
|
+
class: [
|
|
5870
|
+
'modal',
|
|
5871
|
+
{
|
|
5872
|
+
['fade']: props.transition,
|
|
5873
|
+
},
|
|
5874
|
+
attrs.class,
|
|
5875
|
+
],
|
|
5876
|
+
ref: modalRef,
|
|
5877
|
+
}, h$1('div', {
|
|
5878
|
+
class: [
|
|
5879
|
+
'modal-dialog',
|
|
5880
|
+
{
|
|
5881
|
+
'modal-dialog-centered': props.alignment === 'center',
|
|
5882
|
+
[`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
|
|
5883
|
+
'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
|
|
5884
|
+
['modal-dialog-scrollable']: props.scrollable,
|
|
5885
|
+
[`modal-${props.size}`]: props.size,
|
|
5886
|
+
},
|
|
5887
|
+
],
|
|
5888
|
+
role: 'dialog',
|
|
5889
|
+
}, h$1('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())));
|
|
5657
5890
|
return () => [
|
|
5658
5891
|
h$1(Transition, {
|
|
5892
|
+
css: false,
|
|
5659
5893
|
onEnter: (el, done) => handleEnter(el, done),
|
|
5660
5894
|
onAfterEnter: () => handleAfterEnter(),
|
|
5661
5895
|
onLeave: (el, done) => handleLeave(el, done),
|
|
5662
5896
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
5663
|
-
}, () =>
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
'modal',
|
|
5667
|
-
{
|
|
5668
|
-
['fade']: props.transition,
|
|
5669
|
-
},
|
|
5670
|
-
attrs.class,
|
|
5671
|
-
],
|
|
5672
|
-
ref: modalRef,
|
|
5673
|
-
}, h$1('div', {
|
|
5674
|
-
class: [
|
|
5675
|
-
'modal-dialog',
|
|
5676
|
-
{
|
|
5677
|
-
'modal-dialog-centered': props.alignment === 'center',
|
|
5678
|
-
[`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
|
|
5679
|
-
'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
|
|
5680
|
-
['modal-dialog-scrollable']: props.scrollable,
|
|
5681
|
-
[`modal-${props.size}`]: props.size,
|
|
5682
|
-
},
|
|
5683
|
-
],
|
|
5684
|
-
role: 'dialog',
|
|
5685
|
-
}, h$1('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())))),
|
|
5897
|
+
}, () => props.unmountOnClose
|
|
5898
|
+
? visible.value && modal()
|
|
5899
|
+
: withDirectives(modal(), [[vShow, visible.value]])),
|
|
5686
5900
|
props.backdrop &&
|
|
5687
5901
|
h$1(CBackdrop, {
|
|
5688
5902
|
class: 'modal-backdrop',
|
|
@@ -6849,19 +7063,20 @@ const COffcanvas = defineComponent({
|
|
|
6849
7063
|
}, 1);
|
|
6850
7064
|
};
|
|
6851
7065
|
const handleAfterEnter = () => {
|
|
6852
|
-
window.addEventListener('
|
|
7066
|
+
window.addEventListener('mousedown', handleMouseDown);
|
|
7067
|
+
// window.addEventListener('click', handleClickOutside)
|
|
6853
7068
|
window.addEventListener('keyup', handleKeyUp);
|
|
6854
7069
|
};
|
|
6855
7070
|
const handleLeave = (el, done) => {
|
|
6856
7071
|
el.addEventListener('transitionend', () => {
|
|
6857
7072
|
done();
|
|
6858
7073
|
});
|
|
7074
|
+
window.removeEventListener('mousedown', handleMouseDown);
|
|
7075
|
+
window.removeEventListener('keyup', handleKeyUp);
|
|
6859
7076
|
el.classList.remove('show');
|
|
6860
7077
|
};
|
|
6861
7078
|
const handleAfterLeave = (el) => {
|
|
6862
7079
|
el.style.visibility = 'hidden';
|
|
6863
|
-
window.removeEventListener('click', handleClickOutside);
|
|
6864
|
-
window.removeEventListener('keyup', handleKeyUp);
|
|
6865
7080
|
};
|
|
6866
7081
|
const handleDismiss = () => {
|
|
6867
7082
|
visible.value = false;
|
|
@@ -6874,31 +7089,34 @@ const COffcanvas = defineComponent({
|
|
|
6874
7089
|
}
|
|
6875
7090
|
}
|
|
6876
7091
|
};
|
|
6877
|
-
const
|
|
7092
|
+
const handleMouseDown = (event) => {
|
|
7093
|
+
window.addEventListener('mouseup', () => handleMouseUp(event), { once: true });
|
|
7094
|
+
};
|
|
7095
|
+
const handleMouseUp = (event) => {
|
|
6878
7096
|
if (offcanvasRef.value && !offcanvasRef.value.contains(event.target)) {
|
|
6879
7097
|
props.backdrop && handleDismiss();
|
|
6880
7098
|
}
|
|
6881
7099
|
};
|
|
6882
7100
|
return () => [
|
|
6883
7101
|
h$1(Transition, {
|
|
7102
|
+
css: false,
|
|
6884
7103
|
onEnter: (el, done) => handleEnter(el, done),
|
|
6885
7104
|
onAfterEnter: () => handleAfterEnter(),
|
|
6886
7105
|
onLeave: (el, done) => handleLeave(el, done),
|
|
6887
7106
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
6888
|
-
}, () =>
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
{
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
}, slots.default && slots.default())),
|
|
7107
|
+
}, () => withDirectives(h$1('div', {
|
|
7108
|
+
class: [
|
|
7109
|
+
'offcanvas',
|
|
7110
|
+
{
|
|
7111
|
+
[`offcanvas-${props.placement}`]: props.placement,
|
|
7112
|
+
},
|
|
7113
|
+
],
|
|
7114
|
+
ref: offcanvasRef,
|
|
7115
|
+
role: 'dialog',
|
|
7116
|
+
}, slots.default && slots.default()), [[vVisible, props.visible]])),
|
|
6899
7117
|
props.backdrop &&
|
|
6900
7118
|
h$1(CBackdrop, {
|
|
6901
|
-
class: '
|
|
7119
|
+
class: 'offcanvas-backdrop',
|
|
6902
7120
|
visible: visible.value,
|
|
6903
7121
|
}),
|
|
6904
7122
|
];
|
|
@@ -7345,6 +7563,137 @@ const CPaginationPlugin = {
|
|
|
7345
7563
|
},
|
|
7346
7564
|
};
|
|
7347
7565
|
|
|
7566
|
+
const BREAKPOINTS$1 = [
|
|
7567
|
+
'xxl',
|
|
7568
|
+
'xl',
|
|
7569
|
+
'lg',
|
|
7570
|
+
'md',
|
|
7571
|
+
'sm',
|
|
7572
|
+
'xs',
|
|
7573
|
+
];
|
|
7574
|
+
const CPlaceholder = defineComponent({
|
|
7575
|
+
name: 'CPlaceholder',
|
|
7576
|
+
props: {
|
|
7577
|
+
/**
|
|
7578
|
+
* Set animation type to better convey the perception of something being actively loaded.
|
|
7579
|
+
*
|
|
7580
|
+
* @values 'glow', 'wave'
|
|
7581
|
+
*/
|
|
7582
|
+
animation: {
|
|
7583
|
+
type: String,
|
|
7584
|
+
default: undefined,
|
|
7585
|
+
require: false,
|
|
7586
|
+
validator: (value) => {
|
|
7587
|
+
return ['glow', 'wave'].includes(value);
|
|
7588
|
+
},
|
|
7589
|
+
},
|
|
7590
|
+
/**
|
|
7591
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
7592
|
+
*
|
|
7593
|
+
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
|
|
7594
|
+
*/
|
|
7595
|
+
color: Color,
|
|
7596
|
+
/**
|
|
7597
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
7598
|
+
*/
|
|
7599
|
+
component: {
|
|
7600
|
+
type: String,
|
|
7601
|
+
default: 'span',
|
|
7602
|
+
required: false,
|
|
7603
|
+
},
|
|
7604
|
+
/**
|
|
7605
|
+
* Size the component extra small, small, or large.
|
|
7606
|
+
*
|
|
7607
|
+
* @values 'xs', 'sm', 'lg'
|
|
7608
|
+
*/
|
|
7609
|
+
size: {
|
|
7610
|
+
type: String,
|
|
7611
|
+
default: undefined,
|
|
7612
|
+
required: false,
|
|
7613
|
+
validator: (value) => {
|
|
7614
|
+
return ['xs', 'sm', 'lg'].includes(value);
|
|
7615
|
+
},
|
|
7616
|
+
},
|
|
7617
|
+
/**
|
|
7618
|
+
* The number of columns on extra small devices (<576px).
|
|
7619
|
+
*/
|
|
7620
|
+
xs: {
|
|
7621
|
+
type: Number,
|
|
7622
|
+
default: undefined,
|
|
7623
|
+
require: false,
|
|
7624
|
+
},
|
|
7625
|
+
/**
|
|
7626
|
+
* The number of columns on small devices (<768px).
|
|
7627
|
+
*/
|
|
7628
|
+
sm: {
|
|
7629
|
+
type: Number,
|
|
7630
|
+
default: undefined,
|
|
7631
|
+
require: false,
|
|
7632
|
+
},
|
|
7633
|
+
/**
|
|
7634
|
+
* The number of columns on medium devices (<992px).
|
|
7635
|
+
*/
|
|
7636
|
+
md: {
|
|
7637
|
+
type: Number,
|
|
7638
|
+
default: undefined,
|
|
7639
|
+
require: false,
|
|
7640
|
+
},
|
|
7641
|
+
/**
|
|
7642
|
+
* The number of columns on large devices (<1200px).
|
|
7643
|
+
*/
|
|
7644
|
+
lg: {
|
|
7645
|
+
type: Number,
|
|
7646
|
+
default: undefined,
|
|
7647
|
+
require: false,
|
|
7648
|
+
},
|
|
7649
|
+
/**
|
|
7650
|
+
* The number of columns on X-Large devices (<1400px).
|
|
7651
|
+
*/
|
|
7652
|
+
xl: {
|
|
7653
|
+
type: Number,
|
|
7654
|
+
default: undefined,
|
|
7655
|
+
require: false,
|
|
7656
|
+
},
|
|
7657
|
+
/**
|
|
7658
|
+
* The number of columns on XX-Large devices (≥1400px).
|
|
7659
|
+
*/
|
|
7660
|
+
xxl: {
|
|
7661
|
+
type: Number,
|
|
7662
|
+
default: undefined,
|
|
7663
|
+
require: false,
|
|
7664
|
+
},
|
|
7665
|
+
},
|
|
7666
|
+
setup(props, { slots }) {
|
|
7667
|
+
const repsonsiveClassNames = [];
|
|
7668
|
+
BREAKPOINTS$1.forEach((bp) => {
|
|
7669
|
+
const breakpoint = props[bp];
|
|
7670
|
+
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
7671
|
+
if (typeof breakpoint === 'number') {
|
|
7672
|
+
repsonsiveClassNames.push(`col${infix}-${breakpoint}`);
|
|
7673
|
+
}
|
|
7674
|
+
if (typeof breakpoint === 'boolean') {
|
|
7675
|
+
repsonsiveClassNames.push(`col${infix}`);
|
|
7676
|
+
}
|
|
7677
|
+
});
|
|
7678
|
+
return () => h$1(props.component, {
|
|
7679
|
+
class: [
|
|
7680
|
+
props.animation ? `placeholder-${props.animation}` : 'placeholder',
|
|
7681
|
+
{
|
|
7682
|
+
[`bg-${props.color}`]: props.color,
|
|
7683
|
+
[`placeholder-${props.size}`]: props.size,
|
|
7684
|
+
},
|
|
7685
|
+
repsonsiveClassNames,
|
|
7686
|
+
],
|
|
7687
|
+
}, slots.default && slots.default());
|
|
7688
|
+
},
|
|
7689
|
+
});
|
|
7690
|
+
|
|
7691
|
+
const CPlaceholderPlugin = {
|
|
7692
|
+
install: (app) => {
|
|
7693
|
+
app.component(CPlaceholder.name, CPlaceholder);
|
|
7694
|
+
},
|
|
7695
|
+
};
|
|
7696
|
+
|
|
7348
7697
|
const CProgressBar = defineComponent({
|
|
7349
7698
|
name: 'CProgressBar',
|
|
7350
7699
|
props: {
|
|
@@ -7862,90 +8211,6 @@ const CSidebarPlugin = {
|
|
|
7862
8211
|
},
|
|
7863
8212
|
};
|
|
7864
8213
|
|
|
7865
|
-
const CSpinnerPlugin = {
|
|
7866
|
-
install: (app) => {
|
|
7867
|
-
app.component(CSpinner.name, CSpinner);
|
|
7868
|
-
},
|
|
7869
|
-
};
|
|
7870
|
-
|
|
7871
|
-
const CElementCover = defineComponent({
|
|
7872
|
-
name: 'CElementCover',
|
|
7873
|
-
props: {
|
|
7874
|
-
/**
|
|
7875
|
-
* 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:
|
|
7876
|
-
* - sides (array) - select boundaries of element to define boundaries. Sides names: 'top', 'bottom', 'right', 'left'.
|
|
7877
|
-
* - query (string) - query used to get element which define boundaries. Search will be done only inside parent element, by parent.querySelector(query) function. [docs]
|
|
7878
|
-
*
|
|
7879
|
-
* @type {sides: string[], query: string}[]
|
|
7880
|
-
*/
|
|
7881
|
-
boundaries: {
|
|
7882
|
-
// TODO: check if this is correct, TJ
|
|
7883
|
-
type: Array,
|
|
7884
|
-
require: true,
|
|
7885
|
-
},
|
|
7886
|
-
/**
|
|
7887
|
-
* Opacity of the cover. [docs]
|
|
7888
|
-
*
|
|
7889
|
-
* @type number
|
|
7890
|
-
*/
|
|
7891
|
-
opacity: {
|
|
7892
|
-
type: Number,
|
|
7893
|
-
require: false,
|
|
7894
|
-
},
|
|
7895
|
-
},
|
|
7896
|
-
setup(props) {
|
|
7897
|
-
let containerCoords = {};
|
|
7898
|
-
const elementRef = ref();
|
|
7899
|
-
const getCustomBoundaries = () => {
|
|
7900
|
-
if (!props.boundaries || elementRef === null) {
|
|
7901
|
-
return {};
|
|
7902
|
-
}
|
|
7903
|
-
const parent = elementRef.value.parentElement;
|
|
7904
|
-
if (!parent) {
|
|
7905
|
-
return {};
|
|
7906
|
-
}
|
|
7907
|
-
const parentCoords = parent.getBoundingClientRect();
|
|
7908
|
-
const customBoundaries = {};
|
|
7909
|
-
props.boundaries.forEach((value) => {
|
|
7910
|
-
const element = parent.querySelector(value.query);
|
|
7911
|
-
if (!element || !value.sides) {
|
|
7912
|
-
return;
|
|
7913
|
-
}
|
|
7914
|
-
const coords = element.getBoundingClientRect();
|
|
7915
|
-
value.sides.forEach((side) => {
|
|
7916
|
-
const sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
7917
|
-
customBoundaries[side] = `${sideMargin}px`;
|
|
7918
|
-
});
|
|
7919
|
-
});
|
|
7920
|
-
return customBoundaries;
|
|
7921
|
-
};
|
|
7922
|
-
onMounted(function () {
|
|
7923
|
-
nextTick(function () {
|
|
7924
|
-
containerCoords = getCustomBoundaries();
|
|
7925
|
-
});
|
|
7926
|
-
});
|
|
7927
|
-
return () => h$1('div', {
|
|
7928
|
-
style: {
|
|
7929
|
-
...containerCoords,
|
|
7930
|
-
position: 'absolute',
|
|
7931
|
-
'background-color': `rgb(255,255,255,${props.opacity})`,
|
|
7932
|
-
},
|
|
7933
|
-
ref: elementRef,
|
|
7934
|
-
}, h$1('div', // TODO: use slot to override this
|
|
7935
|
-
{
|
|
7936
|
-
style: {
|
|
7937
|
-
position: 'absolute',
|
|
7938
|
-
top: '50%',
|
|
7939
|
-
left: '50%',
|
|
7940
|
-
transform: 'translateX(-50%) translateY(-50%)',
|
|
7941
|
-
},
|
|
7942
|
-
}, h$1(CSpinner, {
|
|
7943
|
-
variant: 'grow',
|
|
7944
|
-
color: 'primary',
|
|
7945
|
-
})));
|
|
7946
|
-
},
|
|
7947
|
-
});
|
|
7948
|
-
|
|
7949
8214
|
const CTable = defineComponent({
|
|
7950
8215
|
name: 'CTable',
|
|
7951
8216
|
props: {
|
|
@@ -8396,9 +8661,12 @@ const CSmartTableHead = defineComponent({
|
|
|
8396
8661
|
},
|
|
8397
8662
|
columnFilter: {
|
|
8398
8663
|
type: [Boolean, Object],
|
|
8399
|
-
default: undefined,
|
|
8400
8664
|
require: false,
|
|
8401
8665
|
},
|
|
8666
|
+
columnFilterValue: {
|
|
8667
|
+
type: Object,
|
|
8668
|
+
required: false,
|
|
8669
|
+
},
|
|
8402
8670
|
columnSorter: {
|
|
8403
8671
|
type: [Boolean, Object],
|
|
8404
8672
|
default: undefined,
|
|
@@ -8537,9 +8805,9 @@ const CSmartTableHead = defineComponent({
|
|
|
8537
8805
|
onInput: (event) => handleFilterInput(key(column), event.target.value),
|
|
8538
8806
|
onChange: (event) => handleFilterChange(key(column), event.target.value),
|
|
8539
8807
|
'aria-label': `column name: '${label(column)}' filter input`,
|
|
8540
|
-
...(props.
|
|
8541
|
-
props.
|
|
8542
|
-
value: props.
|
|
8808
|
+
...(props.columnFilterValue &&
|
|
8809
|
+
props.columnFilterValue[key(column)] && {
|
|
8810
|
+
value: props.columnFilterValue[key(column)],
|
|
8543
8811
|
}),
|
|
8544
8812
|
}),
|
|
8545
8813
|
})),
|
|
@@ -8853,7 +9121,6 @@ const CSmartTable = defineComponent({
|
|
|
8853
9121
|
*/
|
|
8854
9122
|
columnFilter: {
|
|
8855
9123
|
type: [Boolean, Object],
|
|
8856
|
-
default: undefined,
|
|
8857
9124
|
required: false,
|
|
8858
9125
|
},
|
|
8859
9126
|
/**
|
|
@@ -8881,7 +9148,6 @@ const CSmartTable = defineComponent({
|
|
|
8881
9148
|
*/
|
|
8882
9149
|
columns: {
|
|
8883
9150
|
type: Array,
|
|
8884
|
-
default: () => [],
|
|
8885
9151
|
required: false,
|
|
8886
9152
|
},
|
|
8887
9153
|
/**
|
|
@@ -8930,7 +9196,6 @@ const CSmartTable = defineComponent({
|
|
|
8930
9196
|
*/
|
|
8931
9197
|
itemsPerPage: {
|
|
8932
9198
|
type: Number,
|
|
8933
|
-
default: 10,
|
|
8934
9199
|
required: false,
|
|
8935
9200
|
},
|
|
8936
9201
|
/**
|
|
@@ -9002,7 +9267,8 @@ const CSmartTable = defineComponent({
|
|
|
9002
9267
|
*/
|
|
9003
9268
|
selectable: Boolean,
|
|
9004
9269
|
/**
|
|
9005
|
-
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes.
|
|
9270
|
+
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes. eg.:
|
|
9271
|
+
* { column: 'status', state: 'asc' }
|
|
9006
9272
|
*
|
|
9007
9273
|
* @type SorterValue
|
|
9008
9274
|
*/
|
|
@@ -9176,7 +9442,7 @@ const CSmartTable = defineComponent({
|
|
|
9176
9442
|
selectedAll.value = 'indeterminate';
|
|
9177
9443
|
}
|
|
9178
9444
|
});
|
|
9179
|
-
const itemsPerPage = ref(props.itemsPerPage);
|
|
9445
|
+
const itemsPerPage = ref(props.itemsPerPage || items.value.length);
|
|
9180
9446
|
const activePage = ref(props.activePage);
|
|
9181
9447
|
const sorterState = reactive(props.sorterValue || {});
|
|
9182
9448
|
const columnFilterState = ref(props.columnFilterValue ? props.columnFilterValue : {});
|
|
@@ -9189,7 +9455,7 @@ const CSmartTable = defineComponent({
|
|
|
9189
9455
|
});
|
|
9190
9456
|
// functions
|
|
9191
9457
|
const isSortable = (i) => {
|
|
9192
|
-
const isDataColumn = itemsDataColumns.value.includes(rawColumnNames[i]);
|
|
9458
|
+
const isDataColumn = itemsDataColumns.value.includes(rawColumnNames.value[i]);
|
|
9193
9459
|
let column;
|
|
9194
9460
|
if (props.columns)
|
|
9195
9461
|
column = props.columns[i];
|
|
@@ -9287,16 +9553,16 @@ const CSmartTable = defineComponent({
|
|
|
9287
9553
|
sorterState.state = '';
|
|
9288
9554
|
};
|
|
9289
9555
|
// computed
|
|
9290
|
-
const genCols = Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_');
|
|
9291
|
-
const rawColumnNames = props.columns
|
|
9556
|
+
const genCols = computed(() => Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_'));
|
|
9557
|
+
const rawColumnNames = computed(() => props.columns
|
|
9292
9558
|
? props.columns.map((column) => {
|
|
9293
9559
|
if (typeof column === 'object')
|
|
9294
9560
|
return column.key;
|
|
9295
9561
|
else
|
|
9296
9562
|
return column;
|
|
9297
9563
|
})
|
|
9298
|
-
: genCols; //! || el
|
|
9299
|
-
const itemsDataColumns = computed(() => rawColumnNames.filter((name) => genCols.includes(name)));
|
|
9564
|
+
: genCols.value); //! || el
|
|
9565
|
+
const itemsDataColumns = computed(() => rawColumnNames.value.filter((name) => genCols.value.includes(name)));
|
|
9300
9566
|
// variables
|
|
9301
9567
|
const columnFiltered = () => {
|
|
9302
9568
|
let _items = items.value;
|
|
@@ -9369,6 +9635,8 @@ const CSmartTable = defineComponent({
|
|
|
9369
9635
|
class: 'col-auto p-0',
|
|
9370
9636
|
}, props.tableFilter &&
|
|
9371
9637
|
h$1(CSmartTableFilter, {
|
|
9638
|
+
filterLabel: props.tableFilterLabel,
|
|
9639
|
+
filterPlaceholder: props.tableFilterPlaceholder,
|
|
9372
9640
|
onFilterInput: (value) => tableFilterChange(value, 'input'),
|
|
9373
9641
|
onFilterChange: (value) => tableFilterChange(value, 'change'),
|
|
9374
9642
|
value: tableFilterState.value,
|
|
@@ -9398,8 +9666,9 @@ const CSmartTable = defineComponent({
|
|
|
9398
9666
|
h$1(CSmartTableHead, {
|
|
9399
9667
|
component: 'head',
|
|
9400
9668
|
...props.tableHeadProps,
|
|
9401
|
-
columnFilter:
|
|
9402
|
-
|
|
9669
|
+
columnFilter: props.columnFilter,
|
|
9670
|
+
columnFilterValue: columnFilterState.value,
|
|
9671
|
+
columns: rawColumnNames.value,
|
|
9403
9672
|
columnSorter: props.columnSorter,
|
|
9404
9673
|
selectable: props.selectable,
|
|
9405
9674
|
selectAll: selectedAll.value,
|
|
@@ -9446,12 +9715,12 @@ const CSmartTable = defineComponent({
|
|
|
9446
9715
|
currentItems: currentItems.value,
|
|
9447
9716
|
firstItemOnActivePageIndex: firstItemOnActivePageIndex.value,
|
|
9448
9717
|
noItemsLabel: props.noItemsLabel,
|
|
9449
|
-
columns:
|
|
9718
|
+
columns: rawColumnNames.value,
|
|
9450
9719
|
scopedSlots: slots,
|
|
9451
9720
|
selectable: props.selectable,
|
|
9452
9721
|
onRowChecked: (id, value) => handleRowChecked(id, value),
|
|
9453
9722
|
onRowClick: (item, index, columnName, event) => handleRowClick(item, index, columnName, event),
|
|
9454
|
-
rawColumnNames: rawColumnNames,
|
|
9723
|
+
rawColumnNames: rawColumnNames.value,
|
|
9455
9724
|
clickableRows: props.clickableRows,
|
|
9456
9725
|
...props.tableBodyProps,
|
|
9457
9726
|
}),
|
|
@@ -9461,7 +9730,7 @@ const CSmartTable = defineComponent({
|
|
|
9461
9730
|
...props.tableFootProps,
|
|
9462
9731
|
columnFilter: false,
|
|
9463
9732
|
columnSorter: false,
|
|
9464
|
-
columns:
|
|
9733
|
+
columns: rawColumnNames.value,
|
|
9465
9734
|
selectable: props.selectable,
|
|
9466
9735
|
selectAll: selectedAll.value,
|
|
9467
9736
|
onFilterInput: (key, value) => columnFilterChange(key, value, 'input'),
|
|
@@ -9491,7 +9760,6 @@ const CSmartTable = defineComponent({
|
|
|
9491
9760
|
pages: numberOfPages.value,
|
|
9492
9761
|
activePage: activePage.value,
|
|
9493
9762
|
onActivePageChange: handleActivePageChange,
|
|
9494
|
-
limit: itemsPerPage.value,
|
|
9495
9763
|
})
|
|
9496
9764
|
: ''),
|
|
9497
9765
|
h$1('div', {
|
|
@@ -10520,6 +10788,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10520
10788
|
CDropdownDivider: CDropdownDivider,
|
|
10521
10789
|
CDropdownMenu: CDropdownMenu,
|
|
10522
10790
|
CDropdownToggle: CDropdownToggle,
|
|
10791
|
+
CElementCoverPlugin: CElementCoverPlugin,
|
|
10792
|
+
CElementCover: CElementCover,
|
|
10523
10793
|
CFooterPlugin: CFooterPlugin,
|
|
10524
10794
|
CFooter: CFooter,
|
|
10525
10795
|
CFormPlugin: CFormPlugin,
|
|
@@ -10586,6 +10856,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10586
10856
|
CPagination: CPagination,
|
|
10587
10857
|
CPaginationItem: CPaginationItem,
|
|
10588
10858
|
CSmartPagination: CSmartPagination,
|
|
10859
|
+
CPlaceholderPlugin: CPlaceholderPlugin,
|
|
10860
|
+
CPlaceholder: CPlaceholder,
|
|
10589
10861
|
CProgressPlugin: CProgressPlugin,
|
|
10590
10862
|
CProgress: CProgress,
|
|
10591
10863
|
CProgressBar: CProgressBar,
|
|
@@ -10631,49 +10903,79 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10631
10903
|
CWidgetStatsF: CWidgetStatsF
|
|
10632
10904
|
});
|
|
10633
10905
|
|
|
10906
|
+
const BREAKPOINTS = [
|
|
10907
|
+
'xxl',
|
|
10908
|
+
'xl',
|
|
10909
|
+
'lg',
|
|
10910
|
+
'md',
|
|
10911
|
+
'sm',
|
|
10912
|
+
'xs',
|
|
10913
|
+
];
|
|
10914
|
+
var vcplaceholder = {
|
|
10915
|
+
name: 'c-placeholder',
|
|
10916
|
+
mounted(el, binding) {
|
|
10917
|
+
const value = binding.value;
|
|
10918
|
+
el.classList.add(value.animation ? `placeholder-${value.animation}` : 'placeholder');
|
|
10919
|
+
BREAKPOINTS.forEach((bp) => {
|
|
10920
|
+
const breakpoint = value[bp];
|
|
10921
|
+
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
10922
|
+
if (typeof breakpoint === 'number') {
|
|
10923
|
+
el.classList.add(`col${infix}-${breakpoint}`);
|
|
10924
|
+
}
|
|
10925
|
+
if (typeof breakpoint === 'boolean') {
|
|
10926
|
+
el.classList.add(`col${infix}`);
|
|
10927
|
+
}
|
|
10928
|
+
});
|
|
10929
|
+
},
|
|
10930
|
+
};
|
|
10931
|
+
|
|
10634
10932
|
const getUID$1 = (prefix) => {
|
|
10635
10933
|
do {
|
|
10636
10934
|
prefix += Math.floor(Math.random() * 1000000);
|
|
10637
10935
|
} while (document.getElementById(prefix));
|
|
10638
10936
|
return prefix;
|
|
10639
10937
|
};
|
|
10640
|
-
const
|
|
10641
|
-
const
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
<div class="
|
|
10647
|
-
|
|
10938
|
+
const createPopoverElement = (id, header, content) => {
|
|
10939
|
+
const popover = document.createElement('div');
|
|
10940
|
+
popover.id = id;
|
|
10941
|
+
popover.classList.add('popover', 'bs-popover-auto', 'fade');
|
|
10942
|
+
popover.setAttribute('role', 'popover');
|
|
10943
|
+
popover.innerHTML = `<div class="popover-arrow" data-popper-arrow></div>
|
|
10944
|
+
<div class="popover-header">${header}</div>
|
|
10945
|
+
<div class="popover-body" id="">${content}</div>`;
|
|
10946
|
+
return popover;
|
|
10648
10947
|
};
|
|
10649
|
-
const
|
|
10650
|
-
document.body.appendChild(
|
|
10651
|
-
createPopper(el,
|
|
10948
|
+
const addPopoverElement = (popover, el, popperOptions) => {
|
|
10949
|
+
document.body.appendChild(popover);
|
|
10950
|
+
createPopper(el, popover, popperOptions);
|
|
10652
10951
|
setTimeout(() => {
|
|
10653
|
-
|
|
10952
|
+
popover.classList.add('show');
|
|
10654
10953
|
}, 1);
|
|
10655
10954
|
};
|
|
10656
|
-
const
|
|
10657
|
-
|
|
10955
|
+
const removePopoverElement = (popover) => {
|
|
10956
|
+
popover.classList.remove('show');
|
|
10658
10957
|
setTimeout(() => {
|
|
10659
|
-
document.body.removeChild(
|
|
10958
|
+
document.body.removeChild(popover);
|
|
10660
10959
|
}, 300);
|
|
10661
10960
|
};
|
|
10662
|
-
const
|
|
10663
|
-
const popperElement = document.getElementById(
|
|
10961
|
+
const togglePopoverElement = (popover, el, popperOptions) => {
|
|
10962
|
+
const popperElement = document.getElementById(popover.id);
|
|
10664
10963
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10665
|
-
|
|
10964
|
+
removePopoverElement(popover);
|
|
10666
10965
|
return;
|
|
10667
10966
|
}
|
|
10668
|
-
|
|
10967
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10669
10968
|
};
|
|
10670
|
-
var
|
|
10969
|
+
var vcpopover = {
|
|
10970
|
+
name: 'c-popover',
|
|
10971
|
+
uid: '',
|
|
10671
10972
|
mounted(el, binding) {
|
|
10672
10973
|
const value = binding.value;
|
|
10673
10974
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10674
|
-
const
|
|
10975
|
+
const header = value.header ? value.header : '';
|
|
10976
|
+
const trigger = value.trigger ? value.trigger : 'click';
|
|
10675
10977
|
// Popper Config
|
|
10676
|
-
const offset = value.offset ? value.offset : [0,
|
|
10978
|
+
const offset = value.offset ? value.offset : [0, 8];
|
|
10677
10979
|
const placement = value.placement ? value.placement : 'top';
|
|
10678
10980
|
const popperOptions = {
|
|
10679
10981
|
placement: placement,
|
|
@@ -10686,33 +10988,33 @@ var vctooltip = {
|
|
|
10686
10988
|
},
|
|
10687
10989
|
],
|
|
10688
10990
|
};
|
|
10689
|
-
const
|
|
10690
|
-
binding.arg =
|
|
10691
|
-
const
|
|
10991
|
+
const popoverUID = getUID$1('popover');
|
|
10992
|
+
binding.arg = popoverUID;
|
|
10993
|
+
const popover = createPopoverElement(popoverUID, header, content);
|
|
10692
10994
|
trigger.includes('click') &&
|
|
10693
10995
|
el.addEventListener('click', () => {
|
|
10694
|
-
|
|
10996
|
+
togglePopoverElement(popover, el, popperOptions);
|
|
10695
10997
|
});
|
|
10696
10998
|
if (trigger.includes('focus')) {
|
|
10697
10999
|
el.addEventListener('focus', () => {
|
|
10698
|
-
|
|
11000
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10699
11001
|
});
|
|
10700
11002
|
el.addEventListener('blur', () => {
|
|
10701
|
-
|
|
11003
|
+
removePopoverElement(popover);
|
|
10702
11004
|
});
|
|
10703
11005
|
}
|
|
10704
11006
|
if (trigger.includes('hover')) {
|
|
10705
11007
|
el.addEventListener('mouseenter', () => {
|
|
10706
|
-
|
|
11008
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10707
11009
|
});
|
|
10708
11010
|
el.addEventListener('mouseleave', () => {
|
|
10709
|
-
|
|
11011
|
+
removePopoverElement(popover);
|
|
10710
11012
|
});
|
|
10711
11013
|
}
|
|
10712
11014
|
},
|
|
10713
|
-
|
|
10714
|
-
const
|
|
10715
|
-
|
|
11015
|
+
unmounted(binding) {
|
|
11016
|
+
const popover = binding.arg && document.getElementById(binding.arg);
|
|
11017
|
+
popover && popover.remove();
|
|
10716
11018
|
},
|
|
10717
11019
|
};
|
|
10718
11020
|
|
|
@@ -10722,47 +11024,43 @@ const getUID = (prefix) => {
|
|
|
10722
11024
|
} while (document.getElementById(prefix));
|
|
10723
11025
|
return prefix;
|
|
10724
11026
|
};
|
|
10725
|
-
const
|
|
10726
|
-
const
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
<div class="
|
|
10732
|
-
|
|
10733
|
-
return popover;
|
|
11027
|
+
const createTooltipElement = (id, content) => {
|
|
11028
|
+
const tooltip = document.createElement('div');
|
|
11029
|
+
tooltip.id = id;
|
|
11030
|
+
tooltip.classList.add('tooltip', 'bs-tooltip-auto', 'fade');
|
|
11031
|
+
tooltip.setAttribute('role', 'tooltip');
|
|
11032
|
+
tooltip.innerHTML = `<div class="tooltip-arrow" data-popper-arrow></div>
|
|
11033
|
+
<div class="tooltip-inner" id="">${content}</div>`;
|
|
11034
|
+
return tooltip;
|
|
10734
11035
|
};
|
|
10735
|
-
const
|
|
10736
|
-
document.body.appendChild(
|
|
10737
|
-
createPopper(el,
|
|
11036
|
+
const addTooltipElement = (tooltip, el, popperOptions) => {
|
|
11037
|
+
document.body.appendChild(tooltip);
|
|
11038
|
+
createPopper(el, tooltip, popperOptions);
|
|
10738
11039
|
setTimeout(() => {
|
|
10739
|
-
|
|
11040
|
+
tooltip.classList.add('show');
|
|
10740
11041
|
}, 1);
|
|
10741
11042
|
};
|
|
10742
|
-
const
|
|
10743
|
-
|
|
11043
|
+
const removeTooltipElement = (tooltip) => {
|
|
11044
|
+
tooltip.classList.remove('show');
|
|
10744
11045
|
setTimeout(() => {
|
|
10745
|
-
document.body.removeChild(
|
|
11046
|
+
document.body.removeChild(tooltip);
|
|
10746
11047
|
}, 300);
|
|
10747
11048
|
};
|
|
10748
|
-
const
|
|
10749
|
-
const popperElement = document.getElementById(
|
|
11049
|
+
const toggleTooltipElement = (tooltip, el, popperOptions) => {
|
|
11050
|
+
const popperElement = document.getElementById(tooltip.id);
|
|
10750
11051
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10751
|
-
|
|
11052
|
+
removeTooltipElement(tooltip);
|
|
10752
11053
|
return;
|
|
10753
11054
|
}
|
|
10754
|
-
|
|
11055
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10755
11056
|
};
|
|
10756
|
-
var
|
|
10757
|
-
name: 'c-popover',
|
|
10758
|
-
uid: '',
|
|
11057
|
+
var vctooltip = {
|
|
10759
11058
|
mounted(el, binding) {
|
|
10760
11059
|
const value = binding.value;
|
|
10761
11060
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10762
|
-
const
|
|
10763
|
-
const trigger = value.trigger ? value.trigger : 'click';
|
|
11061
|
+
const trigger = value.trigger ? value.trigger : 'hover';
|
|
10764
11062
|
// Popper Config
|
|
10765
|
-
const offset = value.offset ? value.offset : [0,
|
|
11063
|
+
const offset = value.offset ? value.offset : [0, 0];
|
|
10766
11064
|
const placement = value.placement ? value.placement : 'top';
|
|
10767
11065
|
const popperOptions = {
|
|
10768
11066
|
placement: placement,
|
|
@@ -10775,33 +11073,33 @@ var vcpopover = {
|
|
|
10775
11073
|
},
|
|
10776
11074
|
],
|
|
10777
11075
|
};
|
|
10778
|
-
const
|
|
10779
|
-
binding.arg =
|
|
10780
|
-
const
|
|
11076
|
+
const tooltipUID = getUID('tooltip');
|
|
11077
|
+
binding.arg = tooltipUID;
|
|
11078
|
+
const tooltip = createTooltipElement(tooltipUID, content);
|
|
10781
11079
|
trigger.includes('click') &&
|
|
10782
11080
|
el.addEventListener('click', () => {
|
|
10783
|
-
|
|
11081
|
+
toggleTooltipElement(tooltip, el, popperOptions);
|
|
10784
11082
|
});
|
|
10785
11083
|
if (trigger.includes('focus')) {
|
|
10786
11084
|
el.addEventListener('focus', () => {
|
|
10787
|
-
|
|
11085
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10788
11086
|
});
|
|
10789
11087
|
el.addEventListener('blur', () => {
|
|
10790
|
-
|
|
11088
|
+
removeTooltipElement(tooltip);
|
|
10791
11089
|
});
|
|
10792
11090
|
}
|
|
10793
11091
|
if (trigger.includes('hover')) {
|
|
10794
11092
|
el.addEventListener('mouseenter', () => {
|
|
10795
|
-
|
|
11093
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10796
11094
|
});
|
|
10797
11095
|
el.addEventListener('mouseleave', () => {
|
|
10798
|
-
|
|
11096
|
+
removeTooltipElement(tooltip);
|
|
10799
11097
|
});
|
|
10800
11098
|
}
|
|
10801
11099
|
},
|
|
10802
|
-
|
|
10803
|
-
const
|
|
10804
|
-
|
|
11100
|
+
beforeUnmount(binding) {
|
|
11101
|
+
const tooltip = binding.arg && document.getElementById(binding.arg);
|
|
11102
|
+
tooltip && tooltip.remove();
|
|
10805
11103
|
},
|
|
10806
11104
|
};
|
|
10807
11105
|
|
|
@@ -10828,10 +11126,11 @@ const CoreuiVue = {
|
|
|
10828
11126
|
// for (const directive in pluginDirectives) {
|
|
10829
11127
|
// app.directive(directive, Directives[directive])
|
|
10830
11128
|
// }
|
|
11129
|
+
app.directive('c-placeholder', vcplaceholder);
|
|
10831
11130
|
app.directive('c-popover', vcpopover);
|
|
10832
11131
|
app.directive('c-tooltip', vctooltip);
|
|
10833
11132
|
},
|
|
10834
11133
|
};
|
|
10835
11134
|
|
|
10836
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAccordionPlugin, CAlert, CAlertHeading, CAlertLink, CAlertPlugin, CAvatar, CAvatarPlugin, CBackdrop, CBackdropPlugin, CBadge, CBadgePlugin, CBreadcrumb, CBreadcrumbItem, CBreadcrumbPlugin, CButton, CButtonGroup, CButtonGroupPlugin, CButtonPlugin, CButtonToolbar, CCLinkPlugin, CCallout, CCalloutPlugin, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardPlugin, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCarouselPlugin, CCloseButton, CCloseButtonPlugin, CCol, CCollapse, CCollapsePlugin, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownMenu, CDropdownPlugin, CDropdownToggle, CFooter, CFooterPlugin, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormPlugin, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CGridPlugin, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderPlugin, CHeaderText, CHeaderToggler, CImage, CImagePlugin, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CListGroupPlugin, CLoadingButton, CLoadingButtonPlugin, CModal, CModalBody, CModalFooter, CModalHeader, CModalPlugin, CModalTitle, CMultiSelect, CMultiSelectPlugin, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavPlugin, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarPlugin, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasPlugin, COffcanvasTitle, CPagination, CPaginationItem, CPaginationPlugin, CPopover, CPopoverPlugin, CProgress, CProgressBar, CProgressPlugin, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarPlugin, CSidebarToggler, CSmartPagination, CSmartTable, CSmartTablePlugin, CSpinner, CSpinnerPlugin, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTablePlugin, CTableRow, CTabsPlugin, CToast, CToastBody, CToastClose, CToastHeader, CToastPlugin, CToaster, CTooltip, CTooltipPlugin, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF, CWidgetsStatsPlugin, CoreuiVue as default, vcpopover, vctooltip };
|
|
11135
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAccordionPlugin, CAlert, CAlertHeading, CAlertLink, CAlertPlugin, CAvatar, CAvatarPlugin, CBackdrop, CBackdropPlugin, CBadge, CBadgePlugin, CBreadcrumb, CBreadcrumbItem, CBreadcrumbPlugin, CButton, CButtonGroup, CButtonGroupPlugin, CButtonPlugin, CButtonToolbar, CCLinkPlugin, CCallout, CCalloutPlugin, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardPlugin, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCarouselPlugin, CCloseButton, CCloseButtonPlugin, CCol, CCollapse, CCollapsePlugin, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownMenu, CDropdownPlugin, CDropdownToggle, CElementCover, CElementCoverPlugin, CFooter, CFooterPlugin, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormPlugin, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CGridPlugin, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderPlugin, CHeaderText, CHeaderToggler, CImage, CImagePlugin, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CListGroupPlugin, CLoadingButton, CLoadingButtonPlugin, CModal, CModalBody, CModalFooter, CModalHeader, CModalPlugin, CModalTitle, CMultiSelect, CMultiSelectPlugin, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavPlugin, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarPlugin, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasPlugin, COffcanvasTitle, CPagination, CPaginationItem, CPaginationPlugin, CPlaceholder, CPlaceholderPlugin, CPopover, CPopoverPlugin, CProgress, CProgressBar, CProgressPlugin, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarPlugin, CSidebarToggler, CSmartPagination, CSmartTable, CSmartTablePlugin, CSpinner, CSpinnerPlugin, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTablePlugin, CTableRow, CTabsPlugin, CToast, CToastBody, CToastClose, CToastHeader, CToastPlugin, CToaster, CTooltip, CTooltipPlugin, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF, CWidgetsStatsPlugin, CoreuiVue as default, vcplaceholder, vcpopover, vctooltip };
|
|
10837
11136
|
//# sourceMappingURL=index.es.js.map
|