@rebilly/revel 6.30.25 → 6.30.26

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.
@@ -1,173 +1,85 @@
1
- import { type PropType } from 'vue';
2
- import type { Moment } from 'moment';
3
- import { type CalendarPresetLabel, type CalendarPreset } from './calendar-presets';
4
1
  import type { DateRange } from './types';
5
- interface PopperElement extends HTMLElement {
6
- popper?: {
7
- toggle: () => void;
8
- };
9
- }
10
- declare const _default: import("vue").DefineComponent<{
11
- modelValue: {
12
- type: PropType<string | DateRange>;
13
- default: null;
14
- };
15
- calendarToggle: {
16
- type: FunctionConstructor;
17
- default: () => () => undefined;
18
- };
2
+ interface Props {
19
3
  /**
20
- * Specify if the date range picker is disabled
4
+ * The date range selected
21
5
  */
22
- disabled: {
23
- type: BooleanConstructor;
24
- default: boolean;
25
- };
26
- timePicker: {
27
- type: BooleanConstructor;
28
- default: boolean;
29
- };
6
+ modelValue?: DateRange | string;
30
7
  /**
31
- * Specify if there are presets shown
8
+ * Function to toggle the calendar
32
9
  */
33
- showPresets: {
34
- type: BooleanConstructor;
35
- default: boolean;
36
- };
37
- placeholder: {
38
- type: StringConstructor;
39
- default: string;
40
- };
10
+ calendarToggle: () => void;
41
11
  /**
42
- * Specify the timezone
12
+ * Specify if the date range picker is disabled
43
13
  */
44
- timezone: {
45
- type: StringConstructor;
46
- default: string;
47
- };
14
+ disabled?: boolean;
48
15
  /**
49
- * Define if the time format is 24H
16
+ * Time picker
50
17
  */
51
- is24hr: {
52
- type: BooleanConstructor;
53
- default: boolean;
54
- };
55
- }, {
56
- presets: import("vue").Ref<PopperElement | null>;
57
- }, unknown, {
58
- isMobile(): boolean;
59
- calendarPresets(): {
60
- readonly today: "today";
61
- readonly yesterday: "yesterday";
62
- readonly thisWeek: "thisWeek";
63
- readonly lastWeek: "lastWeek";
64
- readonly last30Days: "last30Days";
65
- readonly thisMonth: "thisMonth";
66
- readonly lastMonth: "lastMonth";
67
- readonly last3Months: "last3Months";
68
- readonly last6Months: "last6Months";
69
- readonly thisYear: "thisYear";
70
- readonly lastYear: "lastYear";
71
- };
72
- calendarPresetsPeriods(): Record<"today" | "yesterday" | "thisWeek" | "lastWeek" | "last30Days" | "thisMonth" | "lastMonth" | "last3Months" | "last6Months" | "thisYear" | "lastYear", import("./calendar-presets").CalendarPresetPeriod>;
73
- calendarPresetsPeriodsList(): [string, import("./calendar-presets").CalendarPresetPeriod][];
74
- isValidDatesPeriod(): boolean;
75
- isRelative(): boolean;
76
- selectedRelativeParams(): import("./calendar-presets").CalendarPresetPeriod | DateRange | {
77
- start: string;
78
- end: string;
79
- } | {
80
- relativeFilterValue: string;
81
- start: Moment;
82
- end: Moment;
83
- presetName: string;
84
- presetLabel: "Today" | "Yesterday" | "This week" | "Last week" | "Last 30 days" | "This month" | "Last month" | "Last 3 months" | "Last 6 months" | "This year" | "Last year";
85
- } | null;
86
- isRelativePreset(): boolean | null;
87
- selectedPeriod(): {
88
- start: string | Moment | Date;
89
- end: string | Moment | Date;
90
- isRelative: boolean;
91
- relativeFilterValue: Nullable<string>;
92
- presetName: string;
93
- presetLabel: string;
94
- } | {
95
- start: string | Moment | Date;
96
- end: string | Moment | Date;
97
- } | null;
98
- selectedDate(): {
99
- start: string | Moment | Date;
100
- end: string | Moment | Date;
101
- } | {
102
- start: null;
103
- end: null;
104
- } | null;
105
- selectedDateLabel(): string | null;
106
- }, {
107
- getPresetLabel(presetName: CalendarPresetLabel): "Today" | "Yesterday" | "This week" | "Last week" | "Last 30 days" | "This month" | "Last month" | "Last 3 months" | "Last 6 months" | "This year" | "Last year";
108
- getFormattedPresetPeriod(presetName: CalendarPreset): string;
109
- validateDatesPeriod(period: Voidable<Moment | string | Date>): boolean;
110
- toggle(): void;
111
- parsePeriod(period: string | DateRange): import("./calendar-presets").CalendarPresetPeriod | DateRange | {
112
- start: string;
113
- end: string;
114
- } | null;
115
- relativeFilterChange(presetName: CalendarPresetLabel): void;
116
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "preset-select"[], "preset-select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
117
- modelValue: {
118
- type: PropType<string | DateRange>;
119
- default: null;
120
- };
121
- calendarToggle: {
122
- type: FunctionConstructor;
123
- default: () => () => undefined;
124
- };
18
+ timePicker?: boolean;
125
19
  /**
126
- * Specify if the date range picker is disabled
20
+ * Define if the time format is 24H
127
21
  */
128
- disabled: {
129
- type: BooleanConstructor;
130
- default: boolean;
131
- };
132
- timePicker: {
133
- type: BooleanConstructor;
134
- default: boolean;
135
- };
22
+ is24hr?: boolean;
136
23
  /**
137
24
  * Specify if there are presets shown
138
25
  */
139
- showPresets: {
140
- type: BooleanConstructor;
141
- default: boolean;
142
- };
143
- placeholder: {
144
- type: StringConstructor;
145
- default: string;
146
- };
26
+ showPresets?: boolean;
147
27
  /**
148
- * Specify the timezone
28
+ * Placeholder
149
29
  */
150
- timezone: {
151
- type: StringConstructor;
152
- default: string;
153
- };
30
+ placeholder?: string;
154
31
  /**
155
- * Define if the time format is 24H
32
+ * Specify the timezone
156
33
  */
157
- is24hr: {
158
- type: BooleanConstructor;
159
- default: boolean;
160
- };
161
- }>> & {
162
- "onPreset-select"?: ((...args: any[]) => any) | undefined;
34
+ timezone?: string;
35
+ }
36
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
37
+ modelValue: undefined;
38
+ calendarToggle: () => () => undefined;
39
+ disabled: boolean;
40
+ timePicker: boolean;
41
+ is24hr: boolean;
42
+ showPresets: boolean;
43
+ placeholder: string;
44
+ timezone: string;
45
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
+ "preset-select": (value: DateRange) => void;
47
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
48
+ modelValue: undefined;
49
+ calendarToggle: () => () => undefined;
50
+ disabled: boolean;
51
+ timePicker: boolean;
52
+ is24hr: boolean;
53
+ showPresets: boolean;
54
+ placeholder: string;
55
+ timezone: string;
56
+ }>>> & {
57
+ "onPreset-select"?: ((value: DateRange) => any) | undefined;
163
58
  }, {
164
59
  disabled: boolean;
165
60
  modelValue: string | DateRange;
166
- is24hr: boolean;
167
61
  timezone: string;
62
+ is24hr: boolean;
168
63
  placeholder: string;
169
- calendarToggle: Function;
64
+ calendarToggle: () => void;
170
65
  timePicker: boolean;
171
66
  showPresets: boolean;
172
67
  }>;
