@webex/cc-components 1.28.0-next.43 → 1.28.0-next.45
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 +90 -90
- package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-popover-hooks.d.ts +10 -22
- package/dist/types/components/task/CallControlCAD/call-control-cad.types.d.ts +10 -0
- package/dist/types/components/task/task.types.d.ts +29 -8
- package/dist/wc.js +60 -60
- package/package.json +3 -3
package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-popover-hooks.d.ts
CHANGED
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
import { ILogger, FetchPaginatedList
|
|
1
|
+
import { ILogger, FetchPaginatedList } from '@webex/cc-store';
|
|
2
2
|
import { CategoryType, UseConsultTransferParams } from '../../task.types';
|
|
3
3
|
/**
|
|
4
|
-
* React hook to load
|
|
4
|
+
* React hook to load and manage paginated SDK data with optional search.
|
|
5
5
|
*
|
|
6
|
-
* @template T - The item type returned by the provided `fetchFunction
|
|
7
|
-
* @template U - The transformed item type stored internally and returned to consumers.
|
|
6
|
+
* @template T - The item type returned by the provided `fetchFunction`.
|
|
8
7
|
* @param fetchFunction - Fetcher that returns a paginated list of items of type T.
|
|
9
|
-
* @param transformFunction - Mapper that converts each T into U for UI consumption.
|
|
10
8
|
* @param categoryName - Human-readable name used for logging/telemetry.
|
|
11
9
|
* @param logger - Optional logger instance for diagnostics.
|
|
12
|
-
* @returns An object containing
|
|
10
|
+
* @returns An object containing SDK response data, pagination state and helpers.
|
|
13
11
|
*/
|
|
14
|
-
export declare const usePaginatedData: <T
|
|
15
|
-
data:
|
|
12
|
+
export declare const usePaginatedData: <T>(fetchFunction: FetchPaginatedList<T> | undefined, categoryName: string, logger?: ILogger) => {
|
|
13
|
+
data: T[];
|
|
16
14
|
page: number;
|
|
17
15
|
hasMore: boolean;
|
|
18
16
|
loading: boolean;
|
|
19
17
|
loadData: (currentPage?: any, search?: any, reset?: any) => Promise<void>;
|
|
20
18
|
reset: () => void;
|
|
21
19
|
};
|
|
22
|
-
export declare function useConsultTransferPopover({
|
|
20
|
+
export declare function useConsultTransferPopover({ availableCategories, getAddressBookEntries, getEntryPoints, getQueues, logger, }: UseConsultTransferParams): {
|
|
23
21
|
selectedCategory: CategoryType;
|
|
24
22
|
searchQuery: string;
|
|
25
23
|
loadMoreRef: import("react").MutableRefObject<HTMLDivElement>;
|
|
26
24
|
dialNumbers: AddressBookEntry[];
|
|
27
25
|
hasMoreDialNumbers: boolean;
|
|
28
26
|
loadingDialNumbers: boolean;
|
|
29
|
-
entryPoints:
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
}[];
|
|
27
|
+
entryPoints: EntryPointRecord[];
|
|
33
28
|
hasMoreEntryPoints: boolean;
|
|
34
29
|
loadingEntryPoints: boolean;
|
|
35
|
-
queuesData:
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
}[];
|
|
30
|
+
queuesData: ContactServiceQueue[];
|
|
40
31
|
hasMoreQueues: boolean;
|
|
41
32
|
loadingQueues: boolean;
|
|
42
33
|
handleSearchChange: (value: string) => void;
|
|
43
|
-
|
|
44
|
-
handleQueuesClick: () => void;
|
|
45
|
-
handleDialNumberClick: () => void;
|
|
46
|
-
handleEntryPointClick: () => void;
|
|
34
|
+
handleCategoryChange: (category: CategoryType) => void;
|
|
47
35
|
handleReload: () => void;
|
|
48
36
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConferenceParticipantDropTarget } from '@webex/cc-store';
|
|
2
|
+
export type ParticipantRosterSectionProps = {
|
|
3
|
+
heading: 'Customer' | 'Participants';
|
|
4
|
+
headingId: string;
|
|
5
|
+
targets: ConferenceParticipantDropTarget[];
|
|
6
|
+
pendingParticipantDropId: string | null;
|
|
7
|
+
participantDropIsPending: boolean;
|
|
8
|
+
rosterDropDisabled: boolean;
|
|
9
|
+
onParticipantDropRequest: (target: ConferenceParticipantDropTarget) => void;
|
|
10
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILogger, ITask, IContactCenter, IWrapupCode, BuddyDetails, DestinationType, ContactServiceQueue, AddressBookEntry, EntryPointRecord, FetchPaginatedList, Participant, AddressBookEntrySearchParams, AddressBookEntriesResponse, TaskUIControls } from '@webex/cc-store';
|
|
1
|
+
import { ILogger, ITask, IContactCenter, IWrapupCode, BuddyDetails, DestinationType, ContactServiceQueue, AddressBookEntry, EntryPointRecord, FetchPaginatedList, Participant, ConferenceParticipantDropRoster, ConferenceParticipantDropTarget, 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
|
/**
|
|
@@ -32,6 +32,10 @@ export declare const TARGET_TYPE: {
|
|
|
32
32
|
readonly DIAL_NUMBER: "dialNumber";
|
|
33
33
|
};
|
|
34
34
|
export type TargetType = (typeof TARGET_TYPE)[keyof typeof TARGET_TYPE];
|
|
35
|
+
export type ParticipantDropAnnouncement = {
|
|
36
|
+
type: 'success' | 'error';
|
|
37
|
+
message: string;
|
|
38
|
+
};
|
|
35
39
|
/**
|
|
36
40
|
* Interface representing the TaskProps of a user.
|
|
37
41
|
*/
|
|
@@ -297,7 +301,7 @@ export interface ControlProps {
|
|
|
297
301
|
/**
|
|
298
302
|
* Function to load buddy agents
|
|
299
303
|
*/
|
|
300
|
-
loadBuddyAgents: () => Promise<void>;
|
|
304
|
+
loadBuddyAgents: (action?: 'Consult' | 'Transfer') => Promise<void>;
|
|
301
305
|
/**
|
|
302
306
|
* Function to transfer the call to a destination.
|
|
303
307
|
* @param destination - The destination to transfer the call to.
|
|
@@ -419,11 +423,27 @@ export interface ControlProps {
|
|
|
419
423
|
* List of participants in the conference excluding the agent themselves.
|
|
420
424
|
*/
|
|
421
425
|
conferenceParticipants: Participant[];
|
|
426
|
+
/** Owner-aware conference roster used by the CallControlCAD Drop menu. */
|
|
427
|
+
conferenceParticipantDropRoster: ConferenceParticipantDropRoster | null;
|
|
428
|
+
/** Drop target currently waiting for routing-event completion. */
|
|
429
|
+
pendingParticipantDropId: string | null;
|
|
430
|
+
/** Generic screen-reader and visible feedback for the most recent Drop request. */
|
|
431
|
+
participantDropAnnouncement: ParticipantDropAnnouncement | null;
|
|
432
|
+
/** Customer target currently awaiting explicit confirmation. */
|
|
433
|
+
participantDropConfirmationTarget: ConferenceParticipantDropTarget | null;
|
|
434
|
+
/** Whether the current Customer confirmation action is unavailable. */
|
|
435
|
+
participantDropConfirmationDisabled: boolean;
|
|
436
|
+
/** Validates a Drop target, opening confirmation for Customer or invoking Drop immediately. */
|
|
437
|
+
requestParticipantDrop: (target: ConferenceParticipantDropTarget) => Promise<void>;
|
|
438
|
+
/** Confirms and invokes the currently selected Customer Drop. */
|
|
439
|
+
confirmParticipantDrop: () => Promise<void>;
|
|
440
|
+
/** Cancels the currently selected Customer Drop. */
|
|
441
|
+
cancelParticipantDropConfirmation: () => void;
|
|
422
442
|
/** Fetch paginated address book entries for dial numbers */
|
|
423
443
|
getAddressBookEntries?: FetchPaginatedList<AddressBookEntry>;
|
|
424
444
|
/** Fetch paginated entry points */
|
|
425
445
|
getEntryPoints?: FetchPaginatedList<EntryPointRecord>;
|
|
426
|
-
/** Fetch paginated queues
|
|
446
|
+
/** Fetch paginated consult/transfer queues from the SDK-owned policy */
|
|
427
447
|
getQueuesFetcher?: FetchPaginatedList<ContactServiceQueue>;
|
|
428
448
|
/**
|
|
429
449
|
* Options to configure consult/transfer popover behavior.
|
|
@@ -434,7 +454,7 @@ export interface ControlProps {
|
|
|
434
454
|
*/
|
|
435
455
|
agentId: string;
|
|
436
456
|
}
|
|
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'> & {
|
|
457
|
+
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'> & Partial<Pick<ControlProps, 'conferenceParticipantDropRoster' | 'pendingParticipantDropId' | 'participantDropAnnouncement' | 'participantDropConfirmationTarget' | 'participantDropConfirmationDisabled' | 'requestParticipantDrop' | 'confirmParticipantDrop' | 'cancelParticipantDropConfirmation'>> & {
|
|
438
458
|
/**
|
|
439
459
|
* Whether the current task is an accepted campaign preview call.
|
|
440
460
|
* When `true`, the header renders the campaign icon and
|
|
@@ -498,6 +518,7 @@ export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'start
|
|
|
498
518
|
export interface ConsultTransferListComponentProps {
|
|
499
519
|
title: string;
|
|
500
520
|
subtitle?: string;
|
|
521
|
+
presence?: 'active' | 'away';
|
|
501
522
|
buttonIcon: string;
|
|
502
523
|
onButtonPress: () => void;
|
|
503
524
|
className?: string;
|
|
@@ -522,7 +543,7 @@ export interface ConsultTransferPopoverComponentProps {
|
|
|
522
543
|
buttonIcon: string;
|
|
523
544
|
buddyAgents: BuddyDetails[];
|
|
524
545
|
loadingBuddyAgents: boolean;
|
|
525
|
-
loadBuddyAgents?: () => Promise<void>;
|
|
546
|
+
loadBuddyAgents?: (action?: 'Consult' | 'Transfer') => Promise<void>;
|
|
526
547
|
getAddressBookEntries?: FetchPaginatedList<AddressBookEntry>;
|
|
527
548
|
getEntryPoints?: FetchPaginatedList<EntryPointRecord>;
|
|
528
549
|
getQueues?: FetchPaginatedList<ContactServiceQueue>;
|
|
@@ -530,7 +551,8 @@ export interface ConsultTransferPopoverComponentProps {
|
|
|
530
551
|
onQueueSelect: (queueId: string, queueName: string, allowParticipantsToInteract: boolean) => void;
|
|
531
552
|
onEntryPointSelect: (entryPointId: string, entryPointName: string, allowParticipantsToInteract: boolean) => void;
|
|
532
553
|
onDialNumberSelect: (dialNumber: string, allowParticipantsToInteract: boolean) => void;
|
|
533
|
-
|
|
554
|
+
action: 'Consult' | 'Transfer';
|
|
555
|
+
availableDestinations: TaskUIControls['consultTransferDestinations']['consult'];
|
|
534
556
|
/** Options governing popover visibility/behavior */
|
|
535
557
|
consultTransferOptions?: ConsultTransferOptions;
|
|
536
558
|
isConferenceInProgress?: boolean;
|
|
@@ -714,8 +736,7 @@ export declare const CATEGORY_AGENTS: CategoryType;
|
|
|
714
736
|
* Parameters for `useConsultTransferPopover` hook.
|
|
715
737
|
*/
|
|
716
738
|
export type UseConsultTransferParams = {
|
|
717
|
-
|
|
718
|
-
showEntryPointTab: boolean;
|
|
739
|
+
availableCategories: CategoryType[];
|
|
719
740
|
getAddressBookEntries?: FetchPaginatedList<AddressBookEntry>;
|
|
720
741
|
getEntryPoints?: FetchPaginatedList<EntryPointRecord>;
|
|
721
742
|
getQueues?: FetchPaginatedList<ContactServiceQueue>;
|