@xn-lib/component 0.1.20 → 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.
@@ -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
- export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText, XnEditableTextarea };
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,5 @@
1
+ import type { Plugin } from 'vue';
2
+ import TimeRangePickerComponent from './index.vue';
3
+ declare const TimeRangePicker: typeof TimeRangePickerComponent & Plugin;
4
+ export default TimeRangePicker;
5
+ export type { TimeRangeValue, TimeRange } from './props';
@@ -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>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@xn-lib/component",
4
- "version": "0.1.20",
4
+ "version": "0.1.22",
5
5
  "description": "",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.mjs",