@rh-support/cases 2.1.33 → 2.4.10-beta.6
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/README.md +0 -2
- package/lib/esm/components/case-list/CaseList.d.ts.map +1 -1
- package/lib/esm/components/case-list/CaseList.js +2 -3
- package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.js +10 -14
- package/lib/esm/components/case-list/case-list-filters/AccountsFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/AccountsFilter.js +5 -10
- package/lib/esm/components/case-list/case-list-filters/AdditionalFilters.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.d.ts +0 -10
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.js +164 -134
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilterChip.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/GroupsFilter.js +2 -2
- package/lib/esm/components/case-list/case-list-filters/ProductFilterChip.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.js +5 -7
- package/lib/esm/components/case-list/case-list-filters/SeverityFilter.js +4 -4
- package/lib/esm/components/case-list/case-list-filters/StatusFilter.js +4 -4
- package/lib/esm/components/case-list/case-list-filters/TypeFilter.js +3 -3
- package/lib/esm/components/case-list/case-list-filters/VersionsFilter.js +2 -2
- package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts +0 -1
- package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-table/CaseListTable.js +12 -11
- package/lib/esm/components/case-list/case-list-table/ExportCaseListCSV.js +1 -1
- package/lib/esm/components/case-list/case-search/AdvanceSearch.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-search/AdvanceSearch.js +13 -18
- package/lib/esm/components/case-list/case-search/BookmarkedSearchesSelector.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-search/BookmarkedSearchesSelector.js +5 -6
- package/lib/esm/components/case-list/case-search/CaseSearch.js +1 -1
- package/lib/esm/components/case-list/case-search/SaveCaseSearchModal.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-search/SaveCaseSearchModal.js +8 -10
- package/lib/esm/components/escalations/EscalationForm.d.ts.map +1 -1
- package/lib/esm/components/escalations/EscalationForm.js +9 -18
- package/lib/esm/css/caseList.css +42 -50
- package/lib/esm/css/caseSearch.css +1 -1
- package/lib/esm/css/escalation.css +4 -4
- package/lib/esm/scss/_main.scss +11 -11
- package/lib/esm/scss/_pf-overrides.scss +3 -8
- package/package.json +14 -14
- package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.d.ts +0 -2
- package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.d.ts.map +0 -1
- package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.js +0 -207
package/lib/esm/css/caseList.css
CHANGED
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
width: 220px;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.case-search-top .bookmark-search-dropdown .pf-
|
|
49
|
+
.case-search-top .bookmark-search-dropdown .pf-c-dropdown__toggle > * {
|
|
50
50
|
font-size: 16px;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.case-search-top .bookmark-search-dropdown .pf-
|
|
53
|
+
.case-search-top .bookmark-search-dropdown .pf-c-dropdown__toggle-button {
|
|
54
54
|
padding: 6px 1rem;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.case-search-top .bookmark-search-dropdown .pf-
|
|
57
|
+
.case-search-top .bookmark-search-dropdown .pf-c-dropdown__toggle-button:first-child {
|
|
58
58
|
-ms-flex: 1;
|
|
59
59
|
flex-grow: 1;
|
|
60
60
|
text-align: left;
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
white-space: nowrap;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.case-search-top .bookmark-search-dropdown .pf-
|
|
66
|
+
.case-search-top .bookmark-search-dropdown .pf-c-dropdown__toggle-button[disabled] {
|
|
67
67
|
background-color: #e6e6e6;
|
|
68
68
|
color: #73767b;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.case-search-top .bookmark-search-dropdown .pf-
|
|
71
|
+
.case-search-top .bookmark-search-dropdown .pf-c-dropdown__toggle-button[disabled]:hover {
|
|
72
72
|
border-bottom-color: #151515;
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -128,39 +128,39 @@
|
|
|
128
128
|
flex-direction: column;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.case-search-top .filter-chip-wrapper .pf-
|
|
131
|
+
.case-search-top .filter-chip-wrapper .pf-c-chip-group {
|
|
132
132
|
padding: 4px;
|
|
133
133
|
background-color: #f0f0f0;
|
|
134
134
|
border-radius: 4px;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.case-search-top .filter-chip-wrapper .pf-
|
|
137
|
+
.case-search-top .filter-chip-wrapper .pf-c-chip-group + .pf-c-chip-group {
|
|
138
138
|
margin-left: 0.25rem;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
.case-search-top .filter-chip-wrapper .pf-
|
|
141
|
+
.case-search-top .filter-chip-wrapper .pf-c-chip-group.pf-c-chip-group__simple {
|
|
142
142
|
padding: 6px;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
.cases-main .case-search-top .filter-chip-wrapper .pf-
|
|
145
|
+
.cases-main .case-search-top .filter-chip-wrapper .pf-c-chip-group__label {
|
|
146
146
|
font-size: 14px;
|
|
147
147
|
padding-left: 6px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.cases-main .case-search-top .filter-chip-wrapper .pf-
|
|
150
|
+
.cases-main .case-search-top .filter-chip-wrapper .pf-c-chip-group__main {
|
|
151
151
|
align-items: center;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
.cases-main .case-search-top .filter-chip-wrapper .pf-
|
|
154
|
+
.cases-main .case-search-top .filter-chip-wrapper .pf-c-chip__text {
|
|
155
155
|
font-size: 14px;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.cases-main .case-search-top .filter-chip-wrapper button.pf-
|
|
158
|
+
.cases-main .case-search-top .filter-chip-wrapper button.pf-c-select__toggle {
|
|
159
159
|
font-size: 13px;
|
|
160
|
-
--pf-
|
|
160
|
+
--pf-c-select__toggle-text--Color: var(--pf-c-select__toggle--m-placeholder__toggle-text--Color) !important;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.cases-main .case-search-top .filter-chip-wrapper button.pf-
|
|
163
|
+
.cases-main .case-search-top .filter-chip-wrapper button.pf-c-select__toggle svg {
|
|
164
164
|
margin-left: 4px;
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -231,11 +231,11 @@
|
|
|
231
231
|
margin-top: 4px;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.case-search-bottom .case-list-table tr td:not(.pf-
|
|
234
|
+
.case-search-bottom .case-list-table tr td:not(.pf-c-table__check) {
|
|
235
235
|
min-width: 80px;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
/* .case-search-bottom .case-list-table tr td.pf-
|
|
238
|
+
/* .case-search-bottom .case-list-table tr td.pf-c-table__check {
|
|
239
239
|
padding: 2rem 1rem 1.5rem 2rem !important;
|
|
240
240
|
} */
|
|
241
241
|
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
.case-search-filters .filter-header {
|
|
275
|
-
background-color: #
|
|
275
|
+
background-color: #dedede;
|
|
276
276
|
border-top: 1px solid #ccc;
|
|
277
277
|
border-bottom: 1px solid #ccc;
|
|
278
278
|
padding: 0.98rem 1.35rem;
|
|
@@ -315,9 +315,9 @@
|
|
|
315
315
|
margin-bottom: 2rem;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
.filter-wrapper .filter-group > .pf-
|
|
318
|
+
.filter-wrapper .filter-group > .pf-c-select h3,
|
|
319
319
|
.filter-wrapper .filter-group > .additional-filters h3,
|
|
320
|
-
.filter-wrapper .filter-group > .pf-
|
|
320
|
+
.filter-wrapper .filter-group > .pf-c-select label {
|
|
321
321
|
margin-bottom: 0;
|
|
322
322
|
padding-bottom: 8px;
|
|
323
323
|
font-family: 'Red Hat Text';
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
padding-bottom: 10px;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
.filter-wrapper .filter-group > .additional-filters .pf-
|
|
332
|
+
.filter-wrapper .filter-group > .additional-filters .pf-c-check {
|
|
333
333
|
margin-bottom: 14px;
|
|
334
334
|
}
|
|
335
335
|
|
|
@@ -337,12 +337,12 @@
|
|
|
337
337
|
margin-right: 0;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
/* .filter-wrapper .filter-group > .pf-
|
|
341
|
-
.filter-wrapper .filter-group > .pf-
|
|
340
|
+
/* .filter-wrapper .filter-group > .pf-c-select .pf-c-select__toggle,
|
|
341
|
+
.filter-wrapper .filter-group > .pf-c-select .pf-c-select__toggle .pf-c-select__toggle-typeahead {
|
|
342
342
|
font-size: 15px;
|
|
343
343
|
} */
|
|
344
344
|
|
|
345
|
-
#rh-support-cases .pf-
|
|
345
|
+
#rh-support-cases .pf-c-select .pf-c-select__menu li label,
|
|
346
346
|
.filter-wrapper .filter-group > .additional-filters label {
|
|
347
347
|
margin-bottom: 0;
|
|
348
348
|
font-size: 15px;
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
margin-bottom: 0;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
.case-search-top .filter-chips .pf-
|
|
396
|
+
.case-search-top .filter-chips .pf-c-chip-group {
|
|
397
397
|
margin-top: 0;
|
|
398
398
|
}
|
|
399
399
|
|
|
@@ -464,8 +464,8 @@
|
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
.filter-group .pf-
|
|
468
|
-
--pf-
|
|
467
|
+
.filter-group .pf-c-select__toggle {
|
|
468
|
+
--pf-c-select__toggle-text--Color: var(--pf-c-select__toggle--m-placeholder__toggle-text--Color) !important;
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
@media (min-width: 770px) {
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
/* Case ID Header */
|
|
492
|
-
th.pf-
|
|
492
|
+
th.pf-c-table__sort[data-label='Case ID'] {
|
|
493
493
|
position: sticky;
|
|
494
494
|
background-color: white;
|
|
495
495
|
left: 87px;
|
|
@@ -499,61 +499,53 @@
|
|
|
499
499
|
|
|
500
500
|
/* Vertical border to divide sticky columns and other columns*/
|
|
501
501
|
.case-list-table tbody > tr > :nth-child(2):before,
|
|
502
|
-
th.pf-
|
|
502
|
+
th.pf-c-table__sort[data-label='Case ID']:before {
|
|
503
503
|
position: absolute;
|
|
504
504
|
content: '';
|
|
505
505
|
top: 0px;
|
|
506
506
|
right: 0px;
|
|
507
507
|
height: 100%;
|
|
508
|
-
border-right: var(--pf-
|
|
508
|
+
border-right: var(--pf-c-table--border-width--base) solid var(--pf-c-table--BorderColor);
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
/* Issue Summary Header */
|
|
512
|
-
th.pf-
|
|
512
|
+
th.pf-c-table__sort[data-label='Issue summary'],
|
|
513
513
|
.case-list-table tbody > tr > :nth-child(3) {
|
|
514
514
|
min-width: 270px;
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
th.pf-
|
|
518
|
-
th.pf-
|
|
519
|
-
th.pf-
|
|
517
|
+
th.pf-c-table__sort[data-label='Owner'],
|
|
518
|
+
th.pf-c-table__sort[data-label='Status'],
|
|
519
|
+
th.pf-c-table__sort[data-label='Group'] {
|
|
520
520
|
min-width: 140px;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
th.pf-
|
|
524
|
-
th.pf-
|
|
523
|
+
th.pf-c-table__sort[data-label='Severity'],
|
|
524
|
+
th.pf-c-table__sort[data-label='Case ID'] {
|
|
525
525
|
min-width: 150px;
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
th.pf-
|
|
529
|
-
th.pf-
|
|
528
|
+
th.pf-c-table__sort[data-label='Modified by'],
|
|
529
|
+
th.pf-c-table__sort[data-label='Created by'] {
|
|
530
530
|
min-width: 170px;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
th.pf-m-width-15[data-label='Product and version'],
|
|
534
|
-
th.pf-
|
|
534
|
+
th.pf-c-table__sort[data-label='Support type'] {
|
|
535
535
|
min-width: 180px;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
-
th.pf-
|
|
538
|
+
th.pf-c-table__sort[data-label='Account number'] {
|
|
539
539
|
min-width: 205px;
|
|
540
540
|
}
|
|
541
541
|
|
|
542
|
-
th.pf-
|
|
542
|
+
th.pf-c-table__sort[data-label='Personal reference number'] {
|
|
543
543
|
min-width: 232px;
|
|
544
544
|
}
|
|
545
545
|
|
|
546
546
|
/* Closed Date Header */
|
|
547
|
-
th.pf-
|
|
548
|
-
th.pf-
|
|
547
|
+
th.pf-c-table__sort.pf-m-width-10[data-label='Closed date'],
|
|
548
|
+
th.pf-c-table__sort[data-label='Case type'] {
|
|
549
549
|
min-width: 200px;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
|
|
553
|
-
@media (min-width: 1800px) {
|
|
554
|
-
/* Issue Summary */
|
|
555
|
-
th.pf-v5-c-table__sort[data-label='Issue summary'],
|
|
556
|
-
.case-list-table tbody > tr > :nth-child(3) {
|
|
557
|
-
min-width: 450px;
|
|
558
|
-
}
|
|
559
|
-
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.escalation-form fieldset .escalation-form-fields {
|
|
2
2
|
display: -ms-grid;
|
|
3
3
|
display: grid;
|
|
4
|
-
grid-gap: var(--pf-
|
|
5
|
-
padding: var(--pf-
|
|
4
|
+
grid-gap: var(--pf-c-form--GridGap);
|
|
5
|
+
padding: var(--pf-global--spacer--lg);
|
|
6
6
|
padding-bottom: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
margin-bottom: 5rem;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
input[aria-invalid='true'].pf-
|
|
14
|
-
border-bottom: var(--pf-
|
|
13
|
+
input[aria-invalid='true'].pf-c-form-control {
|
|
14
|
+
border-bottom: var(--pf-c-form-control--BorderBottomColor) solid;
|
|
15
15
|
}
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// .grid-row-gap-md {
|
|
2
|
-
// grid-row-gap: var(--pf-
|
|
2
|
+
// grid-row-gap: var(--pf-l-grid--m-gutter--GridGap);
|
|
3
3
|
// }
|
|
4
4
|
|
|
5
|
-
div.pf-
|
|
6
|
-
form.pf-
|
|
5
|
+
div.pf-c-modal-box__body {
|
|
6
|
+
form.pf-c-form.save-search-form {
|
|
7
7
|
// Overrides the style for Name field in save search modal
|
|
8
|
-
div.pf-
|
|
9
|
-
div.pf-
|
|
10
|
-
label.pf-
|
|
11
|
-
span.pf-
|
|
8
|
+
div.pf-c-form__group.form-group.pull-bottom-narrow.save-for-later-name {
|
|
9
|
+
div.pf-c-form__group-label {
|
|
10
|
+
label.pf-c-form__label {
|
|
11
|
+
span.pf-c-form__label-text {
|
|
12
12
|
span.save-for-later-label-name {
|
|
13
13
|
font-weight: 600 !important;
|
|
14
14
|
}
|
|
@@ -18,10 +18,10 @@ div.pf-v5-c-modal-box__body {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// Overrides the style for Search and filtery query field in save search modal
|
|
21
|
-
div.pf-
|
|
22
|
-
div.pf-
|
|
23
|
-
label.pf-
|
|
24
|
-
span.pf-
|
|
21
|
+
div.pf-c-form__group.form-group.pf-u-mt-lg.save-for-later-query {
|
|
22
|
+
div.pf-c-form__group-label {
|
|
23
|
+
label.pf-c-form__label {
|
|
24
|
+
span.pf-c-form__label-text {
|
|
25
25
|
span.save-for-later-label-query {
|
|
26
26
|
font-weight: 600 !important;
|
|
27
27
|
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
// Override disable color on darker backgrounds - Different variation. Should be consistent.
|
|
2
2
|
.case-search-filters {
|
|
3
|
-
.pf-
|
|
4
|
-
.pf-
|
|
5
|
-
.pf-
|
|
3
|
+
.pf-c-button:disabled,
|
|
4
|
+
.pf-c-button.pf-m-disabled,
|
|
5
|
+
.pf-c-button.pf-m-aria-disabled {
|
|
6
6
|
color: #ccc;
|
|
7
7
|
background-color: #fff;
|
|
8
8
|
}
|
|
9
9
|
z-index: 9;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
.pf-v5-c-menu__group-title {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.10-beta.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.16.
|
|
30
|
-
"@patternfly/patternfly": "
|
|
29
|
+
"@cee-eng/hydrajs": "4.16.43",
|
|
30
|
+
"@patternfly/patternfly": "4.196.7",
|
|
31
31
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
32
|
-
"@patternfly/react-core": "
|
|
33
|
-
"@patternfly/react-table": "
|
|
32
|
+
"@patternfly/react-core": "4.264.0",
|
|
33
|
+
"@patternfly/react-table": "4.111.33",
|
|
34
34
|
"i18next": "^19.0.1",
|
|
35
35
|
"localforage": "^1.10.0",
|
|
36
36
|
"lodash": "^4.17.21",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"solr-query-builder": "1.0.1"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@cee-eng/hydrajs": "4.16.
|
|
45
|
-
"@patternfly/patternfly": "
|
|
44
|
+
"@cee-eng/hydrajs": "4.16.43",
|
|
45
|
+
"@patternfly/patternfly": "4.196.7",
|
|
46
46
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
47
|
-
"@patternfly/react-core": "
|
|
48
|
-
"@patternfly/react-table": "
|
|
49
|
-
"@rh-support/components": "2.
|
|
50
|
-
"@rh-support/react-context": "2.
|
|
47
|
+
"@patternfly/react-core": "4.264.0",
|
|
48
|
+
"@patternfly/react-table": "4.111.33",
|
|
49
|
+
"@rh-support/components": "2.4.10-beta.6",
|
|
50
|
+
"@rh-support/react-context": "2.4.10-beta.6",
|
|
51
51
|
"@rh-support/types": "2.0.2",
|
|
52
|
-
"@rh-support/user-permissions": "2.
|
|
53
|
-
"@rh-support/utils": "2.
|
|
52
|
+
"@rh-support/user-permissions": "2.4.10-beta.6",
|
|
53
|
+
"@rh-support/utils": "2.4.10-beta.6",
|
|
54
54
|
"i18next": "^19.0.1",
|
|
55
55
|
"localforage": "^1.10.0",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"defaults and supports es6-module",
|
|
94
94
|
"maintained node versions"
|
|
95
95
|
],
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "f4caba45a2ffbc0cb441fdd30630769b447931d1"
|
|
97
97
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InternalSsoNameFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/InternalSsoNameFilter.tsx"],"names":[],"mappings":"AAkCA,MAAM,CAAC,OAAO,UAAU,qBAAqB,gBA6R5C"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { contacts } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Flex, FlexItem, MenuToggle, Select, SelectGroup, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
12
|
-
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
|
|
13
|
-
import { LoadingIndicator, useFetch, useSelectKeyboardNavigator } from '@rh-support/components';
|
|
14
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
15
|
-
import { getDropdownBtnPlaceholder } from '@rh-support/utils';
|
|
16
|
-
import isEmpty from 'lodash/isEmpty';
|
|
17
|
-
import isNull from 'lodash/isNull';
|
|
18
|
-
import isUndefined from 'lodash/isUndefined';
|
|
19
|
-
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
21
|
-
import { SolrKeys } from '../../../enums/filters';
|
|
22
|
-
import { useCaseListDispatchContext, useCaseListStateContext } from '../CaseListContext';
|
|
23
|
-
import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
|
|
24
|
-
import { updateFilters } from '../CaseListFilterReducer';
|
|
25
|
-
import { setChipsNameSsoMap } from '../CaseListReducer';
|
|
26
|
-
import { getFilterValues, getSelectedListObj } from './CreatorSsoNameFilter';
|
|
27
|
-
export default function InternalSsoNameFilter() {
|
|
28
|
-
const { t } = useTranslation();
|
|
29
|
-
const { filterInfo } = useContext(CaseListFilterStateContext);
|
|
30
|
-
const dispatch = useContext(CaseListFilterDispatchContext);
|
|
31
|
-
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
32
|
-
const { chipsNameSsoMap } = useCaseListStateContext();
|
|
33
|
-
const CaseListDispatch = useCaseListDispatchContext();
|
|
34
|
-
const own = loggedInUserRights.data.getSSOUsername();
|
|
35
|
-
const PER_PAGE = 200;
|
|
36
|
-
const ASYNC_DROPDOWN_PAGE_SIZE = 10000;
|
|
37
|
-
const { request: getInternalUserContactsList, isFetching: isFetchingInternalContacts } = useFetch(contacts.getSFDCContacts, { propgateErrors: true });
|
|
38
|
-
const abortControllerRef = useRef(undefined);
|
|
39
|
-
const internalInputRef = useRef();
|
|
40
|
-
const [internalContactList, setInternalContactList] = useState([]);
|
|
41
|
-
const [renderedList, setRenderedList] = useState([]);
|
|
42
|
-
const [isInternalOpen, setIsInternalOpen] = useState(false);
|
|
43
|
-
const [noResults, setNoResults] = useState(false);
|
|
44
|
-
const [internalQuery, setInternalQuery] = useState('');
|
|
45
|
-
const filteredOptions = getFilterValues(renderedList, own);
|
|
46
|
-
const dropdownHeader = [
|
|
47
|
-
{
|
|
48
|
-
label: `${t('Cases created by me')}`,
|
|
49
|
-
value: 'createdByMe',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: `${t('Cases owned by me')}`,
|
|
53
|
-
value: 'ownedByMe',
|
|
54
|
-
},
|
|
55
|
-
];
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
setRenderedList(internalContactList.slice(0, PER_PAGE));
|
|
58
|
-
}, [internalContactList]);
|
|
59
|
-
const onSelectInternal = (contact) => {
|
|
60
|
-
if (isNull(contact) || isUndefined(contact) || contact === 'show-more')
|
|
61
|
-
return;
|
|
62
|
-
let list = [];
|
|
63
|
-
if (selectedInternalContacts.some((item) => item.value === contact.value)) {
|
|
64
|
-
list = selectedInternalContacts.filter((item) => item.value !== contact.value);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
list = [...selectedInternalContacts, contact];
|
|
68
|
-
}
|
|
69
|
-
onFilterChangeAsync(list);
|
|
70
|
-
setInternalQuery('');
|
|
71
|
-
};
|
|
72
|
-
const { onInputKeyDown, focusedItemIndex } = useSelectKeyboardNavigator({
|
|
73
|
-
list: [...dropdownHeader, ...filteredOptions],
|
|
74
|
-
isOpen: isInternalOpen,
|
|
75
|
-
setIsOpen: setIsInternalOpen,
|
|
76
|
-
onSelect: onSelectInternal,
|
|
77
|
-
});
|
|
78
|
-
const selectedInternalContacts = useMemo(() => getSelectedListObj(renderedList, filterInfo, own, t),
|
|
79
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
-
[renderedList, filterInfo, own]);
|
|
81
|
-
const onFilterChangeAsync = (items) => {
|
|
82
|
-
const selectedItems = items.map((item) => item.value);
|
|
83
|
-
const caseCreated = selectedItems
|
|
84
|
-
.filter((o) => o !== 'ownedByMe')
|
|
85
|
-
.map((o) => (o === 'createdByMe' ? own : o));
|
|
86
|
-
const caseOwnedBy = selectedItems
|
|
87
|
-
.filter((o) => o !== 'createdByMe')
|
|
88
|
-
.map((o) => (o === 'ownedByMe' ? own : o));
|
|
89
|
-
const caseOwner = loggedInUserRights.data.isInternal() && caseOwnedBy.indexOf(own) !== -1 ? [own] : [];
|
|
90
|
-
updateFilters(dispatch, [
|
|
91
|
-
{
|
|
92
|
-
filterKey: SolrKeys.createdBySsoUsername,
|
|
93
|
-
values: caseCreated,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
filterKey: SolrKeys.caseContactSSO,
|
|
97
|
-
values: caseOwnedBy,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
filterKey: SolrKeys.caseOwner,
|
|
101
|
-
values: caseOwner,
|
|
102
|
-
},
|
|
103
|
-
]);
|
|
104
|
-
// set name/sso pairs on state to be used in filter chip component
|
|
105
|
-
if (loggedInUserRights.data.isInternal()) {
|
|
106
|
-
const chipsNameSsoPairs = {};
|
|
107
|
-
items.forEach((item) => {
|
|
108
|
-
var _a, _b, _c, _d;
|
|
109
|
-
const sso = item.value.value;
|
|
110
|
-
if (sso !== 'ownedByMe' && sso !== 'createdByMe' && !chipsNameSsoMap[sso]) {
|
|
111
|
-
chipsNameSsoPairs[sso] = {
|
|
112
|
-
firstName: ((_a = item.value) === null || _a === void 0 ? void 0 : _a.firstName) || '',
|
|
113
|
-
lastName: ((_b = item.value) === null || _b === void 0 ? void 0 : _b.lastName) || '',
|
|
114
|
-
firstNameCustom: ((_c = item.value) === null || _c === void 0 ? void 0 : _c.firstNameCustom) || '',
|
|
115
|
-
lastNameCustom: ((_d = item.value) === null || _d === void 0 ? void 0 : _d.lastNameCustom) || '',
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
setChipsNameSsoMap(CaseListDispatch, chipsNameSsoPairs);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
const onSearchAsync = (query) => __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
if (query == null) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
if (abortControllerRef.current !== undefined) {
|
|
127
|
-
// Cancel the previous request
|
|
128
|
-
abortControllerRef.current.abort();
|
|
129
|
-
}
|
|
130
|
-
// recreate a new AbortController for each call
|
|
131
|
-
let controller = new AbortController();
|
|
132
|
-
abortControllerRef.current = controller;
|
|
133
|
-
const queryParams = {
|
|
134
|
-
internal: false,
|
|
135
|
-
limit: ASYNC_DROPDOWN_PAGE_SIZE,
|
|
136
|
-
nameLookup: query,
|
|
137
|
-
};
|
|
138
|
-
const response = yield getInternalUserContactsList(queryParams, controller.signal);
|
|
139
|
-
const contacts = response && response.items && response.items.length !== 0
|
|
140
|
-
? response.items.filter((c) => !isEmpty(c.ssoUsername))
|
|
141
|
-
: [];
|
|
142
|
-
setNoResults(isEmpty(contacts));
|
|
143
|
-
setInternalContactList(contacts);
|
|
144
|
-
});
|
|
145
|
-
const onDisplayMoreClick = () => {
|
|
146
|
-
setRenderedList((pre) => internalContactList.slice(0, pre.length + PER_PAGE));
|
|
147
|
-
setIsInternalOpen(true);
|
|
148
|
-
};
|
|
149
|
-
const filteredInternalList = useMemo(() => {
|
|
150
|
-
return [
|
|
151
|
-
...(isFetchingInternalContacts
|
|
152
|
-
? [
|
|
153
|
-
React.createElement("div", { key: "searching", className: "pf-v5-u-p-sm" },
|
|
154
|
-
React.createElement(Trans, null, "Searching...")),
|
|
155
|
-
]
|
|
156
|
-
: []),
|
|
157
|
-
...(noResults && !isFetchingInternalContacts
|
|
158
|
-
? [
|
|
159
|
-
React.createElement("div", { key: "no-results", className: "pf-v5-u-p-sm" },
|
|
160
|
-
React.createElement(Trans, null, "No results found")),
|
|
161
|
-
]
|
|
162
|
-
: []),
|
|
163
|
-
...dropdownHeader.map((contact, index) => (React.createElement(SelectOption, { key: contact.value, isFocused: focusedItemIndex === index, value: contact, hasCheckbox: true, isSelected: selectedInternalContacts.some((c) => c.value === contact.value) }, contact.label))),
|
|
164
|
-
...(!isEmpty(filteredOptions)
|
|
165
|
-
? [
|
|
166
|
-
React.createElement("div", { className: "pf-v5-c-divider", role: "separator" }),
|
|
167
|
-
React.createElement(SelectGroup, null,
|
|
168
|
-
React.createElement("h6", { className: "pf-v5-u-pl-md" },
|
|
169
|
-
React.createElement(Trans, null, "Created or owned by")),
|
|
170
|
-
filteredOptions.map((contact, index) => (React.createElement(SelectOption, { key: contact.value, isFocused: focusedItemIndex === index + dropdownHeader.length, value: contact, hasCheckbox: true, isSelected: selectedInternalContacts.some((c) => c.value === contact.value) }, contact.label)))),
|
|
171
|
-
]
|
|
172
|
-
: []),
|
|
173
|
-
...(renderedList.length < internalContactList.length
|
|
174
|
-
? [
|
|
175
|
-
React.createElement("div", { className: "pf-v5-c-divider", role: "separator" }),
|
|
176
|
-
React.createElement(SelectOption, { key: "show-more", value: 'show-more', onClick: onDisplayMoreClick },
|
|
177
|
-
React.createElement(Flex, { justifyContent: { default: 'justifyContentCenter' } },
|
|
178
|
-
React.createElement(FlexItem, null,
|
|
179
|
-
React.createElement(Button, { variant: "link", isInline: true },
|
|
180
|
-
React.createElement(Trans, null, "Display additional results"))))),
|
|
181
|
-
]
|
|
182
|
-
: []),
|
|
183
|
-
];
|
|
184
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
185
|
-
}, [
|
|
186
|
-
internalContactList,
|
|
187
|
-
own,
|
|
188
|
-
selectedInternalContacts,
|
|
189
|
-
renderedList,
|
|
190
|
-
focusedItemIndex,
|
|
191
|
-
isFetchingInternalContacts,
|
|
192
|
-
noResults,
|
|
193
|
-
]);
|
|
194
|
-
const onInternalQueryChange = (_v, query) => {
|
|
195
|
-
setInternalQuery(query);
|
|
196
|
-
onSearchAsync(query);
|
|
197
|
-
};
|
|
198
|
-
const onInternalToggle = () => {
|
|
199
|
-
setIsInternalOpen((pre) => !pre);
|
|
200
|
-
};
|
|
201
|
-
const internalToggle = (toggleRef) => (React.createElement(MenuToggle, { variant: "typeahead", onClick: onInternalToggle, innerRef: toggleRef, isExpanded: isInternalOpen, isFullWidth: true },
|
|
202
|
-
React.createElement(TextInputGroup, { isPlain: true },
|
|
203
|
-
React.createElement(TextInputGroupMain, { value: internalQuery, onClick: onInternalToggle, onKeyDown: onInputKeyDown, placeholder: getDropdownBtnPlaceholder(t('Search for a name'), selectedInternalContacts.map((i) => i.label), ' ', filteredInternalList.length, t('All contacts')), onChange: onInternalQueryChange, isExpanded: isInternalOpen, innerRef: internalInputRef }),
|
|
204
|
-
React.createElement(TextInputGroupUtilities, null, !isEmpty(internalQuery) && (React.createElement(Button, { variant: "plain", onClick: () => setInternalQuery(''), isDisabled: isFetchingInternalContacts, "aria-label": t('Clear') }, isFetchingInternalContacts ? (React.createElement(LoadingIndicator, { show: true, size: "sm" })) : (React.createElement(TimesCircleIcon, { "aria-hidden": true }))))))));
|
|
205
|
-
return (React.createElement(Select, { id: "internal-ssousername-filter", "data-tracking-id": "internal-ssousername-filter", isOpen: isInternalOpen, onOpenChange: () => setIsInternalOpen(false), toggle: internalToggle, popperProps: { direction: 'down', enableFlip: false }, isScrollable: true, onSelect: (_e, v) => onSelectInternal(v) },
|
|
206
|
-
React.createElement(SelectList, null, filteredInternalList)));
|
|
207
|
-
}
|