@rebilly/revel 6.30.25 → 6.30.27

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,294 +1,123 @@
1
- import { type PropType } from 'vue';
2
1
  import type { DateRange } from './types';
3
2
  import type { ValidationState } from '../../types';
4
- declare const _default: import("vue").DefineComponent<{
3
+ interface Props {
5
4
  /**
6
5
  * Label for the date picker
7
6
  */
8
- label: {
9
- type: StringConstructor;
10
- default: string;
11
- };
7
+ label?: string;
12
8
  /**
13
9
  * Unique id of the date picker
14
10
  */
15
- id: {
16
- type: StringConstructor;
17
- default: () => string;
18
- };
11
+ id?: string;
19
12
  /**
20
13
  * A text to describe the date picker
21
14
  */
22
- caption: {
23
- type: StringConstructor;
24
- default: null;
25
- };
15
+ caption?: string;
26
16
  /**
27
17
  * Used to specify selected dates
28
18
  * @model
29
19
  */
30
- modelValue: {
31
- type: (ObjectConstructor | DateConstructor | StringConstructor)[];
32
- default: () => Date;
33
- };
20
+ modelValue?: Date | object | string;
34
21
  /**
35
22
  * Disable
36
23
  */
37
- disabled: {
38
- type: BooleanConstructor;
39
- default: boolean;
40
- };
24
+ disabled?: boolean;
41
25
  /**
42
26
  * Validation result sent by Vuelidate
43
27
  */
44
- validate: {
45
- type: PropType<ValidationState>;
46
- default: null;
47
- };
28
+ validate?: ValidationState;
48
29
  /**
49
30
  * Time zone
50
31
  */
51
- timezone: {
52
- type: StringConstructor;
53
- default: string;
54
- };
32
+ timezone?: string;
55
33
  /**
56
34
  * Available dates
57
35
  */
58
- availableDates: {
59
- type: ObjectConstructor;
60
- default: null;
61
- };
36
+ availableDates?: object;
62
37
  /**
63
38
  * Columns
64
39
  */
65
- columns: {
66
- type: NumberConstructor;
67
- default: number;
68
- };
40
+ columns?: number;
69
41
  /**
70
42
  * Time picker used by RDateRangeButtonGroup to include time in ranges
71
43
  */
72
- timePicker: {
73
- type: BooleanConstructor;
74
- default: boolean;
75
- };
44
+ timePicker?: boolean;
76
45
  /**
77
46
  * Time picker
78
47
  */
79
- placeholder: {
80
- type: StringConstructor;
81
- default: string;
82
- };
48
+ placeholder?: string;
83
49
  /**
84
50
  * Min date
85
51
  */
86
- minDate: {
87
- type: (ObjectConstructor | DateConstructor | StringConstructor)[];
88
- default: null;
89
- };
52
+ minDate?: Date | string | object;
90
53
  /**
91
54
  * Max date
92
55
  */
93
- maxDate: {
94
- type: (ObjectConstructor | DateConstructor | StringConstructor)[];
95
- default: null;
96
- };
56
+ maxDate?: Date | string | object;
97
57
  /**
98
58
  * Type
99
59
  */
100
- type: {
101
- type: StringConstructor;
102
- default: string;
103
- validator: (type: string) => boolean;
104
- };
60
+ type?: string;
105
61
  /**
106
62
  * Define if the time format is 24H
107
63
  */
108
- is24hr: {
109
- type: BooleanConstructor;
110
- default: boolean;
111
- };
64
+ is24hr?: boolean;
112
65
  /**
113
66
  * Placement
114
67
  */
115
- placement: {
116
- type: StringConstructor;
117
- default: string;
118
- };
68
+ placement?: string;
119
69
  /**
120
70
  * v-calendar uses Internationalization API by default but we can explicitly specify a locale with this prop
121
71
  * See https://vcalendar.io/i18n.html#string-locales
122
72
  */
123
- locale: {
124
- type: StringConstructor;
125
- default: null;
126
- };
73
+ locale?: string;
127
74
  /**
128
75
  * Masks are used to properly format and parse different sections of the calendar and date picker components.
129
76
  */
130
- masks: {
131
- type: ObjectConstructor;
132
- default: () => void;
133
- };
134
- }, unknown, unknown, {
135
- isInvalid(): boolean;
136
- isDateRange(): boolean;
137
- commonAttrs(): {
138
- id: string;
139
- name: string;
140
- minDate: string | Record<string, any> | Date;
141
- maxDate: string | Record<string, any> | Date;
142
- columns: number;
143
- placement: string;
144
- timePicker: boolean;
145
- timezone: string;
146
- is24hr: boolean;
147
- availableDates: Record<string, any>;
148
- placeholder: string;
149
- popoverVisibility: string;
150
- disabled: boolean;
151
- locale: Optional<string>;
152
- };
153
- modelConfig(): {
154
- timeAdjust: string;
155
- } | {
156
- timeAdjust?: undefined;
157
- };
158
- }, {
159
- onValueUpdate(date: DateRange): void;
160
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
161
- /**
162
- * Label for the date picker
163
- */
164
- label: {
165
- type: StringConstructor;
166
- default: string;
167
- };
168
- /**
169
- * Unique id of the date picker
170
- */
171
- id: {
172
- type: StringConstructor;
173
- default: () => string;
174
- };
175
- /**
176
- * A text to describe the date picker
177
- */
178
- caption: {
179
- type: StringConstructor;
180
- default: null;
181
- };
182
- /**
183
- * Used to specify selected dates
184
- * @model
185
- */
186
- modelValue: {
187
- type: (ObjectConstructor | DateConstructor | StringConstructor)[];
188
- default: () => Date;
189
- };
190
- /**
191
- * Disable
192
- */
193
- disabled: {
194
- type: BooleanConstructor;
195
- default: boolean;
196
- };
197
- /**
198
- * Validation result sent by Vuelidate
199
- */
200
- validate: {
201
- type: PropType<ValidationState>;
202
- default: null;
203
- };
204
- /**
205
- * Time zone
206
- */
207
- timezone: {
208
- type: StringConstructor;
209
- default: string;
210
- };
211
- /**
212
- * Available dates
213
- */
214
- availableDates: {
215
- type: ObjectConstructor;
216
- default: null;
217
- };
218
- /**
219
- * Columns
220
- */
221
- columns: {
222
- type: NumberConstructor;
223
- default: number;
224
- };
225
- /**
226
- * Time picker used by RDateRangeButtonGroup to include time in ranges
227
- */
228
- timePicker: {
229
- type: BooleanConstructor;
230
- default: boolean;
231
- };
232
- /**
233
- * Time picker
234
- */
235
- placeholder: {
236
- type: StringConstructor;
237
- default: string;
238
- };
239
- /**
240
- * Min date
241
- */
242
- minDate: {
243
- type: (ObjectConstructor | DateConstructor | StringConstructor)[];
244
- default: null;
245
- };
246
- /**
247
- * Max date
248
- */
249
- maxDate: {
250
- type: (ObjectConstructor | DateConstructor | StringConstructor)[];
251
- default: null;
252
- };
253
- /**
254
- * Type
255
- */
256
- type: {
257
- type: StringConstructor;
258
- default: string;
259
- validator: (type: string) => boolean;
260
- };
261
- /**
262
- * Define if the time format is 24H
263
- */
264
- is24hr: {
265
- type: BooleanConstructor;
266
- default: boolean;
267
- };
268
- /**
269
- * Placement
270
- */
271
- placement: {
272
- type: StringConstructor;
273
- default: string;
274
- };
275
- /**
276
- * v-calendar uses Internationalization API by default but we can explicitly specify a locale with this prop
277
- * See https://vcalendar.io/i18n.html#string-locales
278
- */
279
- locale: {
280
- type: StringConstructor;
281
- default: null;
282
- };
283
- /**
284
- * Masks are used to properly format and parse different sections of the calendar and date picker components.
285
- */
286
- masks: {
287
- type: ObjectConstructor;
288
- default: () => void;
289
- };
290
- }>> & {
291
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
77
+ masks?: object;
78
+ }
79
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
80
+ label: string;
81
+ id: () => string;
82
+ caption: undefined;
83
+ modelValue: () => Date;
84
+ disabled: boolean;
85
+ validate: undefined;
86
+ timezone: string;
87
+ availableDates: undefined;
88
+ columns: number;
89
+ timePicker: boolean;
90
+ placeholder: string;
91
+ minDate: undefined;
92
+ maxDate: undefined;
93
+ type: string;
94
+ is24hr: boolean;
95
+ placement: string;
96
+ locale: undefined;
97
+ masks: () => {};
98
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
99
+ "update:modelValue": (value: string | Date | DateRange) => void;
100
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
101
+ label: string;
102
+ id: () => string;
103
+ caption: undefined;
104
+ modelValue: () => Date;
105
+ disabled: boolean;
106
+ validate: undefined;
107
+ timezone: string;
108
+ availableDates: undefined;
109
+ columns: number;
110
+ timePicker: boolean;
111
+ placeholder: string;
112
+ minDate: undefined;
113
+ maxDate: undefined;
114
+ type: string;
115
+ is24hr: boolean;
116
+ placement: string;
117
+ locale: undefined;
118
+ masks: () => {};
119
+ }>>> & {
120
+ "onUpdate:modelValue"?: ((value: string | Date | DateRange) => any) | undefined;
292
121
  }, {
293
122
  columns: number;
294
123
  id: string;
@@ -296,17 +125,34 @@ declare const _default: import("vue").DefineComponent<{
296
125
  label: string;
297
126
  type: string;
298
127
  disabled: boolean;
299
- modelValue: string | Record<string, any> | Date;
128
+ modelValue: string | object | Date;
300
129
  validate: ValidationState;
301
130
  placement: string;
131
+ timezone: string;
132
+ masks: object;
302
133
  is24hr: boolean;
303
- masks: Record<string, any>;
304
134
  locale: string;
305
- timezone: string;
306
- minDate: string | Record<string, any> | Date;
307
- maxDate: string | Record<string, any> | Date;
135
+ minDate: string | object | Date;
136
+ maxDate: string | object | Date;
308
137
  placeholder: string;
309
138
  timePicker: boolean;
310
- availableDates: Record<string, any>;
139
+ availableDates: object;
311
140
  }>;
312
141
  export default _default;
142
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
143
+ type __VLS_TypePropsToRuntimeProps<T> = {
144
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
145
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
146
+ } : {
147
+ type: import('vue').PropType<T[K]>;
148
+ required: true;
149
+ };
150
+ };
151
+ type __VLS_WithDefaults<P, D> = {
152
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
153
+ default: D[K];
154
+ }> : P[K];
155
+ };
156
+ type __VLS_Prettify<T> = {
157
+ [K in keyof T]: T[K];
158
+ } & {};
@@ -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
+ } & {};