@webex/cc-components 1.28.0-next.3 → 1.28.0-next.5
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 +62 -62
- package/dist/types/components/task/IncomingTask/incoming-task.utils.d.ts +2 -1
- package/dist/types/components/task/OutdialCall/constants.d.ts +1 -0
- package/dist/types/components/task/Task/index.d.ts +1 -0
- package/dist/types/components/task/task.types.d.ts +38 -7
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useIntersectionObserver.d.ts +35 -0
- package/dist/wc.js +19 -19
- package/package.json +4 -4
|
@@ -13,6 +13,7 @@ export interface IncomingTaskData {
|
|
|
13
13
|
declineText: string | undefined;
|
|
14
14
|
title: string;
|
|
15
15
|
disableAccept: boolean;
|
|
16
|
+
disableDecline: boolean;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Extracts and processes all data needed for rendering an incoming task
|
|
@@ -20,4 +21,4 @@ export interface IncomingTaskData {
|
|
|
20
21
|
* @param isBrowser - Whether the device type is browser
|
|
21
22
|
* @returns Processed task data with computed values
|
|
22
23
|
*/
|
|
23
|
-
export declare const extractIncomingTaskData: (incomingTask: ITask, isBrowser: boolean, logger?: any) => IncomingTaskData;
|
|
24
|
+
export declare const extractIncomingTaskData: (incomingTask: ITask, isBrowser: boolean, logger?: any, isDeclineButtonEnabled?: boolean) => IncomingTaskData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILogger, ITask, IContactCenter, IWrapupCode, BuddyDetails, DestinationType, ContactServiceQueue, AddressBookEntry, EntryPointRecord, FetchPaginatedList, Participant } from '@webex/cc-store';
|
|
1
|
+
import { ILogger, ITask, IContactCenter, IWrapupCode, BuddyDetails, DestinationType, ContactServiceQueue, AddressBookEntry, EntryPointRecord, FetchPaginatedList, Participant, AddressBookEntrySearchParams, AddressBookEntriesResponse } from '@webex/cc-store';
|
|
2
2
|
type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
3
3
|
/**
|
|
4
4
|
* Interface representing the TaskProps of a user.
|
|
@@ -99,8 +99,12 @@ export interface TaskProps {
|
|
|
99
99
|
* Agent ID of the logged-in user
|
|
100
100
|
*/
|
|
101
101
|
agentId: string;
|
|
102
|
+
/**
|
|
103
|
+
* Flag to enable decline button on incoming task component
|
|
104
|
+
*/
|
|
105
|
+
isDeclineButtonEnabled?: boolean;
|
|
102
106
|
}
|
|
103
|
-
export type IncomingTaskComponentProps = Pick<TaskProps, 'isBrowser' | 'accept' | 'reject' | 'logger'> & Partial<Pick<TaskProps, 'incomingTask'>>;
|
|
107
|
+
export type IncomingTaskComponentProps = Pick<TaskProps, 'isBrowser' | 'accept' | 'reject' | 'logger'> & Partial<Pick<TaskProps, 'incomingTask' | 'isDeclineButtonEnabled'>>;
|
|
104
108
|
export type TaskListComponentProps = Pick<TaskProps, 'isBrowser' | 'acceptTask' | 'declineTask' | 'onTaskSelect' | 'logger' | 'agentId'> & Partial<Pick<TaskProps, 'currentTask' | 'taskList'>>;
|
|
105
109
|
/**
|
|
106
110
|
* Interface representing the properties for control actions on a task.
|
|
@@ -266,9 +270,21 @@ export interface ControlProps {
|
|
|
266
270
|
*/
|
|
267
271
|
consultTransfer: () => void;
|
|
268
272
|
/**
|
|
269
|
-
*
|
|
273
|
+
* Label for the state timer (e.g., "Wrap Up", "Post Call").
|
|
274
|
+
*/
|
|
275
|
+
stateTimerLabel?: string | null;
|
|
276
|
+
/**
|
|
277
|
+
* Timestamp for the state timer.
|
|
278
|
+
*/
|
|
279
|
+
stateTimerTimestamp?: number;
|
|
280
|
+
/**
|
|
281
|
+
* Label for the consult timer (e.g., "Consulting", "Consult on Hold").
|
|
282
|
+
*/
|
|
283
|
+
consultTimerLabel?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Timestamp for the consult timer.
|
|
270
286
|
*/
|
|
271
|
-
|
|
287
|
+
consultTimerTimestamp?: number;
|
|
272
288
|
/**
|
|
273
289
|
* Audio stream for the call control.
|
|
274
290
|
* This is used to play audio for the call control.
|
|
@@ -358,7 +374,7 @@ export interface ControlProps {
|
|
|
358
374
|
*/
|
|
359
375
|
agentId: string;
|
|
360
376
|
}
|
|
361
|
-
export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'wrapupCodes' | 'toggleHold' | 'toggleRecording' | 'toggleMute' | 'isMuted' | 'endCall' | 'wrapupCall' | 'isRecording' | 'setIsRecording' | 'buddyAgents' | 'loadBuddyAgents' | 'transferCall' | 'consultCall' | 'consultConference' | 'switchToMainCall' | 'switchToConsult' | 'exitConference' | 'endConsultCall' | 'consultTransfer' | '
|
|
377
|
+
export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'wrapupCodes' | 'toggleHold' | 'toggleRecording' | 'toggleMute' | 'isMuted' | 'endCall' | 'wrapupCall' | 'isRecording' | 'setIsRecording' | 'buddyAgents' | 'loadBuddyAgents' | 'transferCall' | 'consultCall' | 'consultConference' | 'switchToMainCall' | 'switchToConsult' | 'exitConference' | 'endConsultCall' | 'consultTransfer' | 'callControlAudio' | 'consultAgentName' | 'setConsultAgentName' | 'holdTime' | 'callControlClassName' | 'callControlConsultClassName' | 'startTimestamp' | 'stateTimerLabel' | 'stateTimerTimestamp' | 'consultTimerLabel' | 'consultTimerTimestamp' | 'allowConsultToQueue' | 'lastTargetType' | 'setLastTargetType' | 'controlVisibility' | 'logger' | 'secondsUntilAutoWrapup' | 'cancelAutoWrapup' | 'conferenceParticipants' | 'getAddressBookEntries' | 'getEntryPoints' | 'getQueuesFetcher' | 'consultTransferOptions'>;
|
|
362
378
|
export type OutdialAniEntry = {
|
|
363
379
|
/** Unique identifier for the ANI entry */
|
|
364
380
|
id: string;
|
|
@@ -393,8 +409,21 @@ export interface OutdialCallProps {
|
|
|
393
409
|
* Logger instance for logging purpose.
|
|
394
410
|
*/
|
|
395
411
|
logger: ILogger;
|
|
412
|
+
/**
|
|
413
|
+
* Function to get a list of address book entries.
|
|
414
|
+
*/
|
|
415
|
+
getAddressBookEntries: (params: AddressBookEntrySearchParams) => Promise<AddressBookEntriesResponse>;
|
|
416
|
+
/**
|
|
417
|
+
* Flag to determine if the address book is enabled.
|
|
418
|
+
*/
|
|
419
|
+
isAddressBookEnabled: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* Boolean indicating if there's an active telephony task.
|
|
422
|
+
* Used to disable the outdial button when a telephony task is in progress.
|
|
423
|
+
*/
|
|
424
|
+
isTelephonyTaskActive?: boolean;
|
|
396
425
|
}
|
|
397
|
-
export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'startOutdial' | 'getOutdialANIEntries'>;
|
|
426
|
+
export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'startOutdial' | 'getOutdialANIEntries' | 'isTelephonyTaskActive' | 'getAddressBookEntries' | 'isAddressBookEnabled'>;
|
|
398
427
|
/**
|
|
399
428
|
* Interface representing the properties for CallControlListItem component.
|
|
400
429
|
*/
|
|
@@ -442,7 +471,8 @@ export interface ConsultTransferPopoverComponentProps {
|
|
|
442
471
|
*/
|
|
443
472
|
export interface CallControlConsultComponentsProps {
|
|
444
473
|
agentName: string;
|
|
445
|
-
|
|
474
|
+
consultTimerLabel: string;
|
|
475
|
+
consultTimerTimestamp: number;
|
|
446
476
|
consultTransfer: () => void;
|
|
447
477
|
endConsultCall: () => void;
|
|
448
478
|
consultConference: () => void;
|
|
@@ -560,6 +590,7 @@ export interface TaskListItemData {
|
|
|
560
590
|
declineText: string | undefined;
|
|
561
591
|
title: string;
|
|
562
592
|
disableAccept: boolean;
|
|
593
|
+
disableDecline: boolean;
|
|
563
594
|
displayState: string;
|
|
564
595
|
}
|
|
565
596
|
export declare enum TaskState {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIntersectionObserver } from './useIntersectionObserver';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface UseIntersectionObserverOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Callback function to be called when the target element intersects
|
|
4
|
+
*/
|
|
5
|
+
onIntersect: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the observer should be active
|
|
8
|
+
*/
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* IntersectionObserver options
|
|
12
|
+
*/
|
|
13
|
+
options?: IntersectionObserverInit;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Custom hook that sets up an IntersectionObserver for infinite scroll or lazy loading
|
|
17
|
+
*
|
|
18
|
+
* @param onIntersect - Callback to execute when intersection occurs
|
|
19
|
+
* @param enabled - Whether the observer is active (default: true)
|
|
20
|
+
* @param options - IntersectionObserver options (default: {threshold: 1.0})
|
|
21
|
+
* @returns ref - React ref to attach to the sentinel element
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const observerRef = useIntersectionObserver({
|
|
25
|
+
* onIntersect: loadMoreItems,
|
|
26
|
+
* enabled: hasMore && !loading,
|
|
27
|
+
* options: { threshold: 1.0 }
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* return (
|
|
31
|
+
* <div ref={observerRef} />
|
|
32
|
+
* );
|
|
33
|
+
*/
|
|
34
|
+
export declare const useIntersectionObserver: ({ onIntersect, enabled, options, }: UseIntersectionObserverOptions) => import("react").MutableRefObject<HTMLDivElement>;
|
|
35
|
+
export {};
|