@toife/vue 3.6.2 → 3.7.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/dist/components/app/app.vue.d.ts +1 -1
- package/dist/components/datepicker/datepicker.vue.d.ts +21 -0
- package/dist/components/datepicker/index.d.ts +1 -0
- package/dist/components/decision-modal/decision-modal.vue.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pagination/pagination.vue.d.ts +1 -1
- package/dist/components/segmented-field/segmented-field.vue.d.ts +1 -1
- package/dist/core/features/datepicker/datepicker.constants.d.ts +20 -0
- package/dist/core/features/datepicker/datepicker.logic.d.ts +50 -0
- package/dist/core/features/datepicker/datepicker.type.d.ts +42 -0
- package/dist/core/features/datepicker/index.d.ts +3 -0
- package/dist/core/features/index.d.ts +1 -0
- package/dist/index.es.js +2279 -2016
- package/dist/index.umd.js +1 -1
- package/dist/styles/datepicker.css +1 -0
- package/dist/styles/index.css +1 -0
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import { AppProps } from '../../core';
|
|
|
2
2
|
declare const _default: import('vue').DefineComponent<AppProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppProps> & Readonly<{}>, {
|
|
3
3
|
role: string;
|
|
4
4
|
shape: string;
|
|
5
|
-
divider: boolean;
|
|
6
5
|
direction: import('../../core').AppDirection;
|
|
6
|
+
divider: boolean;
|
|
7
7
|
triple: boolean;
|
|
8
8
|
data: import('../../core').AppData;
|
|
9
9
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DatePickerProps, DatePickerValue } from '../../core';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<DatePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
change: (value: Date) => any;
|
|
4
|
+
"update:modelValue": (value: Date) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
6
|
+
onChange?: ((value: Date) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: Date) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
size: import('../../core').DatePickerSize;
|
|
10
|
+
seconds: boolean;
|
|
11
|
+
direction: import('../../core').AppDirection;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
type: import('../../core').DatePickerType;
|
|
14
|
+
value: DatePickerValue;
|
|
15
|
+
max: Date;
|
|
16
|
+
modelValue: DatePickerValue;
|
|
17
|
+
min: Date;
|
|
18
|
+
firstDay: number;
|
|
19
|
+
locale: string;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DatePicker } from './datepicker.vue';
|
|
@@ -8,8 +8,8 @@ declare const _default: import('vue').DefineComponent<DecisionModalProps, {}, {}
|
|
|
8
8
|
}>, {
|
|
9
9
|
role: string;
|
|
10
10
|
shape: string;
|
|
11
|
-
divider: boolean;
|
|
12
11
|
direction: import('../../core').DecisionModalDirection;
|
|
12
|
+
divider: boolean;
|
|
13
13
|
visible: boolean;
|
|
14
14
|
placement: string;
|
|
15
15
|
keepalive: boolean;
|
|
@@ -7,8 +7,8 @@ declare const _default: import('vue').DefineComponent<PaginationProps, {}, {}, {
|
|
|
7
7
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
size: import('../../core').PaginationSize;
|
|
10
|
-
direction: import('../../core').AppDirection;
|
|
11
10
|
length: number;
|
|
11
|
+
direction: import('../../core').AppDirection;
|
|
12
12
|
variant: import('../../core').PaginationVariant;
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
value: number;
|
|
@@ -13,8 +13,8 @@ declare const _default: import('vue').DefineComponent<SegmentedFieldProps, {}, {
|
|
|
13
13
|
onComplete?: ((value: string[]) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
size: import('../../core').SegmentedFieldSize;
|
|
16
|
-
direction: import('../../core').AppDirection;
|
|
17
16
|
length: number;
|
|
17
|
+
direction: import('../../core').AppDirection;
|
|
18
18
|
variant: import('../../core').SegmentedFieldVariant;
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
message: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatePicker Default Props
|
|
3
|
+
*/
|
|
4
|
+
export declare const DATEPICKER_DEFAULT_PROPS: {
|
|
5
|
+
readonly modelValue: undefined;
|
|
6
|
+
readonly value: undefined;
|
|
7
|
+
readonly type: "date";
|
|
8
|
+
readonly min: undefined;
|
|
9
|
+
readonly max: undefined;
|
|
10
|
+
readonly seconds: true;
|
|
11
|
+
readonly firstDay: 1;
|
|
12
|
+
readonly locale: "vi-VN";
|
|
13
|
+
readonly size: "standard";
|
|
14
|
+
readonly disabled: false;
|
|
15
|
+
readonly direction: undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Number of years shown per page in the year view
|
|
19
|
+
*/
|
|
20
|
+
export declare const DATEPICKER_YEARS_PER_PAGE = 12;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DatePickerAttrOptions, DatePickerCalendarOptions, DatePickerCellAttrOptions, DatePickerTimeUnit } from './datepicker.type';
|
|
2
|
+
export declare const startOfDay: (date: Date) => Date;
|
|
3
|
+
export declare const endOfDay: (date: Date) => Date;
|
|
4
|
+
export declare const isSameDay: (a?: Date | null, b?: Date | null) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A day is disabled when it lies entirely outside [min, max]
|
|
7
|
+
*/
|
|
8
|
+
export declare const isDatePickerDayDisabled: (date: Date, min?: Date, max?: Date) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Month is disabled when it lies entirely outside [min, max]
|
|
11
|
+
*/
|
|
12
|
+
export declare const isDatePickerMonthDisabled: (year: number, month: number, min?: Date, max?: Date) => boolean;
|
|
13
|
+
export declare const isDatePickerYearDisabled: (year: number, min?: Date, max?: Date) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Clamp a date into [min, max]
|
|
16
|
+
*/
|
|
17
|
+
export declare const clampDatePickerDate: (date: Date, min?: Date, max?: Date) => Date;
|
|
18
|
+
/**
|
|
19
|
+
* Build 6 weeks (42 days) for the given month, starting on `firstDay` (0 = Sunday)
|
|
20
|
+
*/
|
|
21
|
+
export declare const getDatePickerDays: (options: DatePickerCalendarOptions) => Date[];
|
|
22
|
+
/**
|
|
23
|
+
* Localized narrow weekday names, ordered from `firstDay`
|
|
24
|
+
*/
|
|
25
|
+
export declare const getDatePickerWeekdays: (locale: string, firstDay: number) => string[];
|
|
26
|
+
export declare const getDatePickerMonths: (locale: string, style?: "short" | "long") => string[];
|
|
27
|
+
/**
|
|
28
|
+
* The page of years that contains `year`
|
|
29
|
+
*/
|
|
30
|
+
export declare const getDatePickerYears: (year: number) => number[];
|
|
31
|
+
export declare const getDatePickerTimeOptions: (unit: DatePickerTimeUnit) => number[];
|
|
32
|
+
export declare const padDatePickerTime: (value: number) => string;
|
|
33
|
+
export declare const getDatePickerAttrs: (options: DatePickerAttrOptions) => {
|
|
34
|
+
class: (string | {
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
})[];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Class for a structural part: header, title, weekdays, days, months, years, time, time-column, ...
|
|
40
|
+
*/
|
|
41
|
+
export declare const getDatePickerPartAttrs: (part: string) => {
|
|
42
|
+
class: string[];
|
|
43
|
+
};
|
|
44
|
+
export declare const getDatePickerCellAttrs: (options: DatePickerCellAttrOptions) => {
|
|
45
|
+
class: (string | {
|
|
46
|
+
active: boolean;
|
|
47
|
+
today: boolean | undefined;
|
|
48
|
+
outside: boolean | undefined;
|
|
49
|
+
})[];
|
|
50
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AppDirection } from '../app/app.type';
|
|
2
|
+
export type DatePickerType = "date" | "time" | "datetime";
|
|
3
|
+
export type DatePickerView = "day" | "month" | "year";
|
|
4
|
+
export type DatePickerTimeUnit = "hours" | "minutes" | "seconds";
|
|
5
|
+
export type DatePickerSize = string;
|
|
6
|
+
export type DatePickerValue = Date | null;
|
|
7
|
+
export type DatePickerProps = {
|
|
8
|
+
modelValue?: DatePickerValue;
|
|
9
|
+
value?: DatePickerValue;
|
|
10
|
+
type?: DatePickerType;
|
|
11
|
+
min?: Date;
|
|
12
|
+
max?: Date;
|
|
13
|
+
seconds?: boolean;
|
|
14
|
+
firstDay?: number;
|
|
15
|
+
locale?: string;
|
|
16
|
+
size?: DatePickerSize;
|
|
17
|
+
role?: string;
|
|
18
|
+
shape?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
direction?: AppDirection;
|
|
21
|
+
};
|
|
22
|
+
export type DatePickerEvent = {
|
|
23
|
+
(e: "update:modelValue", value: Date): void;
|
|
24
|
+
(e: "change", value: Date): void;
|
|
25
|
+
};
|
|
26
|
+
export type DatePickerCalendarOptions = {
|
|
27
|
+
year: number;
|
|
28
|
+
month: number;
|
|
29
|
+
firstDay: number;
|
|
30
|
+
};
|
|
31
|
+
export type DatePickerAttrOptions = {
|
|
32
|
+
role: string;
|
|
33
|
+
shape: string;
|
|
34
|
+
direction: string;
|
|
35
|
+
size: string;
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type DatePickerCellAttrOptions = {
|
|
39
|
+
active: boolean;
|
|
40
|
+
today?: boolean;
|
|
41
|
+
outside?: boolean;
|
|
42
|
+
};
|