@webex/cc-components 1.28.0-next.34 → 1.28.0-next.35
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 +82 -82
- package/dist/types/components/task/CallControl/CallControlCustom/call-control-custom.utils.d.ts +3 -3
- package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-popover-hooks.d.ts +1 -1
- package/dist/types/components/task/CallControl/call-control.utils.d.ts +13 -4
- package/dist/types/components/task/IncomingTask/incoming-task.utils.d.ts +7 -1
- package/dist/types/components/task/TaskList/task-list.utils.d.ts +5 -4
- package/dist/types/components/task/task.types.d.ts +27 -24
- package/dist/wc.js +82 -82
- package/package.json +3 -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
|
*/
|
package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-popover-hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ILogger, FetchPaginatedList, TransformPaginatedData } from '@webex/cc-store';
|
|
2
2
|
import { CategoryType, UseConsultTransferParams } from '../../task.types';
|
|
3
3
|
/**
|
|
4
4
|
* React hook to load, transform and manage paginated data with optional search.
|
|
@@ -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,11 +33,19 @@ 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[];
|
|
37
|
+
export type ConsultFilterPhase = 'none' | 'pending' | 'active';
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* Distinguishes consult-requested (destination not joined) from active consult.
|
|
40
|
+
* Do not use endConsult visibility alone — it spans both phases.
|
|
38
41
|
*/
|
|
39
|
-
export declare const
|
|
42
|
+
export declare const getConsultFilterPhase: (currentTask: ITask | null | undefined, controls: TaskUIControls | undefined) => ConsultFilterPhase;
|
|
43
|
+
/**
|
|
44
|
+
* Filters buttons based on consultation phase.
|
|
45
|
+
* Pending (consult requested): hide hold/consult/record; keep transfer on main (Stable Prod parity).
|
|
46
|
+
* Active (destination joined): also hide blind transfer on main.
|
|
47
|
+
*/
|
|
48
|
+
export declare const filterButtonsForConsultation: (buttons: CallControlButton[], consultPhase: ConsultFilterPhase, isTelephony: boolean, logger?: ILogger) => CallControlButton[];
|
|
40
49
|
/**
|
|
41
50
|
* Updates call state from current task data
|
|
42
51
|
*/
|
|
@@ -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;
|
|
@@ -30,17 +30,18 @@ export declare const isCampaignPreviewTask: (task: ITask) => boolean;
|
|
|
30
30
|
*/
|
|
31
31
|
export declare const hasAgentJoinedTask: (task: ITask, agentId: string | undefined) => boolean;
|
|
32
32
|
/**
|
|
33
|
-
* Returns the interactionId of the most recent
|
|
34
|
-
*
|
|
33
|
+
* Returns the interactionId of the most recent campaign preview task.
|
|
34
|
+
* Only one campaign preview should be visible at a time; a newer incoming
|
|
35
|
+
* offer supersedes an older hydrated preview.
|
|
35
36
|
*/
|
|
36
|
-
export declare const getActiveCampaignPreviewId: (tasks: ITask[]
|
|
37
|
+
export declare const getActiveCampaignPreviewId: (tasks: ITask[]) => string | null;
|
|
37
38
|
/**
|
|
38
39
|
* Extracts and processes data from a task for rendering in the task list
|
|
39
40
|
* @param task - The task object
|
|
40
41
|
* @param isBrowser - Whether the device type is browser
|
|
41
42
|
* @returns Processed task data with computed values
|
|
42
43
|
*/
|
|
43
|
-
export declare const extractTaskListItemData: (task: ITask,
|
|
44
|
+
export declare const extractTaskListItemData: (task: ITask, agentId: string, logger?: ILogger, isDeclineButtonEnabled?: boolean, isBrowser?: boolean) => TaskListItemData;
|
|
44
45
|
/**
|
|
45
46
|
* Determines if a task should be selectable
|
|
46
47
|
* @param task - The task object
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
import { CampaignErrorType } from './CampaignErrorDialog/campaign-error-dialog.types';
|
|
3
3
|
type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
4
4
|
/**
|
|
@@ -103,10 +103,6 @@ export interface TaskProps {
|
|
|
103
103
|
* Function to handle task selection
|
|
104
104
|
*/
|
|
105
105
|
onTaskSelect: (task: ITask) => void;
|
|
106
|
-
/**
|
|
107
|
-
* Flag to determine if the user is logged in with a browser option
|
|
108
|
-
*/
|
|
109
|
-
isBrowser: boolean;
|
|
110
106
|
/**
|
|
111
107
|
* Flag to determine if the task is answered
|
|
112
108
|
*/
|
|
@@ -115,10 +111,6 @@ export interface TaskProps {
|
|
|
115
111
|
* Flag to determine if the task is ended
|
|
116
112
|
*/
|
|
117
113
|
isEnded: boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Selected login option
|
|
120
|
-
*/
|
|
121
|
-
deviceType: string;
|
|
122
114
|
/**
|
|
123
115
|
* List of tasks
|
|
124
116
|
*/
|
|
@@ -149,8 +141,22 @@ export interface TaskProps {
|
|
|
149
141
|
*/
|
|
150
142
|
acceptedCampaignIds?: Set<string>;
|
|
151
143
|
}
|
|
152
|
-
export type IncomingTaskComponentProps = Pick<TaskProps, '
|
|
153
|
-
|
|
144
|
+
export type IncomingTaskComponentProps = Pick<TaskProps, 'accept' | 'reject' | 'logger'> & Partial<Pick<TaskProps, 'incomingTask'>> & {
|
|
145
|
+
acceptControl?: {
|
|
146
|
+
isVisible: boolean;
|
|
147
|
+
isEnabled: boolean;
|
|
148
|
+
};
|
|
149
|
+
declineControl?: {
|
|
150
|
+
isVisible: boolean;
|
|
151
|
+
isEnabled: boolean;
|
|
152
|
+
};
|
|
153
|
+
isDeclineButtonEnabled?: boolean;
|
|
154
|
+
isBrowser?: boolean;
|
|
155
|
+
};
|
|
156
|
+
export type TaskListComponentProps = Pick<TaskProps, 'acceptTask' | 'declineTask' | 'onTaskSelect' | 'logger' | 'agentId' | 'cc'> & Partial<Pick<TaskProps, 'currentTask' | 'taskList' | 'hasCampaignPreviewEnabled' | 'acceptedCampaignIds'>> & {
|
|
157
|
+
isDeclineButtonEnabled?: boolean;
|
|
158
|
+
isBrowser?: boolean;
|
|
159
|
+
};
|
|
154
160
|
export interface RealTimeTranscriptEntry {
|
|
155
161
|
id: string;
|
|
156
162
|
speaker: string;
|
|
@@ -258,10 +264,6 @@ export interface ControlProps {
|
|
|
258
264
|
* @param wrapupId - The ID associated with the wrap-up reason.
|
|
259
265
|
*/
|
|
260
266
|
wrapupCall: (wrapupReason: string, wrapupId: string) => void;
|
|
261
|
-
/**
|
|
262
|
-
* Selected login option
|
|
263
|
-
*/
|
|
264
|
-
deviceType: string;
|
|
265
267
|
/**
|
|
266
268
|
* Flag to determine if the task is held
|
|
267
269
|
*/
|
|
@@ -367,12 +369,6 @@ export interface ControlProps {
|
|
|
367
369
|
* Time since the task is in held state
|
|
368
370
|
*/
|
|
369
371
|
holdTime: number;
|
|
370
|
-
/**
|
|
371
|
-
* Feature flags for the task.
|
|
372
|
-
*/
|
|
373
|
-
featureFlags: {
|
|
374
|
-
[key: string]: boolean;
|
|
375
|
-
};
|
|
376
372
|
/**
|
|
377
373
|
* Custom CSS ClassName for CallControlCAD component.
|
|
378
374
|
*/
|
|
@@ -413,7 +409,7 @@ export interface ControlProps {
|
|
|
413
409
|
* Function to set the last target type
|
|
414
410
|
*/
|
|
415
411
|
setLastTargetType: (targetType: TargetType) => void;
|
|
416
|
-
|
|
412
|
+
controls: TaskUIControls;
|
|
417
413
|
secondsUntilAutoWrapup?: number;
|
|
418
414
|
/**
|
|
419
415
|
* Function to cancel the auto wrap-up timer.
|
|
@@ -438,7 +434,7 @@ export interface ControlProps {
|
|
|
438
434
|
*/
|
|
439
435
|
agentId: string;
|
|
440
436
|
}
|
|
441
|
-
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' | '
|
|
437
|
+
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'> & {
|
|
442
438
|
/**
|
|
443
439
|
* Whether the current task is an accepted campaign preview call.
|
|
444
440
|
* When `true`, the header renders the campaign icon and
|
|
@@ -553,8 +549,9 @@ export interface CallControlConsultComponentsProps {
|
|
|
553
549
|
switchToMainCall: () => void;
|
|
554
550
|
logger: ILogger;
|
|
555
551
|
isMuted: boolean;
|
|
556
|
-
|
|
552
|
+
controls: TaskUIControls;
|
|
557
553
|
toggleConsultMute: () => void;
|
|
554
|
+
conferenceEnabled: boolean;
|
|
558
555
|
}
|
|
559
556
|
/**
|
|
560
557
|
* Type representing the possible menu types in call control.
|
|
@@ -937,6 +934,12 @@ export interface CampaignTaskListItemProps {
|
|
|
937
934
|
onTimeout: () => void;
|
|
938
935
|
/** Timestamp (ms) when the campaign call was accepted — used for the handle time timer. */
|
|
939
936
|
handleTimestamp?: number;
|
|
937
|
+
/**
|
|
938
|
+
* Controls which timer is rendered in the list item.
|
|
939
|
+
* - `auto`: countdown before accept, handle time after accept
|
|
940
|
+
* - `handle-time`: always render handle time when a timestamp is available
|
|
941
|
+
*/
|
|
942
|
+
timerDisplayMode?: 'auto' | 'handle-time';
|
|
940
943
|
/** Logger instance. */
|
|
941
944
|
logger?: ILogger;
|
|
942
945
|
/** Optional CSS class name applied to the ListItem. */
|