@rh-support/manage 2.5.184 → 2.5.192
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/lib/esm/ManageTabs.js +1 -1
- package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.js +23 -8
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.d.ts.map +1 -1
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +3 -33
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.js +7 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsList.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsList.js +12 -4
- package/lib/esm/components/ManagePartnerships/Requests.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/Requests.js +9 -4
- package/lib/esm/components/ManagePreferences/components/PreferenceSwitch.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSwitch.js +6 -6
- package/lib/esm/components/ManagePreferences/sections/PreferencesACL.js +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +1 -1
- package/lib/esm/components/ManageTable/ManageTable.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.js +8 -2
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +1 -1
- package/lib/esm/context/ExpiredContentContextProvider.d.ts.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/reducers/TopContentReducer.d.ts.map +1 -1
- package/lib/esm/reducers/TopContentReducer.js +5 -2
- package/lib/esm/scss/_main.scss +12 -5
- package/lib/esm/scss/_pf-overrides.scss +4 -0
- package/package.json +8 -8
package/lib/esm/ManageTabs.js
CHANGED
|
@@ -130,7 +130,7 @@ export function ManageTabs(props) {
|
|
|
130
130
|
return (React.createElement("div", { className: "grid-main manage" },
|
|
131
131
|
React.createElement(ErrorBoundary, { isPageLevelError: true }, (_b = (_a = tabsToRender[0]) === null || _a === void 0 ? void 0 : _a.component) !== null && _b !== void 0 ? _b : React.createElement(React.Fragment, null))));
|
|
132
132
|
/**
|
|
133
|
-
* Render array with
|
|
133
|
+
* Render array with tabs
|
|
134
134
|
*/
|
|
135
135
|
return (React.createElement("div", { className: "grid-main manage", role: "region", style: { display: 'flex' } },
|
|
136
136
|
React.createElement(Tabs, { activeKey: getActiveTabKey(), onSelect: handleTabClick, "aria-label": t('Manage tabs'), component: TabsComponent.nav, isVertical: true, style: { width: 'auto' } }, map(tabsToRender, (tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, title: React.createElement(TabTitleText, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultGroupSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAIvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,MAAM;IACZ,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"DefaultGroupSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAIvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,MAAM;IACZ,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,sBA+C/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/GroupSelect/GroupSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAwC3E,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAKD,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"GroupSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/GroupSelect/GroupSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAwC3E,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAKD,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,sBA+iBxC,CAAC"}
|
|
@@ -41,7 +41,7 @@ export const GroupSelect = (props) => {
|
|
|
41
41
|
useEffect(() => {
|
|
42
42
|
var _a, _b;
|
|
43
43
|
if (haventLoadedMetadata(caseGroups, (data) => data === undefined))
|
|
44
|
-
fetchCaseGroupsForSSO(dispatch, loggedInUserJwtToken.
|
|
44
|
+
fetchCaseGroupsForSSO(dispatch, loggedInUserJwtToken.preferred_username);
|
|
45
45
|
if (isEmpty(selectedGroup) && !isEmpty(caseGroups) && ((_a = caseGroups === null || caseGroups === void 0 ? void 0 : caseGroups.data) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
46
46
|
const defaultCaseGroup = find(caseGroups === null || caseGroups === void 0 ? void 0 : caseGroups.data, (g) => g.isDefault);
|
|
47
47
|
const newSelectedGroup = (defaultCaseGroup === null || defaultCaseGroup === void 0 ? void 0 : defaultCaseGroup.groupNum) === '-1'
|
|
@@ -54,7 +54,7 @@ export const GroupSelect = (props) => {
|
|
|
54
54
|
}
|
|
55
55
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
56
|
}, [dispatch, loggedInUserJwtToken, caseGroups]);
|
|
57
|
-
// handle dropdown open/close toggle
|
|
57
|
+
// handle dropdown open/close toggle
|
|
58
58
|
const [isOpen, setIsOpen] = useState(false);
|
|
59
59
|
// handle group selection
|
|
60
60
|
const [selectedGroup, setSelectedGroup] = useState();
|
|
@@ -85,6 +85,7 @@ export const GroupSelect = (props) => {
|
|
|
85
85
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
86
86
|
const toggleIsDropdownOpen = () => setIsDropdownOpen(!isDropdownOpen);
|
|
87
87
|
const closeDropdown = () => setIsDropdownOpen(false);
|
|
88
|
+
const [activeItem, setActiveItem] = useState(null);
|
|
88
89
|
const onActionFocus = (action) => () => {
|
|
89
90
|
closeDropdown();
|
|
90
91
|
setAction(action);
|
|
@@ -103,16 +104,27 @@ export const GroupSelect = (props) => {
|
|
|
103
104
|
deleteGroupFetch.isFetching ||
|
|
104
105
|
duplicateGroupFetch.isFetching;
|
|
105
106
|
const onChange = (e, value) => {
|
|
107
|
+
setIsOpen(true);
|
|
106
108
|
setInput(value);
|
|
107
109
|
if (value !== input) {
|
|
108
110
|
setShouldFilter(true);
|
|
109
111
|
}
|
|
110
112
|
};
|
|
111
113
|
useEffect(() => setInput(selectedGroup), [selectedGroup]);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (input && input != selectedGroup) {
|
|
116
|
+
if (!isOpen) {
|
|
117
|
+
setIsOpen(true);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
setFocusedItemIndex(-1);
|
|
121
|
+
setActiveItem(null);
|
|
122
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
123
|
+
}, [input]);
|
|
112
124
|
// group actions
|
|
113
125
|
function setGroupOnFetch(groupName) {
|
|
114
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
yield fetchCaseGroupsForSSO(dispatch, loggedInUserJwtToken.
|
|
127
|
+
yield fetchCaseGroupsForSSO(dispatch, loggedInUserJwtToken.preferred_username);
|
|
116
128
|
setSelectedGroup(groupName);
|
|
117
129
|
});
|
|
118
130
|
}
|
|
@@ -146,7 +158,7 @@ export const GroupSelect = (props) => {
|
|
|
146
158
|
ToastNotification.addWarningMessage(t('Group already exists'));
|
|
147
159
|
break;
|
|
148
160
|
}
|
|
149
|
-
yield createGroup(input, loggedInUserJwtToken.
|
|
161
|
+
yield createGroup(input, loggedInUserJwtToken.preferred_username);
|
|
150
162
|
setAction('');
|
|
151
163
|
break;
|
|
152
164
|
}
|
|
@@ -218,7 +230,10 @@ export const GroupSelect = (props) => {
|
|
|
218
230
|
break;
|
|
219
231
|
}
|
|
220
232
|
try {
|
|
221
|
-
yield duplicateGroupFetch.request({
|
|
233
|
+
yield duplicateGroupFetch.request({
|
|
234
|
+
name: input,
|
|
235
|
+
contactSsoName: loggedInUserJwtToken.preferred_username,
|
|
236
|
+
});
|
|
222
237
|
yield setGroupOnFetch(input);
|
|
223
238
|
setShowDropdown(true);
|
|
224
239
|
setShowInput(false);
|
|
@@ -332,7 +347,7 @@ export const GroupSelect = (props) => {
|
|
|
332
347
|
.filter((g) => !shouldFilter ||
|
|
333
348
|
isEmpty(input && typeof input === 'string' && input.trim()) ||
|
|
334
349
|
g.name.toLowerCase().includes(input.toLowerCase()));
|
|
335
|
-
const { focusedItemIndex, onInputKeyDown } = useSelectKeyboardNavigator({
|
|
350
|
+
const { focusedItemIndex, onInputKeyDown, setFocusedItemIndex } = useSelectKeyboardNavigator({
|
|
336
351
|
list: filteredGroups,
|
|
337
352
|
isOpen,
|
|
338
353
|
ignoreResetOnListChange: true,
|
|
@@ -343,7 +358,7 @@ export const GroupSelect = (props) => {
|
|
|
343
358
|
});
|
|
344
359
|
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: props.isDisabled },
|
|
345
360
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
346
|
-
React.createElement(TextInputGroupMain, { value: input, onClick: onToggleClick, onKeyDown: onInputKeyDown, onChange: onChange, autoComplete: "off", innerRef: textInputRef, placeholder: selectAGroupText, role: "combobox", isExpanded: isOpen, "aria-controls": "group-selector-listbox" }),
|
|
361
|
+
React.createElement(TextInputGroupMain, Object.assign({ value: input, onClick: onToggleClick, onKeyDown: onInputKeyDown, onChange: onChange, autoComplete: "off", innerRef: textInputRef, placeholder: selectAGroupText, role: "combobox", isExpanded: isOpen, "aria-controls": "group-selector-listbox" }, (activeItem && { 'aria-activedescendant': activeItem }))),
|
|
347
362
|
caseGroups.isFetching ? (React.createElement(TextInputGroupUtilities, null,
|
|
348
363
|
React.createElement(Spinner, { size: "md" }))) : (React.createElement(TextInputGroupUtilities, Object.assign({}, (!input ? { style: { display: 'none' } } : {})),
|
|
349
364
|
React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onClear, "aria-label": "Clear input value" }))))));
|
|
@@ -352,7 +367,7 @@ export const GroupSelect = (props) => {
|
|
|
352
367
|
!showErrorMessage && !showInput && (React.createElement(React.Fragment, null,
|
|
353
368
|
React.createElement("label", null,
|
|
354
369
|
React.createElement(Trans, null, "Group")),
|
|
355
|
-
React.createElement(Select, { id: "group-selector", isOpen: isOpen, onSelect: (e, selection) => handleSelect(selection), onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, selected: selectedGroup, shouldFocusFirstItemOnOpen: false, "aria-label": "Select a group to view accounts", "aria-labelledby": selectAGroupText, "data-tracking-id": "group-list-selector" },
|
|
370
|
+
React.createElement(Select, { id: "group-selector", isOpen: isOpen, onSelect: (e, selection) => handleSelect(selection), onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, selected: selectedGroup, shouldFocusFirstItemOnOpen: false, "aria-label": "Select a group to view accounts", "aria-labelledby": selectAGroupText, "data-tracking-id": "group-list-selector", isScrollable: true },
|
|
356
371
|
React.createElement(SelectList, { id: "group-selector-listbox" }, filteredGroups.length > 0 ? (filteredGroups.map((group, index) => (React.createElement(SelectOption, { id: `group-option-${group.name}`, key: index, value: group, isFocused: focusedItemIndex === index, className: "pf-v6-c-select__menu-wrapper", isSelected: group.name === selectedGroup }, group.name)))) : (React.createElement(SelectOption, { key: "no-results", value: '' }, t('No results found'))))))),
|
|
357
372
|
!showErrorMessage && showDropdown && (React.createElement(Dropdown, { className: "group-actions-dropdown group-action", toggle: dropdownToggle, isOpen: isDropdownOpen, onOpenChange: (isOpen) => setIsDropdownOpen(isOpen), "aria-label": t('Group actions dropdown'), shouldFocusFirstItemOnOpen: false, shouldFocusToggleOnSelect: true },
|
|
358
373
|
React.createElement(MenuContent, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,eAAO,MAAM,gBAAgB,yBA4L5B,CAAC"}
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { SearchInput } from '@patternfly/react-core';
|
|
12
|
-
import {
|
|
12
|
+
import { ErrorBoundary, ToastNotification, useFetch, usePrevious } from '@rh-support/components';
|
|
13
13
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
-
import {
|
|
17
|
+
import { useLocation } from 'react-router-dom';
|
|
18
18
|
import { ManageTable } from '../../ManageTable/ManageTable';
|
|
19
19
|
import { DefaultGroupSwitch } from '../DefualtGroupSwitch';
|
|
20
20
|
import { GroupSelect } from '../GroupSelect';
|
|
@@ -22,7 +22,7 @@ import { GroupUserPermissionsSelect } from '../GroupUserPermissionsSelect';
|
|
|
22
22
|
export const ManageGroupUsers = () => {
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const location = useLocation();
|
|
25
|
-
const { globalMetadataState: { loggedInUsersAccount
|
|
25
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
26
26
|
const disableGroupSelect = !loggedInUsersAccount || !loggedInUsersAccount.data || !loggedInUsersAccount.data.accountNumber;
|
|
27
27
|
const [selectedGroup, setSelectedGroup] = useState();
|
|
28
28
|
const { clearResponse, isFetching, request, data: response, } = useFetch(publicApi.caseGroups.getCaseGroupUsers);
|
|
@@ -130,36 +130,6 @@ export const ManageGroupUsers = () => {
|
|
|
130
130
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
131
|
}, [location.pathname, loggedInUsersAccount.data]);
|
|
132
132
|
return (React.createElement(React.Fragment, null,
|
|
133
|
-
React.createElement(AlertMessage, { variant: AlertType.INFO, show: loggedInUserRights.data.isOrgAdmin() &&
|
|
134
|
-
!loggedInUsersAccount.data.hasGroupACLs &&
|
|
135
|
-
!loggedInUserRights.data.isInternal(), isInline: true, className: "pf-v6-u-mb-lg", title: t('Case Group ACL is not enabled') },
|
|
136
|
-
React.createElement("p", null,
|
|
137
|
-
React.createElement(Trans, { i18nKey: "i18nRequestControl" },
|
|
138
|
-
"To use case groups to limit user access, enable the",
|
|
139
|
-
' ',
|
|
140
|
-
React.createElement("a", { href: "https://access.redhat.com/articles/170453", target: "_blank", rel: "noopener noreferrer" }, "Case Group Access Control Lists (ACL)"),
|
|
141
|
-
' ',
|
|
142
|
-
"under",
|
|
143
|
-
' ',
|
|
144
|
-
React.createElement(Link, { key: "case-contact-phone-number-review", replace: true, to: {
|
|
145
|
-
pathname: '/manage/preferences',
|
|
146
|
-
}, "data-tracking-id": "case-contact-phone-number-review" }, "Preferences")),
|
|
147
|
-
React.createElement("br", null),
|
|
148
|
-
React.createElement(Trans, null, "You can organize and group related cases and filter on the case list page, but you cannot change permissions for case groups unless the Case Group ACL is enabled."))),
|
|
149
|
-
React.createElement(AlertMessage, { variant: AlertType.INFO, show: loggedInUserRights.data.isInternal(), isInline: true, className: "pf-v6-u-mb-lg", title: t('Case Group ACL is not available for internal users.') },
|
|
150
|
-
React.createElement("p", null,
|
|
151
|
-
React.createElement(Trans, { i18nKey: "i18nRequestControl" },
|
|
152
|
-
"As an internal user you can use case group without ACL functionality. To use case groups to limit user access, customers can enable the",
|
|
153
|
-
' ',
|
|
154
|
-
React.createElement("a", { href: "https://access.redhat.com/articles/170453", target: "_blank", rel: "noopener noreferrer" }, "Case Group Access Control Lists (ACL)"),
|
|
155
|
-
' ',
|
|
156
|
-
"under",
|
|
157
|
-
' ',
|
|
158
|
-
React.createElement(Link, { key: "case-contact-phone-number-review", replace: true, to: {
|
|
159
|
-
pathname: '/manage/preferences',
|
|
160
|
-
}, "data-tracking-id": "case-contact-phone-number-review" }, "Preferences")),
|
|
161
|
-
React.createElement("br", null),
|
|
162
|
-
React.createElement(Trans, null, "Customers can organize and group related cases and filter on the case list page, but they cannot change permissions for case groups unless the Case Group ACL is enabled."))),
|
|
163
133
|
React.createElement("header", null,
|
|
164
134
|
React.createElement("h2", { className: "pf-v6-u-pb-sm" }, t('Groups')),
|
|
165
135
|
React.createElement("p", null, t('To filter cases while searching, add or edit groups.'))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookmarkAccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAmBhF,OAAO,EAAE,SAAS,EAAuB,MAAM,2BAA2B,CAAC;AAO3E,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,UAAU,MAAM;IACZ,uBAAuB,EAAE,SAAS,EAAE,CAAC;IACrC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BookmarkAccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAmBhF,OAAO,EAAE,SAAS,EAAuB,MAAM,2BAA2B,CAAC;AAO3E,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,UAAU,MAAM;IACZ,uBAAuB,EAAE,SAAS,EAAE,CAAC;IACrC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA6UpD;yBA7Ue,uBAAuB"}
|
package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js
CHANGED
|
@@ -253,7 +253,7 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
|
|
|
253
253
|
' ',
|
|
254
254
|
"bookmarks in the customer support tool"))), closeBtnAriaLabel: "Close" },
|
|
255
255
|
React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
|
|
256
|
-
React.createElement(InfoCircleIcon,
|
|
256
|
+
React.createElement(InfoCircleIcon, { color: "#5e40be" })), variant: "plain", className: "manage-bookmark-info-icon-button", "aria-label": "Cluster Id Info" }))))),
|
|
257
257
|
React.createElement("div", { className: "toolbar pf-v6-u-justify-content-space-between" },
|
|
258
258
|
React.createElement("form", { onSubmit: (event) => event.preventDefault(), className: "toolbar-left" },
|
|
259
259
|
React.createElement("label", { htmlFor: "bookmark-account-selector" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredContentSingleItemView.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentSingleItemView.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAIjG,UAAU,MAAM;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACjD,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,GACb,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ExpiredContentSingleItemView.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentSingleItemView.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAIjG,UAAU,MAAM;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACjD,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,GACb,EAAE,MAAM,qBAwOR"}
|
|
@@ -136,7 +136,13 @@ export default function ExpiredContentSingleItemView({ category, content, onCanc
|
|
|
136
136
|
React.createElement(TagsSelector, { tagOptions: tagOptions, onChange: handleLocalTagChange, selectedTags: localSelectedTags, placeholder: t('Select tags to improve discoverability'), id: "expired-content-tag" }))),
|
|
137
137
|
React.createElement(FlexItem, null,
|
|
138
138
|
React.createElement(FormGroup, { ref: datePickerMenuAppendRef, label: t('Expiry date') },
|
|
139
|
-
React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format'), popoverProps: {
|
|
139
|
+
React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format'), popoverProps: {
|
|
140
|
+
position: 'left',
|
|
141
|
+
hasAutoWidth: true,
|
|
142
|
+
maxWidth: '22rem',
|
|
143
|
+
minWidth: '22rem',
|
|
144
|
+
appendTo: () => document.body,
|
|
145
|
+
} })))),
|
|
140
146
|
React.createElement("span", { className: "top-content-single-item-footer" },
|
|
141
147
|
React.createElement("span", null,
|
|
142
148
|
React.createElement(Button, { variant: "primary", onClick: onContentSave, isDisabled: isSaveButtonDisabled || isSaving, isLoading: isSaving },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartnershipsList.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PartnershipsList.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsList.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,wBAAgB,gBAAgB,sBA+O/B"}
|
|
@@ -11,7 +11,7 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
11
11
|
import { AlertVariant, Button, ButtonVariant, Label, SearchInput } from '@patternfly/react-core';
|
|
12
12
|
import TrashIcon from '@patternfly/react-icons/dist/js/icons/trash-icon';
|
|
13
13
|
import { defaultTableSortMethod, LoadingIndicator, ToastNotification, useConfirmation, } from '@rh-support/components';
|
|
14
|
-
import { fetchAccountManagers, fetchManagedAccounts, GlobalMetadataDispatchContext, useGlobalStateContext, } from '@rh-support/react-context';
|
|
14
|
+
import { fetchAccountManagers, fetchManagedAccounts, GlobalMetadataDispatchContext, updateAccountManagers, updateManagedAccounts, useGlobalStateContext, } from '@rh-support/react-context';
|
|
15
15
|
import React, { useContext, useEffect, useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
17
|
import { useLocation } from 'react-router-dom';
|
|
@@ -46,14 +46,20 @@ export function PartnershipsList() {
|
|
|
46
46
|
});
|
|
47
47
|
try {
|
|
48
48
|
setIsdeleting(true);
|
|
49
|
-
setIsdeletingAccountNum(data.accountNum);
|
|
50
49
|
if (data.isCustomerAccount) {
|
|
50
|
+
setIsdeletingAccountNum(`${data.accountNum}-customer`);
|
|
51
51
|
yield pcm.partnerships.deleteCustomerAccountByPartner(data.accountNum);
|
|
52
|
+
updateManagedAccounts(dispatchToGlobalMetadataReducer, [
|
|
53
|
+
...managedAccounts.data.filter((i) => i.accountNum !== data.accountNum),
|
|
54
|
+
]);
|
|
52
55
|
}
|
|
53
56
|
else {
|
|
57
|
+
setIsdeletingAccountNum(`${data.accountNum}-partner`);
|
|
54
58
|
yield pcm.partnerships.deletePartnerAccountByCustomer(data.accountNum);
|
|
59
|
+
updateAccountManagers(dispatchToGlobalMetadataReducer, [
|
|
60
|
+
...accountManagers.data.filter((i) => i.accountNum !== data.accountNum),
|
|
61
|
+
]);
|
|
55
62
|
}
|
|
56
|
-
setAccountList(accountList.filter((a) => a.accountNum !== data.accountNum));
|
|
57
63
|
ToastNotification.addSuccessMessage(t('Partnership removed successfully'));
|
|
58
64
|
setIsdeleting(false);
|
|
59
65
|
setIsdeletingAccountNum('');
|
|
@@ -111,7 +117,9 @@ export function PartnershipsList() {
|
|
|
111
117
|
cellWidth: 10,
|
|
112
118
|
cell: (data) => (React.createElement(Button, { icon: React.createElement(React.Fragment, null,
|
|
113
119
|
React.createElement(TrashIcon, null),
|
|
114
|
-
React.createElement(LoadingIndicator, { isInline: true, show: isDeleting &&
|
|
120
|
+
React.createElement(LoadingIndicator, { isInline: true, show: isDeleting &&
|
|
121
|
+
`${data.accountNum}-${data.isCustomerAccount ? 'customer' : 'partner'}` ===
|
|
122
|
+
isDeletingAccountNum, size: "xs" })), variant: ButtonVariant.plain, "aria-label": t('Remove partnership'), "data-tracking-id": "remove-partnership", onClick: () => removePartnership(data) })),
|
|
115
123
|
},
|
|
116
124
|
];
|
|
117
125
|
const requestCollaborationButton = () => (React.createElement("div", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Requests.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/Requests.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,WAMvC,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,YAAW,MAAW,WAKhE,CAAC;AAEF,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"Requests.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/Requests.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,WAMvC,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,YAAW,MAAW,WAKhE,CAAC;AAEF,wBAAgB,QAAQ,sBAqRvB"}
|
|
@@ -118,12 +118,12 @@ export function Requests() {
|
|
|
118
118
|
setIsRequestAgainModalOpen(true);
|
|
119
119
|
};
|
|
120
120
|
const actionResolver = (rowData) => {
|
|
121
|
-
var _a
|
|
121
|
+
var _a;
|
|
122
122
|
if (!rowData)
|
|
123
123
|
return;
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
const status = (
|
|
124
|
+
const original = (_a = rowData.originalData) !== null && _a !== void 0 ? _a : rowData;
|
|
125
|
+
const friendlyName = (original === null || original === void 0 ? void 0 : original.friendlyName) || '';
|
|
126
|
+
const status = (original === null || original === void 0 ? void 0 : original.status) || '';
|
|
127
127
|
return [
|
|
128
128
|
...(status === 'EXPIRED'
|
|
129
129
|
? [
|
|
@@ -133,6 +133,11 @@ export function Requests() {
|
|
|
133
133
|
itemKey: 'request-again',
|
|
134
134
|
'data-tracking-id': 'request-again',
|
|
135
135
|
},
|
|
136
|
+
{
|
|
137
|
+
isSeparator: true,
|
|
138
|
+
itemKey: 'separator',
|
|
139
|
+
'data-tracking-id': 'separator',
|
|
140
|
+
},
|
|
136
141
|
]
|
|
137
142
|
: []),
|
|
138
143
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferenceSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/components/PreferenceSwitch.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"PreferenceSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/components/PreferenceSwitch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;IACX,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnD,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,MAAM,qBAgC3F"}
|
|
@@ -9,27 +9,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Switch } from '@patternfly/react-core';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import React
|
|
12
|
+
import React from 'react';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
export function PreferenceSwitch({ onSwitchChange, className, id, label, isChecked }) {
|
|
15
|
-
const [isSwitchLoading, setIsSwitchLoading] = useState(false);
|
|
15
|
+
// const [isSwitchLoading, setIsSwitchLoading] = useState(false);
|
|
16
16
|
let isCheckedLocal = isChecked;
|
|
17
17
|
const { t } = useTranslation();
|
|
18
18
|
// To handle change
|
|
19
19
|
const onChangeLocal = (checked) => __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
try {
|
|
21
|
-
setIsSwitchLoading(true);
|
|
21
|
+
// setIsSwitchLoading(true);
|
|
22
22
|
yield onSwitchChange(checked);
|
|
23
23
|
isCheckedLocal = isChecked;
|
|
24
24
|
ToastNotification.addSuccessMessage(t('Successfully updated preference'));
|
|
25
|
-
setIsSwitchLoading(false);
|
|
25
|
+
// setIsSwitchLoading(false);
|
|
26
26
|
}
|
|
27
27
|
catch (_a) {
|
|
28
28
|
isCheckedLocal = !checked;
|
|
29
29
|
ToastNotification.addDangerMessage(t('Failed to update preference'));
|
|
30
|
-
setIsSwitchLoading(false);
|
|
30
|
+
// setIsSwitchLoading(false);
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
return (React.createElement("div", null,
|
|
34
|
-
React.createElement(Switch, Object.assign({}, (className ? { className } : {}), { id: id, label: label, isChecked: isCheckedLocal, onChange: (_event, checked) => onChangeLocal(checked), isDisabled:
|
|
34
|
+
React.createElement(Switch, Object.assign({}, (className ? { className } : {}), { id: id, label: label, isChecked: isCheckedLocal, onChange: (_event, checked) => onChangeLocal(checked), isDisabled: true }))));
|
|
35
35
|
}
|
|
@@ -48,7 +48,7 @@ export function PreferencesACL() {
|
|
|
48
48
|
React.createElement(PreferenceSwitch, { id: "ACL-switch", label: isAclActivated ? t('ACL Enabled') : t('ACL Disabled'), isChecked: isAclActivated, onSwitchChange: onAclSwitch }),
|
|
49
49
|
React.createElement("div", { className: "prefhostnameTooltip" },
|
|
50
50
|
React.createElement(Tooltip, { content: t('This determines if the account is utilizing case group access controls'), position: "right" },
|
|
51
|
-
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm cursor-pointer" })),
|
|
51
|
+
React.createElement(InfoCircleIcon, { color: "#5e40be", className: "pf-v6-u-ml-sm cursor-pointer" })),
|
|
52
52
|
isAclLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v6-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" })))),
|
|
53
53
|
React.createElement("div", { className: "pf-v6-u-mt-lg" },
|
|
54
54
|
React.createElement("label", null,
|
|
@@ -216,6 +216,6 @@ export function PreferencesCaseView(props) {
|
|
|
216
216
|
React.createElement(PreferenceSwitch, { id: "share-hostnames-switch", label: 'Share hostnames', isChecked: isSharingHostNames, onSwitchChange: onShareHostNamesSwitch }),
|
|
217
217
|
React.createElement("div", { className: "prefhostnameTooltip" },
|
|
218
218
|
React.createElement(Tooltip, { content: prefHostnameCopy, position: "right" },
|
|
219
|
-
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm cursor-pointer" })),
|
|
219
|
+
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm cursor-pointer", color: "#5e40be" })),
|
|
220
220
|
isHostnamesLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v6-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" }))))))))));
|
|
221
221
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageTable.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTable/ManageTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAMf,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;AACtG,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,cAAc,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAyBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ManageTable.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTable/ManageTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAMf,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;AACtG,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,cAAc,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAyBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAqDxC"}
|
|
@@ -14,7 +14,7 @@ const CategoryLimit = () => {
|
|
|
14
14
|
setModalOpen(true);
|
|
15
15
|
} }, "Review guidelines."))) },
|
|
16
16
|
React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
|
|
17
|
-
React.createElement(CircleInfo,
|
|
17
|
+
React.createElement(CircleInfo, { color: "#5e40be" })), variant: "plain" })),
|
|
18
18
|
React.createElement(CategoryLimitGuidelines, { isModalOpen: isModalOpen, onHideModal: onHideModal })));
|
|
19
19
|
};
|
|
20
20
|
export default CategoryLimit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopContentComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,EAGH,oBAAoB,EAGvB,MAAM,wCAAwC,CAAC;AAGhD,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,yBAAyB,CAsHlF,CAAC"}
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Button } from '@patternfly/react-core';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import
|
|
12
|
+
import { isEmpty } from 'lodash';
|
|
13
|
+
import React, { useEffect, useState } from 'react';
|
|
13
14
|
import { Draggable, Droppable } from 'react-beautiful-dnd';
|
|
14
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
15
16
|
import { useTopContentContext, useTopContentDispatchContext } from '../../../../context/TopContentProvider';
|
|
@@ -20,6 +21,11 @@ export const TopContentComponent = (props) => {
|
|
|
20
21
|
const topContentDispatch = useTopContentDispatchContext();
|
|
21
22
|
const { topContentEditState, topContentResponse, isSearchModeEnabled } = useTopContentContext();
|
|
22
23
|
const [isArrangingContent, setIsArrangingContent] = useState(false);
|
|
24
|
+
const [isDisableAddContent, setIsDisableAddContent] = useState(false);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const value = props.category.content.find((item) => isEmpty(item.contentTitle));
|
|
27
|
+
setIsDisableAddContent(!!value);
|
|
28
|
+
}, [props.category.content]);
|
|
23
29
|
// we add an category with empty content to state, the rest is handled like existing categories
|
|
24
30
|
const addContent = () => addTopContent(topContentDispatch, topContentEditState, props.category.id);
|
|
25
31
|
const arrangeSection = () => {
|
|
@@ -42,7 +48,7 @@ export const TopContentComponent = (props) => {
|
|
|
42
48
|
};
|
|
43
49
|
const buttons = (React.createElement("div", { className: "pf-v6-c-accordion__expanded-content-footer" },
|
|
44
50
|
!isArrangingContent && props.categoryMode !== CategoryMode.NEW_SECTION && (React.createElement("span", null,
|
|
45
|
-
React.createElement(Button, { className: "pf-v6-u-mr-md", variant: "secondary", onClick: addContent, "data-tracking-id": "add-content-top-content" },
|
|
51
|
+
React.createElement(Button, { className: "pf-v6-u-mr-md", variant: "secondary", onClick: addContent, "data-tracking-id": "add-content-top-content", isDisabled: isDisableAddContent },
|
|
46
52
|
React.createElement(Trans, null, "Add content")),
|
|
47
53
|
React.createElement(Button, { variant: "secondary", onClick: arrangeSection, isDisabled: props.category.content.length < 2 },
|
|
48
54
|
React.createElement(Trans, null, "Arrange section")))),
|
|
@@ -326,7 +326,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
326
326
|
(content.tags || []).map((tag) => (React.createElement(Label, { isCompact: true, className: "pf-v6-u-mr-xs pf-v6-u-mt-sm", key: tag.id, color: filteredTags.some((t) => t.id === tag.id) ? 'yellow' : 'grey' }, tag.tagName))),
|
|
327
327
|
!isEmpty((_c = content.expiryDate) !== null && _c !== void 0 ? _c : '') && !isFutureDate(content.expiryDate) && (React.createElement(Label, { isCompact: true, className: "pf-v6-u-mr-xs pf-v6-u-mt-sm", color: "red" },
|
|
328
328
|
React.createElement(Trans, null, "Outdated Content")))))),
|
|
329
|
-
(!isPreview || content.mode === ContentMode.ADD || content.mode === ContentMode.NEW_SECTION_CONTENT) && (React.createElement(Card, { variant: "secondary" },
|
|
329
|
+
(!isPreview || content.mode === ContentMode.ADD || content.mode === ContentMode.NEW_SECTION_CONTENT) && (React.createElement(Card, { variant: "secondary", className: "pf-v6-u-mb-md" },
|
|
330
330
|
React.createElement(CardBody, null,
|
|
331
331
|
React.createElement("form", { noValidate: true, onSubmit: onSubmit, ref: ref },
|
|
332
332
|
content.mode === ContentMode.NEW_SECTION_CONTENT && (React.createElement(AddNewCategoryDropDown, { onCategoryChange: onAddedNewCategoryChange })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredContentContextProvider.d.ts","sourceRoot":"","sources":["../../../src/context/ExpiredContentContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EACH,0BAA0B,EAE1B,oBAAoB,EAEvB,MAAM,mCAAmC,CAAC;AAG3C,eAAO,MAAM,0BAA0B,qCAAmE,CAAC;AAC3G,eAAO,MAAM,6BAA6B,2CAA8C,CAAC;AAEzF,wBAAgB,6BAA6B,CAAC,EAAE,QAAQ,EAAE;;CAAA,
|
|
1
|
+
{"version":3,"file":"ExpiredContentContextProvider.d.ts","sourceRoot":"","sources":["../../../src/context/ExpiredContentContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EACH,0BAA0B,EAE1B,oBAAoB,EAEvB,MAAM,mCAAmC,CAAC;AAG3C,eAAO,MAAM,0BAA0B,qCAAmE,CAAC;AAC3G,eAAO,MAAM,6BAA6B,2CAA8C,CAAC;AAEzF,wBAAgB,6BAA6B,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAQzD"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/TopContentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ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AI,EAAE,SAKpF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACnC,UAAU,6BAA6B,EACvC,aAAa,MAAM,EACnB,SAAS,MAAM,kBAsBlB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACnC,UAAU,6BAA6B,EACvC,YAAY,qBAAqB,EACjC,cAAc,MAAM,mBAavB,CAAC"}
|
|
@@ -198,7 +198,9 @@ export const fetchTopContent = (dispatch, selectedProduct, selectedVersion) => _
|
|
|
198
198
|
});
|
|
199
199
|
const resultFiltered = results.filter((c) => c.content.length > 0);
|
|
200
200
|
const topContentEditState = resultFiltered.map((cat) => {
|
|
201
|
-
const content = cat.content
|
|
201
|
+
const content = cat.content
|
|
202
|
+
.filter((contentItem) => { var _a, _b; return ((_a = contentItem.contentTitle) === null || _a === void 0 ? void 0 : _a.trim()) && ((_b = contentItem.contentUrl) === null || _b === void 0 ? void 0 : _b.trim()); })
|
|
203
|
+
.map((contentItem) => (Object.assign(Object.assign({}, contentItem), { mode: ContentMode.INITIAL })));
|
|
202
204
|
return Object.assign(Object.assign({}, cat), { catMode: CategoryMode.EXISTING_SECTION, content });
|
|
203
205
|
});
|
|
204
206
|
const isCatOnlyForMajorVersion = ((_a = topContentEditState[0]) === null || _a === void 0 ? void 0 : _a.minorVersion) ? false : true;
|
|
@@ -476,7 +478,8 @@ export const saveChangeInCategoryContent = (dispatch, topContentEditState, categ
|
|
|
476
478
|
// saves content re-arrenging
|
|
477
479
|
export const reArrangeContent = (dispatch, topContentEditState, categoryId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
478
480
|
const categoryToBeSave = topContentEditState.find((cat) => cat.id === categoryId);
|
|
479
|
-
const contentArr = categoryToBeSave.content;
|
|
481
|
+
const contentArr = categoryToBeSave.content.filter((item) => !isEmpty(item.contentTitle) && !isEmpty(item.contentUrl));
|
|
482
|
+
categoryToBeSave.content = contentArr;
|
|
480
483
|
const toUpdate = contentArr.map((item) => ({
|
|
481
484
|
id: item.topContentId,
|
|
482
485
|
contentRank: item.contentRank,
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
|
|
69
69
|
& > * {
|
|
70
70
|
display: flex;
|
|
71
|
+
align-items: center;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
.toolbar-left {
|
|
@@ -178,7 +179,17 @@
|
|
|
178
179
|
border-radius: 8px;
|
|
179
180
|
border-top-right-radius: 0px;
|
|
180
181
|
border-top-left-radius: 0px;
|
|
181
|
-
|
|
182
|
+
|
|
183
|
+
.pf-v6-c-table__th {
|
|
184
|
+
font-size: 14px;
|
|
185
|
+
padding-top: var(--pf-t--global--spacer--md);
|
|
186
|
+
padding-bottom: var(--pf-t--global--spacer--md);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.pf-v6-c-table__sort .pf-v6-c-table__button {
|
|
190
|
+
font-size: inherit;
|
|
191
|
+
padding-block-start: 0;
|
|
192
|
+
}
|
|
182
193
|
|
|
183
194
|
tbody:first-of-type {
|
|
184
195
|
border-top: none;
|
|
@@ -501,10 +512,6 @@ div.grid-main.manage {
|
|
|
501
512
|
}
|
|
502
513
|
|
|
503
514
|
#manage-top-content {
|
|
504
|
-
.single-select-toggle-text {
|
|
505
|
-
margin-left: 1rem;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
515
|
.toolbar-right {
|
|
509
516
|
margin-left: 1.5rem;
|
|
510
517
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.192",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
"@patternfly/patternfly": "6.2.1",
|
|
76
76
|
"@patternfly/react-core": "6.2.1",
|
|
77
77
|
"@patternfly/react-table": "6.2.1",
|
|
78
|
-
"@rh-support/components": "2.5.
|
|
79
|
-
"@rh-support/configs": "2.0.
|
|
80
|
-
"@rh-support/react-context": "2.5.
|
|
81
|
-
"@rh-support/types": "2.0.
|
|
82
|
-
"@rh-support/user-permissions": "2.5.
|
|
83
|
-
"@rh-support/utils": "2.5.
|
|
78
|
+
"@rh-support/components": "2.5.164",
|
|
79
|
+
"@rh-support/configs": "2.0.57",
|
|
80
|
+
"@rh-support/react-context": "2.5.254",
|
|
81
|
+
"@rh-support/types": "2.0.26",
|
|
82
|
+
"@rh-support/user-permissions": "2.5.111",
|
|
83
|
+
"@rh-support/utils": "2.5.92",
|
|
84
84
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
85
85
|
"i18next": "^23.15.0",
|
|
86
86
|
"lodash": ">=4.17.15",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"defaults and supports es6-module",
|
|
100
100
|
"maintained node versions"
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "034e69ade7e0381f4a5c7089fb7af4e35e3edeae"
|
|
103
103
|
}
|