@webex/cc-components 1.28.0-next.45 → 1.28.0-next.46

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.
@@ -1,4 +1,4 @@
1
- import { BuddyDetails, ContactServiceQueue, ILogger, TaskUIControls } from '@webex/cc-store';
1
+ import { BuddyDetails, ContactServiceQueue, ILogger, ITask, TaskUIControls } from '@webex/cc-store';
2
2
  import { ButtonConfig } from '../../task.types';
3
3
  /**
4
4
  * Interface for list item data
@@ -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, controls: TaskUIControls, consultTransfer: () => void, toggleConsultMute: () => void, endConsultCall: () => void, consultConference: () => void, switchToMainCall: () => void, logger?: any, conferenceEnabled?: boolean) => ButtonConfig[];
13
+ export declare const createConsultButtons: (isMuted: boolean, controls: TaskUIControls, consultTransfer: () => void, toggleConsultMute: () => void, endConsultCall: () => void, consultConference: () => void, switchToMainCall: () => void, logger?: any, conferenceEnabled?: boolean, enableWxBetterTogether?: boolean, task?: ITask | null) => ButtonConfig[];
14
14
  /**
15
15
  * Filters buttons that should be visible
16
16
  */
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { ILogger } from '@webex/cc-store';
3
+ export type CallControlDtmfKeypadProps = {
4
+ onDigitPress: (digit: string) => void | Promise<void>;
5
+ logger?: ILogger;
6
+ disabled?: boolean;
7
+ };
8
+ /**
9
+ * In-call DTMF keypad for wxApp telephony sessions (Extension login).
10
+ * Each key press sends a single tone via SDK task.transmitDtmf().
11
+ */
12
+ declare const CallControlDtmfKeypad: React.FunctionComponent<CallControlDtmfKeypadProps>;
13
+ export default CallControlDtmfKeypad;
@@ -9,7 +9,7 @@ export declare const handleToggleHold: (isHeld: boolean, toggleHold: (hold: bool
9
9
  /**
10
10
  * Handles mute toggle functionality with disabled state management
11
11
  */
12
- export declare const handleMuteToggle: (toggleMute: () => void, setIsMuteButtonDisabled: (disabled: boolean) => void, logger: ILogger) => void;
12
+ export declare const handleMuteToggle: (toggleMute: () => void | Promise<void>, setIsMuteButtonDisabled: (disabled: boolean) => void, logger: ILogger) => Promise<void>;
13
13
  /**
14
14
  * Handles wrapup call submission
15
15
  */
@@ -26,6 +26,11 @@ export declare const handleTargetSelect: (id: string, name: string, type: Destin
26
26
  * Gets the media type information
27
27
  */
28
28
  export declare const getMediaType: (mediaType: MediaChannelType, mediaChannel: MediaChannelType, logger?: any) => MediaTypeInfo;
29
+ /**
30
+ * Thin defense layer for thick-client flag ON: suppresses visible+disabled ghost controls.
31
+ * SDK owns isVisible/isEnabled for wxApp engaged calls; widgets pass through when SDK is correct.
32
+ */
33
+ export declare const applyWxAppTelephonyControlVisibility: (buttons: CallControlButton[], task: ITask | null | undefined, controls: TaskUIControls | undefined, isTelephony: boolean, enableWxBetterTogether?: boolean, agentDeviceType?: string) => CallControlButton[];
29
34
  /**
30
35
  * Checks if the media type is telephony
31
36
  */
@@ -10,7 +10,46 @@ export declare const OutdialStrings: {
10
10
  TAB_ADDRESS_BOOK: string;
11
11
  TAB_DIALPAD: string;
12
12
  };
13
- export declare const KEY_LIST: string[];
13
+ export declare const DTMF_KEYPAD_PLACEHOLDER = "Enter the number";
14
+ /** Dialpad key metadata — mirrors Agent Desktop DIALPAD_BUTTONS_ARRAY (visual labels only). */
15
+ export declare const DIALPAD_BUTTONS: readonly [{
16
+ readonly val: "1";
17
+ readonly label: "";
18
+ }, {
19
+ readonly val: "2";
20
+ readonly label: "ABC";
21
+ }, {
22
+ readonly val: "3";
23
+ readonly label: "DEF";
24
+ }, {
25
+ readonly val: "4";
26
+ readonly label: "GHI";
27
+ }, {
28
+ readonly val: "5";
29
+ readonly label: "JKL";
30
+ }, {
31
+ readonly val: "6";
32
+ readonly label: "MNO";
33
+ }, {
34
+ readonly val: "7";
35
+ readonly label: "PQRS";
36
+ }, {
37
+ readonly val: "8";
38
+ readonly label: "TUV";
39
+ }, {
40
+ readonly val: "9";
41
+ readonly label: "WXYZ";
42
+ }, {
43
+ readonly val: "*";
44
+ readonly label: "";
45
+ }, {
46
+ readonly val: "0";
47
+ readonly label: "+";
48
+ }, {
49
+ readonly val: "#";
50
+ readonly label: "";
51
+ }];
52
+ export declare const KEY_LIST: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "*" | "#")[];
14
53
  export declare const TABS: {
15
54
  DIAL_PAD: string;
16
55
  ADDRESS_BOOK: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PressEvent } from '@react-types/shared';
3
- import type { MEDIA_CHANNEL as MediaChannelType } from '../task.types';
3
+ import type { MEDIA_CHANNEL as MediaChannelType, WxAppTelephonyErrorDisplay } from '../task.types';
4
4
  import './styles.scss';
5
5
  export interface TaskProps {
6
6
  interactionId?: string;
@@ -21,6 +21,7 @@ export interface TaskProps {
21
21
  styles?: string;
22
22
  mediaType?: MediaChannelType;
23
23
  mediaChannel?: MediaChannelType;
24
+ actionError?: WxAppTelephonyErrorDisplay | null;
24
25
  }
25
26
  declare const Task: React.FC<TaskProps>;
26
27
  export default Task;
@@ -63,7 +63,7 @@ export declare const shouldShowTimeLeft: (isIncomingTask?: boolean, ronaTimeout?
63
63
  * @param styles - Additional styles
64
64
  * @returns The combined CSS class string
65
65
  */
66
- export declare const getTaskListItemClasses: (selected?: boolean, styles?: string, logger?: any) => string;
66
+ export declare const getTaskListItemClasses: (selected?: boolean, styles?: string, logger?: any, hasActionError?: boolean) => string;
67
67
  /**
68
68
  * Extracts and processes all data needed for rendering the Task component
69
69
  * @param props - The Task component props
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { WxAppTelephonyErrorDisplay } from '../task.types';
3
+ import './telephony-action-toast.style.scss';
4
+ export type TelephonyActionToastProps = {
5
+ error: WxAppTelephonyErrorDisplay;
6
+ onDismiss: () => void;
7
+ };
8
+ declare const TelephonyActionToast: React.FunctionComponent<TelephonyActionToastProps>;
9
+ export default TelephonyActionToast;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { WxAppTelephonyErrorDisplay } from '../task.types';
3
+ import './wxapp-offer-action-error.style.scss';
4
+ export type WxAppOfferActionErrorProps = {
5
+ error: WxAppTelephonyErrorDisplay;
6
+ };
7
+ declare const WxAppOfferActionError: React.FunctionComponent<WxAppOfferActionErrorProps>;
8
+ export default WxAppOfferActionError;
@@ -156,10 +156,20 @@ export type IncomingTaskComponentProps = Pick<TaskProps, 'accept' | 'reject' | '
156
156
  };
157
157
  isDeclineButtonEnabled?: boolean;
158
158
  isBrowser?: boolean;
159
+ offerActionError?: WxAppTelephonyErrorDisplay | null;
160
+ clearOfferActionError?: () => void;
161
+ };
162
+ export type WxAppTelephonyErrorDisplay = {
163
+ message: string;
164
+ trackingId?: string;
165
+ status?: number | string;
166
+ isWxAppTelephonyError: boolean;
159
167
  };
160
168
  export type TaskListComponentProps = Pick<TaskProps, 'acceptTask' | 'declineTask' | 'onTaskSelect' | 'logger' | 'agentId' | 'cc'> & Partial<Pick<TaskProps, 'currentTask' | 'taskList' | 'hasCampaignPreviewEnabled' | 'acceptedCampaignIds'>> & {
161
169
  isDeclineButtonEnabled?: boolean;
162
170
  isBrowser?: boolean;
171
+ taskActionErrors?: Record<string, WxAppTelephonyErrorDisplay | null>;
172
+ clearTaskActionError?: (interactionId: string) => void;
163
173
  };
164
174
  export interface RealTimeTranscriptEntry {
165
175
  id: string;
@@ -258,6 +268,10 @@ export interface ControlProps {
258
268
  * Function to handle mute/unmute actions.
259
269
  */
260
270
  toggleMute: () => void;
271
+ /**
272
+ * Sends a DTMF tone on wxApp engaged telephony calls.
273
+ */
274
+ sendDtmf?: (digit: string) => void;
261
275
  /**
262
276
  * Function to handle ending the call.
263
277
  */
@@ -453,14 +467,32 @@ export interface ControlProps {
453
467
  * Agent ID of the logged-in user
454
468
  */
455
469
  agentId: string;
470
+ /**
471
+ * Host init flag `enableWxBetterTogether` (`webexConfig.cc.enableWxBetterTogether`) for wxApp
472
+ * thick-client main-bar Mute/Keypad visibility gating and wxApp mute seed gate.
473
+ */
474
+ enableWxBetterTogether?: boolean;
475
+ /**
476
+ * Logged-in agent device type (BROWSER, EXTENSION, AGENT_DN) for Extension-only ghost control suppression.
477
+ */
478
+ agentDeviceType?: string;
456
479
  }
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'>> & {
480
+ export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'isHeld' | 'wrapupCodes' | 'toggleHold' | 'toggleRecording' | 'toggleMute' | 'sendDtmf' | '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'>> & {
458
481
  /**
459
482
  * Whether the current task is an accepted campaign preview call.
460
483
  * When `true`, the header renders the campaign icon and
461
484
  * "Campaign call" label instead of the standard media type.
462
485
  */
463
486
  isCampaignCall?: boolean;
487
+ /**
488
+ * Host init flag `enableWxBetterTogether` (`webexConfig.cc.enableWxBetterTogether`) for wxApp
489
+ * thick-client main-bar Mute/Keypad visibility gating and wxApp mute seed gate.
490
+ */
491
+ enableWxBetterTogether?: boolean;
492
+ /**
493
+ * Logged-in agent device type for Extension-only ghost control suppression.
494
+ */
495
+ agentDeviceType?: string;
464
496
  };
465
497
  export type OutdialAniEntry = {
466
498
  /** Unique identifier for the ANI entry */
@@ -574,11 +606,13 @@ export interface CallControlConsultComponentsProps {
574
606
  controls: TaskUIControls;
575
607
  toggleConsultMute: () => void;
576
608
  conferenceEnabled: boolean;
609
+ enableWxBetterTogether?: boolean;
610
+ currentTask?: ITask | null;
577
611
  }
578
612
  /**
579
613
  * Type representing the possible menu types in call control.
580
614
  */
581
- export type CallControlMenuType = 'Consult' | 'Transfer' | 'ExitConference';
615
+ export type CallControlMenuType = 'Consult' | 'Transfer' | 'ExitConference' | 'Keypad';
582
616
  export declare const MEDIA_CHANNEL: {
583
617
  readonly EMAIL: "email";
584
618
  readonly CHAT: "chat";
@@ -11,7 +11,9 @@ import CampaignTaskComponent from './components/task/CampaignTask/campaign-task'
11
11
  import RealTimeTranscriptComponent from './components/task/RealTimeTranscript/real-time-transcript';
12
12
  import E911Modal from './components/StationLogin/E911Modal/e911-modal';
13
13
  import AIAssistantComponent from './components/AIAssistant/ai-assistant';
14
- export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, CampaignErrorDialogComponent, CampaignCountdownComponent, CampaignTaskComponent, RealTimeTranscriptComponent, E911Modal, AIAssistantComponent, };
14
+ import TelephonyActionToast from './components/task/TelephonyActionToast/telephony-action-toast';
15
+ import WxAppOfferActionError from './components/task/WxAppOfferActionError/wxapp-offer-action-error';
16
+ export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, CampaignErrorDialogComponent, CampaignCountdownComponent, CampaignTaskComponent, RealTimeTranscriptComponent, E911Modal, AIAssistantComponent, TelephonyActionToast, WxAppOfferActionError, };
15
17
  export * from './components/StationLogin/constants';
16
18
  export * from './components/StationLogin/E911Modal/e911-modal.types';
17
19
  export * from './components/StationLogin/station-login.types';
@@ -20,3 +22,4 @@ export * from './components/task/task.types';
20
22
  export * from './components/task/CampaignErrorDialog/campaign-error-dialog.types';
21
23
  export * from './components/task/CampaignCountdown/campaign-countdown.types';
22
24
  export * from './components/AIAssistant/ai-assistant.types';
25
+ export { isWxAppEngagedCall, shouldShowWxAppTelephonyControls } from './utils/wxapp-telephony.utils';
@@ -1,5 +1,6 @@
1
1
  import { MediaInfo } from '../components/task/task.types';
2
2
  import type { MEDIA_CHANNEL as MediaChannelType } from '../components/task/task.types';
3
+ export { isWxAppEngagedCall, shouldShowWxAppTelephonyControls } from './wxapp-telephony.utils';
3
4
  export declare const formatTime: (time: number) => string;
4
5
  /**
5
6
  * Returns media information (icon, class, label, and brand visual flag)
@@ -0,0 +1,12 @@
1
+ import { ITask } from '@webex/cc-store';
2
+ /**
3
+ * Returns true when the task represents an active wxApp thick-client telephony session.
4
+ * Visibility gate only — does not route mute or DTMF SDK calls.
5
+ */
6
+ export declare const isWxAppEngagedCall: (task: ITask | null | undefined) => boolean;
7
+ /**
8
+ * Thick-client main-bar Mute/Keypad visibility gate.
9
+ * Requires `enableWxBetterTogether` (host init flag at `webexConfig.cc.enableWxBetterTogether`)
10
+ * and an engaged wxApp call id on the task.
11
+ */
12
+ export declare const shouldShowWxAppTelephonyControls: (enableWxBetterTogether: boolean, task: ITask | null | undefined) => boolean;