@webex/cc-components 1.28.0-next.22 → 1.28.0-next.23
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.
|
@@ -170,10 +170,16 @@ export interface IStationLoginProps {
|
|
|
170
170
|
* Default: undefined (shows Desktop mode)
|
|
171
171
|
*/
|
|
172
172
|
hideDesktopLogin?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* If true, uses international dial number regex for validation.
|
|
175
|
+
* If false or undefined, uses dialNumberRegex from agentConfig or falls back to US regex.
|
|
176
|
+
* Default: undefined (uses dialNumberRegex or US fallback)
|
|
177
|
+
*/
|
|
178
|
+
allowInternationalDn?: boolean;
|
|
173
179
|
}
|
|
174
180
|
export interface LoginOptionsState {
|
|
175
181
|
deviceType: string;
|
|
176
182
|
dialNumber: string;
|
|
177
183
|
teamId: string;
|
|
178
184
|
}
|
|
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'>;
|
|
185
|
+
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' | 'allowInternationalDn'>;
|
|
@@ -15,12 +15,17 @@ declare const continueClicked: (modalRef: any, callback: any, setShowCCSignOutMo
|
|
|
15
15
|
*/
|
|
16
16
|
declare const ccCancelButtonClicked: (ccSignOutModalRef: React.RefObject<HTMLDialogElement>, setShowCCSignOutModal: (show: boolean) => void, logger: any) => void;
|
|
17
17
|
declare const updateDialNumberLabel: (selectedOption: string, setDialNumberLabel: (label: string) => void, setDialNumberPlaceholder: (placeholder: string) => void, logger: any) => void;
|
|
18
|
+
declare const DEFAULT_US_DIAL_NUMBER_REGEX = "1[0-9]{3}[2-9][0-9]{6}([,]{1,10}[0-9]+){0,1}";
|
|
19
|
+
declare const INTERNATIONAL_DIAL_NUMBER_REGEX = "^\\+?[0-9]{7,15}([,]{1,10}[0-9]+)?$";
|
|
18
20
|
/**
|
|
19
21
|
* Runs validation tests on a string given as a Dial Number
|
|
20
|
-
* @param {string} input
|
|
22
|
+
* @param {string} input - The dial number to validate
|
|
23
|
+
* @param {string | null} dialNumberRegex - Optional regex pattern for validation. If null, falls back to default US regex.
|
|
24
|
+
* @param {function} setDNErrorText - Callback to set error text
|
|
25
|
+
* @param {object} logger - Logger instance
|
|
21
26
|
* @returns {boolean} whether or not to show a validation error
|
|
22
27
|
*/
|
|
23
|
-
declare const validateDialNumber: (input: string, setDNErrorText: (error: string) => void, logger: any) => boolean;
|
|
28
|
+
declare const validateDialNumber: (input: string, dialNumberRegex: string | null, setDNErrorText: (error: string) => void, logger: any) => boolean;
|
|
24
29
|
declare const createStationLoginRefs: (logger: any) => {
|
|
25
30
|
multiSignInModalRef: import("react").MutableRefObject<HTMLDialogElement>;
|
|
26
31
|
ccSignOutModalRef: import("react").MutableRefObject<HTMLDialogElement>;
|
|
@@ -33,4 +38,4 @@ declare const handleDNInputChanged: (event: any, setDialNumberValue: any, setDia
|
|
|
33
38
|
declare const handleTeamSelectChanged: (event: any, setSelectedTeamId: any, setTeamId: any, setCurrentLoginOptions: any, setTeam: any, logger: any) => void;
|
|
34
39
|
declare const handleOnCCSignOut: (ccSignOutModalRef: React.RefObject<HTMLDialogElement>, onCCSignOut: any, logger: any) => void;
|
|
35
40
|
declare const handleCCSignoutKeyDown: (event: React.KeyboardEvent<HTMLDialogElement>, setShowCCSignOutModal: (show: boolean) => void, logger: any) => void;
|
|
36
|
-
export { handleModals, continueClicked, ccCancelButtonClicked, updateDialNumberLabel, validateDialNumber, createStationLoginRefs, saveConfirmCancelClicked, handleSaveConfirm, handleLoginOptionChanged, handleDNInputChanged, handleTeamSelectChanged, handleOnCCSignOut, handleCCSignoutKeyDown, };
|
|
41
|
+
export { handleModals, continueClicked, ccCancelButtonClicked, updateDialNumberLabel, validateDialNumber, createStationLoginRefs, saveConfirmCancelClicked, handleSaveConfirm, handleLoginOptionChanged, handleDNInputChanged, handleTeamSelectChanged, handleOnCCSignOut, handleCCSignoutKeyDown, DEFAULT_US_DIAL_NUMBER_REGEX, INTERNATIONAL_DIAL_NUMBER_REGEX, };
|