@coreui/vue-pro 4.7.0 → 4.8.0-next.1
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/dist/components/calendar/utils.d.ts +23 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/modal/CModal.d.ts +4 -20
- package/dist/components/multi-select/CMultiSelect.d.ts +35 -44
- package/dist/components/multi-select/CMultiSelectNativeSelect.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelectOptions.d.ts +13 -11
- package/dist/components/multi-select/CMultiSelectSelection.d.ts +1 -1
- package/dist/components/multi-select/types.d.ts +14 -0
- package/dist/components/multi-select/utils.d.ts +6 -0
- package/dist/components/offcanvas/COffcanvas.d.ts +35 -18
- package/dist/components/smart-table/CSmartTable.d.ts +65 -87
- package/dist/components/smart-table/CSmartTableBody.d.ts +16 -40
- package/dist/components/smart-table/CSmartTableHead.d.ts +17 -58
- package/dist/components/smart-table/CSmartTableInterface.d.ts +1 -1
- package/dist/components/smart-table/types.d.ts +50 -0
- package/dist/components/smart-table/utils.d.ts +17 -0
- package/dist/components/table/CTable.d.ts +1 -1
- package/dist/components/time-picker/types.d.ts +15 -0
- package/dist/components/time-picker/utils.d.ts +23 -0
- package/dist/components/virtual-scroller/CVirtualScroller.d.ts +23 -0
- package/dist/components/virtual-scroller/index.d.ts +6 -0
- package/dist/index.es.js +943 -885
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +943 -883
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -3
- package/dist/utils/isObjectInArray.d.ts +2 -0
- package/package.json +6 -6
- package/src/components/calendar/CCalendar.ts +1 -1
- package/src/{utils/calendar.ts → components/calendar/utils.ts} +1 -1
- package/src/components/date-range-picker/CDateRangePicker.ts +1 -1
- package/src/components/element-cover/CElementCover.ts +14 -14
- package/src/components/index.ts +1 -0
- package/src/components/modal/CModal.ts +10 -10
- package/src/components/multi-select/CMultiSelect.ts +33 -99
- package/src/components/multi-select/CMultiSelectNativeSelect.ts +2 -1
- package/src/components/multi-select/CMultiSelectOptions.ts +31 -17
- package/src/components/multi-select/CMultiSelectSelection.ts +2 -1
- package/src/components/multi-select/types.ts +15 -0
- package/src/components/multi-select/utils.ts +92 -0
- package/src/components/offcanvas/COffcanvas.ts +50 -28
- package/src/components/smart-table/CSmartTable.ts +365 -268
- package/src/components/smart-table/CSmartTableBody.ts +126 -137
- package/src/components/smart-table/CSmartTableHead.ts +53 -138
- package/src/components/smart-table/CSmartTableInterface.ts +1 -1
- package/src/components/smart-table/types.ts +61 -0
- package/src/components/smart-table/utils.ts +212 -0
- package/src/components/time-picker/CTimePicker.ts +49 -27
- package/src/components/time-picker/types.ts +15 -0
- package/src/{utils/time.ts → components/time-picker/utils.ts} +43 -2
- package/src/components/virtual-scroller/CVirtualScroller.ts +109 -0
- package/src/components/virtual-scroller/index.ts +10 -0
- package/src/utils/index.ts +1 -3
- package/src/utils/getNextSibling.ts +0 -18
- package/src/utils/getPreviousSibling.ts +0 -18
|
@@ -2,11 +2,13 @@ import { RendererElement } from 'vue';
|
|
|
2
2
|
declare const COffcanvas: import("vue").DefineComponent<{
|
|
3
3
|
/**
|
|
4
4
|
* Apply a backdrop on body while offcanvas is open.
|
|
5
|
+
*
|
|
6
|
+
* @values boolean | 'static'
|
|
5
7
|
*/
|
|
6
8
|
backdrop: {
|
|
7
|
-
type: BooleanConstructor;
|
|
9
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
8
10
|
default: boolean;
|
|
9
|
-
|
|
11
|
+
validator: (value: boolean | string) => boolean;
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
14
|
* Closes the offcanvas when escape key is pressed.
|
|
@@ -14,7 +16,6 @@ declare const COffcanvas: import("vue").DefineComponent<{
|
|
|
14
16
|
keyboard: {
|
|
15
17
|
type: BooleanConstructor;
|
|
16
18
|
default: boolean;
|
|
17
|
-
require: boolean;
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
21
|
* Components placement, there’s no default placement.
|
|
@@ -27,31 +28,40 @@ declare const COffcanvas: import("vue").DefineComponent<{
|
|
|
27
28
|
require: boolean;
|
|
28
29
|
validator: (value: string) => boolean;
|
|
29
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down.
|
|
33
|
+
*
|
|
34
|
+
* @values boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
|
|
35
|
+
* @since 4.7.0
|
|
36
|
+
*/
|
|
37
|
+
responsive: {
|
|
38
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
39
|
+
default: boolean;
|
|
40
|
+
validator: (value: boolean | string) => boolean;
|
|
41
|
+
};
|
|
30
42
|
/**
|
|
31
43
|
* Allow body scrolling while offcanvas is open
|
|
32
44
|
*/
|
|
33
45
|
scroll: {
|
|
34
46
|
type: BooleanConstructor;
|
|
35
47
|
default: boolean;
|
|
36
|
-
required: false;
|
|
37
48
|
};
|
|
38
49
|
/**
|
|
39
50
|
* Toggle the visibility of offcanvas component.
|
|
40
51
|
*/
|
|
41
|
-
visible:
|
|
42
|
-
|
|
43
|
-
require: boolean;
|
|
44
|
-
};
|
|
45
|
-
}, () => (false | import("vue").VNode<import("vue").RendererNode, RendererElement, {
|
|
52
|
+
visible: BooleanConstructor;
|
|
53
|
+
}, () => (false | "" | import("vue").VNode<import("vue").RendererNode, RendererElement, {
|
|
46
54
|
[key: string]: any;
|
|
47
55
|
}>)[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show")[], "hide" | "show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
56
|
/**
|
|
49
57
|
* Apply a backdrop on body while offcanvas is open.
|
|
58
|
+
*
|
|
59
|
+
* @values boolean | 'static'
|
|
50
60
|
*/
|
|
51
61
|
backdrop: {
|
|
52
|
-
type: BooleanConstructor;
|
|
62
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
53
63
|
default: boolean;
|
|
54
|
-
|
|
64
|
+
validator: (value: boolean | string) => boolean;
|
|
55
65
|
};
|
|
56
66
|
/**
|
|
57
67
|
* Closes the offcanvas when escape key is pressed.
|
|
@@ -59,7 +69,6 @@ declare const COffcanvas: import("vue").DefineComponent<{
|
|
|
59
69
|
keyboard: {
|
|
60
70
|
type: BooleanConstructor;
|
|
61
71
|
default: boolean;
|
|
62
|
-
require: boolean;
|
|
63
72
|
};
|
|
64
73
|
/**
|
|
65
74
|
* Components placement, there’s no default placement.
|
|
@@ -72,21 +81,28 @@ declare const COffcanvas: import("vue").DefineComponent<{
|
|
|
72
81
|
require: boolean;
|
|
73
82
|
validator: (value: string) => boolean;
|
|
74
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down.
|
|
86
|
+
*
|
|
87
|
+
* @values boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
|
|
88
|
+
* @since 4.7.0
|
|
89
|
+
*/
|
|
90
|
+
responsive: {
|
|
91
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
92
|
+
default: boolean;
|
|
93
|
+
validator: (value: boolean | string) => boolean;
|
|
94
|
+
};
|
|
75
95
|
/**
|
|
76
96
|
* Allow body scrolling while offcanvas is open
|
|
77
97
|
*/
|
|
78
98
|
scroll: {
|
|
79
99
|
type: BooleanConstructor;
|
|
80
100
|
default: boolean;
|
|
81
|
-
required: false;
|
|
82
101
|
};
|
|
83
102
|
/**
|
|
84
103
|
* Toggle the visibility of offcanvas component.
|
|
85
104
|
*/
|
|
86
|
-
visible:
|
|
87
|
-
type: BooleanConstructor;
|
|
88
|
-
require: boolean;
|
|
89
|
-
};
|
|
105
|
+
visible: BooleanConstructor;
|
|
90
106
|
}>> & {
|
|
91
107
|
onHide?: ((...args: any[]) => any) | undefined;
|
|
92
108
|
onShow?: ((...args: any[]) => any) | undefined;
|
|
@@ -94,7 +110,8 @@ declare const COffcanvas: import("vue").DefineComponent<{
|
|
|
94
110
|
scroll: boolean;
|
|
95
111
|
visible: boolean;
|
|
96
112
|
placement: string;
|
|
97
|
-
backdrop: boolean;
|
|
113
|
+
backdrop: string | boolean;
|
|
98
114
|
keyboard: boolean;
|
|
115
|
+
responsive: string | boolean;
|
|
99
116
|
}>;
|
|
100
117
|
export { COffcanvas };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { Column, ColumnFilter, ColumnFilterValue, Item, ItemsPerPageSelect, FooterItem, Pagination, Sorter, SorterValue, TableFilter } from './
|
|
2
|
+
import type { Column, ColumnFilter, ColumnFilterValue, Item, ItemsPerPageSelect, FooterItem, Pagination, Sorter, SorterValue, TableFilter } from './types';
|
|
3
3
|
declare const CSmartTable: import("vue").DefineComponent<{
|
|
4
4
|
/**
|
|
5
5
|
* Sets active page. If 'pagination' prop is enabled, activePage is set only initially.
|
|
@@ -7,7 +7,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
7
7
|
activePage: {
|
|
8
8
|
type: NumberConstructor;
|
|
9
9
|
default: number;
|
|
10
|
-
required: false;
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
12
|
* When set, displays table cleaner above table, next to the table filter (or in place of table filter if `tableFilter` prop is not set)
|
|
@@ -16,14 +15,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
16
15
|
*/
|
|
17
16
|
cleaner: {
|
|
18
17
|
type: BooleanConstructor;
|
|
19
|
-
required: false;
|
|
20
18
|
};
|
|
21
19
|
/**
|
|
22
20
|
* Style table items as clickable.
|
|
23
21
|
*/
|
|
24
22
|
clickableRows: {
|
|
25
23
|
type: BooleanConstructor;
|
|
26
|
-
required: false;
|
|
27
24
|
};
|
|
28
25
|
/**
|
|
29
26
|
* When set, displays additional filter row between table header and items, allowing filtering by specific column.
|
|
@@ -33,7 +30,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
33
30
|
*/
|
|
34
31
|
columnFilter: {
|
|
35
32
|
type: PropType<boolean | ColumnFilter>;
|
|
36
|
-
required: false;
|
|
37
33
|
};
|
|
38
34
|
/**
|
|
39
35
|
* Value of table filter. To set pass object where keys are column names and values are filter strings e.g.:
|
|
@@ -41,8 +37,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
41
37
|
*/
|
|
42
38
|
columnFilterValue: {
|
|
43
39
|
type: PropType<ColumnFilterValue>;
|
|
44
|
-
default: undefined;
|
|
45
|
-
required: false;
|
|
46
40
|
};
|
|
47
41
|
/**
|
|
48
42
|
* Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_props')
|
|
@@ -59,7 +53,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
59
53
|
*/
|
|
60
54
|
columns: {
|
|
61
55
|
type: PropType<(string | Column)[]>;
|
|
62
|
-
required: false;
|
|
63
56
|
};
|
|
64
57
|
/**
|
|
65
58
|
* Enables table sorting by column value. Sorting will be performed corectly only if values in column are of one type: string (case insensitive) or number.
|
|
@@ -70,8 +63,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
70
63
|
*/
|
|
71
64
|
columnSorter: {
|
|
72
65
|
type: PropType<boolean | Sorter>;
|
|
73
|
-
default: undefined;
|
|
74
|
-
required: false;
|
|
75
66
|
};
|
|
76
67
|
/**
|
|
77
68
|
* If `true` Displays table footer, which mirrors table header. (without column filter).
|
|
@@ -84,14 +75,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
84
75
|
*/
|
|
85
76
|
footer: {
|
|
86
77
|
type: PropType<boolean | (string | FooterItem)[]>;
|
|
87
|
-
required: false;
|
|
88
78
|
};
|
|
89
79
|
/**
|
|
90
80
|
* Set to false to remove table header.
|
|
91
81
|
*/
|
|
92
82
|
header: {
|
|
93
83
|
type: BooleanConstructor;
|
|
94
|
-
required: false;
|
|
95
84
|
default: boolean;
|
|
96
85
|
};
|
|
97
86
|
/**
|
|
@@ -104,22 +93,25 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
104
93
|
items: {
|
|
105
94
|
type: PropType<Item[]>;
|
|
106
95
|
default: () => never[];
|
|
107
|
-
required: false;
|
|
108
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* The total number of items. Use if you pass a portion of data from an external source to let know component what is the total number of items.
|
|
99
|
+
*
|
|
100
|
+
* @since 4.8.0
|
|
101
|
+
*/
|
|
102
|
+
itemsNumber: NumberConstructor;
|
|
109
103
|
/**
|
|
110
104
|
* Number of items per site, when pagination is enabled.
|
|
111
105
|
*/
|
|
112
106
|
itemsPerPage: {
|
|
113
107
|
type: NumberConstructor;
|
|
114
108
|
default: number;
|
|
115
|
-
required: false;
|
|
116
109
|
};
|
|
117
110
|
/**
|
|
118
111
|
* Label for items per page selector.
|
|
119
112
|
*/
|
|
120
113
|
itemsPerPageLabel: {
|
|
121
114
|
type: StringConstructor;
|
|
122
|
-
required: false;
|
|
123
115
|
default: string;
|
|
124
116
|
};
|
|
125
117
|
/**
|
|
@@ -128,7 +120,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
128
120
|
itemsPerPageOptions: {
|
|
129
121
|
type: PropType<number[]>;
|
|
130
122
|
default: () => number[];
|
|
131
|
-
required: false;
|
|
132
123
|
};
|
|
133
124
|
/**
|
|
134
125
|
* Adds select element over table, which is used for control items per page in pagination. If you want to customize this element, pass object with optional values:
|
|
@@ -138,15 +129,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
138
129
|
*/
|
|
139
130
|
itemsPerPageSelect: {
|
|
140
131
|
type: PropType<boolean | ItemsPerPageSelect>;
|
|
141
|
-
default: undefined;
|
|
142
|
-
required: false;
|
|
143
132
|
};
|
|
144
133
|
/**
|
|
145
134
|
* When set, table will have loading style: loading spinner and reduced opacity. When 'small' prop is enabled spinner will be also smaller.
|
|
146
135
|
*/
|
|
147
136
|
loading: {
|
|
148
137
|
type: BooleanConstructor;
|
|
149
|
-
required: false;
|
|
150
138
|
};
|
|
151
139
|
/**
|
|
152
140
|
* ReactNode or string for passing custom noItemsLabel texts.
|
|
@@ -154,51 +142,65 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
154
142
|
noItemsLabel: {
|
|
155
143
|
type: StringConstructor;
|
|
156
144
|
default: string;
|
|
157
|
-
required: false;
|
|
158
145
|
};
|
|
159
146
|
/**
|
|
160
147
|
* Enables default pagination. Set to true for default setup or pass an object with additional CPagination props. Default pagination will always have the computed number of pages that cannot be changed. The number of pages is generated based on the number of passed items and 'itemsPerPage' prop. If this restriction is an obstacle, you can make external CPagination instead.
|
|
161
148
|
*/
|
|
162
149
|
pagination: {
|
|
163
150
|
type: PropType<boolean | Pagination>;
|
|
164
|
-
required: false;
|
|
165
151
|
};
|
|
166
152
|
/**
|
|
167
153
|
* Properties to [CSmartPagination](https://coreui.io/vue/docs/components/smart-pagination#csmartpagination) component.
|
|
168
154
|
*/
|
|
169
155
|
paginationProps: {
|
|
170
156
|
type: ObjectConstructor;
|
|
171
|
-
default: undefined;
|
|
172
|
-
required: false;
|
|
173
157
|
};
|
|
174
158
|
/**
|
|
175
159
|
* Add checkboxes to make table rows selectable.
|
|
176
160
|
*/
|
|
177
161
|
selectable: BooleanConstructor;
|
|
162
|
+
/**
|
|
163
|
+
* Enables select all checkbox displayed in the header of the table.
|
|
164
|
+
*
|
|
165
|
+
* Can be customized, by passing prop as object with additional options as keys. Available options:
|
|
166
|
+
* - external (Boolean) - Disables automatic selection inside the component.
|
|
167
|
+
*
|
|
168
|
+
* @since 4.8.0
|
|
169
|
+
*/
|
|
170
|
+
selectAll: {
|
|
171
|
+
type: PropType<boolean | {
|
|
172
|
+
external?: boolean | undefined;
|
|
173
|
+
}>;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Array of selected objects, where each object represents one item - row in table.
|
|
177
|
+
*
|
|
178
|
+
* Example item: `{ name: 'John' , age: 12 }`
|
|
179
|
+
*
|
|
180
|
+
* @since 4.8.0
|
|
181
|
+
*/
|
|
182
|
+
selected: {
|
|
183
|
+
type: PropType<Item[]>;
|
|
184
|
+
default: () => never[];
|
|
185
|
+
};
|
|
178
186
|
/**
|
|
179
187
|
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. eg.:
|
|
180
188
|
* { column: 'status', state: 'asc' }
|
|
181
189
|
*/
|
|
182
190
|
sorterValue: {
|
|
183
191
|
type: PropType<SorterValue>;
|
|
184
|
-
default: undefined;
|
|
185
|
-
required: false;
|
|
186
192
|
};
|
|
187
193
|
/**
|
|
188
194
|
* Properties to [CTableBody](https://coreui.io/vue/docs/components/table/#ctablebody) component.
|
|
189
195
|
*/
|
|
190
196
|
tableBodyProps: {
|
|
191
197
|
type: ObjectConstructor;
|
|
192
|
-
default: undefined;
|
|
193
|
-
required: false;
|
|
194
198
|
};
|
|
195
199
|
/**
|
|
196
200
|
* Properties to [CTableFoot](https://coreui.io/vue/docs/components/table/#ctablefoot) component.
|
|
197
201
|
*/
|
|
198
202
|
tableFootProps: {
|
|
199
203
|
type: ObjectConstructor;
|
|
200
|
-
default: undefined;
|
|
201
|
-
required: false;
|
|
202
204
|
};
|
|
203
205
|
/**
|
|
204
206
|
* When set, displays table filter above table, allowing filtering by specific column.
|
|
@@ -209,7 +211,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
209
211
|
*/
|
|
210
212
|
tableFilter: {
|
|
211
213
|
type: PropType<boolean | TableFilter>;
|
|
212
|
-
required: false;
|
|
213
214
|
};
|
|
214
215
|
/**
|
|
215
216
|
* The element represents a caption for a component.
|
|
@@ -217,7 +218,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
217
218
|
tableFilterLabel: {
|
|
218
219
|
type: StringConstructor;
|
|
219
220
|
default: string;
|
|
220
|
-
required: false;
|
|
221
221
|
};
|
|
222
222
|
/**
|
|
223
223
|
* Specifies a short hint that is visible in the search input.
|
|
@@ -225,42 +225,34 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
225
225
|
tableFilterPlaceholder: {
|
|
226
226
|
type: StringConstructor;
|
|
227
227
|
default: string;
|
|
228
|
-
required: false;
|
|
229
228
|
};
|
|
230
229
|
/**
|
|
231
230
|
* Value of table filter.
|
|
232
231
|
*/
|
|
233
232
|
tableFilterValue: {
|
|
234
233
|
type: StringConstructor;
|
|
235
|
-
default: undefined;
|
|
236
|
-
required: false;
|
|
237
234
|
};
|
|
238
235
|
/**
|
|
239
236
|
* Properties to [CTableHead](https://coreui.io/vue/docs/components/table/#ctablehead) component.
|
|
240
237
|
*/
|
|
241
238
|
tableHeadProps: {
|
|
242
239
|
type: ObjectConstructor;
|
|
243
|
-
default: undefined;
|
|
244
|
-
required: false;
|
|
245
240
|
};
|
|
246
241
|
/**
|
|
247
242
|
* Properties to [CTable](https://coreui.io/vue/docs/components/table/#ctable) component.
|
|
248
243
|
*/
|
|
249
244
|
tableProps: {
|
|
250
245
|
type: ObjectConstructor;
|
|
251
|
-
default: undefined;
|
|
252
|
-
required: false;
|
|
253
246
|
};
|
|
254
247
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
255
248
|
[key: string]: any;
|
|
256
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("activePageChange" | "rowClick" | "columnFilterChange" | "filteredItemsChange" | "itemsPerPageChange" | "selectedItemsChange" | "sorterChange" | "tableFilterChange")[], "activePageChange" | "rowClick" | "columnFilterChange" | "filteredItemsChange" | "itemsPerPageChange" | "selectedItemsChange" | "sorterChange" | "tableFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
249
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectAll" | "activePageChange" | "rowClick" | "columnFilterChange" | "filteredItemsChange" | "itemsPerPageChange" | "selectedItemsChange" | "sorterChange" | "tableFilterChange")[], "selectAll" | "activePageChange" | "rowClick" | "columnFilterChange" | "filteredItemsChange" | "itemsPerPageChange" | "selectedItemsChange" | "sorterChange" | "tableFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
257
250
|
/**
|
|
258
251
|
* Sets active page. If 'pagination' prop is enabled, activePage is set only initially.
|
|
259
252
|
*/
|
|
260
253
|
activePage: {
|
|
261
254
|
type: NumberConstructor;
|
|
262
255
|
default: number;
|
|
263
|
-
required: false;
|
|
264
256
|
};
|
|
265
257
|
/**
|
|
266
258
|
* When set, displays table cleaner above table, next to the table filter (or in place of table filter if `tableFilter` prop is not set)
|
|
@@ -269,14 +261,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
269
261
|
*/
|
|
270
262
|
cleaner: {
|
|
271
263
|
type: BooleanConstructor;
|
|
272
|
-
required: false;
|
|
273
264
|
};
|
|
274
265
|
/**
|
|
275
266
|
* Style table items as clickable.
|
|
276
267
|
*/
|
|
277
268
|
clickableRows: {
|
|
278
269
|
type: BooleanConstructor;
|
|
279
|
-
required: false;
|
|
280
270
|
};
|
|
281
271
|
/**
|
|
282
272
|
* When set, displays additional filter row between table header and items, allowing filtering by specific column.
|
|
@@ -286,7 +276,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
286
276
|
*/
|
|
287
277
|
columnFilter: {
|
|
288
278
|
type: PropType<boolean | ColumnFilter>;
|
|
289
|
-
required: false;
|
|
290
279
|
};
|
|
291
280
|
/**
|
|
292
281
|
* Value of table filter. To set pass object where keys are column names and values are filter strings e.g.:
|
|
@@ -294,8 +283,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
294
283
|
*/
|
|
295
284
|
columnFilterValue: {
|
|
296
285
|
type: PropType<ColumnFilterValue>;
|
|
297
|
-
default: undefined;
|
|
298
|
-
required: false;
|
|
299
286
|
};
|
|
300
287
|
/**
|
|
301
288
|
* Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_props')
|
|
@@ -312,7 +299,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
312
299
|
*/
|
|
313
300
|
columns: {
|
|
314
301
|
type: PropType<(string | Column)[]>;
|
|
315
|
-
required: false;
|
|
316
302
|
};
|
|
317
303
|
/**
|
|
318
304
|
* Enables table sorting by column value. Sorting will be performed corectly only if values in column are of one type: string (case insensitive) or number.
|
|
@@ -323,8 +309,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
323
309
|
*/
|
|
324
310
|
columnSorter: {
|
|
325
311
|
type: PropType<boolean | Sorter>;
|
|
326
|
-
default: undefined;
|
|
327
|
-
required: false;
|
|
328
312
|
};
|
|
329
313
|
/**
|
|
330
314
|
* If `true` Displays table footer, which mirrors table header. (without column filter).
|
|
@@ -337,14 +321,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
337
321
|
*/
|
|
338
322
|
footer: {
|
|
339
323
|
type: PropType<boolean | (string | FooterItem)[]>;
|
|
340
|
-
required: false;
|
|
341
324
|
};
|
|
342
325
|
/**
|
|
343
326
|
* Set to false to remove table header.
|
|
344
327
|
*/
|
|
345
328
|
header: {
|
|
346
329
|
type: BooleanConstructor;
|
|
347
|
-
required: false;
|
|
348
330
|
default: boolean;
|
|
349
331
|
};
|
|
350
332
|
/**
|
|
@@ -357,22 +339,25 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
357
339
|
items: {
|
|
358
340
|
type: PropType<Item[]>;
|
|
359
341
|
default: () => never[];
|
|
360
|
-
required: false;
|
|
361
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* The total number of items. Use if you pass a portion of data from an external source to let know component what is the total number of items.
|
|
345
|
+
*
|
|
346
|
+
* @since 4.8.0
|
|
347
|
+
*/
|
|
348
|
+
itemsNumber: NumberConstructor;
|
|
362
349
|
/**
|
|
363
350
|
* Number of items per site, when pagination is enabled.
|
|
364
351
|
*/
|
|
365
352
|
itemsPerPage: {
|
|
366
353
|
type: NumberConstructor;
|
|
367
354
|
default: number;
|
|
368
|
-
required: false;
|
|
369
355
|
};
|
|
370
356
|
/**
|
|
371
357
|
* Label for items per page selector.
|
|
372
358
|
*/
|
|
373
359
|
itemsPerPageLabel: {
|
|
374
360
|
type: StringConstructor;
|
|
375
|
-
required: false;
|
|
376
361
|
default: string;
|
|
377
362
|
};
|
|
378
363
|
/**
|
|
@@ -381,7 +366,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
381
366
|
itemsPerPageOptions: {
|
|
382
367
|
type: PropType<number[]>;
|
|
383
368
|
default: () => number[];
|
|
384
|
-
required: false;
|
|
385
369
|
};
|
|
386
370
|
/**
|
|
387
371
|
* Adds select element over table, which is used for control items per page in pagination. If you want to customize this element, pass object with optional values:
|
|
@@ -391,15 +375,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
391
375
|
*/
|
|
392
376
|
itemsPerPageSelect: {
|
|
393
377
|
type: PropType<boolean | ItemsPerPageSelect>;
|
|
394
|
-
default: undefined;
|
|
395
|
-
required: false;
|
|
396
378
|
};
|
|
397
379
|
/**
|
|
398
380
|
* When set, table will have loading style: loading spinner and reduced opacity. When 'small' prop is enabled spinner will be also smaller.
|
|
399
381
|
*/
|
|
400
382
|
loading: {
|
|
401
383
|
type: BooleanConstructor;
|
|
402
|
-
required: false;
|
|
403
384
|
};
|
|
404
385
|
/**
|
|
405
386
|
* ReactNode or string for passing custom noItemsLabel texts.
|
|
@@ -407,51 +388,65 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
407
388
|
noItemsLabel: {
|
|
408
389
|
type: StringConstructor;
|
|
409
390
|
default: string;
|
|
410
|
-
required: false;
|
|
411
391
|
};
|
|
412
392
|
/**
|
|
413
393
|
* Enables default pagination. Set to true for default setup or pass an object with additional CPagination props. Default pagination will always have the computed number of pages that cannot be changed. The number of pages is generated based on the number of passed items and 'itemsPerPage' prop. If this restriction is an obstacle, you can make external CPagination instead.
|
|
414
394
|
*/
|
|
415
395
|
pagination: {
|
|
416
396
|
type: PropType<boolean | Pagination>;
|
|
417
|
-
required: false;
|
|
418
397
|
};
|
|
419
398
|
/**
|
|
420
399
|
* Properties to [CSmartPagination](https://coreui.io/vue/docs/components/smart-pagination#csmartpagination) component.
|
|
421
400
|
*/
|
|
422
401
|
paginationProps: {
|
|
423
402
|
type: ObjectConstructor;
|
|
424
|
-
default: undefined;
|
|
425
|
-
required: false;
|
|
426
403
|
};
|
|
427
404
|
/**
|
|
428
405
|
* Add checkboxes to make table rows selectable.
|
|
429
406
|
*/
|
|
430
407
|
selectable: BooleanConstructor;
|
|
408
|
+
/**
|
|
409
|
+
* Enables select all checkbox displayed in the header of the table.
|
|
410
|
+
*
|
|
411
|
+
* Can be customized, by passing prop as object with additional options as keys. Available options:
|
|
412
|
+
* - external (Boolean) - Disables automatic selection inside the component.
|
|
413
|
+
*
|
|
414
|
+
* @since 4.8.0
|
|
415
|
+
*/
|
|
416
|
+
selectAll: {
|
|
417
|
+
type: PropType<boolean | {
|
|
418
|
+
external?: boolean | undefined;
|
|
419
|
+
}>;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* Array of selected objects, where each object represents one item - row in table.
|
|
423
|
+
*
|
|
424
|
+
* Example item: `{ name: 'John' , age: 12 }`
|
|
425
|
+
*
|
|
426
|
+
* @since 4.8.0
|
|
427
|
+
*/
|
|
428
|
+
selected: {
|
|
429
|
+
type: PropType<Item[]>;
|
|
430
|
+
default: () => never[];
|
|
431
|
+
};
|
|
431
432
|
/**
|
|
432
433
|
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. eg.:
|
|
433
434
|
* { column: 'status', state: 'asc' }
|
|
434
435
|
*/
|
|
435
436
|
sorterValue: {
|
|
436
437
|
type: PropType<SorterValue>;
|
|
437
|
-
default: undefined;
|
|
438
|
-
required: false;
|
|
439
438
|
};
|
|
440
439
|
/**
|
|
441
440
|
* Properties to [CTableBody](https://coreui.io/vue/docs/components/table/#ctablebody) component.
|
|
442
441
|
*/
|
|
443
442
|
tableBodyProps: {
|
|
444
443
|
type: ObjectConstructor;
|
|
445
|
-
default: undefined;
|
|
446
|
-
required: false;
|
|
447
444
|
};
|
|
448
445
|
/**
|
|
449
446
|
* Properties to [CTableFoot](https://coreui.io/vue/docs/components/table/#ctablefoot) component.
|
|
450
447
|
*/
|
|
451
448
|
tableFootProps: {
|
|
452
449
|
type: ObjectConstructor;
|
|
453
|
-
default: undefined;
|
|
454
|
-
required: false;
|
|
455
450
|
};
|
|
456
451
|
/**
|
|
457
452
|
* When set, displays table filter above table, allowing filtering by specific column.
|
|
@@ -462,7 +457,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
462
457
|
*/
|
|
463
458
|
tableFilter: {
|
|
464
459
|
type: PropType<boolean | TableFilter>;
|
|
465
|
-
required: false;
|
|
466
460
|
};
|
|
467
461
|
/**
|
|
468
462
|
* The element represents a caption for a component.
|
|
@@ -470,7 +464,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
470
464
|
tableFilterLabel: {
|
|
471
465
|
type: StringConstructor;
|
|
472
466
|
default: string;
|
|
473
|
-
required: false;
|
|
474
467
|
};
|
|
475
468
|
/**
|
|
476
469
|
* Specifies a short hint that is visible in the search input.
|
|
@@ -478,35 +471,29 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
478
471
|
tableFilterPlaceholder: {
|
|
479
472
|
type: StringConstructor;
|
|
480
473
|
default: string;
|
|
481
|
-
required: false;
|
|
482
474
|
};
|
|
483
475
|
/**
|
|
484
476
|
* Value of table filter.
|
|
485
477
|
*/
|
|
486
478
|
tableFilterValue: {
|
|
487
479
|
type: StringConstructor;
|
|
488
|
-
default: undefined;
|
|
489
|
-
required: false;
|
|
490
480
|
};
|
|
491
481
|
/**
|
|
492
482
|
* Properties to [CTableHead](https://coreui.io/vue/docs/components/table/#ctablehead) component.
|
|
493
483
|
*/
|
|
494
484
|
tableHeadProps: {
|
|
495
485
|
type: ObjectConstructor;
|
|
496
|
-
default: undefined;
|
|
497
|
-
required: false;
|
|
498
486
|
};
|
|
499
487
|
/**
|
|
500
488
|
* Properties to [CTable](https://coreui.io/vue/docs/components/table/#ctable) component.
|
|
501
489
|
*/
|
|
502
490
|
tableProps: {
|
|
503
491
|
type: ObjectConstructor;
|
|
504
|
-
default: undefined;
|
|
505
|
-
required: false;
|
|
506
492
|
};
|
|
507
493
|
}>> & {
|
|
508
494
|
onActivePageChange?: ((...args: any[]) => any) | undefined;
|
|
509
495
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
|
496
|
+
onSelectAll?: ((...args: any[]) => any) | undefined;
|
|
510
497
|
onColumnFilterChange?: ((...args: any[]) => any) | undefined;
|
|
511
498
|
onFilteredItemsChange?: ((...args: any[]) => any) | undefined;
|
|
512
499
|
onItemsPerPageChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -515,27 +502,18 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
515
502
|
onTableFilterChange?: ((...args: any[]) => any) | undefined;
|
|
516
503
|
}, {
|
|
517
504
|
items: Item[];
|
|
505
|
+
selected: Item[];
|
|
518
506
|
header: boolean;
|
|
519
507
|
cleaner: boolean;
|
|
520
508
|
loading: boolean;
|
|
521
509
|
activePage: number;
|
|
522
|
-
tableFootProps: Record<string, any>;
|
|
523
|
-
tableHeadProps: Record<string, any>;
|
|
524
510
|
clickableRows: boolean;
|
|
511
|
+
noItemsLabel: string;
|
|
525
512
|
selectable: boolean;
|
|
526
|
-
columnFilterValue: ColumnFilterValue;
|
|
527
|
-
columnSorter: boolean | Sorter;
|
|
528
513
|
itemsPerPage: number;
|
|
529
514
|
itemsPerPageLabel: string;
|
|
530
515
|
itemsPerPageOptions: number[];
|
|
531
|
-
itemsPerPageSelect: boolean | ItemsPerPageSelect;
|
|
532
|
-
noItemsLabel: string;
|
|
533
|
-
paginationProps: Record<string, any>;
|
|
534
|
-
sorterValue: SorterValue;
|
|
535
|
-
tableBodyProps: Record<string, any>;
|
|
536
516
|
tableFilterLabel: string;
|
|
537
517
|
tableFilterPlaceholder: string;
|
|
538
|
-
tableFilterValue: string;
|
|
539
|
-
tableProps: Record<string, any>;
|
|
540
518
|
}>;
|
|
541
519
|
export { CSmartTable };
|