@webex/cc-components 1.28.0-ccwidgets.98 → 1.28.0-next.1
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 +125 -125
- package/dist/index.js.LICENSE.txt +20 -0
- package/dist/types/components/StationLogin/station-login.d.ts +2 -4
- package/dist/types/components/StationLogin/station-login.types.d.ts +9 -3
- package/dist/types/components/StationLogin/station-login.utils.d.ts +10 -10
- package/dist/types/components/UserState/user-state.d.ts +2 -4
- package/dist/types/components/UserState/user-state.utils.d.ts +10 -8
- package/dist/types/components/task/AutoWrapupTimer/AutoWrapupTimer.utils.d.ts +25 -0
- package/dist/types/components/task/CallControl/CallControlCustom/call-control-custom.utils.d.ts +136 -0
- package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-dial-number.d.ts +5 -0
- package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-popover-hooks.d.ts +47 -0
- package/dist/types/components/task/CallControl/call-control.d.ts +2 -4
- package/dist/types/components/task/CallControl/call-control.utils.d.ts +60 -0
- package/dist/types/components/task/CallControlCAD/call-control-cad.d.ts +2 -4
- package/dist/types/components/task/IncomingTask/incoming-task.d.ts +2 -4
- package/dist/types/components/task/IncomingTask/incoming-task.utils.d.ts +1 -1
- package/dist/types/components/task/OutdialCall/constants.d.ts +9 -0
- package/dist/types/components/task/OutdialCall/outdial-call.d.ts +2 -4
- package/dist/types/components/task/Task/task.utils.d.ts +9 -9
- package/dist/types/components/task/TaskList/task-list.d.ts +2 -4
- package/dist/types/components/task/TaskList/task-list.utils.d.ts +7 -7
- package/dist/types/components/task/constants.d.ts +12 -0
- package/dist/types/components/task/task.types.d.ts +190 -53
- package/dist/wc.js +124 -124
- package/dist/wc.js.LICENSE.txt +20 -0
- package/package.json +6 -3
|
@@ -4,6 +4,26 @@
|
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/*!**********************!*\
|
|
8
|
+
!*** ./src/index.ts ***!
|
|
9
|
+
\**********************/
|
|
10
|
+
|
|
11
|
+
/*!************************!*\
|
|
12
|
+
!*** external "react" ***!
|
|
13
|
+
\************************/
|
|
14
|
+
|
|
15
|
+
/*!*****************************!*\
|
|
16
|
+
!*** ./src/withMetrics.tsx ***!
|
|
17
|
+
\*****************************/
|
|
18
|
+
|
|
19
|
+
/*!******************************!*\
|
|
20
|
+
!*** ./src/metricsLogger.ts ***!
|
|
21
|
+
\******************************/
|
|
22
|
+
|
|
23
|
+
/*!**********************************!*\
|
|
24
|
+
!*** external "@webex/cc-store" ***!
|
|
25
|
+
\**********************************/
|
|
26
|
+
|
|
7
27
|
/**
|
|
8
28
|
* @license
|
|
9
29
|
* Copyright 2017 Google LLC
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StationLoginComponentProps } from './station-login.types';
|
|
3
1
|
import './station-login.style.scss';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
2
|
+
declare const StationLoginComponentWithMetrics: any;
|
|
3
|
+
export default StationLoginComponentWithMetrics;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StationLoginSuccessResponse, LogoutSuccess } from '@webex/
|
|
1
|
+
import { StationLoginSuccessResponse, LogoutSuccess } from '@webex/contact-center';
|
|
2
2
|
import { IContactCenter, ILogger } from '@webex/cc-store';
|
|
3
|
-
import { Team } from '@webex/
|
|
3
|
+
import { Team } from '@webex/contact-center/dist/types/types';
|
|
4
4
|
/**
|
|
5
5
|
* Interface representing the properties for the Station Login component.
|
|
6
6
|
*/
|
|
@@ -164,10 +164,16 @@ export interface IStationLoginProps {
|
|
|
164
164
|
* The selected team ID for login
|
|
165
165
|
*/
|
|
166
166
|
selectedTeamId: string;
|
|
167
|
+
/**
|
|
168
|
+
* If true, hides the Desktop login mode from the dropdown options.
|
|
169
|
+
* Applies in both login screen and profile mode.
|
|
170
|
+
* Default: undefined (shows Desktop mode)
|
|
171
|
+
*/
|
|
172
|
+
hideDesktopLogin?: boolean;
|
|
167
173
|
}
|
|
168
174
|
export interface LoginOptionsState {
|
|
169
175
|
deviceType: string;
|
|
170
176
|
dialNumber: string;
|
|
171
177
|
teamId: string;
|
|
172
178
|
}
|
|
173
|
-
export type StationLoginComponentProps = Pick<IStationLoginProps, 'teams' | 'loginOptions' | 'login' | 'logout' | 'loginSuccess' | 'loginFailure' | 'logoutSuccess' | 'setDeviceType' | 'setDialNumber' | 'setTeam' | 'isAgentLoggedIn' | 'handleContinue' | 'deviceType' | 'dialNumberRegex' | 'showMultipleLoginAlert' | 'onCCSignOut' | 'setTeamId' | 'logger' | 'profileMode' | 'originalLoginOptions' | 'currentLoginOptions' | 'setCurrentLoginOptions' | 'isLoginOptionsChanged' | 'saveLoginOptions' | 'saveError' | 'setSelectedDeviceType' | 'selectedDeviceType' | 'dialNumberValue' | 'setDialNumberValue' | 'setSelectedTeamId' | 'selectedTeamId'>;
|
|
179
|
+
export type StationLoginComponentProps = Pick<IStationLoginProps, 'teams' | 'loginOptions' | 'login' | 'logout' | 'loginSuccess' | 'loginFailure' | 'logoutSuccess' | 'setDeviceType' | 'setDialNumber' | 'setTeam' | 'isAgentLoggedIn' | 'handleContinue' | 'deviceType' | 'dialNumberRegex' | 'showMultipleLoginAlert' | 'onCCSignOut' | 'setTeamId' | 'logger' | 'profileMode' | 'originalLoginOptions' | 'currentLoginOptions' | 'setCurrentLoginOptions' | 'isLoginOptionsChanged' | 'saveLoginOptions' | 'saveError' | 'setSelectedDeviceType' | 'selectedDeviceType' | 'dialNumberValue' | 'setDialNumberValue' | 'setSelectedTeamId' | 'selectedTeamId' | 'hideDesktopLogin'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const handleModals: (modalRef: any, ccSignOutModalRef: any, saveConfirmDialogRef: any, showMultipleLoginAlert: any, showCCSignOutModal: any, showSaveConfirmDialog: any) => void;
|
|
1
|
+
declare const handleModals: (modalRef: any, ccSignOutModalRef: any, saveConfirmDialogRef: any, showMultipleLoginAlert: any, showCCSignOutModal: any, showSaveConfirmDialog: any, logger: any) => void;
|
|
2
2
|
/**
|
|
3
3
|
* Handler for the Contact Center modal continue button
|
|
4
4
|
* @param modalRef
|
|
@@ -7,30 +7,30 @@ declare const handleModals: (modalRef: any, ccSignOutModalRef: any, saveConfirmD
|
|
|
7
7
|
* Handler for the Contact Center modal continue button
|
|
8
8
|
* Closes the dialog if it is currently open and calls the provided callback function
|
|
9
9
|
*/
|
|
10
|
-
declare const continueClicked: (modalRef: any, callback: any, setShowCCSignOutModal: any) => void;
|
|
10
|
+
declare const continueClicked: (modalRef: any, callback: any, setShowCCSignOutModal: any, logger: any) => void;
|
|
11
11
|
/**
|
|
12
12
|
* Handler for the Contact Center logout confirmation modal cancel button
|
|
13
13
|
*
|
|
14
14
|
* Closes the dialog if it is currently open
|
|
15
15
|
*/
|
|
16
|
-
declare const ccCancelButtonClicked: (ccSignOutModalRef: React.RefObject<HTMLDialogElement>, setShowCCSignOutModal: (show: boolean) => void) => void;
|
|
17
|
-
declare const updateDialNumberLabel: (selectedOption: string, setDialNumberLabel: (label: string) => void, setDialNumberPlaceholder: (placeholder: string) => void) => void;
|
|
16
|
+
declare const ccCancelButtonClicked: (ccSignOutModalRef: React.RefObject<HTMLDialogElement>, setShowCCSignOutModal: (show: boolean) => void, logger: any) => void;
|
|
17
|
+
declare const updateDialNumberLabel: (selectedOption: string, setDialNumberLabel: (label: string) => void, setDialNumberPlaceholder: (placeholder: string) => void, logger: any) => void;
|
|
18
18
|
/**
|
|
19
19
|
* Runs validation tests on a string given as a Dial Number
|
|
20
20
|
* @param {string} input
|
|
21
21
|
* @returns {boolean} whether or not to show a validation error
|
|
22
22
|
*/
|
|
23
|
-
declare const validateDialNumber: (input: string, dialNumberRegex: null | string, setDNErrorText: (error: string) => void) => boolean;
|
|
24
|
-
declare const createStationLoginRefs: () => {
|
|
23
|
+
declare const validateDialNumber: (input: string, dialNumberRegex: null | string, setDNErrorText: (error: string) => void, logger: any) => boolean;
|
|
24
|
+
declare const createStationLoginRefs: (logger: any) => {
|
|
25
25
|
multiSignInModalRef: import("react").MutableRefObject<HTMLDialogElement>;
|
|
26
26
|
ccSignOutModalRef: import("react").MutableRefObject<HTMLDialogElement>;
|
|
27
27
|
saveConfirmDialogRef: import("react").MutableRefObject<HTMLDialogElement>;
|
|
28
28
|
};
|
|
29
|
-
declare const saveConfirmCancelClicked: (saveConfirmDialogRef: any, setShowSaveConfirmDialog: any) => void;
|
|
30
|
-
declare const handleSaveConfirm: (saveConfirmDialogRef: any, setShowSaveConfirmDialog: any, saveLoginOptions: any) => void;
|
|
29
|
+
declare const saveConfirmCancelClicked: (saveConfirmDialogRef: any, setShowSaveConfirmDialog: any, logger: any) => void;
|
|
30
|
+
declare const handleSaveConfirm: (saveConfirmDialogRef: any, setShowSaveConfirmDialog: any, saveLoginOptions: any, logger: any) => void;
|
|
31
31
|
declare const handleLoginOptionChanged: (event: any, setDeviceType: any, setSelectedDeviceType: any, updateDialNumberLabel: any, setDialNumber: any, setDialNumberValue: any, setCurrentLoginOptions: any, originalLoginOptions: any, setDialNumberLabel: any, setDialNumberPlaceholder: any, setShowDNError: any, setSelectedTeamId: any, setTeamId: any, logger: any, selectedTeamId: any) => void;
|
|
32
32
|
declare const handleDNInputChanged: (event: any, setDialNumberValue: any, setDialNumber: any, setShowDNError: any, setDNErrorText: any, dialNumberRegex: any, setCurrentLoginOptions: any, selectedDeviceType: any, logger: any) => void;
|
|
33
33
|
declare const handleTeamSelectChanged: (event: any, setSelectedTeamId: any, setTeamId: any, setCurrentLoginOptions: any, setTeam: any, logger: any) => void;
|
|
34
|
-
declare const handleOnCCSignOut: (ccSignOutModalRef: React.RefObject<HTMLDialogElement>, onCCSignOut: any) => void;
|
|
35
|
-
declare const handleCCSignoutKeyDown: (event: React.KeyboardEvent<HTMLDialogElement>, setShowCCSignOutModal: (show: boolean) => void) => void;
|
|
34
|
+
declare const handleOnCCSignOut: (ccSignOutModalRef: React.RefObject<HTMLDialogElement>, onCCSignOut: any, logger: any) => void;
|
|
35
|
+
declare const handleCCSignoutKeyDown: (event: React.KeyboardEvent<HTMLDialogElement>, setShowCCSignOutModal: (show: boolean) => void, logger: any) => void;
|
|
36
36
|
export { handleModals, continueClicked, ccCancelButtonClicked, updateDialNumberLabel, validateDialNumber, createStationLoginRefs, saveConfirmCancelClicked, handleSaveConfirm, handleLoginOptionChanged, handleDNInputChanged, handleTeamSelectChanged, handleOnCCSignOut, handleCCSignoutKeyDown, };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UserStateComponentsProps } from './user-state.types';
|
|
3
1
|
import './user-state.scss';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
2
|
+
declare const UserStateComponentWithMetrics: any;
|
|
3
|
+
export default UserStateComponentWithMetrics;
|
|
@@ -2,21 +2,22 @@ import { ICustomState, IdleCode } from '@webex/cc-store';
|
|
|
2
2
|
/**
|
|
3
3
|
* Gets the CSS class for the dropdown based on current state
|
|
4
4
|
*/
|
|
5
|
-
export declare const getDropdownClass: (customState: ICustomState, currentState: string, idleCodes: IdleCode[]) => string;
|
|
5
|
+
export declare const getDropdownClass: (customState: ICustomState, currentState: string, idleCodes: IdleCode[], logger?: any) => string;
|
|
6
6
|
/**
|
|
7
7
|
* Gets the icon style configuration for a given item
|
|
8
8
|
*/
|
|
9
9
|
export declare const getIconStyle: (item: {
|
|
10
10
|
id: string;
|
|
11
11
|
name: string;
|
|
12
|
-
|
|
12
|
+
developerName?: string;
|
|
13
|
+
}, logger?: any) => {
|
|
13
14
|
class: string;
|
|
14
15
|
iconName: string;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* Gets the tooltip text based on current state
|
|
18
19
|
*/
|
|
19
|
-
export declare const getTooltipText: (customState: ICustomState, currentState: string, idleCodes: IdleCode[]) => string;
|
|
20
|
+
export declare const getTooltipText: (customState: ICustomState, currentState: string, idleCodes: IdleCode[], logger?: any) => string;
|
|
20
21
|
/**
|
|
21
22
|
* Handles selection change in the dropdown
|
|
22
23
|
*/
|
|
@@ -27,22 +28,23 @@ export declare const handleSelectionChange: (key: string, currentState: string,
|
|
|
27
28
|
export declare const sortDropdownItems: (items: Array<{
|
|
28
29
|
id: string;
|
|
29
30
|
name: string;
|
|
30
|
-
}
|
|
31
|
+
}>, logger?: any) => Array<{
|
|
31
32
|
id: string;
|
|
32
33
|
name: string;
|
|
33
34
|
}>;
|
|
34
35
|
/**
|
|
35
36
|
* Gets the previous selectable state (first non-RONA/Engaged state)
|
|
36
37
|
*/
|
|
37
|
-
export declare const getPreviousSelectableState: (idleCodes: IdleCode[]) => string;
|
|
38
|
+
export declare const getPreviousSelectableState: (idleCodes: IdleCode[], logger?: any) => string;
|
|
38
39
|
/**
|
|
39
40
|
* Gets the selected key for the dropdown
|
|
40
41
|
*/
|
|
41
|
-
export declare const getSelectedKey: (customState: ICustomState, currentState: string, idleCodes: IdleCode[]) => string;
|
|
42
|
+
export declare const getSelectedKey: (customState: ICustomState, currentState: string, idleCodes: IdleCode[], logger?: any) => string;
|
|
42
43
|
/**
|
|
43
|
-
* Builds the dropdown items including custom state
|
|
44
|
+
* Builds the dropdown items including custom state and conditional RONA
|
|
44
45
|
*/
|
|
45
|
-
export declare const buildDropdownItems: (customState: ICustomState, idleCodes: IdleCode[]) => Array<{
|
|
46
|
+
export declare const buildDropdownItems: (customState: ICustomState, idleCodes: IdleCode[], currentState: string, logger?: any) => Array<{
|
|
46
47
|
id: string;
|
|
47
48
|
name: string;
|
|
49
|
+
developerName?: string;
|
|
48
50
|
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TimerUIState } from '../task.types';
|
|
2
|
+
/**
|
|
3
|
+
* Determines if the timer is in urgent state (10 seconds or less)
|
|
4
|
+
*/
|
|
5
|
+
export declare const isTimerUrgent: (secondsUntilAutoWrapup: number, logger?: any) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Gets the appropriate container CSS class based on urgency
|
|
8
|
+
*/
|
|
9
|
+
export declare const getContainerClassName: (isUrgent: boolean, logger?: any) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Gets the appropriate icon CSS class based on urgency
|
|
12
|
+
*/
|
|
13
|
+
export declare const getIconClassName: (isUrgent: boolean, logger?: any) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Gets the appropriate icon name based on urgency
|
|
16
|
+
*/
|
|
17
|
+
export declare const getIconName: (isUrgent: boolean, logger?: any) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Formats seconds into MM:SS format
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatTimerDisplay: (secondsUntilAutoWrapup: number, logger?: any) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Gets all timer-related UI state in one object
|
|
24
|
+
*/
|
|
25
|
+
export declare const getTimerUIState: (secondsUntilAutoWrapup: number, logger?: any) => TimerUIState;
|
package/dist/types/components/task/CallControl/CallControlCustom/call-control-custom.utils.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { BuddyDetails, ContactServiceQueue, ILogger } from '@webex/cc-store';
|
|
2
|
+
import { ButtonConfig, ControlVisibility } from '../../task.types';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for list item data
|
|
5
|
+
*/
|
|
6
|
+
export interface ListItemData {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates the consult button configuration array
|
|
12
|
+
*/
|
|
13
|
+
export declare const createConsultButtons: (isMuted: boolean, controlVisibility: ControlVisibility, consultTransfer: () => void, toggleConsultMute: () => void, endConsultCall: () => void, consultConference: () => void, switchToMainCall: () => void, logger?: any) => ButtonConfig[];
|
|
14
|
+
/**
|
|
15
|
+
* Filters buttons that should be visible
|
|
16
|
+
*/
|
|
17
|
+
export declare const getVisibleButtons: (buttons: ButtonConfig[], logger?: any) => ButtonConfig[];
|
|
18
|
+
/**
|
|
19
|
+
* Creates initials from a name string
|
|
20
|
+
*/
|
|
21
|
+
export declare const createInitials: (name: string, logger?: any) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the consult status text based on completion state
|
|
24
|
+
*/
|
|
25
|
+
export declare const getConsultStatusText: (consultInitiated: boolean, logger?: any) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Handles list item button press with logging
|
|
28
|
+
*/
|
|
29
|
+
export declare const handleListItemPress: (title: string, onButtonPress: () => void, logger: ILogger) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Determines if tabs should be shown based on available data
|
|
32
|
+
*/
|
|
33
|
+
export declare const shouldShowTabs: (buddyAgents: BuddyDetails[], queues: ContactServiceQueue[], logger?: any) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Checks if agents list is empty
|
|
36
|
+
*/
|
|
37
|
+
export declare const isAgentsEmpty: (buddyAgents: BuddyDetails[], logger?: any) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if queues list is empty
|
|
40
|
+
*/
|
|
41
|
+
export declare const isQueuesEmpty: (queues: ContactServiceQueue[], logger?: any) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Handles tab selection with logging
|
|
44
|
+
*/
|
|
45
|
+
export declare const handleTabSelection: (key: string, setSelectedTab: (tab: string) => void, logger: ILogger) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Handles agent selection with logging
|
|
48
|
+
*/
|
|
49
|
+
export declare const handleAgentSelection: (agentId: string, agentName: string, allowParticipantsToInteract: boolean, onAgentSelect: ((agentId: string, agentName: string, allowParticipantsToInteract: boolean) => void) | undefined, logger: ILogger) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Handles queue selection with logging
|
|
52
|
+
*/
|
|
53
|
+
export declare const handleQueueSelection: (queueId: string, queueName: string, allowParticipantsToInteract: boolean, onQueueSelect: ((queueId: string, queueName: string, allowParticipantsToInteract: boolean) => void) | undefined, logger: ILogger) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Gets the appropriate empty state message based on context
|
|
56
|
+
*/
|
|
57
|
+
export declare const getEmptyStateMessage: (selectedTab: string, showTabs: boolean, logger?: any) => string;
|
|
58
|
+
/**
|
|
59
|
+
* Creates list item data from buddy agents
|
|
60
|
+
*/
|
|
61
|
+
export declare const createAgentListData: (buddyAgents: BuddyDetails[], logger?: any) => ListItemData[];
|
|
62
|
+
/**
|
|
63
|
+
* Creates list item data from queues
|
|
64
|
+
*/
|
|
65
|
+
export declare const createQueueListData: (queues: ContactServiceQueue[], logger?: any) => ListItemData[];
|
|
66
|
+
/**
|
|
67
|
+
* Creates a timer key based on timestamp
|
|
68
|
+
*/
|
|
69
|
+
export declare const createTimerKey: (startTimeStamp: number, logger?: any) => string;
|
|
70
|
+
/**
|
|
71
|
+
* Handles popover open with logging
|
|
72
|
+
*/
|
|
73
|
+
export declare const handlePopoverOpen: (menuType: string, setActiveMenu: (menu: string) => void, logger: ILogger) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Handles popover close with logging
|
|
76
|
+
*/
|
|
77
|
+
export declare const handlePopoverClose: (setActiveMenu: (menu: string | null) => void, logger: ILogger) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Handles hold toggle with logging
|
|
80
|
+
*/
|
|
81
|
+
export declare const handleHoldToggle: (toggleHold: (() => void) | undefined, logger: ILogger) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Handles wrapup call with logging
|
|
84
|
+
*/
|
|
85
|
+
export declare const handleWrapupCall: (onWrapupCall: (() => void) | undefined, logger: ILogger) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Validates if a menu type is supported
|
|
88
|
+
*/
|
|
89
|
+
export declare const isValidMenuType: (menuType: string, logger?: any) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Gets button style class based on state
|
|
92
|
+
*/
|
|
93
|
+
export declare const getButtonStyleClass: (isActive: boolean, isDisabled: boolean, baseClass?: string, logger?: any) => string;
|
|
94
|
+
/**
|
|
95
|
+
* Formats elapsed time for display
|
|
96
|
+
*/
|
|
97
|
+
export declare const formatElapsedTime: (startTime: number, logger?: any) => string;
|
|
98
|
+
/**
|
|
99
|
+
* Checks if an agent is available for selection
|
|
100
|
+
*/
|
|
101
|
+
export declare const isAgentAvailable: (agent: BuddyDetails, logger?: any) => boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Checks if a queue is available for selection
|
|
104
|
+
*/
|
|
105
|
+
export declare const isQueueAvailable: (queue: ContactServiceQueue, logger?: any) => boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Filters available agents
|
|
108
|
+
*/
|
|
109
|
+
export declare const filterAvailableAgents: (agents: BuddyDetails[], logger?: any) => BuddyDetails[];
|
|
110
|
+
/**
|
|
111
|
+
* Filters buddy agents by a free-text query across name, dn and id.
|
|
112
|
+
*/
|
|
113
|
+
export declare const filterAgentsByQuery: (agents: BuddyDetails[], query: string) => BuddyDetails[];
|
|
114
|
+
/**
|
|
115
|
+
* Returns agents to display for current category, applying search only for Agents tab, since other tabs support via the SDK
|
|
116
|
+
*/
|
|
117
|
+
export declare const getAgentsForDisplay: (selectedCategory: "Agents" | string, agents: BuddyDetails[], query: string) => BuddyDetails[];
|
|
118
|
+
/**
|
|
119
|
+
* Filters available queues
|
|
120
|
+
*/
|
|
121
|
+
export declare const filterAvailableQueues: (queues: ContactServiceQueue[], logger?: any) => ContactServiceQueue[];
|
|
122
|
+
/**
|
|
123
|
+
* Debounces a function call
|
|
124
|
+
*/
|
|
125
|
+
export declare const debounce: <T extends (...args: unknown[]) => unknown>(func: T, wait: number, logger?: any) => ((...args: Parameters<T>) => void);
|
|
126
|
+
/**
|
|
127
|
+
* Helpers for Dial Number / Entry Point manual actions
|
|
128
|
+
*/
|
|
129
|
+
export declare const shouldAddConsultTransferAction: (selectedCategory: string, isEntryPointTabVisible: boolean, allowParticipantsToInteract: boolean, query: string, entryPoints: {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
}[], onDialNumberSelect: (dialNumber: string, allowParticipantsToInteract: boolean) => void, onEntryPointSelect: (entryPointId: string, entryPointName: string, allowParticipantsToInteract: boolean) => void) => {
|
|
133
|
+
visible: boolean;
|
|
134
|
+
onClick?: () => void;
|
|
135
|
+
title?: string;
|
|
136
|
+
};
|
package/dist/types/components/task/CallControl/CallControlCustom/consult-transfer-popover-hooks.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AddressBookEntry, ILogger, FetchPaginatedList, TransformPaginatedData } from '@webex/cc-store';
|
|
2
|
+
import { CategoryType, UseConsultTransferParams } from '../../task.types';
|
|
3
|
+
/**
|
|
4
|
+
* React hook to load, transform and manage paginated data with optional search.
|
|
5
|
+
*
|
|
6
|
+
* @template T - The item type returned by the provided `fetchFunction` (raw API/entity).
|
|
7
|
+
* @template U - The transformed item type stored internally and returned to consumers.
|
|
8
|
+
* @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
|
+
* @param categoryName - Human-readable name used for logging/telemetry.
|
|
11
|
+
* @param logger - Optional logger instance for diagnostics.
|
|
12
|
+
* @returns An object containing the transformed data (U[]), pagination state and helpers.
|
|
13
|
+
*/
|
|
14
|
+
export declare const usePaginatedData: <T, U>(fetchFunction: FetchPaginatedList<T> | undefined, transformFunction: TransformPaginatedData<T, U>, categoryName: string, logger?: ILogger) => {
|
|
15
|
+
data: U[];
|
|
16
|
+
page: number;
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
loadData: (currentPage?: any, search?: any, reset?: any) => Promise<void>;
|
|
20
|
+
reset: () => void;
|
|
21
|
+
};
|
|
22
|
+
export declare function useConsultTransferPopover({ showDialNumberTab, showEntryPointTab, getAddressBookEntries, getEntryPoints, getQueues, logger, }: UseConsultTransferParams): {
|
|
23
|
+
selectedCategory: CategoryType;
|
|
24
|
+
searchQuery: string;
|
|
25
|
+
loadMoreRef: import("react").MutableRefObject<HTMLDivElement>;
|
|
26
|
+
dialNumbers: AddressBookEntry[];
|
|
27
|
+
hasMoreDialNumbers: boolean;
|
|
28
|
+
loadingDialNumbers: boolean;
|
|
29
|
+
entryPoints: {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}[];
|
|
33
|
+
hasMoreEntryPoints: boolean;
|
|
34
|
+
loadingEntryPoints: boolean;
|
|
35
|
+
queuesData: {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
}[];
|
|
40
|
+
hasMoreQueues: boolean;
|
|
41
|
+
loadingQueues: boolean;
|
|
42
|
+
handleSearchChange: (value: string) => void;
|
|
43
|
+
handleAgentsClick: () => void;
|
|
44
|
+
handleQueuesClick: () => void;
|
|
45
|
+
handleDialNumberClick: () => void;
|
|
46
|
+
handleEntryPointClick: () => void;
|
|
47
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CallControlComponentProps } from '../task.types';
|
|
3
1
|
import './call-control.styles.scss';
|
|
4
|
-
declare
|
|
5
|
-
export default
|
|
2
|
+
declare const CallControlComponentWithMetrics: any;
|
|
3
|
+
export default CallControlComponentWithMetrics;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CallControlMenuType } from '../task.types';
|
|
2
|
+
import type { CallControlButton, ControlVisibility, MEDIA_CHANNEL as MediaChannelType, MediaTypeInfo } from '../task.types';
|
|
3
|
+
import { DestinationType, ILogger, ITask } from '@webex/cc-store';
|
|
4
|
+
/**
|
|
5
|
+
* Handles toggle hold functionality
|
|
6
|
+
*/
|
|
7
|
+
export declare const handleToggleHold: (isHeld: boolean, toggleHold: (hold: boolean) => void, logger: ILogger) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Handles mute toggle functionality with disabled state management
|
|
10
|
+
*/
|
|
11
|
+
export declare const handleMuteToggle: (toggleMute: () => void, setIsMuteButtonDisabled: (disabled: boolean) => void, logger: ILogger) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Handles wrapup call submission
|
|
14
|
+
*/
|
|
15
|
+
export declare const handleWrapupCall: (selectedWrapupReason: string | null, selectedWrapupId: string | null, wrapupCall: (reason: string, id: string) => void, setSelectedWrapupReason: (reason: string | null) => void, setSelectedWrapupId: (id: string | null) => void, logger: ILogger) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Handles wrapup reason change
|
|
18
|
+
*/
|
|
19
|
+
export declare const handleWrapupChange: (text: string, value: string, setSelectedWrapupReason: (reason: string) => void, setSelectedWrapupId: (id: string) => void, logger?: any) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Handles target selection for consult/transfer
|
|
22
|
+
*/
|
|
23
|
+
export declare const handleTargetSelect: (id: string, name: string, type: DestinationType, allowParticipantsToInteract: boolean, agentMenuType: CallControlMenuType | null, consultCall: (id: string, type: DestinationType, allowParticipantsToInteract: boolean) => void, transferCall: (id: string, type: DestinationType) => void, setConsultAgentName: (name: string) => void, setLastTargetType: (type: DestinationType) => void, logger: ILogger) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the media type information
|
|
26
|
+
*/
|
|
27
|
+
export declare const getMediaType: (mediaType: MediaChannelType, mediaChannel: MediaChannelType, logger?: any) => MediaTypeInfo;
|
|
28
|
+
/**
|
|
29
|
+
* Checks if the media type is telephony
|
|
30
|
+
*/
|
|
31
|
+
export declare const isTelephonyMediaType: (mediaType: MediaChannelType, logger?: any) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Builds the call control buttons configuration
|
|
34
|
+
*/
|
|
35
|
+
export declare const buildCallControlButtons: (isMuted: boolean, isRecording: boolean, isMuteButtonDisabled: boolean, currentMediaType: MediaTypeInfo, controlVisibility: ControlVisibility, handleMuteToggleFunc: () => void, handleToggleHoldFunc: () => void, toggleRecording: () => void, endCall: () => void, exitConference: () => void, switchToConsult: () => void, onTransferConsult: () => void, handleConsultConferencePress: () => void, logger?: ILogger) => CallControlButton[];
|
|
36
|
+
/**
|
|
37
|
+
* Filters buttons based on consultation state
|
|
38
|
+
*/
|
|
39
|
+
export declare const filterButtonsForConsultation: (buttons: CallControlButton[], consultInitiated: boolean, isTelephony: boolean, logger?: any) => CallControlButton[];
|
|
40
|
+
/**
|
|
41
|
+
* Updates call state from current task data
|
|
42
|
+
*/
|
|
43
|
+
export declare const updateCallStateFromTask: (currentTask: ITask, setIsRecording: (recording: boolean) => void, logger?: any) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Handles close button press for popover components
|
|
46
|
+
*/
|
|
47
|
+
export declare const handleCloseButtonPress: (setShowAgentMenu: (show: boolean) => void, setAgentMenuType: (type: CallControlMenuType | null) => void, logger?: any) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Handles wrapup reason selection change event
|
|
50
|
+
*/
|
|
51
|
+
export declare const handleWrapupReasonChange: (event: CustomEvent, wrapupCodes: Array<{
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
}> | undefined, handleWrapupChange: (text: string, value: string, logger?: any) => void, logger?: any) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Handles audio element ref assignment
|
|
57
|
+
*/
|
|
58
|
+
export declare const handleAudioRef: (audioElement: HTMLAudioElement | null, callControlAudio: MediaStream | null, logger?: any) => void;
|
|
59
|
+
export declare const onInputDialNumber: (e: any, setValue: any) => void;
|
|
60
|
+
export declare const handleButtonPress: (logger: any, onButtonPress: any, value: any) => void;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './call-control-cad.styles.scss';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default CallControlCADComponent;
|
|
2
|
+
declare const CallControlCADComponentWithMetrics: any;
|
|
3
|
+
export default CallControlCADComponentWithMetrics;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const IncomingTaskComponent: React.FunctionComponent<IncomingTaskComponentProps>;
|
|
4
|
-
export default IncomingTaskComponent;
|
|
1
|
+
declare const IncomingTaskComponentWithMetrics: any;
|
|
2
|
+
export default IncomingTaskComponentWithMetrics;
|
|
@@ -20,4 +20,4 @@ export interface IncomingTaskData {
|
|
|
20
20
|
* @param isBrowser - Whether the device type is browser
|
|
21
21
|
* @returns Processed task data with computed values
|
|
22
22
|
*/
|
|
23
|
-
export declare const extractIncomingTaskData: (incomingTask: ITask, isBrowser: boolean) => IncomingTaskData;
|
|
23
|
+
export declare const extractIncomingTaskData: (incomingTask: ITask, isBrowser: boolean, logger?: any) => IncomingTaskData;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { OutdialCallComponentProps } from '../task.types';
|
|
3
1
|
import './outdial-call.style.scss';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
2
|
+
declare const OutdialCallComponentWithMetrics: any;
|
|
3
|
+
export default OutdialCallComponentWithMetrics;
|
|
@@ -4,20 +4,20 @@ import type { MEDIA_CHANNEL as MediaChannelType, TaskComponentData } from '../ta
|
|
|
4
4
|
* @param str - The string to capitalize
|
|
5
5
|
* @returns The string with the first word capitalized
|
|
6
6
|
*/
|
|
7
|
-
export declare const capitalizeFirstWord: (str: string) => string;
|
|
7
|
+
export declare const capitalizeFirstWord: (str: string, logger?: any) => string;
|
|
8
8
|
/**
|
|
9
9
|
* Gets the correct CSS class name for the task title
|
|
10
10
|
* @param isNonVoiceMedia - Whether the media type is non-voice
|
|
11
11
|
* @param isIncomingTask - Whether this is an incoming task
|
|
12
12
|
* @returns The appropriate CSS class name
|
|
13
13
|
*/
|
|
14
|
-
export declare const getTitleClassName: (isNonVoiceMedia: boolean, isIncomingTask: boolean) => string;
|
|
14
|
+
export declare const getTitleClassName: (isNonVoiceMedia: boolean, isIncomingTask: boolean, logger?: any) => string;
|
|
15
15
|
/**
|
|
16
16
|
* Creates unique IDs for tooltip elements
|
|
17
17
|
* @param interactionId - The interaction ID
|
|
18
18
|
* @returns Object with tooltip trigger and tooltip IDs
|
|
19
19
|
*/
|
|
20
|
-
export declare const createTooltipIds: (interactionId?: string) => {
|
|
20
|
+
export declare const createTooltipIds: (interactionId?: string, logger?: any) => {
|
|
21
21
|
tooltipTriggerId: string;
|
|
22
22
|
tooltipId: string;
|
|
23
23
|
};
|
|
@@ -27,14 +27,14 @@ export declare const createTooltipIds: (interactionId?: string) => {
|
|
|
27
27
|
* @param isIncomingTask - Whether this is an incoming task
|
|
28
28
|
* @returns Whether to show the state
|
|
29
29
|
*/
|
|
30
|
-
export declare const shouldShowState: (state?: string, isIncomingTask?: boolean) => boolean;
|
|
30
|
+
export declare const shouldShowState: (state?: string, isIncomingTask?: boolean, logger?: any) => boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Determines if the queue should be shown
|
|
33
33
|
* @param queue - The queue name
|
|
34
34
|
* @param isIncomingTask - Whether this is an incoming task
|
|
35
35
|
* @returns Whether to show the queue
|
|
36
36
|
*/
|
|
37
|
-
export declare const shouldShowQueue: (queue?: string, isIncomingTask?: boolean) => boolean;
|
|
37
|
+
export declare const shouldShowQueue: (queue?: string, isIncomingTask?: boolean, logger?: any) => boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Determines if handle time should be shown
|
|
40
40
|
* @param isIncomingTask - Whether this is an incoming task
|
|
@@ -42,21 +42,21 @@ export declare const shouldShowQueue: (queue?: string, isIncomingTask?: boolean)
|
|
|
42
42
|
* @param startTimeStamp - The start timestamp
|
|
43
43
|
* @returns Whether to show handle time
|
|
44
44
|
*/
|
|
45
|
-
export declare const shouldShowHandleTime: (isIncomingTask?: boolean, ronaTimeout?: number, startTimeStamp?: number) => boolean;
|
|
45
|
+
export declare const shouldShowHandleTime: (isIncomingTask?: boolean, ronaTimeout?: number, startTimeStamp?: number, logger?: any) => boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Determines if time left should be shown
|
|
48
48
|
* @param isIncomingTask - Whether this is an incoming task
|
|
49
49
|
* @param ronaTimeout - The RONA timeout value
|
|
50
50
|
* @returns Whether to show time left
|
|
51
51
|
*/
|
|
52
|
-
export declare const shouldShowTimeLeft: (isIncomingTask?: boolean, ronaTimeout?: number) => boolean;
|
|
52
|
+
export declare const shouldShowTimeLeft: (isIncomingTask?: boolean, ronaTimeout?: number, logger?: any) => boolean;
|
|
53
53
|
/**
|
|
54
54
|
* Gets the task list item CSS classes
|
|
55
55
|
* @param selected - Whether the task is selected
|
|
56
56
|
* @param styles - Additional styles
|
|
57
57
|
* @returns The combined CSS class string
|
|
58
58
|
*/
|
|
59
|
-
export declare const getTaskListItemClasses: (selected?: boolean, styles?: string) => string;
|
|
59
|
+
export declare const getTaskListItemClasses: (selected?: boolean, styles?: string, logger?: any) => string;
|
|
60
60
|
/**
|
|
61
61
|
* Extracts and processes all data needed for rendering the Task component
|
|
62
62
|
* @param props - The Task component props
|
|
@@ -73,4 +73,4 @@ export declare const extractTaskComponentData: ({ mediaType, mediaChannel, isInc
|
|
|
73
73
|
startTimeStamp?: number;
|
|
74
74
|
acceptText?: string;
|
|
75
75
|
declineText?: string;
|
|
76
|
-
}) => TaskComponentData;
|
|
76
|
+
}, logger?: any) => TaskComponentData;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TaskListComponentProps } from '../task.types';
|
|
3
1
|
import './styles.scss';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
2
|
+
declare const TaskListComponentWithMetrics: any;
|
|
3
|
+
export default TaskListComponentWithMetrics;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TaskListItemData } from '../task.types';
|
|
2
|
-
import { ITask } from '@webex/cc-store';
|
|
2
|
+
import { ILogger, ITask } from '@webex/cc-store';
|
|
3
3
|
/**
|
|
4
4
|
* Extracts and processes data from a task for rendering in the task list
|
|
5
5
|
* @param task - The task object
|
|
6
6
|
* @param isBrowser - Whether the device type is browser
|
|
7
7
|
* @returns Processed task data with computed values
|
|
8
8
|
*/
|
|
9
|
-
export declare const extractTaskListItemData: (task: ITask, isBrowser: boolean) => TaskListItemData;
|
|
9
|
+
export declare const extractTaskListItemData: (task: ITask, isBrowser: boolean, agentId: string, logger?: ILogger) => TaskListItemData;
|
|
10
10
|
/**
|
|
11
11
|
* Determines if a task should be selectable
|
|
12
12
|
* @param task - The task object
|
|
@@ -14,26 +14,26 @@ export declare const extractTaskListItemData: (task: ITask, isBrowser: boolean)
|
|
|
14
14
|
* @param taskData - Processed task data
|
|
15
15
|
* @returns Whether the task should be selectable
|
|
16
16
|
*/
|
|
17
|
-
export declare const isTaskSelectable: (task: ITask, currentTask: ITask | null, taskData: TaskListItemData) => boolean;
|
|
17
|
+
export declare const isTaskSelectable: (task: ITask, currentTask: ITask | null, taskData: TaskListItemData, logger?: any) => boolean;
|
|
18
18
|
/**
|
|
19
19
|
* Determines if the current task is selected
|
|
20
20
|
* @param task - The task object
|
|
21
21
|
* @param currentTask - The currently selected task
|
|
22
22
|
* @returns Whether this task is currently selected
|
|
23
23
|
*/
|
|
24
|
-
export declare const isCurrentTaskSelected: (task: ITask, currentTask: ITask | null) => boolean;
|
|
24
|
+
export declare const isCurrentTaskSelected: (task: ITask, currentTask: ITask | null, logger?: any) => boolean;
|
|
25
25
|
/**
|
|
26
26
|
* Validates if a task list is empty or invalid
|
|
27
27
|
* @param taskList - The task list object
|
|
28
28
|
* @returns Whether the task list is empty or invalid
|
|
29
29
|
*/
|
|
30
|
-
export declare const isTaskListEmpty: (taskList: Record<string, ITask> | null | undefined) => boolean;
|
|
30
|
+
export declare const isTaskListEmpty: (taskList: Record<string, ITask> | null | undefined, logger?: any) => boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Gets tasks as an array from the task list object
|
|
33
33
|
* @param taskList - The task list object
|
|
34
34
|
* @returns Array of tasks
|
|
35
35
|
*/
|
|
36
|
-
export declare const getTasksArray: (taskList: Record<string, ITask> | null | undefined) => ITask[];
|
|
36
|
+
export declare const getTasksArray: (taskList: Record<string, ITask> | null | undefined, logger?: any) => ITask[];
|
|
37
37
|
/**
|
|
38
38
|
* Creates task select handler with logging
|
|
39
39
|
* @param task - The task to select
|
|
@@ -42,4 +42,4 @@ export declare const getTasksArray: (taskList: Record<string, ITask> | null | un
|
|
|
42
42
|
* @param logger - The logger instance
|
|
43
43
|
* @returns Task select handler function
|
|
44
44
|
*/
|
|
45
|
-
export declare const createTaskSelectHandler: (task: ITask, currentTask: ITask | null, onTaskSelect: (task: ITask) => void) => () => void;
|
|
45
|
+
export declare const createTaskSelectHandler: (task: ITask, currentTask: ITask | null, onTaskSelect: (task: ITask) => void, agentId: string, logger?: any) => () => void;
|