173
68
  export default _default;
69
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
70
+ type __VLS_TypePropsToRuntimeProps<T> = {
71
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
72
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
73
+ } : {
74
+ type: import('vue').PropType<T[K]>;
75
+ required: true;
76
+ };
77
+ };
78
+ type __VLS_WithDefaults<P, D> = {
79
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
80
+ default: D[K];
81
+ }> : P[K];
82
+ };
83
+ type __VLS_Prettify<T> = {
84
+ [K in keyof T]: T[K];
85
+ } & {};
@@ -1,197 +1,74 @@
1
- import { type PropType } from 'vue';
2
1
  import moment from 'moment';
3
2
  import 'v-calendar/style.css';
4
3
  import type { DateRange } from './types';
5
- import type { ValidationState } from '../../types';
6
- declare const _default: import("vue").DefineComponent<{
4
+ interface Props {
7
5
  /**
8
6
  * Used to specify selected dates
9
7
  * @model
10
8
  */
11
- modelValue: {
12
- type: PropType<string | Date | DateRange<moment.Moment | Date>>;
13
- default: () => Date;
14
- };
15
- /**
16
- * Disable
17
- */
18
- disabled: {
19
- type: BooleanConstructor;
20
- default: boolean;
21
- };
22
- /**
23
- * Validation result sent by Vuelidate
24
- */
25
- validate: {
26
- type: PropType<ValidationState>;
27
- default: null;
28
- };
29
- /**
30
- * Define if the time format is 24H
31
- */
32
- is24hr: {
33
- type: BooleanConstructor;
34
- default: boolean;
35
- };
36
- /**
37
- * Time picker
38
- */
39
- timePicker: {
40
- type: BooleanConstructor;
41
- default: boolean;
42
- };
43
- /**
44
- * Time zone
45
- */
46
- timezone: {
47
- type: StringConstructor;
48
- default: string;
49
- };
50
- /**
51
- * Placeholder
52
- */
53
- placeholder: {
54
- type: StringConstructor;
55
- default: string;
56
- };
57
- }, {
58
- themeStyles: {
59
- wrapper: {
60
- background: string;
61
- borderRadius: string;
62
- boxShadow: string;
63
- border: string;
64
- fontFamily: string;
65
- };
66
- header: {
67
- padding: string;
68
- };
69
- headerTitle: {
70
- fontSize: string;
71
- lineHeight: string;
72
- fontFamily: string;
73
- fontWeight: string;
74
- color: string;
75
- };
76
- weekdays: {
77
- fontSize: string;
78
- lineHeight: string;
79
- color: string;
80
- fontWeight: string;
81
- };
82
- dayCell: {
83
- backgroundColor: string;
84
- }; /**
85
- * Used to specify selected dates
86
- * @model
87
- */
88
- dayContent: {
89
- fontSize: string;
90
- lineHeight: string;
91
- color: string;
92
- width: string;
93
- height: string;
94
- };
95
- dayContentHover: {
96
- backgroundColor: string;
97
- };
98
- verticalDivider: {
99
- borderLeft: string;
100
- };
101
- bars: {
102
- backgroundColor: string;
103
- };
104
- tintColor: string;
105
- };
106
- popoverConfigs: Partial<import("v-calendar/dist/types/src/utils/popovers.js").PopoverOptions>;
107
- masks: {
108
- input: string;
109
- };
110
- modelConfig: {
111
- start?: undefined;
112
- end?: undefined;
113
- } | {
114
- start: {
115
- timeAdjust: string;
116
- };
117
- end: {
118
- timeAdjust: string;
119
- };
120
- };
121
- }, unknown, {
122
- prepareValueDropdown(): {
123
- start: string | Date;
124
- end: string | Date;
125
- isRelative: boolean;
126
- relativeFilterValue: Nullable<string>;
127
- } | null;
128
- prepareValueDatepicker(): {
129
- start: Date;
130
- end: Date;
131
- } | undefined;
132
- mode(): "date" | "dateTime";
133
- }, {
134
- onPeriodInput(period: DateRange): void;
135
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
136
- /**
137
- * Used to specify selected dates
138
- * @model
139
- */
140
- modelValue: {
141
- type: PropType<string | Date | DateRange<moment.Moment | Date>>;
142
- default: () => Date;
143
- };
9
+ modelValue?: Date | string | DateRange;
144
10
  /**
145
11
  * Disable
146
12
  */
147
- disabled: {
148
- type: BooleanConstructor;
149
- default: boolean;
150
- };
151
- /**
152
- * Validation result sent by Vuelidate
153
- */
154
- validate: {
155
- type: PropType<ValidationState>;
156
- default: null;
157
- };
13
+ disabled?: boolean;
158
14
  /**
159
15
  * Define if the time format is 24H
160
16
  */
161
- is24hr: {
162
- type: BooleanConstructor;
163
- default: boolean;
164
- };
17
+ is24hr?: boolean;
165
18
  /**
166
19
  * Time picker
167
20
  */
168
- timePicker: {
169
- type: BooleanConstructor;
170
- default: boolean;
171
- };
21
+ timePicker?: boolean;
172
22
  /**
173
23
  * Time zone
174
24
  */
175
- timezone: {
176
- type: StringConstructor;
177
- default: string;
178
- };
25
+ timezone?: string;
179
26
  /**
180
27
  * Placeholder
181
28
  */
182
- placeholder: {
183
- type: StringConstructor;
184
- default: string;
185
- };
186
- }>> & {
187
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
188
- }, {
29
+ placeholder?: string;
30
+ }
31
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
32
+ modelValue: () => Date;
189
33
  disabled: boolean;
190
- modelValue: string | Date | DateRange<moment.Moment | Date>;
191
- validate: ValidationState;
192
34
  is24hr: boolean;
35
+ timePicker: boolean;
193
36
  timezone: string;
194
37
  placeholder: string;
38
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
+ "update:modelValue": (value: string | Date | DateRange<moment.Moment | Date>) => void;
40
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
41
+ modelValue: () => Date;
42
+ disabled: boolean;
43
+ is24hr: boolean;
44
+ timePicker: boolean;
45
+ timezone: string;
46
+ placeholder: string;
47
+ }>>> & {
48
+ "onUpdate:modelValue"?: ((value: string | Date | DateRange<moment.Moment | Date>) => any) | undefined;
49
+ }, {
50
+ disabled: boolean;
51
+ modelValue: string | Date | DateRange;
52
+ timezone: string;
53
+ is24hr: boolean;
54
+ placeholder: string;
195
55
  timePicker: boolean;
196
56
  }>;
197
57
  export default _default;
58
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
59
+ type __VLS_TypePropsToRuntimeProps<T> = {
60
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
61
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
62
+ } : {
63
+ type: import('vue').PropType<T[K]>;
64
+ required: true;
65
+ };
66
+ };
67
+ type __VLS_WithDefaults<P, D> = {
68
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
69
+ default: D[K];
70
+ }> : P[K];
71
+ };
72
+ type __VLS_Prettify<T> = {
73
+ [K in keyof T]: T[K];
74
+ } & {};