@farris/ui-vue 1.0.0-beta.3 → 1.0.0-beta.4
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/accordion/package.json +3 -2
- package/avatar/package.json +3 -2
- package/button/package.json +3 -2
- package/button-edit/package.json +3 -2
- package/checkbox/package.json +3 -2
- package/combo-list/package.json +3 -2
- package/data-grid/index.esm.js +1 -2
- package/data-grid/index.umd.js +1 -1
- package/data-grid/package.json +3 -2
- package/date-picker/package.json +3 -2
- package/farris.all.esm.js +1 -2
- package/farris.all.umd.js +1 -1
- package/list-view/package.json +3 -2
- package/message-box/package.json +3 -2
- package/modal/package.json +3 -2
- package/notify/package.json +3 -2
- package/package.json +3 -2
- package/pagination/package.json +3 -2
- package/popover/package.json +3 -2
- package/radio-group/package.json +3 -2
- package/section/package.json +3 -2
- package/switch/package.json +3 -2
- package/tabs/package.json +3 -2
- package/text/package.json +3 -2
- package/tooltip/package.json +3 -2
- package/types/accordion/index.d.ts +25 -0
- package/types/accordion/src/accordion.component.d.ts +70 -0
- package/types/accordion/src/accordion.props.d.ts +50 -0
- package/types/accordion/src/components/accordion-item.component.d.ts +38 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +34 -0
- package/types/avatar/index.d.ts +23 -0
- package/types/avatar/src/avatar.component.d.ts +109 -0
- package/types/avatar/src/avatar.props.d.ts +96 -0
- package/types/avatar/src/composition/types.d.ts +31 -0
- package/types/avatar/src/composition/use-image.d.ts +19 -0
- package/types/button/index.d.ts +24 -0
- package/types/button/src/button-group.component.d.ts +106 -0
- package/types/button/src/button-group.props.d.ts +106 -0
- package/types/button/src/button.component.d.ts +34 -0
- package/types/button/src/button.props.d.ts +47 -0
- package/types/button/src/composition/types-group.d.ts +24 -0
- package/types/button/src/composition/types.d.ts +24 -0
- package/types/button/src/composition/use-button-group.d.ts +19 -0
- package/types/button/src/composition/use-button.d.ts +19 -0
- package/types/button-edit/index.d.ts +23 -0
- package/types/button-edit/src/button-edit.props.d.ts +135 -0
- package/types/button-edit/src/composition/types.d.ts +118 -0
- package/types/button-edit/src/composition/use-button.d.ts +19 -0
- package/types/button-edit/src/composition/use-clear.d.ts +19 -0
- package/types/button-edit/src/composition/use-text-box.d.ts +19 -0
- package/types/checkbox/index.d.ts +23 -0
- package/types/checkbox/src/checkbox-group.component.d.ts +148 -0
- package/types/checkbox/src/checkbox-group.props.d.ts +123 -0
- package/types/checkbox/src/composition/types.d.ts +46 -0
- package/types/checkbox/src/composition/use-checkbox-group.d.ts +19 -0
- package/types/combo-list/index.d.ts +25 -0
- package/types/combo-list/src/combo-list.props.d.ts +290 -0
- package/types/combo-list/src/components/option.component.d.ts +39 -0
- package/types/combo-list/src/components/options.component.d.ts +10 -0
- package/types/combo-list/src/composition/index.d.ts +18 -0
- package/types/combo-list/src/composition/use-combo-list.d.ts +30 -0
- package/types/combo-list/src/composition/use-option.d.ts +19 -0
- package/types/combo-list/src/composition/use-options.d.ts +2 -0
- package/types/combo-list/src/composition/use-panel.d.ts +8 -0
- package/types/combo-list/src/const.d.ts +40 -0
- package/types/combo-list/src/types.d.ts +186 -0
- package/types/data-grid/index.d.ts +23 -0
- package/types/data-grid/src/components/data/data-area.component.d.ts +21 -0
- package/types/data-grid/src/components/editors/date-picker.component.d.ts +2 -0
- package/types/data-grid/src/components/editors/text-area-editor.component.d.ts +2 -0
- package/types/data-grid/src/components/editors/text-editor.component.d.ts +17 -0
- package/types/data-grid/src/components/header/data-grid-header.component.d.ts +22 -0
- package/types/data-grid/src/components/pagination/data-grid-pagination.component.d.ts +5 -0
- package/types/data-grid/src/components/scrollbar/horizontal-scrollbar.component.d.ts +21 -0
- package/types/data-grid/src/components/scrollbar/vertical-scrollbar.component.d.ts +21 -0
- package/types/data-grid/src/components/sidebar/data-grid-sidebar.component.d.ts +21 -0
- package/types/data-grid/src/components/summary/data-grid-summary.component.d.ts +5 -0
- package/types/data-grid/src/composition/types.d.ts +175 -0
- package/types/data-grid/src/composition/use-column.d.ts +17 -0
- package/types/data-grid/src/composition/use-data-view.d.ts +19 -0
- package/types/data-grid/src/composition/use-edit.d.ts +18 -0
- package/types/data-grid/src/composition/use-fit-column.d.ts +20 -0
- package/types/data-grid/src/composition/use-group-column.d.ts +22 -0
- package/types/data-grid/src/composition/use-group-data.d.ts +3 -0
- package/types/data-grid/src/composition/use-positon-style.d.ts +20 -0
- package/types/data-grid/src/composition/use-resize.d.ts +20 -0
- package/types/data-grid/src/composition/use-row.d.ts +3 -0
- package/types/data-grid/src/composition/use-sidebar.d.ts +3 -0
- package/types/data-grid/src/composition/use-virtual-scroll.d.ts +20 -0
- package/types/data-grid/src/composition/use-visual-data.d.ts +19 -0
- package/types/data-grid/src/data-grid.component.d.ts +278 -0
- package/types/data-grid/src/data-grid.props.d.ts +650 -0
- package/types/date-picker/index.d.ts +28 -0
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +166 -0
- package/types/date-picker/src/components/calendar/calendar.props.d.ts +94 -0
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +138 -0
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.props.d.ts +81 -0
- package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +626 -0
- package/types/date-picker/src/components/date-picker-container/date-picker-container.props.d.ts +306 -0
- package/types/date-picker/src/components/month/month.component.d.ts +86 -0
- package/types/date-picker/src/components/month/month.props.d.ts +57 -0
- package/types/date-picker/src/components/year/year.component.d.ts +86 -0
- package/types/date-picker/src/components/year/year.props.d.ts +57 -0
- package/types/date-picker/src/composition/types.d.ts +102 -0
- package/types/date-picker/src/composition/use-calendar.d.ts +2 -0
- package/types/date-picker/src/composition/use-compare.d.ts +2 -0
- package/types/date-picker/src/composition/use-date.d.ts +2 -0
- package/types/date-picker/src/composition/use-disable-date.d.ts +18 -0
- package/types/date-picker/src/composition/use-disable-month.d.ts +2 -0
- package/types/date-picker/src/composition/use-event.d.ts +45 -0
- package/types/date-picker/src/composition/use-mark.d.ts +2 -0
- package/types/date-picker/src/composition/use-month.d.ts +2 -0
- package/types/date-picker/src/composition/use-number.d.ts +2 -0
- package/types/date-picker/src/composition/use-year.d.ts +2 -0
- package/types/date-picker/src/date-picker.props.d.ts +168 -0
- package/types/date-picker/src/types/calendar.d.ts +30 -0
- package/types/date-picker/src/types/common.d.ts +42 -0
- package/types/date-picker/src/types/date-model.d.ts +38 -0
- package/types/date-picker/src/types/month.d.ts +48 -0
- package/types/date-picker/src/types/year.d.ts +24 -0
- package/types/index.d.ts +20 -0
- package/types/list-view/index.d.ts +23 -0
- package/types/list-view/src/components/list-view-checkbox.component.d.ts +32 -0
- package/types/list-view/src/components/list-view-checkbox.props.d.ts +31 -0
- package/types/list-view/src/list-view.props.d.ts +44 -0
- package/types/message-box/index.d.ts +24 -0
- package/types/message-box/src/composition/types.d.ts +18 -0
- package/types/message-box/src/composition/use-copy.d.ts +18 -0
- package/types/message-box/src/message-box.component.d.ts +72 -0
- package/types/message-box/src/message-box.props.d.ts +52 -0
- package/types/modal/index.d.ts +23 -0
- package/types/modal/src/modal.component.d.ts +104 -0
- package/types/modal/src/modal.props.d.ts +72 -0
- package/types/notify/index.d.ts +26 -0
- package/types/notify/src/components/toast.component.d.ts +21 -0
- package/types/notify/src/components/toast.props.d.ts +27 -0
- package/types/notify/src/notify.props.d.ts +99 -0
- package/types/number-range/index.d.ts +23 -0
- package/types/number-range/src/composition/types.d.ts +52 -0
- package/types/number-range/src/composition/use-data.d.ts +19 -0
- package/types/number-range/src/composition/use-util.d.ts +19 -0
- package/types/number-range/src/number-range.component.d.ts +247 -0
- package/types/number-range/src/number-range.props.d.ts +216 -0
- package/types/number-spinner/index.d.ts +23 -0
- package/types/number-spinner/src/composition/types.d.ts +52 -0
- package/types/number-spinner/src/composition/use-data.d.ts +19 -0
- package/types/number-spinner/src/composition/use-util.d.ts +19 -0
- package/types/number-spinner/src/number-spinner.component.d.ts +202 -0
- package/types/number-spinner/src/number-spinner.props.d.ts +181 -0
- package/types/overlay/src/overlay.component.d.ts +20 -0
- package/types/overlay/src/overlay.props.d.ts +26 -0
- package/types/pagination/index.d.ts +23 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +19 -0
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +20 -0
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +20 -0
- package/types/pagination/src/components/pages/page-info.component.d.ts +19 -0
- package/types/pagination/src/components/pages/page-list.component.d.ts +19 -0
- package/types/pagination/src/components/pages/page-number.component.d.ts +20 -0
- package/types/pagination/src/composition/types.d.ts +24 -0
- package/types/pagination/src/composition/use-pages.d.ts +18 -0
- package/types/pagination/src/pagination.components.d.ts +41 -0
- package/types/pagination/src/pagination.props.d.ts +36 -0
- package/types/popover/index.d.ts +24 -0
- package/types/popover/src/popover.component.d.ts +26 -0
- package/types/popover/src/popover.directive.d.ts +5 -0
- package/types/popover/src/popover.props.d.ts +30 -0
- package/types/radio-group/index.d.ts +23 -0
- package/types/radio-group/src/composition/change-radio.d.ts +19 -0
- package/types/radio-group/src/composition/types.d.ts +42 -0
- package/types/radio-group/src/radio-group.component.d.ts +91 -0
- package/types/radio-group/src/radio-group.props.d.ts +87 -0
- package/types/section/index.d.ts +23 -0
- package/types/section/src/section.component.d.ts +187 -0
- package/types/section/src/section.props.d.ts +117 -0
- package/types/switch/index.d.ts +23 -0
- package/types/switch/src/switch.component.d.ts +66 -0
- package/types/switch/src/switch.props.d.ts +52 -0
- package/types/tabs/index.d.ts +25 -0
- package/types/tabs/src/components/tab-page.component.d.ts +101 -0
- package/types/tabs/src/components/tab-page.props.d.ts +63 -0
- package/types/tabs/src/composition/types.d.ts +35 -0
- package/types/tabs/src/composition/use-tabs.d.ts +18 -0
- package/types/tabs/src/tabs.component.d.ts +149 -0
- package/types/tabs/src/tabs.props.d.ts +86 -0
- package/types/text/index.d.ts +23 -0
- package/types/text/src/text.component.d.ts +14 -0
- package/types/text/src/text.props.d.ts +26 -0
- package/types/tooltip/index.d.ts +24 -0
- package/types/tooltip/src/composition/types.d.ts +45 -0
- package/types/tooltip/src/composition/use-adjust-placement.d.ts +20 -0
- package/types/tooltip/src/composition/use-adjust-position.d.ts +6 -0
- package/types/tooltip/src/composition/use-calculate-position.d.ts +21 -0
- package/types/tooltip/src/composition/use-relative.d.ts +19 -0
- package/types/tooltip/src/composition/use-tooltip-position.d.ts +22 -0
- package/types/tooltip/src/tooltip.component.d.ts +56 -0
- package/types/tooltip/src/tooltip.props.d.ts +45 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { CalendarWeekItem } from "../types/calendar";
|
|
17
|
+
import { DateObject, Period, MarkedDates, MarkStatus } from "../types/common";
|
|
18
|
+
import { DateModel } from "../types/date-model";
|
|
19
|
+
import { ActiveMonth, MonthViewItem, NameOfMonths } from "../types/month";
|
|
20
|
+
import { YearViewItem } from "../types/year";
|
|
21
|
+
export interface DateFormatInfo {
|
|
22
|
+
value: string;
|
|
23
|
+
format: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UseDateFormat {
|
|
26
|
+
formatDate: (date: DateObject, dateFormat: string, monthLabels: NameOfMonths) => string;
|
|
27
|
+
getDateValue: (dateStr: string, dateFormat: string, delimeters: string[] | null) => DateFormatInfo[];
|
|
28
|
+
preZero: (val: number) => string;
|
|
29
|
+
remove: (format: string, delStr: string) => string;
|
|
30
|
+
}
|
|
31
|
+
export interface UseDate {
|
|
32
|
+
emptyDate: () => DateObject;
|
|
33
|
+
getDate: (date: DateObject) => Date;
|
|
34
|
+
getDate2: (date: DateObject) => Date;
|
|
35
|
+
getDayNumber: (date: DateObject) => number;
|
|
36
|
+
getWeekdayIndex: (wd: string) => number;
|
|
37
|
+
getTimeInMilliseconds: (date: DateObject) => number;
|
|
38
|
+
getEpocTime: (date: DateObject) => number;
|
|
39
|
+
getNearDate: (now: DateObject, min: DateObject, max: DateObject) => DateObject;
|
|
40
|
+
getToday(): DateObject;
|
|
41
|
+
}
|
|
42
|
+
export interface UseNumber {
|
|
43
|
+
getDayNumber: (date: DateObject) => number;
|
|
44
|
+
getNumberByValue: (df: DateFormatInfo) => number;
|
|
45
|
+
getMonthNumberByMonthName: (df: DateFormatInfo, monthLabels: NameOfMonths) => number;
|
|
46
|
+
getWeekNumber: (date: DateObject) => number;
|
|
47
|
+
}
|
|
48
|
+
export interface UseNormalizeDate {
|
|
49
|
+
normalizeDate: (dateString: string, useValueFormat: boolean) => DateObject;
|
|
50
|
+
}
|
|
51
|
+
export interface UseCompare {
|
|
52
|
+
isDateEarlier: (firstDate: DateObject, secondDate: DateObject) => boolean;
|
|
53
|
+
equal: (firstDate: DateObject, secondDate: DateObject) => boolean;
|
|
54
|
+
inPeriod: (date: DateObject, period: Period | null) => boolean;
|
|
55
|
+
isPoint: (period: Period, date: DateObject) => boolean;
|
|
56
|
+
equalOrEarlier: (firstDate: DateObject, secondDate: DateObject) => boolean;
|
|
57
|
+
isInitializedDate: (date: DateObject) => boolean;
|
|
58
|
+
isInitializedMonth: (date: DateObject) => boolean;
|
|
59
|
+
isInitializedYear: (date: DateObject) => boolean;
|
|
60
|
+
isMonthDisabledByDisableSince: (date: DateObject, disableSince: DateObject) => boolean;
|
|
61
|
+
isMonthDisabledByDisableUntil: (date: DateObject, disableUntil: DateObject) => boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface UseMonth {
|
|
64
|
+
parseDefaultMonth: (monthString: string) => ActiveMonth;
|
|
65
|
+
daysInMonth: (month: number, year: number) => number;
|
|
66
|
+
daysInPreMonth: (month: number, year: number) => number;
|
|
67
|
+
generateMonths: (nameOfMonths: string[], selectedMonth: DateObject, disableSince: DateObject, disableUntil: DateObject) => MonthViewItem[][];
|
|
68
|
+
getNextMonth: (month: number, year: number) => DateObject;
|
|
69
|
+
getPreviousMonth: (month: number, year: number) => DateObject;
|
|
70
|
+
}
|
|
71
|
+
export interface UseMark {
|
|
72
|
+
isMarkedDate: (date: DateObject, markedDates: MarkedDates[], markWeekends: MarkStatus) => MarkStatus;
|
|
73
|
+
isHighlightedDate: (date: DateObject, sunHighlight: boolean, satHighlight: boolean, highlightDates: DateObject[]) => boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface UseWeek {
|
|
76
|
+
getNowWeekTime: (date: Date) => Period;
|
|
77
|
+
}
|
|
78
|
+
export interface UseDisableTime {
|
|
79
|
+
disabledHours: (min: DateObject, max: DateObject, currentDate: DateObject) => number[];
|
|
80
|
+
disabledMinutes: (min: DateObject, max: DateObject, currentDate: DateObject) => number[];
|
|
81
|
+
disabledSeconds: (min: DateObject, max: DateObject, _hour: number, _minute: number, currentDate: DateObject) => number[];
|
|
82
|
+
}
|
|
83
|
+
export interface UseDateModel {
|
|
84
|
+
getDateModel: (date: DateObject, period: Period, dateFormat: string, nameOfMonths: NameOfMonths, rangeDelimiter: string, returnFormat: string, dateStr: string) => DateModel;
|
|
85
|
+
getFormattedDate: (model: DateModel) => string | undefined;
|
|
86
|
+
}
|
|
87
|
+
export interface UseDisableDate {
|
|
88
|
+
isDisabledDate: (date: DateObject) => boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface UseEvent {
|
|
91
|
+
getKeyCodeFromEvent: (event: KeyboardEvent) => number;
|
|
92
|
+
}
|
|
93
|
+
export interface UseDisableMonth {
|
|
94
|
+
isMonthDisabledByDisableUntil: (date: DateObject, disableUntil: DateObject) => boolean;
|
|
95
|
+
isMonthDisabledByDisableSince: (date: DateObject, disableSince: DateObject) => boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface UseYear {
|
|
98
|
+
generateYears: (input: number, selectedMonth: DateObject, min: number, max: number, disableSince: DateObject, disableUntil: DateObject) => YearViewItem[][];
|
|
99
|
+
}
|
|
100
|
+
export interface UseCalendar {
|
|
101
|
+
generateCalendar: (month: number, year: number, firstDayOfWeek: string, markedDates: MarkedDates[], markWeekends: MarkStatus, highlightDates: DateObject[], highlightSaturday: boolean, highlightSunday: boolean, showWeekNumbers: boolean) => CalendarWeekItem[];
|
|
102
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { DateObject, Period } from "../types/common";
|
|
17
|
+
import { UseDisableDate } from "./types";
|
|
18
|
+
export declare function useDisableDate(minYear: number, maxYear: number, disableSince: DateObject, disableUntil: DateObject, disableDates: DateObject[], disablePeriod: Period[], disableWeekends: boolean, disableWeekdays: string[]): UseDisableDate;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { UseEvent } from './types';
|
|
17
|
+
/**
|
|
18
|
+
* Event key codes
|
|
19
|
+
*/
|
|
20
|
+
export declare enum KeyCode {
|
|
21
|
+
enter = 13,
|
|
22
|
+
esc = 27,
|
|
23
|
+
space = 32,
|
|
24
|
+
leftArrow = 37,
|
|
25
|
+
upArrow = 38,
|
|
26
|
+
rightArrow = 39,
|
|
27
|
+
downArrow = 40,
|
|
28
|
+
tab = 9,
|
|
29
|
+
shift = 16
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Event key names
|
|
33
|
+
*/
|
|
34
|
+
export declare enum KeyName {
|
|
35
|
+
enter = "Enter",
|
|
36
|
+
esc = "Escape",
|
|
37
|
+
space = " ",
|
|
38
|
+
leftArrow = "ArrowLeft",
|
|
39
|
+
upArrow = "ArrowUp",
|
|
40
|
+
rightArrow = "ArrowRight",
|
|
41
|
+
downArrow = "ArrowDown",
|
|
42
|
+
tab = "Tab",
|
|
43
|
+
shift = "Shift"
|
|
44
|
+
}
|
|
45
|
+
export declare function useEvent(): UseEvent;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ExtractPropTypes } from 'vue';
|
|
17
|
+
import { DateObject, Period } from './types/common';
|
|
18
|
+
export declare const datePickerProps: {
|
|
19
|
+
displayFormat: {
|
|
20
|
+
Type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
minYear: {
|
|
24
|
+
Type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
maxYear: {
|
|
28
|
+
Type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
valueFormat: {
|
|
32
|
+
Type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
displayTime: {
|
|
36
|
+
Type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
selectMode: {
|
|
40
|
+
Type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
disableUntil: {
|
|
44
|
+
Type: ObjectConstructor;
|
|
45
|
+
default: {
|
|
46
|
+
year: number;
|
|
47
|
+
month: number;
|
|
48
|
+
day: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
disableSince: {
|
|
52
|
+
Type: ObjectConstructor;
|
|
53
|
+
default: {
|
|
54
|
+
year: number;
|
|
55
|
+
month: number;
|
|
56
|
+
day: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
disableDates: {
|
|
60
|
+
Type: {
|
|
61
|
+
(arrayLength: number): DateObject[];
|
|
62
|
+
(...items: DateObject[]): DateObject[];
|
|
63
|
+
new (arrayLength: number): DateObject[];
|
|
64
|
+
new (...items: DateObject[]): DateObject[];
|
|
65
|
+
isArray(arg: any): arg is any[];
|
|
66
|
+
readonly prototype: any[];
|
|
67
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
68
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
69
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
70
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
71
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
72
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
73
|
+
};
|
|
74
|
+
default: never[];
|
|
75
|
+
};
|
|
76
|
+
disablePeriod: {
|
|
77
|
+
Type: {
|
|
78
|
+
(arrayLength: number): Period[];
|
|
79
|
+
(...items: Period[]): Period[];
|
|
80
|
+
new (arrayLength: number): Period[];
|
|
81
|
+
new (...items: Period[]): Period[];
|
|
82
|
+
isArray(arg: any): arg is any[];
|
|
83
|
+
readonly prototype: any[];
|
|
84
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
85
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
86
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
87
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
88
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
89
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
90
|
+
};
|
|
91
|
+
default: never[];
|
|
92
|
+
};
|
|
93
|
+
disableWeekends: {
|
|
94
|
+
Type: BooleanConstructor;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
disableWeekdays: {
|
|
98
|
+
Type: {
|
|
99
|
+
(arrayLength: number): string[];
|
|
100
|
+
(...items: string[]): string[];
|
|
101
|
+
new (arrayLength: number): string[];
|
|
102
|
+
new (...items: string[]): string[];
|
|
103
|
+
isArray(arg: any): arg is any[];
|
|
104
|
+
readonly prototype: any[];
|
|
105
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
106
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
107
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
108
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
109
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
110
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
111
|
+
};
|
|
112
|
+
default: never[];
|
|
113
|
+
};
|
|
114
|
+
highlightDates: {
|
|
115
|
+
Type: {
|
|
116
|
+
(arrayLength: number): DateObject[];
|
|
117
|
+
(...items: DateObject[]): DateObject[];
|
|
118
|
+
new (arrayLength: number): DateObject[];
|
|
119
|
+
new (...items: DateObject[]): DateObject[];
|
|
120
|
+
isArray(arg: any): arg is any[];
|
|
121
|
+
readonly prototype: any[];
|
|
122
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
123
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
124
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
125
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
126
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
127
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
128
|
+
};
|
|
129
|
+
default: never[];
|
|
130
|
+
};
|
|
131
|
+
highlightSaturday: {
|
|
132
|
+
Type: BooleanConstructor;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
highlightSunday: {
|
|
136
|
+
Type: BooleanConstructor;
|
|
137
|
+
default: boolean;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* 组件值
|
|
141
|
+
*/
|
|
142
|
+
modelValue: {
|
|
143
|
+
type: StringConstructor;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
146
|
+
nameOfMonths: {
|
|
147
|
+
Type: ObjectConstructor;
|
|
148
|
+
default: {
|
|
149
|
+
1: string;
|
|
150
|
+
2: string;
|
|
151
|
+
3: string;
|
|
152
|
+
4: string;
|
|
153
|
+
5: string;
|
|
154
|
+
6: string;
|
|
155
|
+
7: string;
|
|
156
|
+
8: string;
|
|
157
|
+
9: string;
|
|
158
|
+
10: string;
|
|
159
|
+
11: string;
|
|
160
|
+
12: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
periodDelimiter: {
|
|
164
|
+
Type: StringConstructor;
|
|
165
|
+
default: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { DateObject, MarkStatus, MonthTag } from "./common";
|
|
17
|
+
export interface CalenderDayItem {
|
|
18
|
+
date: DateObject;
|
|
19
|
+
disable?: boolean;
|
|
20
|
+
highlight?: boolean;
|
|
21
|
+
isCurrent?: boolean;
|
|
22
|
+
marked?: MarkStatus;
|
|
23
|
+
tag: MonthTag;
|
|
24
|
+
range?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface CalendarWeekItem {
|
|
27
|
+
days: Array<CalenderDayItem>;
|
|
28
|
+
numberInTheYear: number;
|
|
29
|
+
year: number;
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface DateObject {
|
|
17
|
+
year?: number;
|
|
18
|
+
month?: number;
|
|
19
|
+
day?: number;
|
|
20
|
+
hour?: number;
|
|
21
|
+
minute?: number;
|
|
22
|
+
second?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface Period {
|
|
25
|
+
from: DateObject;
|
|
26
|
+
to: DateObject;
|
|
27
|
+
}
|
|
28
|
+
export interface MarkStatus {
|
|
29
|
+
marked: boolean;
|
|
30
|
+
color: string;
|
|
31
|
+
}
|
|
32
|
+
export interface MarkedDates {
|
|
33
|
+
dates: DateObject[];
|
|
34
|
+
color: string;
|
|
35
|
+
}
|
|
36
|
+
export type SelectMode = 'day' | 'week' | 'month' | 'year';
|
|
37
|
+
export declare const weekDays: string[];
|
|
38
|
+
export declare enum MonthTag {
|
|
39
|
+
previous = 1,
|
|
40
|
+
current = 2,
|
|
41
|
+
next = 3
|
|
42
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { DateObject } from "./common";
|
|
17
|
+
export interface PeriodModel {
|
|
18
|
+
beginDate?: DateObject;
|
|
19
|
+
beginJsDate?: Date;
|
|
20
|
+
beginEpoc?: number;
|
|
21
|
+
endDate?: DateObject;
|
|
22
|
+
endJsDate?: Date;
|
|
23
|
+
endEpoc?: number;
|
|
24
|
+
formatted?: string;
|
|
25
|
+
returnFormatted?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface SingleDateModel {
|
|
28
|
+
date?: DateObject;
|
|
29
|
+
jsDate?: Date;
|
|
30
|
+
formatted?: string;
|
|
31
|
+
epoc?: number;
|
|
32
|
+
returnFormatted?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DateModel {
|
|
35
|
+
hasPeriod: boolean;
|
|
36
|
+
date: SingleDateModel | null;
|
|
37
|
+
period: PeriodModel | null;
|
|
38
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { DateObject } from "./common";
|
|
17
|
+
export interface MonthViewItem {
|
|
18
|
+
date: DateObject;
|
|
19
|
+
disable: boolean;
|
|
20
|
+
displayText: string;
|
|
21
|
+
isCurrent: boolean;
|
|
22
|
+
month: number;
|
|
23
|
+
range?: boolean;
|
|
24
|
+
selected?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ActiveMonth {
|
|
27
|
+
month: number;
|
|
28
|
+
year: number;
|
|
29
|
+
displayTextOfMonth: string;
|
|
30
|
+
displayTextOfYear: string;
|
|
31
|
+
}
|
|
32
|
+
export interface NameOfMonths {
|
|
33
|
+
[month: number]: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const defaultNameOfMonths: {
|
|
36
|
+
1: string;
|
|
37
|
+
2: string;
|
|
38
|
+
3: string;
|
|
39
|
+
4: string;
|
|
40
|
+
5: string;
|
|
41
|
+
6: string;
|
|
42
|
+
7: string;
|
|
43
|
+
8: string;
|
|
44
|
+
9: string;
|
|
45
|
+
10: string;
|
|
46
|
+
11: string;
|
|
47
|
+
12: string;
|
|
48
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { DateObject } from './common';
|
|
17
|
+
export interface YearViewItem {
|
|
18
|
+
year: number;
|
|
19
|
+
date: DateObject;
|
|
20
|
+
disable?: boolean;
|
|
21
|
+
isCurrent?: boolean;
|
|
22
|
+
range?: boolean;
|
|
23
|
+
selected?: boolean;
|
|
24
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { App } from 'vue';
|
|
17
|
+
declare const _default: {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { App } from 'vue';
|
|
17
|
+
import ListView from './src/list-view.component';
|
|
18
|
+
export * from './src/list-view.props';
|
|
19
|
+
export { ListView };
|
|
20
|
+
declare const _default: {
|
|
21
|
+
install(app: App): void;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
checked: {
|
|
3
|
+
Type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
id: {
|
|
7
|
+
Type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
disabled: {
|
|
11
|
+
Type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
checked: {
|
|
16
|
+
Type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
id: {
|
|
20
|
+
Type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
disabled: {
|
|
24
|
+
Type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
}>>, {
|
|
28
|
+
id: string;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
checked: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ExtractPropTypes } from 'vue';
|
|
17
|
+
export declare const listViewCheckBoxProps: {
|
|
18
|
+
checked: {
|
|
19
|
+
Type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
id: {
|
|
23
|
+
Type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
disabled: {
|
|
27
|
+
Type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type ListViewCheckBoxProps = ExtractPropTypes<typeof listViewCheckBoxProps>;
|