@rt-tools/ui-kit-v2 0.36.0 → 0.37.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/fesm2022/rt-tools-ui-kit-v2-ai-prompt-input.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-ai-prompt-input.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +147 -21
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +23 -2
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs +31 -6
- package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +29 -4
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +23 -2
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/ai-prompt-input/rt-ai-prompt-input.component.scss +2 -1
- package/src/lib/components/detail-list/rt-detail-row.component.scss +2 -0
- package/src/lib/components/tabs/rt-tabs.component.scss +19 -2
- package/src/lib/components/thread-list/rt-thread-list-messenger.scss +45 -0
- package/src/lib/components/toggle-button-group/rt-toggle-button-group.component.scss +9 -0
- package/src/lib/components/workspace/rt-workspace.component.scss +40 -0
- package/src/lib/components/workspace-details/rt-workspace-details.component.scss +26 -1
- package/src/rich-editor/lib/components/chat/rt-chat-messenger.scss +146 -0
- package/src/rich-editor/lib/components/message-composer/rt-message-composer.component.scss +7 -2
- package/types/rt-tools-ui-kit-v2-ai-prompt-input.d.ts +14 -1
- package/types/rt-tools-ui-kit-v2-rich-editor.d.ts +40 -21
- package/types/rt-tools-ui-kit-v2-tabs.d.ts +7 -0
- package/types/rt-tools-ui-kit-v2-thread-list.d.ts +7 -0
- package/types/rt-tools-ui-kit-v2-workspace-details.d.ts +14 -0
- package/types/rt-tools-ui-kit-v2-workspace.d.ts +7 -0
|
@@ -357,6 +357,27 @@ export declare class RtChatMessageActionsDirective {
|
|
|
357
357
|
static ɵfac: i0.ɵɵFactoryDeclaration<RtChatMessageActionsDirective, never>;
|
|
358
358
|
static ɵdir: i0.ɵɵDirectiveDeclaration<RtChatMessageActionsDirective, "ng-template[rtChatMessageActions]", never, {}, {}, never, never, true, never>;
|
|
359
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* Захватывает `<ng-template rtChatMessageButtons let-message>` — кнопки у реплики перед «…»-меню.
|
|
362
|
+
* Частое действие, например «ответить», стоит кнопкой и не прячется в меню. В виде мессенджера
|
|
363
|
+
* кнопки и меню стоят одной панелью у пузыря.
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* ```html
|
|
367
|
+
* <rt-chat messenger [messages]="messages()">
|
|
368
|
+
* <ng-template rtChatMessageButtons let-message>
|
|
369
|
+
* <rt-icon-button icon="reply" variant="ghost" size="sm" ariaLabel="Ответить" (clicked)="reply(message)" />
|
|
370
|
+
* </ng-template>
|
|
371
|
+
* </rt-chat>
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
export declare class RtChatMessageButtonsDirective {
|
|
375
|
+
readonly template: TemplateRef<IRtChatMessageActionsContext>;
|
|
376
|
+
/** Type-guard: сужает контекст шаблона до реплики при проверке шаблонов. */
|
|
377
|
+
static ngTemplateContextGuard(_directive: RtChatMessageButtonsDirective, context: unknown): context is IRtChatMessageActionsContext;
|
|
378
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RtChatMessageButtonsDirective, never>;
|
|
379
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RtChatMessageButtonsDirective, "ng-template[rtChatMessageButtons]", never, {}, {}, never, never, true, never>;
|
|
380
|
+
}
|
|
360
381
|
/**
|
|
361
382
|
* Общий презентационный чат: тред сообщений + композер. История приходит готовым массивом
|
|
362
383
|
* `IRtChat.Message[]`, отправка, обновление, скачивание и набор текста уходят наружу выходами;
|
|
@@ -396,36 +417,24 @@ export declare class RtChatComponent {
|
|
|
396
417
|
}>;
|
|
397
418
|
/** Композер заблокирован при загрузке/рефреше треда или отправке in-flight. */
|
|
398
419
|
protected readonly composerDisabled: Signal<boolean>;
|
|
399
|
-
/**
|
|
400
|
-
* Можно ли отправить: композер активен и есть содержимое — непустой текст или
|
|
401
|
-
* (при включённых вложениях) хотя бы один файл. Сообщение само по себе не
|
|
402
|
-
* бывает «невалидным» — пустоту гасим дизейблом кнопки, а не подсветкой поля.
|
|
403
|
-
*/
|
|
420
|
+
/** Можно ли отправить: пустоту гасит выключенная кнопка, поле не подсвечивается ошибкой */
|
|
404
421
|
protected readonly canSend: Signal<boolean>;
|
|
422
|
+
/** Подписи дней над первым сообщением каждого дня — только в виде мессенджера */
|
|
423
|
+
protected readonly dayLabels: Signal<ReadonlyMap<number | string, string>>;
|
|
405
424
|
/** Показывать ли шапку: только когда включена хотя бы одна иконка. */
|
|
406
425
|
protected readonly showHeader: Signal<boolean>;
|
|
407
426
|
/** Подпись кнопки fullscreen: тернарник в шаблоне переводом не покрыть. */
|
|
408
427
|
protected readonly expandLabel: Signal<string>;
|
|
409
428
|
/** Выбранные, но ещё не отправленные файлы — карточки над полем ввода. */
|
|
410
429
|
protected readonly selectedFiles: Signal<File[]>;
|
|
411
|
-
/**
|
|
412
|
-
* Drop-зона активна только когда вложения включены, ответ доступен и композер
|
|
413
|
-
* не занят (загрузка/рефреш/отправка). Иначе обёртка `rt-file-drop` просто
|
|
414
|
-
* пропускает контент без оверлея.
|
|
415
|
-
*/
|
|
430
|
+
/** Drop-зона активна при включённых вложениях, доступном ответе и свободном композере */
|
|
416
431
|
protected readonly dropDisabled: Signal<boolean>;
|
|
417
|
-
/**
|
|
418
|
-
* Файл из drag-n-drop для rich-композера: каждый drop кладёт новый `File`,
|
|
419
|
-
* пробрасывается в `rt-message-composer` через input. Классический композер
|
|
420
|
-
* принимает drop напрямую в свой `replyForm`.
|
|
421
|
-
*/
|
|
432
|
+
/** Файлы drop для rich-композера; классический композер принимает drop в свой `replyForm` */
|
|
422
433
|
protected readonly droppedFiles: WritableSignal<File[] | null>;
|
|
423
|
-
/**
|
|
424
|
-
* Шаблон действий у реплики: `<ng-template rtChatMessageActions let-message>`.
|
|
425
|
-
*
|
|
426
|
-
* Не объявлен — разметка реплики прежняя, и лишней кнопки у неё не появляется.
|
|
427
|
-
*/
|
|
434
|
+
/** Шаблон действий у реплики `<ng-template rtChatMessageActions>`; не объявлен — кнопки нет */
|
|
428
435
|
protected readonly messageActions: Signal<RtChatMessageActionsDirective | undefined>;
|
|
436
|
+
/** Кнопки у реплики перед меню `<ng-template rtChatMessageButtons>`; не объявлены — кнопок нет */
|
|
437
|
+
protected readonly messageButtons: Signal<RtChatMessageButtonsDirective | undefined>;
|
|
429
438
|
/** История сообщений (consumer уже смаппил из доменной модели). */
|
|
430
439
|
readonly messages: InputSignal<readonly IRtChat.Message[]>;
|
|
431
440
|
/** Первичная загрузка — скелетоны вместо треда. */
|
|
@@ -480,6 +489,11 @@ export declare class RtChatComponent {
|
|
|
480
489
|
*/
|
|
481
490
|
readonly fill: InputSignalWithTransform<boolean, BooleanInput>;
|
|
482
491
|
/** Показать иконку refresh в шапке. */
|
|
492
|
+
/**
|
|
493
|
+
* Вид мессенджера: без подписи автора, свой пузырь цвета действия, время без даты, над
|
|
494
|
+
* сообщениями дня — его подпись, поле ответа в одну строку с рядом кнопок под ним.
|
|
495
|
+
*/
|
|
496
|
+
readonly messenger: InputSignalWithTransform<boolean, BooleanInput>;
|
|
483
497
|
readonly showRefresh: InputSignalWithTransform<boolean, BooleanInput>;
|
|
484
498
|
/** Показать иконку expand (fullscreen) в шапке. */
|
|
485
499
|
readonly showExpand: InputSignalWithTransform<boolean, BooleanInput>;
|
|
@@ -617,6 +631,11 @@ export declare class RtChatComponent {
|
|
|
617
631
|
"required": false;
|
|
618
632
|
"isSignal": true;
|
|
619
633
|
};
|
|
634
|
+
"messenger": {
|
|
635
|
+
"alias": "messenger";
|
|
636
|
+
"required": false;
|
|
637
|
+
"isSignal": true;
|
|
638
|
+
};
|
|
620
639
|
"showRefresh": {
|
|
621
640
|
"alias": "showRefresh";
|
|
622
641
|
"required": false;
|
|
@@ -646,7 +665,7 @@ export declare class RtChatComponent {
|
|
|
646
665
|
"expandedChange": "expandedChange";
|
|
647
666
|
"deleteMessage": "deleteMessage";
|
|
648
667
|
"retryMessage": "retryMessage";
|
|
649
|
-
}, ["messageActions"], ["[rtChatHeaderActions]", "[rtChatFooter]"], true, never>;
|
|
668
|
+
}, ["messageActions", "messageButtons"], ["[rtChatHeaderActions]", "[rtChatComposerTools]", "[rtChatFooter]"], true, never>;
|
|
650
669
|
}
|
|
651
670
|
/**
|
|
652
671
|
* Есть ли у реплики хотя бы одно доступное действие потребителя.
|
|
@@ -454,6 +454,8 @@ export declare class RtTabsComponent {
|
|
|
454
454
|
readonly direction: InputSignal<IRtTabs.Direction>;
|
|
455
455
|
/** Растягивать вкладки на всю ширину полосы. */
|
|
456
456
|
readonly stretch: InputSignalWithTransform<boolean, BooleanInput>;
|
|
457
|
+
/** Плотные вкладки: отступ 8 по бокам, чтобы в узкую панель влезло больше вкладок */
|
|
458
|
+
readonly dense: InputSignalWithTransform<boolean, BooleanInput>;
|
|
457
459
|
/** Скроллить область контента при переполнении. */
|
|
458
460
|
readonly contentScrollable: InputSignalWithTransform<boolean, BooleanInput>;
|
|
459
461
|
/**
|
|
@@ -519,6 +521,11 @@ export declare class RtTabsComponent {
|
|
|
519
521
|
"required": false;
|
|
520
522
|
"isSignal": true;
|
|
521
523
|
};
|
|
524
|
+
"dense": {
|
|
525
|
+
"alias": "dense";
|
|
526
|
+
"required": false;
|
|
527
|
+
"isSignal": true;
|
|
528
|
+
};
|
|
522
529
|
"contentScrollable": {
|
|
523
530
|
"alias": "contentScrollable";
|
|
524
531
|
"required": false;
|
|
@@ -130,6 +130,8 @@ export declare class RtThreadListComponent<TRow extends IRtThreadList.Row> imple
|
|
|
130
130
|
readonly fetching: InputSignalWithTransform<boolean, boolean | string>;
|
|
131
131
|
readonly hasMore: InputSignalWithTransform<boolean, boolean | string>;
|
|
132
132
|
readonly filtersActive: InputSignalWithTransform<boolean, boolean | string>;
|
|
133
|
+
/** Вид мессенджера: колонка с полями, строки карточками со скруглением, без левой полосы */
|
|
134
|
+
readonly messenger: InputSignalWithTransform<boolean, boolean | string>;
|
|
133
135
|
readonly selectRow: OutputEmitterRef<IRtThreadList.TRowId>;
|
|
134
136
|
readonly openInNewTab: OutputEmitterRef<IRtThreadList.TRowId>;
|
|
135
137
|
readonly searchChange: OutputEmitterRef<string>;
|
|
@@ -184,6 +186,11 @@ export declare class RtThreadListComponent<TRow extends IRtThreadList.Row> imple
|
|
|
184
186
|
"required": false;
|
|
185
187
|
"isSignal": true;
|
|
186
188
|
};
|
|
189
|
+
"messenger": {
|
|
190
|
+
"alias": "messenger";
|
|
191
|
+
"required": false;
|
|
192
|
+
"isSignal": true;
|
|
193
|
+
};
|
|
187
194
|
}, {
|
|
188
195
|
"selectRow": "selectRow";
|
|
189
196
|
"openInNewTab": "openInNewTab";
|
|
@@ -5,8 +5,15 @@ import { FormControl, FormGroup } from "@angular/forms";
|
|
|
5
5
|
import { IButton, TRtKitLabelMap } from "@rt-tools/ui-kit-v2/core";
|
|
6
6
|
import { IRtConfirmPopover } from "@rt-tools/ui-kit-v2/confirm-popover";
|
|
7
7
|
import { IRtSelect } from "@rt-tools/ui-kit-v2/select";
|
|
8
|
+
import { IRtServiceLogo } from "@rt-tools/ui-kit-v2/service-logo";
|
|
8
9
|
import { IRtTimeline } from "@rt-tools/ui-kit-v2/timeline";
|
|
9
10
|
export declare namespace IRtWorkspaceDetails {
|
|
11
|
+
/** Верх сведений о человеке: знак канала, имя и контакт по центру над строками */
|
|
12
|
+
interface Profile {
|
|
13
|
+
sign: IRtServiceLogo.Item | null;
|
|
14
|
+
name: string;
|
|
15
|
+
contact: string;
|
|
16
|
+
}
|
|
10
17
|
interface Row {
|
|
11
18
|
label: string;
|
|
12
19
|
value: string;
|
|
@@ -95,6 +102,8 @@ export declare class RtWorkspaceDetailsComponent {
|
|
|
95
102
|
readonly loading: InputSignalWithTransform<boolean, BooleanInput>;
|
|
96
103
|
readonly busy: InputSignalWithTransform<boolean, BooleanInput>;
|
|
97
104
|
readonly rows: InputSignal<readonly IRtWorkspaceDetails.Row[]>;
|
|
105
|
+
/** Верх сведений о человеке над строками: без него сведения начинаются со строк */
|
|
106
|
+
readonly profile: InputSignal<IRtWorkspaceDetails.Profile | null>;
|
|
98
107
|
readonly agentEdit: InputSignal<IRtWorkspaceDetails.AgentEdit | null>;
|
|
99
108
|
readonly money: InputSignal<readonly IRtWorkspaceDetails.MoneyRow[]>;
|
|
100
109
|
readonly toggles: InputSignal<readonly IRtWorkspaceDetails.Toggle[]>;
|
|
@@ -146,6 +155,11 @@ export declare class RtWorkspaceDetailsComponent {
|
|
|
146
155
|
"required": false;
|
|
147
156
|
"isSignal": true;
|
|
148
157
|
};
|
|
158
|
+
"profile": {
|
|
159
|
+
"alias": "profile";
|
|
160
|
+
"required": false;
|
|
161
|
+
"isSignal": true;
|
|
162
|
+
};
|
|
149
163
|
"agentEdit": {
|
|
150
164
|
"alias": "agentEdit";
|
|
151
165
|
"required": false;
|
|
@@ -53,6 +53,8 @@ export declare class RtWorkspaceComponent implements IRtWorkspace.PanelApi {
|
|
|
53
53
|
protected readonly slotContext: IRtWorkspace.SlotContext;
|
|
54
54
|
readonly storageKey: InputSignal<string | null>;
|
|
55
55
|
readonly hasActive: InputSignalWithTransform<boolean, BooleanInput>;
|
|
56
|
+
/** Колонки стоят отдельными карточками с зазором, без линий между ними */
|
|
57
|
+
readonly cards: InputSignalWithTransform<boolean, BooleanInput>;
|
|
56
58
|
readonly listMinWidth: InputSignalWithTransform<number, number | string>;
|
|
57
59
|
readonly listMaxWidth: InputSignalWithTransform<number, number | string>;
|
|
58
60
|
readonly listDefaultWidth: InputSignalWithTransform<number, number | string>;
|
|
@@ -86,6 +88,11 @@ export declare class RtWorkspaceComponent implements IRtWorkspace.PanelApi {
|
|
|
86
88
|
"required": false;
|
|
87
89
|
"isSignal": true;
|
|
88
90
|
};
|
|
91
|
+
"cards": {
|
|
92
|
+
"alias": "cards";
|
|
93
|
+
"required": false;
|
|
94
|
+
"isSignal": true;
|
|
95
|
+
};
|
|
89
96
|
"listMinWidth": {
|
|
90
97
|
"alias": "listMinWidth";
|
|
91
98
|
"required": false;
|