@webex/cc-components 1.28.0-ccwidgets.70 → 1.28.0-ccwidgets.72

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.
@@ -134,10 +134,38 @@ export interface IStationLoginProps {
134
134
  * Called when save ends (true=success, false=error)
135
135
  */
136
136
  onSaveEnd?: (isComplete: boolean) => void;
137
+ /**
138
+ * Handler to set the selected device type
139
+ */
140
+ setSelectedDeviceType: (deviceType: string) => void;
141
+ /**
142
+ * The selected device type for login
143
+ */
144
+ selectedDeviceType: string;
145
+ /**
146
+ * The entered dial number value
147
+ */
148
+ dialNumberValue: string;
149
+ /**
150
+ * Handler to set the entered dial number value
151
+ */
152
+ setDialNumberValue: (value: string) => void;
153
+ /**
154
+ * Handler to set the selected team ID
155
+ */
156
+ setSelectedTeamId: (teamId: string) => void;
157
+ /**
158
+ * The selected team ID for login
159
+ */
160
+ selectedTeamId: string;
161
+ /**
162
+ * The selected option for login type (e.g., 'Extension', 'Agent DN', etc.)
163
+ */
164
+ selectedOption: string;
137
165
  }
138
166
  export interface LoginOptionsState {
139
167
  deviceType: string;
140
168
  dialNumber: string;
141
169
  teamId: string;
142
170
  }
143
- export type StationLoginComponentProps = Pick<IStationLoginProps, 'teams' | 'loginOptions' | 'login' | 'logout' | 'loginSuccess' | 'loginFailure' | 'logoutSuccess' | 'setDeviceType' | 'setDialNumber' | 'setTeam' | 'isAgentLoggedIn' | 'handleContinue' | 'deviceType' | 'dialNumber' | 'dialNumberRegex' | 'showMultipleLoginAlert' | 'onCCSignOut' | 'teamId' | 'setTeamId' | 'logger' | 'profileMode' | 'originalLoginOptions' | 'currentLoginOptions' | 'setCurrentLoginOptions' | 'isLoginOptionsChanged' | 'saveLoginOptions' | 'saveError'>;
171
+ 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' | 'selectedOption'>;
@@ -0,0 +1,35 @@
1
+ declare const handleModals: (modalRef: any, ccSignOutModalRef: any, saveConfirmDialogRef: any, showMultipleLoginAlert: any, showCCSignOutModal: any, showSaveConfirmDialog: any) => void;
2
+ /**
3
+ * Handler for the Contact Center modal continue button
4
+ * @param modalRef
5
+ * @param callback
6
+ *
7
+ * Handler for the Contact Center modal continue button
8
+ * Closes the dialog if it is currently open and calls the provided callback function
9
+ */
10
+ declare const continueClicked: (modalRef: any, callback: any) => void;
11
+ /**
12
+ * Handler for the Contact Center logout confirmation modal cancel button
13
+ *
14
+ * Closes the dialog if it is currently open
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;
18
+ /**
19
+ * Runs validation tests on a string given as a Dial Number
20
+ * @param {string} input
21
+ * @returns {boolean} whether or not to show a validation error
22
+ */
23
+ declare const validateDialNumber: (input: string, dialNumberRegex: null | string, setDNErrorText: (error: string) => void) => boolean;
24
+ declare const createStationLoginRefs: () => {
25
+ multiSignInModalRef: import("react").MutableRefObject<HTMLDialogElement>;
26
+ ccSignOutModalRef: import("react").MutableRefObject<HTMLDialogElement>;
27
+ saveConfirmDialogRef: import("react").MutableRefObject<HTMLDialogElement>;
28
+ };
29
+ declare const saveConfirmCancelClicked: (saveConfirmDialogRef: any, setShowSaveConfirmDialog: any) => void;
30
+ declare const handleSaveConfirm: (saveConfirmDialogRef: any, setShowSaveConfirmDialog: any, saveLoginOptions: any) => void;
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
+ declare const handleDNInputChanged: (event: any, setDialNumberValue: any, setDialNumber: any, setShowDNError: any, setDNErrorText: any, dialNumberRegex: any, setCurrentLoginOptions: any, selectedDeviceType: any, logger: any) => void;
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
+ export { handleModals, continueClicked, ccCancelButtonClicked, updateDialNumberLabel, validateDialNumber, createStationLoginRefs, saveConfirmCancelClicked, handleSaveConfirm, handleLoginOptionChanged, handleDNInputChanged, handleTeamSelectChanged, handleOnCCSignOut, };
@@ -30,16 +30,27 @@ export interface TaskProps {
30
30
  }) => void;
