@blueking/date-picker 2.0.0-beta.47 → 2.0.0-beta.49
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/package.json +8 -10
- package/typings/components/baseline-select.vue.d.ts +9 -30
- package/typings/components/common-submit.vue.d.ts +7 -16
- package/typings/components/common-tab.vue.d.ts +8 -18
- package/typings/components/date-list.vue.d.ts +15 -0
- package/typings/components/date-panel.vue.d.ts +6 -29
- package/typings/components/date-picker.vue.d.ts +7 -16
- package/typings/components/date-title.vue.d.ts +6 -0
- package/typings/components/natural-picker.vue.d.ts +5 -14
- package/typings/components/panel-wrapper.vue.d.ts +7 -16
- package/typings/components/recent-picker.vue.d.ts +8 -29
- package/typings/components/timezone-picker.vue.d.ts +6 -15
- package/typings/date-picker.vue.d.ts +11 -44
- package/typings/hooks/use-validate.d.ts +3 -3
- package/typings/lang/lang.d.ts +3 -3
- package/typings/utils/constant.d.ts +2 -1
- package/typings/utils/date.d.ts +2 -2
- package/typings/utils/provider.d.ts +8 -8
- package/typings/utils/store.d.ts +1 -1
- package/typings/utils/timezone.d.ts +4 -4
- package/typings/utils/types.d.ts +20 -20
- package/typings/vue2.d.ts +1 -0
- package/typings/vue3.d.ts +2 -1
- package/vue2/index.es.min.js +16433 -27538
- package/vue2/index.iife.min.js +18658 -29244
- package/vue2/index.umd.min.js +17113 -28218
- package/vue2/vue2.css +1346 -2726
- package/vue3/index.es.min.js +2389 -2320
- package/vue3/index.umd.min.js +2387 -2318
- package/vue3/vue3.css +129 -109
- package/vue3/index.iife.min.js +0 -40676
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/date-picker",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.49",
|
|
4
4
|
"description": "蓝鲸监控平台日期时间选择",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tencent BlueKing",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite --mode development -c scripts/vite.dev.ts",
|
|
9
|
+
"prettier": "prettier ./src ./scripts ./playground --write",
|
|
10
|
+
"visualize": "vite-bundle-visualizer -c scripts/vite.vusualizer.ts"
|
|
11
|
+
},
|
|
7
12
|
"exports": {
|
|
8
13
|
".": {
|
|
9
14
|
"types": "./typings/vue3.d.ts",
|
|
@@ -51,15 +56,8 @@
|
|
|
51
56
|
},
|
|
52
57
|
"peerDependencies": {
|
|
53
58
|
"@blueking/bkui-library": "^0.0.0-beta.4",
|
|
54
|
-
"bkui-vue": "^
|
|
59
|
+
"bkui-vue": "^2.0.1",
|
|
55
60
|
"dayjs": "^1.11.10",
|
|
56
61
|
"vue": "^3"
|
|
57
|
-
},
|
|
58
|
-
"scripts": {
|
|
59
|
-
"dev": "vite --mode development -c scripts/vite.dev.ts",
|
|
60
|
-
"build": "tsx ./scripts/vite.build.ts",
|
|
61
|
-
"dts": "vue-tsc --project tsconfig.dts.json",
|
|
62
|
-
"prettier": "prettier ./src ./scripts ./playground --write",
|
|
63
|
-
"visualize": "vite-bundle-visualizer -c scripts/vite.vusualizer.ts"
|
|
64
62
|
}
|
|
65
|
-
}
|
|
63
|
+
}
|
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
modelValue
|
|
3
|
-
}
|
|
4
|
-
modelValue: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
modelValue: string;
|
|
9
|
-
}>, {
|
|
10
|
-
modelValue: string;
|
|
11
|
-
}>>> & {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
|
+
"update:modelValue": (value: string) => any;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
}> & Readonly<{
|
|
12
8
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
13
|
-
}
|
|
9
|
+
}>, {
|
|
14
10
|
modelValue: string;
|
|
15
|
-
}, {}>;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
12
|
export default _default;
|
|
17
|
-
type __VLS_WithDefaults<P, D> = {
|
|
18
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
19
|
-
default: D[K];
|
|
20
|
-
}> : P[K];
|
|
21
|
-
};
|
|
22
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
|
-
type __VLS_TypePropsToOption<T> = {
|
|
24
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
|
-
} : {
|
|
27
|
-
type: import('vue').PropType<T[K]>;
|
|
28
|
-
required: true;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
type __VLS_PrettifyLocal<T> = {
|
|
32
|
-
[K in keyof T]: T[K];
|
|
33
|
-
} & {};
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
disableTips?: string;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
2
|
/**
|
|
4
3
|
* 是否禁用
|
|
5
4
|
*/
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
-
submit: () => void;
|
|
9
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
10
6
|
disableTips?: string;
|
|
7
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
submit: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
11
10
|
/**
|
|
12
11
|
* 是否禁用
|
|
13
12
|
*/
|
|
14
13
|
disabled?: boolean;
|
|
15
|
-
|
|
14
|
+
disableTips?: string;
|
|
15
|
+
}> & Readonly<{
|
|
16
16
|
onSubmit?: (() => any) | undefined;
|
|
17
|
-
}, {}, {}>;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToOption<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DateMode, ICommonTabItem } from '../utils';
|
|
2
1
|
import type { PropType } from 'vue';
|
|
3
|
-
|
|
2
|
+
import type { DateMode, ICommonTabItem } from '../utils';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
/** modelValue 选中的tab */
|
|
5
5
|
modelValue: {
|
|
6
6
|
required: true;
|
|
@@ -11,13 +11,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
required: true;
|
|
12
12
|
type: PropType<ICommonTabItem[]>;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
confirm: () => void;
|
|
20
|
-
"update:modelValue": (args_0: DateMode) => void;
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (args_0: DateMode) => any;
|
|
16
|
+
confirm: () => any;
|
|
21
17
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
18
|
/** modelValue 选中的tab */
|
|
23
19
|
modelValue: {
|
|
@@ -29,14 +25,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
25
|
required: true;
|
|
30
26
|
type: PropType<ICommonTabItem[]>;
|
|
31
27
|
};
|
|
32
|
-
|
|
33
|
-
default: boolean;
|
|
34
|
-
type: BooleanConstructor;
|
|
35
|
-
};
|
|
36
|
-
}>> & {
|
|
37
|
-
onConfirm?: (() => any) | undefined;
|
|
28
|
+
}>> & Readonly<{
|
|
38
29
|
"onUpdate:modelValue"?: ((args_0: DateMode) => any) | undefined;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, {}>;
|
|
30
|
+
onConfirm?: (() => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
42
32
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DateRange, DateValue } from '../utils';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
dateList: DateRange[];
|
|
4
|
+
defaultDate: DateRange;
|
|
5
|
+
isRecent: boolean;
|
|
6
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
change: (date: DateValue) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
9
|
+
dateList: DateRange[];
|
|
10
|
+
defaultDate: DateRange;
|
|
11
|
+
isRecent: boolean;
|
|
12
|
+
}> & Readonly<{
|
|
13
|
+
onChange?: ((date: DateValue) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -17,37 +17,14 @@ interface Props {
|
|
|
17
17
|
showTitle?: boolean;
|
|
18
18
|
title?: string;
|
|
19
19
|
}
|
|
20
|
-
declare const _default: import("vue").DefineComponent<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
"update:modelValue": (date: dayjs.Dayjs) => void;
|
|
25
|
-
"update:isNow": (args_0: boolean) => void;
|
|
26
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
27
|
-
format: string;
|
|
28
|
-
showTitle: boolean;
|
|
29
|
-
}>>> & {
|
|
20
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:modelValue": (date: dayjs.Dayjs) => any;
|
|
22
|
+
"update:isNow": (args_0: boolean) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
30
24
|
"onUpdate:modelValue"?: ((date: dayjs.Dayjs) => any) | undefined;
|
|
31
25
|
"onUpdate:isNow"?: ((args_0: boolean) => any) | undefined;
|
|
32
|
-
}
|
|
26
|
+
}>, {
|
|
33
27
|
format: string;
|
|
34
28
|
showTitle: boolean;
|
|
35
|
-
}, {}>;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
30
|
export default _default;
|
|
37
|
-
type __VLS_WithDefaults<P, D> = {
|
|
38
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
39
|
-
default: D[K];
|
|
40
|
-
}> : P[K];
|
|
41
|
-
};
|
|
42
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
43
|
-
type __VLS_TypePropsToOption<T> = {
|
|
44
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
45
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
46
|
-
} : {
|
|
47
|
-
type: import('vue').PropType<T[K]>;
|
|
48
|
-
required: true;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
type __VLS_PrettifyLocal<T> = {
|
|
52
|
-
[K in keyof T]: T[K];
|
|
53
|
-
} & {};
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import { type DateValue } from '../utils';
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
value: DateRange;
|
|
5
|
-
}
|
|
5
|
+
}, {
|
|
6
6
|
handleSubmit: () => void;
|
|
7
|
-
},
|
|
8
|
-
change: (value: DateValue) =>
|
|
9
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
change: (value: DateValue) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
10
10
|
value: DateRange;
|
|
11
|
-
}
|
|
11
|
+
}> & Readonly<{
|
|
12
12
|
onChange?: ((value: DateValue) => any) | undefined;
|
|
13
|
-
}, {}, {}>;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToOption<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
confirm: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onConfirm?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -4,20 +4,11 @@ interface IProps {
|
|
|
4
4
|
/** 已选择自然日期 */
|
|
5
5
|
value?: DateRange;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: import("vue").DefineComponent<
|
|
7
|
+
declare const _default: import("vue").DefineComponent<IProps, {
|
|
8
8
|
handleSubmit: () => void;
|
|
9
|
-
},
|
|
10
|
-
change: (value: NaturalDateValue) =>
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
change: (value: NaturalDateValue) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
12
12
|
onChange?: ((value: NaturalDateValue) => any) | undefined;
|
|
13
|
-
}, {}, {}>;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToOption<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { type DateValue } from '../utils';
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
3
|
import { type ITimezoneItem } from '../utils/timezone';
|
|
4
|
-
declare const _default: import("vue").DefineComponent<
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
defaultDate: DateRange;
|
|
6
6
|
needTimezone?: boolean;
|
|
7
7
|
timezone?: string;
|
|
8
|
-
}
|
|
9
|
-
change: (value: DateValue) =>
|
|
10
|
-
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) =>
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
8
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
change: (value: DateValue) => any;
|
|
10
|
+
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
12
12
|
defaultDate: DateRange;
|
|
13
13
|
needTimezone?: boolean;
|
|
14
14
|
timezone?: string;
|
|
15
|
-
}
|
|
15
|
+
}> & Readonly<{
|
|
16
16
|
onChange?: ((value: DateValue) => any) | undefined;
|
|
17
17
|
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
18
|
-
}, {}, {}>;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToOption<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,38 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FutureDateValue, type RecentDateValue, DateMode } from '../utils';
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
3
|
interface IProps {
|
|
4
4
|
baselineTime?: string;
|
|
5
5
|
type: DateMode.FUTURE | DateMode.RECENT;
|
|
6
6
|
value?: DateRange;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: import("vue").DefineComponent<
|
|
9
|
-
type: DateMode;
|
|
10
|
-
}>, {
|
|
8
|
+
declare const _default: import("vue").DefineComponent<IProps, {
|
|
11
9
|
handleSubmit: () => void;
|
|
12
|
-
},
|
|
13
|
-
change: (value:
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
onChange?: ((value: RecentDateValue | FutureDateValue) => any) | undefined;
|
|
18
|
-
}, {
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
change: (value: FutureDateValue | RecentDateValue) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
13
|
+
onChange?: ((value: FutureDateValue | RecentDateValue) => any) | undefined;
|
|
14
|
+
}>, {
|
|
19
15
|
type: DateMode.FUTURE | DateMode.RECENT;
|
|
20
|
-
}, {}>;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
17
|
export default _default;
|
|
22
|
-
type __VLS_WithDefaults<P, D> = {
|
|
23
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
24
|
-
default: D[K];
|
|
25
|
-
}> : P[K];
|
|
26
|
-
};
|
|
27
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
28
|
-
type __VLS_TypePropsToOption<T> = {
|
|
29
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
|
-
} : {
|
|
32
|
-
type: import('vue').PropType<T[K]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
type __VLS_PrettifyLocal<T> = {
|
|
37
|
-
[K in keyof T]: T[K];
|
|
38
|
-
} & {};
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { type ITimezoneItem } from '../utils/timezone';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
value?: string;
|
|
4
|
-
}
|
|
5
|
-
change: (value: string, info: ITimezoneItem) =>
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
4
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
change: (value: string, info: ITimezoneItem) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
7
7
|
value?: string;
|
|
8
|
-
}
|
|
8
|
+
}> & Readonly<{
|
|
9
9
|
onChange?: ((value: string, info: ITimezoneItem) => any) | undefined;
|
|
10
|
-
}, {}, {}>;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
export default _default;
|
|
12
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
-
type __VLS_TypePropsToOption<T> = {
|
|
14
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
-
} : {
|
|
17
|
-
type: import('vue').PropType<T[K]>;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,66 +1,33 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
2
|
import { type DateValue, type IDatePickerProps } from './utils';
|
|
3
3
|
import { type ITimezoneItem } from './utils/timezone';
|
|
4
|
-
declare const _default: import("vue").DefineComponent<
|
|
5
|
-
behavior: string;
|
|
6
|
-
commonUseList: () => DateValue[];
|
|
7
|
-
format: string;
|
|
8
|
-
needTimezone: boolean;
|
|
9
|
-
enableFormatClick: boolean;
|
|
10
|
-
version: string;
|
|
11
|
-
id: string;
|
|
12
|
-
}>, {
|
|
4
|
+
declare const _default: import("vue").DefineComponent<IDatePickerProps, {
|
|
13
5
|
handleHidePanel: () => void;
|
|
14
6
|
handleShowPanel: () => void;
|
|
15
|
-
},
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
8
|
"update:modelValue": (value: DateValue | undefined, info: {
|
|
17
9
|
dayjs: dayjs.Dayjs | null;
|
|
18
10
|
formatText: null | string;
|
|
19
|
-
}[], rawVal: DateValue) =>
|
|
20
|
-
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) =>
|
|
21
|
-
"update:format": (value: string) =>
|
|
22
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
23
|
-
behavior: string;
|
|
24
|
-
commonUseList: () => DateValue[];
|
|
25
|
-
format: string;
|
|
26
|
-
needTimezone: boolean;
|
|
27
|
-
enableFormatClick: boolean;
|
|
28
|
-
version: string;
|
|
29
|
-
id: string;
|
|
30
|
-
}>>> & {
|
|
11
|
+
}[], rawVal: DateValue) => any;
|
|
12
|
+
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => any;
|
|
13
|
+
"update:format": (value: string) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<IDatePickerProps> & Readonly<{
|
|
31
15
|
"onUpdate:modelValue"?: ((value: DateValue | undefined, info: {
|
|
32
16
|
dayjs: dayjs.Dayjs | null;
|
|
33
17
|
formatText: null | string;
|
|
34
18
|
}[], rawVal: DateValue) => any) | undefined;
|
|
35
19
|
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
36
20
|
"onUpdate:format"?: ((value: string) => any) | undefined;
|
|
37
|
-
}
|
|
21
|
+
}>, {
|
|
22
|
+
behavior: "normal" | "simplicity";
|
|
38
23
|
id: string;
|
|
39
24
|
format: string;
|
|
40
|
-
commonUseList: {
|
|
25
|
+
commonUseList: DateValue[] | {
|
|
41
26
|
id: DateValue;
|
|
42
27
|
name: string;
|
|
43
|
-
}[]
|
|
28
|
+
}[];
|
|
44
29
|
version: number | string;
|
|
45
30
|
enableFormatClick: boolean;
|
|
46
|
-
behavior: "normal" | "simplicity";
|
|
47
31
|
needTimezone: boolean;
|
|
48
|
-
}, {}>;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
33
|
export default _default;
|
|
50
|
-
type __VLS_WithDefaults<P, D> = {
|
|
51
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
52
|
-
default: D[K];
|
|
53
|
-
}> : P[K];
|
|
54
|
-
};
|
|
55
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
56
|
-
type __VLS_TypePropsToOption<T> = {
|
|
57
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
58
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
59
|
-
} : {
|
|
60
|
-
type: import('vue').PropType<T[K]>;
|
|
61
|
-
required: true;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
type __VLS_PrettifyLocal<T> = {
|
|
65
|
-
[K in keyof T]: T[K];
|
|
66
|
-
} & {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Dayjs } from 'dayjs';
|
|
2
1
|
import { type DateValue } from '../utils';
|
|
3
2
|
import { DateRange } from '../utils/date';
|
|
3
|
+
import type { Dayjs } from 'dayjs';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* @description: 提交前日期的校验
|
|
@@ -9,8 +9,8 @@ import { DateRange } from '../utils/date';
|
|
|
9
9
|
* 3、校验时间范围是否大于最大时间间隔
|
|
10
10
|
*/
|
|
11
11
|
export declare const useValidate: () => {
|
|
12
|
-
validDateRange: import("vue").Ref<DateRange | undefined>;
|
|
13
|
-
validMsg: import("vue").Ref<string>;
|
|
12
|
+
validDateRange: import("vue").Ref<DateRange | undefined, DateRange | undefined>;
|
|
13
|
+
validMsg: import("vue").Ref<string, string>;
|
|
14
14
|
validateDateRange: (validDate: DateRange) => boolean;
|
|
15
15
|
validateDateValue: (validDate: DateValue) => boolean;
|
|
16
16
|
validateDayjs: (validDate: Dayjs) => boolean;
|
package/typings/lang/lang.d.ts
CHANGED
|
@@ -77,11 +77,11 @@ export declare const langData: {
|
|
|
77
77
|
readonly 时间范围不能大于: "Time range cannot be greater than";
|
|
78
78
|
readonly 时间格式转换: "Time format conversion";
|
|
79
79
|
};
|
|
80
|
-
export type NaturalDateKey = keyof typeof naturalDateLangData;
|
|
81
|
-
export type TimeUnitDateKey = keyof typeof timeUnitLangData;
|
|
82
|
-
export type ShortTimeUnitDateKey = keyof typeof shortTimeUnitLangData;
|
|
83
80
|
export type LangKey = keyof typeof langData;
|
|
84
81
|
export type LangValue = (typeof langData)[LangKey];
|
|
82
|
+
export type NaturalDateKey = keyof typeof naturalDateLangData;
|
|
83
|
+
export type ShortTimeUnitDateKey = keyof typeof shortTimeUnitLangData;
|
|
84
|
+
export type TimeUnitDateKey = keyof typeof timeUnitLangData;
|
|
85
85
|
export declare const langValueMap: Record<LangValue, "前" | "取消" | "将来" | "常用时间" | "开始时间" | "开始时间不能大于结束时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时差:早 $n 小时" | "时差:晚 $n 小时" | "时间格式支持" | "是否清空最近使用?" | "暂无常用时间" | "暂无最近使用记录" | "最近" | "最近使用" | "未来" | "查看支持格式" | "格式" | "此刻" | "浏览器时区" | "的最近" | "确定" | "示例" | "结束时间" | "自然日期" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "超出可选范围" | "近" | "(至今)" | ",无法选择" | "时间范围不能小于" | "时间范围不能大于" | "时间格式转换">;
|
|
86
86
|
export declare const lang: string;
|
|
87
87
|
export declare const t: (key: LangKey | NaturalDateKey | ShortTimeUnitDateKey | TimeUnitDateKey) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type DateValue, DateMode } from './types';
|
|
2
2
|
export declare const DateUnitList: readonly [{
|
|
3
3
|
readonly id: "s";
|
|
4
4
|
readonly name: string;
|
|
@@ -84,3 +84,4 @@ export declare const NowConstant = "now";
|
|
|
84
84
|
export declare const DATE_REGEX_PARSE: RegExp;
|
|
85
85
|
export declare const DATE_REGEX_FORMAT: RegExp;
|
|
86
86
|
export declare const DEFAULT_TIMEZONE = "Asia/Shanghai";
|
|
87
|
+
export declare const MAX_NUMBER_VALUE = 10000;
|
package/typings/utils/date.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs, { type Dayjs, type OpUnitType } from 'dayjs';
|
|
2
2
|
import { type DateUnit } from './constant';
|
|
3
|
-
import {
|
|
3
|
+
import { type DateValue, DateMode } from './types';
|
|
4
4
|
export declare const baselineDateRegexp: RegExp;
|
|
5
5
|
export declare const commonDateRegexp: RegExp;
|
|
6
6
|
export declare const recentDateRegexp: RegExp;
|
|
@@ -39,7 +39,7 @@ export declare class DateRange {
|
|
|
39
39
|
get recentOrFutureDateNum(): number | undefined;
|
|
40
40
|
get recentOrFutureDateUnit(): "M" | "d" | "h" | "m" | "s" | "w" | "y" | undefined;
|
|
41
41
|
get startDisplayText(): string;
|
|
42
|
-
dateDuration(unit?:
|
|
42
|
+
dateDuration(unit?: dayjs.QUnitType | OpUnitType): number | undefined;
|
|
43
43
|
isInValidDateRange(date: DateRange): boolean;
|
|
44
44
|
isInValidDuration(minDuration?: number, maxDuration?: number): boolean;
|
|
45
45
|
setUserDisplayName(v: string): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { type ComputedRef, type InjectionKey, type Ref } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { LangKey } from '../lang/lang';
|
|
3
|
+
import type { ITimezoneItem } from './timezone';
|
|
4
|
+
import type { DateValue, IDatePickerProps } from './types';
|
|
5
5
|
export interface IDatePickerProvider {
|
|
6
6
|
commonUseList: ComputedRef<IDatePickerProps['commonUseList']>;
|
|
7
|
+
enableFormatClick: boolean;
|
|
7
8
|
format: Ref<string>;
|
|
9
|
+
maxDuration: ComputedRef<number | undefined>;
|
|
10
|
+
minDuration: ComputedRef<number | undefined>;
|
|
8
11
|
storeKey: ComputedRef<string>;
|
|
9
|
-
t: (key: LangKey) => string;
|
|
10
12
|
timezoneInfo: ComputedRef<ITimezoneItem>;
|
|
11
|
-
version: ComputedRef<number | string>;
|
|
12
13
|
validateTimeRange: ComputedRef<DateValue | undefined>;
|
|
13
|
-
|
|
14
|
-
maxDuration: ComputedRef<number | undefined>;
|
|
15
|
-
enableFormatClick: boolean;
|
|
14
|
+
version: ComputedRef<number | string>;
|
|
16
15
|
formatChange: (format: string) => void;
|
|
16
|
+
t: (key: LangKey) => string;
|
|
17
17
|
}
|
|
18
18
|
export declare const DATE_PICKER_PROVIDER_KEY: InjectionKey<IDatePickerProvider>;
|
|
19
19
|
export declare const useDatePickerProvider: (data: IDatePickerProvider) => void;
|
package/typings/utils/store.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export interface ITimeZoneGroup {
|
|
2
|
+
label: string;
|
|
3
|
+
options: ITimezoneItem[];
|
|
4
|
+
}
|
|
1
5
|
export interface ITimezoneItem {
|
|
2
6
|
abbreviation: string;
|
|
3
7
|
country: string;
|
|
@@ -5,10 +9,6 @@ export interface ITimezoneItem {
|
|
|
5
9
|
label: string;
|
|
6
10
|
utc: string;
|
|
7
11
|
}
|
|
8
|
-
export interface ITimeZoneGroup {
|
|
9
|
-
label: string;
|
|
10
|
-
options: ITimezoneItem[];
|
|
11
|
-
}
|
|
12
12
|
export declare const getTimezoneDetails: () => ITimeZoneGroup[];
|
|
13
13
|
export declare const getTimezoneInfo: (searchIndex: string) => {
|
|
14
14
|
abbreviation: string;
|