@webex/cc-components 1.28.0-next.4 → 1.28.0-next.6
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 +54 -54
- package/dist/types/components/task/OutdialCall/constants.d.ts +1 -0
- package/dist/types/components/task/task.types.d.ts +28 -6
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useIntersectionObserver.d.ts +35 -0
- package/dist/wc.js +1 -1
- package/package.json +4 -4
|
@@ -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.
|
|
@@ -270,9 +270,21 @@ export interface ControlProps {
|
|
|
270
270
|
*/
|
|
271
271
|
consultTransfer: () => void;
|
|
272
272
|
/**
|
|
273
|
-
*
|
|
273
|
+
* Label for the state timer (e.g., "Wrap Up", "Post Call").
|
|
274
274
|
*/
|
|
275
|
-
|
|
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.
|
|
286
|
+
*/
|
|
287
|
+
consultTimerTimestamp?: number;
|
|
276
288
|
/**
|
|
277
289
|
* Audio stream for the call control.
|
|
278
290
|
* This is used to play audio for the call control.
|
|
@@ -362,7 +374,7 @@ export interface ControlProps {
|
|
|
362
374
|
*/
|
|
363
375
|
agentId: string;
|
|
364
376
|
}
|
|
365
|
-
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'>;
|
|
366
378
|
export type OutdialAniEntry = {
|
|
367
379
|
/** Unique identifier for the ANI entry */
|
|
368
380
|
id: string;
|
|
@@ -397,13 +409,22 @@ export interface OutdialCallProps {
|
|
|
397
409
|
* Logger instance for logging purpose.
|
|
398
410
|
*/
|
|
399
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
|
+
* Defaults to true if not provided.
|
|
419
|
+
*/
|
|
420
|
+
isAddressBookEnabled?: boolean;
|
|
400
421
|
/**
|
|
401
422
|
* Boolean indicating if there's an active telephony task.
|
|
402
423
|
* Used to disable the outdial button when a telephony task is in progress.
|
|
403
424
|
*/
|
|
404
425
|
isTelephonyTaskActive?: boolean;
|
|
405
426
|
}
|
|
406
|
-
export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'startOutdial' | 'getOutdialANIEntries' | 'isTelephonyTaskActive'>;
|
|
427
|
+
export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'startOutdial' | 'getOutdialANIEntries' | 'isTelephonyTaskActive' | 'getAddressBookEntries' | 'isAddressBookEnabled'>;
|
|
407
428
|
/**
|
|
408
429
|
* Interface representing the properties for CallControlListItem component.
|
|
409
430
|
*/
|
|
@@ -451,7 +472,8 @@ export interface ConsultTransferPopoverComponentProps {
|
|
|
451
472
|
*/
|
|
452
473
|
export interface CallControlConsultComponentsProps {
|
|
453
474
|
agentName: string;
|
|
454
|
-
|
|
475
|
+
consultTimerLabel: string;
|
|
476
|
+
consultTimerTimestamp: number;
|
|
455
477
|
consultTransfer: () => void;
|
|
456
478
|
endConsultCall: () => void;
|
|
457
479
|
consultConference: () => void;
|
|
@@ -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 {};
|