@rh-support/troubleshoot 2.6.33 → 2.6.34

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAsdzC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAsdzC;AAED,eAAe,mBAAmB,CAAC"}
@@ -16,6 +16,8 @@ import difference from 'lodash/difference';
16
16
  import differenceBy from 'lodash/differenceBy';
17
17
  import filter from 'lodash/filter';
18
18
  import find from 'lodash/find';
19
+ import intersection from 'lodash/intersection';
20
+ import intersectionBy from 'lodash/intersectionBy';
19
21
  import isEmpty from 'lodash/isEmpty';
20
22
  import isEqual from 'lodash/isEqual';
21
23
  import map from 'lodash/map';
@@ -110,7 +112,7 @@ function CaseContactSelector(props) {
110
112
  });
111
113
  const processCaseContacts = (selectedContacts) => __awaiter(this, void 0, void 0, function* () {
112
114
  const toAdd = filter(differenceBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => item.ssoUsername !== contactSsoUsername);
113
- const toRemove = filter(differenceBy(selectedNotificationContacts, selectedContacts, 'ssoUsername'), (item) => !item.isInternal && item.ssoUsername !== contactSsoUsername);
115
+ const toRemove = filter(intersectionBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => !item.isInternal && item.ssoUsername !== contactSsoUsername);
114
116
  (toAdd.length || toRemove.length) && clearErrorState();
115
117
  if ((toAdd || []).length > 0) {
116
118
  if (loggedInUserRights.data.isOrgAdmin()) {
@@ -127,7 +129,7 @@ function CaseContactSelector(props) {
127
129
  });
128
130
  const processCustomEmails = (selectedCustomEmails) => __awaiter(this, void 0, void 0, function* () {
129
131
  const currentEmails = customEmailsList.data.map((item) => item.emailAddress);
130
- const toRemoveEmails = difference(currentEmails, selectedCustomEmails);
132
+ const toRemoveEmails = intersection(currentEmails, selectedCustomEmails);
131
133
  const toAddEmails = difference(selectedCustomEmails, currentEmails);
132
134
  (toAddEmails.length || toRemoveEmails.length) && clearErrorState();
133
135
  if ((toAddEmails || []).length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAyMxD"}
1
+ {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAuMxD"}
@@ -60,15 +60,13 @@ export function NonOrgCaseNotifyeesSelector(props) {
60
60
  }
61
61
  }, [props.typeaheadRef]);
62
62
  const onItemSelect = (option) => {
63
- const newSelected = [...props.selectedItems, option];
64
- props.onChange && props.onChange(newSelected);
63
+ props.onChange && props.onChange([option]);
65
64
  setInputVal('');
66
65
  clearList();
67
66
  setIsDropdownOpen(false);
68
67
  };
69
68
  const onRemoveItem = (optionToRemove) => {
70
- const newSelected = props.selectedItems.filter((item) => getKey(item) !== getKey(optionToRemove));
71
- props.onChange && props.onChange(newSelected);
69
+ props.onChange && props.onChange([optionToRemove]);
72
70
  };
73
71
  const onAddClick = () => __awaiter(this, void 0, void 0, function* () {
74
72
  var _a, _b, _c;
@@ -827,3 +827,7 @@ div.case-details-tabs pre {
827
827
  padding-left: 1.5rem;
828
828
  padding-right: 1.5rem;
829
829
  }
830
+
831
+ .pf-v6-c-alert {
832
+ margin-top: 0;
833
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.33",
3
+ "version": "2.6.34",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "f69973584d77efaa8fb77808e43757b074e50dc6"
137
+ "gitHead": "976f134e20f3bf65b6bf613d6f39060724683cf9"
138
138
  }