@xn-lib/component 0.1.21 → 0.1.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/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.iife.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/cascader/index.vue.d.ts +2 -2
- package/dist/types/editable-textarea/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/time-range-picker/index.d.ts +5 -0
- package/dist/types/time-range-picker/index.vue.d.ts +112 -0
- package/dist/types/time-range-picker/props.d.ts +59 -0
- package/package.json +1 -1
|
@@ -287,10 +287,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
287
287
|
}>, {
|
|
288
288
|
readonly disabled: boolean;
|
|
289
289
|
readonly filter: import("../types/cascader").Filter;
|
|
290
|
-
readonly showCheckbox: boolean;
|
|
291
290
|
readonly modelValue: CascaderValue | null;
|
|
292
291
|
readonly size: "small" | "default" | "large";
|
|
292
|
+
readonly showCheckbox: boolean;
|
|
293
293
|
readonly onLoad: import("../types/cascader").OnLoad;
|
|
294
|
+
readonly placeholder: string;
|
|
294
295
|
readonly getColumnStyle: (detail: {
|
|
295
296
|
level: number;
|
|
296
297
|
}) => string | Record<string, any>;
|
|
@@ -300,7 +301,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
300
301
|
readonly labelField: string;
|
|
301
302
|
readonly separator: string;
|
|
302
303
|
readonly options: CascaderOption[];
|
|
303
|
-
readonly placeholder: string;
|
|
304
304
|
readonly clearable: boolean;
|
|
305
305
|
readonly filterable: boolean;
|
|
306
306
|
readonly expandTrigger: import("../types/cascader").ExpandTrigger;
|
|
@@ -177,9 +177,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
177
177
|
}>, {
|
|
178
178
|
readonly disabled: boolean;
|
|
179
179
|
readonly modelValue: import("../types").EditableTextareaModelValue;
|
|
180
|
+
readonly placeholder: string;
|
|
180
181
|
readonly maxHeight: number;
|
|
181
182
|
readonly onEnter: import("../types").KeyboardEventHandler;
|
|
182
|
-
readonly placeholder: string;
|
|
183
183
|
readonly maxlength: number;
|
|
184
184
|
readonly readonly: boolean;
|
|
185
185
|
readonly autoHeight: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,13 +7,15 @@ import XnVirtualList from './virtual-list/index';
|
|
|
7
7
|
import XnEllipsis from './ellipsis/index';
|
|
8
8
|
import XnEditableText from './editable-text/index';
|
|
9
9
|
import XnEditableTextarea from './editable-textarea/index';
|
|
10
|
-
|
|
10
|
+
import XnTimeRangePicker from './time-range-picker/index';
|
|
11
|
+
export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText, XnEditableTextarea, XnTimeRangePicker };
|
|
11
12
|
export declare const components: Record<string, Component>;
|
|
12
13
|
export type { CascaderProps } from './cascader/props';
|
|
13
14
|
export type { TagProps } from './tag/props';
|
|
14
15
|
export type { EllipsisProps } from './ellipsis/props';
|
|
15
16
|
export type { EditableTextProps } from './editable-text/props';
|
|
16
17
|
export type { EditableTextareaProps } from './editable-textarea/props';
|
|
18
|
+
export type { TimeRangePickerProps, TimeRangeValue, TimeRange } from './time-range-picker/props';
|
|
17
19
|
export * from './types';
|
|
18
20
|
declare const plugin: Plugin;
|
|
19
21
|
export default plugin;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { type TimeRangeValue } from './props';
|
|
2
|
+
declare function clearAll(): void;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
readonly modelValue: {
|
|
5
|
+
readonly type: import("vue").PropType<TimeRangeValue>;
|
|
6
|
+
readonly default: () => {};
|
|
7
|
+
};
|
|
8
|
+
readonly disabled: {
|
|
9
|
+
readonly type: BooleanConstructor;
|
|
10
|
+
readonly default: false;
|
|
11
|
+
};
|
|
12
|
+
readonly showWeekControl: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
readonly default: true;
|
|
15
|
+
};
|
|
16
|
+
readonly weekLabels: {
|
|
17
|
+
readonly type: import("vue").PropType<string[]>;
|
|
18
|
+
readonly default: () => string[];
|
|
19
|
+
};
|
|
20
|
+
readonly timeGranularity: {
|
|
21
|
+
readonly type: NumberConstructor;
|
|
22
|
+
readonly default: 60;
|
|
23
|
+
readonly validator: (value: number) => boolean;
|
|
24
|
+
};
|
|
25
|
+
readonly startHour: {
|
|
26
|
+
readonly type: NumberConstructor;
|
|
27
|
+
readonly default: 0;
|
|
28
|
+
readonly validator: (value: number) => boolean;
|
|
29
|
+
};
|
|
30
|
+
readonly endHour: {
|
|
31
|
+
readonly type: NumberConstructor;
|
|
32
|
+
readonly default: 24;
|
|
33
|
+
readonly validator: (value: number) => boolean;
|
|
34
|
+
};
|
|
35
|
+
readonly showSelectedRanges: {
|
|
36
|
+
readonly type: BooleanConstructor;
|
|
37
|
+
readonly default: true;
|
|
38
|
+
};
|
|
39
|
+
readonly cellClassName: {
|
|
40
|
+
readonly type: import("vue").PropType<string | ((day: number, slot: number) => string)>;
|
|
41
|
+
readonly default: "";
|
|
42
|
+
};
|
|
43
|
+
readonly minWidth: {
|
|
44
|
+
readonly type: NumberConstructor;
|
|
45
|
+
readonly default: 500;
|
|
46
|
+
};
|
|
47
|
+
}>, {
|
|
48
|
+
clearAll: typeof clearAll;
|
|
49
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
|
+
"update:modelValue": (value: TimeRangeValue) => any;
|
|
51
|
+
change: (value: TimeRangeValue) => any;
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
|
+
readonly modelValue: {
|
|
54
|
+
readonly type: import("vue").PropType<TimeRangeValue>;
|
|
55
|
+
readonly default: () => {};
|
|
56
|
+
};
|
|
57
|
+
readonly disabled: {
|
|
58
|
+
readonly type: BooleanConstructor;
|
|
59
|
+
readonly default: false;
|
|
60
|
+
};
|
|
61
|
+
readonly showWeekControl: {
|
|
62
|
+
readonly type: BooleanConstructor;
|
|
63
|
+
readonly default: true;
|
|
64
|
+
};
|
|
65
|
+
readonly weekLabels: {
|
|
66
|
+
readonly type: import("vue").PropType<string[]>;
|
|
67
|
+
readonly default: () => string[];
|
|
68
|
+
};
|
|
69
|
+
readonly timeGranularity: {
|
|
70
|
+
readonly type: NumberConstructor;
|
|
71
|
+
readonly default: 60;
|
|
72
|
+
readonly validator: (value: number) => boolean;
|
|
73
|
+
};
|
|
74
|
+
readonly startHour: {
|
|
75
|
+
readonly type: NumberConstructor;
|
|
76
|
+
readonly default: 0;
|
|
77
|
+
readonly validator: (value: number) => boolean;
|
|
78
|
+
};
|
|
79
|
+
readonly endHour: {
|
|
80
|
+
readonly type: NumberConstructor;
|
|
81
|
+
readonly default: 24;
|
|
82
|
+
readonly validator: (value: number) => boolean;
|
|
83
|
+
};
|
|
84
|
+
readonly showSelectedRanges: {
|
|
85
|
+
readonly type: BooleanConstructor;
|
|
86
|
+
readonly default: true;
|
|
87
|
+
};
|
|
88
|
+
readonly cellClassName: {
|
|
89
|
+
readonly type: import("vue").PropType<string | ((day: number, slot: number) => string)>;
|
|
90
|
+
readonly default: "";
|
|
91
|
+
};
|
|
92
|
+
readonly minWidth: {
|
|
93
|
+
readonly type: NumberConstructor;
|
|
94
|
+
readonly default: 500;
|
|
95
|
+
};
|
|
96
|
+
}>> & Readonly<{
|
|
97
|
+
"onUpdate:modelValue"?: ((value: TimeRangeValue) => any) | undefined;
|
|
98
|
+
onChange?: ((value: TimeRangeValue) => any) | undefined;
|
|
99
|
+
}>, {
|
|
100
|
+
readonly disabled: boolean;
|
|
101
|
+
readonly modelValue: TimeRangeValue;
|
|
102
|
+
readonly minWidth: number;
|
|
103
|
+
readonly showWeekControl: boolean;
|
|
104
|
+
readonly weekLabels: string[];
|
|
105
|
+
readonly timeGranularity: number;
|
|
106
|
+
readonly startHour: number;
|
|
107
|
+
readonly endHour: number;
|
|
108
|
+
readonly showSelectedRanges: boolean;
|
|
109
|
+
readonly cellClassName: string | ((day: number, slot: number) => string);
|
|
110
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
111
|
+
declare const _default: typeof __VLS_export;
|
|
112
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
export interface TimeRange {
|
|
3
|
+
day: number;
|
|
4
|
+
startHour: number;
|
|
5
|
+
endHour: number;
|
|
6
|
+
}
|
|
7
|
+
export interface TimeRangeValue {
|
|
8
|
+
[key: number]: number[];
|
|
9
|
+
}
|
|
10
|
+
export interface Selection {
|
|
11
|
+
day: number;
|
|
12
|
+
slot: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const timeRangePickerProps: {
|
|
15
|
+
readonly modelValue: {
|
|
16
|
+
readonly type: PropType<TimeRangeValue>;
|
|
17
|
+
readonly default: () => {};
|
|
18
|
+
};
|
|
19
|
+
readonly disabled: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: false;
|
|
22
|
+
};
|
|
23
|
+
readonly showWeekControl: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: true;
|
|
26
|
+
};
|
|
27
|
+
readonly weekLabels: {
|
|
28
|
+
readonly type: PropType<string[]>;
|
|
29
|
+
readonly default: () => string[];
|
|
30
|
+
};
|
|
31
|
+
readonly timeGranularity: {
|
|
32
|
+
readonly type: NumberConstructor;
|
|
33
|
+
readonly default: 60;
|
|
34
|
+
readonly validator: (value: number) => boolean;
|
|
35
|
+
};
|
|
36
|
+
readonly startHour: {
|
|
37
|
+
readonly type: NumberConstructor;
|
|
38
|
+
readonly default: 0;
|
|
39
|
+
readonly validator: (value: number) => boolean;
|
|
40
|
+
};
|
|
41
|
+
readonly endHour: {
|
|
42
|
+
readonly type: NumberConstructor;
|
|
43
|
+
readonly default: 24;
|
|
44
|
+
readonly validator: (value: number) => boolean;
|
|
45
|
+
};
|
|
46
|
+
readonly showSelectedRanges: {
|
|
47
|
+
readonly type: BooleanConstructor;
|
|
48
|
+
readonly default: true;
|
|
49
|
+
};
|
|
50
|
+
readonly cellClassName: {
|
|
51
|
+
readonly type: PropType<string | ((day: number, slot: number) => string)>;
|
|
52
|
+
readonly default: "";
|
|
53
|
+
};
|
|
54
|
+
readonly minWidth: {
|
|
55
|
+
readonly type: NumberConstructor;
|
|
56
|
+
readonly default: 500;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type TimeRangePickerProps = ExtractPropTypes<typeof timeRangePickerProps>;
|