@xn-lib/component 0.1.21 → 0.1.23

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.
@@ -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;
@@ -7,13 +7,17 @@ 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
+ import XnTextRuleConfig from './text-rule-config';
12
+ export { XnCascader, XnTag, XnTransfer, XnVirtualList, XnEllipsis, XnEditableText, XnEditableTextarea, XnTimeRangePicker, XnTextRuleConfig };
11
13
  export declare const components: Record<string, Component>;
12
14
  export type { CascaderProps } from './cascader/props';
13
15
  export type { TagProps } from './tag/props';
14
16
  export type { EllipsisProps } from './ellipsis/props';
15
17
  export type { EditableTextProps } from './editable-text/props';
16
18
  export type { EditableTextareaProps } from './editable-textarea/props';
19
+ export type { TimeRangePickerProps, TimeRangeValue, TimeRange } from './time-range-picker/props';
20
+ export type { TextRuleConfigProps } from './text-rule-config/props';
17
21
  export * from './types';
18
22
  declare const plugin: Plugin;
19
23
  export default plugin;
@@ -8,7 +8,7 @@ type __VLS_Slots = {} & {
8
8
  };
9
9
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
10
  readonly type: {
11
- readonly type: import("vue").PropType<import("..").DefaultSize>;
11
+ readonly type: import("vue").PropType<import("..").DefaultType>;
12
12
  readonly default: "default";
13
13
  };
14
14
  readonly color: {
@@ -20,7 +20,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
20
20
  readonly default: undefined;
21
21
  };
22
22
  readonly size: {
23
- readonly type: import("vue").PropType<import("..").DefaultType>;
23
+ readonly type: import("vue").PropType<import("..").DefaultSize>;
24
24
  readonly default: "default";
25
25
  };
26
26
  readonly dot: {
@@ -55,7 +55,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
55
55
  close: () => any;
56
56
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
57
57
  readonly type: {
58
- readonly type: import("vue").PropType<import("..").DefaultSize>;
58
+ readonly type: import("vue").PropType<import("..").DefaultType>;
59
59
  readonly default: "default";
60
60
  };
61
61
  readonly color: {
@@ -67,7 +67,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
67
67
  readonly default: undefined;
68
68
  };
69
69
  readonly size: {
70
- readonly type: import("vue").PropType<import("..").DefaultType>;
70
+ readonly type: import("vue").PropType<import("..").DefaultSize>;
71
71
  readonly default: "default";
72
72
  };
73
73
  readonly dot: {
@@ -102,8 +102,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
102
102
  onClose?: (() => any) | undefined;
103
103
  }>, {
104
104
  readonly border: boolean;
105
- readonly size: import("..").DefaultType;
106
- readonly type: import("..").DefaultSize;
105
+ readonly size: import("..").DefaultSize;
106
+ readonly type: import("..").DefaultType;
107
107
  readonly color: string;
108
108
  readonly bgColor: string;
109
109
  readonly dot: boolean;
@@ -2,7 +2,7 @@ import type { PropType, ExtractPropTypes } from 'vue';
2
2
  import type { DefaultSize, DefaultType } from '../types';
3
3
  export declare const tagProps: {
4
4
  readonly type: {
5
- readonly type: PropType<DefaultSize>;
5
+ readonly type: PropType<DefaultType>;
6
6
  readonly default: "default";
7
7
  };
8
8
  readonly color: {
@@ -14,7 +14,7 @@ export declare const tagProps: {
14
14
  readonly default: undefined;
15
15
  };
16
16
  readonly size: {
17
- readonly type: PropType<DefaultType>;
17
+ readonly type: PropType<DefaultSize>;
18
18
  readonly default: "default";
19
19
  };
20
20
  readonly dot: {
@@ -0,0 +1,5 @@
1
+ import type { Plugin } from 'vue';
2
+ import TextRuleConfigComponent from './index.vue';
3
+ declare const TextRuleConfig: typeof TextRuleConfigComponent & Plugin;
4
+ export default TextRuleConfig;
5
+ export type { TextRuleConfigProps } from './props';
@@ -0,0 +1,45 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ readonly modelValue: {
3
+ readonly type: StringConstructor;
4
+ };
5
+ readonly placeholder: {
6
+ readonly type: StringConstructor;
7
+ readonly default: "请输入";
8
+ };
9
+ readonly rows: {
10
+ readonly type: NumberConstructor;
11
+ readonly default: 3;
12
+ };
13
+ readonly wildcards: {
14
+ readonly type: import("vue").PropType<import("..").Option[]>;
15
+ readonly default: () => never[];
16
+ };
17
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
+ "update:modelValue": (value: string) => any;
19
+ change: (value: string) => any;
20
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ readonly modelValue: {
22
+ readonly type: StringConstructor;
23
+ };
24
+ readonly placeholder: {
25
+ readonly type: StringConstructor;
26
+ readonly default: "请输入";
27
+ };
28
+ readonly rows: {
29
+ readonly type: NumberConstructor;
30
+ readonly default: 3;
31
+ };
32
+ readonly wildcards: {
33
+ readonly type: import("vue").PropType<import("..").Option[]>;
34
+ readonly default: () => never[];
35
+ };
36
+ }>> & Readonly<{
37
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
38
+ onChange?: ((value: string) => any) | undefined;
39
+ }>, {
40
+ readonly placeholder: string;
41
+ readonly rows: number;
42
+ readonly wildcards: import("..").Option[];
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import { Option } from '../types';
3
+ export declare const textRuleConfigProps: {
4
+ readonly modelValue: {
5
+ readonly type: StringConstructor;
6
+ };
7
+ readonly placeholder: {
8
+ readonly type: StringConstructor;
9
+ readonly default: "请输入";
10
+ };
11
+ readonly rows: {
12
+ readonly type: NumberConstructor;
13
+ readonly default: 3;
14
+ };
15
+ readonly wildcards: {
16
+ readonly type: PropType<Option[]>;
17
+ readonly default: () => never[];
18
+ };
19
+ };
20
+ export type TextRuleConfigProps = ExtractPropTypes<typeof textRuleConfigProps>;
@@ -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>;
@@ -5,3 +5,7 @@ export * from './virtual-list';
5
5
  export * from './editable-textarea';
6
6
  export type DefaultType = 'success' | 'info' | 'warning' | 'danger' | 'primary' | 'default';
7
7
  export type DefaultSize = 'small' | 'default' | 'large';
8
+ export type Option = {
9
+ label: string;
10
+ value: string;
11
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@xn-lib/component",
4
- "version": "0.1.21",
4
+ "version": "0.1.23",
5
5
  "description": "",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.mjs",