Skip to content

Commit b647448

Browse files
fix(cc-ui-logging): @webex/ui-logging package (#491)
1 parent 1f054af commit b647448

30 files changed

Lines changed: 482 additions & 40 deletions

File tree

packages/contact-center/cc-components/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"dependencies": {
3636
"@momentum-ui/illustrations": "^1.24.0",
3737
"@r2wc/react-to-web-component": "2.0.3",
38-
"@webex/cc-store": "workspace:*"
38+
"@webex/cc-store": "workspace:*",
39+
"@webex/cc-ui-logging": "workspace:*"
3940
},
4041
"devDependencies": {
4142
"@babel/core": "7.25.2",
@@ -75,4 +76,4 @@
7576
"react": ">=18.3.1",
7677
"react-dom": ">=18.3.1"
7778
}
78-
}
79+
}

packages/contact-center/cc-components/src/components/StationLogin/station-login.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
updateDialNumberLabel,
1818
handleCCSignoutKeyDown,
1919
} from './station-login.utils';
20+
import {withMetrics} from '@webex/cc-ui-logging';
2021

2122
const StationLoginComponent: React.FunctionComponent<StationLoginComponentProps> = (props) => {
2223
const {
@@ -344,4 +345,5 @@ const StationLoginComponent: React.FunctionComponent<StationLoginComponentProps>
344345
);
345346
};
346347

347-
export default StationLoginComponent;
348+
const StationLoginComponentWithMetrics = withMetrics(StationLoginComponent, 'StationLogin');
349+
export default StationLoginComponentWithMetrics;

packages/contact-center/cc-components/src/components/UserState/user-state.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
getSelectedKey,
1818
buildDropdownItems,
1919
} from './user-state.utils';
20+
import {withMetrics} from '@webex/cc-ui-logging';
2021

2122
const UserStateComponent: React.FunctionComponent<UserStateComponentsProps> = (props) => {
2223
const {
@@ -103,4 +104,5 @@ const UserStateComponent: React.FunctionComponent<UserStateComponentsProps> = (p
103104
);
104105
};
105106

106-
export default UserStateComponent;
107+
const UserStateComponentWithMetrics = withMetrics(UserStateComponent, 'UserState');
108+
export default UserStateComponentWithMetrics;

packages/contact-center/cc-components/src/components/task/CallControl/call-control.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
filterButtonsForConsultation,
2525
updateCallStateFromTask,
2626
} from './call-control.utils';
27+
import {withMetrics} from '@webex/cc-ui-logging';
2728

2829
function CallControlComponent(props: CallControlComponentProps) {
2930
const [selectedWrapupReason, setSelectedWrapupReason] = useState<string | null>(null);
@@ -322,4 +323,5 @@ function CallControlComponent(props: CallControlComponentProps) {
322323
);
323324
}
324325

325-
export default CallControlComponent;
326+
const CallControlComponentWithMetrics = withMetrics(CallControlComponent, 'CallControl');
327+
export default CallControlComponentWithMetrics;

packages/contact-center/cc-components/src/components/task/CallControlCAD/call-control-cad.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
CUSTOMER_NAME,
2020
RONA,
2121
} from '../constants';
22+
import {withMetrics} from '@webex/cc-ui-logging';
2223

2324
const CallControlCADComponent: React.FC<CallControlComponentProps> = (props) => {
2425
const {
@@ -235,4 +236,5 @@ const CallControlCADComponent: React.FC<CallControlComponentProps> = (props) =>
235236
);
236237
};
237238

238-
export default CallControlCADComponent;
239+
const CallControlCADComponentWithMetrics = withMetrics(CallControlCADComponent, 'CallControlCAD');
240+
export default CallControlCADComponentWithMetrics;

packages/contact-center/cc-components/src/components/task/IncomingTask/incoming-task.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import {IncomingTaskComponentProps, MEDIA_CHANNEL} from '../task.types';
33
import Task from '../Task';
4+
import {withMetrics} from '@webex/cc-ui-logging';
45
import {extractIncomingTaskData} from './incoming-task.utils';
56

67
const IncomingTaskComponent: React.FunctionComponent<IncomingTaskComponentProps> = (props) => {
@@ -37,4 +38,5 @@ const IncomingTaskComponent: React.FunctionComponent<IncomingTaskComponentProps>
3738
);
3839
};
3940

40-
export default IncomingTaskComponent;
41+
const IncomingTaskComponentWithMetrics = withMetrics(IncomingTaskComponent, 'IncomingTask');
42+
export default IncomingTaskComponentWithMetrics;

packages/contact-center/cc-components/src/components/task/OutdialCall/outdial-call.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, {useState} from 'react';
22
import {OutdialCallComponentProps} from '../task.types';
33
import './outdial-call.style.scss';
4+
import {withMetrics} from '@webex/cc-ui-logging';
45

56
const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> = (props) => {
67
const {startOutdial} = props;
@@ -49,4 +50,5 @@ const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps> =
4950
);
5051
};
5152

52-
export default OutdialCallComponent;
53+
const OutdialCallComponentWithMetrics = withMetrics(OutdialCallComponent, 'OutdialCall');
54+
export default OutdialCallComponentWithMetrics;

packages/contact-center/cc-components/src/components/task/TaskList/task-list.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
isCurrentTaskSelected,
1010
} from './task-list.utils';
1111
import './styles.scss';
12+
import {withMetrics} from '@webex/cc-ui-logging';
1213

1314
const TaskListComponent: React.FunctionComponent<TaskListComponentProps> = (props) => {
1415
const {currentTask, taskList, acceptTask, declineTask, isBrowser, onTaskSelect, logger} = props;
@@ -57,4 +58,5 @@ const TaskListComponent: React.FunctionComponent<TaskListComponentProps> = (prop
5758
);
5859
};
5960

60-
export default TaskListComponent;
61+
const TaskListComponentWithMetrics = withMetrics(TaskListComponent, 'TaskList');
62+
export default TaskListComponentWithMetrics;

packages/contact-center/cc-widgets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@
9595
"^.+\\.(css|less|scss)$": "babel-jest"
9696
}
9797
}
98-
}
98+
}

packages/contact-center/station-login/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@
6565
"react": ">=18.3.1",
6666
"react-dom": ">=18.3.1"
6767
}
68-
}
68+
}

0 commit comments

Comments
 (0)