@coreui/vue-pro 4.6.0 → 4.7.0-alpha.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.
Files changed (58) hide show
  1. package/dist/components/Types.d.ts +5 -5
  2. package/dist/components/date-picker/CDatePicker.d.ts +2 -1
  3. package/dist/components/date-range-picker/CDateRangePicker.d.ts +31 -1
  4. package/dist/components/form/CFormInput.d.ts +166 -1
  5. package/dist/components/form/CFormSelect.d.ts +1 -1
  6. package/dist/components/grid/CCol.d.ts +3 -3
  7. package/dist/components/grid/CRow.d.ts +1 -1
  8. package/dist/components/index.d.ts +1 -0
  9. package/dist/components/multi-select/CMultiSelect.d.ts +12 -4
  10. package/dist/components/multi-select/CMultiSelectOptions.d.ts +11 -0
  11. package/dist/components/multi-select/CMultiSelectSelection.d.ts +3 -3
  12. package/dist/components/pagination/index.d.ts +1 -2
  13. package/dist/components/picker/CPicker.d.ts +1 -1
  14. package/dist/components/popover/CPopover.d.ts +1 -1
  15. package/dist/components/smart-pagination/CSmartPagination.d.ts +257 -0
  16. package/dist/components/smart-pagination/index.d.ts +6 -0
  17. package/dist/components/smart-table/CSmartTable.d.ts +6 -4
  18. package/dist/components/smart-table/CSmartTableFilter.d.ts +2 -2
  19. package/dist/components/smart-table/CSmartTableHead.d.ts +2 -2
  20. package/dist/components/smart-table/CSmartTableInterface.d.ts +4 -1
  21. package/dist/components/table/CTable.d.ts +1 -1
  22. package/dist/components/table/CTableCaption.d.ts +2 -8
  23. package/dist/components/time-picker/CTimePicker.d.ts +2 -1
  24. package/dist/components/tooltip/CTooltip.d.ts +1 -1
  25. package/dist/components/widgets/CWidgetStatsD.d.ts +1 -1
  26. package/dist/index.es.js +877 -682
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.js +876 -680
  29. package/dist/index.js.map +1 -1
  30. package/dist/utils/getNextSibling.d.ts +2 -0
  31. package/dist/utils/getPreviousSibling.d.ts +2 -0
  32. package/dist/utils/index.d.ts +4 -0
  33. package/dist/utils/isVisible.d.ts +2 -0
  34. package/dist/utils/time.d.ts +2 -2
  35. package/package.json +1 -1
  36. package/src/components/carousel/CCarousel.ts +1 -9
  37. package/src/components/date-picker/CDatePicker.ts +11 -2
  38. package/src/components/date-range-picker/CDateRangePicker.ts +54 -0
  39. package/src/components/form/CFormInput.ts +2 -0
  40. package/src/components/index.ts +1 -0
  41. package/src/components/loading-button/CLoadingButton.ts +1 -2
  42. package/src/components/multi-select/CMultiSelect.ts +125 -103
  43. package/src/components/multi-select/CMultiSelectOptions.ts +48 -10
  44. package/src/components/multi-select/CMultiSelectSelection.ts +1 -1
  45. package/src/components/pagination/index.ts +1 -3
  46. package/src/components/sidebar/CSidebar.ts +2 -10
  47. package/src/components/{pagination → smart-pagination}/CSmartPagination.ts +1 -2
  48. package/src/components/smart-pagination/index.ts +10 -0
  49. package/src/components/smart-table/CSmartTable.ts +10 -5
  50. package/src/components/smart-table/CSmartTableInterface.ts +4 -0
  51. package/src/components/table/CTableCaption.ts +0 -1
  52. package/src/components/time-picker/CTimePicker.ts +73 -20
  53. package/src/components/time-picker/CTimePickerRollCol.ts +9 -0
  54. package/src/utils/getNextSibling.ts +18 -0
  55. package/src/utils/getPreviousSibling.ts +18 -0
  56. package/src/utils/index.ts +5 -0
  57. package/src/utils/isVisible.ts +11 -0
  58. package/src/utils/time.ts +14 -6
