@webex/cc-components 1.28.0-next.4 → 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.
@@ -5,5 +5,6 @@ export declare const OutdialStrings: {
5
5
  DN_PLACEHOLDER: string;
6
6
  INCORRECT_DN_FORMAT: string;
7
7
  OUTDIAL_CALL: string;
8
+ ADDRESS_BOOK_SEARCH_PLACEHOLDER: string;
8
9
  };
9
10
  export declare const KEY_LIST: string[];
@@ -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
- * Timestamp when the consult call started.
273
+ * Label for the state timer (e.g., "Wrap Up", "Post Call").
274
274
  */
275
- consultStartTimeStamp?: number;
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' | 'consultStartTimeStamp' | 'callControlAudio' | 'consultAgentName' | 'setConsultAgentName' | 'holdTime' | 'callControlClassName' | 'callControlConsultClassName' | 'startTimestamp' | 'allowConsultToQueue' | 'lastTargetType' | 'setLastTargetType' | 'controlVisibility' | 'logger' | 'secondsUntilAutoWrapup' | 'cancelAutoWrapup' | 'conferenceParticipants' | 'getAddressBookEntries' | 'getEntryPoints' | 'getQueuesFetcher' | 'consultTransferOptions'>;
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,21 @@ 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
+ */
419
+ isAddressBookEnabled: boolean;
400
420
  /**
401
421
  * Boolean indicating if there's an active telephony task.
402
422
  * Used to disable the outdial button when a telephony task is in progress.
403
423
  */
404
424
  isTelephonyTaskActive?: boolean;
405
425
  }
406
- export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'startOutdial' | 'getOutdialANIEntries' | 'isTelephonyTaskActive'>;
426
+ export type OutdialCallComponentProps = Pick<OutdialCallProps, 'logger' | 'startOutdial' | 'getOutdialANIEntries' | 'isTelephonyTaskActive' | 'getAddressBookEntries' | 'isAddressBookEnabled'>;
407
427
  /**
408
428
  * Interface representing the properties for CallControlListItem component.
409
429
  */
@@ -451,7 +471,8 @@ export interface ConsultTransferPopoverComponentProps {
451
471
  */
452
472
  export interface CallControlConsultComponentsProps {
453
473
  agentName: string;
454
- startTimeStamp: number;
474
+ consultTimerLabel: string;
475
+ consultTimerTimestamp: number;
455
476
  consultTransfer: () => void;
456
477
  endConsultCall: () => void;
457
478
  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 {};