@webex/cc-components 1.28.0-next.29 → 1.28.0-next.30
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 +73 -73
- package/dist/types/components/task/CampaignCountdown/campaign-countdown.d.ts +2 -0
- package/dist/types/components/task/CampaignCountdown/campaign-countdown.types.d.ts +23 -0
- package/dist/types/components/task/CampaignCountdown/campaign-countdown.utils.d.ts +16 -0
- package/dist/types/components/task/constants.d.ts +1 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/wc.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ILogger } from '@webex/cc-store';
|
|
2
|
+
export interface CampaignCountdownProps {
|
|
3
|
+
/**
|
|
4
|
+
* Timeout duration in seconds.
|
|
5
|
+
* Use this OR timeoutTimestamp, not both.
|
|
6
|
+
*/
|
|
7
|
+
timeoutInSeconds?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Epoch timestamp (in milliseconds) when the countdown should expire.
|
|
10
|
+
* This is where `campaignPreviewOfferTimeout` from callProcessingDetails should be passed.
|
|
11
|
+
* Can be provided as a string or number - will be parsed automatically.
|
|
12
|
+
* Takes precedence over timeoutInSeconds if both are provided.
|
|
13
|
+
*/
|
|
14
|
+
timeoutTimestamp?: string | number;
|
|
15
|
+
/**
|
|
16
|
+
* Callback fired when the countdown reaches zero
|
|
17
|
+
*/
|
|
18
|
+
onTimeout?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Logger instance for logging purposes
|
|
21
|
+
*/
|
|
22
|
+
logger?: ILogger;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ILogger } from '@webex/cc-store';
|
|
2
|
+
/**
|
|
3
|
+
* Parses the timeoutTimestamp value (string or number) to a number.
|
|
4
|
+
* The backend sends campaignPreviewOfferTimeout as a string epoch timestamp in milliseconds.
|
|
5
|
+
*/
|
|
6
|
+
export declare const parseTimeoutTimestamp: (value: string | number | undefined, logger?: ILogger) => number;
|
|
7
|
+
/**
|
|
8
|
+
* Calculates remaining seconds based on either a timestamp or a direct seconds value.
|
|
9
|
+
* If timeoutTimestamp is provided, it calculates the difference from now.
|
|
10
|
+
* Otherwise, it uses timeoutInSeconds directly.
|
|
11
|
+
*/
|
|
12
|
+
export declare const calculateRemainingSeconds: (timeoutTimestamp?: string | number, timeoutInSeconds?: number, logger?: ILogger) => number;
|
|
13
|
+
/**
|
|
14
|
+
* Formats seconds into MM:SS format for countdown display
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatCountdown: (seconds: number, logger?: ILogger) => string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,10 +6,12 @@ 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
|
import CampaignErrorDialogComponent from './components/task/CampaignErrorDialog/campaign-error-dialog';
|
|
9
|
+
import CampaignCountdownComponent from './components/task/CampaignCountdown/campaign-countdown';
|
|
9
10
|
import RealTimeTranscriptComponent from './components/task/RealTimeTranscript/real-time-transcript';
|
|
10
|
-
export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, CampaignErrorDialogComponent, RealTimeTranscriptComponent, };
|
|
11
|
+
export { UserStateComponent, StationLoginComponent, CallControlComponent, CallControlCADComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, CampaignErrorDialogComponent, CampaignCountdownComponent, RealTimeTranscriptComponent, };
|
|
11
12
|
export * from './components/StationLogin/constants';
|
|
12
13
|
export * from './components/StationLogin/station-login.types';
|
|
13
14
|
export * from './components/UserState/user-state.types';
|
|
14
15
|
export * from './components/task/task.types';
|
|
15
16
|
export * from './components/task/CampaignErrorDialog/campaign-error-dialog.types';
|
|
17
|
+
export * from './components/task/CampaignCountdown/campaign-countdown.types';
|