@@ -0,0 +1,257 @@
1
+ declare const CSmartPagination: import("vue").DefineComponent<{
2
+ /**
3
+ * Horizontall align
4
+ *
5
+ * @default 'start'
6
+ */
7
+ align: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ require: boolean;
11
+ validator: (value: string) => boolean;
12
+ };
13
+ /**
14
+ * Current page number
15
+ *
16
+ * @default 1
17
+ */
18
+ activePage: {
19
+ type: NumberConstructor;
20
+ default: number;
21
+ require: boolean;
22
+ };
23
+ /**
24
+ * Show/hide arrows
25
+ *
26
+ * @default true
27
+ */
28
+ arrows: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ require: boolean;
32
+ };
33
+ /**
34
+ * Show/hide dots
35
+ *
36
+ * @default true
37
+ */
38
+ dots: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ require: boolean;
42
+ };
43
+ /**
44
+ * Show double arrows buttons
45
+ *
46
+ * @default true
47
+ */
48
+ doubleArrows: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ require: boolean;
52
+ };
53
+ /**
54
+ * The content of 'firstButton' button
55
+ *
56
+ * @default '&laquo;'
57
+ */
58
+ firstButton: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ require: boolean;
62
+ };
63
+ /**
64
+ * The content of 'lastButton' button
65
+ *
66
+ * @default '&raquo;'
67
+ */
68
+ lastButton: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ require: boolean;
72
+ };
73
+ /**
74
+ * Maximum items number
75
+ *
76
+ * @default 5
77
+ */
78
+ limit: {
79
+ type: NumberConstructor;
80
+ default: number;
81
+ require: boolean;
82
+ };
83
+ /**
84
+ * The content of 'nextButton' button
85
+ *
86
+ * @default '&rsaquo;'
87
+ */
88
+ nextButton: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ require: boolean;
92
+ };
93
+ /**
94
+ * Number of pages
95
+ */
96
+ pages: {
97
+ type: NumberConstructor;
98
+ default: number;
99
+ require: boolean;
100
+ };
101
+ /**
102
+ * The content of 'previousButton' button
103
+ *
104
+ * @default '&lsaquo;'
105
+ */
106
+ previousButton: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ require: boolean;
110
+ };
111
+ /**
112
+ * Size of pagination, valid values: 'sm', 'lg'
113
+ */
114
+ size: {
115
+ type: StringConstructor;
116
+ default: undefined;
117
+ required: false;
118
+ validator: (value: string) => boolean;
119
+ };
120
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
121
+ [key: string]: any;
122
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "activePageChange"[], "activePageChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
123
+ /**
124
+ * Horizontall align
125
+ *
126
+ * @default 'start'
127
+ */
128
+ align: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ require: boolean;
132
+ validator: (value: string) => boolean;
133
+ };
134
+ /**
135
+ * Current page number
136
+ *
137
+ * @default 1
138
+ */
139
+ activePage: {
140
+ type: NumberConstructor;
141
+ default: number;
142
+ require: boolean;
143
+ };
144
+ /**
145
+ * Show/hide arrows
146
+ *
147
+ * @default true
148
+ */
149
+ arrows: {
150
+ type: BooleanConstructor;
151
+ default: boolean;
152
+ require: boolean;
153
+ };
154
+ /**
155
+ * Show/hide dots
156
+ *
157
+ * @default true
158
+ */
159
+ dots: {
160
+ type: BooleanConstructor;
161
+ default: boolean;
162
+ require: boolean;
163
+ };
164
+ /**
165
+ * Show double arrows buttons
166
+ *
167
+ * @default true
168
+ */
169
+ doubleArrows: {
170
+ type: BooleanConstructor;
171
+ default: boolean;
172
+ require: boolean;
173
+ };
174
+ /**
175
+ * The content of 'firstButton' button
176
+ *
177
+ * @default '&laquo;'
178
+ */
179
+ firstButton: {
180
+ type: StringConstructor;
181
+ default: string;
182
+ require: boolean;
183
+ };
184
+ /**
185
+ * The content of 'lastButton' button
186
+ *
187
+ * @default '&raquo;'
188
+ */
189
+ lastButton: {
190
+ type: StringConstructor;
191
+ default: string;
192
+ require: boolean;
193
+ };
194
+ /**
195
+ * Maximum items number
196
+ *
197
+ * @default 5
198
+ */
199
+ limit: {
200
+ type: NumberConstructor;
201
+ default: number;
202
+ require: boolean;
203
+ };
204
+ /**
205
+ * The content of 'nextButton' button
206
+ *
207
+ * @default '&rsaquo;'
208
+ */
209
+ nextButton: {
210
+ type: StringConstructor;
211
+ default: string;
212
+ require: boolean;
213
+ };
214
+ /**
215
+ * Number of pages
216
+ */
217
+ pages: {
218
+ type: NumberConstructor;
219
+ default: number;
220
+ require: boolean;
221
+ };
222
+ /**
223
+ * The content of 'previousButton' button
224
+ *
225
+ * @default '&lsaquo;'
226
+ */
227
+ previousButton: {
228
+ type: StringConstructor;
229
+ default: string;
230
+ require: boolean;
231
+ };
232
+ /**
233
+ * Size of pagination, valid values: 'sm', 'lg'
234
+ */
235
+ size: {
236
+ type: StringConstructor;
237
+ default: undefined;
238
+ required: false;
239
+ validator: (value: string) => boolean;
240
+ };
241
+ }>> & {
242
+ onActivePageChange?: ((...args: any[]) => any) | undefined;
243
+ }, {
244
+ size: string;
245
+ align: string;
246
+ activePage: number;
247
+ arrows: boolean;
248
+ dots: boolean;
249
+ doubleArrows: boolean;
250
+ firstButton: string;
251
+ lastButton: string;
252
+ limit: number;
253
+ nextButton: string;
254
+ pages: number;
255
+ previousButton: string;
256
+ }>;
257
+ export { CSmartPagination };
@@ -0,0 +1,6 @@
1
+ import { App } from 'vue';
2
+ import { CSmartPagination } from './CSmartPagination';
3
+ declare const CSmartPaginationPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { CSmartPaginationPlugin, CSmartPagination };
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { Column, ColumnFilter, ColumnFilterValue, Item, ItemsPerPageSelect, Sorter, SorterValue, TableFilter } from './CSmartTableInterface';
2
+ import { Column, ColumnFilter, ColumnFilterValue, Item, ItemsPerPageSelect, Pagination, Sorter, SorterValue, TableFilter } from './CSmartTableInterface';
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.
@@ -105,6 +105,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
105
105
  */
