@coreui/vue-pro 4.4.1 → 4.5.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.
@@ -1,3 +1,18 @@
1
+ import { PropType } from 'vue';
2
+ export interface Column {
3
+ label?: string;
4
+ key: string;
5
+ _style?: any;
6
+ _props?: any;
7
+ }
8
+ export interface FooterItem {
9
+ label?: string;
10
+ _props?: any;
11
+ }
12
+ export declare type Item = {
13
+ [key: string]: number | string | any;
14
+ _props?: any;
15
+ };
1
16
  declare const CTable: import("vue").DefineComponent<{
2
17
  /**
3
18
  * Set the vertical aligment.
@@ -36,13 +51,39 @@ declare const CTable: import("vue").DefineComponent<{
36
51
  /**
37
52
  * Put the `<caption>` on the top of the table.
38
53
  *
39
- * @values 'top'
54
+ * @values 'top' | string
40
55
  */
41
56
  caption: {
42
57
  type: StringConstructor;
43
58
  default: undefined;
44
59
  required: false;
45
- validator: (value: string) => boolean;
60
+ };
61
+ /**
62
+ * Set the text of the table caption and the caption on the top of the table.
63
+ *
64
+ * @since 4.5.0
65
+ */
66
+ captionTop: {
67
+ type: StringConstructor;
68
+ default: undefined;
69
+ required: false;
70
+ };
71
+ /**
72
+ * 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')
73
+ *
74
+ * In columns prop each array item represents one column. Item might be specified in two ways:
75
+ * String: each item define column name equal to item value.
76
+ * Object: item is object with following keys available as column configuration:
77
+ * - key (required)(String) - define column name equal to item key.
78
+ * - label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
79
+ * - _props (Object) - adds classes to all cels in column, ex. _props: { scope: 'col', className: 'custom-class' },
80
+ * - _style (Object) - adds styles to the column header (useful for defining widths)
81
+ *
82
+ * @since 4.5.0
83
+ */
84
+ columns: {
85
+ type: PropType<string[] | Column[]>;
86
+ required: false;
46
87
  };
47
88
  /**
48
89
  * Sets the color context of the component to one of CoreUI’s themed colors.
@@ -53,6 +94,21 @@ declare const CTable: import("vue").DefineComponent<{
53
94
  type: StringConstructor;
54
95
  validator: (value: string) => boolean;
55
96
  };
97
+ /**
98
+ * Array of objects or strings, where each element represents one cell in the table footer.
99
+ *
100
+ * Example items:
101
+ * ['FooterCell', 'FooterCell', 'FooterCell']
102
+ * or
103
+ * [{ label: 'FooterCell', _props: { color: 'success' }, ...]
104
+ *
105
+ * @since 4.5.0
106
+ */
107
+ footer: {
108
+ type: PropType<FooterItem[]>;
109
+ default: () => never[];
110
+ required: false;
111
+ };
56
112
  /**
57
113
  * Enable a hover state on table rows within a `<CTableBody>`.
58
114
  */
@@ -61,10 +117,18 @@ declare const CTable: import("vue").DefineComponent<{
61
117
  required: false;
62
118
  };
63
119
  /**
64
- * Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
120
+ * Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_props' key and to single cell by '_cellProps'.
121
+ *
122
+ * Example item:
123
+ * { name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}
65
124
  *
66
- * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl'
125
+ * @since 4.5.0
67
126
  */
127
+ items: {
128
+ type: PropType<Item[]>;
129
+ default: () => never[];
130
+ required: false;
131
+ };
68
132
  responsive: {
69
133
  type: (StringConstructor | BooleanConstructor)[];
70
134
  default: undefined;
@@ -94,6 +158,28 @@ declare const CTable: import("vue").DefineComponent<{
94
158
  type: BooleanConstructor;
95
159
  required: false;
96
160
  };
161
+ /**
162
+ * Properties that will be passed to the table footer component.
163
+ *
164
+ * Properties to [CTableFoot](#ctablefoot) component.
165
+ * @since 4.5.0
166
+ */
167
+ tableFootProps: {
168
+ type: ObjectConstructor;
169
+ default: undefined;
170
+ required: false;
171
+ };
172
+ /**
173
+ * Properties that will be passed to the table head component.
174
+ *
175
+ * Properties to [CTableHead](#ctablehead) component.
176
+ * @since 4.5.0
177
+ */
178
+ tableHeadProps: {
179
+ type: ObjectConstructor;
180
+ default: undefined;
181
+ required: false;
182
+ };
97
183
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
98
184
  [key: string]: any;
99
185
  }>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -134,13 +220,39 @@ declare const CTable: import("vue").DefineComponent<{
134
220
  /**
135
221
  * Put the `<caption>` on the top of the table.
136
222
  *
137
- * @values 'top'
223
+ * @values 'top' | string
138
224
  */
139
225
  caption: {
140
226
  type: StringConstructor;
141
227
  default: undefined;
142
228
  required: false;
143
- validator: (value: string) => boolean;
229
+ };
230
+ /**
231
+ * Set the text of the table caption and the caption on the top of the table.
232
+ *
233
+ * @since 4.5.0
234
+ */
235
+ captionTop: {
236
+ type: StringConstructor;
237
+ default: undefined;
238
+ required: false;
239
+ };
240
+ /**
241
+ * 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')
242
+ *
243
+ * In columns prop each array item represents one column. Item might be specified in two ways:
244
+ * String: each item define column name equal to item value.
245
+ * Object: item is object with following keys available as column configuration:
246
+ * - key (required)(String) - define column name equal to item key.
247
+ * - label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
248
+ * - _props (Object) - adds classes to all cels in column, ex. _props: { scope: 'col', className: 'custom-class' },
249
+ * - _style (Object) - adds styles to the column header (useful for defining widths)
250
+ *
251
+ * @since 4.5.0
252
+ */
253
+ columns: {
254
+ type: PropType<string[] | Column[]>;
255
+ required: false;
144
256
  };
145
257
  /**
146
258
  * Sets the color context of the component to one of CoreUI’s themed colors.
@@ -151,6 +263,21 @@ declare const CTable: import("vue").DefineComponent<{
151
263
  type: StringConstructor;
152
264
  validator: (value: string) => boolean;
153
265
  };
266
+ /**
267
+ * Array of objects or strings, where each element represents one cell in the table footer.
268
+ *
269
+ * Example items:
270
+ * ['FooterCell', 'FooterCell', 'FooterCell']
271
+ * or
272
+ * [{ label: 'FooterCell', _props: { color: 'success' }, ...]
273
+ *
274
+ * @since 4.5.0
275
+ */
276
+ footer: {
277
+ type: PropType<FooterItem[]>;
278
+ default: () => never[];
279
+ required: false;
280
+ };
154
281
  /**
155
282
  * Enable a hover state on table rows within a `<CTableBody>`.
156
283
  */
@@ -159,10 +286,18 @@ declare const CTable: import("vue").DefineComponent<{
159
286
  required: false;
160
287
  };
161
288
  /**
162
- * Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
289
+ * Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_props' key and to single cell by '_cellProps'.
290
+ *
291
+ * Example item:
292
+ * { name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}
163
293
  *
164
- * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl'
294
+ * @since 4.5.0
165
295
  */
296
+ items: {
297
+ type: PropType<Item[]>;
298
+ default: () => never[];
299
+ required: false;
300
+ };
166
301
  responsive: {
167
302
  type: (StringConstructor | BooleanConstructor)[];
168
303
  default: undefined;
@@ -192,15 +327,42 @@ declare const CTable: import("vue").DefineComponent<{
192
327
  type: BooleanConstructor;
193
328
  required: false;
194
329
  };
330
+ /**
331
+ * Properties that will be passed to the table footer component.
332
+ *
333
+ * Properties to [CTableFoot](#ctablefoot) component.
334
+ * @since 4.5.0
335
+ */
336
+ tableFootProps: {
337
+ type: ObjectConstructor;
338
+ default: undefined;
339
+ required: false;
340
+ };
341
+ /**
342
+ * Properties that will be passed to the table head component.
343
+ *
344
+ * Properties to [CTableHead](#ctablehead) component.
345
+ * @since 4.5.0
346
+ */
347
+ tableHeadProps: {
348
+ type: ObjectConstructor;
349
+ default: undefined;
350
+ required: false;
351
+ };
195
352
  }>>, {
196
353
  small: boolean;
197
354
  hover: boolean;
355
+ items: Item[];
356
+ footer: FooterItem[];
198
357
  caption: string;
199
358
  align: string;
200
359
  striped: boolean;
201
360
  bordered: boolean;
202
361
  borderless: boolean;
362
+ captionTop: string;
203
363
  responsive: string | boolean;
204
364
  stripedColumns: boolean;
365
+ tableFootProps: Record<string, any>;
366
+ tableHeadProps: Record<string, any>;
205
367
  }>;
206
368
  export { CTable };
@@ -26,6 +26,13 @@ declare const CTableDataCell: import("vue").DefineComponent<{
26
26
  type: StringConstructor;
27
27
  validator: (value: string) => boolean;
28
28
  };
29
+ /**
30
+ * @ignore
31
+ */
32
+ scope: {
33
+ type: StringConstructor;
34
+ required: false;
35
+ };
29
36
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
30
37
  [key: string]: any;
31
38
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -56,6 +63,13 @@ declare const CTableDataCell: import("vue").DefineComponent<{
56
63
  type: StringConstructor;
57
64
  validator: (value: string) => boolean;
58
65
  };
66
+ /**
67
+ * @ignore
68
+ */
69
+ scope: {
70
+ type: StringConstructor;
71
+ required: false;
72
+ };
59
73
  }>>, {
60
74
  active: boolean;
61
75
  align: string;