@webex/cc-task 1.28.0-ccwidgets.6 → 1.28.0-ccwidgets.61
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 +440 -0
- package/dist/types/CallControl/index.d.ts +4 -0
- package/dist/types/CallControlCAD/index.d.ts +4 -0
- package/dist/types/IncomingTask/index.d.ts +4 -0
- package/dist/types/OutdialCall/index.d.ts +3 -0
- package/dist/types/TaskList/index.d.ts +4 -0
- package/dist/types/Utils/task-util.d.ts +22 -0
- package/dist/types/helper.d.ts +61 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/task.types.d.ts +13 -0
- package/package.json +32 -11
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ITask } from '@webex/plugin-cc';
|
|
2
|
+
/**
|
|
3
|
+
* This function determines the visibility of various controls based on the task's data.
|
|
4
|
+
* @param task The task object
|
|
5
|
+
* @returns An object containing the visibility of various controls based on the task's data
|
|
6
|
+
*/
|
|
7
|
+
export declare function getControlsVisibility(deviceType: string, featureFlags: {
|
|
8
|
+
[key: string]: boolean;
|
|
9
|
+
}, task: ITask): {
|
|
10
|
+
accept: boolean;
|
|
11
|
+
decline: boolean;
|
|
12
|
+
end: boolean;
|
|
13
|
+
muteUnmute: boolean;
|
|
14
|
+
holdResume: boolean;
|
|
15
|
+
consult: boolean;
|
|
16
|
+
transfer: boolean;
|
|
17
|
+
conference: boolean;
|
|
18
|
+
wrapup: any;
|
|
19
|
+
pauseResumeRecording: boolean;
|
|
20
|
+
endConsult: boolean;
|
|
21
|
+
recordingIndicator: boolean;
|
|
22
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ITask } from '@webex/plugin-cc';
|
|
2
|
+
import { useCallControlProps, UseTaskListProps, UseTaskProps } from './task.types';
|
|
3
|
+
import { useOutdialCallProps } from '@webex/cc-components';
|
|
4
|
+
import { DestinationType } from '@webex/cc-store';
|
|
5
|
+
export declare const useTaskList: (props: UseTaskListProps) => {
|
|
6
|
+
taskList: TaskProps;
|
|
7
|
+
acceptTask: (task: ITask) => void;
|
|
8
|
+
declineTask: (task: ITask) => void;
|
|
9
|
+
onTaskSelect: (task: ITask) => void;
|
|
10
|
+
isBrowser: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const useIncomingTask: (props: UseTaskProps) => {
|
|
13
|
+
incomingTask: TaskProps;
|
|
14
|
+
accept: () => void;
|
|
15
|
+
reject: () => void;
|
|
16
|
+
isBrowser: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const useCallControl: (props: useCallControlProps) => {
|
|
19
|
+
currentTask: ControlProps;
|
|
20
|
+
endCall: () => void;
|
|
21
|
+
toggleHold: (hold: boolean) => void;
|
|
22
|
+
toggleRecording: () => void;
|
|
23
|
+
wrapupCall: (wrapUpReason: string, auxCodeId: string) => void;
|
|
24
|
+
isHeld: boolean;
|
|
25
|
+
setIsHeld: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
26
|
+
isRecording: boolean;
|
|
27
|
+
setIsRecording: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
28
|
+
buddyAgents: BuddyDetails[];
|
|
29
|
+
loadBuddyAgents: () => Promise<void>;
|
|
30
|
+
queues: ContactServiceQueue[];
|
|
31
|
+
loadQueues: () => Promise<void>;
|
|
32
|
+
transferCall: (transferDestination: string, destinationType: DestinationType) => Promise<void>;
|
|
33
|
+
consultCall: (consultDestination: string, destinationType: DestinationType) => Promise<void>;
|
|
34
|
+
endConsultCall: () => Promise<void>;
|
|
35
|
+
consultTransfer: (transferDestination: string, destinationType: DestinationType) => Promise<void>;
|
|
36
|
+
consultAgentName: string;
|
|
37
|
+
setConsultAgentName: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
38
|
+
consultAgentId: string;
|
|
39
|
+
setConsultAgentId: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
40
|
+
holdTime: number;
|
|
41
|
+
startTimestamp: number;
|
|
42
|
+
lastTargetType: "agent" | "queue";
|
|
43
|
+
setLastTargetType: import("react").Dispatch<import("react").SetStateAction<"agent" | "queue">>;
|
|
44
|
+
controlVisibility: {
|
|
45
|
+
accept: boolean;
|
|
46
|
+
decline: boolean;
|
|
47
|
+
end: boolean;
|
|
48
|
+
muteUnmute: boolean;
|
|
49
|
+
holdResume: boolean;
|
|
50
|
+
consult: boolean;
|
|
51
|
+
transfer: boolean;
|
|
52
|
+
conference: boolean;
|
|
53
|
+
wrapup: any;
|
|
54
|
+
pauseResumeRecording: boolean;
|
|
55
|
+
endConsult: boolean;
|
|
56
|
+
recordingIndicator: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const useOutdialCall: (props: useOutdialCallProps) => {
|
|
60
|
+
startOutdial: (destination: string) => void;
|
|
61
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IncomingTask } from './IncomingTask/index';
|
|
2
|
+
import { TaskList } from './TaskList';
|
|
3
|
+
import { CallControl } from './CallControl';
|
|
4
|
+
import { OutdialCall } from './OutdialCall';
|
|
5
|
+
import { CallControlCAD } from './CallControlCAD';
|
|
6
|
+
export { IncomingTask, TaskList, CallControl, OutdialCall, CallControlCAD };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TaskProps, ControlProps, OutdialCallProps } from '@webex/cc-components';
|
|
2
|
+
export type UseTaskProps = Pick<TaskProps, 'incomingTask' | 'onAccepted' | 'onRejected' | 'deviceType' | 'logger'>;
|
|
3
|
+
export type UseTaskListProps = Pick<TaskProps, 'cc' | 'taskList' | 'deviceType' | 'onTaskAccepted' | 'onTaskDeclined' | 'logger'>;
|
|
4
|
+
export type IncomingTaskProps = Pick<TaskProps, 'incomingTask' | 'onAccepted' | 'onRejected'>;
|
|
5
|
+
export type TaskListProps = Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined'>;
|
|
6
|
+
export type CallControlProps = Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'callControlClassName' | 'callControlConsultClassName'>;
|
|
7
|
+
export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'logger' | 'consultInitiated' | 'deviceType' | 'featureFlags'>;
|
|
8
|
+
export type Participant = {
|
|
9
|
+
id: string;
|
|
10
|
+
pType: 'Customer' | 'Agent' | string;
|
|
11
|
+
name?: string;
|
|
12
|
+
};
|
|
13
|
+
export type useOutdialCallProps = Pick<OutdialCallProps, 'cc' | 'logger'>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/cc-task",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Task",
|
|
4
|
-
"version": "1.28.0-ccwidgets.
|
|
4
|
+
"version": "1.28.0-ccwidgets.61",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -11,23 +11,25 @@
|
|
|
11
11
|
"package.json"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
+
"clean": "rm -rf dist && rm -rf node_modules",
|
|
15
|
+
"clean:dist": "rm -rf dist",
|
|
14
16
|
"build": "yarn run -T tsc",
|
|
15
|
-
"build:src": "
|
|
17
|
+
"build:src": "yarn run clean:dist && webpack",
|
|
16
18
|
"build:watch": "webpack --watch",
|
|
17
|
-
"test:unit": "jest --coverage"
|
|
19
|
+
"test:unit": "jest --coverage",
|
|
20
|
+
"test:styles": "eslint"
|
|
18
21
|
},
|
|
19
22
|
"dependencies": {
|
|
20
|
-
"@webex/cc-
|
|
21
|
-
"
|
|
22
|
-
"react-
|
|
23
|
-
"typescript": "5.6.3",
|
|
24
|
-
"webex": "3.7.0-wxcc.4"
|
|
23
|
+
"@webex/cc-components": "1.28.0-ccwidgets.61",
|
|
24
|
+
"@webex/cc-store": "1.28.0-ccwidgets.61",
|
|
25
|
+
"mobx-react-lite": "^4.1.0"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@babel/core": "7.25.2",
|
|
28
29
|
"@babel/preset-env": "7.25.4",
|
|
29
30
|
"@babel/preset-react": "7.24.7",
|
|
30
31
|
"@babel/preset-typescript": "7.25.9",
|
|
32
|
+
"@eslint/js": "^9.20.0",
|
|
31
33
|
"@testing-library/dom": "10.4.0",
|
|
32
34
|
"@testing-library/jest-dom": "6.6.2",
|
|
33
35
|
"@testing-library/react": "16.0.1",
|
|
@@ -35,20 +37,39 @@
|
|
|
35
37
|
"@types/react-test-renderer": "18",
|
|
36
38
|
"babel-jest": "29.7.0",
|
|
37
39
|
"babel-loader": "9.2.1",
|
|
40
|
+
"eslint": "^9.20.1",
|
|
41
|
+
"eslint-config-prettier": "^10.0.1",
|
|
42
|
+
"eslint-config-standard": "^17.1.0",
|
|
43
|
+
"eslint-plugin-import": "^2.25.2",
|
|
44
|
+
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
|
45
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
46
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
47
|
+
"eslint-plugin-react": "^7.37.4",
|
|
38
48
|
"file-loader": "6.2.0",
|
|
49
|
+
"globals": "^16.0.0",
|
|
39
50
|
"jest": "29.7.0",
|
|
40
51
|
"jest-environment-jsdom": "29.7.0",
|
|
52
|
+
"prettier": "^3.5.1",
|
|
41
53
|
"ts-loader": "9.5.1",
|
|
54
|
+
"typescript": "5.6.3",
|
|
55
|
+
"typescript-eslint": "^8.24.1",
|
|
42
56
|
"webpack": "5.94.0",
|
|
43
57
|
"webpack-cli": "5.1.4",
|
|
44
58
|
"webpack-merge": "6.0.1"
|
|
45
59
|
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@momentum-ui/react-collaboration": ">=26.197.0",
|
|
62
|
+
"react": ">=18.3.1",
|
|
63
|
+
"react-dom": ">=18.3.1"
|
|
64
|
+
},
|
|
46
65
|
"jest": {
|
|
47
66
|
"testEnvironment": "jsdom",
|
|
48
67
|
"testMatch": [
|
|
49
68
|
"**/tests/**/*.ts",
|
|
50
69
|
"**/tests/**/*.tsx"
|
|
51
|
-
]
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
],
|
|
71
|
+
"moduleNameMapper": {
|
|
72
|
+
"^.+\\.(css|less|scss)$": "babel-jest"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
54
75
|
}
|