@coreui/vue-pro 4.0.3 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/accordion/CAccordion.d.ts +18 -10
- package/dist/components/accordion/CAccordionBody.d.ts +1 -1
- package/dist/components/accordion/CAccordionButton.d.ts +1 -1
- package/dist/components/accordion/CAccordionCollapse.d.ts +9 -5
- package/dist/components/accordion/CAccordionHeader.d.ts +1 -1
- package/dist/components/accordion/CAccordionItem.d.ts +10 -5
- package/dist/components/alert/CAlert.d.ts +38 -12
- package/dist/components/alert/CAlertHeading.d.ts +10 -5
- package/dist/components/alert/CAlertLink.d.ts +1 -1
- package/dist/components/avatar/CAvatar.d.ts +59 -15
- package/dist/components/backdrop/CBackdrop.d.ts +10 -5
- package/dist/components/badge/CBadge.d.ts +59 -16
- package/dist/components/breadcrumb/CBreadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/CBreadcrumbItem.d.ts +17 -8
- package/dist/components/button/CButton.d.ts +73 -20
- package/dist/components/button-group/CButtonGroup.d.ts +20 -8
- package/dist/components/button-group/CButtonToolbar.d.ts +1 -1
- package/dist/components/callout/CCallout.d.ts +11 -5
- package/dist/components/card/CCard.d.ts +20 -7
- package/dist/components/card/CCardBody.d.ts +1 -1
- package/dist/components/card/CCardFooter.d.ts +1 -1
- package/dist/components/card/CCardGroup.d.ts +1 -1
- package/dist/components/card/CCardHeader.d.ts +10 -5
- package/dist/components/card/CCardImage.d.ts +21 -8
- package/dist/components/card/CCardImageOverlay.d.ts +1 -1
- package/dist/components/card/CCardLink.d.ts +10 -5
- package/dist/components/card/CCardSubtitle.d.ts +10 -5
- package/dist/components/card/CCardText.d.ts +10 -5
- package/dist/components/card/CCardTitle.d.ts +10 -5
- package/dist/components/carousel/CCarousel.d.ts +58 -19
- package/dist/components/carousel/CCarouselCaption.d.ts +1 -1
- package/dist/components/carousel/CCarouselItem.d.ts +25 -9
- package/dist/components/close-button/CCloseButton.d.ts +16 -7
- package/dist/components/collapse/CCollapse.d.ts +24 -5
- package/dist/components/dropdown/CDropdown.d.ts +82 -22
- package/dist/components/dropdown/CDropdownDivider.d.ts +1 -1
- package/dist/components/dropdown/CDropdownHeader.d.ts +10 -5
- package/dist/components/dropdown/CDropdownItem.d.ts +32 -12
- package/dist/components/dropdown/CDropdownMenu.d.ts +12 -5
- package/dist/components/dropdown/CDropdownToggle.d.ts +78 -22
- package/dist/components/element-cover/CElementCover.d.ts +22 -7
- package/dist/components/element-cover/index.d.ts +6 -0
- package/dist/components/footer/CFooter.d.ts +13 -5
- package/dist/components/form/CForm.d.ts +9 -5
- package/dist/components/form/CFormCheck.d.ts +66 -23
- package/dist/components/form/CFormControl.d.ts +61 -20
- package/dist/components/form/CFormFeedback.d.ts +22 -11
- package/dist/components/form/CFormFloating.d.ts +1 -1
- package/dist/components/form/CFormInput.d.ts +66 -20
- package/dist/components/form/CFormLabel.d.ts +10 -5
- package/dist/components/form/CFormRange.d.ts +59 -18
- package/dist/components/form/CFormSelect.d.ts +66 -18
- package/dist/components/form/CFormSwitch.d.ts +61 -18
- package/dist/components/form/CFormText.d.ts +10 -5
- package/dist/components/form/CFormTextarea.d.ts +45 -16
- package/dist/components/form/CInputGroup.d.ts +13 -5
- package/dist/components/form/CInputGroupText.d.ts +10 -5
- package/dist/components/grid/CCol.d.ts +62 -15
- package/dist/components/grid/CContainer.d.ts +44 -15
- package/dist/components/grid/CRow.d.ts +57 -15
- package/dist/components/header/CHeader.d.ts +24 -7
- package/dist/components/header/CHeaderBrand.d.ts +10 -5
- package/dist/components/header/CHeaderDivider.d.ts +1 -1
- package/dist/components/header/CHeaderNav.d.ts +10 -5
- package/dist/components/header/CHeaderText.d.ts +1 -1
- package/dist/components/header/CHeaderToggler.d.ts +1 -1
- package/dist/components/image/CImage.d.ts +34 -12
- package/dist/components/index.d.ts +2 -0
- package/dist/components/link/CLink.d.ts +32 -12
- package/dist/components/list-group/CListGroup.d.ts +28 -10
- package/dist/components/list-group/CListGroupItem.d.ts +33 -12
- package/dist/components/modal/CModal.d.ts +97 -23
- package/dist/components/modal/CModalBody.d.ts +1 -1
- package/dist/components/modal/CModalFooter.d.ts +1 -1
- package/dist/components/modal/CModalHeader.d.ts +10 -5
- package/dist/components/modal/CModalTitle.d.ts +10 -5
- package/dist/components/multi-select/CMultiSelect.d.ts +131 -30
- package/dist/components/multi-select/CMultiSelectNativeSelect.d.ts +26 -11
- package/dist/components/multi-select/CMultiSelectOptions.d.ts +40 -11
- package/dist/components/multi-select/CMultiSelectSelection.d.ts +47 -13
- package/dist/components/nav/CNav.d.ts +32 -10
- package/dist/components/nav/CNavGroup.d.ts +10 -7
- package/dist/components/nav/CNavGroupItems.d.ts +1 -1
- package/dist/components/nav/CNavLink.d.ts +32 -12
- package/dist/components/nav/CNavTitle.d.ts +1 -1
- package/dist/components/navbar/CNavbar.d.ts +63 -16
- package/dist/components/navbar/CNavbarBrand.d.ts +19 -8
- package/dist/components/navbar/CNavbarNav.d.ts +10 -5
- package/dist/components/navbar/CNavbarText.d.ts +1 -1
- package/dist/components/navbar/CNavbarToggler.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvas.d.ts +44 -14
- package/dist/components/offcanvas/COffcanvasBody.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvasHeader.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvasTitle.d.ts +10 -5
- package/dist/components/pagination/CPagination.d.ts +24 -7
- package/dist/components/pagination/CPaginationItem.d.ts +32 -12
- package/dist/components/pagination/CSmartPagination.d.ts +120 -28
- package/dist/components/placeholder/CPlaceholder.d.ts +189 -0
- package/dist/components/placeholder/index.d.ts +6 -0
- package/dist/components/popover/CPopover.d.ts +51 -17
- package/dist/components/progress/CProgressBar.d.ts +37 -12
- package/dist/components/sidebar/CSidebar.d.ts +59 -20
- package/dist/components/sidebar/CSidebarBrand.d.ts +1 -1
- package/dist/components/sidebar/CSidebarFooter.d.ts +1 -1
- package/dist/components/sidebar/CSidebarHeader.d.ts +1 -1
- package/dist/components/sidebar/CSidebarNav.d.ts +1 -1
- package/dist/components/sidebar/CSidebarToggler.d.ts +1 -1
- package/dist/components/smart-table/CSmartTable.d.ts +281 -69
- package/dist/components/smart-table/CSmartTableBody.d.ts +37 -20
- package/dist/components/smart-table/CSmartTableCleaner.d.ts +7 -5
- package/dist/components/smart-table/CSmartTableFilter.d.ts +17 -9
- package/dist/components/smart-table/CSmartTableHead.d.ts +42 -23
- package/dist/components/smart-table/CSmartTableItemsPerPageSelector.d.ts +17 -10
- package/dist/components/spinner/CSpinner.d.ts +51 -14
- package/dist/components/table/CTable.d.ts +89 -25
- package/dist/components/table/CTableBody.d.ts +11 -5
- package/dist/components/table/CTableCaption.d.ts +2 -4
- package/dist/components/table/CTableDataCell.d.ts +29 -10
- package/dist/components/table/CTableFoot.d.ts +11 -5
- package/dist/components/table/CTableHead.d.ts +11 -5
- package/dist/components/table/CTableHeaderCell.d.ts +11 -5
- package/dist/components/table/CTableRow.d.ts +29 -10
- package/dist/components/tabs/CTabContent.d.ts +1 -1
- package/dist/components/tabs/CTabPane.d.ts +10 -5
- package/dist/components/toast/CToast.d.ts +59 -18
- package/dist/components/toast/CToastBody.d.ts +1 -1
- package/dist/components/toast/CToastHeader.d.ts +9 -5
- package/dist/components/toast/CToaster.d.ts +13 -5
- package/dist/components/tooltip/CTooltip.d.ts +42 -14
- package/dist/components/widgets/CWidgetStatsA.d.ts +23 -10
- package/dist/components/widgets/CWidgetStatsB.d.ts +46 -18
- package/dist/components/widgets/CWidgetStatsC.d.ts +37 -15
- package/dist/components/widgets/CWidgetStatsD.d.ts +19 -8
- package/dist/components/widgets/CWidgetStatsE.d.ts +18 -8
- package/dist/components/widgets/CWidgetStatsF.d.ts +43 -15
- package/dist/directives/index.d.ts +3 -2
- package/dist/directives/v-c-placeholder.d.ts +6 -0
- package/dist/directives/v-c-visible.d.ts +6 -0
- package/dist/index.es.js +760 -455
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +763 -453
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/components/accordion/__tests__/__snapshots__/CAccordionBody.spec.ts.snap +1 -1
- package/src/components/button/CButton.ts +1 -0
- package/src/components/collapse/CCollapse.ts +49 -21
- package/src/components/collapse/__test__/__snapshots__/CCollapse.spec.ts.snap +1 -1
- package/src/components/element-cover/index.ts +10 -0
- package/src/components/form/CFormInput.ts +6 -6
- package/src/components/form/CFormSelect.ts +21 -6
- package/src/components/form/__tests__/__snapshots__/CFormCheck.spec.ts.snap +8 -2
- package/src/components/form/__tests__/__snapshots__/CFormSelect.spec.ts.snap +1 -1
- package/src/components/grid/CCol.ts +8 -8
- package/src/components/grid/CContainer.ts +3 -3
- package/src/components/grid/CRow.ts +6 -6
- package/src/components/index.ts +2 -0
- package/src/components/modal/CModal.ts +68 -40
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.ts.snap +1 -2
- package/src/components/offcanvas/COffcanvas.ts +30 -20
- package/src/components/offcanvas/__tests__/COffcanvas.spec.ts +1 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.ts.snap +2 -2
- package/src/components/placeholder/CPlaceholder.ts +139 -0
- package/src/components/placeholder/__tests__/CPlaceholder.spec.ts +44 -0
- package/src/components/placeholder/__tests__/__snapshots__/CPlaceholder.spec.ts.snap +15 -0
- package/src/components/placeholder/index.ts +10 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebar.spec.ts.snap +2 -8
- package/src/components/smart-table/CSmartTable.ts +38 -36
- package/src/components/smart-table/CSmartTableHead.ts +54 -44
- package/src/directives/index.ts +3 -2
- package/src/directives/v-c-placeholder.ts +32 -0
- package/src/directives/v-c-visible.ts +33 -0
- package/src/index.ts +2 -1
package/dist/index.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,
|
|
@@ -8520,30 +8788,31 @@ const CSmartTableHead = defineComponent({
|
|
|
8520
8788
|
})),
|
|
8521
8789
|
],
|
|
8522
8790
|
}),
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
: typeof column.filter === 'undefined'
|
|
8791
|
+
props.columnFilter &&
|
|
8792
|
+
h$1(CTableRow, {}, {
|
|
8793
|
+
default: () => [
|
|
8794
|
+
props.selectable && h$1(CTableHeaderCell),
|
|
8795
|
+
props.columns.map((column) => h$1(CTableHeaderCell, {
|
|
8796
|
+
...tableHeaderCellProps(column),
|
|
8797
|
+
}, {
|
|
8798
|
+
default: () => (typeof column !== 'object'
|
|
8532
8799
|
? true
|
|
8533
|
-
: column.filter
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8800
|
+
: typeof column.filter === 'undefined'
|
|
8801
|
+
? true
|
|
8802
|
+
: column.filter) &&
|
|
8803
|
+
h$1(CFormInput, {
|
|
8804
|
+
size: 'sm',
|
|
8805
|
+
onInput: (event) => handleFilterInput(key(column), event.target.value),
|
|
8806
|
+
onChange: (event) => handleFilterChange(key(column), event.target.value),
|
|
8807
|
+
'aria-label': `column name: '${label(column)}' filter input`,
|
|
8808
|
+
...(props.columnFilterValue &&
|
|
8809
|
+
props.columnFilterValue[key(column)] && {
|
|
8810
|
+
value: props.columnFilterValue[key(column)],
|
|
8811
|
+
}),
|
|
8542
8812
|
}),
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
}),
|
|
8813
|
+
})),
|
|
8814
|
+
],
|
|
8815
|
+
}),
|
|
8547
8816
|
],
|
|
8548
8817
|
});
|
|
8549
8818
|
},
|
|
@@ -8831,7 +9100,6 @@ const CSmartTable = defineComponent({
|
|
|
8831
9100
|
*/
|
|
8832
9101
|
cleaner: {
|
|
8833
9102
|
type: Boolean,
|
|
8834
|
-
default: true,
|
|
8835
9103
|
required: false,
|
|
8836
9104
|
},
|
|
8837
9105
|
/**
|
|
@@ -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
|
/**
|
|
@@ -8930,7 +9197,6 @@ const CSmartTable = defineComponent({
|
|
|
8930
9197
|
*/
|
|
8931
9198
|
itemsPerPage: {
|
|
8932
9199
|
type: Number,
|
|
8933
|
-
default: 10,
|
|
8934
9200
|
required: false,
|
|
8935
9201
|
},
|
|
8936
9202
|
/**
|
|
@@ -9002,7 +9268,8 @@ const CSmartTable = defineComponent({
|
|
|
9002
9268
|
*/
|
|
9003
9269
|
selectable: Boolean,
|
|
9004
9270
|
/**
|
|
9005
|
-
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes.
|
|
9271
|
+
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. Set .sync modifier to track changes. eg.:
|
|
9272
|
+
* { column: 'status', state: 'asc' }
|
|
9006
9273
|
*
|
|
9007
9274
|
* @type SorterValue
|
|
9008
9275
|
*/
|
|
@@ -9042,7 +9309,6 @@ const CSmartTable = defineComponent({
|
|
|
9042
9309
|
*/
|
|
9043
9310
|
tableFilter: {
|
|
9044
9311
|
type: [Boolean, Object],
|
|
9045
|
-
default: undefined,
|
|
9046
9312
|
required: false,
|
|
9047
9313
|
},
|
|
9048
9314
|
/**
|
|
@@ -9164,6 +9430,7 @@ const CSmartTable = defineComponent({
|
|
|
9164
9430
|
const selectedAll = ref();
|
|
9165
9431
|
watch(items, () => {
|
|
9166
9432
|
const selected = items.value.filter((item) => item._selected === true);
|
|
9433
|
+
emit('selectedItemsChange', selected);
|
|
9167
9434
|
if (selected.length === items.value.length) {
|
|
9168
9435
|
selectedAll.value = true;
|
|
9169
9436
|
return;
|
|
@@ -9175,9 +9442,8 @@ const CSmartTable = defineComponent({
|
|
|
9175
9442
|
if (selected.length !== 0 && selected.length !== items.value.length) {
|
|
9176
9443
|
selectedAll.value = 'indeterminate';
|
|
9177
9444
|
}
|
|
9178
|
-
emit('selectedItemsChange', selected);
|
|
9179
9445
|
});
|
|
9180
|
-
const itemsPerPage = ref(props.itemsPerPage);
|
|
9446
|
+
const itemsPerPage = ref(props.itemsPerPage || items.value.length);
|
|
9181
9447
|
const activePage = ref(props.activePage);
|
|
9182
9448
|
const sorterState = reactive(props.sorterValue || {});
|
|
9183
9449
|
const columnFilterState = ref(props.columnFilterValue ? props.columnFilterValue : {});
|
|
@@ -9215,7 +9481,12 @@ const CSmartTable = defineComponent({
|
|
|
9215
9481
|
state.state = 'desc';
|
|
9216
9482
|
}
|
|
9217
9483
|
else {
|
|
9218
|
-
|
|
9484
|
+
if (typeof props.columnSorter === 'object' && !props.columnSorter.resetable) {
|
|
9485
|
+
state.state = 'asc';
|
|
9486
|
+
}
|
|
9487
|
+
else {
|
|
9488
|
+
state.state = 0;
|
|
9489
|
+
}
|
|
9219
9490
|
}
|
|
9220
9491
|
}
|
|
9221
9492
|
else {
|
|
@@ -9356,22 +9627,25 @@ const CSmartTable = defineComponent({
|
|
|
9356
9627
|
Object.values(columnFilterState.value).join(''));
|
|
9357
9628
|
});
|
|
9358
9629
|
return () => h$1('div', {}, [
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9630
|
+
(props.tableFilter || props.cleaner) &&
|
|
9631
|
+
h$1('div', {
|
|
9632
|
+
class: 'row my-2 mx-0',
|
|
9633
|
+
}, [
|
|
9634
|
+
props.tableFilter &&
|
|
9635
|
+
h$1('div', {
|
|
9636
|
+
class: 'col-auto p-0',
|
|
9637
|
+
}, props.tableFilter &&
|
|
9638
|
+
h$1(CSmartTableFilter, {
|
|
9639
|
+
filterLabel: props.tableFilterLabel,
|
|
9640
|
+
filterPlaceholder: props.tableFilterPlaceholder,
|
|
9641
|
+
onFilterInput: (value) => tableFilterChange(value, 'input'),
|
|
9642
|
+
onFilterChange: (value) => tableFilterChange(value, 'change'),
|
|
9643
|
+
value: tableFilterState.value,
|
|
9644
|
+
})),
|
|
9645
|
+
props.cleaner &&
|
|
9646
|
+
h$1('div', {
|
|
9647
|
+
class: 'col-auto p-0',
|
|
9648
|
+
}, h$1(CSmartTableCleaner, {
|
|
9375
9649
|
onClick: () => clean(),
|
|
9376
9650
|
isFiltered: isFiltered.value,
|
|
9377
9651
|
}, {
|
|
@@ -9380,8 +9654,7 @@ const CSmartTable = defineComponent({
|
|
|
9380
9654
|
? slots.cleanerIcon()
|
|
9381
9655
|
: h$1(CIcon, { width: '18', content: cilFilterX }),
|
|
9382
9656
|
})),
|
|
9383
|
-
],
|
|
9384
|
-
}),
|
|
9657
|
+
]),
|
|
9385
9658
|
h$1('div', {
|
|
9386
9659
|
class: 'position-relative',
|
|
9387
9660
|
}, {
|
|
@@ -9394,7 +9667,8 @@ const CSmartTable = defineComponent({
|
|
|
9394
9667
|
h$1(CSmartTableHead, {
|
|
9395
9668
|
component: 'head',
|
|
9396
9669
|
...props.tableHeadProps,
|
|
9397
|
-
columnFilter:
|
|
9670
|
+
columnFilter: props.columnFilter,
|
|
9671
|
+
columnFilterValue: columnFilterState.value,
|
|
9398
9672
|
columns: props.columns,
|
|
9399
9673
|
columnSorter: props.columnSorter,
|
|
9400
9674
|
selectable: props.selectable,
|
|
@@ -10516,6 +10790,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10516
10790
|
CDropdownDivider: CDropdownDivider,
|
|
10517
10791
|
CDropdownMenu: CDropdownMenu,
|
|
10518
10792
|
CDropdownToggle: CDropdownToggle,
|
|
10793
|
+
CElementCoverPlugin: CElementCoverPlugin,
|
|
10794
|
+
CElementCover: CElementCover,
|
|
10519
10795
|
CFooterPlugin: CFooterPlugin,
|
|
10520
10796
|
CFooter: CFooter,
|
|
10521
10797
|
CFormPlugin: CFormPlugin,
|
|
@@ -10582,6 +10858,8 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10582
10858
|
CPagination: CPagination,
|
|
10583
10859
|
CPaginationItem: CPaginationItem,
|
|
10584
10860
|
CSmartPagination: CSmartPagination,
|
|
10861
|
+
CPlaceholderPlugin: CPlaceholderPlugin,
|
|
10862
|
+
CPlaceholder: CPlaceholder,
|
|
10585
10863
|
CProgressPlugin: CProgressPlugin,
|
|
10586
10864
|
CProgress: CProgress,
|
|
10587
10865
|
CProgressBar: CProgressBar,
|
|
@@ -10627,49 +10905,79 @@ var Components = /*#__PURE__*/Object.freeze({
|
|
|
10627
10905
|
CWidgetStatsF: CWidgetStatsF
|
|
10628
10906
|
});
|
|
10629
10907
|
|
|
10908
|
+
const BREAKPOINTS = [
|
|
10909
|
+
'xxl',
|
|
10910
|
+
'xl',
|
|
10911
|
+
'lg',
|
|
10912
|
+
'md',
|
|
10913
|
+
'sm',
|
|
10914
|
+
'xs',
|
|
10915
|
+
];
|
|
10916
|
+
var vcplaceholder = {
|
|
10917
|
+
name: 'c-placeholder',
|
|
10918
|
+
mounted(el, binding) {
|
|
10919
|
+
const value = binding.value;
|
|
10920
|
+
el.classList.add(value.animation ? `placeholder-${value.animation}` : 'placeholder');
|
|
10921
|
+
BREAKPOINTS.forEach((bp) => {
|
|
10922
|
+
const breakpoint = value[bp];
|
|
10923
|
+
const infix = bp === 'xs' ? '' : `-${bp}`;
|
|
10924
|
+
if (typeof breakpoint === 'number') {
|
|
10925
|
+
el.classList.add(`col${infix}-${breakpoint}`);
|
|
10926
|
+
}
|
|
10927
|
+
if (typeof breakpoint === 'boolean') {
|
|
10928
|
+
el.classList.add(`col${infix}`);
|
|
10929
|
+
}
|
|
10930
|
+
});
|
|
10931
|
+
},
|
|
10932
|
+
};
|
|
10933
|
+
|
|
10630
10934
|
const getUID$1 = (prefix) => {
|
|
10631
10935
|
do {
|
|
10632
10936
|
prefix += Math.floor(Math.random() * 1000000);
|
|
10633
10937
|
} while (document.getElementById(prefix));
|
|
10634
10938
|
return prefix;
|
|
10635
10939
|
};
|
|
10636
|
-
const
|
|
10637
|
-
const
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
<div class="
|
|
10643
|
-
|
|
10940
|
+
const createPopoverElement = (id, header, content) => {
|
|
10941
|
+
const popover = document.createElement('div');
|
|
10942
|
+
popover.id = id;
|
|
10943
|
+
popover.classList.add('popover', 'bs-popover-auto', 'fade');
|
|
10944
|
+
popover.setAttribute('role', 'popover');
|
|
10945
|
+
popover.innerHTML = `<div class="popover-arrow" data-popper-arrow></div>
|
|
10946
|
+
<div class="popover-header">${header}</div>
|
|
10947
|
+
<div class="popover-body" id="">${content}</div>`;
|
|
10948
|
+
return popover;
|
|
10644
10949
|
};
|
|
10645
|
-
const
|
|
10646
|
-
document.body.appendChild(
|
|
10647
|
-
createPopper(el,
|
|
10950
|
+
const addPopoverElement = (popover, el, popperOptions) => {
|
|
10951
|
+
document.body.appendChild(popover);
|
|
10952
|
+
createPopper(el, popover, popperOptions);
|
|
10648
10953
|
setTimeout(() => {
|
|
10649
|
-
|
|
10954
|
+
popover.classList.add('show');
|
|
10650
10955
|
}, 1);
|
|
10651
10956
|
};
|
|
10652
|
-
const
|
|
10653
|
-
|
|
10957
|
+
const removePopoverElement = (popover) => {
|
|
10958
|
+
popover.classList.remove('show');
|
|
10654
10959
|
setTimeout(() => {
|
|
10655
|
-
document.body.removeChild(
|
|
10960
|
+
document.body.removeChild(popover);
|
|
10656
10961
|
}, 300);
|
|
10657
10962
|
};
|
|
10658
|
-
const
|
|
10659
|
-
const popperElement = document.getElementById(
|
|
10963
|
+
const togglePopoverElement = (popover, el, popperOptions) => {
|
|
10964
|
+
const popperElement = document.getElementById(popover.id);
|
|
10660
10965
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10661
|
-
|
|
10966
|
+
removePopoverElement(popover);
|
|
10662
10967
|
return;
|
|
10663
10968
|
}
|
|
10664
|
-
|
|
10969
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10665
10970
|
};
|
|
10666
|
-
var
|
|
10971
|
+
var vcpopover = {
|
|
10972
|
+
name: 'c-popover',
|
|
10973
|
+
uid: '',
|
|
10667
10974
|
mounted(el, binding) {
|
|
10668
10975
|
const value = binding.value;
|
|
10669
10976
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10670
|
-
const
|
|
10977
|
+
const header = value.header ? value.header : '';
|
|
10978
|
+
const trigger = value.trigger ? value.trigger : 'click';
|
|
10671
10979
|
// Popper Config
|
|
10672
|
-
const offset = value.offset ? value.offset : [0,
|
|
10980
|
+
const offset = value.offset ? value.offset : [0, 8];
|
|
10673
10981
|
const placement = value.placement ? value.placement : 'top';
|
|
10674
10982
|
const popperOptions = {
|
|
10675
10983
|
placement: placement,
|
|
@@ -10682,33 +10990,33 @@ var vctooltip = {
|
|
|
10682
10990
|
},
|
|
10683
10991
|
],
|
|
10684
10992
|
};
|
|
10685
|
-
const
|
|
10686
|
-
binding.arg =
|
|
10687
|
-
const
|
|
10993
|
+
const popoverUID = getUID$1('popover');
|
|
10994
|
+
binding.arg = popoverUID;
|
|
10995
|
+
const popover = createPopoverElement(popoverUID, header, content);
|
|
10688
10996
|
trigger.includes('click') &&
|
|
10689
10997
|
el.addEventListener('click', () => {
|
|
10690
|
-
|
|
10998
|
+
togglePopoverElement(popover, el, popperOptions);
|
|
10691
10999
|
});
|
|
10692
11000
|
if (trigger.includes('focus')) {
|
|
10693
11001
|
el.addEventListener('focus', () => {
|
|
10694
|
-
|
|
11002
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10695
11003
|
});
|
|
10696
11004
|
el.addEventListener('blur', () => {
|
|
10697
|
-
|
|
11005
|
+
removePopoverElement(popover);
|
|
10698
11006
|
});
|
|
10699
11007
|
}
|
|
10700
11008
|
if (trigger.includes('hover')) {
|
|
10701
11009
|
el.addEventListener('mouseenter', () => {
|
|
10702
|
-
|
|
11010
|
+
addPopoverElement(popover, el, popperOptions);
|
|
10703
11011
|
});
|
|
10704
11012
|
el.addEventListener('mouseleave', () => {
|
|
10705
|
-
|
|
11013
|
+
removePopoverElement(popover);
|
|
10706
11014
|
});
|
|
10707
11015
|
}
|
|
10708
11016
|
},
|
|
10709
|
-
|
|
10710
|
-
const
|
|
10711
|
-
|
|
11017
|
+
unmounted(binding) {
|
|
11018
|
+
const popover = binding.arg && document.getElementById(binding.arg);
|
|
11019
|
+
popover && popover.remove();
|
|
10712
11020
|
},
|
|
10713
11021
|
};
|
|
10714
11022
|
|
|
@@ -10718,47 +11026,43 @@ const getUID = (prefix) => {
|
|
|
10718
11026
|
} while (document.getElementById(prefix));
|
|
10719
11027
|
return prefix;
|
|
10720
11028
|
};
|
|
10721
|
-
const
|
|
10722
|
-
const
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
<div class="
|
|
10728
|
-
|
|
10729
|
-
return popover;
|
|
11029
|
+
const createTooltipElement = (id, content) => {
|
|
11030
|
+
const tooltip = document.createElement('div');
|
|
11031
|
+
tooltip.id = id;
|
|
11032
|
+
tooltip.classList.add('tooltip', 'bs-tooltip-auto', 'fade');
|
|
11033
|
+
tooltip.setAttribute('role', 'tooltip');
|
|
11034
|
+
tooltip.innerHTML = `<div class="tooltip-arrow" data-popper-arrow></div>
|
|
11035
|
+
<div class="tooltip-inner" id="">${content}</div>`;
|
|
11036
|
+
return tooltip;
|
|
10730
11037
|
};
|
|
10731
|
-
const
|
|
10732
|
-
document.body.appendChild(
|
|
10733
|
-
createPopper(el,
|
|
11038
|
+
const addTooltipElement = (tooltip, el, popperOptions) => {
|
|
11039
|
+
document.body.appendChild(tooltip);
|
|
11040
|
+
createPopper(el, tooltip, popperOptions);
|
|
10734
11041
|
setTimeout(() => {
|
|
10735
|
-
|
|
11042
|
+
tooltip.classList.add('show');
|
|
10736
11043
|
}, 1);
|
|
10737
11044
|
};
|
|
10738
|
-
const
|
|
10739
|
-
|
|
11045
|
+
const removeTooltipElement = (tooltip) => {
|
|
11046
|
+
tooltip.classList.remove('show');
|
|
10740
11047
|
setTimeout(() => {
|
|
10741
|
-
document.body.removeChild(
|
|
11048
|
+
document.body.removeChild(tooltip);
|
|
10742
11049
|
}, 300);
|
|
10743
11050
|
};
|
|
10744
|
-
const
|
|
10745
|
-
const popperElement = document.getElementById(
|
|
11051
|
+
const toggleTooltipElement = (tooltip, el, popperOptions) => {
|
|
11052
|
+
const popperElement = document.getElementById(tooltip.id);
|
|
10746
11053
|
if (popperElement && popperElement.classList.contains('show')) {
|
|
10747
|
-
|
|
11054
|
+
removeTooltipElement(tooltip);
|
|
10748
11055
|
return;
|
|
10749
11056
|
}
|
|
10750
|
-
|
|
11057
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10751
11058
|
};
|
|
10752
|
-
var
|
|
10753
|
-
name: 'c-popover',
|
|
10754
|
-
uid: '',
|
|
11059
|
+
var vctooltip = {
|
|
10755
11060
|
mounted(el, binding) {
|
|
10756
11061
|
const value = binding.value;
|
|
10757
11062
|
const content = typeof value === 'string' ? value : value.content ? value.content : '';
|
|
10758
|
-
const
|
|
10759
|
-
const trigger = value.trigger ? value.trigger : 'click';
|
|
11063
|
+
const trigger = value.trigger ? value.trigger : 'hover';
|
|
10760
11064
|
// Popper Config
|
|
10761
|
-
const offset = value.offset ? value.offset : [0,
|
|
11065
|
+
const offset = value.offset ? value.offset : [0, 0];
|
|
10762
11066
|
const placement = value.placement ? value.placement : 'top';
|
|
10763
11067
|
const popperOptions = {
|
|
10764
11068
|
placement: placement,
|
|
@@ -10771,33 +11075,33 @@ var vcpopover = {
|
|
|
10771
11075
|
},
|
|
10772
11076
|
],
|
|
10773
11077
|
};
|
|
10774
|
-
const
|
|
10775
|
-
binding.arg =
|
|
10776
|
-
const
|
|
11078
|
+
const tooltipUID = getUID('tooltip');
|
|
11079
|
+
binding.arg = tooltipUID;
|
|
11080
|
+
const tooltip = createTooltipElement(tooltipUID, content);
|
|
10777
11081
|
trigger.includes('click') &&
|
|
10778
11082
|
el.addEventListener('click', () => {
|
|
10779
|
-
|
|
11083
|
+
toggleTooltipElement(tooltip, el, popperOptions);
|
|
10780
11084
|
});
|
|
10781
11085
|
if (trigger.includes('focus')) {
|
|
10782
11086
|
el.addEventListener('focus', () => {
|
|
10783
|
-
|
|
11087
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10784
11088
|
});
|
|
10785
11089
|
el.addEventListener('blur', () => {
|
|
10786
|
-
|
|
11090
|
+
removeTooltipElement(tooltip);
|
|
10787
11091
|
});
|
|
10788
11092
|
}
|
|
10789
11093
|
if (trigger.includes('hover')) {
|
|
10790
11094
|
el.addEventListener('mouseenter', () => {
|
|
10791
|
-
|
|
11095
|
+
addTooltipElement(tooltip, el, popperOptions);
|
|
10792
11096
|
});
|
|
10793
11097
|
el.addEventListener('mouseleave', () => {
|
|
10794
|
-
|
|
11098
|
+
removeTooltipElement(tooltip);
|
|
10795
11099
|
});
|
|
10796
11100
|
}
|
|
10797
11101
|
},
|
|
10798
|
-
|
|
10799
|
-
const
|
|
10800
|
-
|
|
11102
|
+
beforeUnmount(binding) {
|
|
11103
|
+
const tooltip = binding.arg && document.getElementById(binding.arg);
|
|
11104
|
+
tooltip && tooltip.remove();
|
|
10801
11105
|
},
|
|
10802
11106
|
};
|
|
10803
11107
|
|
|
@@ -10824,10 +11128,11 @@ const CoreuiVue = {
|
|
|
10824
11128
|
// for (const directive in pluginDirectives) {
|
|
10825
11129
|
// app.directive(directive, Directives[directive])
|
|
10826
11130
|
// }
|
|
11131
|
+
app.directive('c-placeholder', vcplaceholder);
|
|
10827
11132
|
app.directive('c-popover', vcpopover);
|
|
10828
11133
|
app.directive('c-tooltip', vctooltip);
|
|
10829
11134
|
},
|
|
10830
11135
|
};
|
|
10831
11136
|
|
|
10832
|
-
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 };
|
|
11137
|
+
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 };
|
|
10833
11138
|
//# sourceMappingURL=index.es.js.map
|