@davincihealthcare/elty-design-system-vue 1.83.1 → 1.85.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/ElBubbleChat.vue.d.ts +5 -5
- package/dist/ElButton.vue.d.ts +1 -1
- package/dist/ElDropdown.vue.d.ts +2 -2
- package/dist/ElFile.vue.d.ts +2 -0
- package/dist/ElItem.vue.d.ts +1 -1
- package/dist/ElModal.vue.d.ts +42 -42
- package/dist/src/ElActionButton.vue.cjs2.js +1 -1
- package/dist/src/ElActionButton.vue.esm2.js +1 -1
- package/dist/src/ElBubbleChat.vue.cjs2.js +1 -1
- package/dist/src/ElBubbleChat.vue.cjs2.js.map +1 -1
- package/dist/src/ElBubbleChat.vue.esm2.js +1 -1
- package/dist/src/ElBubbleChat.vue.esm2.js.map +1 -1
- package/dist/src/ElCarousel.vue.cjs2.js +1 -1
- package/dist/src/ElCarousel.vue.esm2.js +1 -1
- package/dist/src/ElFile.vue.cjs2.js +1 -1
- package/dist/src/ElFile.vue.cjs2.js.map +1 -1
- package/dist/src/ElFile.vue.esm2.js +1 -1
- package/dist/src/ElFile.vue.esm2.js.map +1 -1
- 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/ElInputSearch.vue.cjs2.js +1 -1
- package/dist/src/forms/ElInputSearch.vue.esm2.js +1 -1
- package/dist/src/style.cjs +1 -1
- package/dist/src/style.css +1 -1
- package/dist/table/ElServerSideResponsiveTable.vue.d.ts +6 -6
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
14
14
|
automaticMessage?: string;
|
|
15
15
|
headline?: string;
|
|
16
16
|
avatar?: Pick<InstanceType<typeof ElAvatar>["$props"], "picture" | "label">;
|
|
17
|
-
file?: Pick<InstanceType<typeof ElFile>["$props"], "name" | "format">;
|
|
17
|
+
file?: Pick<InstanceType<typeof ElFile>["$props"], "name" | "format" | "url">;
|
|
18
18
|
picture?: string;
|
|
19
19
|
loading?: boolean;
|
|
20
20
|
error?: boolean;
|
|
@@ -35,7 +35,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
35
35
|
contextMenuItems: undefined;
|
|
36
36
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
37
|
"row-selection": (value: boolean | "indeterminate") => void;
|
|
38
|
-
"open-file": () => void;
|
|
38
|
+
"open-file": (url?: string | undefined) => void;
|
|
39
39
|
"open-picture": () => void;
|
|
40
40
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
41
41
|
appearence: ElBubbleChatAppearences;
|
|
@@ -45,7 +45,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
45
45
|
automaticMessage?: string;
|
|
46
46
|
headline?: string;
|
|
47
47
|
avatar?: Pick<InstanceType<typeof ElAvatar>["$props"], "picture" | "label">;
|
|
48
|
-
file?: Pick<InstanceType<typeof ElFile>["$props"], "name" | "format">;
|
|
48
|
+
file?: Pick<InstanceType<typeof ElFile>["$props"], "name" | "format" | "url">;
|
|
49
49
|
picture?: string;
|
|
50
50
|
loading?: boolean;
|
|
51
51
|
error?: boolean;
|
|
@@ -66,7 +66,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
66
66
|
contextMenuItems: undefined;
|
|
67
67
|
}>>> & {
|
|
68
68
|
"onRow-selection"?: ((value: boolean | "indeterminate") => any) | undefined;
|
|
69
|
-
"onOpen-file"?: (() => any) | undefined;
|
|
69
|
+
"onOpen-file"?: ((url?: string | undefined) => any) | undefined;
|
|
70
70
|
"onOpen-picture"?: (() => any) | undefined;
|
|
71
71
|
}, {
|
|
72
72
|
picture: string;
|
|
@@ -74,7 +74,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
74
74
|
avatar: Pick<InstanceType<typeof ElAvatar>["$props"], "picture" | "label">;
|
|
75
75
|
color: ElBubbleChatColors;
|
|
76
76
|
maxWidth: number;
|
|
77
|
-
file: Pick<InstanceType<typeof ElFile>["$props"], "name" | "format">;
|
|
77
|
+
file: Pick<InstanceType<typeof ElFile>["$props"], "name" | "format" | "url">;
|
|
78
78
|
message: string;
|
|
79
79
|
headline: string;
|
|
80
80
|
automaticMessage: string;
|
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;
|
|
55
54
|
dark: boolean;
|
|
56
55
|
loading: boolean;
|
|
56
|
+
variant: ElButtonVariant;
|
|
57
57
|
loadOnClick: boolean;
|
|
58
58
|
}, {}>;
|
|
59
59
|
export default _default;
|
package/dist/ElDropdown.vue.d.ts
CHANGED
|
@@ -59,10 +59,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
|
|
|
59
59
|
title: string;
|
|
60
60
|
minWidth: number;
|
|
61
61
|
maxHeight: ElDropdownMaxHeight;
|
|
62
|
-
isOpen: boolean;
|
|
63
|
-
multiple: boolean;
|
|
64
62
|
action: Omit<InstanceType<typeof ElButton>["$props"], "variant" | "size">;
|
|
63
|
+
isOpen: boolean;
|
|
65
64
|
iconButton: InstanceType<typeof ElIconButton>["$props"];
|
|
65
|
+
multiple: boolean;
|
|
66
66
|
}, {}>, {
|
|
67
67
|
anchor?(_: {
|
|
68
68
|
isOpen: boolean;
|
package/dist/ElFile.vue.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
5
5
|
name: string;
|
|
6
6
|
format?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
url?: string;
|
|
8
9
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
10
|
close: () => void;
|
|
10
11
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -12,6 +13,7 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
12
13
|
name: string;
|
|
13
14
|
format?: string;
|
|
14
15
|
disabled?: boolean;
|
|
16
|
+
url?: string;
|
|
15
17
|
}>>> & {
|
|
16
18
|
onClose?: (() => any) | undefined;
|
|
17
19
|
}, {}, {}>;
|
package/dist/ElItem.vue.d.ts
CHANGED
|
@@ -43,9 +43,9 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
43
43
|
color: "primary" | "secondary";
|
|
44
44
|
disabled: boolean;
|
|
45
45
|
leadingIcon: ElIconProps;
|
|
46
|
-
focused: boolean;
|
|
47
46
|
semiboldText: string;
|
|
48
47
|
check: boolean;
|
|
48
|
+
focused: boolean;
|
|
49
49
|
}, {}>;
|
|
50
50
|
export default _default;
|
|
51
51
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
package/dist/ElModal.vue.d.ts
CHANGED
|
@@ -76,9 +76,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
76
76
|
disabled: boolean;
|
|
77
77
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
78
78
|
error: boolean;
|
|
79
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
80
79
|
dark: boolean;
|
|
81
80
|
loading: boolean;
|
|
81
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
82
82
|
loadOnClick: boolean;
|
|
83
83
|
}> & Omit<{
|
|
84
84
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -86,9 +86,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
86
86
|
readonly label: string;
|
|
87
87
|
readonly disabled: boolean;
|
|
88
88
|
readonly error: boolean;
|
|
89
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
90
89
|
readonly dark: boolean;
|
|
91
90
|
readonly loading: boolean;
|
|
91
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
92
92
|
readonly loadOnClick: boolean;
|
|
93
93
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
94
94
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -123,10 +123,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
123
123
|
type: import('vue').PropType<boolean>;
|
|
124
124
|
default: boolean;
|
|
125
125
|
};
|
|
126
|
-
variant: {
|
|
127
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
128
|
-
default: string;
|
|
129
|
-
};
|
|
130
126
|
dark: {
|
|
131
127
|
type: import('vue').PropType<boolean>;
|
|
132
128
|
default: boolean;
|
|
@@ -138,11 +134,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
138
134
|
iconRight: {
|
|
139
135
|
type: import('vue').PropType<boolean>;
|
|
140
136
|
};
|
|
137
|
+
variant: {
|
|
138
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
141
|
loadOnClick: {
|
|
142
142
|
type: import('vue').PropType<boolean>;
|
|
143
143
|
default: boolean;
|
|
144
144
|
};
|
|
145
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
145
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "dark" | "loading" | "variant" | "loadOnClick">, "size" | "variant">>;
|
|
146
146
|
required: true;
|
|
147
147
|
};
|
|
148
148
|
secondaryAction: {
|
|
@@ -154,9 +154,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
154
154
|
disabled: boolean;
|
|
155
155
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
156
156
|
error: boolean;
|
|
157
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
158
157
|
dark: boolean;
|
|
159
158
|
loading: boolean;
|
|
159
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
160
160
|
loadOnClick: boolean;
|
|
161
161
|
}> & Omit<{
|
|
162
162
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -164,9 +164,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
164
164
|
readonly label: string;
|
|
165
165
|
readonly disabled: boolean;
|
|
166
166
|
readonly error: boolean;
|
|
167
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
168
167
|
readonly dark: boolean;
|
|
169
168
|
readonly loading: boolean;
|
|
169
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
170
170
|
readonly loadOnClick: boolean;
|
|
171
171
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
172
172
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -201,10 +201,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
201
201
|
type: import('vue').PropType<boolean>;
|
|
202
202
|
default: boolean;
|
|
203
203
|
};
|
|
204
|
-
variant: {
|
|
205
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
206
|
-
default: string;
|
|
207
|
-
};
|
|
208
204
|
dark: {
|
|
209
205
|
type: import('vue').PropType<boolean>;
|
|
210
206
|
default: boolean;
|
|
@@ -216,11 +212,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
216
212
|
iconRight: {
|
|
217
213
|
type: import('vue').PropType<boolean>;
|
|
218
214
|
};
|
|
215
|
+
variant: {
|
|
216
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
217
|
+
default: string;
|
|
218
|
+
};
|
|
219
219
|
loadOnClick: {
|
|
220
220
|
type: import('vue').PropType<boolean>;
|
|
221
221
|
default: boolean;
|
|
222
222
|
};
|
|
223
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
223
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "dark" | "loading" | "variant" | "loadOnClick">, "size" | "variant">>;
|
|
224
224
|
default: undefined;
|
|
225
225
|
};
|
|
226
226
|
tertiaryAction: {
|
|
@@ -232,9 +232,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
232
232
|
disabled: boolean;
|
|
233
233
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
234
234
|
error: boolean;
|
|
235
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
236
235
|
dark: boolean;
|
|
237
236
|
loading: boolean;
|
|
237
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
238
238
|
loadOnClick: boolean;
|
|
239
239
|
}> & Omit<{
|
|
240
240
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -242,9 +242,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
242
242
|
readonly label: string;
|
|
243
243
|
readonly disabled: boolean;
|
|
244
244
|
readonly error: boolean;
|
|
245
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
246
245
|
readonly dark: boolean;
|
|
247
246
|
readonly loading: boolean;
|
|
247
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
248
248
|
readonly loadOnClick: boolean;
|
|
249
249
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
250
250
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -279,10 +279,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
279
279
|
type: import('vue').PropType<boolean>;
|
|
280
280
|
default: boolean;
|
|
281
281
|
};
|
|
282
|
-
variant: {
|
|
283
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
284
|
-
default: string;
|
|
285
|
-
};
|
|
286
282
|
dark: {
|
|
287
283
|
type: import('vue').PropType<boolean>;
|
|
288
284
|
default: boolean;
|
|
@@ -294,11 +290,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
294
290
|
iconRight: {
|
|
295
291
|
type: import('vue').PropType<boolean>;
|
|
296
292
|
};
|
|
293
|
+
variant: {
|
|
294
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
295
|
+
default: string;
|
|
296
|
+
};
|
|
297
297
|
loadOnClick: {
|
|
298
298
|
type: import('vue').PropType<boolean>;
|
|
299
299
|
default: boolean;
|
|
300
300
|
};
|
|
301
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
301
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "dark" | "loading" | "variant" | "loadOnClick">, "size" | "variant">>;
|
|
302
302
|
default: undefined;
|
|
303
303
|
};
|
|
304
304
|
isNestedModal: {
|
|
@@ -360,9 +360,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
360
360
|
disabled: boolean;
|
|
361
361
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
362
362
|
error: boolean;
|
|
363
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
364
363
|
dark: boolean;
|
|
365
364
|
loading: boolean;
|
|
365
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
366
366
|
loadOnClick: boolean;
|
|
367
367
|
}> & Omit<{
|
|
368
368
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -370,9 +370,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
370
370
|
readonly label: string;
|
|
371
371
|
readonly disabled: boolean;
|
|
372
372
|
readonly error: boolean;
|
|
373
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
374
373
|
readonly dark: boolean;
|
|
375
374
|
readonly loading: boolean;
|
|
375
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
376
376
|
readonly loadOnClick: boolean;
|
|
377
377
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
378
378
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -407,10 +407,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
407
407
|
type: import('vue').PropType<boolean>;
|
|
408
408
|
default: boolean;
|
|
409
409
|
};
|
|
410
|
-
variant: {
|
|
411
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
412
|
-
default: string;
|
|
413
|
-
};
|
|
414
410
|
dark: {
|
|
415
411
|
type: import('vue').PropType<boolean>;
|
|
416
412
|
default: boolean;
|
|
@@ -422,11 +418,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
422
418
|
iconRight: {
|
|
423
419
|
type: import('vue').PropType<boolean>;
|
|
424
420
|
};
|
|
421
|
+
variant: {
|
|
422
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
423
|
+
default: string;
|
|
424
|
+
};
|
|
425
425
|
loadOnClick: {
|
|
426
426
|
type: import('vue').PropType<boolean>;
|
|
427
427
|
default: boolean;
|
|
428
428
|
};
|
|
429
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
429
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "dark" | "loading" | "variant" | "loadOnClick">, "size" | "variant">>;
|
|
430
430
|
required: true;
|
|
431
431
|
};
|
|
432
432
|
secondaryAction: {
|
|
@@ -438,9 +438,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
438
438
|
disabled: boolean;
|
|
439
439
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
440
440
|
error: boolean;
|
|
441
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
442
441
|
dark: boolean;
|
|
443
442
|
loading: boolean;
|
|
443
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
444
444
|
loadOnClick: boolean;
|
|
445
445
|
}> & Omit<{
|
|
446
446
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -448,9 +448,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
448
448
|
readonly label: string;
|
|
449
449
|
readonly disabled: boolean;
|
|
450
450
|
readonly error: boolean;
|
|
451
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
452
451
|
readonly dark: boolean;
|
|
453
452
|
readonly loading: boolean;
|
|
453
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
454
454
|
readonly loadOnClick: boolean;
|
|
455
455
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
456
456
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -485,10 +485,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
485
485
|
type: import('vue').PropType<boolean>;
|
|
486
486
|
default: boolean;
|
|
487
487
|
};
|
|
488
|
-
variant: {
|
|
489
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
490
|
-
default: string;
|
|
491
|
-
};
|
|
492
488
|
dark: {
|
|
493
489
|
type: import('vue').PropType<boolean>;
|
|
494
490
|
default: boolean;
|
|
@@ -500,11 +496,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
500
496
|
iconRight: {
|
|
501
497
|
type: import('vue').PropType<boolean>;
|
|
502
498
|
};
|
|
499
|
+
variant: {
|
|
500
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
501
|
+
default: string;
|
|
502
|
+
};
|
|
503
503
|
loadOnClick: {
|
|
504
504
|
type: import('vue').PropType<boolean>;
|
|
505
505
|
default: boolean;
|
|
506
506
|
};
|
|
507
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
507
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "dark" | "loading" | "variant" | "loadOnClick">, "size" | "variant">>;
|
|
508
508
|
default: undefined;
|
|
509
509
|
};
|
|
510
510
|
tertiaryAction: {
|
|
@@ -516,9 +516,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
516
516
|
disabled: boolean;
|
|
517
517
|
icon: import('./ElIcon.vue').ElIconProps;
|
|
518
518
|
error: boolean;
|
|
519
|
-
variant: import('./ElButton.vue').ElButtonVariant;
|
|
520
519
|
dark: boolean;
|
|
521
520
|
loading: boolean;
|
|
521
|
+
variant: import('./ElButton.vue').ElButtonVariant;
|
|
522
522
|
loadOnClick: boolean;
|
|
523
523
|
}> & Omit<{
|
|
524
524
|
readonly type: "button" | "reset" | "submit";
|
|
@@ -526,9 +526,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
526
526
|
readonly label: string;
|
|
527
527
|
readonly disabled: boolean;
|
|
528
528
|
readonly error: boolean;
|
|
529
|
-
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
530
529
|
readonly dark: boolean;
|
|
531
530
|
readonly loading: boolean;
|
|
531
|
+
readonly variant: import('./ElButton.vue').ElButtonVariant;
|
|
532
532
|
readonly loadOnClick: boolean;
|
|
533
533
|
readonly onClick?: ((() => unknown) | (() => Promise<unknown>)) | undefined;
|
|
534
534
|
readonly icon?: import('./ElIcon.vue').ElIconProps | undefined;
|
|
@@ -563,10 +563,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
563
563
|
type: import('vue').PropType<boolean>;
|
|
564
564
|
default: boolean;
|
|
565
565
|
};
|
|
566
|
-
variant: {
|
|
567
|
-
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
568
|
-
default: string;
|
|
569
|
-
};
|
|
570
566
|
dark: {
|
|
571
567
|
type: import('vue').PropType<boolean>;
|
|
572
568
|
default: boolean;
|
|
@@ -578,11 +574,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
578
574
|
iconRight: {
|
|
579
575
|
type: import('vue').PropType<boolean>;
|
|
580
576
|
};
|
|
577
|
+
variant: {
|
|
578
|
+
type: import('vue').PropType<"primary" | "secondary" | "tertiary">;
|
|
579
|
+
default: string;
|
|
580
|
+
};
|
|
581
581
|
loadOnClick: {
|
|
582
582
|
type: import('vue').PropType<boolean>;
|
|
583
583
|
default: boolean;
|
|
584
584
|
};
|
|
585
|
-
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "
|
|
585
|
+
}>>, "type" | "size" | "label" | "onClick" | "disabled" | "icon" | "error" | "dark" | "loading" | "variant" | "loadOnClick">, "size" | "variant">>;
|
|
586
586
|
default: undefined;
|
|
587
587
|
};
|
|
588
588
|
isNestedModal: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */require("./polyfills.cjs.js");require("vee-validate");require("../node_modules/codice-fiscale-js/dist/codice.fiscale.commonjs2.cjs.js");require("../node_modules/lodash/lodash.cjs.js");require("./tailwind.plugin.cjs.js");require("../node_modules/@davincihealthcare/elty-design-system-foundations/dist/index.cjs.js");const s=require("./ElIcon.vue.cjs2.js"),c=require("./ElBadge.vue.cjs2.js");require("./forms/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */require("./polyfills.cjs.js");require("vee-validate");require("../node_modules/codice-fiscale-js/dist/codice.fiscale.commonjs2.cjs.js");require("../node_modules/lodash/lodash.cjs.js");require("./tailwind.plugin.cjs.js");require("../node_modules/@davincihealthcare/elty-design-system-foundations/dist/index.cjs.js");const s=require("./ElIcon.vue.cjs2.js"),c=require("./ElBadge.vue.cjs2.js");require("./forms/ElInputSelect.vue.cjs2.js");require("./forms/ElInputText.vue.cjs2.js");require("./forms/ElInputCheckbox.vue.cjs2.js");require("./forms/ElInputDate.vue.cjs2.js");require("./forms/ElInputFile.vue.cjs2.js");require("./forms/ElInputMeasureUnit.vue.cjs2.js");require("./forms/ElInputNumber.vue.cjs2.js");require("./forms/ElInputPhone.vue.cjs2.js");require("./forms/ElInputTextarea.vue.cjs2.js");require("./ElToast.vue.cjs2.js");require("./forms/ElInputRadioButton.vue.cjs2.js");require("../node_modules/swiper/shared/swiper-core.cjs.js");require("./forms/ElInputSearch.vue.cjs2.js");const d=["data-cy"],p={key:2,class:"h-4 ml-1 relative flex justify-center items-start"},v=["base","l"],m=["primary","secondary"],f=["default","hover","pressed","active"],b=e.defineComponent({__name:"ElActionButton",props:{id:{default:void 0},label:{},size:{default:"base"},color:{default:"primary"},status:{default:"default"},leadingIcon:{default:void 0},trailingIcon:{default:void 0},badge:{default:void 0},onClick:{type:Function,default:void 0}},emits:["click"],setup(l,{emit:i}){const t=l,n=()=>{a.value=!0,u("click",t.onClick)},a=e.ref(t.status==="pressed"),u=i;return(r,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["transition-colors w-fit border flex flex-1 justify-center items-center gap-1 font-semibold leading-6 rounded-lg px-3 hover:bg-neutral-hover hover:text-neutral-darker active:bg-neutral-pressed",{"text-sm h-8":t.size==="base","text-base h-10":t.size==="l","border-transparent text-neutral-darker":t.status==="default","border-transparent text-neutral-darker bg-neutral-hover":t.status==="hover","border-transparent bg-neutral-pressed ":(a.value||t.status==="pressed")&&t.status!=="active"&&t.status!=="default"&&t.status!=="hover","text-primary-active bg-primary-light-active border-primary-active":t.status==="active"&&t.color==="primary","text-secondary-active bg-secondary-light-active border-secondary-active":t.status==="active"&&t.color==="secondary"}]),"data-cy":t.label?t.label.trim().replace(/\s+/g,""):"default-action-button",onMouseDown:o[0]||(o[0]=g=>a.value=!0),onClick:n},[r.leadingIcon?(e.openBlock(),e.createBlock(e.unref(s.default),e.mergeProps({key:0},r.leadingIcon,{class:{"h-4 w-4":r.size==="base","h-5 w-5":r.size==="l"}}),null,16,["class"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1),r.trailingIcon?(e.openBlock(),e.createBlock(e.unref(s.default),e.mergeProps({key:1},r.trailingIcon,{class:{"h-4 w-4":r.size==="base","h-5 w-5":r.size==="l"}}),null,16,["class"])):e.createCommentVNode("",!0),r.badge?(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(c.default),e.mergeProps(r.badge,{color:"red"}),null,16)])):e.createCommentVNode("",!0)],42,d))}});exports.default=b;exports.elActionButtonColors=m;exports.elActionButtonSizes=v;exports.elActionButtonStatus=f;
|
|
2
2
|
//# sourceMappingURL=ElActionButton.vue.cjs2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as v,ref as b,openBlock as r,createElementBlock as n,normalizeClass as g,createBlock as c,unref as a,mergeProps as s,createCommentVNode as i,createElementVNode as y,toDisplayString as h,createVNode as k}from"vue";/* empty css */import"./polyfills.esm.js";import"vee-validate";import"../node_modules/codice-fiscale-js/dist/codice.fiscale.commonjs2.esm.js";import"../node_modules/lodash/lodash.esm.js";import"./tailwind.plugin.esm.js";import"../node_modules/@davincihealthcare/elty-design-system-foundations/dist/index.esm.js";import d from"./ElIcon.vue.esm2.js";import z from"./ElBadge.vue.esm2.js";import"./forms/
|
|
1
|
+
import{defineComponent as v,ref as b,openBlock as r,createElementBlock as n,normalizeClass as g,createBlock as c,unref as a,mergeProps as s,createCommentVNode as i,createElementVNode as y,toDisplayString as h,createVNode as k}from"vue";/* empty css */import"./polyfills.esm.js";import"vee-validate";import"../node_modules/codice-fiscale-js/dist/codice.fiscale.commonjs2.esm.js";import"../node_modules/lodash/lodash.esm.js";import"./tailwind.plugin.esm.js";import"../node_modules/@davincihealthcare/elty-design-system-foundations/dist/index.esm.js";import d from"./ElIcon.vue.esm2.js";import z from"./ElBadge.vue.esm2.js";import"./forms/ElInputSelect.vue.esm2.js";import"./forms/ElInputText.vue.esm2.js";import"./forms/ElInputCheckbox.vue.esm2.js";import"./forms/ElInputDate.vue.esm2.js";import"./forms/ElInputFile.vue.esm2.js";import"./forms/ElInputMeasureUnit.vue.esm2.js";import"./forms/ElInputNumber.vue.esm2.js";import"./forms/ElInputPhone.vue.esm2.js";import"./forms/ElInputTextarea.vue.esm2.js";import"./ElToast.vue.esm2.js";import"./forms/ElInputRadioButton.vue.esm2.js";import"../node_modules/swiper/shared/swiper-core.esm.js";import"./forms/ElInputSearch.vue.esm2.js";const B=["data-cy"],C={key:2,class:"h-4 ml-1 relative flex justify-center items-start"},T=["base","l"],U=["primary","secondary"],W=["default","hover","pressed","active"],X=v({__name:"ElActionButton",props:{id:{default:void 0},label:{},size:{default:"base"},color:{default:"primary"},status:{default:"default"},leadingIcon:{default:void 0},trailingIcon:{default:void 0},badge:{default:void 0},onClick:{type:Function,default:void 0}},emits:["click"],setup(u,{emit:m}){const e=u,p=()=>{o.value=!0,f("click",e.onClick)},o=b(e.status==="pressed"),f=m;return(t,l)=>(r(),n("button",{class:g(["transition-colors w-fit border flex flex-1 justify-center items-center gap-1 font-semibold leading-6 rounded-lg px-3 hover:bg-neutral-hover hover:text-neutral-darker active:bg-neutral-pressed",{"text-sm h-8":e.size==="base","text-base h-10":e.size==="l","border-transparent text-neutral-darker":e.status==="default","border-transparent text-neutral-darker bg-neutral-hover":e.status==="hover","border-transparent bg-neutral-pressed ":(o.value||e.status==="pressed")&&e.status!=="active"&&e.status!=="default"&&e.status!=="hover","text-primary-active bg-primary-light-active border-primary-active":e.status==="active"&&e.color==="primary","text-secondary-active bg-secondary-light-active border-secondary-active":e.status==="active"&&e.color==="secondary"}]),"data-cy":e.label?e.label.trim().replace(/\s+/g,""):"default-action-button",onMouseDown:l[0]||(l[0]=w=>o.value=!0),onClick:p},[t.leadingIcon?(r(),c(a(d),s({key:0},t.leadingIcon,{class:{"h-4 w-4":t.size==="base","h-5 w-5":t.size==="l"}}),null,16,["class"])):i("",!0),y("span",null,h(e.label),1),t.trailingIcon?(r(),c(a(d),s({key:1},t.trailingIcon,{class:{"h-4 w-4":t.size==="base","h-5 w-5":t.size==="l"}}),null,16,["class"])):i("",!0),t.badge?(r(),n("div",C,[k(a(z),s(t.badge,{color:"red"}),null,16)])):i("",!0)],42,B))}});export{X as default,U as elActionButtonColors,T as elActionButtonSizes,W as elActionButtonStatus};
|
|
2
2
|
//# sourceMappingURL=ElActionButton.vue.esm2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("./ElAvatar.vue.cjs2.js"),B=require("./ElFile.vue.cjs2.js"),C=require("./ElIcon.vue.cjs2.js"),E=require("./forms/ElInputCheckbox.vue.cjs2.js"),M=require("../node_modules/lodash/lodash.cjs.js"),V=require("./ElItem.vue.cjs2.js"),N={class:"flex flex-col gap-2 w-fit"},S={class:"flex gap-3"},z={key:0,class:"text-neutral-lighter text-xs font-medium"},j=["src"],I={class:"flex w-full flex-col gap-1"},W={key:0},q={key:1},$=["filled","outlined"],A=["brand-blue","brand-green","indigo","purple","pink"],D=e.defineComponent({__name:"ElBubbleChat",props:{appearence:{},color:{default:"brand-blue"},time:{default:void 0},message:{default:void 0},automaticMessage:{default:void 0},headline:{default:void 0},avatar:{default:void 0},file:{default:void 0},picture:{default:void 0},loading:{type:Boolean},error:{type:Boolean},multiSelect:{type:Boolean},selected:{type:Boolean},maxWidth:{default:60},contextMenuItems:{default:void 0}},emits:["row-selection","open-file","open-picture"],setup(v,{emit:h}){const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("./ElAvatar.vue.cjs2.js"),B=require("./ElFile.vue.cjs2.js"),C=require("./ElIcon.vue.cjs2.js"),E=require("./forms/ElInputCheckbox.vue.cjs2.js"),M=require("../node_modules/lodash/lodash.cjs.js"),V=require("./ElItem.vue.cjs2.js"),N={class:"flex flex-col gap-2 w-fit"},S={class:"flex gap-3"},z={key:0,class:"text-neutral-lighter text-xs font-medium"},j=["src"],I={class:"flex w-full flex-col gap-1"},W={key:0},q={key:1},$=["filled","outlined"],A=["brand-blue","brand-green","indigo","purple","pink"],D=e.defineComponent({__name:"ElBubbleChat",props:{appearence:{},color:{default:"brand-blue"},time:{default:void 0},message:{default:void 0},automaticMessage:{default:void 0},headline:{default:void 0},avatar:{default:void 0},file:{default:void 0},picture:{default:void 0},loading:{type:Boolean},error:{type:Boolean},multiSelect:{type:Boolean},selected:{type:Boolean},maxWidth:{default:60},contextMenuItems:{default:void 0}},emits:["row-selection","open-file","open-picture"],setup(v,{emit:h}){const a=v,u=h,d=e.ref(!1),o=e.ref(0),n=e.ref(0),k=l=>{d.value=!0,o.value=l.pageX,n.value=l.pageY},i=e.ref(),s=e.computed(()=>i.value?{width:i.value.clientWidth,height:i.value.clientHeight}:{width:0,height:0}),p=e.computed(()=>({width:window.innerWidth,height:window.innerHeight})),g=e.computed(()=>o.value+s.value.width>p.value.width?o.value-s.value.width:o.value),b=e.computed(()=>n.value+s.value.height>p.value.height?n.value-s.value.height:n.value),y=e.computed(()=>{let l=a.maxWidth;return a.maxWidth<10&&(l=10),a.maxWidth>100&&(l=100),a.appearence==="filled"&&(a.error||a.multiSelect)?`calc(${l}% + 2.75rem)`:a.avatar?`calc(${l}% + 3.25rem)`:`${l}%`});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full flex",{"justify-end":l.appearence==="filled","justify-start":l.appearence==="outlined"}])},[e.createElementVNode("div",{class:"flex flex-col gap-2 w-fit",style:e.normalizeStyle({"max-width":y.value})},[l.automaticMessage?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm font-semibold text-neutral-lighter flex",{"justify-end":l.appearence==="filled","justify-start":l.appearence==="outlined","opacity-0 select-none":l.appearence==="filled"&&l.multiSelect&&!l.error,"mr-11":l.appearence==="filled"&&l.error}])},e.toDisplayString(l.automaticMessage),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex gap-5 items-center",{"justify-end":l.appearence==="filled","justify-start":l.appearence==="outlined"}])},[e.createElementVNode("div",N,[e.createElementVNode("div",S,[l.avatar&&l.appearence==="outlined"?(e.openBlock(),e.createBlock(w.default,{key:0,size:"sm",picture:l.avatar.picture,label:l.avatar.label,class:"shrink-0"},null,8,["picture","label"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["rounded-2xl shadow-sm p-2 flex flex-col gap-1 justify-center",{"text-white":l.appearence==="filled","bg-brandBlue-500":l.appearence==="filled"&&l.color==="brand-blue","bg-brandGreen-500":l.appearence==="filled"&&l.color==="brand-green","bg-indigo-500":l.appearence==="filled"&&l.color==="indigo","bg-purple-500":l.appearence==="filled"&&l.color==="purple","bg-pink-500":l.appearence==="filled"&&l.color==="pink","bg-neutral-surface text-gray-900 border border-neutral-surface":l.appearence==="outlined"}]),onContextmenu:r[2]||(r[2]=e.withModifiers(t=>l.contextMenuItems&&l.contextMenuItems.length&&k(t),["prevent"]))},[l.headline&&l.appearence==="outlined"?(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(l.headline),1)):e.createCommentVNode("",!0),l.picture?(e.openBlock(),e.createElementBlock("div",{key:1,class:"overflow-hidden rounded-xl w-48 max-h-80 cursor-pointer",onClick:r[0]||(r[0]=t=>u("open-picture"))},[e.createElementVNode("img",{src:l.picture,class:"w-full h-full object-cover"},null,8,j)])):e.createCommentVNode("",!0),l.file?(e.openBlock(),e.createBlock(B.default,{key:2,variant:l.appearence==="filled"?"alpha":"outlined",name:l.file.name,format:l.file.format,class:"cursor-pointer",onClick:r[1]||(r[1]=t=>u("open-file",l.file.url))},null,8,["variant","name","format"])):e.createCommentVNode("",!0),l.message?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["flex text-sm font-normal supports-[overflow-wrap:anywhere]:[overflow-wrap:anywhere] supports-[not(overflow-wrap:anywhere)]:[word-break:break-word] whitespace-pre-wrap",{"text-neutral-inverse":l.appearence==="filled","text-neutral-darker":l.appearence==="outlined"}])},e.toDisplayString(l.message),3)):e.createCommentVNode("",!0)],34)])]),l.appearence==="filled"&&l.error?(e.openBlock(),e.createBlock(C.default,{key:0,name:"ExclamationCircleIcon",solid:"",class:"w-6 h-6 text-error-active flex justify-start shrink-0"})):e.createCommentVNode("",!0),l.appearence==="filled"&&l.multiSelect&&!l.error?(e.openBlock(),e.createBlock(E.default,{key:1,"model-value":l.selected,color:l.color,class:"shrink-0","onUpdate:modelValue":r[3]||(r[3]=t=>u("row-selection",t))},null,8,["model-value","color"])):e.createCommentVNode("",!0)],2),l.contextMenuItems&&l.contextMenuItems.length&&d.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"fixed w-screen h-screen top-0 left-0 z-40 bg-transparent cursor-default",onClick:r[4]||(r[4]=()=>d.value=!1)},[e.createElementVNode("div",{ref_key:"contextMenuElement",ref:i,class:"z-50 absolute bg-white rounded-md shadow p-2 min-w-52",style:e.normalizeStyle({top:b.value+"px",left:g.value+"px"})},[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.contextMenuItems,(t,c)=>{var f;return e.openBlock(),e.createBlock(V.default,e.mergeProps({id:"option-"+c,ref_for:!0,ref:"itemRefs",key:c,class:["self-stretch",{"cursor-pointer":!t.disabled,"cursor-default":t.disabled}],role:"option",tabindex:"-1"},e.unref(M.lodashExports.omit)(t,"onClick"),{disabled:t.disabled,"data-cy":`${(f=t.text)==null?void 0:f.trim().replaceAll(" ","").replaceAll(",","")}-dropdown-item`,onClick:e.withModifiers(H=>{var m;return!t.disabled&&((m=t.onClick)==null?void 0:m.call(t))},["prevent"])}),null,16,["id","class","disabled","data-cy","onClick"])}),128))])],4)])):e.createCommentVNode("",!0),l.time||l.loading?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["text-xs text-neutral-lighter flex justify-end",{"opacity-0 select-none":l.appearence==="filled"&&(l.multiSelect||l.error)}])},[l.loading&&l.appearence==="filled"?(e.openBlock(),e.createElementBlock("div",W,"Invio in corso")):(e.openBlock(),e.createElementBlock("div",q,e.toDisplayString(l.time),1))],2)):e.createCommentVNode("",!0)],4)],2))}});exports.default=D;exports.elBubbleChatAppearences=$;exports.elBubbleChatColors=A;
|
|
2
2
|
//# sourceMappingURL=ElBubbleChat.vue.cjs2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElBubbleChat.vue.cjs2.js","sources":["../../src/ElBubbleChat.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elBubbleChatAppearences = ['filled', 'outlined'] as const;\nexport type ElBubbleChatAppearences = (typeof elBubbleChatAppearences)[number];\n\nexport const elBubbleChatColors = ['brand-blue', 'brand-green', 'indigo', 'purple', 'pink'] as const;\nexport type ElBubbleChatColors = (typeof elBubbleChatColors)[number];\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue';\nimport ElAvatar from './ElAvatar.vue';\nimport { DropdownItem } from './ElDropdown.vue';\nimport ElFile from './ElFile.vue';\nimport ElIcon from './ElIcon.vue';\nimport ElInputCheckbox, { ElInputCheckboxModelValues } from './forms/ElInputCheckbox.vue';\nimport { omit } from 'lodash';\nimport ElItem from './ElItem.vue';\n\nconst props = withDefaults(\n defineProps<{\n appearence: ElBubbleChatAppearences;\n color?: ElBubbleChatColors;\n time?: string;\n message?: string;\n automaticMessage?: string;\n headline?: string;\n avatar?: Pick<InstanceType<typeof ElAvatar>['$props'], 'picture' | 'label'>;\n file?: Pick<InstanceType<typeof ElFile>['$props'], 'name' | 'format'>;\n picture?: string;\n loading?: boolean;\n error?: boolean;\n multiSelect?: boolean;\n selected?: boolean;\n maxWidth?: number;\n contextMenuItems?: DropdownItem[];\n }>(),\n {\n color: 'brand-blue',\n file: undefined,\n picture: undefined,\n automaticMessage: undefined,\n time: undefined,\n message: undefined,\n headline: undefined,\n avatar: undefined,\n maxWidth: 60,\n contextMenuItems: undefined,\n },\n);\n\nconst emit = defineEmits<{\n (event: 'row-selection', value: ElInputCheckboxModelValues): void;\n (event: 'open-file'): void;\n (event: 'open-picture'): void;\n}>();\n\nconst showMenu = ref<boolean>(false);\nconst menuX = ref<number>(0);\nconst menuY = ref<number>(0);\n\nconst handleShowContextMenu = (event: MouseEvent) => {\n showMenu.value = true;\n menuX.value = event.pageX;\n menuY.value = event.pageY;\n};\n\nconst contextMenuElement = ref<HTMLDivElement>();\n\nconst contextMenuSize = computed(() => {\n if (!contextMenuElement.value)\n return {\n width: 0,\n height: 0,\n };\n\n return {\n width: contextMenuElement.value.clientWidth,\n height: contextMenuElement.value.clientHeight,\n };\n});\n\nconst deviceSize = computed(() => {\n return { width: window.innerWidth, height: window.innerHeight };\n});\n\nconst positionX = computed(() => {\n const totalWidth = menuX.value + contextMenuSize.value.width;\n\n if (totalWidth > deviceSize.value.width) return menuX.value - contextMenuSize.value.width;\n\n return menuX.value;\n});\n\nconst positionY = computed(() => {\n const totalHeight = menuY.value + contextMenuSize.value.height;\n\n if (totalHeight > deviceSize.value.height) return menuY.value - contextMenuSize.value.height;\n\n return menuY.value;\n});\n\nconst bubbleMaxWidth = computed(() => {\n let maxWidth = props.maxWidth;\n\n if (props.maxWidth < 10) maxWidth = 10;\n if (props.maxWidth > 100) maxWidth = 100;\n\n if (props.appearence === 'filled' && (props.error || props.multiSelect)) return `calc(${maxWidth}% + 2.75rem)`;\n\n if (props.avatar) return `calc(${maxWidth}% + 3.25rem)`;\n\n return `${maxWidth}%`;\n});\n</script>\n\n<template>\n <div\n class=\"w-full flex\"\n :class=\"{\n 'justify-end': appearence === 'filled',\n 'justify-start': appearence === 'outlined',\n }\"\n >\n <div\n class=\"flex flex-col gap-2 w-fit\"\n :style=\"{\n /* The message container width should be max 60% (default) of parent width.\n To ensure that when the checkbox for multiselect/error/avatar are visible,\n we add extra width (same as multiselect/error/user avatar width),\n so the maximum width of the message container should not change */\n 'max-width': bubbleMaxWidth,\n }\"\n >\n <div\n v-if=\"automaticMessage\"\n class=\"text-sm font-semibold text-neutral-lighter flex\"\n :class=\"{\n 'justify-end': appearence === 'filled',\n 'justify-start': appearence === 'outlined',\n 'opacity-0 select-none': appearence === 'filled' && multiSelect && !error,\n 'mr-11': appearence === 'filled' && error,\n }\"\n >\n {{ automaticMessage }}\n </div>\n\n <div\n class=\"flex gap-5 items-center\"\n :class=\"{\n 'justify-end': appearence === 'filled',\n 'justify-start': appearence === 'outlined',\n }\"\n >\n <div class=\"flex flex-col gap-2 w-fit\">\n <div class=\"flex gap-3\">\n <ElAvatar\n v-if=\"avatar && appearence === 'outlined'\"\n size=\"sm\"\n :picture=\"avatar.picture\"\n :label=\"avatar.label\"\n class=\"shrink-0\"\n />\n\n <div\n class=\"rounded-2xl shadow-sm p-2 flex flex-col gap-1 justify-center\"\n :class=\"{\n 'text-white': appearence === 'filled',\n 'bg-brandBlue-500': appearence === 'filled' && color === 'brand-blue',\n 'bg-brandGreen-500': appearence === 'filled' && color === 'brand-green',\n 'bg-indigo-500': appearence === 'filled' && color === 'indigo',\n 'bg-purple-500': appearence === 'filled' && color === 'purple',\n 'bg-pink-500': appearence === 'filled' && color === 'pink',\n 'bg-neutral-surface text-gray-900 border border-neutral-surface': appearence === 'outlined',\n }\"\n @contextmenu.prevent=\"contextMenuItems && contextMenuItems.length && handleShowContextMenu($event)\"\n >\n <div v-if=\"headline && appearence === 'outlined'\" class=\"text-neutral-lighter text-xs font-medium\">{{ headline }}</div>\n\n <div v-if=\"picture\" class=\"overflow-hidden rounded-xl w-48 max-h-80 cursor-pointer\" @click=\"emit('open-picture')\">\n <img :src=\"picture\" class=\"w-full h-full object-cover\" />\n </div>\n\n <ElFile\n v-if=\"file\"\n :variant=\"appearence === 'filled' ? 'alpha' : 'outlined'\"\n :name=\"file.name\"\n :format=\"file.format\"\n class=\"cursor-pointer\"\n @click=\"emit('open-file')\"\n />\n\n <div\n v-if=\"message\"\n class=\"flex text-sm font-normal supports-[overflow-wrap:anywhere]:[overflow-wrap:anywhere] supports-[not(overflow-wrap:anywhere)]:[word-break:break-word] whitespace-pre-wrap\"\n :class=\"{\n 'text-neutral-inverse': appearence === 'filled',\n 'text-neutral-darker': appearence === 'outlined',\n }\"\n >\n {{ message }}\n </div>\n </div>\n </div>\n </div>\n\n <ElIcon\n v-if=\"appearence === 'filled' && error\"\n name=\"ExclamationCircleIcon\"\n solid\n class=\"w-6 h-6 text-error-active flex justify-start shrink-0\"\n />\n\n <ElInputCheckbox\n v-if=\"appearence === 'filled' && multiSelect && !error\"\n :model-value=\"selected\"\n :color=\"color\"\n class=\"shrink-0\"\n @update:model-value=\"val => emit('row-selection', val)\"\n />\n </div>\n\n <!-- Context menu -->\n <div\n v-if=\"contextMenuItems && contextMenuItems.length && showMenu\"\n class=\"fixed w-screen h-screen top-0 left-0 z-40 bg-transparent cursor-default\"\n @click=\"() => (showMenu = false)\"\n >\n <div\n ref=\"contextMenuElement\"\n class=\"z-50 absolute bg-white rounded-md shadow p-2 min-w-52\"\n :style=\"{ top: positionY + 'px', left: positionX + 'px' }\"\n >\n <div class=\"flex w-full flex-col gap-1\">\n <ElItem\n v-for=\"(item, index) in contextMenuItems\"\n :id=\"'option-' + index\"\n ref=\"itemRefs\"\n :key=\"index\"\n class=\"self-stretch\"\n :class=\"{\n 'cursor-pointer': !item.disabled,\n 'cursor-default': item.disabled,\n }\"\n role=\"option\"\n tabindex=\"-1\"\n v-bind=\"omit(item, 'onClick')\"\n :disabled=\"item.disabled\"\n :data-cy=\"`${item.text?.trim().replaceAll(' ', '').replaceAll(',', '')}-dropdown-item`\"\n @click.prevent=\"!item.disabled && item.onClick?.()\"\n />\n </div>\n </div>\n </div>\n\n <div\n v-if=\"time || loading\"\n class=\"text-xs text-neutral-lighter flex justify-end\"\n :class=\"{\n 'opacity-0 select-none': appearence === 'filled' && (multiSelect || error),\n }\"\n >\n <div v-if=\"loading && appearence === 'filled'\">Invio in corso</div>\n <div v-else>\n {{ time }}\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"names":["elBubbleChatAppearences","elBubbleChatColors","props","__props","emit","__emit","showMenu","ref","menuX","menuY","handleShowContextMenu","event","contextMenuElement","contextMenuSize","computed","deviceSize","positionX","positionY","bubbleMaxWidth","maxWidth"],"mappings":"6iBACaA,EAA0B,CAAC,SAAU,UAAU,EAG/CC,EAAqB,CAAC,aAAc,cAAe,SAAU,SAAU,MAAM,8eAc1F,MAAMC,EAAQC,EAgCRC,EAAOC,EAMPC,EAAWC,MAAa,EAAK,EAC7BC,EAAQD,MAAY,CAAC,EACrBE,EAAQF,MAAY,CAAC,EAErBG,EAAyBC,GAAsB,CACnDL,EAAS,MAAQ,GACjBE,EAAM,MAAQG,EAAM,MACpBF,EAAM,MAAQE,EAAM,KAAA,EAGhBC,EAAqBL,EAAAA,MAErBM,EAAkBC,EAAAA,SAAS,IAC1BF,EAAmB,MAMjB,CACL,MAAOA,EAAmB,MAAM,YAChC,OAAQA,EAAmB,MAAM,YAAA,EAP1B,CACL,MAAO,EACP,OAAQ,CAAA,CAOb,EAEKG,EAAaD,EAAAA,SAAS,KACnB,CAAE,MAAO,OAAO,WAAY,OAAQ,OAAO,aACnD,EAEKE,EAAYF,EAAAA,SAAS,IACNN,EAAM,MAAQK,EAAgB,MAAM,MAEtCE,EAAW,MAAM,MAAcP,EAAM,MAAQK,EAAgB,MAAM,MAE7EL,EAAM,KACd,EAEKS,EAAYH,EAAAA,SAAS,IACLL,EAAM,MAAQI,EAAgB,MAAM,OAEtCE,EAAW,MAAM,OAAeN,EAAM,MAAQI,EAAgB,MAAM,OAE/EJ,EAAM,KACd,EAEKS,EAAiBJ,EAAAA,SAAS,IAAM,CACpC,IAAIK,EAAWjB,EAAM,SAKrB,OAHIA,EAAM,SAAW,KAAeiB,EAAA,IAChCjB,EAAM,SAAW,MAAgBiB,EAAA,KAEjCjB,EAAM,aAAe,WAAaA,EAAM,OAASA,EAAM,aAAqB,QAAQiB,CAAQ,eAE5FjB,EAAM,OAAe,QAAQiB,CAAQ,eAElC,GAAGA,CAAQ,GAAA,CACnB"}
|
|
1
|
+
{"version":3,"file":"ElBubbleChat.vue.cjs2.js","sources":["../../src/ElBubbleChat.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elBubbleChatAppearences = ['filled', 'outlined'] as const;\nexport type ElBubbleChatAppearences = (typeof elBubbleChatAppearences)[number];\n\nexport const elBubbleChatColors = ['brand-blue', 'brand-green', 'indigo', 'purple', 'pink'] as const;\nexport type ElBubbleChatColors = (typeof elBubbleChatColors)[number];\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue';\nimport ElAvatar from './ElAvatar.vue';\nimport { DropdownItem } from './ElDropdown.vue';\nimport ElFile from './ElFile.vue';\nimport ElIcon from './ElIcon.vue';\nimport ElInputCheckbox, { ElInputCheckboxModelValues } from './forms/ElInputCheckbox.vue';\nimport { omit } from 'lodash';\nimport ElItem from './ElItem.vue';\n\nconst props = withDefaults(\n defineProps<{\n appearence: ElBubbleChatAppearences;\n color?: ElBubbleChatColors;\n time?: string;\n message?: string;\n automaticMessage?: string;\n headline?: string;\n avatar?: Pick<InstanceType<typeof ElAvatar>['$props'], 'picture' | 'label'>;\n file?: Pick<InstanceType<typeof ElFile>['$props'], 'name' | 'format' | 'url'>;\n picture?: string;\n loading?: boolean;\n error?: boolean;\n multiSelect?: boolean;\n selected?: boolean;\n maxWidth?: number;\n contextMenuItems?: DropdownItem[];\n }>(),\n {\n color: 'brand-blue',\n file: undefined,\n picture: undefined,\n automaticMessage: undefined,\n time: undefined,\n message: undefined,\n headline: undefined,\n avatar: undefined,\n maxWidth: 60,\n contextMenuItems: undefined,\n },\n);\n\nconst emit = defineEmits<{\n (event: 'row-selection', value: ElInputCheckboxModelValues): void;\n (event: 'open-file', url?: string): void;\n (event: 'open-picture'): void;\n}>();\n\nconst showMenu = ref<boolean>(false);\nconst menuX = ref<number>(0);\nconst menuY = ref<number>(0);\n\nconst handleShowContextMenu = (event: MouseEvent) => {\n showMenu.value = true;\n menuX.value = event.pageX;\n menuY.value = event.pageY;\n};\n\nconst contextMenuElement = ref<HTMLDivElement>();\n\nconst contextMenuSize = computed(() => {\n if (!contextMenuElement.value)\n return {\n width: 0,\n height: 0,\n };\n\n return {\n width: contextMenuElement.value.clientWidth,\n height: contextMenuElement.value.clientHeight,\n };\n});\n\nconst deviceSize = computed(() => {\n return { width: window.innerWidth, height: window.innerHeight };\n});\n\nconst positionX = computed(() => {\n const totalWidth = menuX.value + contextMenuSize.value.width;\n\n if (totalWidth > deviceSize.value.width) return menuX.value - contextMenuSize.value.width;\n\n return menuX.value;\n});\n\nconst positionY = computed(() => {\n const totalHeight = menuY.value + contextMenuSize.value.height;\n\n if (totalHeight > deviceSize.value.height) return menuY.value - contextMenuSize.value.height;\n\n return menuY.value;\n});\n\nconst bubbleMaxWidth = computed(() => {\n let maxWidth = props.maxWidth;\n\n if (props.maxWidth < 10) maxWidth = 10;\n if (props.maxWidth > 100) maxWidth = 100;\n\n if (props.appearence === 'filled' && (props.error || props.multiSelect)) return `calc(${maxWidth}% + 2.75rem)`;\n\n if (props.avatar) return `calc(${maxWidth}% + 3.25rem)`;\n\n return `${maxWidth}%`;\n});\n</script>\n\n<template>\n <div\n class=\"w-full flex\"\n :class=\"{\n 'justify-end': appearence === 'filled',\n 'justify-start': appearence === 'outlined',\n }\"\n >\n <div\n class=\"flex flex-col gap-2 w-fit\"\n :style=\"{\n /* The message container width should be max 60% (default) of parent width.\n To ensure that when the checkbox for multiselect/error/avatar are visible,\n we add extra width (same as multiselect/error/user avatar width),\n so the maximum width of the message container should not change */\n 'max-width': bubbleMaxWidth,\n }\"\n >\n <div\n v-if=\"automaticMessage\"\n class=\"text-sm font-semibold text-neutral-lighter flex\"\n :class=\"{\n 'justify-end': appearence === 'filled',\n 'justify-start': appearence === 'outlined',\n 'opacity-0 select-none': appearence === 'filled' && multiSelect && !error,\n 'mr-11': appearence === 'filled' && error,\n }\"\n >\n {{ automaticMessage }}\n </div>\n\n <div\n class=\"flex gap-5 items-center\"\n :class=\"{\n 'justify-end': appearence === 'filled',\n 'justify-start': appearence === 'outlined',\n }\"\n >\n <div class=\"flex flex-col gap-2 w-fit\">\n <div class=\"flex gap-3\">\n <ElAvatar\n v-if=\"avatar && appearence === 'outlined'\"\n size=\"sm\"\n :picture=\"avatar.picture\"\n :label=\"avatar.label\"\n class=\"shrink-0\"\n />\n\n <div\n class=\"rounded-2xl shadow-sm p-2 flex flex-col gap-1 justify-center\"\n :class=\"{\n 'text-white': appearence === 'filled',\n 'bg-brandBlue-500': appearence === 'filled' && color === 'brand-blue',\n 'bg-brandGreen-500': appearence === 'filled' && color === 'brand-green',\n 'bg-indigo-500': appearence === 'filled' && color === 'indigo',\n 'bg-purple-500': appearence === 'filled' && color === 'purple',\n 'bg-pink-500': appearence === 'filled' && color === 'pink',\n 'bg-neutral-surface text-gray-900 border border-neutral-surface': appearence === 'outlined',\n }\"\n @contextmenu.prevent=\"contextMenuItems && contextMenuItems.length && handleShowContextMenu($event)\"\n >\n <div v-if=\"headline && appearence === 'outlined'\" class=\"text-neutral-lighter text-xs font-medium\">{{ headline }}</div>\n\n <div v-if=\"picture\" class=\"overflow-hidden rounded-xl w-48 max-h-80 cursor-pointer\" @click=\"emit('open-picture')\">\n <img :src=\"picture\" class=\"w-full h-full object-cover\" />\n </div>\n\n <ElFile\n v-if=\"file\"\n :variant=\"appearence === 'filled' ? 'alpha' : 'outlined'\"\n :name=\"file.name\"\n :format=\"file.format\"\n class=\"cursor-pointer\"\n @click=\"emit('open-file', file.url)\"\n />\n\n <div\n v-if=\"message\"\n class=\"flex text-sm font-normal supports-[overflow-wrap:anywhere]:[overflow-wrap:anywhere] supports-[not(overflow-wrap:anywhere)]:[word-break:break-word] whitespace-pre-wrap\"\n :class=\"{\n 'text-neutral-inverse': appearence === 'filled',\n 'text-neutral-darker': appearence === 'outlined',\n }\"\n >\n {{ message }}\n </div>\n </div>\n </div>\n </div>\n\n <ElIcon\n v-if=\"appearence === 'filled' && error\"\n name=\"ExclamationCircleIcon\"\n solid\n class=\"w-6 h-6 text-error-active flex justify-start shrink-0\"\n />\n\n <ElInputCheckbox\n v-if=\"appearence === 'filled' && multiSelect && !error\"\n :model-value=\"selected\"\n :color=\"color\"\n class=\"shrink-0\"\n @update:model-value=\"val => emit('row-selection', val)\"\n />\n </div>\n\n <!-- Context menu -->\n <div\n v-if=\"contextMenuItems && contextMenuItems.length && showMenu\"\n class=\"fixed w-screen h-screen top-0 left-0 z-40 bg-transparent cursor-default\"\n @click=\"() => (showMenu = false)\"\n >\n <div\n ref=\"contextMenuElement\"\n class=\"z-50 absolute bg-white rounded-md shadow p-2 min-w-52\"\n :style=\"{ top: positionY + 'px', left: positionX + 'px' }\"\n >\n <div class=\"flex w-full flex-col gap-1\">\n <ElItem\n v-for=\"(item, index) in contextMenuItems\"\n :id=\"'option-' + index\"\n ref=\"itemRefs\"\n :key=\"index\"\n class=\"self-stretch\"\n :class=\"{\n 'cursor-pointer': !item.disabled,\n 'cursor-default': item.disabled,\n }\"\n role=\"option\"\n tabindex=\"-1\"\n v-bind=\"omit(item, 'onClick')\"\n :disabled=\"item.disabled\"\n :data-cy=\"`${item.text?.trim().replaceAll(' ', '').replaceAll(',', '')}-dropdown-item`\"\n @click.prevent=\"!item.disabled && item.onClick?.()\"\n />\n </div>\n </div>\n </div>\n\n <div\n v-if=\"time || loading\"\n class=\"text-xs text-neutral-lighter flex justify-end\"\n :class=\"{\n 'opacity-0 select-none': appearence === 'filled' && (multiSelect || error),\n }\"\n >\n <div v-if=\"loading && appearence === 'filled'\">Invio in corso</div>\n <div v-else>\n {{ time }}\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"names":["elBubbleChatAppearences","elBubbleChatColors","props","__props","emit","__emit","showMenu","ref","menuX","menuY","handleShowContextMenu","event","contextMenuElement","contextMenuSize","computed","deviceSize","positionX","positionY","bubbleMaxWidth","maxWidth"],"mappings":"6iBACaA,EAA0B,CAAC,SAAU,UAAU,EAG/CC,EAAqB,CAAC,aAAc,cAAe,SAAU,SAAU,MAAM,8eAc1F,MAAMC,EAAQC,EAgCRC,EAAOC,EAMPC,EAAWC,MAAa,EAAK,EAC7BC,EAAQD,MAAY,CAAC,EACrBE,EAAQF,MAAY,CAAC,EAErBG,EAAyBC,GAAsB,CACnDL,EAAS,MAAQ,GACjBE,EAAM,MAAQG,EAAM,MACpBF,EAAM,MAAQE,EAAM,KAAA,EAGhBC,EAAqBL,EAAAA,MAErBM,EAAkBC,EAAAA,SAAS,IAC1BF,EAAmB,MAMjB,CACL,MAAOA,EAAmB,MAAM,YAChC,OAAQA,EAAmB,MAAM,YAAA,EAP1B,CACL,MAAO,EACP,OAAQ,CAAA,CAOb,EAEKG,EAAaD,EAAAA,SAAS,KACnB,CAAE,MAAO,OAAO,WAAY,OAAQ,OAAO,aACnD,EAEKE,EAAYF,EAAAA,SAAS,IACNN,EAAM,MAAQK,EAAgB,MAAM,MAEtCE,EAAW,MAAM,MAAcP,EAAM,MAAQK,EAAgB,MAAM,MAE7EL,EAAM,KACd,EAEKS,EAAYH,EAAAA,SAAS,IACLL,EAAM,MAAQI,EAAgB,MAAM,OAEtCE,EAAW,MAAM,OAAeN,EAAM,MAAQI,EAAgB,MAAM,OAE/EJ,EAAM,KACd,EAEKS,EAAiBJ,EAAAA,SAAS,IAAM,CACpC,IAAIK,EAAWjB,EAAM,SAKrB,OAHIA,EAAM,SAAW,KAAeiB,EAAA,IAChCjB,EAAM,SAAW,MAAgBiB,EAAA,KAEjCjB,EAAM,aAAe,WAAaA,EAAM,OAASA,EAAM,aAAqB,QAAQiB,CAAQ,eAE5FjB,EAAM,OAAe,QAAQiB,CAAQ,eAElC,GAAGA,CAAQ,GAAA,CACnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as E,ref as v,computed as d,openBlock as a,createElementBlock as
|
|
1
|
+
import{defineComponent as E,ref as v,computed as d,openBlock as a,createElementBlock as t,normalizeClass as s,createElementVNode as o,normalizeStyle as M,toDisplayString as h,createCommentVNode as n,createBlock as u,withModifiers as $,Fragment as H,renderList as A,mergeProps as V,unref as X}from"vue";import Y from"./ElAvatar.vue.esm2.js";import N from"./ElFile.vue.esm2.js";import D from"./ElIcon.vue.esm2.js";import F from"./forms/ElInputCheckbox.vue.esm2.js";import{l as G}from"../node_modules/lodash/lodash.esm.js";import L from"./ElItem.vue.esm2.js";const P={class:"flex flex-col gap-2 w-fit"},R={class:"flex gap-3"},U={key:0,class:"text-neutral-lighter text-xs font-medium"},q=["src"],J={class:"flex w-full flex-col gap-1"},K={key:0},O={key:1},re=["filled","outlined"],te=["brand-blue","brand-green","indigo","purple","pink"],ne=E({__name:"ElBubbleChat",props:{appearence:{},color:{default:"brand-blue"},time:{default:void 0},message:{default:void 0},automaticMessage:{default:void 0},headline:{default:void 0},avatar:{default:void 0},file:{default:void 0},picture:{default:void 0},loading:{type:Boolean},error:{type:Boolean},multiSelect:{type:Boolean},selected:{type:Boolean},maxWidth:{default:60},contextMenuItems:{default:void 0}},emits:["row-selection","open-file","open-picture"],setup(B,{emit:j}){const i=B,g=j,b=v(!1),p=v(0),f=v(0),S=e=>{b.value=!0,p.value=e.pageX,f.value=e.pageY},c=v(),m=d(()=>c.value?{width:c.value.clientWidth,height:c.value.clientHeight}:{width:0,height:0}),w=d(()=>({width:window.innerWidth,height:window.innerHeight})),W=d(()=>p.value+m.value.width>w.value.width?p.value-m.value.width:p.value),I=d(()=>f.value+m.value.height>w.value.height?f.value-m.value.height:f.value),z=d(()=>{let e=i.maxWidth;return i.maxWidth<10&&(e=10),i.maxWidth>100&&(e=100),i.appearence==="filled"&&(i.error||i.multiSelect)?`calc(${e}% + 2.75rem)`:i.avatar?`calc(${e}% + 3.25rem)`:`${e}%`});return(e,r)=>(a(),t("div",{class:s(["w-full flex",{"justify-end":e.appearence==="filled","justify-start":e.appearence==="outlined"}])},[o("div",{class:"flex flex-col gap-2 w-fit",style:M({"max-width":z.value})},[e.automaticMessage?(a(),t("div",{key:0,class:s(["text-sm font-semibold text-neutral-lighter flex",{"justify-end":e.appearence==="filled","justify-start":e.appearence==="outlined","opacity-0 select-none":e.appearence==="filled"&&e.multiSelect&&!e.error,"mr-11":e.appearence==="filled"&&e.error}])},h(e.automaticMessage),3)):n("",!0),o("div",{class:s(["flex gap-5 items-center",{"justify-end":e.appearence==="filled","justify-start":e.appearence==="outlined"}])},[o("div",P,[o("div",R,[e.avatar&&e.appearence==="outlined"?(a(),u(Y,{key:0,size:"sm",picture:e.avatar.picture,label:e.avatar.label,class:"shrink-0"},null,8,["picture","label"])):n("",!0),o("div",{class:s(["rounded-2xl shadow-sm p-2 flex flex-col gap-1 justify-center",{"text-white":e.appearence==="filled","bg-brandBlue-500":e.appearence==="filled"&&e.color==="brand-blue","bg-brandGreen-500":e.appearence==="filled"&&e.color==="brand-green","bg-indigo-500":e.appearence==="filled"&&e.color==="indigo","bg-purple-500":e.appearence==="filled"&&e.color==="purple","bg-pink-500":e.appearence==="filled"&&e.color==="pink","bg-neutral-surface text-gray-900 border border-neutral-surface":e.appearence==="outlined"}]),onContextmenu:r[2]||(r[2]=$(l=>e.contextMenuItems&&e.contextMenuItems.length&&S(l),["prevent"]))},[e.headline&&e.appearence==="outlined"?(a(),t("div",U,h(e.headline),1)):n("",!0),e.picture?(a(),t("div",{key:1,class:"overflow-hidden rounded-xl w-48 max-h-80 cursor-pointer",onClick:r[0]||(r[0]=l=>g("open-picture"))},[o("img",{src:e.picture,class:"w-full h-full object-cover"},null,8,q)])):n("",!0),e.file?(a(),u(N,{key:2,variant:e.appearence==="filled"?"alpha":"outlined",name:e.file.name,format:e.file.format,class:"cursor-pointer",onClick:r[1]||(r[1]=l=>g("open-file",e.file.url))},null,8,["variant","name","format"])):n("",!0),e.message?(a(),t("div",{key:3,class:s(["flex text-sm font-normal supports-[overflow-wrap:anywhere]:[overflow-wrap:anywhere] supports-[not(overflow-wrap:anywhere)]:[word-break:break-word] whitespace-pre-wrap",{"text-neutral-inverse":e.appearence==="filled","text-neutral-darker":e.appearence==="outlined"}])},h(e.message),3)):n("",!0)],34)])]),e.appearence==="filled"&&e.error?(a(),u(D,{key:0,name:"ExclamationCircleIcon",solid:"",class:"w-6 h-6 text-error-active flex justify-start shrink-0"})):n("",!0),e.appearence==="filled"&&e.multiSelect&&!e.error?(a(),u(F,{key:1,"model-value":e.selected,color:e.color,class:"shrink-0","onUpdate:modelValue":r[3]||(r[3]=l=>g("row-selection",l))},null,8,["model-value","color"])):n("",!0)],2),e.contextMenuItems&&e.contextMenuItems.length&&b.value?(a(),t("div",{key:1,class:"fixed w-screen h-screen top-0 left-0 z-40 bg-transparent cursor-default",onClick:r[4]||(r[4]=()=>b.value=!1)},[o("div",{ref_key:"contextMenuElement",ref:c,class:"z-50 absolute bg-white rounded-md shadow p-2 min-w-52",style:M({top:I.value+"px",left:W.value+"px"})},[o("div",J,[(a(!0),t(H,null,A(e.contextMenuItems,(l,y)=>{var k;return a(),u(L,V({id:"option-"+y,ref_for:!0,ref:"itemRefs",key:y,class:["self-stretch",{"cursor-pointer":!l.disabled,"cursor-default":l.disabled}],role:"option",tabindex:"-1"},X(G.omit)(l,"onClick"),{disabled:l.disabled,"data-cy":`${(k=l.text)==null?void 0:k.trim().replaceAll(" ","").replaceAll(",","")}-dropdown-item`,onClick:$(Q=>{var C;return!l.disabled&&((C=l.onClick)==null?void 0:C.call(l))},["prevent"])}),null,16,["id","class","disabled","data-cy","onClick"])}),128))])],4)])):n("",!0),e.time||e.loading?(a(),t("div",{key:2,class:s(["text-xs text-neutral-lighter flex justify-end",{"opacity-0 select-none":e.appearence==="filled"&&(e.multiSelect||e.error)}])},[e.loading&&e.appearence==="filled"?(a(),t("div",K,"Invio in corso")):(a(),t("div",O,h(e.time),1))],2)):n("",!0)],4)],2))}});export{ne as default,re as elBubbleChatAppearences,te as elBubbleChatColors};
|
|
2
2
|
//# sourceMappingURL=ElBubbleChat.vue.esm2.js.map
|