@epam/ai-dial-conversation-panel 1.3.0-dev.311 → 1.3.0-dev.317
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/components/ConversationGroupHeader/ConversationGroupHeader.d.ts.map +1 -1
- package/components/ConversationList/ConversationList.d.ts.map +1 -1
- package/components/ConversationListSection/ConversationListSection.d.ts.map +1 -1
- package/components/ConversationRow/ConversationRow.d.ts +3 -0
- package/components/ConversationRow/ConversationRow.d.ts.map +1 -1
- package/components/ProjectRow/ProjectRow.d.ts +24 -0
- package/components/ProjectRow/ProjectRow.d.ts.map +1 -0
- package/components/ProjectRow/ProjectSeeAllRow.d.ts +19 -0
- package/components/ProjectRow/ProjectSeeAllRow.d.ts.map +1 -0
- package/components/RowActionsMenu/RowActionsMenu.d.ts +20 -0
- package/components/RowActionsMenu/RowActionsMenu.d.ts.map +1 -0
- package/components/RowLink/RowLink.d.ts +12 -0
- package/components/RowLink/RowLink.d.ts.map +1 -0
- package/components/RowRenderer/RowRenderer.d.ts +2 -2
- package/components/RowRenderer/RowRenderer.d.ts.map +1 -1
- package/hooks/useRowActions.d.ts +17 -0
- package/hooks/useRowActions.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +856 -638
- package/models/conversation-list-section.d.ts +3 -0
- package/models/conversation-list-section.d.ts.map +1 -1
- package/models/conversation-list.d.ts +11 -2
- package/models/conversation-list.d.ts.map +1 -1
- package/models/pinned-projects.d.ts +58 -0
- package/models/pinned-projects.d.ts.map +1 -0
- package/models/virtual-row.d.ts +43 -1
- package/models/virtual-row.d.ts.map +1 -1
- package/package.json +4 -4
- package/types/virtual-row.d.ts +8 -2
- package/types/virtual-row.d.ts.map +1 -1
- package/utils/conversation-filter.d.ts +19 -0
- package/utils/conversation-filter.d.ts.map +1 -1
- package/utils/conversation-row.d.ts +9 -3
- package/utils/conversation-row.d.ts.map +1 -1
|
@@ -5,6 +5,7 @@ import { ConversationTypeFilter } from '../types/conversation-kind';
|
|
|
5
5
|
import { ConversationListLabels, ConversationListStyles } from './conversation-list';
|
|
6
6
|
import { ConversationListHeaderLabels, ConversationListHeaderStyles } from './conversation-list-header';
|
|
7
7
|
import { ConversationItem, ConversationMove } from './panel-props';
|
|
8
|
+
import { PinnedProjects } from './pinned-projects';
|
|
8
9
|
/** Localised labels for `ConversationListSection`: those of its header and of its list. */
|
|
9
10
|
export interface ConversationListSectionLabels extends ConversationListHeaderLabels, ConversationListLabels {
|
|
10
11
|
}
|
|
@@ -53,6 +54,8 @@ export interface ConversationListSectionProps {
|
|
|
53
54
|
onMoveConversation?: (move: ConversationMove) => void;
|
|
54
55
|
/** Called with the distinct IDs of conversation rows in the visible viewport, in row order, whenever that sequence changes; excludes group headers and overscan rows, and is empty when no rows are visible. */
|
|
55
56
|
onVisibleConversationIdsChange?: (ids: string[]) => void;
|
|
57
|
+
/** Project trees rendered at the top of the Pinned section, with their callbacks. */
|
|
58
|
+
pinnedProjects?: PinnedProjects;
|
|
56
59
|
/** Style overrides for the header and the list. */
|
|
57
60
|
styles?: ConversationListSectionStyles;
|
|
58
61
|
/** Extra class name(s) merged onto the list root, e.g. a host anchor. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-list-section.d.ts","sourceRoot":"","sources":["../../src/models/conversation-list-section.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation-list-section.d.ts","sourceRoot":"","sources":["../../src/models/conversation-list-section.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,2FAA2F;AAC3F,MAAM,WAAW,6BACf,SAAQ,4BAA4B,EAAE,sBAAsB;CAAG;AAEjE,qDAAqD;AACrD,MAAM,WAAW,6BAA6B;IAC5C,gCAAgC;IAChC,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,8BAA8B;IAC9B,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC/B;AAED,mDAAmD;AACnD,MAAM,WAAW,4BAA4B;IAC3C,gDAAgD;IAChD,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mHAAmH;IACnH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,+DAA+D;IAC/D,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,K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Filter } from '../types/conversation-kind';
|
|
4
4
|
import { ConversationRowVariant } from '../types/conversation-row-variant';
|
|
5
5
|
import { ConversationItem, ConversationMove } from './panel-props';
|
|
6
|
+
import { PinnedProjects } from './pinned-projects';
|
|
6
7
|
/** CSS custom-property overrides for the conversation list and its rows. */
|
|
7
8
|
export interface ConversationListColors {
|
|
8
9
|
/** Hover background for a conversation row. */
|
|
@@ -11,7 +12,7 @@ export interface ConversationListColors {
|
|
|
11
12
|
itemActive?: string;
|
|
12
13
|
/** Primary text color. */
|
|
13
14
|
text?: string;
|
|
14
|
-
/** Text color of the group headers (Pinned, My chats, …)
|
|
15
|
+
/** Text color of the group headers (Pinned, My chats, …), defaulting to `--text-tertiary` for `Avatar` rows and `--text-secondary` for `Indicator` rows, and of See all rows and pinned project icons, defaulting to `--text-secondary`. */
|
|
15
16
|
textSecondary?: string;
|
|
16
17
|
/** Ring color shown around a group header acting as a drag-and-drop target. */
|
|
17
18
|
dropZoneRing?: string;
|
|
@@ -27,6 +28,8 @@ export interface ConversationListColors {
|
|
|
27
28
|
unreadDot?: string;
|
|
28
29
|
/** Border color of the read indicator dot of `Indicator` rows; no effect on `Avatar` rows, so none in `ConversationPanel`. Defaults to `--stroke-secondary`. */
|
|
29
30
|
indicatorDot?: string;
|
|
31
|
+
/** Color of the vertical guide line beside the rows nested under a pinned project. Defaults to `--stroke-tertiary`. */
|
|
32
|
+
projectGuideLine?: string;
|
|
30
33
|
}
|
|
31
34
|
/** Typography overrides for the conversation list. */
|
|
32
35
|
export interface ConversationListTypography {
|
|
@@ -36,7 +39,7 @@ export interface ConversationListTypography {
|
|
|
36
39
|
fontFamily?: string;
|
|
37
40
|
/** Typography class applied to collapsible group header buttons. Defaults to `'dial-tiny-lead-text'`. */
|
|
38
41
|
groupHeaderClassName?: string;
|
|
39
|
-
/** Typography class applied to conversation title text in each row. Defaults to `'dial-small-text'`. */
|
|
42
|
+
/** Typography class applied to conversation title text in each row, and to pinned project names and See all rows. Defaults to `'dial-small-text'`. */
|
|
40
43
|
itemTitleClassName?: string;
|
|
41
44
|
/** Typography class applied to the title of an unread conversation. Defaults to `'dial-small-semi-text'`. */
|
|
42
45
|
unreadItemTitleClassName?: string;
|
|
@@ -94,6 +97,10 @@ export interface ConversationListLabels {
|
|
|
94
97
|
actionsLabel?: string;
|
|
95
98
|
/** Accessible (visually hidden) label announced for the unread indicator dot. Defaults to `"Unread"`. */
|
|
96
99
|
unreadIndicatorLabel?: string;
|
|
100
|
+
/** Visible text of the See all row under a pinned project. Defaults to `'See all'`. */
|
|
101
|
+
seeAllLabel?: string;
|
|
102
|
+
/** Builds the accessible name of a pinned project's See all row from the project name. Defaults to `` (name) => `See all chats in ${name}` ``. */
|
|
103
|
+
seeAllAriaLabel?: (name: string) => string;
|
|
97
104
|
}
|
|
98
105
|
/** Props accepted by `ConversationList`. */
|
|
99
106
|
export interface ConversationListProps {
|
|
@@ -129,6 +136,8 @@ export interface ConversationListProps {
|
|
|
129
136
|
onMoveConversation?: (move: ConversationMove) => void;
|
|
130
137
|
/** Called with the distinct IDs of conversation rows in the visible viewport, in row order, whenever that sequence changes; excludes group headers and overscan rows, and is empty when no rows are visible. */
|
|
131
138
|
onVisibleConversationIdsChange?: (ids: string[]) => void;
|
|
139
|
+
/** Project trees rendered at the top of the Pinned section, with their callbacks. */
|
|
140
|
+
pinnedProjects?: PinnedProjects;
|
|
132
141
|
/** Style overrides for colors, typography and the row icon badge. */
|
|
133
142
|
styles?: ConversationListStyles;
|
|
134
143
|
/** `id` of the list root, for a header's `aria-controls` to reference. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-list.d.ts","sourceRoot":"","sources":["../../src/models/conversation-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4B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KAAK,YAAY,EAAE,CAAC;IACxD,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,CACjB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,iBAAiB,KACvB,IAAI,CAAC;IACV,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACtD,gNAAgN;IAChN,8BAA8B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzD,qFAAqF;IACrF,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,qEAAqE;IACrE,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,0EAA0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FilterTab } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { DropdownItem } from '@epam/ai-dial-ui-kit';
|
|
3
|
+
import { ConversationItem } from './panel-props';
|
|
4
|
+
/** A pinned project and the chats the host chose to list under it. */
|
|
5
|
+
export interface PinnedProjectGroup {
|
|
6
|
+
/** Stable unique id. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Display name. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Browser-navigable URL of the project; when set, middle-click opens it in a new tab. */
|
|
11
|
+
href?: string;
|
|
12
|
+
/** Origin tab the project belongs to, for the Origin filter. Defaults to `FilterTab.MyChats`. */
|
|
13
|
+
source?: FilterTab;
|
|
14
|
+
/** The chats listed under the project, in display order. */
|
|
15
|
+
conversations: ConversationItem[];
|
|
16
|
+
/** Renders a See all row after `conversations`. */
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** The project trees of the Pinned section and their callbacks. */
|
|
20
|
+
export interface PinnedProjects {
|
|
21
|
+
/** Projects in display order, rendered before the pinned conversations. */
|
|
22
|
+
projects: PinnedProjectGroup[];
|
|
23
|
+
/** Called when a project row is activated. */
|
|
24
|
+
onSelectProject: (projectId: string) => void;
|
|
25
|
+
/** Called when a nested chat row is activated. */
|
|
26
|
+
onSelectConversation: (conversationId: string, projectId: string) => void;
|
|
27
|
+
/** Called when a See all row is activated. */
|
|
28
|
+
onSeeAll: (projectId: string) => void;
|
|
29
|
+
/** Builds the ⋮ actions of a project row; no trigger renders when absent or empty. */
|
|
30
|
+
getActions?: (project: PinnedProjectGroup) => DropdownItem[];
|
|
31
|
+
/** Called when the ⋮ menu of a project row opens; receives the trigger button. */
|
|
32
|
+
onActionMenuOpen?: (project: PinnedProjectGroup, trigger: HTMLButtonElement) => void;
|
|
33
|
+
/** Id of the project the host currently shows; its row gets `aria-current="page"`. */
|
|
34
|
+
activeProjectId?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Position of a row nested under a project row, for its ARIA attributes and guide-line segment. */
|
|
37
|
+
export interface NestedRowPosition {
|
|
38
|
+
/** 1-based position among the project's nested rows. */
|
|
39
|
+
posInSet: number;
|
|
40
|
+
/** Number of the project's nested rows: its conversations plus the See all row. */
|
|
41
|
+
setSize: number;
|
|
42
|
+
/** The row is the first nested row of its project. */
|
|
43
|
+
isFirstNested: boolean;
|
|
44
|
+
/** The row is the last nested row of its project. */
|
|
45
|
+
isLastNested: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** ARIA attributes and classes of a row nested under a project row. */
|
|
48
|
+
export interface NestedRowProps {
|
|
49
|
+
/** Tree level of the row; nested rows are level 2. */
|
|
50
|
+
'aria-level': number;
|
|
51
|
+
/** 1-based position among the project's nested rows. */
|
|
52
|
+
'aria-posinset': number;
|
|
53
|
+
/** Number of the project's nested rows. */
|
|
54
|
+
'aria-setsize': number;
|
|
55
|
+
/** Indent and guide-line segment classes. */
|
|
56
|
+
className: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=pinned-projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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IAChC,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,aAAa,EAAE,OAAO,CAAC;IACvB,qDAAqD;IACrD,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,eAAe,EAAE,MAAM,CAAC;IACxB,2CAA2C;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/models/virtual-row.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { DropdownItem } from '@epam/ai-dial-ui-kit';
|
|
|
3
3
|
import { ConversationRowVariant } from '../types/conversation-row-variant';
|
|
4
4
|
import { VirtualRowKind } from '../types/virtual-row';
|
|
5
5
|
import { ConversationItem } from './panel-props';
|
|
6
|
+
import { NestedRowPosition, PinnedProjectGroup } from './pinned-projects';
|
|
6
7
|
/** A collapsible group header row in the virtual list. */
|
|
7
8
|
interface GroupHeaderRow {
|
|
8
9
|
/** Row discriminant. */
|
|
@@ -21,8 +22,33 @@ interface ConversationItemRow {
|
|
|
21
22
|
/** The group this item belongs to — used for drag-and-drop validation. */
|
|
22
23
|
groupKey: FilterTab;
|
|
23
24
|
}
|
|
25
|
+
/** A pinned project row at the top of the Pinned section. */
|
|
26
|
+
interface ProjectRow {
|
|
27
|
+
/** Row discriminant. */
|
|
28
|
+
kind: VirtualRowKind.Project;
|
|
29
|
+
/** The project to render. */
|
|
30
|
+
project: PinnedProjectGroup;
|
|
31
|
+
}
|
|
32
|
+
/** A conversation row nested under a pinned project row. */
|
|
33
|
+
interface ProjectConversationRow extends NestedRowPosition {
|
|
34
|
+
/** Row discriminant. */
|
|
35
|
+
kind: VirtualRowKind.ProjectConversation;
|
|
36
|
+
/** The conversation to render. */
|
|
37
|
+
item: ConversationItem;
|
|
38
|
+
/** Id of the project the conversation is listed under. */
|
|
39
|
+
projectId: string;
|
|
40
|
+
}
|
|
41
|
+
/** The See all row closing a pinned project's nested rows. */
|
|
42
|
+
interface ProjectSeeAllRow extends NestedRowPosition {
|
|
43
|
+
/** Row discriminant. */
|
|
44
|
+
kind: VirtualRowKind.ProjectSeeAll;
|
|
45
|
+
/** The project whose chats the row opens. */
|
|
46
|
+
project: PinnedProjectGroup;
|
|
47
|
+
/** Id of the project, the same as `project.id`. */
|
|
48
|
+
projectId: string;
|
|
49
|
+
}
|
|
24
50
|
/** Union of all possible virtual row shapes. */
|
|
25
|
-
export type VirtualRow = GroupHeaderRow | ConversationItemRow;
|
|
51
|
+
export type VirtualRow = GroupHeaderRow | ConversationItemRow | ProjectRow | ProjectConversationRow | ProjectSeeAllRow;
|
|
26
52
|
/** Typography/class overrides applied to virtual row elements. */
|
|
27
53
|
interface RowStyles {
|
|
28
54
|
/** Typography class applied to group header buttons. */
|
|
@@ -58,6 +84,22 @@ export interface RowRendererData {
|
|
|
58
84
|
actionsLabel?: string;
|
|
59
85
|
/** Accessible (visually hidden) label announced for the unread indicator dot. */
|
|
60
86
|
unreadIndicatorLabel?: string;
|
|
87
|
+
/** Id of the project the host currently shows. */
|
|
88
|
+
activeProjectId?: string;
|
|
89
|
+
/** Called with the project `id` when a project row is activated. */
|
|
90
|
+
onSelectProject: (projectId: string) => void;
|
|
91
|
+
/** Called with the conversation `id` when a row nested under a project is activated. */
|
|
92
|
+
onSelectProjectConversation: (id: string) => void;
|
|
93
|
+
/** Called with the project `id` when a See all row is activated. */
|
|
94
|
+
onSeeAll: (projectId: string) => void;
|
|
95
|
+
/** Builds the ⋮ actions of a project row. */
|
|
96
|
+
getProjectActions?: (project: PinnedProjectGroup) => DropdownItem[];
|
|
97
|
+
/** Called when a project row's ⋮ menu opens. */
|
|
98
|
+
onProjectActionMenuOpen?: (project: PinnedProjectGroup, trigger: HTMLButtonElement) => void;
|
|
99
|
+
/** Visible text of a See all row. */
|
|
100
|
+
seeAllLabel?: string;
|
|
101
|
+
/** Builds the accessible name of a See all row from the project name. */
|
|
102
|
+
seeAllAriaLabel?: (name: string) => string;
|
|
61
103
|
/** Typography/class overrides applied to virtual row elements. */
|
|
62
104
|
styles?: RowStyles;
|
|
63
105
|
/** Presentation of conversation rows and group headers. Defaults to `ConversationRowVariant.Avatar`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-row.d.ts","sourceRoot":"","sources":["../../src/models/virtual-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"virtual-row.d.ts","sourceRoot":"","sources":["../../src/models/virtual-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,0DAA0D;AAC1D,UAAU,cAAc;IACtB,wBAAwB;IACxB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;IAC5B,qDAAqD;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,oCAAoC;IACp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CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wGAAwG;IACxG,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,0FAA0F;IAC1F,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qFAAqF;IACrF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mGAAmG;IACnG,iBAAiB,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACzC,+DAA+D;IAC/D,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kDAAkD;IAClD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,gDAAgD;IAChD,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,gDAAgD;IAChD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,4EAA4E;IAC5E,MAAM,EAAE,CACN,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,SAAS,EACzB,OAAO,EAAE,MAAM,GAAG,IAAI,KACnB,IAAI,CAAC;CACX"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-conversation-panel",
|
|
3
3
|
"description": "Virtualized sidebar panel for browsing conversation history with grouping, tabs, and search",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.317",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"react-window": "^2.5.3",
|
|
21
21
|
"@tabler/icons-react": "^3.50.0",
|
|
22
|
-
"@epam/ai-dial-sidebar": "1.3.0-dev.
|
|
22
|
+
"@epam/ai-dial-sidebar": "1.3.0-dev.317"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.16.0-dev.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.317",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.72"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
package/types/virtual-row.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
/** Discriminates between the
|
|
1
|
+
/** Discriminates between the virtual row types in the conversation list. */
|
|
2
2
|
export declare enum VirtualRowKind {
|
|
3
3
|
Header = "header",
|
|
4
|
-
Item = "item"
|
|
4
|
+
Item = "item",
|
|
5
|
+
/** A pinned project row in the Pinned section. */
|
|
6
|
+
Project = "project",
|
|
7
|
+
/** A conversation nested under a pinned project row. */
|
|
8
|
+
ProjectConversation = "project-conversation",
|
|
9
|
+
/** The See all row that closes a pinned project's nested rows. */
|
|
10
|
+
ProjectSeeAll = "project-see-all"
|
|
5
11
|
}
|
|
6
12
|
//# sourceMappingURL=virtual-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-row.d.ts","sourceRoot":"","sources":["../../src/types/virtual-row.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"virtual-row.d.ts","sourceRoot":"","sources":["../../src/types/virtual-row.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,kDAAkD;IAClD,OAAO,YAAY;IACnB,wDAAwD;IACxD,mBAAmB,yBAAyB;IAC5C,kEAAkE;IAClE,aAAa,oBAAoB;CAClC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FilterTab } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { ConversationItem } from '../models/panel-props';
|
|
3
|
+
import { PinnedProjectGroup } from '../models/pinned-projects';
|
|
3
4
|
import { ConversationTypeFilter } from '../types/conversation-kind';
|
|
4
5
|
/** Returns whether a conversation item matches the currently selected filter tab. */
|
|
5
6
|
export declare const matchesTab: (item: ConversationItem, tab: FilterTab) => boolean;
|
|
@@ -7,4 +8,22 @@ export declare const matchesTab: (item: ConversationItem, tab: FilterTab) => boo
|
|
|
7
8
|
export declare const matchesKind: (item: ConversationItem, type: ConversationTypeFilter) => boolean;
|
|
8
9
|
/** Returns whether a conversation item title matches the current search query. */
|
|
9
10
|
export declare const matchesSearch: (item: ConversationItem, query: string) => boolean;
|
|
11
|
+
/** Search text and filters that narrow the pinned project trees. */
|
|
12
|
+
interface PinnedProjectFilters {
|
|
13
|
+
/** Current search text; empty keeps every project. */
|
|
14
|
+
searchQuery: string;
|
|
15
|
+
/** Origin tab applied to the list. */
|
|
16
|
+
activeFilter: FilterTab;
|
|
17
|
+
/** Kinds of conversation the list shows. */
|
|
18
|
+
activeTypeFilter: ConversationTypeFilter;
|
|
19
|
+
/** Sources excluded entirely. */
|
|
20
|
+
hiddenSources?: FilterTab[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the pinned projects that the search and the filters keep, in order. A
|
|
24
|
+
* project matched by name keeps all its rows; one matched only through its chats
|
|
25
|
+
* keeps the matching chats and loses its See all row.
|
|
26
|
+
*/
|
|
27
|
+
export declare const filterPinnedProjects: (projects: PinnedProjectGroup[], { searchQuery, activeFilter, activeTypeFilter, hiddenSources, }: PinnedProjectFilters) => PinnedProjectGroup[];
|
|
28
|
+
export {};
|
|
10
29
|
//# sourceMappingURL=conversation-filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-filter.d.ts","sourceRoot":"","sources":["../../src/utils/conversation-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACx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,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,kBAAkB,EAAE,EAC9B,iEAKG,oBAAoB,KACtB,kBAAkB,EAoBpB,CAAC"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import { NestedRowPosition, NestedRowProps, PinnedProjectGroup } from '../models/pinned-projects';
|
|
1
2
|
import { RowRendererData, VirtualRow } from '../models/virtual-row';
|
|
3
|
+
import { ConversationRowVariant } from '../types/conversation-row-variant';
|
|
2
4
|
/** Number of skeleton placeholder rows shown while conversations are loading. */
|
|
3
5
|
export declare const SKELETON_ROW_COUNT = 15;
|
|
4
6
|
/** Returns a pseudo-randomised width percentage for the skeleton title bar at index `i`. */
|
|
5
7
|
export declare const getSkeletonWidth: (i: number) => string;
|
|
6
8
|
/**
|
|
7
9
|
* Returns the inline-end padding Tailwind class for the row's ghost button based
|
|
8
|
-
* on action state. The reserved gutter has to cover every state in which the
|
|
10
|
+
* on action state and row variant. The reserved gutter has to cover every state in which the
|
|
9
11
|
* actions trigger is actually visible — hover *and* focus-within (see the
|
|
10
12
|
* trigger's own visibility classes in `ConversationRow`). A row keeps focus
|
|
11
13
|
* after it is clicked or dragged, so reserving on hover alone left the trigger
|
|
12
14
|
* painted on top of the title's ellipsis once the pointer moved away.
|
|
13
15
|
*/
|
|
14
|
-
export declare const getButtonPaddingEnd: (hasActions: boolean, isMenuOpen: boolean) => string;
|
|
15
|
-
/** Returns the
|
|
16
|
+
export declare const getButtonPaddingEnd: (hasActions: boolean, isMenuOpen: boolean, variant?: ConversationRowVariant) => string;
|
|
17
|
+
/** Returns the level-2 ARIA position and the indent and guide-line classes of a row nested under a project row. */
|
|
18
|
+
export declare const getNestedRowProps: (position: NestedRowPosition) => NestedRowProps;
|
|
19
|
+
/** Returns the pixel height for a virtual list row (item, first group header, or subsequent group header) in the active row variant; pinned project rows always take the `Indicator` item height. */
|
|
16
20
|
export declare const getRowHeight: (index: number, rowProps: RowRendererData) => number;
|
|
17
21
|
/** Returns how many rows to render beyond each edge of a viewport `height` pixels tall: half a viewport, at least 5. */
|
|
18
22
|
export declare const getOverscanCount: (height: number) => number;
|
|
@@ -23,4 +27,6 @@ export declare const getConversationIdsInRange: (rows: VirtualRow[], { startInde
|
|
|
23
27
|
}) => string[];
|
|
24
28
|
/** Returns true when both ID sequences hold the same IDs in the same order. */
|
|
25
29
|
export declare const isSameIdSequence: (left: string[], right: string[]) => boolean;
|
|
30
|
+
/** Returns a pinned project's rows: the project row, one row per conversation and the See all row when `hasMore` is set. */
|
|
31
|
+
export declare const buildProjectRows: (project: PinnedProjectGroup) => VirtualRow[];
|
|
26
32
|
//# sourceMappingURL=conversation-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-row.d.ts","sourceRoot":"","sources":["../../src/utils/conversation-row.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation-row.d.ts","sourceRoot":"","sources":["../../src/utils/conversation-row.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAG3E,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,GAAI,GAAG,MAAM,WAA+B,CAAC;AAE1E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,OAAO,EACnB,YAAY,OAAO,EACnB,UAAS,sBAAsD,KAC9D,MAMF,CAAC;AAEF,mHAAmH;AACnH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,iBAAiB,KAC1B,cAUD,CAAC;AAEH,qMAAqM;AACrM,eAAO,MAAM,YAAY,GACvB,OAAO,MAAM,EACb,UAAU,eAAe,KACxB,MAiBF,CAAC;AAKF,wHAAwH;AACxH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAI/C,CAAC;AAEJ,wHAAwH;AACxH,eAAO,MAAM,yBAAyB,GACpC,MAAM,UAAU,EAAE,EAClB,2BAA2B;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KACnE,MAAM,EAWR,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,EAAE,OAAO,MAAM,EAAE,KAAG,OAEnB,CAAC;AAEjD,4HAA4H;AAC5H,eAAO,MAAM,gBAAgB,GAAI,SAAS,kBAAkB,KAAG,UAAU,EA0BxE,CAAC"}
|