@davincihealthcare/elty-design-system-vue 1.73.6 → 1.75.0
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/ElButton.vue.d.ts +1 -1
- package/dist/ElModal.vue.d.ts +42 -42
- package/dist/ElTabGroup.vue.d.ts +19 -3
- package/dist/forms/ElInputDate.vue.d.ts +2 -2
- package/dist/src/ElTabGroup.vue.cjs2.js +1 -1
- package/dist/src/ElTabGroup.vue.cjs2.js.map +1 -1
- package/dist/src/ElTabGroup.vue.esm2.js +1 -1
- package/dist/src/ElTabGroup.vue.esm2.js.map +1 -1
- package/dist/src/forms/ElInputDate.vue.cjs2.js +1 -1
- package/dist/src/forms/ElInputDate.vue.cjs2.js.map +1 -1
- package/dist/src/forms/ElInputDate.vue.esm2.js +1 -1
- package/dist/src/forms/ElInputDate.vue.esm2.js.map +1 -1
- package/dist/table/ElServerSideResponsiveTable.vue.d.ts +3 -3
- package/package.json +1 -1
package/dist/ElButton.vue.d.ts
CHANGED
|
@@ -51,9 +51,9 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
51
51
|
disabled: boolean;
|
|
52
52
|
icon: ElIconProps;
|
|
53
53
|
error: boolean;
|
|
54
|
+
variant: ElButtonVariant;
|
|
54
55
|
dark: boolean;
|
|
55
56
|
loading: boolean;
|
|
56
|
-
variant: ElButtonVariant;
|
|
57
57
|
loadOnClick: boolean;
|
|
58
58
|
}, {}>;
|
|
59
59
|
export default _default;
|
package/dist/ElModal.vue.d.ts
CHANGED
|
@@ -72,9 +72,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
72
72
|
disabled: boolean;
|
|
73
73
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
74
74
|
error: boolean;
|
|
75
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
75
76
|
dark: boolean;
|
|
76
77
|
loading: boolean;
|
|
77
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
78
78
|
loadOnClick: boolean;
|
|
79
79
|
}> & Omit<{
|
|
80
80
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -82,9 +82,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
82
82
|
readonly label: string;
|
|
83
83
|
readonly disabled: boolean;
|
|
84
84
|
readonly error: boolean;
|
|
85
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
85
86
|
readonly dark: boolean;
|
|
86
87
|
readonly loading: boolean;
|
|
87
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
88
88
|
readonly loadOnClick: boolean;
|
|
89
89
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
90
90
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -119,6 +119,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
119
119
|
type: import('vue').PropType<boolean>;
|
|
120
120
|
default: boolean;
|
|
121
121
|
};
|
|
122
|
+
variant: {
|
|
123
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
124
|
+
default: string;
|
|
125
|
+
};
|
|
122
126
|
dark: {
|
|
123
127
|
type: import('vue').PropType<boolean>;
|
|
124
128
|
default: boolean;
|
|
@@ -130,15 +134,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
130
134
|
iconRight: {
|
|
131
135
|
type: import('vue').PropType<boolean>;
|
|
132
136
|
};
|
|
133
|
-
variant: {
|
|
134
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
135
|
-
default: string;
|
|
136
|
-
};
|
|
137
137
|
loadOnClick: {
|
|
138
138
|
type: import('vue').PropType<boolean>;
|
|
139
139
|
default: boolean;
|
|
140
140
|
};
|
|
141
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
141
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "variant" | "dark" | "loading" | "loadOnClick">, "size" | "error" | "variant">>;
|
|
142
142
|
required: true;
|
|
143
143
|
};
|
|
144
144
|
secondaryAction: {
|
|
@@ -150,9 +150,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
150
150
|
disabled: boolean;
|
|
151
151
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
152
152
|
error: boolean;
|
|
153
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
153
154
|
dark: boolean;
|
|
154
155
|
loading: boolean;
|
|
155
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
156
156
|
loadOnClick: boolean;
|
|
157
157
|
}> & Omit<{
|
|
158
158
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -160,9 +160,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
160
160
|
readonly label: string;
|
|
161
161
|
readonly disabled: boolean;
|
|
162
162
|
readonly error: boolean;
|
|
163
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
163
164
|
readonly dark: boolean;
|
|
164
165
|
readonly loading: boolean;
|
|
165
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
166
166
|
readonly loadOnClick: boolean;
|
|
167
167
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
168
168
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -197,6 +197,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
197
197
|
type: import('vue').PropType<boolean>;
|
|
198
198
|
default: boolean;
|
|
199
199
|
};
|
|
200
|
+
variant: {
|
|
201
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
202
|
+
default: string;
|
|
203
|
+
};
|
|
200
204
|
dark: {
|
|
201
205
|
type: import('vue').PropType<boolean>;
|
|
202
206
|
default: boolean;
|
|
@@ -208,15 +212,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
208
212
|
iconRight: {
|
|
209
213
|
type: import('vue').PropType<boolean>;
|
|
210
214
|
};
|
|
211
|
-
variant: {
|
|
212
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
213
|
-
default: string;
|
|
214
|
-
};
|
|
215
215
|
loadOnClick: {
|
|
216
216
|
type: import('vue').PropType<boolean>;
|
|
217
217
|
default: boolean;
|
|
218
218
|
};
|
|
219
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
219
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "variant" | "dark" | "loading" | "loadOnClick">, "size" | "error" | "variant">>;
|
|
220
220
|
default: undefined;
|
|
221
221
|
};
|
|
222
222
|
tertiaryAction: {
|
|
@@ -228,9 +228,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
228
228
|
disabled: boolean;
|
|
229
229
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
230
230
|
error: boolean;
|
|
231
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
231
232
|
dark: boolean;
|
|
232
233
|
loading: boolean;
|
|
233
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
234
234
|
loadOnClick: boolean;
|
|
235
235
|
}> & Omit<{
|
|
236
236
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -238,9 +238,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
238
238
|
readonly label: string;
|
|
239
239
|
readonly disabled: boolean;
|
|
240
240
|
readonly error: boolean;
|
|
241
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
241
242
|
readonly dark: boolean;
|
|
242
243
|
readonly loading: boolean;
|
|
243
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
244
244
|
readonly loadOnClick: boolean;
|
|
245
245
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
246
246
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -275,6 +275,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
275
275
|
type: import('vue').PropType<boolean>;
|
|
276
276
|
default: boolean;
|
|
277
277
|
};
|
|
278
|
+
variant: {
|
|
279
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
280
|
+
default: string;
|
|
281
|
+
};
|
|
278
282
|
dark: {
|
|
279
283
|
type: import('vue').PropType<boolean>;
|
|
280
284
|
default: boolean;
|
|
@@ -286,15 +290,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
286
290
|
iconRight: {
|
|
287
291
|
type: import('vue').PropType<boolean>;
|
|
288
292
|
};
|
|
289
|
-
variant: {
|
|
290
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
291
|
-
default: string;
|
|
292
|
-
};
|
|
293
293
|
loadOnClick: {
|
|
294
294
|
type: import('vue').PropType<boolean>;
|
|
295
295
|
default: boolean;
|
|
296
296
|
};
|
|
297
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
297
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "variant" | "dark" | "loading" | "loadOnClick">, "size" | "error" | "variant">>;
|
|
298
298
|
default: undefined;
|
|
299
299
|
};
|
|
300
300
|
isNestedModal: {
|
|
@@ -352,9 +352,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
352
352
|
disabled: boolean;
|
|
353
353
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
354
354
|
error: boolean;
|
|
355
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
355
356
|
dark: boolean;
|
|
356
357
|
loading: boolean;
|
|
357
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
358
358
|
loadOnClick: boolean;
|
|
359
359
|
}> & Omit<{
|
|
360
360
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -362,9 +362,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
362
362
|
readonly label: string;
|
|
363
363
|
readonly disabled: boolean;
|
|
364
364
|
readonly error: boolean;
|
|
365
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
365
366
|
readonly dark: boolean;
|
|
366
367
|
readonly loading: boolean;
|
|
367
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
368
368
|
readonly loadOnClick: boolean;
|
|
369
369
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
370
370
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -399,6 +399,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
399
399
|
type: import('vue').PropType<boolean>;
|
|
400
400
|
default: boolean;
|
|
401
401
|
};
|
|
402
|
+
variant: {
|
|
403
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
404
|
+
default: string;
|
|
405
|
+
};
|
|
402
406
|
dark: {
|
|
403
407
|
type: import('vue').PropType<boolean>;
|
|
404
408
|
default: boolean;
|
|
@@ -410,15 +414,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
410
414
|
iconRight: {
|
|
411
415
|
type: import('vue').PropType<boolean>;
|
|
412
416
|
};
|
|
413
|
-
variant: {
|
|
414
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
415
|
-
default: string;
|
|
416
|
-
};
|
|
417
417
|
loadOnClick: {
|
|
418
418
|
type: import('vue').PropType<boolean>;
|
|
419
419
|
default: boolean;
|
|
420
420
|
};
|
|
421
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
421
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "variant" | "dark" | "loading" | "loadOnClick">, "size" | "error" | "variant">>;
|
|
422
422
|
required: true;
|
|
423
423
|
};
|
|
424
424
|
secondaryAction: {
|
|
@@ -430,9 +430,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
430
430
|
disabled: boolean;
|
|
431
431
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
432
432
|
error: boolean;
|
|
433
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
433
434
|
dark: boolean;
|
|
434
435
|
loading: boolean;
|
|
435
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
436
436
|
loadOnClick: boolean;
|
|
437
437
|
}> & Omit<{
|
|
438
438
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -440,9 +440,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
440
440
|
readonly label: string;
|
|
441
441
|
readonly disabled: boolean;
|
|
442
442
|
readonly error: boolean;
|
|
443
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
443
444
|
readonly dark: boolean;
|
|
444
445
|
readonly loading: boolean;
|
|
445
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
446
446
|
readonly loadOnClick: boolean;
|
|
447
447
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
448
448
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -477,6 +477,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
477
477
|
type: import('vue').PropType<boolean>;
|
|
478
478
|
default: boolean;
|
|
479
479
|
};
|
|
480
|
+
variant: {
|
|
481
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
482
|
+
default: string;
|
|
483
|
+
};
|
|
480
484
|
dark: {
|
|
481
485
|
type: import('vue').PropType<boolean>;
|
|
482
486
|
default: boolean;
|
|
@@ -488,15 +492,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
488
492
|
iconRight: {
|
|
489
493
|
type: import('vue').PropType<boolean>;
|
|
490
494
|
};
|
|
491
|
-
variant: {
|
|
492
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
493
|
-
default: string;
|
|
494
|
-
};
|
|
495
495
|
loadOnClick: {
|
|
496
496
|
type: import('vue').PropType<boolean>;
|
|
497
497
|
default: boolean;
|
|
498
498
|
};
|
|
499
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
499
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "variant" | "dark" | "loading" | "loadOnClick">, "size" | "error" | "variant">>;
|
|
500
500
|
default: undefined;
|
|
501
501
|
};
|
|
502
502
|
tertiaryAction: {
|
|
@@ -508,9 +508,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
508
508
|
disabled: boolean;
|
|
509
509
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
510
510
|
error: boolean;
|
|
511
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
511
512
|
dark: boolean;
|
|
512
513
|
loading: boolean;
|
|
513
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
514
514
|
loadOnClick: boolean;
|
|
515
515
|
}> & Omit<{
|
|
516
516
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -518,9 +518,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
518
518
|
readonly label: string;
|
|
519
519
|
readonly disabled: boolean;
|
|
520
520
|
readonly error: boolean;
|
|
521
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
521
522
|
readonly dark: boolean;
|
|
522
523
|
readonly loading: boolean;
|
|
523
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
524
524
|
readonly loadOnClick: boolean;
|
|
525
525
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
526
526
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -555,6 +555,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
555
555
|
type: import('vue').PropType<boolean>;
|
|
556
556
|
default: boolean;
|
|
557
557
|
};
|
|
558
|
+
variant: {
|
|
559
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
560
|
+
default: string;
|
|
561
|
+
};
|
|
558
562
|
dark: {
|
|
559
563
|
type: import('vue').PropType<boolean>;
|
|
560
564
|
default: boolean;
|
|
@@ -566,15 +570,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
566
570
|
iconRight: {
|
|
567
571
|
type: import('vue').PropType<boolean>;
|
|
568
572
|
};
|
|
569
|
-
variant: {
|
|
570
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
571
|
-
default: string;
|
|
572
|
-
};
|
|
573
573
|
loadOnClick: {
|
|
574
574
|
type: import('vue').PropType<boolean>;
|
|
575
575
|
default: boolean;
|
|
576
576
|
};
|
|
577
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
577
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "variant" | "dark" | "loading" | "loadOnClick">, "size" | "error" | "variant">>;
|
|
578
578
|
default: undefined;
|
|
579
579
|
};
|
|
580
580
|
isNestedModal: {
|
package/dist/ElTabGroup.vue.d.ts
CHANGED
|
@@ -9,19 +9,27 @@ export type ElTabItem = {
|
|
|
9
9
|
value?: string;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
13
|
modelValue: string;
|
|
14
14
|
tabs: ElTabItem[];
|
|
15
15
|
color?: ElTabColors;
|
|
16
|
+
variant?: "default" | "w-full";
|
|
17
|
+
}>, {
|
|
18
|
+
variant: string;
|
|
16
19
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
20
|
"update:modelValue": (modelValue: string) => void;
|
|
18
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
19
22
|
modelValue: string;
|
|
20
23
|
tabs: ElTabItem[];
|
|
21
24
|
color?: ElTabColors;
|
|
25
|
+
variant?: "default" | "w-full";
|
|
26
|
+
}>, {
|
|
27
|
+
variant: string;
|
|
22
28
|
}>>> & {
|
|
23
29
|
"onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
|
|
24
|
-
}, {
|
|
30
|
+
}, {
|
|
31
|
+
variant: "default" | "w-full";
|
|
32
|
+
}, {}>;
|
|
25
33
|
export default _default;
|
|
26
34
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
35
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -32,3 +40,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
32
40
|
required: true;
|
|
33
41
|
};
|
|
34
42
|
};
|
|
43
|
+
type __VLS_WithDefaults<P, D> = {
|
|
44
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
45
|
+
default: D[K];
|
|
46
|
+
}> : P[K];
|
|
47
|
+
};
|
|
48
|
+
type __VLS_Prettify<T> = {
|
|
49
|
+
[K in keyof T]: T[K];
|
|
50
|
+
} & {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NumberValueType } from './input';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
|
|
4
|
-
export declare const elInputDateTypes: readonly ["date", "datetime-local", "time"];
|
|
4
|
+
export declare const elInputDateTypes: readonly ["date", "datetime-local", "time", "month"];
|
|
5
5
|
export type ElInputDateType = (typeof elInputDateTypes)[number];
|
|
6
6
|
declare const _default: import('vue').DefineComponent<{
|
|
7
7
|
type: {
|
|
@@ -137,7 +137,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
137
137
|
"onUpdate:readableString"?: ((value: string) => any) | undefined;
|
|
138
138
|
}, {
|
|
139
139
|
name: string;
|
|
140
|
-
type: "time" | "date" | "datetime-local";
|
|
140
|
+
type: "time" | "date" | "month" | "datetime-local";
|
|
141
141
|
label: string;
|
|
142
142
|
disabled: boolean;
|
|
143
143
|
id: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./ElTab.vue.cjs2.js"),d={class:"w-full"},p={class:"flex flex-wrap sm:flex-nowrap"},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./ElTab.vue.cjs2.js"),d={class:"w-full"},p={class:"flex flex-wrap sm:flex-nowrap"},m=e.defineComponent({__name:"ElTabGroup",props:{modelValue:{},tabs:{},color:{},variant:{default:"default"}},emits:["update:modelValue"],setup(o,{emit:r}){const a=o,n=r,s=l=>{n("update:modelValue",l)},u=l=>l.disabled?"inactive":(l.value??l.label)===a.modelValue?"active":"default";return(l,_)=>(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.tabs,(t,c)=>(e.openBlock(),e.createBlock(i.default,{key:`tab-${c}`,color:a.color,badge:t.badge,class:e.normalizeClass(["min-w-[120px]",{grow:a.variant==="w-full"}]),label:t.label,status:u(t),onClick:f=>s(t.value??t.label)},null,8,["color","badge","class","label","status","onClick"]))),128))])]))}});exports.default=m;
|
|
2
2
|
//# sourceMappingURL=ElTabGroup.vue.cjs2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElTabGroup.vue.cjs2.js","sources":["../../src/ElTabGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ElTabItem = {\n value?: string;\n label: string;\n disabled?: boolean;\n badge?: {\n visible: boolean;\n value?: string;\n };\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport ElTab, { ElTabColors, ElTabStatues } from '@/ElTab.vue';\n\nconst props = defineProps<{\n
|
|
1
|
+
{"version":3,"file":"ElTabGroup.vue.cjs2.js","sources":["../../src/ElTabGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ElTabItem = {\n value?: string;\n label: string;\n disabled?: boolean;\n badge?: {\n visible: boolean;\n value?: string;\n };\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport ElTab, { ElTabColors, ElTabStatues } from '@/ElTab.vue';\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n tabs: ElTabItem[];\n color?: ElTabColors;\n variant?: 'default' | 'w-full';\n }>(),\n {\n variant: 'default',\n },\n);\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', modelValue: string): void;\n}>();\n\nconst onClick = (tab: string) => {\n emit('update:modelValue', tab);\n};\n\nconst getTabStatus = (tab: ElTabItem): ElTabStatues => {\n if (tab.disabled) return 'inactive';\n if ((tab.value ?? tab.label) === props.modelValue) return 'active';\n return 'default';\n};\n</script>\n\n<template>\n <div class=\"w-full\">\n <div class=\"flex flex-wrap sm:flex-nowrap\">\n <ElTab\n v-for=\"(tab, index) in tabs\"\n :key=\"`tab-${index}`\"\n :color=\"props.color\"\n :badge=\"tab.badge\"\n class=\"min-w-[120px]\"\n :class=\"{ grow: props.variant === 'w-full' }\"\n :label=\"tab.label\"\n :status=\"getTabStatus(tab)\"\n @click=\"onClick(tab.value ?? tab.label)\"\n />\n </div>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","onClick","tab","getTabStatus"],"mappings":"2XAeA,MAAMA,EAAQC,EAYRC,EAAOC,EAIPC,EAAWC,GAAgB,CAC/BH,EAAK,oBAAqBG,CAAG,CAAA,EAGzBC,EAAgBD,GAChBA,EAAI,SAAiB,YACpBA,EAAI,OAASA,EAAI,SAAWL,EAAM,WAAmB,SACnD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as d,openBlock as t,createElementBlock as
|
|
1
|
+
import{defineComponent as d,openBlock as t,createElementBlock as o,createElementVNode as m,Fragment as f,renderList as p,createBlock as _,normalizeClass as v}from"vue";import b from"./ElTab.vue.esm2.js";const k={class:"w-full"},g={class:"flex flex-wrap sm:flex-nowrap"},h=d({__name:"ElTabGroup",props:{modelValue:{},tabs:{},color:{},variant:{default:"default"}},emits:["update:modelValue"],setup(r,{emit:n}){const a=r,s=n,c=e=>{s("update:modelValue",e)},u=e=>e.disabled?"inactive":(e.value??e.label)===a.modelValue?"active":"default";return(e,w)=>(t(),o("div",k,[m("div",g,[(t(!0),o(f,null,p(e.tabs,(l,i)=>(t(),_(b,{key:`tab-${i}`,color:a.color,badge:l.badge,class:v(["min-w-[120px]",{grow:a.variant==="w-full"}]),label:l.label,status:u(l),onClick:x=>c(l.value??l.label)},null,8,["color","badge","class","label","status","onClick"]))),128))])]))}});export{h as default};
|
|
2
2
|
//# sourceMappingURL=ElTabGroup.vue.esm2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElTabGroup.vue.esm2.js","sources":["../../src/ElTabGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ElTabItem = {\n value?: string;\n label: string;\n disabled?: boolean;\n badge?: {\n visible: boolean;\n value?: string;\n };\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport ElTab, { ElTabColors, ElTabStatues } from '@/ElTab.vue';\n\nconst props = defineProps<{\n
|
|
1
|
+
{"version":3,"file":"ElTabGroup.vue.esm2.js","sources":["../../src/ElTabGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ElTabItem = {\n value?: string;\n label: string;\n disabled?: boolean;\n badge?: {\n visible: boolean;\n value?: string;\n };\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport ElTab, { ElTabColors, ElTabStatues } from '@/ElTab.vue';\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n tabs: ElTabItem[];\n color?: ElTabColors;\n variant?: 'default' | 'w-full';\n }>(),\n {\n variant: 'default',\n },\n);\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', modelValue: string): void;\n}>();\n\nconst onClick = (tab: string) => {\n emit('update:modelValue', tab);\n};\n\nconst getTabStatus = (tab: ElTabItem): ElTabStatues => {\n if (tab.disabled) return 'inactive';\n if ((tab.value ?? tab.label) === props.modelValue) return 'active';\n return 'default';\n};\n</script>\n\n<template>\n <div class=\"w-full\">\n <div class=\"flex flex-wrap sm:flex-nowrap\">\n <ElTab\n v-for=\"(tab, index) in tabs\"\n :key=\"`tab-${index}`\"\n :color=\"props.color\"\n :badge=\"tab.badge\"\n class=\"min-w-[120px]\"\n :class=\"{ grow: props.variant === 'w-full' }\"\n :label=\"tab.label\"\n :status=\"getTabStatus(tab)\"\n @click=\"onClick(tab.value ?? tab.label)\"\n />\n </div>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","onClick","tab","getTabStatus"],"mappings":"wZAeA,MAAMA,EAAQC,EAYRC,EAAOC,EAIPC,EAAWC,GAAgB,CAC/BH,EAAK,oBAAqBG,CAAG,CAAA,EAGzBC,EAAgBD,GAChBA,EAAI,SAAiB,YACpBA,EAAI,OAASA,EAAI,SAAWL,EAAM,WAAmB,SACnD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("./ElInputContainer.vue.cjs2.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("./ElInputContainer.vue.cjs2.js"),d=require("./input.cjs.js"),n=require("../../node_modules/luxon/src/datetime.cjs.js");require("../../node_modules/luxon/src/duration.cjs.js");const V=["id","name","type","placeholder","disabled","data-cy"],q=["date","datetime-local","time","month"],D=e.defineComponent({__name:"ElInputDate",props:{...d.withNumberElInputProps(),type:{type:String,default:"date"}},emits:["update:modelValue","update:readableString"],setup(s,{emit:y}){const t=s,i=y,l=t.modelValue?n.default.fromSeconds(t.modelValue):void 0,m=e.computed(()=>{switch(t.type){case"date":return"yyyy-MM-dd";case"time":return"HH:mm";case"datetime-local":return"yyyy-MM-dd'T'HH:mm";default:return""}}),f=e.computed(()=>t.modelValue),v=e.computed(()=>[t.validation]),{value:u,errorMessage:g,uuid:p,fieldContext:b}=d.useInput(f,v,t.name,a=>{i("update:modelValue",a),i("update:readableString",o.value)}),o=e.computed({get:()=>u.value?n.default.fromSeconds(u.value).toFormat(m.value):"",set:a=>{if(a){let r=n.default.fromFormat(a,m.value);t.type==="time"&&l&&(r=r.set({day:l.day,month:l.month,year:l.year})),u.value=Math.round(r.toSeconds())}else u.value=void 0}});return(a,r)=>(e.openBlock(),e.createBlock(h.default,e.mergeProps(a.$attrs,{name:e.unref(p),label:a.label,"error-message":t.errorMessage===!1?!1:t.errorMessage||e.unref(g),"hidden-error-message":a.hiddenErrorMessage,"set-required-mark":e.unref(d.showRequiredMark)([a.validation])}),{default:e.withCtx(({error:M})=>[e.withDirectives(e.createElementVNode("input",{id:e.unref(p),"onUpdate:modelValue":r[0]||(r[0]=c=>o.value=c),name:t.name,type:s.type,class:e.normalizeClass(["el-input",{error:M,"text-neutral-darker border-primary":o.value!==""}]),placeholder:a.placeholder,disabled:t.disabled,"data-cy":`${a.label.trim().replaceAll(" ","")}-input`,max:"9999-12-31",onBlur:r[1]||(r[1]=c=>e.unref(b).validate())},null,42,V),[[e.vModelDynamic,o.value]])]),_:1},16,["name","label","error-message","hidden-error-message","set-required-mark"]))}});exports.default=D;exports.elInputDateTypes=q;
|
|
2
2
|
//# sourceMappingURL=ElInputDate.vue.cjs2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElInputDate.vue.cjs2.js","sources":["../../../src/forms/ElInputDate.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elInputDateTypes = ['date', 'datetime-local', 'time'] as const;\nexport type ElInputDateType = (typeof elInputDateTypes)[number];\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, PropType } from 'vue';\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { DateTime } from 'luxon';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n type: {\n type: String as PropType<ElInputDateType>,\n default: 'date',\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'update:readableString', value: string): void;\n}>();\n\nconst initialDate = props.modelValue ? DateTime.fromSeconds(props.modelValue) : undefined;\n\nconst dateFormat = computed(() => {\n switch (props.type) {\n case 'date':\n return 'yyyy-MM-dd';\n case 'time':\n return 'HH:mm';\n case 'datetime-local':\n // eslint-disable-next-line quotes\n return `yyyy-MM-dd'T'HH:mm`;\n default:\n return '';\n }\n});\n\nconst computedModelValue = computed(() => props.modelValue);\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:readableString', valueToNumber.value);\n});\n\n// this is needed to have vee-validate only work on number values, this way we don't have to deal with date format, but only timestamps\nconst valueToNumber = computed<string>({\n get: () => {\n if (!value.value) return '';\n return DateTime.fromSeconds(value.value).toFormat(dateFormat.value);\n },\n set: (valueAsString: string) => {\n if (valueAsString) {\n let newDate = DateTime.fromFormat(valueAsString, dateFormat.value);\n if (props.type === 'time' && initialDate) {\n // when parsing from time, it loses reference of the actual date. Set it manually\n newDate = newDate.set({ day: initialDate.day, month: initialDate.month, year: initialDate.year });\n }\n value.value = Math.round(newDate.toSeconds());\n } else {\n value.value = undefined;\n }\n },\n});\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n v-model=\"valueToNumber\"\n :name=\"props.name\"\n :type=\"type\"\n class=\"el-input\"\n :class=\"{\n error: error,\n 'text-neutral-darker border-primary': valueToNumber !== '',\n }\"\n :placeholder=\"placeholder\"\n :disabled=\"props.disabled\"\n :data-cy=\"`${label.trim().replaceAll(' ', '')}-input`\"\n max=\"9999-12-31\"\n @blur=\"fieldContext.validate()\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["elInputDateTypes","props","__props","emit","__emit","initialDate","DateTime","dateFormat","computed","computedModelValue","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","valueToNumber","valueAsString","newDate"],"mappings":"6XACaA,EAAmB,CAAC,OAAQ,iBAAkB,
|
|
1
|
+
{"version":3,"file":"ElInputDate.vue.cjs2.js","sources":["../../../src/forms/ElInputDate.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elInputDateTypes = ['date', 'datetime-local', 'time', 'month'] as const;\nexport type ElInputDateType = (typeof elInputDateTypes)[number];\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, PropType } from 'vue';\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { DateTime } from 'luxon';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n type: {\n type: String as PropType<ElInputDateType>,\n default: 'date',\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'update:readableString', value: string): void;\n}>();\n\nconst initialDate = props.modelValue ? DateTime.fromSeconds(props.modelValue) : undefined;\n\nconst dateFormat = computed(() => {\n switch (props.type) {\n case 'date':\n return 'yyyy-MM-dd';\n case 'time':\n return 'HH:mm';\n case 'datetime-local':\n // eslint-disable-next-line quotes\n return `yyyy-MM-dd'T'HH:mm`;\n default:\n return '';\n }\n});\n\nconst computedModelValue = computed(() => props.modelValue);\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:readableString', valueToNumber.value);\n});\n\n// this is needed to have vee-validate only work on number values, this way we don't have to deal with date format, but only timestamps\nconst valueToNumber = computed<string>({\n get: () => {\n if (!value.value) return '';\n return DateTime.fromSeconds(value.value).toFormat(dateFormat.value);\n },\n set: (valueAsString: string) => {\n if (valueAsString) {\n let newDate = DateTime.fromFormat(valueAsString, dateFormat.value);\n if (props.type === 'time' && initialDate) {\n // when parsing from time, it loses reference of the actual date. Set it manually\n newDate = newDate.set({ day: initialDate.day, month: initialDate.month, year: initialDate.year });\n }\n value.value = Math.round(newDate.toSeconds());\n } else {\n value.value = undefined;\n }\n },\n});\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n v-model=\"valueToNumber\"\n :name=\"props.name\"\n :type=\"type\"\n class=\"el-input\"\n :class=\"{\n error: error,\n 'text-neutral-darker border-primary': valueToNumber !== '',\n }\"\n :placeholder=\"placeholder\"\n :disabled=\"props.disabled\"\n :data-cy=\"`${label.trim().replaceAll(' ', '')}-input`\"\n max=\"9999-12-31\"\n @blur=\"fieldContext.validate()\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["elInputDateTypes","props","__props","emit","__emit","initialDate","DateTime","dateFormat","computed","computedModelValue","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","valueToNumber","valueAsString","newDate"],"mappings":"6XACaA,EAAmB,CAAC,OAAQ,iBAAkB,OAAQ,OAAO,0LAU1E,MAAMC,EAAQC,EAQRC,EAAOC,EAKPC,EAAcJ,EAAM,WAAaK,UAAS,YAAYL,EAAM,UAAU,EAAI,OAE1EM,EAAaC,EAAAA,SAAS,IAAM,CAChC,OAAQP,EAAM,KAAM,CAClB,IAAK,OACI,MAAA,aACT,IAAK,OACI,MAAA,QACT,IAAK,iBAEI,MAAA,qBACT,QACS,MAAA,EACX,CAAA,CACD,EAEKQ,EAAqBD,EAAA,SAAS,IAAMP,EAAM,UAAU,EACpDS,EAAqBF,EAAAA,SAAS,IAAM,CAACP,EAAM,UAAU,CAAC,EAEtD,CAAE,MAAAU,EAAO,aAAAC,EAAc,KAAAC,EAAM,aAAAC,CAAiB,EAAAC,WAASN,EAAoBC,EAAoBT,EAAM,KAAkBe,GAAA,CAC3Hb,EAAK,oBAAqBa,CAAQ,EAC7Bb,EAAA,wBAAyBc,EAAc,KAAK,CAAA,CAClD,EAGKA,EAAgBT,EAAAA,SAAiB,CACrC,IAAK,IACEG,EAAM,MACJL,UAAS,YAAYK,EAAM,KAAK,EAAE,SAASJ,EAAW,KAAK,EADzC,GAG3B,IAAMW,GAA0B,CAC9B,GAAIA,EAAe,CACjB,IAAIC,EAAUb,EAAAA,QAAS,WAAWY,EAAeX,EAAW,KAAK,EAC7DN,EAAM,OAAS,QAAUI,IAE3Bc,EAAUA,EAAQ,IAAI,CAAE,IAAKd,EAAY,IAAK,MAAOA,EAAY,MAAO,KAAMA,EAAY,IAAM,CAAA,GAElGM,EAAM,MAAQ,KAAK,MAAMQ,EAAQ,WAAW,CAAA,MAE5CR,EAAM,MAAQ,MAElB,CAAA,CACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as M,computed as n,openBlock as V,createBlock as D,mergeProps as k,unref as r,withCtx as w,withDirectives as S,createElementVNode as C,normalizeClass as E,vModelDynamic as H}from"vue";import I from"./ElInputContainer.vue.esm2.js";import{withNumberElInputProps as T,useInput as $,showRequiredMark as q}from"./input.esm.js";import m from"../../node_modules/luxon/src/datetime.esm.js";import"../../node_modules/luxon/src/duration.esm.js";const B=["id","name","type","placeholder","disabled","data-cy"],U=["date","datetime-local","time"],j=M({__name:"ElInputDate",props:{...T(),type:{type:String,default:"date"}},emits:["update:modelValue","update:readableString"],setup(i,{emit:y}){const e=i,s=y,o=e.modelValue?m.fromSeconds(e.modelValue):void 0,u=n(()=>{switch(e.type){case"date":return"yyyy-MM-dd";case"time":return"HH:mm";case"datetime-local":return"yyyy-MM-dd'T'HH:mm";default:return""}}),f=n(()=>e.modelValue),v=n(()=>[e.validation]),{value:l,errorMessage:
|
|
1
|
+
import{defineComponent as M,computed as n,openBlock as V,createBlock as D,mergeProps as k,unref as r,withCtx as w,withDirectives as S,createElementVNode as C,normalizeClass as E,vModelDynamic as H}from"vue";import I from"./ElInputContainer.vue.esm2.js";import{withNumberElInputProps as T,useInput as $,showRequiredMark as q}from"./input.esm.js";import m from"../../node_modules/luxon/src/datetime.esm.js";import"../../node_modules/luxon/src/duration.esm.js";const B=["id","name","type","placeholder","disabled","data-cy"],U=["date","datetime-local","time","month"],j=M({__name:"ElInputDate",props:{...T(),type:{type:String,default:"date"}},emits:["update:modelValue","update:readableString"],setup(i,{emit:y}){const e=i,s=y,o=e.modelValue?m.fromSeconds(e.modelValue):void 0,u=n(()=>{switch(e.type){case"date":return"yyyy-MM-dd";case"time":return"HH:mm";case"datetime-local":return"yyyy-MM-dd'T'HH:mm";default:return""}}),f=n(()=>e.modelValue),v=n(()=>[e.validation]),{value:l,errorMessage:h,uuid:p,fieldContext:b}=$(f,v,e.name,a=>{s("update:modelValue",a),s("update:readableString",d.value)}),d=n({get:()=>l.value?m.fromSeconds(l.value).toFormat(u.value):"",set:a=>{if(a){let t=m.fromFormat(a,u.value);e.type==="time"&&o&&(t=t.set({day:o.day,month:o.month,year:o.year})),l.value=Math.round(t.toSeconds())}else l.value=void 0}});return(a,t)=>(V(),D(I,k(a.$attrs,{name:r(p),label:a.label,"error-message":e.errorMessage===!1?!1:e.errorMessage||r(h),"hidden-error-message":a.hiddenErrorMessage,"set-required-mark":r(q)([a.validation])}),{default:w(({error:g})=>[S(C("input",{id:r(p),"onUpdate:modelValue":t[0]||(t[0]=c=>d.value=c),name:e.name,type:i.type,class:E(["el-input",{error:g,"text-neutral-darker border-primary":d.value!==""}]),placeholder:a.placeholder,disabled:e.disabled,"data-cy":`${a.label.trim().replaceAll(" ","")}-input`,max:"9999-12-31",onBlur:t[1]||(t[1]=c=>r(b).validate())},null,42,B),[[H,d.value]])]),_:1},16,["name","label","error-message","hidden-error-message","set-required-mark"]))}});export{j as default,U as elInputDateTypes};
|
|
2
2
|
//# sourceMappingURL=ElInputDate.vue.esm2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElInputDate.vue.esm2.js","sources":["../../../src/forms/ElInputDate.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elInputDateTypes = ['date', 'datetime-local', 'time'] as const;\nexport type ElInputDateType = (typeof elInputDateTypes)[number];\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, PropType } from 'vue';\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { DateTime } from 'luxon';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n type: {\n type: String as PropType<ElInputDateType>,\n default: 'date',\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'update:readableString', value: string): void;\n}>();\n\nconst initialDate = props.modelValue ? DateTime.fromSeconds(props.modelValue) : undefined;\n\nconst dateFormat = computed(() => {\n switch (props.type) {\n case 'date':\n return 'yyyy-MM-dd';\n case 'time':\n return 'HH:mm';\n case 'datetime-local':\n // eslint-disable-next-line quotes\n return `yyyy-MM-dd'T'HH:mm`;\n default:\n return '';\n }\n});\n\nconst computedModelValue = computed(() => props.modelValue);\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:readableString', valueToNumber.value);\n});\n\n// this is needed to have vee-validate only work on number values, this way we don't have to deal with date format, but only timestamps\nconst valueToNumber = computed<string>({\n get: () => {\n if (!value.value) return '';\n return DateTime.fromSeconds(value.value).toFormat(dateFormat.value);\n },\n set: (valueAsString: string) => {\n if (valueAsString) {\n let newDate = DateTime.fromFormat(valueAsString, dateFormat.value);\n if (props.type === 'time' && initialDate) {\n // when parsing from time, it loses reference of the actual date. Set it manually\n newDate = newDate.set({ day: initialDate.day, month: initialDate.month, year: initialDate.year });\n }\n value.value = Math.round(newDate.toSeconds());\n } else {\n value.value = undefined;\n }\n },\n});\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n v-model=\"valueToNumber\"\n :name=\"props.name\"\n :type=\"type\"\n class=\"el-input\"\n :class=\"{\n error: error,\n 'text-neutral-darker border-primary': valueToNumber !== '',\n }\"\n :placeholder=\"placeholder\"\n :disabled=\"props.disabled\"\n :data-cy=\"`${label.trim().replaceAll(' ', '')}-input`\"\n max=\"9999-12-31\"\n @blur=\"fieldContext.validate()\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["elInputDateTypes","props","__props","emit","__emit","initialDate","DateTime","dateFormat","computed","computedModelValue","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","valueToNumber","valueAsString","newDate"],"mappings":"0gBACaA,EAAmB,CAAC,OAAQ,iBAAkB,
|
|
1
|
+
{"version":3,"file":"ElInputDate.vue.esm2.js","sources":["../../../src/forms/ElInputDate.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elInputDateTypes = ['date', 'datetime-local', 'time', 'month'] as const;\nexport type ElInputDateType = (typeof elInputDateTypes)[number];\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, PropType } from 'vue';\nimport ElInputContainer from '@/forms/ElInputContainer.vue';\nimport { useInput, NumberValueType, showRequiredMark, withNumberElInputProps } from '@/forms/input';\nimport { DateTime } from 'luxon';\n\nconst props = defineProps({\n ...withNumberElInputProps(),\n type: {\n type: String as PropType<ElInputDateType>,\n default: 'date',\n },\n});\n\nconst emit = defineEmits<{\n (event: 'update:modelValue', value: NumberValueType): void;\n (event: 'update:readableString', value: string): void;\n}>();\n\nconst initialDate = props.modelValue ? DateTime.fromSeconds(props.modelValue) : undefined;\n\nconst dateFormat = computed(() => {\n switch (props.type) {\n case 'date':\n return 'yyyy-MM-dd';\n case 'time':\n return 'HH:mm';\n case 'datetime-local':\n // eslint-disable-next-line quotes\n return `yyyy-MM-dd'T'HH:mm`;\n default:\n return '';\n }\n});\n\nconst computedModelValue = computed(() => props.modelValue);\nconst computedValidation = computed(() => [props.validation]);\n\nconst { value, errorMessage, uuid, fieldContext } = useInput(computedModelValue, computedValidation, props.name, newValue => {\n emit('update:modelValue', newValue);\n emit('update:readableString', valueToNumber.value);\n});\n\n// this is needed to have vee-validate only work on number values, this way we don't have to deal with date format, but only timestamps\nconst valueToNumber = computed<string>({\n get: () => {\n if (!value.value) return '';\n return DateTime.fromSeconds(value.value).toFormat(dateFormat.value);\n },\n set: (valueAsString: string) => {\n if (valueAsString) {\n let newDate = DateTime.fromFormat(valueAsString, dateFormat.value);\n if (props.type === 'time' && initialDate) {\n // when parsing from time, it loses reference of the actual date. Set it manually\n newDate = newDate.set({ day: initialDate.day, month: initialDate.month, year: initialDate.year });\n }\n value.value = Math.round(newDate.toSeconds());\n } else {\n value.value = undefined;\n }\n },\n});\n</script>\n\n<template>\n <ElInputContainer\n v-bind=\"$attrs\"\n :name=\"uuid\"\n :label=\"label\"\n :error-message=\"props.errorMessage === false ? false : props.errorMessage || errorMessage\"\n :hidden-error-message=\"hiddenErrorMessage\"\n :set-required-mark=\"showRequiredMark([validation])\"\n >\n <template #default=\"{ error }\">\n <input\n :id=\"uuid\"\n v-model=\"valueToNumber\"\n :name=\"props.name\"\n :type=\"type\"\n class=\"el-input\"\n :class=\"{\n error: error,\n 'text-neutral-darker border-primary': valueToNumber !== '',\n }\"\n :placeholder=\"placeholder\"\n :disabled=\"props.disabled\"\n :data-cy=\"`${label.trim().replaceAll(' ', '')}-input`\"\n max=\"9999-12-31\"\n @blur=\"fieldContext.validate()\"\n />\n </template>\n </ElInputContainer>\n</template>\n"],"names":["elInputDateTypes","props","__props","emit","__emit","initialDate","DateTime","dateFormat","computed","computedModelValue","computedValidation","value","errorMessage","uuid","fieldContext","useInput","newValue","valueToNumber","valueAsString","newDate"],"mappings":"0gBACaA,EAAmB,CAAC,OAAQ,iBAAkB,OAAQ,OAAO,mJAU1E,MAAMC,EAAQC,EAQRC,EAAOC,EAKPC,EAAcJ,EAAM,WAAaK,EAAS,YAAYL,EAAM,UAAU,EAAI,OAE1EM,EAAaC,EAAS,IAAM,CAChC,OAAQP,EAAM,KAAM,CAClB,IAAK,OACI,MAAA,aACT,IAAK,OACI,MAAA,QACT,IAAK,iBAEI,MAAA,qBACT,QACS,MAAA,EACX,CAAA,CACD,EAEKQ,EAAqBD,EAAS,IAAMP,EAAM,UAAU,EACpDS,EAAqBF,EAAS,IAAM,CAACP,EAAM,UAAU,CAAC,EAEtD,CAAE,MAAAU,EAAO,aAAAC,EAAc,KAAAC,EAAM,aAAAC,CAAiB,EAAAC,EAASN,EAAoBC,EAAoBT,EAAM,KAAkBe,GAAA,CAC3Hb,EAAK,oBAAqBa,CAAQ,EAC7Bb,EAAA,wBAAyBc,EAAc,KAAK,CAAA,CAClD,EAGKA,EAAgBT,EAAiB,CACrC,IAAK,IACEG,EAAM,MACJL,EAAS,YAAYK,EAAM,KAAK,EAAE,SAASJ,EAAW,KAAK,EADzC,GAG3B,IAAMW,GAA0B,CAC9B,GAAIA,EAAe,CACjB,IAAIC,EAAUb,EAAS,WAAWY,EAAeX,EAAW,KAAK,EAC7DN,EAAM,OAAS,QAAUI,IAE3Bc,EAAUA,EAAQ,IAAI,CAAE,IAAKd,EAAY,IAAK,MAAOA,EAAY,MAAO,KAAMA,EAAY,IAAM,CAAA,GAElGM,EAAM,MAAQ,KAAK,MAAMQ,EAAQ,WAAW,CAAA,MAE5CR,EAAM,MAAQ,MAElB,CAAA,CACD"}
|
|
@@ -123,9 +123,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
|
|
|
123
123
|
disabled?: boolean | undefined;
|
|
124
124
|
} | undefined;
|
|
125
125
|
error?: boolean | undefined;
|
|
126
|
+
variant?: import('../ElButton.vue').ElButtonVariant | undefined;
|
|
126
127
|
dark?: boolean | undefined;
|
|
127
128
|
loading?: boolean | undefined;
|
|
128
|
-
variant?: import('../ElButton.vue').ElButtonVariant | undefined;
|
|
129
129
|
loadOnClick?: boolean | undefined;
|
|
130
130
|
key?: (string | number | symbol) | undefined;
|
|
131
131
|
ref?: any;
|
|
@@ -302,9 +302,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
|
|
|
302
302
|
disabled?: boolean | undefined;
|
|
303
303
|
} | undefined;
|
|
304
304
|
error?: boolean | undefined;
|
|
305
|
+
variant?: import('../ElButton.vue').ElButtonVariant | undefined;
|
|
305
306
|
dark?: boolean | undefined;
|
|
306
307
|
loading?: boolean | undefined;
|
|
307
|
-
variant?: import('../ElButton.vue').ElButtonVariant | undefined;
|
|
308
308
|
loadOnClick?: boolean | undefined;
|
|
309
309
|
key?: (string | number | symbol) | undefined;
|
|
310
310
|
ref?: any;
|
|
@@ -333,9 +333,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
|
|
|
333
333
|
disabled?: boolean | undefined;
|
|
334
334
|
} | undefined;
|
|
335
335
|
error?: boolean | undefined;
|
|
336
|
+
variant?: import('../ElButton.vue').ElButtonVariant | undefined;
|
|
336
337
|
dark?: boolean | undefined;
|
|
337
338
|
loading?: boolean | undefined;
|
|
338
|
-
variant?: import('../ElButton.vue').ElButtonVariant | undefined;
|
|
339
339
|
loadOnClick?: boolean | undefined;
|
|
340
340
|
key?: (string | number | symbol) | undefined;
|
|
341
341
|
ref?: any;
|