@webex/cc-task 1.28.0-ccwidgets.9 → 1.28.0-ccwidgets.91

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.
@@ -0,0 +1,11 @@
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+
3
+ /**
4
+ * @license React
5
+ * use-sync-external-store-shim.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CallControlProps } from '../task.types';
3
+ declare const CallControl: React.FunctionComponent<CallControlProps>;
4
+ export { CallControl };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CallControlProps } from '../task.types';
3
+ declare const CallControlCAD: React.FunctionComponent<CallControlProps>;
4
+ export { CallControlCAD };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IncomingTaskProps } from '../task.types';
3
+ declare const IncomingTask: React.FunctionComponent<IncomingTaskProps>;
4
+ export { IncomingTask };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const OutdialCall: React.FunctionComponent;
3
+ export { OutdialCall };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TaskListProps } from '../task.types';
3
+ declare const TaskList: React.FunctionComponent<TaskListProps>;
4
+ export { TaskList };
@@ -0,0 +1,23 @@
1
+ import { ITask, Interaction } 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
+ };
23
+ export declare function findHoldTimestamp(interaction: Interaction, mType?: string): number | null;
@@ -0,0 +1,63 @@
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: (to: string, type: 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
+ secondsUntilAutoWrapup: number;
59
+ cancelAutoWrapup: () => void;
60
+ };
61
+ export declare const useOutdialCall: (props: useOutdialCallProps) => {
62
+ startOutdial: (destination: string) => void;
63
+ };
@@ -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' | 'onTaskSelected' | 'logger'>;
4
+ export type IncomingTaskProps = Pick<TaskProps, 'incomingTask' | 'onAccepted' | 'onRejected'>;
5
+ export type TaskListProps = Pick<TaskProps, 'onTaskAccepted' | 'onTaskDeclined' | 'onTaskSelected'>;
6
+ export type CallControlProps = Pick<ControlProps, 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | 'callControlClassName' | 'callControlConsultClassName'>;
7
+ export type useCallControlProps = Pick<ControlProps, 'currentTask' | 'onHoldResume' | 'onEnd' | 'onWrapUp' | 'onRecordingToggle' | '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.9",
4
+ "version": "1.28.0-ccwidgets.91",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -16,18 +16,20 @@
16
16
  "build": "yarn run -T tsc",
17
17
  "build:src": "yarn run clean:dist && webpack",
18
18
  "build:watch": "webpack --watch",
19
- "test:unit": "jest --coverage"
19
+ "test:unit": "jest --coverage",
20
+ "test:styles": "eslint"
20
21
  },
21
22
  "dependencies": {
22
- "@webex/cc-store": "1.28.0-ccwidgets.9",
23
- "mobx-react-lite": "^4.1.0",
24
- "webex": "3.7.0-wxcc.5"
23
+ "@webex/cc-components": "1.28.0-ccwidgets.91",
24
+ "@webex/cc-store": "1.28.0-ccwidgets.91",
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,28 +37,29 @@
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",
42
54
  "typescript": "5.6.3",
55
+ "typescript-eslint": "^8.24.1",
43
56
  "webpack": "5.94.0",
44
57
  "webpack-cli": "5.1.4",
45
58
  "webpack-merge": "6.0.1"
46
59
  },
47
60
  "peerDependencies": {
61
+ "@momentum-ui/react-collaboration": ">=26.197.0",
48
62
  "react": ">=18.3.1",
49
63
  "react-dom": ">=18.3.1"
50
- },
51
- "jest": {
52
- "testEnvironment": "jsdom",
53
- "testMatch": [
54
- "**/tests/**/*.ts",
55
- "**/tests/**/*.tsx"
56
- ],
57
- "moduleNameMapper": {
58
- "^.+\\.(css|less|scss)$": "babel-jest"
59
- }
60
- },
61
- "stableVersion": "1.28.0-ccwidgets.8"
64
+ }
62
65
  }