@webex/cc-components 1.28.0-rtt.2 → 1.28.0-task-refactor.1
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/7152.js +1 -1
- package/dist/84771.js +1 -1
- package/dist/index.js +185 -185
- package/dist/types/components/task/CallControl/CallControlCustom/call-control-custom.utils.d.ts +3 -3
- package/dist/types/components/task/CallControl/call-control.utils.d.ts +8 -2
- package/dist/types/components/task/IncomingTask/incoming-task.utils.d.ts +7 -1
- package/dist/types/components/task/Task/task.utils.d.ts +8 -1
- package/dist/types/components/task/TaskList/task-list.utils.d.ts +1 -1
- package/dist/types/components/task/task.types.d.ts +42 -47
- package/dist/types/index.d.ts +1 -2
- package/dist/wc.js +123 -123
- package/package.json +4 -4
- package/dist/types/components/task/RealTimeTranscript/real-time-transcript.d.ts +0 -3
package/dist/types/components/task/CallControl/CallControlCustom/call-control-custom.utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuddyDetails, ContactServiceQueue, ILogger } from '@webex/cc-store';
|
|
2
|
-
import { ButtonConfig
|
|
1
|
+
import { BuddyDetails, ContactServiceQueue, ILogger, TaskUIControls } from '@webex/cc-store';
|
|
2
|
+
import { ButtonConfig } from '../../task.types';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for list item data
|
|
5
5
|
*/
|
|
@@ -10,7 +10,7 @@ export interface ListItemData {
|
|
|
10
10
|
/**
|
|
11
11
|
* Creates the consult button configuration array
|
|
12
12
|
*/
|
|
13
|
-
export declare const createConsultButtons: (isMuted: boolean,
|
|
13
|
+
export declare const createConsultButtons: (isMuted: boolean, controls: TaskUIControls, consultTransfer: () => void, toggleConsultMute: () => void, endConsultCall: () => void, consultConference: () => void, switchToMainCall: () => void, logger?: any, conferenceEnabled?: boolean) => ButtonConfig[];
|
|
14
14
|
/**
|
|
15
15
|
* Filters buttons that should be visible
|
|
16
16
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CallControlMenuType } from '../task.types';
|
|
2
|
-
import type { CallControlButton,
|
|
2
|
+
import type { CallControlButton, MEDIA_CHANNEL as MediaChannelType, MediaTypeInfo } from '../task.types';
|
|
3
|
+
import type { TaskUIControls } from '@webex/cc-store';
|
|
3
4
|
import { DestinationType, ILogger, ITask } from '@webex/cc-store';
|
|
4
5
|
/**
|
|
5
6
|
* Handles toggle hold functionality
|
|
@@ -32,9 +33,14 @@ export declare const isTelephonyMediaType: (mediaType: MediaChannelType, logger?
|
|
|
32
33
|
/**
|
|
33
34
|
* Builds the call control buttons configuration
|
|
34
35
|
*/
|
|
35
|
-
export declare const buildCallControlButtons: (isMuted: boolean, isRecording: boolean, isMuteButtonDisabled: boolean, currentMediaType: MediaTypeInfo,
|
|
36
|
+
export declare const buildCallControlButtons: (isMuted: boolean, isRecording: boolean, isMuteButtonDisabled: boolean, currentMediaType: MediaTypeInfo, controls: TaskUIControls, isHeld: boolean, handleMuteToggleFunc: () => void, handleToggleHoldFunc: () => void, toggleRecording: () => void, endCall: () => void, exitConference: () => void, switchToConsult: () => void, onTransferConsult: () => void, handleConsultConferencePress: () => void, logger?: ILogger, conferenceEnabled?: boolean) => CallControlButton[];
|
|
36
37
|
/**
|
|
37
38
|
* Filters buttons based on consultation state
|
|
39
|
+
* During consulting:
|
|
40
|
+
* - Hide: hold, consult, and blind transfer buttons
|
|
41
|
+
* - Respect SDK enabled/disabled state for consulting buttons (transferConsult, conference)
|
|
42
|
+
* They will be enabled when on main call, disabled when on consult call
|
|
43
|
+
* - Show as-is: mute, switchToConsult, recording, exitConference, end
|
|
38
44
|
*/
|
|
39
45
|
export declare const filterButtonsForConsultation: (buttons: CallControlButton[], consultInitiated: boolean, isTelephony: boolean, logger?: any) => CallControlButton[];
|
|
40
46
|
/**
|
|
@@ -21,4 +21,10 @@ export interface IncomingTaskData {
|
|
|
21
21
|
* @param isBrowser - Whether the device type is browser
|
|
22
22
|
* @returns Processed task data with computed values
|
|
23
23
|
*/
|
|
24
|
-
export declare const extractIncomingTaskData: (incomingTask: ITask,
|
|
24
|
+
export declare const extractIncomingTaskData: (incomingTask: ITask, logger?: any, acceptControl?: {
|
|
25
|
+
isVisible: boolean;
|
|
26
|
+
isEnabled: boolean;
|
|
27
|
+
}, declineControl?: {
|
|
28
|
+
isVisible: boolean;
|
|
29
|
+
isEnabled: boolean;
|
|
30
|
+
}, isDeclineButtonEnabled?: boolean, isBrowser?: boolean) => IncomingTaskData;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import type { MEDIA_CHANNEL as MediaChannelType, TaskComponentData } from '../task.types';
|
|
1
|
+
import type { MEDIA_CHANNEL as MediaChannelType, TaskComponentData, CADVariable, CallAssociatedDataMap } from '../task.types';
|
|
2
|
+
/** System CAD variable keys that are already displayed elsewhere in the UI. */
|
|
3
|
+
export declare const SYSTEM_CAD_KEYS: Set<string>;
|
|
4
|
+
/**
|
|
5
|
+
* Returns agent-viewable global variables from a callAssociatedData map,
|
|
6
|
+
* excluding system variables that are already rendered elsewhere.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getAgentViewableGlobalVariables: (callAssociatedData: CallAssociatedDataMap | undefined) => CADVariable[];
|
|
2
9
|
/**
|
|
3
10
|
* Capitalizes the first word of a string
|
|
4
11
|
* @param str - The string to capitalize
|
|
@@ -6,7 +6,7 @@ import { ILogger, ITask } from '@webex/cc-store';
|
|
|
6
6
|
* @param isBrowser - Whether the device type is browser
|
|
7
7
|
* @returns Processed task data with computed values
|
|
8
8
|
*/
|
|
9
|
-
export declare const extractTaskListItemData: (task: ITask,
|
|
9
|
+
export declare const extractTaskListItemData: (task: ITask, agentId: string, logger?: ILogger, isDeclineButtonEnabled?: boolean, isBrowser?: boolean) => TaskListItemData;
|
|
10
10
|
/**
|
|
11
11
|
* Determines if a task should be selectable
|
|
12
12
|
* @param task - The task object
|
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
import { ILogger, ITask, IContactCenter, IWrapupCode, BuddyDetails, DestinationType, ContactServiceQueue, AddressBookEntry, EntryPointRecord, FetchPaginatedList, Participant, AddressBookEntrySearchParams, AddressBookEntriesResponse } from '@webex/cc-store';
|
|
1
|
+
import { ILogger, ITask, IContactCenter, IWrapupCode, BuddyDetails, DestinationType, ContactServiceQueue, AddressBookEntry, EntryPointRecord, FetchPaginatedList, Participant, AddressBookEntrySearchParams, AddressBookEntriesResponse, TaskUIControls } from '@webex/cc-store';
|
|
2
2
|
type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
3
|
+
/**
|
|
4
|
+
* Represents a single Call Associated Data (CAD) variable on an interaction.
|
|
5
|
+
* Global variables have `global: true` and are set by flow control.
|
|
6
|
+
*/
|
|
7
|
+
export interface CADVariable {
|
|
8
|
+
name: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
value: string;
|
|
11
|
+
type: string;
|
|
12
|
+
agentEditable: boolean;
|
|
13
|
+
agentViewable: boolean;
|
|
14
|
+
global: boolean;
|
|
15
|
+
isSecure: boolean;
|
|
16
|
+
secureKeyId: string;
|
|
17
|
+
secureKeyVersion: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Record of CAD variables keyed by variable name.
|
|
21
|
+
* This is the shape of `callAssociatedData` on the interaction at runtime.
|
|
22
|
+
*/
|
|
23
|
+
export type CallAssociatedDataMap = Record<string, CADVariable>;
|
|
3
24
|
/**
|
|
4
25
|
* Target types for consult/transfer operations
|
|
5
26
|
*/
|
|
@@ -81,10 +102,6 @@ export interface TaskProps {
|
|
|
81
102
|
* Function to handle task selection
|
|
82
103
|
*/
|
|
83
104
|
onTaskSelect: (task: ITask) => void;
|
|
84
|
-
/**
|
|
85
|
-
* Flag to determine if the user is logged in with a browser option
|
|
86
|
-
*/
|
|
87
|
-
isBrowser: boolean;
|
|
88
105
|
/**
|
|
89
106
|
* Flag to determine if the task is answered
|
|
90
107
|
*/
|
|
@@ -93,10 +110,6 @@ export interface TaskProps {
|
|
|
93
110
|
* Flag to determine if the task is ended
|
|
94
111
|
*/
|
|
95
112
|
isEnded: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Selected login option
|
|
98
|
-
*/
|
|
99
|
-
deviceType: string;
|
|
100
113
|
/**
|
|
101
114
|
* List of tasks
|
|
102
115
|
*/
|
|
@@ -109,32 +122,23 @@ export interface TaskProps {
|
|
|
109
122
|
* Agent ID of the logged-in user
|
|
110
123
|
*/
|
|
111
124
|
agentId: string;
|
|
112
|
-
/**
|
|
113
|
-
* Flag to enable decline button on incoming task component
|
|
114
|
-
*/
|
|
115
|
-
isDeclineButtonEnabled?: boolean;
|
|
116
|
-
}
|
|
117
|
-
export type IncomingTaskComponentProps = Pick<TaskProps, 'isBrowser' | 'accept' | 'reject' | 'logger'> & Partial<Pick<TaskProps, 'incomingTask' | 'isDeclineButtonEnabled'>>;
|
|
118
|
-
export type TaskListComponentProps = Pick<TaskProps, 'isBrowser' | 'acceptTask' | 'declineTask' | 'onTaskSelect' | 'logger' | 'agentId'> & Partial<Pick<TaskProps, 'currentTask' | 'taskList'>>;
|
|
119
|
-
export type TranscriptTab = 'ivr' | 'live';
|
|
120
|
-
export interface RealtimeTranscriptEntry {
|
|
121
|
-
id: string;
|
|
122
|
-
speaker: string;
|
|
123
|
-
message: string;
|
|
124
|
-
timestamp: number;
|
|
125
|
-
displayTime?: string;
|
|
126
|
-
event?: string;
|
|
127
|
-
isCustomer?: boolean;
|
|
128
|
-
avatarUrl?: string;
|
|
129
|
-
initials?: string;
|
|
130
|
-
}
|
|
131
|
-
export interface RealtimeTranscriptComponentProps {
|
|
132
|
-
ivrTranscript?: string;
|
|
133
|
-
liveTranscriptEntries?: RealtimeTranscriptEntry[];
|
|
134
|
-
activeTab?: TranscriptTab;
|
|
135
|
-
onTabChange?: (tab: TranscriptTab) => void;
|
|
136
|
-
className?: string;
|
|
137
125
|
}
|
|
126
|
+
export type IncomingTaskComponentProps = Pick<TaskProps, 'accept' | 'reject' | 'logger'> & Partial<Pick<TaskProps, 'incomingTask'>> & {
|
|
127
|
+
acceptControl?: {
|
|
128
|
+
isVisible: boolean;
|
|
129
|
+
isEnabled: boolean;
|
|
130
|
+
};
|
|
131
|
+
declineControl?: {
|
|
132
|
+
isVisible: boolean;
|
|
133
|
+
isEnabled: boolean;
|
|
134
|
+
};
|
|
135
|
+
isDeclineButtonEnabled?: boolean;
|
|
136
|
+
isBrowser?: boolean;
|
|
137
|
+
};
|
|
138
|
+
export type TaskListComponentProps = Pick<TaskProps, 'acceptTask' | 'declineTask' | 'onTaskSelect' | 'logger' | 'agentId'> & Partial<Pick<TaskProps, 'currentTask' | 'taskList'>> & {
|
|
139
|
+
isDeclineButtonEnabled?: boolean;
|
|
140
|
+
isBrowser?: boolean;
|
|
141
|
+
};
|
|
138
142
|
/**
|
|
139
143
|
* Interface representing the properties for control actions on a task.
|
|
140
144
|
*/
|
|
@@ -227,10 +231,6 @@ export interface ControlProps {
|
|
|
227
231
|
* @param wrapupId - The ID associated with the wrap-up reason.
|
|
228
232
|
*/
|
|
229
233
|
wrapupCall: (wrapupReason: string, wrapupId: string) => void;
|
|
230
|
-
/**
|
|
231
|
-
* Selected login option
|
|
232
|
-
*/
|
|
233
|
-
deviceType: string;
|
|
234
234
|
/**
|
|
235
235
|
* Flag to determine if the task is held
|
|
236
236
|
*/
|
|
@@ -336,12 +336,6 @@ export interface ControlProps {
|
|
|
336
336
|
* Time since the task is in held state
|
|
337
337
|
*/
|
|
338
338
|
holdTime: number;
|
|
339
|
-
/**
|
|
340
|
-
* Feature flags for the task.
|
|
341
|
-
*/
|
|
342
|
-
featureFlags: {
|
|
343
|
-
[key: string]: boolean;
|
|
344
|
-
};
|
|
345
339
|
/**
|
|
346
340
|
* Custom CSS ClassName for CallControlCAD component.
|
|
347
341
|
*/
|
|
@@ -382,7 +376,7 @@ export interface ControlProps {
|
|
|
382
376
|
* Function to set the last target type
|
|
383
377
|
*/
|
|
384
378
|
setLastTargetType: (targetType: TargetType) => void;
|
|
385
|
-
|
|
379
|
+
controls: TaskUIControls;
|
|
386
380
|
secondsUntilAutoWrapup?: number;
|
|
387
381
|
/**
|
|
388
382
|
* Function to cancel the auto wrap-up timer.
|
|
@@ -407,7 +401,7 @@ export interface ControlProps {
|
|
|
407
401
|
*/
|
|
408
402
|
agentId: string;
|
|
409
403
|
}
|
|
410
|
-
export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'wrapupCodes' | 'toggleHold' | 'toggleRecording' | 'toggleMute' | 'isMuted' | 'endCall' | 'wrapupCall' | 'isRecording' | 'setIsRecording' | 'buddyAgents' | 'loadingBuddyAgents' | 'loadBuddyAgents' | 'transferCall' | 'consultCall' | 'consultConference' | 'switchToMainCall' | 'switchToConsult' | 'exitConference' | 'endConsultCall' | 'consultTransfer' | 'callControlAudio' | 'consultAgentName' | 'setConsultAgentName' | 'holdTime' | 'callControlClassName' | 'callControlConsultClassName' | 'startTimestamp' | 'stateTimerLabel' | 'stateTimerTimestamp' | 'consultTimerLabel' | 'consultTimerTimestamp' | 'allowConsultToQueue' | 'lastTargetType' | 'setLastTargetType' | '
|
|
404
|
+
export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'isHeld' | 'wrapupCodes' | 'toggleHold' | 'toggleRecording' | 'toggleMute' | 'isMuted' | 'endCall' | 'wrapupCall' | 'isRecording' | 'setIsRecording' | 'buddyAgents' | 'loadingBuddyAgents' | 'loadBuddyAgents' | 'transferCall' | 'consultCall' | 'consultConference' | 'switchToMainCall' | 'switchToConsult' | 'exitConference' | 'endConsultCall' | 'consultTransfer' | 'callControlAudio' | 'consultAgentName' | 'setConsultAgentName' | 'holdTime' | 'callControlClassName' | 'callControlConsultClassName' | 'startTimestamp' | 'stateTimerLabel' | 'stateTimerTimestamp' | 'consultTimerLabel' | 'consultTimerTimestamp' | 'allowConsultToQueue' | 'lastTargetType' | 'setLastTargetType' | 'controls' | 'logger' | 'secondsUntilAutoWrapup' | 'cancelAutoWrapup' | 'conferenceParticipants' | 'getAddressBookEntries' | 'getEntryPoints' | 'getQueuesFetcher' | 'consultTransferOptions' | 'conferenceEnabled'>;
|
|
411
405
|
export type OutdialAniEntry = {
|
|
412
406
|
/** Unique identifier for the ANI entry */
|
|
413
407
|
id: string;
|
|
@@ -515,8 +509,9 @@ export interface CallControlConsultComponentsProps {
|
|
|
515
509
|
switchToMainCall: () => void;
|
|
516
510
|
logger: ILogger;
|
|
517
511
|
isMuted: boolean;
|
|
518
|
-
|
|
512
|
+
controls: TaskUIControls;
|
|
519
513
|
toggleConsultMute: () => void;
|
|
514
|
+
conferenceEnabled: boolean;
|
|
520
515
|
}
|
|
521
516
|
/**
|
|
522
517
|
* Type representing the possible menu types in call control.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,8 +5,7 @@ import CallControlCADComponent from './components/task/CallControlCAD/call-contr
|
|
|
5
5
|
import IncomingTaskComponent from './components/task/IncomingTask/incoming-task';
|
|
6
6
|
import TaskListComponent from './components/task/TaskList/task-list';
|
|
7
7
|
import OutdialCallComponent from './components/task/OutdialCall/outdial-call';
|
|
8
|
-
|
|
9
|
-
export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, RealtimeTranscriptComponent, };
|
|
8
|
+
export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, };
|
|
10
9
|
export * from './components/StationLogin/constants';
|
|
11
10
|
export * from './components/StationLogin/station-login.types';
|
|
12
11
|
export * from './components/UserState/user-state.types';
|