@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
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
Several quick start options are available:
|
|
48
48
|
|
|
49
|
-
- [Download the latest release](https://github.com/coreui/coreui-vue-pro/archive/v4.
|
|
49
|
+
- [Download the latest release](https://github.com/coreui/coreui-vue-pro/archive/v4.7.0.zip)
|
|
50
50
|
- Clone the repo: `git clone https://github.com/coreui/coreui-vue-pro.git`
|
|
51
51
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/vue-pro`
|
|
52
52
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/vue-pro`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const convertToLocalDate: (d: Date, locale: string, options?: {}) => string;
|
|
2
|
+
export declare const convertToLocalTime: (d: Date, locale: string, options?: {}) => string;
|
|
3
|
+
export declare const createGroupsInArray: <T>(arr: T[], numberOfGroups: number) => T[][];
|
|
4
|
+
export declare const getCurrentYear: () => number;
|
|
5
|
+
export declare const getCurrentMonth: () => number;
|
|
6
|
+
export declare const getLocalDateFromString: (string: string, locale: string, time?: boolean) => Date | undefined;
|
|
7
|
+
export declare const getMonthName: (month: number, locale: string) => string;
|
|
8
|
+
export declare const getMonthsNames: (locale: string) => string[];
|
|
9
|
+
export declare const getYears: (year: number) => number[];
|
|
10
|
+
export declare const getMonthDetails: (year: number, month: number, firstDayOfWeek: number) => {
|
|
11
|
+
date: Date;
|
|
12
|
+
month: string;
|
|
13
|
+
}[][];
|
|
14
|
+
export declare const isDisableDateInRange: (startDate?: Date | null, endDate?: Date | null, dates?: Date[] | Date[][] | (Date | Date[])[]) => boolean;
|
|
15
|
+
export declare const isDateDisabled: (date: Date, min?: Date | null, max?: Date | null, dates?: Date[] | Date[][] | (Date | Date[])[]) => boolean | undefined;
|
|
16
|
+
export declare const isDateInRange: (date: Date, start: Date | null, end: Date | null) => boolean | null;
|
|
17
|
+
export declare const isDateSelected: (date: Date, start: Date | null, end: Date | null) => boolean | null;
|
|
18
|
+
export declare const isEndDate: (date: Date, start: Date | null, end: Date | null) => boolean | null;
|
|
19
|
+
export declare const isLastDayOfMonth: (date: Date) => boolean;
|
|
20
|
+
export declare const isSameDateAs: (date: Date | null, date2: Date | null) => boolean;
|
|
21
|
+
export declare const isStartDate: (date: Date, start: Date | null, end: Date | null) => boolean | null;
|
|
22
|
+
export declare const isToday: (date: Date) => boolean;
|
|
23
|
+
export declare const isValidDate: (date: string) => number | false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
declare const CElementCover: import("vue").DefineComponent<{
|
|
2
3
|
/**
|
|
3
4
|
* Array of custom boundaries. Use to create custom cover area (instead of parent element area). Area is defined by four sides: 'top', 'bottom', 'right', 'left'. If side is not defined by any custom boundary it is equal to parent element boundary. Each custom boundary is object with keys:
|
|
@@ -6,10 +7,10 @@ declare const CElementCover: import("vue").DefineComponent<{
|
|
|
6
7
|
*
|
|
7
8
|
* @type {sides: string[], query: string}[]
|
|
8
9
|
*/
|
|
9
|
-
boundaries: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
10
|
+
boundaries: PropType<{
|
|
11
|
+
sides: string[];
|
|
12
|
+
query: string;
|
|
13
|
+
}[]>;
|
|
13
14
|
/**
|
|
14
15
|
* Opacity of the cover. [docs]
|
|
15
16
|
*
|
|
@@ -17,7 +18,7 @@ declare const CElementCover: import("vue").DefineComponent<{
|
|
|
17
18
|
*/
|
|
18
19
|
opacity: {
|
|
19
20
|
type: NumberConstructor;
|
|
20
|
-
|
|
21
|
+
default: number;
|
|
21
22
|
};
|
|
22
23
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
24
|
[key: string]: any;
|
|
@@ -29,10 +30,10 @@ declare const CElementCover: import("vue").DefineComponent<{
|
|
|
29
30
|
*
|
|
30
31
|
* @type {sides: string[], query: string}[]
|
|
31
32
|
*/
|
|
32
|
-
boundaries: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
33
|
+
boundaries: PropType<{
|
|
34
|
+
sides: string[];
|
|
35
|
+
query: string;
|
|
36
|
+
}[]>;
|
|
36
37
|
/**
|
|
37
38
|
* Opacity of the cover. [docs]
|
|
38
39
|
*
|
|
@@ -40,7 +41,9 @@ declare const CElementCover: import("vue").DefineComponent<{
|
|
|
40
41
|
*/
|
|
41
42
|
opacity: {
|
|
42
43
|
type: NumberConstructor;
|
|
43
|
-
|
|
44
|
+
default: number;
|
|
44
45
|
};
|
|
45
|
-
}>>, {
|
|
46
|
+
}>>, {
|
|
47
|
+
opacity: number;
|
|
48
|
+
}>;
|
|
46
49
|
export { CElementCover };
|
|
@@ -7,18 +7,17 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
7
7
|
*/
|
|
8
8
|
alignment: {
|
|
9
9
|
default: string;
|
|
10
|
-
required: false;
|
|
11
10
|
validator: (value: string) => boolean;
|
|
12
11
|
};
|
|
13
12
|
/**
|
|
14
13
|
* Apply a backdrop on body while offcanvas is open.
|
|
15
14
|
*
|
|
16
|
-
* @values 'static'
|
|
15
|
+
* @values boolean | 'static'
|
|
17
16
|
*/
|
|
18
17
|
backdrop: {
|
|
19
18
|
type: (StringConstructor | BooleanConstructor)[];
|
|
20
19
|
default: boolean;
|
|
21
|
-
|
|
20
|
+
validator: (value: boolean | string) => boolean;
|
|
22
21
|
};
|
|
23
22
|
/**
|
|
24
23
|
* A string of all className you want applied to the modal content component.
|
|
@@ -26,7 +25,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
26
25
|
contentClassName: {
|
|
27
26
|
type: StringConstructor;
|
|
28
27
|
default: undefined;
|
|
29
|
-
required: false;
|
|
30
28
|
};
|
|
31
29
|
/**
|
|
32
30
|
* Set modal to covers the entire user viewport
|
|
@@ -36,7 +34,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
36
34
|
fullscreen: {
|
|
37
35
|
type: (StringConstructor | BooleanConstructor)[];
|
|
38
36
|
default: undefined;
|
|
39
|
-
required: false;
|
|
40
37
|
validator: (value: boolean | string) => boolean;
|
|
41
38
|
};
|
|
42
39
|
/**
|
|
@@ -45,14 +42,12 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
45
42
|
keyboard: {
|
|
46
43
|
type: BooleanConstructor;
|
|
47
44
|
default: boolean;
|
|
48
|
-
required: false;
|
|
49
45
|
};
|
|
50
46
|
/**
|
|
51
47
|
* Create a scrollable modal that allows scrolling the modal body.
|
|
52
48
|
*/
|
|
53
49
|
scrollable: {
|
|
54
50
|
type: BooleanConstructor;
|
|
55
|
-
required: false;
|
|
56
51
|
};
|
|
57
52
|
/**
|
|
58
53
|
* Size the component small, large, or extra large.
|
|
@@ -62,7 +57,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
62
57
|
size: {
|
|
63
58
|
type: StringConstructor;
|
|
64
59
|
default: undefined;
|
|
65
|
-
required: false;
|
|
66
60
|
validator: (value: string) => boolean;
|
|
67
61
|
};
|
|
68
62
|
/**
|
|
@@ -71,7 +65,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
71
65
|
transition: {
|
|
72
66
|
type: BooleanConstructor;
|
|
73
67
|
default: boolean;
|
|
74
|
-
required: false;
|
|
75
68
|
};
|
|
76
69
|
/**
|
|
77
70
|
* By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
|
|
@@ -79,7 +72,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
79
72
|
unmountOnClose: {
|
|
80
73
|
type: BooleanConstructor;
|
|
81
74
|
default: boolean;
|
|
82
|
-
required: false;
|
|
83
75
|
};
|
|
84
76
|
/**
|
|
85
77
|
* Toggle the visibility of alert component.
|
|
@@ -95,18 +87,17 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
95
87
|
*/
|
|
96
88
|
alignment: {
|
|
97
89
|
default: string;
|
|
98
|
-
required: false;
|
|
99
90
|
validator: (value: string) => boolean;
|
|
100
91
|
};
|
|
101
92
|
/**
|
|
102
93
|
* Apply a backdrop on body while offcanvas is open.
|
|
103
94
|
*
|
|
104
|
-
* @values 'static'
|
|
95
|
+
* @values boolean | 'static'
|
|
105
96
|
*/
|
|
106
97
|
backdrop: {
|
|
107
98
|
type: (StringConstructor | BooleanConstructor)[];
|
|
108
99
|
default: boolean;
|
|
109
|
-
|
|
100
|
+
validator: (value: boolean | string) => boolean;
|
|
110
101
|
};
|
|
111
102
|
/**
|
|
112
103
|
* A string of all className you want applied to the modal content component.
|
|
@@ -114,7 +105,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
114
105
|
contentClassName: {
|
|
115
106
|
type: StringConstructor;
|
|
116
107
|
default: undefined;
|
|
117
|
-
required: false;
|
|
118
108
|
};
|
|
119
109
|
/**
|
|
120
110
|
* Set modal to covers the entire user viewport
|
|
@@ -124,7 +114,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
124
114
|
fullscreen: {
|
|
125
115
|
type: (StringConstructor | BooleanConstructor)[];
|
|
126
116
|
default: undefined;
|
|
127
|
-
required: false;
|
|
128
117
|
validator: (value: boolean | string) => boolean;
|
|
129
118
|
};
|
|
130
119
|
/**
|
|
@@ -133,14 +122,12 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
133
122
|
keyboard: {
|
|
134
123
|
type: BooleanConstructor;
|
|
135
124
|
default: boolean;
|
|
136
|
-
required: false;
|
|
137
125
|
};
|
|
138
126
|
/**
|
|
139
127
|
* Create a scrollable modal that allows scrolling the modal body.
|
|
140
128
|
*/
|
|
141
129
|
scrollable: {
|
|
142
130
|
type: BooleanConstructor;
|
|
143
|
-
required: false;
|
|
144
131
|
};
|
|
145
132
|
/**
|
|
146
133
|
* Size the component small, large, or extra large.
|
|
@@ -150,7 +137,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
150
137
|
size: {
|
|
151
138
|
type: StringConstructor;
|
|
152
139
|
default: undefined;
|
|
153
|
-
required: false;
|
|
154
140
|
validator: (value: string) => boolean;
|
|
155
141
|
};
|
|
156
142
|
/**
|
|
@@ -159,7 +145,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
159
145
|
transition: {
|
|
160
146
|
type: BooleanConstructor;
|
|
161
147
|
default: boolean;
|
|
162
|
-
required: false;
|
|
163
148
|
};
|
|
164
149
|
/**
|
|
165
150
|
* By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
|
|
@@ -167,7 +152,6 @@ declare const CModal: import("vue").DefineComponent<{
|
|
|
167
152
|
unmountOnClose: {
|
|
168
153
|
type: BooleanConstructor;
|
|
169
154
|
default: boolean;
|
|
170
|
-
required: false;
|
|
171
155
|
};
|
|
172
156
|
/**
|
|
173
157
|
* Toggle the visibility of alert component.
|
|
@@ -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 };
|