@blueking/date-picker 0.0.1

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.
@@ -0,0 +1,41 @@
1
+ import dayjs from 'dayjs';
2
+ import { ComputedRef, InjectionKey } from 'vue';
3
+ import { LangKey } from '../lang/lang';
4
+ import { ITimezoneItem } from './timezone';
5
+ import { DateMode, DateValue } from './types';
6
+ export declare const recentDateRegexp: RegExp;
7
+ export declare const naturalDateRegexp: RegExp;
8
+ export interface IDatePickerProvider {
9
+ format: ComputedRef<string>;
10
+ storeKey: ComputedRef<string>;
11
+ t: (key: LangKey) => string;
12
+ timezoneInfo: ComputedRef<ITimezoneItem>;
13
+ }
14
+ export declare const DATE_PICKER_PROVIDER_KEY: InjectionKey<IDatePickerProvider>;
15
+ export declare const useDatePickerProvider: (data: IDatePickerProvider) => void;
16
+ export declare const useDatePickertInject: () => IDatePickerProvider | undefined;
17
+ /**
18
+ *
19
+ * @param value 日期值
20
+ * @param format 日期格式
21
+ * @returns 日期值对应展示字符串
22
+ */
23
+ export declare const getDateValueToString: (value: DateValue | undefined, format: string) => string;
24
+ /**
25
+ *
26
+ * @param value 日期值
27
+ * @returns 日期值对应展示模式
28
+ */
29
+ export declare const getDateValueMode: (value: DateValue | undefined) => DateMode;
30
+ /**
31
+ *
32
+ * @param value 日期值
33
+ * @param format 日期格式
34
+ * @returns 日期值对应 dayjs 对象
35
+ */
36
+ export declare const transformDateValueToDayjs: (value: DateValue | string[] | undefined) => dayjs.Dayjs[];
37
+ /**
38
+ * @param val 日期值
39
+ * @returns 日期值是否有效
40
+ */
41
+ export declare const isValidDateValue: (val: DateValue | string[] | undefined) => boolean;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import dayjs, { Dayjs } from 'dayjs';
2
+ import DatePicker from './date-picker.vue';
3
+ export { DatePicker, Dayjs, dayjs };
4
+ export default DatePicker;