@webex/cc-components 1.28.0-rtt.1 → 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/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 -28
- package/dist/wc.js +123 -123
- package/package.json +4 -4
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,13 +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
125
|
}
|
|
117
|
-
export type IncomingTaskComponentProps = Pick<TaskProps, '
|
|
118
|
-
|
|
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
|
+
};
|
|
119
142
|
/**
|
|
120
143
|
* Interface representing the properties for control actions on a task.
|
|
121
144
|
*/
|
|
@@ -208,10 +231,6 @@ export interface ControlProps {
|
|
|
208
231
|
* @param wrapupId - The ID associated with the wrap-up reason.
|
|
209
232
|
*/
|
|
210
233
|
wrapupCall: (wrapupReason: string, wrapupId: string) => void;
|
|
211
|
-
/**
|
|
212
|
-
* Selected login option
|
|
213
|
-
*/
|
|
214
|
-
deviceType: string;
|
|
215
234
|
/**
|
|
216
235
|
* Flag to determine if the task is held
|
|
217
236
|
*/
|
|
@@ -317,12 +336,6 @@ export interface ControlProps {
|
|
|
317
336
|
* Time since the task is in held state
|
|
318
337
|
*/
|
|
319
338
|
holdTime: number;
|
|
320
|
-
/**
|
|
321
|
-
* Feature flags for the task.
|
|
322
|
-
*/
|
|
323
|
-
featureFlags: {
|
|
324
|
-
[key: string]: boolean;
|
|
325
|
-
};
|
|
326
339
|
/**
|
|
327
340
|
* Custom CSS ClassName for CallControlCAD component.
|
|
328
341
|
*/
|
|
@@ -363,7 +376,7 @@ export interface ControlProps {
|
|
|
363
376
|
* Function to set the last target type
|
|
364
377
|
*/
|
|
365
378
|
setLastTargetType: (targetType: TargetType) => void;
|
|
366
|
-
|
|
379
|
+
controls: TaskUIControls;
|
|
367
380
|
secondsUntilAutoWrapup?: number;
|
|
368
381
|
/**
|
|
369
382
|
* Function to cancel the auto wrap-up timer.
|
|
@@ -388,7 +401,7 @@ export interface ControlProps {
|
|
|
388
401
|
*/
|
|
389
402
|
agentId: string;
|
|
390
403
|
}
|
|
391
|
-
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'>;
|
|
392
405
|
export type OutdialAniEntry = {
|
|
393
406
|
/** Unique identifier for the ANI entry */
|
|
394
407
|
id: string;
|
|
@@ -496,8 +509,9 @@ export interface CallControlConsultComponentsProps {
|
|
|
496
509
|
switchToMainCall: () => void;
|
|
497
510
|
logger: ILogger;
|
|
498
511
|
isMuted: boolean;
|
|
499
|
-
|
|
512
|
+
controls: TaskUIControls;
|
|
500
513
|
toggleConsultMute: () => void;
|
|
514
|
+
conferenceEnabled: boolean;
|
|
501
515
|
}
|
|
502
516
|
/**
|
|
503
517
|
* Type representing the possible menu types in call control.
|