@blueking/date-picker 2.0.0-beta.21 → 2.0.0-beta.22
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 +3 -5
- package/typings/components/common-submit.vue.d.ts +4 -4
- package/typings/components/common-tab.vue.d.ts +9 -3
- package/typings/components/date-panel.vue.d.ts +1 -1
- package/typings/components/panel-wrapper.vue.d.ts +4 -4
- package/typings/components/timezone-picker.vue.d.ts +2 -2
- package/typings/date-picker.vue.d.ts +3 -3
- package/typings/hooks/use-validate.d.ts +2 -2
- package/typings/utils/constant.d.ts +2 -2
- package/typings/utils/date.d.ts +4 -4
- package/typings/utils/store.d.ts +1 -1
- package/typings/utils/types.d.ts +1 -1
- package/typings/utils/utils.d.ts +5 -5
- package/typings/vue2.d.ts +1 -1
- package/vue2/index.es.min.js +602 -1091
- package/vue2/index.iife.min.js +1264 -1795
- package/vue2/index.umd.min.js +602 -1091
- package/vue3/index.es.min.js +131 -185
- package/vue3/index.iife.min.js +647 -1172
- package/vue3/index.umd.min.js +131 -185
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/date-picker",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.22",
|
|
4
4
|
"description": "蓝鲸监控平台日期时间选择",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tencent BlueKing",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"default": "./vue2/index.es.min.js"
|
|
22
22
|
},
|
|
23
23
|
"./vue3/*": "./vue3/*",
|
|
24
|
-
"./vue2/*": "./vue2/*"
|
|
24
|
+
"./vue2/*": "./vue2/*",
|
|
25
|
+
"./src/*": "./src/*"
|
|
25
26
|
},
|
|
26
27
|
"typesVersions": {
|
|
27
28
|
"*": {
|
|
@@ -54,9 +55,6 @@
|
|
|
54
55
|
"dayjs": "^1.11.10",
|
|
55
56
|
"vue": "^3"
|
|
56
57
|
},
|
|
57
|
-
"engines": {
|
|
58
|
-
"node": ">=18.16.0"
|
|
59
|
-
},
|
|
60
58
|
"scripts": {
|
|
61
59
|
"dev": "vite --mode development -c scripts/vite.dev.ts",
|
|
62
60
|
"build": "tsx ./scripts/vite.build.ts",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
-
disableTips?: string
|
|
2
|
+
disableTips?: string;
|
|
3
3
|
/**
|
|
4
4
|
* 是否禁用
|
|
5
5
|
*/
|
|
6
|
-
disabled?: boolean
|
|
6
|
+
disabled?: boolean;
|
|
7
7
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
8
|
submit: () => void;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
10
|
-
disableTips?: string
|
|
10
|
+
disableTips?: string;
|
|
11
11
|
/**
|
|
12
12
|
* 是否禁用
|
|
13
13
|
*/
|
|
14
|
-
disabled?: boolean
|
|
14
|
+
disabled?: boolean;
|
|
15
15
|
}>>> & {
|
|
16
16
|
onSubmit?: (() => any) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ICommonTabItem } from '../utils';
|
|
1
|
+
import type { DateMode, ICommonTabItem } from '../utils';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
/** modelValue 选中的tab */
|
|
@@ -15,7 +15,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
default: boolean;
|
|
16
16
|
type: BooleanConstructor;
|
|
17
17
|
};
|
|
18
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
confirm: () => void;
|
|
20
|
+
"update:modelValue": (args_0: DateMode) => void;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
22
|
/** modelValue 选中的tab */
|
|
20
23
|
modelValue: {
|
|
21
24
|
required: true;
|
|
@@ -30,7 +33,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
33
|
default: boolean;
|
|
31
34
|
type: BooleanConstructor;
|
|
32
35
|
};
|
|
33
|
-
}
|
|
36
|
+
}>> & {
|
|
37
|
+
onConfirm?: (() => any) | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((args_0: DateMode) => any) | undefined;
|
|
39
|
+
}, {
|
|
34
40
|
showDeleteAll: boolean;
|
|
35
41
|
}, {}>;
|
|
36
42
|
export default _default;
|
|
@@ -3,15 +3,15 @@ import { DateRange } from '../utils/date';
|
|
|
3
3
|
import { type ITimezoneItem } from '../utils/timezone';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
5
5
|
defaultDate: DateRange;
|
|
6
|
-
needTimezone?: boolean
|
|
7
|
-
timezone?: string
|
|
6
|
+
needTimezone?: boolean;
|
|
7
|
+
timezone?: string;
|
|
8
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
change: (value: DateValue) => void;
|
|
10
10
|
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => void;
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
12
12
|
defaultDate: DateRange;
|
|
13
|
-
needTimezone?: boolean
|
|
14
|
-
timezone?: string
|
|
13
|
+
needTimezone?: boolean;
|
|
14
|
+
timezone?: string;
|
|
15
15
|
}>>> & {
|
|
16
16
|
onChange?: ((value: DateValue) => any) | undefined;
|
|
17
17
|
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ITimezoneItem } from '../utils/timezone';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
-
value?: string
|
|
3
|
+
value?: string;
|
|
4
4
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
change: (value: string, info: ITimezoneItem) => void;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
|
-
value?: string
|
|
7
|
+
value?: string;
|
|
8
8
|
}>>> & {
|
|
9
9
|
onChange?: ((value: string, info: ITimezoneItem) => any) | undefined;
|
|
10
10
|
}, {}, {}>;
|
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
13
13
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
14
|
"update:modelValue": (value: DateValue | undefined, info: {
|
|
15
15
|
dayjs: dayjs.Dayjs | null;
|
|
16
|
-
formatText:
|
|
16
|
+
formatText: null | string;
|
|
17
17
|
}[]) => void;
|
|
18
18
|
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => void;
|
|
19
19
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<IDatePickerProps>, {
|
|
@@ -25,12 +25,12 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
25
25
|
}>>> & {
|
|
26
26
|
"onUpdate:modelValue"?: ((value: DateValue | undefined, info: {
|
|
27
27
|
dayjs: dayjs.Dayjs | null;
|
|
28
|
-
formatText:
|
|
28
|
+
formatText: null | string;
|
|
29
29
|
}[]) => any) | undefined;
|
|
30
30
|
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
format: string;
|
|
33
|
-
version:
|
|
33
|
+
version: number | string;
|
|
34
34
|
behavior: "normal" | "simplicity";
|
|
35
35
|
commonUseList: DateValue[];
|
|
36
36
|
needTimezone: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dayjs } from 'dayjs';
|
|
2
|
-
import { DateValue } from '../utils';
|
|
1
|
+
import { type Dayjs } from 'dayjs';
|
|
2
|
+
import { type DateValue } from '../utils';
|
|
3
3
|
import { DateRange } from '../utils/date';
|
|
4
4
|
export declare const useValidate: () => {
|
|
5
5
|
validDateRange: import("vue").Ref<DateRange | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateMode, DateValue } from './types';
|
|
1
|
+
import { DateMode, type DateValue } from './types';
|
|
2
2
|
export declare const DateUnitList: readonly [{
|
|
3
3
|
readonly id: "s";
|
|
4
4
|
readonly name: string;
|
|
@@ -22,7 +22,7 @@ export declare const DateUnitList: readonly [{
|
|
|
22
22
|
readonly name: string;
|
|
23
23
|
}];
|
|
24
24
|
export type DateUnit = (typeof DateUnitList)[number]['id'];
|
|
25
|
-
export declare const dateUnit:
|
|
25
|
+
export declare const dateUnit: DateUnit;
|
|
26
26
|
export declare enum NaturalOptionType {
|
|
27
27
|
custom = "custom",
|
|
28
28
|
default = "default",
|
package/typings/utils/date.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import dayjs, { Dayjs } from 'dayjs';
|
|
2
|
-
import { DateUnit } from './constant';
|
|
3
|
-
import { DateMode, DateValue } from './types';
|
|
1
|
+
import dayjs, { type Dayjs } from 'dayjs';
|
|
2
|
+
import { type DateUnit } from './constant';
|
|
3
|
+
import { DateMode, type DateValue } from './types';
|
|
4
4
|
export declare const baselineDateRegexp: RegExp;
|
|
5
5
|
export declare const commonDateRegexp: RegExp;
|
|
6
6
|
export declare const recentDateRegexp: RegExp;
|
|
@@ -43,6 +43,6 @@ export declare class DateRange {
|
|
|
43
43
|
updateDateValue(dateValue: DateValue, timezome?: string): void;
|
|
44
44
|
updateFormat(format: string): void;
|
|
45
45
|
}
|
|
46
|
-
export declare const transformValue2Dayjs: (val: DateValue[number], type?:
|
|
46
|
+
export declare const transformValue2Dayjs: (val: DateValue[number], type?: "end" | "start", timezome?: string) => dayjs.Dayjs | undefined;
|
|
47
47
|
export declare const transformDateRange2Dayjs: (dateValue: DateValue, timezome?: string) => (dayjs.Dayjs | undefined)[];
|
|
48
48
|
export declare const inputVal2Dayjs: (val: string, format: string, defaultDate?: Dayjs) => dayjs.Dayjs;
|
package/typings/utils/store.d.ts
CHANGED
package/typings/utils/types.d.ts
CHANGED
package/typings/utils/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
-
import { LangKey } from '../lang/lang';
|
|
3
|
-
import { ITimezoneItem } from './timezone';
|
|
4
|
-
import { DateValue } from './types';
|
|
1
|
+
import { type ComputedRef, type InjectionKey } from 'vue';
|
|
2
|
+
import { type LangKey } from '../lang/lang';
|
|
3
|
+
import { type ITimezoneItem } from './timezone';
|
|
4
|
+
import { type DateValue } from './types';
|
|
5
5
|
export interface IDatePickerProvider {
|
|
6
6
|
commonUseList: ComputedRef<DateValue[]>;
|
|
7
7
|
format: ComputedRef<string>;
|
|
@@ -13,4 +13,4 @@ export interface IDatePickerProvider {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const DATE_PICKER_PROVIDER_KEY: InjectionKey<IDatePickerProvider>;
|
|
15
15
|
export declare const useDatePickerProvider: (data: IDatePickerProvider) => void;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const useDatePickerInject: () => IDatePickerProvider | undefined;
|
package/typings/vue2.d.ts
CHANGED