@coreui/vue-pro 4.7.0-alpha.1 → 4.8.0-next.0
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/calendar/utils.d.ts +23 -0
- package/dist/components/element-cover/CElementCover.d.ts +14 -11
- package/dist/components/modal/CModal.d.ts +4 -20
- package/dist/components/offcanvas/COffcanvas.d.ts +35 -18
- package/dist/components/smart-table/CSmartTable.d.ts +83 -94
- package/dist/components/smart-table/CSmartTableBody.d.ts +16 -40
- package/dist/components/smart-table/CSmartTableHead.d.ts +20 -61
- package/dist/components/smart-table/CSmartTableInterface.d.ts +5 -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 +5 -11
- package/dist/components/time-picker/types.d.ts +15 -0
- package/dist/components/time-picker/utils.d.ts +23 -0
- package/dist/index.es.js +1114 -4423
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1115 -4424
- package/dist/index.js.map +1 -1
- package/dist/utils/calendar.d.ts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/isInViewport.d.ts +2 -0
- package/dist/utils/isObjectInArray.d.ts +2 -0
- package/package.json +10 -14
- package/src/components/calendar/CCalendar.ts +1 -1
- package/src/{utils/calendar.ts → components/calendar/utils.ts} +3 -3
- package/src/components/carousel/CCarousel.ts +3 -3
- package/src/components/date-range-picker/CDateRangePicker.ts +1 -1
- package/src/components/element-cover/CElementCover.ts +45 -30
- package/src/components/form/CFormControlWrapper.ts +36 -22
- package/src/components/modal/CModal.ts +10 -10
- package/src/components/multi-select/CMultiSelect.ts +0 -10
- package/src/components/offcanvas/COffcanvas.ts +50 -28
- package/src/components/sidebar/CSidebar.ts +5 -5
- package/src/components/smart-table/CSmartTable.ts +409 -272
- package/src/components/smart-table/CSmartTableBody.ts +126 -137
- package/src/components/smart-table/CSmartTableHead.ts +54 -139
- package/src/components/smart-table/CSmartTableInterface.ts +7 -1
- package/src/components/smart-table/types.ts +61 -0
- package/src/components/smart-table/utils.ts +212 -0
- package/src/components/table/CTable.ts +45 -42
- package/src/components/time-picker/CTimePicker.ts +49 -26
- package/src/components/time-picker/types.ts +15 -0
- package/src/{utils/time.ts → components/time-picker/utils.ts} +49 -10
- package/src/utils/index.ts +2 -2
- package/src/utils/isInViewport.ts +11 -0
- package/src/utils/isVisible.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { Column, ColumnFilter, ColumnFilterValue, Item, ItemsPerPageSelect, 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')
|
|
@@ -58,8 +52,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
58
52
|
* - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
|
|
59
53
|
*/
|
|
60
54
|
columns: {
|
|
61
|
-
type: PropType<string
|
|
62
|
-
required: false;
|
|
55
|
+
type: PropType<(string | Column)[]>;
|
|
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,22 +63,24 @@ 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
|
-
* Displays table footer, which mirrors table header. (without column filter).
|
|
68
|
+
* If `true` Displays table footer, which mirrors table header. (without column filter).
|
|
69
|
+
* Or Array of objects or strings, where each element represents one cell in the table footer.
|
|
70
|
+
*
|
|
71
|
+
* Example items:
|
|
72
|
+
* `['FooterCell', 'FooterCell', 'FooterCell']`
|
|
73
|
+
* or
|
|
74
|
+
* `[{ label: 'FooterCell', _props: { color: 'success' }, ...]`
|
|
78
75
|
*/
|
|
79
76
|
footer: {
|
|
80
|
-
type:
|
|
81
|
-
required: false;
|
|
77
|
+
type: PropType<boolean | (string | FooterItem)[]>;
|
|
82
78
|
};
|
|
83
79
|
/**
|
|
84
80
|
* Set to false to remove table header.
|
|
85
81
|
*/
|
|
86
82
|
header: {
|
|
87
83
|
type: BooleanConstructor;
|
|
88
|
-
required: false;
|
|
89
84
|
default: boolean;
|
|
90
85
|
};
|
|
91
86
|
/**
|
|
@@ -98,22 +93,25 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
98
93
|
items: {
|
|
99
94
|
type: PropType<Item[]>;
|
|
100
95
|
default: () => never[];
|
|
101
|
-
required: false;
|
|
102
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;
|
|
103
103
|
/**
|
|
104
104
|
* Number of items per site, when pagination is enabled.
|
|
105
105
|
*/
|
|
106
106
|
itemsPerPage: {
|
|
107
107
|
type: NumberConstructor;
|
|
108
108
|
default: number;
|
|
109
|
-
required: false;
|
|
110
109
|
};
|
|
111
110
|
/**
|
|
112
111
|
* Label for items per page selector.
|
|
113
112
|
*/
|
|
114
113
|
itemsPerPageLabel: {
|
|
115
114
|
type: StringConstructor;
|
|
116
|
-
required: false;
|
|
117
115
|
default: string;
|
|
118
116
|
};
|
|
119
117
|
/**
|
|
@@ -122,7 +120,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
122
120
|
itemsPerPageOptions: {
|
|
123
121
|
type: PropType<number[]>;
|
|
124
122
|
default: () => number[];
|
|
125
|
-
required: false;
|
|
126
123
|
};
|
|
127
124
|
/**
|
|
128
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:
|
|
@@ -132,15 +129,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
132
129
|
*/
|
|
133
130
|
itemsPerPageSelect: {
|
|
134
131
|
type: PropType<boolean | ItemsPerPageSelect>;
|
|
135
|
-
default: undefined;
|
|
136
|
-
required: false;
|
|
137
132
|
};
|
|
138
133
|
/**
|
|
139
134
|
* When set, table will have loading style: loading spinner and reduced opacity. When 'small' prop is enabled spinner will be also smaller.
|
|
140
135
|
*/
|
|
141
136
|
loading: {
|
|
142
137
|
type: BooleanConstructor;
|
|
143
|
-
required: false;
|
|
144
138
|
};
|
|
145
139
|
/**
|
|
146
140
|
* ReactNode or string for passing custom noItemsLabel texts.
|
|
@@ -148,51 +142,65 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
148
142
|
noItemsLabel: {
|
|
149
143
|
type: StringConstructor;
|
|
150
144
|
default: string;
|
|
151
|
-
required: false;
|
|
152
145
|
};
|
|
153
146
|
/**
|
|
154
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.
|
|
155
148
|
*/
|
|
156
149
|
pagination: {
|
|
157
150
|
type: PropType<boolean | Pagination>;
|
|
158
|
-
required: false;
|
|
159
151
|
};
|
|
160
152
|
/**
|
|
161
153
|
* Properties to [CSmartPagination](https://coreui.io/vue/docs/components/smart-pagination#csmartpagination) component.
|
|
162
154
|
*/
|
|
163
155
|
paginationProps: {
|
|
164
156
|
type: ObjectConstructor;
|
|
165
|
-
default: undefined;
|
|
166
|
-
required: false;
|
|
167
157
|
};
|
|
168
158
|
/**
|
|
169
159
|
* Add checkboxes to make table rows selectable.
|
|
170
160
|
*/
|
|
171
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
|
+
};
|
|
172
186
|
/**
|
|
173
187
|
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. eg.:
|
|
174
188
|
* { column: 'status', state: 'asc' }
|
|
175
189
|
*/
|
|
176
190
|
sorterValue: {
|
|
177
191
|
type: PropType<SorterValue>;
|
|
178
|
-
default: undefined;
|
|
179
|
-
required: false;
|
|
180
192
|
};
|
|
181
193
|
/**
|
|
182
194
|
* Properties to [CTableBody](https://coreui.io/vue/docs/components/table/#ctablebody) component.
|
|
183
195
|
*/
|
|
184
196
|
tableBodyProps: {
|
|
185
197
|
type: ObjectConstructor;
|
|
186
|
-
default: undefined;
|
|
187
|
-
required: false;
|
|
188
198
|
};
|
|
189
199
|
/**
|
|
190
200
|
* Properties to [CTableFoot](https://coreui.io/vue/docs/components/table/#ctablefoot) component.
|
|
191
201
|
*/
|
|
192
202
|
tableFootProps: {
|
|
193
203
|
type: ObjectConstructor;
|
|
194
|
-
default: undefined;
|
|
195
|
-
required: false;
|
|
196
204
|
};
|
|
197
205
|
/**
|
|
198
206
|
* When set, displays table filter above table, allowing filtering by specific column.
|
|
@@ -203,7 +211,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
203
211
|
*/
|
|
204
212
|
tableFilter: {
|
|
205
213
|
type: PropType<boolean | TableFilter>;
|
|
206
|
-
required: false;
|
|
207
214
|
};
|
|
208
215
|
/**
|
|
209
216
|
* The element represents a caption for a component.
|
|
@@ -211,7 +218,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
211
218
|
tableFilterLabel: {
|
|
212
219
|
type: StringConstructor;
|
|
213
220
|
default: string;
|
|
214
|
-
required: false;
|
|
215
221
|
};
|
|
216
222
|
/**
|
|
217
223
|
* Specifies a short hint that is visible in the search input.
|
|
@@ -219,42 +225,34 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
219
225
|
tableFilterPlaceholder: {
|
|
220
226
|
type: StringConstructor;
|
|
221
227
|
default: string;
|
|
222
|
-
required: false;
|
|
223
228
|
};
|
|
224
229
|
/**
|
|
225
230
|
* Value of table filter.
|
|
226
231
|
*/
|
|
227
232
|
tableFilterValue: {
|
|
228
233
|
type: StringConstructor;
|
|
229
|
-
default: undefined;
|
|
230
|
-
required: false;
|
|
231
234
|
};
|
|
232
235
|
/**
|
|
233
236
|
* Properties to [CTableHead](https://coreui.io/vue/docs/components/table/#ctablehead) component.
|
|
234
237
|
*/
|
|
235
238
|
tableHeadProps: {
|
|
236
239
|
type: ObjectConstructor;
|
|
237
|
-
default: undefined;
|
|
238
|
-
required: false;
|
|
239
240
|
};
|
|
240
241
|
/**
|
|
241
242
|
* Properties to [CTable](https://coreui.io/vue/docs/components/table/#ctable) component.
|
|
242
243
|
*/
|
|
243
244
|
tableProps: {
|
|
244
245
|
type: ObjectConstructor;
|
|
245
|
-
default: undefined;
|
|
246
|
-
required: false;
|
|
247
246
|
};
|
|
248
247
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
249
248
|
[key: string]: any;
|
|
250
|
-
}>, 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<{
|
|
251
250
|
/**
|
|
252
251
|
* Sets active page. If 'pagination' prop is enabled, activePage is set only initially.
|
|
253
252
|
*/
|
|
254
253
|
activePage: {
|
|
255
254
|
type: NumberConstructor;
|
|
256
255
|
default: number;
|
|
257
|
-
required: false;
|
|
258
256
|
};
|
|
259
257
|
/**
|
|
260
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)
|
|
@@ -263,14 +261,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
263
261
|
*/
|
|
264
262
|
cleaner: {
|
|
265
263
|
type: BooleanConstructor;
|
|
266
|
-
required: false;
|
|
267
264
|
};
|
|
268
265
|
/**
|
|
269
266
|
* Style table items as clickable.
|
|
270
267
|
*/
|
|
271
268
|
clickableRows: {
|
|
272
269
|
type: BooleanConstructor;
|
|
273
|
-
required: false;
|
|
274
270
|
};
|
|
275
271
|
/**
|
|
276
272
|
* When set, displays additional filter row between table header and items, allowing filtering by specific column.
|
|
@@ -280,7 +276,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
280
276
|
*/
|
|
281
277
|
columnFilter: {
|
|
282
278
|
type: PropType<boolean | ColumnFilter>;
|
|
283
|
-
required: false;
|
|
284
279
|
};
|
|
285
280
|
/**
|
|
286
281
|
* Value of table filter. To set pass object where keys are column names and values are filter strings e.g.:
|
|
@@ -288,8 +283,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
288
283
|
*/
|
|
289
284
|
columnFilterValue: {
|
|
290
285
|
type: PropType<ColumnFilterValue>;
|
|
291
|
-
default: undefined;
|
|
292
|
-
required: false;
|
|
293
286
|
};
|
|
294
287
|
/**
|
|
295
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')
|
|
@@ -305,8 +298,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
305
298
|
* - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
|
|
306
299
|
*/
|
|
307
300
|
columns: {
|
|
308
|
-
type: PropType<string
|
|
309
|
-
required: false;
|
|
301
|
+
type: PropType<(string | Column)[]>;
|
|
310
302
|
};
|
|
311
303
|
/**
|
|
312
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.
|
|
@@ -317,22 +309,24 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
317
309
|
*/
|
|
318
310
|
columnSorter: {
|
|
319
311
|
type: PropType<boolean | Sorter>;
|
|
320
|
-
default: undefined;
|
|
321
|
-
required: false;
|
|
322
312
|
};
|
|
323
313
|
/**
|
|
324
|
-
* Displays table footer, which mirrors table header. (without column filter).
|
|
314
|
+
* If `true` Displays table footer, which mirrors table header. (without column filter).
|
|
315
|
+
* Or Array of objects or strings, where each element represents one cell in the table footer.
|
|
316
|
+
*
|
|
317
|
+
* Example items:
|
|
318
|
+
* `['FooterCell', 'FooterCell', 'FooterCell']`
|
|
319
|
+
* or
|
|
320
|
+
* `[{ label: 'FooterCell', _props: { color: 'success' }, ...]`
|
|
325
321
|
*/
|
|
326
322
|
footer: {
|
|
327
|
-
type:
|
|
328
|
-
required: false;
|
|
323
|
+
type: PropType<boolean | (string | FooterItem)[]>;
|
|
329
324
|
};
|
|
330
325
|
/**
|
|
331
326
|
* Set to false to remove table header.
|
|
332
327
|
*/
|
|
333
328
|
header: {
|
|
334
329
|
type: BooleanConstructor;
|
|
335
|
-
required: false;
|
|
336
330
|
default: boolean;
|
|
337
331
|
};
|
|
338
332
|
/**
|
|
@@ -345,22 +339,25 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
345
339
|
items: {
|
|
346
340
|
type: PropType<Item[]>;
|
|
347
341
|
default: () => never[];
|
|
348
|
-
required: false;
|
|
349
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;
|
|
350
349
|
/**
|
|
351
350
|
* Number of items per site, when pagination is enabled.
|
|
352
351
|
*/
|
|
353
352
|
itemsPerPage: {
|
|
354
353
|
type: NumberConstructor;
|
|
355
354
|
default: number;
|
|
356
|
-
required: false;
|
|
357
355
|
};
|
|
358
356
|
/**
|
|
359
357
|
* Label for items per page selector.
|
|
360
358
|
*/
|
|
361
359
|
itemsPerPageLabel: {
|
|
362
360
|
type: StringConstructor;
|
|
363
|
-
required: false;
|
|
364
361
|
default: string;
|
|
365
362
|
};
|
|
366
363
|
/**
|
|
@@ -369,7 +366,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
369
366
|
itemsPerPageOptions: {
|
|
370
367
|
type: PropType<number[]>;
|
|
371
368
|
default: () => number[];
|
|
372
|
-
required: false;
|
|
373
369
|
};
|
|
374
370
|
/**
|
|
375
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:
|
|
@@ -379,15 +375,12 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
379
375
|
*/
|
|
380
376
|
itemsPerPageSelect: {
|
|
381
377
|
type: PropType<boolean | ItemsPerPageSelect>;
|
|
382
|
-
default: undefined;
|
|
383
|
-
required: false;
|
|
384
378
|
};
|
|
385
379
|
/**
|
|
386
380
|
* When set, table will have loading style: loading spinner and reduced opacity. When 'small' prop is enabled spinner will be also smaller.
|
|
387
381
|
*/
|
|
388
382
|
loading: {
|
|
389
383
|
type: BooleanConstructor;
|
|
390
|
-
required: false;
|
|
391
384
|
};
|
|
392
385
|
/**
|
|
393
386
|
* ReactNode or string for passing custom noItemsLabel texts.
|
|
@@ -395,51 +388,65 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
395
388
|
noItemsLabel: {
|
|
396
389
|
type: StringConstructor;
|
|
397
390
|
default: string;
|
|
398
|
-
required: false;
|
|
399
391
|
};
|
|
400
392
|
/**
|
|
401
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.
|
|
402
394
|
*/
|
|
403
395
|
pagination: {
|
|
404
396
|
type: PropType<boolean | Pagination>;
|
|
405
|
-
required: false;
|
|
406
397
|
};
|
|
407
398
|
/**
|
|
408
399
|
* Properties to [CSmartPagination](https://coreui.io/vue/docs/components/smart-pagination#csmartpagination) component.
|
|
409
400
|
*/
|
|
410
401
|
paginationProps: {
|
|
411
402
|
type: ObjectConstructor;
|
|
412
|
-
default: undefined;
|
|
413
|
-
required: false;
|
|
414
403
|
};
|
|
415
404
|
/**
|
|
416
405
|
* Add checkboxes to make table rows selectable.
|
|
417
406
|
*/
|
|
418
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
|
+
};
|
|
419
432
|
/**
|
|
420
433
|
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'. eg.:
|
|
421
434
|
* { column: 'status', state: 'asc' }
|
|
422
435
|
*/
|
|
423
436
|
sorterValue: {
|
|
424
437
|
type: PropType<SorterValue>;
|
|
425
|
-
default: undefined;
|
|
426
|
-
required: false;
|
|
427
438
|
};
|
|
428
439
|
/**
|
|
429
440
|
* Properties to [CTableBody](https://coreui.io/vue/docs/components/table/#ctablebody) component.
|
|
430
441
|
*/
|
|
431
442
|
tableBodyProps: {
|
|
432
443
|
type: ObjectConstructor;
|
|
433
|
-
default: undefined;
|
|
434
|
-
required: false;
|
|
435
444
|
};
|
|
436
445
|
/**
|
|
437
446
|
* Properties to [CTableFoot](https://coreui.io/vue/docs/components/table/#ctablefoot) component.
|
|
438
447
|
*/
|
|
439
448
|
tableFootProps: {
|
|
440
449
|
type: ObjectConstructor;
|
|
441
|
-
default: undefined;
|
|
442
|
-
required: false;
|
|
443
450
|
};
|
|
444
451
|
/**
|
|
445
452
|
* When set, displays table filter above table, allowing filtering by specific column.
|
|
@@ -450,7 +457,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
450
457
|
*/
|
|
451
458
|
tableFilter: {
|
|
452
459
|
type: PropType<boolean | TableFilter>;
|
|
453
|
-
required: false;
|
|
454
460
|
};
|
|
455
461
|
/**
|
|
456
462
|
* The element represents a caption for a component.
|
|
@@ -458,7 +464,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
458
464
|
tableFilterLabel: {
|
|
459
465
|
type: StringConstructor;
|
|
460
466
|
default: string;
|
|
461
|
-
required: false;
|
|
462
467
|
};
|
|
463
468
|
/**
|
|
464
469
|
* Specifies a short hint that is visible in the search input.
|
|
@@ -466,35 +471,29 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
466
471
|
tableFilterPlaceholder: {
|
|
467
472
|
type: StringConstructor;
|
|
468
473
|
default: string;
|
|
469
|
-
required: false;
|
|
470
474
|
};
|
|
471
475
|
/**
|
|
472
476
|
* Value of table filter.
|
|
473
477
|
*/
|
|
474
478
|
tableFilterValue: {
|
|
475
479
|
type: StringConstructor;
|
|
476
|
-
default: undefined;
|
|
477
|
-
required: false;
|
|
478
480
|
};
|
|
479
481
|
/**
|
|
480
482
|
* Properties to [CTableHead](https://coreui.io/vue/docs/components/table/#ctablehead) component.
|
|
481
483
|
*/
|
|
482
484
|
tableHeadProps: {
|
|
483
485
|
type: ObjectConstructor;
|
|
484
|
-
default: undefined;
|
|
485
|
-
required: false;
|
|
486
486
|
};
|
|
487
487
|
/**
|
|
488
488
|
* Properties to [CTable](https://coreui.io/vue/docs/components/table/#ctable) component.
|
|
489
489
|
*/
|
|
490
490
|
tableProps: {
|
|
491
491
|
type: ObjectConstructor;
|
|
492
|
-
default: undefined;
|
|
493
|
-
required: false;
|
|
494
492
|
};
|
|
495
493
|
}>> & {
|
|
496
494
|
onActivePageChange?: ((...args: any[]) => any) | undefined;
|
|
497
495
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
|
496
|
+
onSelectAll?: ((...args: any[]) => any) | undefined;
|
|
498
497
|
onColumnFilterChange?: ((...args: any[]) => any) | undefined;
|
|
499
498
|
onFilteredItemsChange?: ((...args: any[]) => any) | undefined;
|
|
500
499
|
onItemsPerPageChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -503,28 +502,18 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
503
502
|
onTableFilterChange?: ((...args: any[]) => any) | undefined;
|
|
504
503
|
}, {
|
|
505
504
|
items: Item[];
|
|
506
|
-
|
|
505
|
+
selected: Item[];
|
|
507
506
|
header: boolean;
|
|
508
507
|
cleaner: boolean;
|
|
509
508
|
loading: boolean;
|
|
510
509
|
activePage: number;
|
|
511
|
-
tableFootProps: Record<string, any>;
|
|
512
|
-
tableHeadProps: Record<string, any>;
|
|
513
510
|
clickableRows: boolean;
|
|
511
|
+
noItemsLabel: string;
|
|
514
512
|
selectable: boolean;
|
|
515
|
-
columnFilterValue: ColumnFilterValue;
|
|
516
|
-
columnSorter: boolean | Sorter;
|
|
517
513
|
itemsPerPage: number;
|
|
518
514
|
itemsPerPageLabel: string;
|
|
519
515
|
itemsPerPageOptions: number[];
|
|
520
|
-
itemsPerPageSelect: boolean | ItemsPerPageSelect;
|
|
521
|
-
noItemsLabel: string;
|
|
522
|
-
paginationProps: Record<string, any>;
|
|
523
|
-
sorterValue: SorterValue;
|
|
524
|
-
tableBodyProps: Record<string, any>;
|
|
525
516
|
tableFilterLabel: string;
|
|
526
517
|
tableFilterPlaceholder: string;
|
|
527
|
-
tableFilterValue: string;
|
|
528
|
-
tableProps: Record<string, any>;
|
|
529
518
|
}>;
|
|
530
519
|
export { CSmartTable };
|
|
@@ -1,79 +1,55 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { Item } from './
|
|
2
|
+
import type { Item } from './types';
|
|
3
3
|
declare const CSmartTableBody: import("vue").DefineComponent<{
|
|
4
|
-
clickableRows:
|
|
5
|
-
|
|
4
|
+
clickableRows: BooleanConstructor;
|
|
5
|
+
columnNames: {
|
|
6
|
+
type: PropType<string[]>;
|
|
7
|
+
default: () => never[];
|
|
6
8
|
require: boolean;
|
|
7
9
|
};
|
|
8
10
|
currentItems: {
|
|
9
11
|
type: PropType<Item[]>;
|
|
10
12
|
default: () => never[];
|
|
11
|
-
required: false;
|
|
12
13
|
};
|
|
13
14
|
firstItemOnActivePageIndex: {
|
|
14
15
|
type: NumberConstructor;
|
|
15
16
|
require: boolean;
|
|
16
17
|
default: number;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
default: undefined;
|
|
21
|
-
require: boolean;
|
|
22
|
-
};
|
|
23
|
-
rawColumnNames: {
|
|
24
|
-
type: PropType<string[]>;
|
|
25
|
-
default: () => never[];
|
|
26
|
-
require: boolean;
|
|
27
|
-
};
|
|
28
|
-
scopedSlots: {
|
|
29
|
-
type: ObjectConstructor;
|
|
30
|
-
default: undefined;
|
|
31
|
-
require: boolean;
|
|
32
|
-
};
|
|
19
|
+
noItemsLabel: StringConstructor;
|
|
20
|
+
scopedSlots: ObjectConstructor;
|
|
33
21
|
selectable: BooleanConstructor;
|
|
22
|
+
selected: PropType<Item[]>;
|
|
34
23
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
24
|
[key: string]: any;
|
|
36
25
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("rowChecked" | "rowClick")[], "rowChecked" | "rowClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
-
clickableRows:
|
|
38
|
-
|
|
26
|
+
clickableRows: BooleanConstructor;
|
|
27
|
+
columnNames: {
|
|
28
|
+
type: PropType<string[]>;
|
|
29
|
+
default: () => never[];
|
|
39
30
|
require: boolean;
|
|
40
31
|
};
|
|
41
32
|
currentItems: {
|
|
42
33
|
type: PropType<Item[]>;
|
|
43
34
|
default: () => never[];
|
|
44
|
-
required: false;
|
|
45
35
|
};
|
|
46
36
|
firstItemOnActivePageIndex: {
|
|
47
37
|
type: NumberConstructor;
|
|
48
38
|
require: boolean;
|
|
49
39
|
default: number;
|
|
50
40
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
default: undefined;
|
|
54
|
-
require: boolean;
|
|
55
|
-
};
|
|
56
|
-
rawColumnNames: {
|
|
57
|
-
type: PropType<string[]>;
|
|
58
|
-
default: () => never[];
|
|
59
|
-
require: boolean;
|
|
60
|
-
};
|
|
61
|
-
scopedSlots: {
|
|
62
|
-
type: ObjectConstructor;
|
|
63
|
-
default: undefined;
|
|
64
|
-
require: boolean;
|
|
65
|
-
};
|
|
41
|
+
noItemsLabel: StringConstructor;
|
|
42
|
+
scopedSlots: ObjectConstructor;
|
|
66
43
|
selectable: BooleanConstructor;
|
|
44
|
+
selected: PropType<Item[]>;
|
|
67
45
|
}>> & {
|
|
68
46
|
onRowChecked?: ((...args: any[]) => any) | undefined;
|
|
69
47
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
|
70
48
|
}, {
|
|
71
49
|
clickableRows: boolean;
|
|
50
|
+
columnNames: string[];
|
|
72
51
|
currentItems: Item[];
|
|
73
52
|
firstItemOnActivePageIndex: number;
|
|
74
|
-
noItemLabel: string;
|
|
75
|
-
rawColumnNames: string[];
|
|
76
|
-
scopedSlots: Record<string, any>;
|
|
77
53
|
selectable: boolean;
|
|
78
54
|
}>;
|
|
79
55
|
export { CSmartTableBody };
|