31
31
  /**
32
32
  * Handler for task accepted in TaskList
33
+ * @param task - The accepted task
33
34
  */
34
35
  onTaskAccepted?: (task: ITask) => void;
35
36
  /**
36
37
  * Handler for task declined in TaskList
38
+ * @param task - The declined task
37
39
  */
38
40
  onTaskDeclined?: (task: ITask) => void;
39
41
  /**
40
42
  * Handler for task selected in TaskList
41
- */
42
- onTaskSelected?: (task: ITask) => void;
43
+ * @param task - The selected task
44
+ * @param isClicked - Indicates if the task was clicked
45
+ * This is used to differentiate between selection via click and programmatic selection.
46
+ * This is useful for handling selection logic differently based on user interaction.
47
+ * For example, if the task is selected programmatically, you might not want to trigger
48
+ * certain UI updates that are only relevant for user-initiated selections.
49
+ */
50
+ onTaskSelected?: ({ task, isClicked }: {
51
+ task: ITask;
52
+ isClicked: boolean;
53
+ }) => void;
43
54
  /**
44
55
  * accept incoming task action
45
56
  */
@@ -97,14 +108,37 @@ export interface ControlProps {
97
108
  currentTask: ITask;
98
109
  /**
99
110
  * Function to handle hold/resume actions.
111
+ * @param isHeld - Boolean indicating whether the task is held.
112
+ * @param task - The current task being handled.
113
+ * @returns void
100
114
  */
101
- onHoldResume?: () => void;
115
+ onHoldResume?: ({ isHeld, task }: {
116
+ isHeld: boolean;
117
+ task: ITask;
118
+ }) => void;
119
+ /**
120
+ * Function to handle recording toggle actions.
121
+ * @param isRecording - Boolean indicating whether the task is being recorded.
122
+ * @param task - The current task being handled.
123
+ * @return void
124
+ */
125
+ onRecordingToggle?: ({ isRecording, task }: {
126
+ isRecording: boolean;
127
+ task: ITask;
128
+ }) => void;
102
129
  /**
103
130
  * Function to handle ending the task.
131
+ * @param task - The current task being handled.
132
+ * @returns void
104
133
  */
105
- onEnd?: () => void;
134
+ onEnd?: ({ task }: {
135
+ task: ITask;
136
+ }) => void;
106
137
  /**
107
138
  * Function to handle wrapping up the task.
139
+ * @param task - The current task being handled.
140
+ * @param wrapUpReason - The reason for wrapping up the task.
141
+ * @returns void
108
142
  */
109
143
  onWrapUp?: ({ task, wrapUpReason }: {
110
144
  task: ITask;
@@ -6,6 +6,7 @@ import IncomingTaskComponent from './components/task/IncomingTask/incoming-task'
6
6
  import TaskListComponent from './components/task/TaskList/task-list';
7
7
  import OutdialCallComponent from './components/task/OutdialCall/outdial-call';
8
8
  export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, };
9
+ export * from './components/StationLogin/constants';
9
10
  export * from './components/StationLogin/station-login.types';
10
11
  export * from './components/UserState/user-state.types';
11
12
  export * from './components/task/task.types';