106
106
  itemsPerPage: {
107
107
  type: NumberConstructor;
108
+ default: number;
108
109
  required: false;
109
110
  };
110
111
  /**
@@ -153,7 +154,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
153
154
  * 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.
154
155
  */
155
156
  pagination: {
156
- type: BooleanConstructor;
157
+ type: PropType<boolean | Pagination>;
157
158
  required: false;
158
159
  };
159
160
  /**
@@ -351,6 +352,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
351
352
  */
352
353
  itemsPerPage: {
353
354
  type: NumberConstructor;
355
+ default: number;
354
356
  required: false;
355
357
  };
356
358
  /**
@@ -399,7 +401,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
399
401
  * 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.
400
402
  */
401
403
  pagination: {
402
- type: BooleanConstructor;
404
+ type: PropType<boolean | Pagination>;
403
405
  required: false;
404
406
  };
405
407
  /**
@@ -505,7 +507,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
505
507
  header: boolean;
506
508
  cleaner: boolean;
507
509
  loading: boolean;
508
- pagination: boolean;
509
510
  activePage: number;
510
511
  tableFootProps: Record<string, any>;
511
512
  tableHeadProps: Record<string, any>;
@@ -513,6 +514,7 @@ declare const CSmartTable: import("vue").DefineComponent<{
513
514
  selectable: boolean;
514
515
  columnFilterValue: ColumnFilterValue;
515
516
  columnSorter: boolean | Sorter;
517
+ itemsPerPage: number;
516
518
  itemsPerPageLabel: string;
517
519
  itemsPerPageOptions: number[];
518
520
  itemsPerPageSelect: boolean | ItemsPerPageSelect;
@@ -16,7 +16,7 @@ declare const CSmartTableFilter: import("vue").DefineComponent<{
16
16
  };
17
17
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
18
18
  [key: string]: any;
19
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("filterInput" | "filterChange")[], "filterInput" | "filterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("filterChange" | "filterInput")[], "filterChange" | "filterInput", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
20
  filterLabel: {
21
21
  type: StringConstructor;
22
22
  require: boolean;
@@ -33,8 +33,8 @@ declare const CSmartTableFilter: import("vue").DefineComponent<{
33
33
  default: string;
34
34
  };
35
35
  }>> & {
36
- onFilterInput?: ((...args: any[]) => any) | undefined;
37
36
  onFilterChange?: ((...args: any[]) => any) | undefined;
37
+ onFilterInput?: ((...args: any[]) => any) | undefined;
38
38
  }, {
39
39
  value: string | number;
40
40
  filterLabel: string;
@@ -43,7 +43,7 @@ declare const CSmartTableHead: import("vue").DefineComponent<{
43
43
  };
44
44
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
45
45
  [key: string]: any;
46
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("customFilterChange" | "filterInput" | "filterChange" | "selectAllChecked" | "sortClick")[], "customFilterChange" | "filterInput" | "filterChange" | "selectAllChecked" | "sortClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
46
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("filterChange" | "customFilterChange" | "filterInput" | "selectAllChecked" | "sortClick")[], "filterChange" | "customFilterChange" | "filterInput" | "selectAllChecked" | "sortClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
47
47
  clearSorterAndFilter: {
48
48
  type: StringConstructor;
49
49
  require: boolean;
@@ -85,9 +85,9 @@ declare const CSmartTableHead: import("vue").DefineComponent<{
85
85
  require: boolean;
86
86
  };
87
87
  }>> & {
88
+ onFilterChange?: ((...args: any[]) => any) | undefined;
88
89
  onCustomFilterChange?: ((...args: any[]) => any) | undefined;
89
90
  onFilterInput?: ((...args: any[]) => any) | undefined;
90
- onFilterChange?: ((...args: any[]) => any) | undefined;
91
91
  onSelectAllChecked?: ((...args: any[]) => any) | undefined;
92
92
  onSortClick?: ((...args: any[]) => any) | undefined;
93
93
  }, {
@@ -17,7 +17,7 @@ export interface ColumnFilter {
17
17
  export interface ColumnFilterValue {
18
18
  [key: string]: number | string | any;
19
19
  }
20
- export declare type Item = {
20
+ export type Item = {
21
21
  [key: string]: number | string | any;
22
22
  _id: number;
23
23
  _props: Object;
@@ -28,6 +28,9 @@ export interface ItemsPerPageSelect {
28
28
  label?: string;
29
29
  values?: Array<number>;
30
30
  }
31
+ export interface Pagination {
32
+ external?: boolean;
33
+ }
31
34
  export interface Sorter {
32
35
  resetable?: boolean;
33
36
  external?: boolean;
@@ -9,7 +9,7 @@ export interface FooterItem {
9
9
  label?: string;
10
10
  _props?: any;
11
11
  }
12
- export declare type Item = {
12
+ export type Item = {
13
13
  [key: string]: number | string | any;
14
14
  _props?: any;
15
15
  };
@@ -1,10 +1,4 @@
1
- declare const CTableCaption: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
2
- [x: string]: unknown;
3
- }>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1
+ declare const CTableCaption: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
4
2
  [key: string]: any;
5
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, readonly string[] | Readonly<import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
6
- [x: string]: unknown;
7
- }>>>>, {
8
- [x: number]: string;
9
- } | {}>;
3
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
10
4
  export { CTableCaption };
@@ -1,9 +1,10 @@
1
1
  declare const CTimePicker: import("vue").DefineComponent<any, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
2
2
  [key: string]: any;
3
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "hide" | "show")[], "change" | "hide" | "show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any> & {
3
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "hide" | "show" | "update:time")[], "change" | "hide" | "show" | "update:time", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any> & {
4
4
  onHide?: ((...args: any[]) => any) | undefined;
5
5
  onShow?: ((...args: any[]) => any) | undefined;
6
6
  onChange?: ((...args: any[]) => any) | undefined;
7
+ "onUpdate:time"?: ((...args: any[]) => any) | undefined;
7
8
  }, {} | {
8
9
  [x: string]: any;
9
10
  }>;
@@ -93,7 +93,7 @@ declare const CTooltip: import("vue").DefineComponent<{
93
93
  visible: boolean;
94
94
  placement: Placement;
95
95
  trigger: string | string[];
96
- content: string;
97
96
  offset: unknown[];
97
+ content: string;
98
98
  }>;
99
99
  export { CTooltip };
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- declare type Value = {
2
+ type Value = {
3
3
  title?: string;
4
4
  value?: number | string;
5
5
  };