@mobilon-dev/chotto 0.3.100 → 0.3.103
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/chotto.css +1 -1
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -3
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +72 -119
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +2 -2
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +109 -88
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +334 -225
- package/dist/components/3_compounds/ChatInput/icons/ArrowIcon.vue.js +40 -0
- package/dist/hooks/uploadFile/generatePreview.js +19 -18
- package/dist/hooks/useMessageDraft.js +85 -65
- package/dist/index.js +159 -157
- package/dist/locale/en.js +4 -0
- package/dist/locale/ru.js +4 -0
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/components/2_chatinput_elements/FilePreview/stories/FilePreview.stories.d.ts +3 -3
- package/dist/types/components/2_chatinput_elements/FilePreview/styles/types.d.ts +135 -127
- package/dist/types/components/2_chatinput_elements/FileUploader/FileUploader.vue.d.ts +9 -0
- package/dist/types/components/3_compounds/ChatInput/ChatInput.vue.d.ts +14 -3
- package/dist/types/components/3_compounds/ChatInput/icons/ArrowIcon.vue.d.ts +2 -0
- package/dist/types/components/3_compounds/ChatInput/icons/index.d.ts +1 -0
- package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +74 -0
- package/dist/types/hooks/useMessageDraft.d.ts +10 -3
- package/dist/types/locale/en.d.ts +4 -0
- package/dist/types/locale/ru.d.ts +4 -0
- package/package.json +1 -1
package/dist/types/components/2_chatinput_elements/FilePreview/stories/FilePreview.stories.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import FilePreview from '../FilePreview.vue';
|
|
|
3
3
|
declare const meta: Meta<typeof FilePreview>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof FilePreview>;
|
|
6
|
-
export declare const Image: Story;
|
|
7
|
-
export declare const Video: Story;
|
|
8
|
-
export declare const Audio: Story;
|
|
9
6
|
export declare const File: Story;
|
|
10
7
|
export declare const FileLongName: Story;
|
|
8
|
+
export declare const Image: Story;
|
|
9
|
+
export declare const Video: Story;
|
|
10
|
+
export declare const List: Story;
|
|
@@ -2,140 +2,148 @@
|
|
|
2
2
|
* CSS переменные для компонента FilePreview
|
|
3
3
|
*/
|
|
4
4
|
export interface FilePreviewThemeCSSVariables {
|
|
5
|
-
/** Позиционирование
|
|
6
|
-
'--chotto-filepreview-
|
|
7
|
-
/** Отображение
|
|
8
|
-
'--chotto-filepreview-
|
|
9
|
-
/**
|
|
10
|
-
'--chotto-filepreview-
|
|
11
|
-
/**
|
|
12
|
-
'--chotto-filepreview-
|
|
13
|
-
/**
|
|
14
|
-
'--chotto-filepreview-
|
|
15
|
-
/**
|
|
5
|
+
/** Позиционирование чипа файла */
|
|
6
|
+
'--chotto-filepreview-position': string;
|
|
7
|
+
/** Отображение чипа файла */
|
|
8
|
+
'--chotto-filepreview-display': string;
|
|
9
|
+
/** Выравнивание по поперечной оси */
|
|
10
|
+
'--chotto-filepreview-align-items': string;
|
|
11
|
+
/** Выравнивание по главной оси */
|
|
12
|
+
'--chotto-filepreview-justify-content': string;
|
|
13
|
+
/** Промежуток между иконкой и текстом */
|
|
14
|
+
'--chotto-filepreview-gap': string;
|
|
15
|
+
/** Ширина чипа */
|
|
16
|
+
'--chotto-filepreview-width': string;
|
|
17
|
+
/** Высота чипа */
|
|
18
|
+
'--chotto-filepreview-height': string;
|
|
19
|
+
/** Минимальная ширина чипа */
|
|
20
|
+
'--chotto-filepreview-min-width': string;
|
|
21
|
+
/** Максимальная ширина чипа */
|
|
22
|
+
'--chotto-filepreview-max-width': string;
|
|
23
|
+
/** Гибкость чипа */
|
|
24
|
+
'--chotto-filepreview-flex': string;
|
|
25
|
+
/** Внутренние отступы чипа */
|
|
26
|
+
'--chotto-filepreview-padding': string;
|
|
27
|
+
/** Граница чипа */
|
|
28
|
+
'--chotto-filepreview-border': string;
|
|
29
|
+
/** Радиус скругления чипа */
|
|
30
|
+
'--chotto-filepreview-border-radius': string;
|
|
31
|
+
/** Фон чипа */
|
|
32
|
+
'--chotto-filepreview-background': string;
|
|
33
|
+
/** Фон чипа при наведении */
|
|
34
|
+
'--chotto-filepreview-hover-background': string;
|
|
35
|
+
/** Модель размеров чипа */
|
|
36
|
+
'--chotto-filepreview-box-sizing': string;
|
|
37
|
+
/** Сжатие иконки файла */
|
|
38
|
+
'--chotto-filepreview-icon-flex-shrink': string;
|
|
39
|
+
/** Размер иконки файла */
|
|
40
|
+
'--chotto-filepreview-icon-font-size': string;
|
|
41
|
+
/** Цвет иконки файла */
|
|
42
|
+
'--chotto-filepreview-icon-color': string;
|
|
43
|
+
/** Позиционирование миниатюры */
|
|
44
|
+
'--chotto-filepreview-thumb-position': string;
|
|
45
|
+
/** Сжатие миниатюры */
|
|
46
|
+
'--chotto-filepreview-thumb-flex-shrink': string;
|
|
47
|
+
/** Ширина миниатюры */
|
|
48
|
+
'--chotto-filepreview-thumb-width': string;
|
|
49
|
+
/** Высота миниатюры */
|
|
50
|
+
'--chotto-filepreview-thumb-height': string;
|
|
51
|
+
/** Радиус скругления миниатюры */
|
|
52
|
+
'--chotto-filepreview-thumb-border-radius': string;
|
|
53
|
+
/** Переполнение миниатюры */
|
|
54
|
+
'--chotto-filepreview-thumb-overflow': string;
|
|
55
|
+
/** Фон миниатюры */
|
|
56
|
+
'--chotto-filepreview-thumb-background': string;
|
|
57
|
+
/** Ширина медиа миниатюры */
|
|
58
|
+
'--chotto-filepreview-thumb-media-width': string;
|
|
59
|
+
/** Высота медиа миниатюры */
|
|
60
|
+
'--chotto-filepreview-thumb-media-height': string;
|
|
61
|
+
/** Вписывание медиа миниатюры */
|
|
62
|
+
'--chotto-filepreview-thumb-media-object-fit': string;
|
|
63
|
+
/** Отображение медиа миниатюры */
|
|
64
|
+
'--chotto-filepreview-thumb-media-display': string;
|
|
65
|
+
/** События указателя медиа миниатюры */
|
|
66
|
+
'--chotto-filepreview-thumb-media-pointer-events': string;
|
|
67
|
+
/** Позиционирование иконки воспроизведения */
|
|
68
|
+
'--chotto-filepreview-thumb-play-position': string;
|
|
69
|
+
/** Отступ сверху иконки воспроизведения */
|
|
70
|
+
'--chotto-filepreview-thumb-play-top': string;
|
|
71
|
+
/** Отступ слева иконки воспроизведения */
|
|
72
|
+
'--chotto-filepreview-thumb-play-left': string;
|
|
73
|
+
/** Трансформация иконки воспроизведения */
|
|
74
|
+
'--chotto-filepreview-thumb-play-transform': string;
|
|
75
|
+
/** Цвет иконки воспроизведения */
|
|
76
|
+
'--chotto-filepreview-thumb-play-color': string;
|
|
77
|
+
/** Размер шрифта иконки воспроизведения */
|
|
78
|
+
'--chotto-filepreview-thumb-play-font-size': string;
|
|
79
|
+
/** События указателя иконки воспроизведения */
|
|
80
|
+
'--chotto-filepreview-thumb-play-pointer-events': string;
|
|
81
|
+
/** Курсор миниатюры */
|
|
82
|
+
'--chotto-filepreview-thumb-cursor': string;
|
|
83
|
+
/** Отображение медиа в модальном окне */
|
|
84
|
+
'--chotto-filepreview-modal-display': string;
|
|
85
|
+
/** Ширина медиа в модальном окне */
|
|
86
|
+
'--chotto-filepreview-modal-width': string;
|
|
87
|
+
/** Высота медиа в модальном окне */
|
|
16
88
|
'--chotto-filepreview-modal-height': string;
|
|
17
|
-
/**
|
|
89
|
+
/** Вписывание медиа в модальном окне */
|
|
18
90
|
'--chotto-filepreview-modal-object-fit': string;
|
|
19
|
-
/** Радиус
|
|
91
|
+
/** Радиус скругления медиа в модальном окне */
|
|
20
92
|
'--chotto-filepreview-modal-border-radius': string;
|
|
21
|
-
/** Максимальная высота
|
|
93
|
+
/** Максимальная высота медиа в модальном окне */
|
|
22
94
|
'--chotto-filepreview-modal-max-height': string;
|
|
23
|
-
/** Максимальная ширина
|
|
95
|
+
/** Максимальная ширина медиа в модальном окне */
|
|
24
96
|
'--chotto-filepreview-modal-max-width': string;
|
|
25
|
-
/** Отображение
|
|
26
|
-
'--chotto-filepreview-
|
|
27
|
-
/**
|
|
28
|
-
'--chotto-filepreview-
|
|
29
|
-
/**
|
|
30
|
-
'--chotto-filepreview-
|
|
31
|
-
/**
|
|
32
|
-
'--chotto-filepreview-
|
|
33
|
-
/**
|
|
34
|
-
'--chotto-filepreview-shadow-hover-top': string;
|
|
35
|
-
/** Позиция тени слева при наведении */
|
|
36
|
-
'--chotto-filepreview-shadow-hover-left': string;
|
|
37
|
-
/** Трансформация тени при наведении */
|
|
38
|
-
'--chotto-filepreview-shadow-hover-transform': string;
|
|
39
|
-
/** Ширина тени при наведении */
|
|
40
|
-
'--chotto-filepreview-shadow-hover-width': string;
|
|
41
|
-
/** Высота тени при наведении */
|
|
42
|
-
'--chotto-filepreview-shadow-hover-height': string;
|
|
43
|
-
/** Фон тени при наведении */
|
|
44
|
-
'--chotto-filepreview-shadow-hover-background': string;
|
|
45
|
-
/** Прозрачность тени при наведении */
|
|
46
|
-
'--chotto-filepreview-shadow-hover-opacity': string;
|
|
47
|
-
/** Позиция span тени сверху при наведении */
|
|
48
|
-
'--chotto-filepreview-shadow-hover-span-top': string;
|
|
49
|
-
/** Позиция span тени слева при наведении */
|
|
50
|
-
'--chotto-filepreview-shadow-hover-span-left': string;
|
|
51
|
-
/** Трансформация span тени при наведении */
|
|
52
|
-
'--chotto-filepreview-shadow-hover-span-transform': string;
|
|
53
|
-
/** Позиционирование span тени при наведении */
|
|
54
|
-
'--chotto-filepreview-shadow-hover-span-position': string;
|
|
55
|
-
/** Цвет span тени при наведении */
|
|
56
|
-
'--chotto-filepreview-shadow-hover-span-color': string;
|
|
57
|
-
/** Граница элемента управления аудио */
|
|
58
|
-
'--chotto-filepreview-audio-control-border': string;
|
|
59
|
-
/** Курсор элемента управления аудио */
|
|
60
|
-
'--chotto-filepreview-audio-control-cursor': string;
|
|
61
|
-
/** Позиционирование элемента управления аудио */
|
|
62
|
-
'--chotto-filepreview-audio-control-position': string;
|
|
63
|
-
/** Grid row элемента управления аудио */
|
|
64
|
-
'--chotto-filepreview-audio-control-grid-row': string;
|
|
65
|
-
/** Ширина элемента управления аудио */
|
|
66
|
-
'--chotto-filepreview-audio-control-width': string;
|
|
67
|
-
/** Высота элемента управления аудио */
|
|
68
|
-
'--chotto-filepreview-audio-control-height': string;
|
|
69
|
-
/** Радиус границы элемента управления аудио */
|
|
70
|
-
'--chotto-filepreview-audio-control-border-radius': string;
|
|
71
|
-
/** Цвет фона элемента управления аудио */
|
|
72
|
-
'--chotto-filepreview-audio-control-background-color': string;
|
|
73
|
-
/** Отображение span элемента управления аудио */
|
|
74
|
-
'--chotto-filepreview-audio-control-span-display': string;
|
|
75
|
-
/** Позиционирование span элемента управления аудио */
|
|
76
|
-
'--chotto-filepreview-audio-control-span-position': string;
|
|
77
|
-
/** Позиция span элемента управления аудио сверху */
|
|
78
|
-
'--chotto-filepreview-audio-control-span-top': string;
|
|
79
|
-
/** Позиция span элемента управления аудио слева */
|
|
80
|
-
'--chotto-filepreview-audio-control-span-left': string;
|
|
81
|
-
/** Трансформация span элемента управления аудио */
|
|
82
|
-
'--chotto-filepreview-audio-control-span-transform': string;
|
|
83
|
-
/** Размер шрифта span элемента управления аудио */
|
|
84
|
-
'--chotto-filepreview-audio-control-span-font-size': string;
|
|
85
|
-
/** Цвет span элемента управления аудио */
|
|
86
|
-
'--chotto-filepreview-audio-control-span-color': string;
|
|
87
|
-
/** Максимальная ширина блока */
|
|
88
|
-
'--chotto-filepreview-block-max-width': string;
|
|
89
|
-
/** Максимальная высота блока */
|
|
90
|
-
'--chotto-filepreview-block-max-height': string;
|
|
91
|
-
/** Минимальная ширина блока */
|
|
92
|
-
'--chotto-filepreview-block-min-width': string;
|
|
93
|
-
/** Минимальная высота блока */
|
|
94
|
-
'--chotto-filepreview-block-min-height': string;
|
|
95
|
-
/** Отступы блока */
|
|
96
|
-
'--chotto-filepreview-block-margin': string;
|
|
97
|
-
/** Переполнение блока */
|
|
98
|
-
'--chotto-filepreview-block-overflow': string;
|
|
99
|
-
/** Радиус границы блока */
|
|
100
|
-
'--chotto-filepreview-block-border-radius': string;
|
|
101
|
-
/** Отображение блока */
|
|
102
|
-
'--chotto-filepreview-block-display': string;
|
|
103
|
-
/** Выравнивание по поперечной оси блока */
|
|
104
|
-
'--chotto-filepreview-block-align-items': string;
|
|
105
|
-
/** Выравнивание по главной оси блока */
|
|
106
|
-
'--chotto-filepreview-block-justify-content': string;
|
|
107
|
-
/** Отступ слева информации */
|
|
108
|
-
'--chotto-filepreview-information-margin-left': string;
|
|
109
|
-
/** Отображение информации */
|
|
110
|
-
'--chotto-filepreview-information-display': string;
|
|
111
|
-
/** Отображение span информации */
|
|
112
|
-
'--chotto-filepreview-information-span-display': string;
|
|
113
|
-
/** Размер шрифта span информации */
|
|
114
|
-
'--chotto-filepreview-information-span-font-size': string;
|
|
115
|
-
/** Выравнивание по поперечной оси имени */
|
|
116
|
-
'--chotto-filepreview-name-align-items': string;
|
|
117
|
-
/** Переполнение имени */
|
|
97
|
+
/** Отображение блока информации */
|
|
98
|
+
'--chotto-filepreview-info-display': string;
|
|
99
|
+
/** Направление блока информации */
|
|
100
|
+
'--chotto-filepreview-info-flex-direction': string;
|
|
101
|
+
/** Минимальная ширина блока информации */
|
|
102
|
+
'--chotto-filepreview-info-min-width': string;
|
|
103
|
+
/** Промежуток в блоке информации */
|
|
104
|
+
'--chotto-filepreview-info-gap': string;
|
|
105
|
+
/** Переполнение имени файла */
|
|
118
106
|
'--chotto-filepreview-name-overflow': string;
|
|
119
|
-
/** Перенос строк имени */
|
|
107
|
+
/** Перенос строк имени файла */
|
|
120
108
|
'--chotto-filepreview-name-white-space': string;
|
|
121
|
-
/**
|
|
122
|
-
'--chotto-filepreview-name-word-break': string;
|
|
123
|
-
/** Обрезка текста имени */
|
|
109
|
+
/** Обрезка имени файла */
|
|
124
110
|
'--chotto-filepreview-name-text-overflow': string;
|
|
125
|
-
/**
|
|
126
|
-
'--chotto-filepreview-
|
|
127
|
-
/**
|
|
128
|
-
'--chotto-filepreview-
|
|
129
|
-
/**
|
|
111
|
+
/** Размер шрифта имени файла */
|
|
112
|
+
'--chotto-filepreview-name-font-size': string;
|
|
113
|
+
/** Высота строки имени файла */
|
|
114
|
+
'--chotto-filepreview-name-line-height': string;
|
|
115
|
+
/** Цвет имени файла */
|
|
116
|
+
'--chotto-filepreview-name-color': string;
|
|
117
|
+
/** Размер шрифта размера файла */
|
|
118
|
+
'--chotto-filepreview-size-font-size': string;
|
|
119
|
+
/** Высота строки размера файла */
|
|
120
|
+
'--chotto-filepreview-size-line-height': string;
|
|
121
|
+
/** Цвет размера файла */
|
|
122
|
+
'--chotto-filepreview-size-color': string;
|
|
123
|
+
/** Позиционирование кнопки удаления */
|
|
124
|
+
'--chotto-filepreview-reset-position': string;
|
|
125
|
+
/** Отступ сверху кнопки удаления */
|
|
126
|
+
'--chotto-filepreview-reset-top': string;
|
|
127
|
+
/** Отступ справа кнопки удаления */
|
|
128
|
+
'--chotto-filepreview-reset-right': string;
|
|
129
|
+
/** Сжатие кнопки удаления */
|
|
130
|
+
'--chotto-filepreview-reset-flex-shrink': string;
|
|
131
|
+
/** Прозрачность кнопки удаления */
|
|
132
|
+
'--chotto-filepreview-reset-opacity': string;
|
|
133
|
+
/** Прозрачность кнопки удаления при наведении */
|
|
134
|
+
'--chotto-filepreview-reset-hover-opacity': string;
|
|
135
|
+
/** Граница кнопки удаления */
|
|
136
|
+
'--chotto-filepreview-reset-border': string;
|
|
137
|
+
/** Фон кнопки удаления */
|
|
138
|
+
'--chotto-filepreview-reset-background': string;
|
|
139
|
+
/** Отступы кнопки удаления */
|
|
140
|
+
'--chotto-filepreview-reset-padding': string;
|
|
141
|
+
/** Курсор кнопки удаления */
|
|
142
|
+
'--chotto-filepreview-reset-cursor': string;
|
|
143
|
+
/** Цвет кнопки удаления */
|
|
144
|
+
'--chotto-filepreview-reset-color': string;
|
|
145
|
+
/** Размер шрифта кнопки удаления */
|
|
130
146
|
'--chotto-filepreview-reset-font-size': string;
|
|
131
|
-
/**
|
|
132
|
-
'--chotto-filepreview-reset-
|
|
133
|
-
/** Курсор кнопки сброса при наведении */
|
|
134
|
-
'--chotto-filepreview-reset-hover-cursor': string;
|
|
135
|
-
/** Отображение блока управления */
|
|
136
|
-
'--chotto-filepreview-control-block-display': string;
|
|
137
|
-
/** Выравнивание по главной оси блока управления */
|
|
138
|
-
'--chotto-filepreview-control-block-justify-content': string;
|
|
139
|
-
/** Гибкость блока управления */
|
|
140
|
-
'--chotto-filepreview-control-block-flex': string;
|
|
147
|
+
/** Высота строки кнопки удаления */
|
|
148
|
+
'--chotto-filepreview-reset-line-height': string;
|
|
141
149
|
}
|
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7
7
|
type: StringConstructor;
|
|
8
8
|
default: string;
|
|
9
9
|
};
|
|
10
|
+
maxAttachedFiles: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
10
14
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
15
|
fileUploaded: (...args: any[]) => void;
|
|
12
16
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -18,10 +22,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
18
22
|
type: StringConstructor;
|
|
19
23
|
default: string;
|
|
20
24
|
};
|
|
25
|
+
maxAttachedFiles: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
21
29
|
}>> & Readonly<{
|
|
22
30
|
onFileUploaded?: ((...args: any[]) => any) | undefined;
|
|
23
31
|
}>, {
|
|
24
32
|
state: string;
|
|
25
33
|
filebumpUrl: string;
|
|
34
|
+
maxAttachedFiles: number;
|
|
26
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
27
36
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_16: {}, __VLS_29: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
'inline-buttons'?: (props: typeof
|
|
3
|
+
'inline-buttons'?: (props: typeof __VLS_16) => any;
|
|
4
4
|
} & {
|
|
5
|
-
buttons?: (props: typeof
|
|
5
|
+
buttons?: (props: typeof __VLS_29) => any;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
8
|
state: {
|
|
@@ -29,6 +29,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
29
29
|
required: false;
|
|
30
30
|
default: null;
|
|
31
31
|
};
|
|
32
|
+
maxAttachedFiles: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
required: false;
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
32
37
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
38
|
typing: (...args: any[]) => void;
|
|
34
39
|
send: (...args: any[]) => void;
|
|
@@ -57,12 +62,18 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
57
62
|
required: false;
|
|
58
63
|
default: null;
|
|
59
64
|
};
|
|
65
|
+
maxAttachedFiles: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
required: false;
|
|
68
|
+
default: number;
|
|
69
|
+
};
|
|
60
70
|
}>> & Readonly<{
|
|
61
71
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
62
72
|
onSend?: ((...args: any[]) => any) | undefined;
|
|
63
73
|
}>, {
|
|
64
74
|
selectedChannel: Record<string, any>;
|
|
65
75
|
state: string;
|
|
76
|
+
maxAttachedFiles: number;
|
|
66
77
|
focusOnInputArea: boolean;
|
|
67
78
|
disabledPlaceholder: string;
|
|
68
79
|
inputButtonColor: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -3,3 +3,4 @@ export { default as TelegramSendIcon } from './TelegramSendIcon.vue';
|
|
|
3
3
|
export { default as MaxSendIcon } from './MaxSendIcon.vue';
|
|
4
4
|
export { default as SMSSendIcon } from './SMSSendIcon.vue';
|
|
5
5
|
export { default as SendIcon } from './SendIcon.vue';
|
|
6
|
+
export { default as ArrowIcon } from './ArrowIcon.vue';
|
|
@@ -34,6 +34,80 @@ export interface ChatInputThemeCSSVariables {
|
|
|
34
34
|
'--chotto-chatinput-file-line-grid-row': string;
|
|
35
35
|
/** Отображение строки файла */
|
|
36
36
|
'--chotto-chatinput-file-line-display': string;
|
|
37
|
+
/** Выравнивание элементов строки файла */
|
|
38
|
+
'--chotto-chatinput-file-line-align-items': string;
|
|
39
|
+
/** Промежуток в строке файла */
|
|
40
|
+
'--chotto-chatinput-file-line-gap': string;
|
|
41
|
+
/** Минимальная ширина строки файла */
|
|
42
|
+
'--chotto-chatinput-file-line-min-width': string;
|
|
43
|
+
/** Ширина строки файла */
|
|
44
|
+
'--chotto-chatinput-file-line-width': string;
|
|
45
|
+
/** Отступ снизу строки файла */
|
|
46
|
+
'--chotto-chatinput-file-line-margin-bottom': string;
|
|
47
|
+
/** Отступ слева строки файла */
|
|
48
|
+
'--chotto-chatinput-file-line-padding-left': string;
|
|
49
|
+
/** Отступ справа строки файла */
|
|
50
|
+
'--chotto-chatinput-file-line-padding-right': string;
|
|
51
|
+
/** Переполнение строки файла */
|
|
52
|
+
'--chotto-chatinput-file-line-overflow': string;
|
|
53
|
+
/** Отображение видимой строки файла */
|
|
54
|
+
'--chotto-chatinput-file-line-visible-display': string;
|
|
55
|
+
/** Отображение счётчика файлов */
|
|
56
|
+
'--chotto-chatinput-file-counter-display': string;
|
|
57
|
+
/** Направление счётчика файлов */
|
|
58
|
+
'--chotto-chatinput-file-counter-flex-direction': string;
|
|
59
|
+
/** Сжатие счётчика файлов */
|
|
60
|
+
'--chotto-chatinput-file-counter-flex-shrink': string;
|
|
61
|
+
/** Размер шрифта счётчика файлов */
|
|
62
|
+
'--chotto-chatinput-file-counter-font-size': string;
|
|
63
|
+
/** Высота строки счётчика файлов */
|
|
64
|
+
'--chotto-chatinput-file-counter-line-height': string;
|
|
65
|
+
/** Перенос строк счётчика файлов */
|
|
66
|
+
'--chotto-chatinput-file-counter-white-space': string;
|
|
67
|
+
/** Цвет счётчика файлов */
|
|
68
|
+
'--chotto-chatinput-file-counter-color': string;
|
|
69
|
+
/** Отображение списка чипов */
|
|
70
|
+
'--chotto-chatinput-file-chips-display': string;
|
|
71
|
+
/** Гибкость списка чипов */
|
|
72
|
+
'--chotto-chatinput-file-chips-flex': string;
|
|
73
|
+
/** Минимальная ширина списка чипов */
|
|
74
|
+
'--chotto-chatinput-file-chips-min-width': string;
|
|
75
|
+
/** Промежуток между чипами */
|
|
76
|
+
'--chotto-chatinput-file-chips-gap': string;
|
|
77
|
+
/** Горизонтальное переполнение списка чипов */
|
|
78
|
+
'--chotto-chatinput-file-chips-overflow-x': string;
|
|
79
|
+
/** Позиционирование обёртки чипов */
|
|
80
|
+
'--chotto-chatinput-file-chips-wrap-position': string;
|
|
81
|
+
/** Ширина полосы прокрутки чипов */
|
|
82
|
+
'--chotto-chatinput-file-chips-scrollbar-width': string;
|
|
83
|
+
/** Отображение webkit-полосы прокрутки чипов */
|
|
84
|
+
'--chotto-chatinput-file-chips-webkit-scrollbar-display': string;
|
|
85
|
+
/** Позиционирование кнопки прокрутки файлов */
|
|
86
|
+
'--chotto-chatinput-file-scroll-position': string;
|
|
87
|
+
/** Смещение кнопки прокрутки файлов сверху */
|
|
88
|
+
'--chotto-chatinput-file-scroll-top': string;
|
|
89
|
+
/** Слой кнопки прокрутки файлов */
|
|
90
|
+
'--chotto-chatinput-file-scroll-z-index': string;
|
|
91
|
+
/** Отображение кнопки прокрутки файлов */
|
|
92
|
+
'--chotto-chatinput-file-scroll-display': string;
|
|
93
|
+
/** Отступы кнопки прокрутки файлов */
|
|
94
|
+
'--chotto-chatinput-file-scroll-padding': string;
|
|
95
|
+
/** Граница кнопки прокрутки файлов */
|
|
96
|
+
'--chotto-chatinput-file-scroll-border': string;
|
|
97
|
+
/** Фон кнопки прокрутки файлов */
|
|
98
|
+
'--chotto-chatinput-file-scroll-background': string;
|
|
99
|
+
/** Курсор кнопки прокрутки файлов */
|
|
100
|
+
'--chotto-chatinput-file-scroll-cursor': string;
|
|
101
|
+
/** Высота строки кнопки прокрутки файлов */
|
|
102
|
+
'--chotto-chatinput-file-scroll-line-height': string;
|
|
103
|
+
/** Трансформация кнопки прокрутки файлов */
|
|
104
|
+
'--chotto-chatinput-file-scroll-transform': string;
|
|
105
|
+
/** Смещение левой кнопки прокрутки файлов */
|
|
106
|
+
'--chotto-chatinput-file-scroll-left': string;
|
|
107
|
+
/** Трансформация левой кнопки прокрутки файлов */
|
|
108
|
+
'--chotto-chatinput-file-scroll-left-transform': string;
|
|
109
|
+
/** Смещение правой кнопки прокрутки файлов */
|
|
110
|
+
'--chotto-chatinput-file-scroll-right': string;
|
|
37
111
|
/** Отображение третьей строки */
|
|
38
112
|
'--chotto-chatinput-third-line-display': string;
|
|
39
113
|
/** Строка сетки третьей строки */
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Edit, IFilePreview, Reply } from '@/types';
|
|
2
|
+
/** Максимум файлов, которые можно прикрепить к одному черновику */
|
|
3
|
+
export declare const MAX_ATTACHED_FILES = 5;
|
|
2
4
|
/**
|
|
3
5
|
* Структура сообщения с черновиком текста, файлами и метаданными
|
|
4
6
|
* @interface MessageDraft
|
|
5
7
|
* @property {string} id - Уникальный идентификатор сообщения (обычно chatAppId)
|
|
6
8
|
* @property {string} text - Текст сообщения
|
|
7
|
-
* @property {UploadedFile} [file] -
|
|
9
|
+
* @property {UploadedFile} [file] - Первый прикрепленный файл (совместимость)
|
|
10
|
+
* @property {UploadedFile[]} [files] - Прикрепленные файлы (до MAX_ATTACHED_FILES)
|
|
8
11
|
* @property {Reply} [reply] - Ответ на другое сообщение
|
|
9
12
|
* @property {Edit} [edit] - Редактируемое сообщение
|
|
10
13
|
* @property {boolean} forceSend - Флаг принудительной отправки сообщения
|
|
@@ -21,6 +24,7 @@ export interface MessageDraft {
|
|
|
21
24
|
id: string;
|
|
22
25
|
text: string;
|
|
23
26
|
file?: UploadedFile;
|
|
27
|
+
files?: UploadedFile[];
|
|
24
28
|
reply?: Reply;
|
|
25
29
|
edit?: Edit;
|
|
26
30
|
forceSend: boolean;
|
|
@@ -38,13 +42,15 @@ export interface MessageDraft {
|
|
|
38
42
|
* @property {string} [type] - MIME-тип файла
|
|
39
43
|
* @property {IFilePreview} [preview] - Превью для строки файла в ChatInput
|
|
40
44
|
*/
|
|
41
|
-
interface UploadedFile {
|
|
45
|
+
export interface UploadedFile {
|
|
42
46
|
url: string;
|
|
43
47
|
name?: string;
|
|
44
48
|
size?: number;
|
|
45
49
|
type?: string;
|
|
46
50
|
preview?: IFilePreview;
|
|
47
51
|
}
|
|
52
|
+
/** Файлы черновика с учётом старого поля `file` */
|
|
53
|
+
export declare function getDraftFiles(draft: MessageDraft | undefined): UploadedFile[];
|
|
48
54
|
export declare function getChatDraft(chatAppId: string, chatId: string | number | null | undefined): MessageDraft | undefined;
|
|
49
55
|
export declare function commitChatDraftToList(draftId: string | undefined): void;
|
|
50
56
|
/**
|
|
@@ -115,6 +121,8 @@ export declare const useMessageDraft: (outId: string) => {
|
|
|
115
121
|
getMessage: () => MessageDraft;
|
|
116
122
|
resetMessage: () => void;
|
|
117
123
|
setMessageFile: (file: UploadedFile) => void;
|
|
124
|
+
addMessageFiles: (files: UploadedFile[], max?: number) => void;
|
|
125
|
+
removeMessageFile: (index: number) => void;
|
|
118
126
|
resetMessageFile: () => void;
|
|
119
127
|
setMessageText: (text: string) => void;
|
|
120
128
|
setReply: (reply: Reply) => void;
|
|
@@ -124,4 +132,3 @@ export declare const useMessageDraft: (outId: string) => {
|
|
|
124
132
|
setForceSendMessage: (val: boolean) => void;
|
|
125
133
|
setRecordingMessage: (val: boolean) => void;
|
|
126
134
|
};
|
|
127
|
-
export {};
|
|
@@ -9,6 +9,10 @@ export const en: {
|
|
|
9
9
|
'component.ChatInput.WhatsappInputPlaceholder': string;
|
|
10
10
|
'component.ChatInput.SmsInputPlaceholder': string;
|
|
11
11
|
'component.ChatInput.MaxInputPlaceholder': string;
|
|
12
|
+
'component.ChatInput.FilesSelected': string;
|
|
13
|
+
'component.ChatInput.FilesSelectedCount': string;
|
|
14
|
+
'component.ChatInput.FilesScrollLeft': string;
|
|
15
|
+
'component.ChatInput.FilesScrollRight': string;
|
|
12
16
|
'component.FeedFoundObjects.results': string;
|
|
13
17
|
'component.FeedFoundObjects.notFound': string;
|
|
14
18
|
'component.FeedFoundObjects.notSearched': string;
|
|
@@ -9,6 +9,10 @@ export const ru: {
|
|
|
9
9
|
'component.ChatInput.TelegramInputPlaceholder': string;
|
|
10
10
|
'component.ChatInput.SmsInputPlaceholder': string;
|
|
11
11
|
'component.ChatInput.MaxInputPlaceholder': string;
|
|
12
|
+
'component.ChatInput.FilesSelected': string;
|
|
13
|
+
'component.ChatInput.FilesSelectedCount': string;
|
|
14
|
+
'component.ChatInput.FilesScrollLeft': string;
|
|
15
|
+
'component.ChatInput.FilesScrollRight': string;
|
|
12
16
|
'component.FeedFoundObjects.results': string;
|
|
13
17
|
'component.FeedFoundObjects.notFound': string;
|
|
14
18
|
'component.FeedFoundObjects.notSearched': string;
|