Skip to content

Commit 89e191c

Browse files
authored
feat(contact-center): add address book search to outdial (#565)
1 parent 531d445 commit 89e191c

File tree

17 files changed

+7035
-1891
lines changed

17 files changed

+7035
-1891
lines changed

jest.setup.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,27 @@ window.HTMLElement.prototype.attachInternals = function () {
1313
setFormValue: () => {},
1414
};
1515
};
16+
17+
// Mock scrollIntoView for TabList component
18+
window.HTMLElement.prototype.scrollIntoView = function () {};
19+
20+
// Mock IntersectionObserver for infinite scroll tests
21+
global.IntersectionObserver = class IntersectionObserver {
22+
constructor(callback, options) {
23+
this.callback = callback;
24+
this.options = options;
25+
}
26+
observe() {}
27+
unobserve() {}
28+
disconnect() {}
29+
};
30+
31+
// Mock ResizeObserver for TabList component
32+
global.ResizeObserver = class ResizeObserver {
33+
constructor(callback) {
34+
this.callback = callback;
35+
}
36+
observe() {}
37+
unobserve() {}
38+
disconnect() {}
39+
};

packages/contact-center/cc-components/src/components/task/OutdialCall/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const OutdialStrings = {
66
DN_PLACEHOLDER: 'Enter number to dial',
77
INCORRECT_DN_FORMAT: 'Incorrect format.',
88
OUTDIAL_CALL: 'Outdial Call',
9+
ADDRESS_BOOK_SEARCH_PLACEHOLDER: 'Search by Name/Number',
910
};
1011

1112
// Utility Constants

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

Lines changed: 84 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
.keypad {
1+
.outdial-container {
22
display: flex;
33
flex-direction: column;
44
align-items: center;
55
border-radius: 0.625rem;
66
width: 15.625rem;
7+
height: 26.5rem;
8+
9+
.keypad {
10+
width: 100%;
11+
}
712

8-
913
mdc-input {
1014
padding-bottom: 0; // default is 1 rem, 1.5 rem needed but provided by .keys
1115
}
@@ -32,29 +36,29 @@
3236
align-items: center;
3337
pointer-events: none;
3438
z-index: 1;
35-
}
39+
}
40+
41+
.outdial-ani-option-name {
42+
display: flex;
43+
align-items: center;
44+
gap: 0.25rem;
45+
}
3646

37-
.outdial-ani-option-name {
38-
display: flex;
39-
align-items: center;
40-
gap: 0.25rem;
41-
}
42-
4347
.keys {
4448
display: grid;
4549
grid-template-columns: repeat(3, 1fr);
4650
row-gap: 1rem;
4751
column-gap: 1.5rem;
4852
padding: 1.5rem 0;
4953
list-style-type: none;
50-
margin: 0;
54+
margin: 0 20%;
5155
}
5256

5357
.key {
5458
justify-content: center;
5559
background: var(--mds-color-theme-background-alert-default-normal);
5660
color: var(--mds-color-theme-text-primary-normal);
57-
61+
5862
transition: background-color 0.2s ease;
5963

6064
&:hover {
@@ -65,4 +69,72 @@
6569
background: var(--mds-color-theme-background-primary-active);
6670
}
6771
}
68-
}
72+
73+
.address-book-container {
74+
width: 100%;
75+
}
76+
77+
.address-book {
78+
height: 16rem;
79+
width: 100%;
80+
}
81+
82+
.address-book-search-input {
83+
width: 100%;
84+
margin-bottom: 0.5rem;
85+
}
86+
87+
.address-book-entries {
88+
width: 100%;
89+
height: 14rem;
90+
overflow-y: auto;
91+
margin: 0;
92+
padding: 0;
93+
list-style-type: none;
94+
}
95+
96+
.address-book-loading-container {
97+
display: flex;
98+
justify-content: center;
99+
align-items: center;
100+
height: 100%;
101+
}
102+
103+
.address-book-entry {
104+
display: flex;
105+
gap: 1rem;
106+
align-items: center;
107+
padding: 0 1rem;
108+
}
109+
110+
.address-book-entry:hover {
111+
background: var(--mds-color-theme-background-primary-hover);
112+
}
113+
114+
.address-book-entry.selected {
115+
background: var(--mds-color-theme-background-primary-hover);
116+
}
117+
118+
.tab-list {
119+
mdc-button {
120+
display: none;
121+
}
122+
123+
mdc-tab {
124+
width: 7.395rem;
125+
padding: 0;
126+
}
127+
}
128+
129+
.ani-select-input {
130+
margin-top: 1rem;
131+
}
132+
}
133+
134+
.height-auto {
135+
height: auto;
136+
}
137+
138+
.height-28-5rem {
139+
height: 28.5rem;
140+
}

0 commit comments

Comments
 (0)