@keyblade/pro-components 1.13.8-alpha.8 → 1.14.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/es/components.d.ts +7 -0
- package/es/global-props.d.ts +21 -2
- package/es/global-props.js +6 -2
- package/es/index.d.ts +7 -0
- package/es/index.js +47 -28
- package/es/inerface.d.ts +5 -1
- package/es/pro-calendar/calendar.vue.d.ts +75 -0
- package/es/pro-calendar/calendar.vue.js +159 -0
- package/es/pro-calendar/calendar.vue3.js +5 -0
- package/es/pro-calendar/enum.d.ts +6 -0
- package/es/pro-calendar/enum.js +4 -0
- package/es/pro-calendar/header.vue.d.ts +35 -0
- package/es/pro-calendar/header.vue.js +146 -0
- package/es/pro-calendar/header.vue2.js +4 -0
- package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
- package/es/pro-calendar/hooks/useCellClassName.js +40 -0
- package/es/pro-calendar/index.d.ts +117 -0
- package/es/pro-calendar/index.js +12 -0
- package/es/pro-calendar/interface.d.ts +89 -0
- package/es/pro-calendar/month.d.ts +5 -0
- package/es/pro-calendar/month.js +53 -0
- package/es/pro-calendar/month.vue.d.ts +22 -0
- package/es/pro-calendar/month.vue.js +126 -0
- package/es/pro-calendar/month.vue2.js +4 -0
- package/es/pro-calendar/week.vue.d.ts +3 -0
- package/es/pro-calendar/week.vue.js +34 -0
- package/es/pro-calendar/week.vue2.js +4 -0
- package/es/pro-calendar/year.vue.d.ts +3 -0
- package/es/pro-calendar/year.vue.js +123 -0
- package/es/pro-calendar/year.vue2.js +4 -0
- package/es/pro-date-range-picker/index.d.ts +183 -13
- package/es/pro-date-range-picker/index.js +6 -7
- package/es/pro-date-range-picker/interface.d.ts +38 -0
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +173 -6
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +1 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +127 -97
- package/es/pro-dates-picker/index.d.ts +49 -0
- package/es/pro-dates-picker/index.js +11 -0
- package/es/pro-dates-picker/index.vue.d.ts +29 -0
- package/es/pro-dates-picker/index.vue.js +135 -0
- package/es/pro-dates-picker/index.vue3.js +5 -0
- package/es/pro-dates-picker/interface.d.ts +38 -0
- package/es/pro-dates-picker/util.d.ts +12 -0
- package/es/pro-dates-picker/util.js +9 -0
- package/es/pro-find-password/enum.d.ts +8 -0
- package/es/pro-find-password/enum.js +4 -0
- package/es/pro-find-password/index.d.ts +11 -0
- package/es/pro-find-password/index.js +11 -0
- package/es/pro-find-password/index.vue.d.ts +4459 -0
- package/es/pro-find-password/index.vue.js +176 -0
- package/es/pro-find-password/index.vue3.js +5 -0
- package/es/pro-find-password/interface.d.ts +45 -0
- package/es/pro-find-password/reset-password.vue.d.ts +591 -0
- package/es/pro-find-password/reset-password.vue.js +179 -0
- package/es/pro-find-password/reset-password.vue2.js +4 -0
- package/es/pro-find-password/verify-user-name.vue.d.ts +795 -0
- package/es/pro-find-password/verify-user-name.vue.js +112 -0
- package/es/pro-find-password/verify-user-name.vue3.js +5 -0
- package/es/pro-footer-bar/index.d.ts +6 -3
- package/es/pro-footer-bar/index.js +6 -7
- package/es/pro-footer-bar/index.vue.d.ts +1 -1
- package/es/pro-footer-bar/index.vue.js +2 -2
- package/es/pro-footer-bar/index.vue2.js +24 -26
- package/es/pro-footer-bar/{inerface.d.ts → interface.d.ts} +1 -0
- package/es/pro-form-group/index.d.ts +7 -6
- package/es/pro-form-group/index.js +6 -8
- package/es/pro-form-group/index.vue.d.ts +2 -2
- package/es/pro-form-group/index.vue.js +1 -1
- package/es/pro-form-group/index.vue2.js +31 -32
- package/es/pro-image-upload/cropper.vue.js +2 -2
- package/es/pro-image-upload/cropper.vue2.js +200 -190
- package/es/pro-image-upload/image-upload.vue.d.ts +1124 -371
- package/es/pro-image-upload/image-upload.vue.js +178 -144
- package/es/pro-image-upload/index.d.ts +1727 -1001
- package/es/pro-image-upload/index.js +6 -8
- package/es/pro-keep-alive-router-view/index.d.ts +1 -0
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +17 -18
- package/es/pro-layout/hooks.d.ts +80 -1
- package/es/pro-layout/hooks.js +133 -84
- package/es/pro-layout/index.d.ts +9 -6
- package/es/pro-layout/index.js +6 -11
- package/es/pro-layout/pro-layout.vue.d.ts +4 -2
- package/es/pro-layout/pro-layout.vue.js +220 -208
- package/es/pro-loader/index.d.ts +43 -0
- package/es/pro-loader/index.js +11 -0
- package/es/pro-loader/index.vue.d.ts +28 -0
- package/es/pro-loader/index.vue.js +112 -0
- package/es/pro-loader/index.vue3.js +5 -0
- package/es/pro-loader/interface.d.ts +16 -0
- package/es/pro-login/enum.d.ts +6 -0
- package/es/pro-login/enum.js +4 -0
- package/es/pro-login/form-mobile.vue.d.ts +797 -0
- package/es/pro-login/form-mobile.vue.js +146 -0
- package/es/pro-login/form-mobile.vue2.js +4 -0
- package/es/pro-login/form-password.vue.d.ts +584 -0
- package/es/pro-login/form-password.vue.js +99 -0
- package/es/pro-login/form-password.vue2.js +4 -0
- package/es/pro-login/index.d.ts +11 -0
- package/es/pro-login/index.js +11 -0
- package/es/pro-login/index.vue.d.ts +4429 -0
- package/es/pro-login/index.vue.js +105 -0
- package/es/pro-login/index.vue3.js +5 -0
- package/es/pro-login/interface.d.ts +72 -0
- package/es/pro-login/regexp.d.ts +17 -0
- package/es/pro-login/regexp.js +28 -0
- package/es/pro-menu/index.d.ts +18 -80
- package/es/pro-menu/index.js +6 -7
- package/es/pro-menu/interface.d.ts +31 -0
- package/es/pro-menu/menu-item.vue.d.ts +27 -0
- package/es/pro-menu/menu-item.vue.js +35 -0
- package/es/pro-menu/menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu-item.vue.d.ts +9 -0
- package/es/pro-menu/pro-menu-item.vue.js +63 -0
- package/es/pro-menu/pro-menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu.vue.d.ts +9 -55
- package/es/pro-menu/pro-menu.vue.js +36 -119
- package/es/pro-menu/sub-menu.vue.d.ts +22 -0
- package/es/pro-menu/sub-menu.vue.js +55 -0
- package/es/pro-menu/sub-menu.vue2.js +4 -0
- package/es/pro-menu/util.d.ts +9 -0
- package/es/pro-menu/util.js +7 -0
- package/es/pro-page-container/constant.d.ts +2 -0
- package/es/pro-page-container/constant.js +9 -0
- package/es/pro-page-container/index.d.ts +7 -21
- package/es/pro-page-container/index.js +6 -8
- package/es/pro-page-container/interface.d.ts +12 -0
- package/es/pro-page-container/pro-page-container.vue.d.ts +4 -15
- package/es/pro-page-container/pro-page-container.vue.js +58 -38
- package/es/pro-page-header/constant.d.ts +2 -0
- package/es/pro-page-header/constant.js +13 -0
- package/es/pro-page-header/index.d.ts +12 -146
- package/es/pro-page-header/index.js +6 -8
- package/es/pro-page-header/interface.d.ts +21 -0
- package/es/pro-page-header/pro-page-header.vue.d.ts +18 -103
- package/es/pro-page-header/pro-page-header.vue.js +141 -124
- package/es/pro-reuse-tabs/index.d.ts +8 -6
- package/es/pro-reuse-tabs/index.js +6 -7
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +2 -2
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
- package/es/pro-table/index.d.ts +18 -18
- package/es/pro-table/index.js +6 -7
- package/es/pro-table/index.vue.d.ts +6 -6
- package/es/pro-table/index.vue.js +94 -39
- package/es/pro-table/interface.d.ts +73 -65
- package/es/pro-textarea/index.d.ts +7 -5
- package/es/pro-textarea/index.js +5 -6
- package/es/pro-textarea/index.vue.d.ts +1 -1
- package/es/pro-textarea/index.vue.js +1 -1
- package/es/pro-textarea/index.vue2.js +14 -16
- package/es/pro-textarea/{inerface.d.ts → interface.d.ts} +19 -18
- package/es/style.css +1 -1
- package/es/utils.d.ts +6 -0
- package/es/utils.js +7 -0
- package/package.json +5 -4
- package/es/pro-date-range-picker/type.d.ts +0 -22
- package/es/pro-page-container/inerface.d.ts +0 -12
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { isArray as w } from "@arco-design/web-vue/es/_utils/is";
|
|
2
|
+
import { getNow as u } from "@arco-design/web-vue/es/_utils/date";
|
|
3
|
+
import { EMode as A } from "../enum.js";
|
|
4
|
+
function o(n, r) {
|
|
5
|
+
if (n && w(n))
|
|
6
|
+
return n[r];
|
|
7
|
+
}
|
|
8
|
+
const P = ({
|
|
9
|
+
prefixCls: n,
|
|
10
|
+
mergedValue: r,
|
|
11
|
+
rangeValues: a,
|
|
12
|
+
hoverRangeValues: c,
|
|
13
|
+
panel: E,
|
|
14
|
+
isSameTime: i,
|
|
15
|
+
innerMode: R
|
|
16
|
+
}) => function(t, h) {
|
|
17
|
+
const s = o(a, 0), g = o(a, 1), d = o(c, 0), l = o(c, 1), $ = !t.isPrev && !t.isNext, e = $ && E, N = e, v = e;
|
|
18
|
+
d && s && d.isBefore(s);
|
|
19
|
+
const y = g && l && l.isAfter(g) && v;
|
|
20
|
+
let m = i(t.time, u());
|
|
21
|
+
return R === A.year && (m = u().isSame(t.time, "date")), [
|
|
22
|
+
`${n}-cell`,
|
|
23
|
+
{
|
|
24
|
+
[`${n}-cell-in-view`]: $,
|
|
25
|
+
[`${n}-cell-today`]: m,
|
|
26
|
+
[`${n}-cell-selected`]: r && i(t.time, r),
|
|
27
|
+
[`${n}-cell-range-start`]: N,
|
|
28
|
+
[`${n}-cell-range-end`]: v,
|
|
29
|
+
[`${n}-cell-in-range`]: e,
|
|
30
|
+
[`${n}-cell-in-range-near-hover`]: y,
|
|
31
|
+
[`${n}-cell-hover-range-start`]: e,
|
|
32
|
+
[`${n}-cell-hover-range-end`]: e,
|
|
33
|
+
[`${n}-cell-hover-in-range`]: e,
|
|
34
|
+
[`${n}-cell-disabled`]: h
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
P as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ArcoOptions } from '@arco-design/web-vue/es/_utils/types';
|
|
3
|
+
import { default as _ProCalendar } from './calendar.vue';
|
|
4
|
+
import { ProCalendarProps } from './interface.ts';
|
|
5
|
+
declare const ProCalendar: {
|
|
6
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface.ts').IProCalendarProps> & Readonly<{
|
|
7
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((date: Date) => any) | undefined;
|
|
9
|
+
onPanelChange?: ((date: Date) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
changePageShowDate: (type: "prev" | "next", unit: import('./enum.ts').EMode) => void;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
change: (date: Date) => any;
|
|
14
|
+
"update:modelValue": (date: Date) => any;
|
|
15
|
+
panelChange: (date: Date) => any;
|
|
16
|
+
}, import('vue').PublicProps, {
|
|
17
|
+
header: boolean | import('./interface.ts').IHeaderObjProps;
|
|
18
|
+
modes: (import("./enum.ts").EMode.month | import("./enum.ts").EMode.year)[];
|
|
19
|
+
defaultMode: import("./enum.ts").EMode.month | import("./enum.ts").EMode.year;
|
|
20
|
+
allowSelect: boolean;
|
|
21
|
+
panelTodayBtn: boolean;
|
|
22
|
+
dayStartOfWeek: 0 | 1;
|
|
23
|
+
isWeek: boolean;
|
|
24
|
+
panel: boolean;
|
|
25
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
26
|
+
P: {};
|
|
27
|
+
B: {};
|
|
28
|
+
D: {};
|
|
29
|
+
C: {};
|
|
30
|
+
M: {};
|
|
31
|
+
Defaults: {};
|
|
32
|
+
}, Readonly<import('./interface.ts').IProCalendarProps> & Readonly<{
|
|
33
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
34
|
+
"onUpdate:modelValue"?: ((date: Date) => any) | undefined;
|
|
35
|
+
onPanelChange?: ((date: Date) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
changePageShowDate: (type: "prev" | "next", unit: import('./enum.ts').EMode) => void;
|
|
38
|
+
}, {}, {}, {}, {
|
|
39
|
+
header: boolean | import('./interface.ts').IHeaderObjProps;
|
|
40
|
+
modes: (import("./enum.ts").EMode.month | import("./enum.ts").EMode.year)[];
|
|
41
|
+
defaultMode: import("./enum.ts").EMode.month | import("./enum.ts").EMode.year;
|
|
42
|
+
allowSelect: boolean;
|
|
43
|
+
panelTodayBtn: boolean;
|
|
44
|
+
dayStartOfWeek: 0 | 1;
|
|
45
|
+
isWeek: boolean;
|
|
46
|
+
panel: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
__isFragment?: never;
|
|
49
|
+
__isTeleport?: never;
|
|
50
|
+
__isSuspense?: never;
|
|
51
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./interface.ts').IProCalendarProps> & Readonly<{
|
|
52
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
53
|
+
"onUpdate:modelValue"?: ((date: Date) => any) | undefined;
|
|
54
|
+
onPanelChange?: ((date: Date) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
changePageShowDate: (type: "prev" | "next", unit: import('./enum.ts').EMode) => void;
|
|
57
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
58
|
+
change: (date: Date) => any;
|
|
59
|
+
"update:modelValue": (date: Date) => any;
|
|
60
|
+
panelChange: (date: Date) => any;
|
|
61
|
+
}, string, {
|
|
62
|
+
header: boolean | import('./interface.ts').IHeaderObjProps;
|
|
63
|
+
modes: (import("./enum.ts").EMode.month | import("./enum.ts").EMode.year)[];
|
|
64
|
+
defaultMode: import("./enum.ts").EMode.month | import("./enum.ts").EMode.year;
|
|
65
|
+
allowSelect: boolean;
|
|
66
|
+
panelTodayBtn: boolean;
|
|
67
|
+
dayStartOfWeek: 0 | 1;
|
|
68
|
+
isWeek: boolean;
|
|
69
|
+
panel: boolean;
|
|
70
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
71
|
+
$slots: Readonly<{
|
|
72
|
+
default?: (props: {
|
|
73
|
+
year: string;
|
|
74
|
+
month: string;
|
|
75
|
+
date?: string;
|
|
76
|
+
value: {
|
|
77
|
+
year: number;
|
|
78
|
+
month: number;
|
|
79
|
+
date?: number;
|
|
80
|
+
};
|
|
81
|
+
}) => any;
|
|
82
|
+
header?: (props: {
|
|
83
|
+
year: string;
|
|
84
|
+
month: string;
|
|
85
|
+
value: {
|
|
86
|
+
year: number;
|
|
87
|
+
month: number;
|
|
88
|
+
};
|
|
89
|
+
}) => any;
|
|
90
|
+
}> & {
|
|
91
|
+
default?: (props: {
|
|
92
|
+
year: string;
|
|
93
|
+
month: string;
|
|
94
|
+
date?: string;
|
|
95
|
+
value: {
|
|
96
|
+
year: number;
|
|
97
|
+
month: number;
|
|
98
|
+
date?: number;
|
|
99
|
+
};
|
|
100
|
+
}) => any;
|
|
101
|
+
header?: (props: {
|
|
102
|
+
year: string;
|
|
103
|
+
month: string;
|
|
104
|
+
value: {
|
|
105
|
+
year: number;
|
|
106
|
+
month: number;
|
|
107
|
+
};
|
|
108
|
+
}) => any;
|
|
109
|
+
};
|
|
110
|
+
}) & {
|
|
111
|
+
install: (app: App, options?: ArcoOptions) => void;
|
|
112
|
+
};
|
|
113
|
+
export type CalendarInstance = InstanceType<typeof _ProCalendar>;
|
|
114
|
+
export type { ProCalendarProps };
|
|
115
|
+
/** 导出组件 */
|
|
116
|
+
export { ProCalendar };
|
|
117
|
+
export default ProCalendar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setGlobalConfig as a } from "@arco-design/web-vue/es/_utils/global-config";
|
|
2
|
+
import r from "./calendar.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
const l = Object.assign(r, {
|
|
5
|
+
install: (o, t) => {
|
|
6
|
+
a(o, t), o.component("KbProCalendar", r);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
l as ProCalendar,
|
|
11
|
+
l as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { EMode } from './enum';
|
|
3
|
+
export type IHeaderObjProps = {
|
|
4
|
+
hideLeft?: boolean;
|
|
5
|
+
hideRight?: boolean;
|
|
6
|
+
headerType?: 'select';
|
|
7
|
+
slot?: 'start' | 'date' | 'end';
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @zh 隐藏头部
|
|
11
|
+
*/
|
|
12
|
+
type IHeaderProps = boolean | IHeaderObjProps;
|
|
13
|
+
interface IProCalendarBase {
|
|
14
|
+
/** 0:周末开始 | 1:周一开始 */
|
|
15
|
+
dayStartOfWeek?: 0 | 1;
|
|
16
|
+
isWeek?: boolean;
|
|
17
|
+
panel?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface IProCalendarSub extends IProCalendarBase {
|
|
20
|
+
value: Dayjs;
|
|
21
|
+
pageData?: any[];
|
|
22
|
+
pageShowDate: Dayjs;
|
|
23
|
+
/** 选择 */
|
|
24
|
+
selectHandler: (time: Dayjs, disabled: boolean) => void;
|
|
25
|
+
}
|
|
26
|
+
export interface IProCalendarHeader extends IProCalendarBase {
|
|
27
|
+
/** 模式 */
|
|
28
|
+
mode?: EMode.month | EMode.year;
|
|
29
|
+
modes?: (EMode.month | EMode.year)[];
|
|
30
|
+
pageShowDate: Dayjs;
|
|
31
|
+
move: (time: Dayjs) => void;
|
|
32
|
+
/** 年变化 */
|
|
33
|
+
onYearChange: (year: number) => void;
|
|
34
|
+
/** 月变化 */
|
|
35
|
+
onMonthChange: (month: number) => void;
|
|
36
|
+
onChangePageShowDate: (type: 'prev' | 'next', unit: EMode) => void;
|
|
37
|
+
onModeChange: (value: any, ev: Event) => void;
|
|
38
|
+
headerValueFormat: string;
|
|
39
|
+
header?: IHeaderProps;
|
|
40
|
+
}
|
|
41
|
+
export interface IProCalendarYear extends IProCalendarSub {
|
|
42
|
+
/** 模式 */
|
|
43
|
+
mode: EMode.month | EMode.year;
|
|
44
|
+
}
|
|
45
|
+
/** 月 */
|
|
46
|
+
export interface IProCalendarMonth extends IProCalendarSub {
|
|
47
|
+
cell?: boolean;
|
|
48
|
+
current?: number;
|
|
49
|
+
/** 模式 */
|
|
50
|
+
mode?: EMode;
|
|
51
|
+
}
|
|
52
|
+
/** 星期 */
|
|
53
|
+
export interface IProCalendarWeek extends IProCalendarSub {
|
|
54
|
+
/** 模式 */
|
|
55
|
+
mode?: EMode;
|
|
56
|
+
}
|
|
57
|
+
export interface IProCalendarProps extends IProCalendarBase {
|
|
58
|
+
/**
|
|
59
|
+
* @zh 绑定值
|
|
60
|
+
* @en Value
|
|
61
|
+
*/
|
|
62
|
+
modelValue?: Date;
|
|
63
|
+
/**
|
|
64
|
+
* @zh 默认值(非受控状态)
|
|
65
|
+
* @en Default value (uncontrolled state)
|
|
66
|
+
*/
|
|
67
|
+
defaultValue?: Date;
|
|
68
|
+
/**
|
|
69
|
+
* @zh 模式
|
|
70
|
+
* @en Mode
|
|
71
|
+
*/
|
|
72
|
+
mode?: EMode.month | EMode.year;
|
|
73
|
+
/**
|
|
74
|
+
* @zh 默认模式
|
|
75
|
+
* @en Default Mode
|
|
76
|
+
*/
|
|
77
|
+
defaultMode?: EMode.month | EMode.year;
|
|
78
|
+
/**
|
|
79
|
+
* @zh 显示的模式
|
|
80
|
+
* @en Displayed mode
|
|
81
|
+
*/
|
|
82
|
+
modes?: (EMode.month | EMode.year)[];
|
|
83
|
+
header?: IHeaderProps;
|
|
84
|
+
allowSelect?: boolean;
|
|
85
|
+
panelWidth?: number;
|
|
86
|
+
panelTodayBtn?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export type ProCalendarProps = Partial<IProCalendarProps>;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var w = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
+
var A = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
|
+
var I = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var O = (t, r, a) => r in t ? w(t, r, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[r] = a, l = (t, r) => {
|
|
6
|
+
for (var a in r || (r = {}))
|
|
7
|
+
I.call(r, a) && O(t, a, r[a]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var a of h(r))
|
|
10
|
+
R.call(r, a) && O(t, a, r[a]);
|
|
11
|
+
return t;
|
|
12
|
+
}, y = (t, r) => x(t, A(r));
|
|
13
|
+
import { methods as i } from "@arco-design/web-vue/es/_utils/date";
|
|
14
|
+
const g = 42, u = (t) => ({
|
|
15
|
+
year: t.year(),
|
|
16
|
+
month: t.month() + 1,
|
|
17
|
+
date: t.date(),
|
|
18
|
+
day: t.day(),
|
|
19
|
+
time: t
|
|
20
|
+
}), T = (t) => ({
|
|
21
|
+
start: u(i.startOf(t, "month")),
|
|
22
|
+
end: u(i.endOf(t, "month")),
|
|
23
|
+
days: t.daysInMonth()
|
|
24
|
+
});
|
|
25
|
+
function D(t, { dayStartOfWeek: r = 0, isWeek: a }) {
|
|
26
|
+
var c, f, m;
|
|
27
|
+
const s = T(t), d = Array(g).fill(null).map(() => ({})), o = r === 0 ? s.start.day : (s.start.day || 7) - 1;
|
|
28
|
+
d[o] = y(l({}, s.start), {
|
|
29
|
+
isCurrent: !0
|
|
30
|
+
});
|
|
31
|
+
for (let e = 0; e < o; e++)
|
|
32
|
+
d[o - e - 1] = y(l({}, u(i.subtract(s.start.time, e + 1, "day"))), {
|
|
33
|
+
isPrev: !0
|
|
34
|
+
});
|
|
35
|
+
for (let e = 0; e < g - o - 1; e++)
|
|
36
|
+
d[o + e + 1] = y(l({}, u(i.add(s.start.time, e + 1, "day"))), {
|
|
37
|
+
isCurrent: e < s.days,
|
|
38
|
+
isNext: e >= s.days - 1
|
|
39
|
+
});
|
|
40
|
+
const n = Array(6).fill(null).map(() => []);
|
|
41
|
+
for (let e = 0; e < 6; e++)
|
|
42
|
+
if (n[e] = d.slice(e * 7, 7 * (e + 1)), a) {
|
|
43
|
+
const k = (f = (c = n == null ? void 0 : n[e]) == null ? void 0 : c[0]) == null ? void 0 : f.time, p = [...n[e] || []];
|
|
44
|
+
(m = n == null ? void 0 : n[e]) == null || m.unshift({
|
|
45
|
+
weekRows: p,
|
|
46
|
+
weekOfYear: k.week()
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return n;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
D as getAllDaysByTime
|
|
53
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IProCalendarMonth } from './interface.ts';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {
|
|
6
|
+
year: any;
|
|
7
|
+
month: any;
|
|
8
|
+
date: any;
|
|
9
|
+
}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<IProCalendarMonth, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProCalendarMonth> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as C, useSlots as D, computed as f, createElementBlock as s, openBlock as n, normalizeClass as o, unref as r, createVNode as O, createElementVNode as i, Fragment as m, renderList as y, createCommentVNode as V, renderSlot as B, createTextVNode as N, toDisplayString as k } from "vue";
|
|
2
|
+
import { dayjs as Y } from "@arco-design/web-vue/es/_utils/date";
|
|
3
|
+
import { padStart as H } from "@arco-design/web-vue/es/_utils/pad";
|
|
4
|
+
import T from "./week.vue.js";
|
|
5
|
+
import b from "./hooks/useCellClassName.js";
|
|
6
|
+
import { getPrefixCls as E } from "@arco-design/web-vue/es/_utils/global-config";
|
|
7
|
+
import { getAllDaysByTime as F } from "./month.js";
|
|
8
|
+
const M = ["onClick"], R = ["onClick"], I = /* @__PURE__ */ C({
|
|
9
|
+
__name: "month",
|
|
10
|
+
props: {
|
|
11
|
+
cell: { type: Boolean },
|
|
12
|
+
current: {},
|
|
13
|
+
mode: {},
|
|
14
|
+
value: {},
|
|
15
|
+
pageData: {},
|
|
16
|
+
pageShowDate: {},
|
|
17
|
+
selectHandler: { type: Function },
|
|
18
|
+
dayStartOfWeek: {},
|
|
19
|
+
isWeek: { type: Boolean },
|
|
20
|
+
panel: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
setup(v) {
|
|
23
|
+
const l = v, w = D(), t = E("calendar"), h = l.pageShowDate.year(), g = f(
|
|
24
|
+
() => b({
|
|
25
|
+
prefixCls: t,
|
|
26
|
+
mergedValue: l.value,
|
|
27
|
+
panel: !1,
|
|
28
|
+
innerMode: l.mode,
|
|
29
|
+
rangeValues: [],
|
|
30
|
+
hoverRangeValues: [],
|
|
31
|
+
isSameTime: (e, d) => e.isSame(d, "day")
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
function c(e) {
|
|
35
|
+
const d = l.value.year(), u = l.value.month() + 1, p = l.value.week();
|
|
36
|
+
return l.value && e.weekRows.find(
|
|
37
|
+
(a) => a.year === d && a.month === u
|
|
38
|
+
) && p === e.weekOfYear;
|
|
39
|
+
}
|
|
40
|
+
const $ = f(() => typeof l.current == "number" ? F(
|
|
41
|
+
Y(`${h}-${H(l.current + 1, 2, "0")}-01`),
|
|
42
|
+
{
|
|
43
|
+
dayStartOfWeek: l.dayStartOfWeek || 0,
|
|
44
|
+
isWeek: l.isWeek
|
|
45
|
+
}
|
|
46
|
+
) : l.pageData);
|
|
47
|
+
return (e, d) => (n(), s("div", {
|
|
48
|
+
class: o(e.cell ? `${r(t)}-month-cell` : `${r(t)}-month`)
|
|
49
|
+
}, [
|
|
50
|
+
O(T, {
|
|
51
|
+
value: e.value,
|
|
52
|
+
"select-handler": e.selectHandler,
|
|
53
|
+
"day-start-of-week": e.dayStartOfWeek,
|
|
54
|
+
"is-week": e.isWeek,
|
|
55
|
+
panel: e.panel,
|
|
56
|
+
mode: e.mode,
|
|
57
|
+
"page-show-date": e.pageShowDate,
|
|
58
|
+
"page-data": e.pageData
|
|
59
|
+
}, null, 8, ["value", "select-handler", "day-start-of-week", "is-week", "panel", "mode", "page-show-date", "page-data"]),
|
|
60
|
+
i("div", {
|
|
61
|
+
class: o(`${r(t)}-month-cell-body`)
|
|
62
|
+
}, [
|
|
63
|
+
(n(!0), s(m, null, y($.value, (u, p) => (n(), s("div", {
|
|
64
|
+
key: p,
|
|
65
|
+
class: o([
|
|
66
|
+
`${r(t)}-month-row`,
|
|
67
|
+
{
|
|
68
|
+
[`${r(t)}-row-week`]: e.isWeek
|
|
69
|
+
}
|
|
70
|
+
])
|
|
71
|
+
}, [
|
|
72
|
+
(n(!0), s(m, null, y(u, (a, S) => (n(), s("div", {
|
|
73
|
+
key: S,
|
|
74
|
+
class: o(g.value(a, !1)),
|
|
75
|
+
onClick: (W) => a.time && !e.isWeek ? e.selectHandler(a.time, !1) : void 0
|
|
76
|
+
}, [
|
|
77
|
+
a.time ? (n(), s(m, { key: 0 }, [
|
|
78
|
+
r(w).default ? B(e.$slots, "default", {
|
|
79
|
+
key: 0,
|
|
80
|
+
year: a.year,
|
|
81
|
+
month: a.month,
|
|
82
|
+
date: a.date
|
|
83
|
+
}) : (n(), s("div", {
|
|
84
|
+
key: 1,
|
|
85
|
+
class: o(`${r(t)}-date`),
|
|
86
|
+
onClick: (W) => e.isWeek ? void 0 : e.selectHandler(a.time, !1)
|
|
87
|
+
}, [
|
|
88
|
+
i("div", {
|
|
89
|
+
class: o(`${r(t)}-date-value`)
|
|
90
|
+
}, [
|
|
91
|
+
e.panel ? (n(), s(m, { key: 0 }, [
|
|
92
|
+
N(k(a.date), 1)
|
|
93
|
+
], 64)) : (n(), s("div", {
|
|
94
|
+
key: 1,
|
|
95
|
+
class: o(`${r(t)}-date-circle`)
|
|
96
|
+
}, k(a.date), 3))
|
|
97
|
+
], 2)
|
|
98
|
+
], 10, R))
|
|
99
|
+
], 64)) : "weekOfYear" in a ? (n(), s("div", {
|
|
100
|
+
key: 1,
|
|
101
|
+
class: o([
|
|
102
|
+
`${r(t)}-cell`,
|
|
103
|
+
`${r(t)}-cell-week`,
|
|
104
|
+
{
|
|
105
|
+
[`${r(t)}-cell-selected-week`]: c(a),
|
|
106
|
+
[`${r(t)}-cell-in-range`]: c(a)
|
|
107
|
+
}
|
|
108
|
+
])
|
|
109
|
+
}, [
|
|
110
|
+
i("div", {
|
|
111
|
+
class: o(`${r(t)}-date`)
|
|
112
|
+
}, [
|
|
113
|
+
i("div", {
|
|
114
|
+
class: o(`${r(t)}-date-value`)
|
|
115
|
+
}, k(a.weekOfYear), 3)
|
|
116
|
+
], 2)
|
|
117
|
+
], 2)) : V("", !0)
|
|
118
|
+
], 10, M))), 128))
|
|
119
|
+
], 2))), 128))
|
|
120
|
+
], 2)
|
|
121
|
+
], 2));
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export {
|
|
125
|
+
I as default
|
|
126
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IProCalendarWeek } from './interface.ts';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IProCalendarWeek, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProCalendarWeek> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as u, computed as m, createElementBlock as a, openBlock as n, normalizeClass as l, unref as t, Fragment as c, renderList as f, toDisplayString as y } from "vue";
|
|
2
|
+
import { getPrefixCls as k } from "@arco-design/web-vue/es/_utils/global-config";
|
|
3
|
+
import { useI18n as h } from "@arco-design/web-vue/es/locale";
|
|
4
|
+
import { EMode as g } from "./enum.js";
|
|
5
|
+
const W = /* @__PURE__ */ u({
|
|
6
|
+
__name: "week",
|
|
7
|
+
props: {
|
|
8
|
+
mode: {},
|
|
9
|
+
value: {},
|
|
10
|
+
pageData: {},
|
|
11
|
+
pageShowDate: {},
|
|
12
|
+
selectHandler: { type: Function },
|
|
13
|
+
dayStartOfWeek: {},
|
|
14
|
+
isWeek: { type: Boolean },
|
|
15
|
+
panel: { type: Boolean }
|
|
16
|
+
},
|
|
17
|
+
setup(i) {
|
|
18
|
+
const s = i, r = k("calendar-week-list"), { t: d } = h(), p = m(() => {
|
|
19
|
+
const e = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
20
|
+
return s.dayStartOfWeek === 0 ? e.unshift("sunday") : e.push("sunday"), s.isWeek && e.unshift("self"), e;
|
|
21
|
+
});
|
|
22
|
+
return (e, w) => (n(), a("div", {
|
|
23
|
+
class: l(t(r))
|
|
24
|
+
}, [
|
|
25
|
+
(n(!0), a(c, null, f(p.value, (o) => (n(), a("div", {
|
|
26
|
+
key: o,
|
|
27
|
+
class: l(`${t(r)}-item`)
|
|
28
|
+
}, y(t(d)(`calendar.week.${e.panel || e.mode === t(g).year ? "short" : "long"}.${o}`)), 3))), 128))
|
|
29
|
+
], 2));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
W as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IProCalendarYear } from './interface.ts';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IProCalendarYear, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProCalendarYear> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var V = Object.defineProperty, B = Object.defineProperties;
|
|
2
|
+
var H = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var f = Object.getOwnPropertySymbols;
|
|
4
|
+
var M = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (s, a, t) => a in s ? V(s, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[a] = t, h = (s, a) => {
|
|
6
|
+
for (var t in a || (a = {}))
|
|
7
|
+
M.call(a, t) && v(s, t, a[t]);
|
|
8
|
+
if (f)
|
|
9
|
+
for (var t of f(a))
|
|
10
|
+
O.call(a, t) && v(s, t, a[t]);
|
|
11
|
+
return s;
|
|
12
|
+
}, y = (s, a) => B(s, H(a));
|
|
13
|
+
import { defineComponent as W, computed as d, createElementBlock as u, openBlock as m, normalizeClass as i, unref as l, Fragment as g, renderList as k, createElementVNode as w, toDisplayString as S, createVNode as F } from "vue";
|
|
14
|
+
import { padStart as J } from "@arco-design/web-vue/es/_utils/pad";
|
|
15
|
+
import { dayjs as T } from "@arco-design/web-vue/es/_utils/date";
|
|
16
|
+
import A from "./month.vue.js";
|
|
17
|
+
import E from "./hooks/useCellClassName.js";
|
|
18
|
+
import { getPrefixCls as j } from "@arco-design/web-vue/es/_utils/global-config";
|
|
19
|
+
import { useI18n as z } from "@arco-design/web-vue/es/locale";
|
|
20
|
+
const G = ["onClick"], Q = /* @__PURE__ */ W({
|
|
21
|
+
__name: "year",
|
|
22
|
+
props: {
|
|
23
|
+
mode: {},
|
|
24
|
+
value: {},
|
|
25
|
+
pageData: {},
|
|
26
|
+
pageShowDate: {},
|
|
27
|
+
selectHandler: { type: Function },
|
|
28
|
+
dayStartOfWeek: {},
|
|
29
|
+
isWeek: { type: Boolean },
|
|
30
|
+
panel: { type: Boolean }
|
|
31
|
+
},
|
|
32
|
+
setup(s) {
|
|
33
|
+
const a = [
|
|
34
|
+
"January",
|
|
35
|
+
"February",
|
|
36
|
+
"March",
|
|
37
|
+
"April",
|
|
38
|
+
"May",
|
|
39
|
+
"June",
|
|
40
|
+
"July",
|
|
41
|
+
"August",
|
|
42
|
+
"September",
|
|
43
|
+
"October",
|
|
44
|
+
"November",
|
|
45
|
+
"December"
|
|
46
|
+
].map((e, r) => ({
|
|
47
|
+
name: e,
|
|
48
|
+
value: r
|
|
49
|
+
})), t = s, n = j("calendar"), { t: p } = z(), $ = d(
|
|
50
|
+
() => E({
|
|
51
|
+
prefixCls: n,
|
|
52
|
+
mergedValue: t.value,
|
|
53
|
+
panel: !1,
|
|
54
|
+
innerMode: t.mode,
|
|
55
|
+
rangeValues: [],
|
|
56
|
+
hoverRangeValues: [],
|
|
57
|
+
isSameTime: (e, r) => e.isSame(r, "month")
|
|
58
|
+
})
|
|
59
|
+
), C = d(() => t.pageShowDate.year());
|
|
60
|
+
function c(e) {
|
|
61
|
+
return T(
|
|
62
|
+
`${C.value}-${J(e + 1, 2, "0")}-01`
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
const D = d(() => {
|
|
66
|
+
if (t.panel) {
|
|
67
|
+
const e = [];
|
|
68
|
+
for (let r = 0; r < 4; r++)
|
|
69
|
+
e.push(a.slice(r * 3, 3 * (r + 1)));
|
|
70
|
+
return e;
|
|
71
|
+
} else {
|
|
72
|
+
const e = [];
|
|
73
|
+
for (let r = 0; r < 3; r++)
|
|
74
|
+
e.push(a.slice(r * 4, 4 * (r + 1)));
|
|
75
|
+
return e;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return (e, r) => (m(), u("div", {
|
|
79
|
+
class: i(`${l(n)}-year`)
|
|
80
|
+
}, [
|
|
81
|
+
(m(!0), u(g, null, k(D.value, (N, b) => (m(), u("div", {
|
|
82
|
+
key: b,
|
|
83
|
+
class: i(`${l(n)}-year-row`)
|
|
84
|
+
}, [
|
|
85
|
+
(m(!0), u(g, null, k(N, (o) => (m(), u("div", {
|
|
86
|
+
key: o.value,
|
|
87
|
+
class: i($.value(y(h({}, o), { time: c(o.value) }), !1))
|
|
88
|
+
}, [
|
|
89
|
+
e.panel ? (m(), u("div", {
|
|
90
|
+
key: 0,
|
|
91
|
+
class: i(`${l(n)}-date`),
|
|
92
|
+
onClick: () => e.selectHandler(c(o.value), !1)
|
|
93
|
+
}, [
|
|
94
|
+
w("div", {
|
|
95
|
+
class: i(`${l(n)}-date-value`)
|
|
96
|
+
}, S(l(p)(`calendar.month.short.${o.name}`)), 3)
|
|
97
|
+
], 10, G)) : (m(), u("div", {
|
|
98
|
+
key: 1,
|
|
99
|
+
class: i(`${l(n)}-month-with-days`)
|
|
100
|
+
}, [
|
|
101
|
+
w("div", {
|
|
102
|
+
class: i(`${l(n)}-month-title`)
|
|
103
|
+
}, S(l(p)(`calendar.month.long.${o.name}`)), 3),
|
|
104
|
+
F(A, {
|
|
105
|
+
"page-show-date": e.pageShowDate,
|
|
106
|
+
"page-data": e.pageData,
|
|
107
|
+
"day-start-of-week": e.dayStartOfWeek,
|
|
108
|
+
"select-handler": e.selectHandler,
|
|
109
|
+
"is-week": e.isWeek,
|
|
110
|
+
cell: !0,
|
|
111
|
+
current: o.value,
|
|
112
|
+
value: e.value,
|
|
113
|
+
mode: e.mode
|
|
114
|
+
}, null, 8, ["page-show-date", "page-data", "day-start-of-week", "select-handler", "is-week", "current", "value", "mode"])
|
|
115
|
+
], 2))
|
|
116
|
+
], 2))), 128))
|
|
117
|
+
], 2))), 128))
|
|
118
|
+
], 2));
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export {
|
|
122
|
+
Q as default
|
|
123
|
+
};
|