@rh-support/manage 2.6.1 → 2.32.2-prodBackup
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/components/Configs/ConfigsTable.d.ts.map +1 -1
- package/lib/esm/components/Configs/ConfigsTable.js +6 -4
- package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.d.ts.map +1 -1
- package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.js +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.js +54 -23
- package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.js +19 -14
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +5 -5
- package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.js +15 -12
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.js +106 -67
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js +14 -21
- package/lib/esm/components/ManageExpiredContents/ExpiredContentCategory.js +4 -4
- package/lib/esm/components/ManageExpiredContents/ExpiredContentHeader.js +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.js +12 -12
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItem.js +3 -3
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.js +37 -35
- package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.js +8 -5
- package/lib/esm/components/ManagePartnerships/PartnershipsList.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsList.js +8 -9
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.js +17 -20
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.js +21 -25
- package/lib/esm/components/ManagePartnerships/Requests.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/Requests.js +9 -9
- package/lib/esm/components/ManagePartnerships/index.js +1 -1
- package/lib/esm/components/ManagePreferences/PreferencesHeader.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/PreferencesHeader.js +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.js +26 -27
- package/lib/esm/components/ManagePreferences/sections/PreferencesACL.js +5 -5
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +4 -5
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.js +3 -4
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +7 -8
- package/lib/esm/components/ManageTable/ManageTable.d.ts +3 -4
- package/lib/esm/components/ManageTable/ManageTable.d.ts.map +1 -1
- package/lib/esm/components/ManageTable/ManageTable.js +12 -18
- package/lib/esm/components/ManageTags/TagsManager.d.ts.map +1 -1
- package/lib/esm/components/ManageTags/TagsManager.js +58 -50
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.d.ts.map +1 -1
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.js +30 -23
- package/lib/esm/components/NotificationEmails/index.d.ts.map +1 -1
- package/lib/esm/components/NotificationEmails/index.js +10 -7
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.js +2 -3
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimitGuidelines.js +6 -6
- package/lib/esm/components/TopContentManagement/CategoryLimit/QuestionAnswer.js +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.js +7 -9
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts +1 -0
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.js +2 -2
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.js +12 -10
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts +2 -3
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.js +16 -9
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.js +15 -16
- package/lib/esm/components/TopContentManagement/NoTopContentFound.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/NoTopContentFound.js +14 -15
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +47 -39
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.js +4 -4
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.js +3 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.js +4 -6
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +62 -53
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.js +2 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +8 -9
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.js +2 -2
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHint.js +4 -5
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.js +51 -25
- package/lib/esm/components/TopContentManagement/TopContentHeader.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +64 -32
- package/lib/esm/reducers/TagManagmentReducer.d.ts +1 -1
- package/lib/esm/reducers/TagManagmentReducer.d.ts.map +1 -1
- package/lib/esm/scss/_main.scss +158 -25
- package/lib/esm/scss/_pf-overrides.scss +61 -53
- package/lib/esm/scss/index.scss +4 -4
- package/package.json +12 -12
|
@@ -8,9 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { accounts } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Label, LabelGroup, Tooltip } from '@patternfly/react-core';
|
|
12
|
-
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
|
|
11
|
+
import { Button, Label, LabelGroup, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, Tooltip, } from '@patternfly/react-core';
|
|
13
12
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
|
+
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
|
|
14
|
+
import { useSelectKeyboardNavigator } from '@rh-support/components';
|
|
14
15
|
import { sortAccountsByQuery } from '@rh-support/react-context';
|
|
15
16
|
import assign from 'lodash/assign';
|
|
16
17
|
import compact from 'lodash/compact';
|
|
@@ -21,15 +22,18 @@ import remove from 'lodash/remove';
|
|
|
21
22
|
import React, { useEffect, useRef, useState } from 'react';
|
|
22
23
|
import { Trans, useTranslation } from 'react-i18next';
|
|
23
24
|
export function BookmarkAccountSelector(props) {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
const textInputRef = useRef();
|
|
27
|
+
const abortControllerRef = useRef(undefined);
|
|
24
28
|
const [options, setOptions] = useState([]);
|
|
25
29
|
const [isSearching, setIsSearching] = useState(false);
|
|
26
|
-
const abortControllerRef = useRef(undefined);
|
|
27
|
-
const { t } = useTranslation();
|
|
28
30
|
const [isOpen, setIsOpen] = useState(false);
|
|
29
31
|
const [selected, setSelected] = useState([]);
|
|
30
|
-
const
|
|
32
|
+
const [inputValue, setInputValue] = useState('');
|
|
33
|
+
const [activeItem, setActiveItem] = useState(null);
|
|
31
34
|
const clearSelection = () => {
|
|
32
35
|
setIsOpen(false);
|
|
36
|
+
setInputValue('');
|
|
33
37
|
setSelected([]);
|
|
34
38
|
props.onBookMarkAccountSelected([]);
|
|
35
39
|
};
|
|
@@ -67,9 +71,9 @@ export function BookmarkAccountSelector(props) {
|
|
|
67
71
|
const response = yield accounts.getAccounts(queryParams, controller.signal);
|
|
68
72
|
const accountsResponse = response.items.map((account) => {
|
|
69
73
|
const bookmarksMatch = props.bookmarkedGroupAccounts.filter((a) => a.accountNumber === account.accountNumber);
|
|
70
|
-
const
|
|
74
|
+
const accountGroups = (bookmarksMatch || []).map((b) => b.bookmarkGroupName);
|
|
71
75
|
return bookmarksMatch.length > 0
|
|
72
|
-
? Object.assign(Object.assign({}, account), { bookmarkGroupName:
|
|
76
|
+
? Object.assign(Object.assign({}, account), { bookmarkGroupName: accountGroups, isBookmarked: true, isBookmarkedAndHasGroup: accountGroups.length > 0 }) : Object.assign(Object.assign({}, account), { bookmarkGroupName: [], isBookmarked: false, isBookmarkedAndHasGroup: false });
|
|
73
77
|
});
|
|
74
78
|
const sortedOptions = sortAccountsByQuery(accountsResponse, query, queryKey);
|
|
75
79
|
setOptions(sortedOptions);
|
|
@@ -84,24 +88,61 @@ export function BookmarkAccountSelector(props) {
|
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
});
|
|
87
|
-
const
|
|
88
|
-
|
|
91
|
+
const onSelect = (value) => {
|
|
92
|
+
if (value) {
|
|
93
|
+
const currentSelected = value;
|
|
94
|
+
const alreadySelected = find(selected, (account) => account.accountNumber === currentSelected.accountNumber);
|
|
95
|
+
if (alreadySelected)
|
|
96
|
+
return;
|
|
97
|
+
const selectedAccounts = [
|
|
98
|
+
...selected,
|
|
99
|
+
Object.assign(Object.assign({}, currentSelected), { bookmarkId: currentSelected.bookmarkId || undefined, rootBookmarkId: currentSelected.rootBookmarkId || undefined }),
|
|
100
|
+
];
|
|
101
|
+
setSelected(selectedAccounts);
|
|
102
|
+
props.onBookMarkAccountSelected(selectedAccounts);
|
|
103
|
+
setIsOpen(false);
|
|
104
|
+
setInputValue('');
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const { focusedItemIndex, onInputKeyDown, setFocusedItemIndex } = useSelectKeyboardNavigator({
|
|
108
|
+
list: options,
|
|
109
|
+
isOpen,
|
|
110
|
+
ignoreResetOnListChange: false,
|
|
111
|
+
resetIndexOnClose: true,
|
|
112
|
+
isDisabled: props.isDisabled,
|
|
113
|
+
setIsOpen,
|
|
114
|
+
onSelect: (value) => onSelect(value),
|
|
89
115
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const onSelect = (event, currentSelected) => {
|
|
94
|
-
const alreadySelected = find(selected, (account) => account.accountNumber === currentSelected.accountNumber);
|
|
95
|
-
if (alreadySelected)
|
|
96
|
-
return;
|
|
97
|
-
const selectedAccounts = [
|
|
98
|
-
...selected,
|
|
99
|
-
Object.assign(Object.assign({}, currentSelected), { bookmarkId: currentSelected.bookmarkId || undefined, rootBookmarkId: currentSelected.rootBookmarkId || undefined }),
|
|
100
|
-
];
|
|
101
|
-
setSelected(selectedAccounts);
|
|
102
|
-
props.onBookMarkAccountSelected(selectedAccounts);
|
|
103
|
-
setIsOpen(false);
|
|
116
|
+
const onToggleClick = (e) => {
|
|
117
|
+
e.stopPropagation();
|
|
118
|
+
setIsOpen(!isOpen);
|
|
104
119
|
};
|
|
120
|
+
const removeAccountLabel = (event, removedAccount) => {
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
const updatedSelectedAccounts = remove(selected, (account) => account.accountNumber !== removedAccount.accountNumber);
|
|
123
|
+
setSelected(updatedSelectedAccounts);
|
|
124
|
+
props.onBookMarkAccountSelected(updatedSelectedAccounts);
|
|
125
|
+
};
|
|
126
|
+
const debounceFn = debounce((value) => fetchAccounts(value), 500);
|
|
127
|
+
const onTextInputChange = (_event, value) => {
|
|
128
|
+
setInputValue(value);
|
|
129
|
+
debounceFn(value);
|
|
130
|
+
};
|
|
131
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { variant: "typeahead", onClick: onToggleClick, innerRef: toggleRef, isExpanded: isOpen, isFullWidth: true },
|
|
132
|
+
React.createElement(TextInputGroup, { isPlain: true },
|
|
133
|
+
React.createElement(TextInputGroupMain, Object.assign({ value: inputValue, onChange: onTextInputChange, onClick: (e) => {
|
|
134
|
+
e.stopPropagation();
|
|
135
|
+
setIsOpen(true);
|
|
136
|
+
setFocusedItemIndex(null);
|
|
137
|
+
setActiveItem(null);
|
|
138
|
+
}, onKeyDown: onInputKeyDown, id: "bookmark-account-select-input", autoComplete: "off", innerRef: textInputRef, placeholder: t('Search for account names or numbers'), role: "combobox", isExpanded: isOpen, "aria-controls": "bookmark-account-select-listbox" }, (activeItem && { 'aria-activedescendant': activeItem })),
|
|
139
|
+
React.createElement(LabelGroup, { "aria-label": "Selected accounts" }, selected.map((account, index) => (React.createElement(Label, { key: index, color: "teal", onClose: (ev) => removeAccountLabel(ev, account) },
|
|
140
|
+
account.name,
|
|
141
|
+
" (",
|
|
142
|
+
account.accountNumber,
|
|
143
|
+
")"))))),
|
|
144
|
+
selected.length > 0 && (React.createElement(TextInputGroupUtilities, null,
|
|
145
|
+
React.createElement(Button, { variant: "plain", onClick: clearSelection, "aria-label": "Clear input value", icon: React.createElement(TimesCircleIcon, { "aria-hidden": true }) }))))));
|
|
105
146
|
const duplicateAccounts = (props.selectedGroup &&
|
|
106
147
|
props.addMode &&
|
|
107
148
|
props.bookmarkedGroupAccounts
|
|
@@ -110,57 +151,55 @@ export function BookmarkAccountSelector(props) {
|
|
|
110
151
|
})
|
|
111
152
|
.map((a) => a.accountNumber)) ||
|
|
112
153
|
[];
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
154
|
+
const renderAccountOption = (account, index) => (React.createElement(SelectOption, { value: account, key: index, isFocused: focusedItemIndex !== null && focusedItemIndex === index, id: `bookmark-account-${account.accountNumber}` },
|
|
155
|
+
React.createElement("div", null,
|
|
156
|
+
React.createElement("div", { className: "pf-v6-u-color-100 pf-v6-u-font-size-sm" },
|
|
157
|
+
account.name,
|
|
158
|
+
" (",
|
|
159
|
+
account.accountNumber,
|
|
160
|
+
")"),
|
|
161
|
+
React.createElement("div", null, account.bookmarkGroupName.length === 0 ? (React.createElement("span", { className: "pf-v6-u-color-400" },
|
|
162
|
+
React.createElement(Trans, null, "This account has not been bookmarked."))) : account.bookmarkGroupName.length > 2 ? (React.createElement("div", null,
|
|
163
|
+
React.createElement(Tooltip, { isContentLeftAligned: true, content: Array.isArray(account.bookmarkGroupName) ? (account.bookmarkGroupName.map((group) => React.createElement("div", { key: group }, group))) : (React.createElement("div", null, account.bookmarkGroupName)) },
|
|
164
|
+
React.createElement(Label, { color: "purple", icon: React.createElement(InfoCircleIcon, null), key: `${account.accountNumber}${account.bookmarkGroupName}` },
|
|
165
|
+
"Bookmarked ",
|
|
166
|
+
account.bookmarkGroupName.length,
|
|
167
|
+
" times")))) : Array.isArray(account.bookmarkGroupName) ? (account.bookmarkGroupName.map((group) => !isEmpty(group) && (React.createElement(Label, { color: "purple", key: `${account.accountNumber}-${group}` }, group)))) : (!isEmpty(account.bookmarkGroupName) && (React.createElement(Label, { color: "purple", key: `${account.accountNumber}-${account.bookmarkGroupName}` }, account.bookmarkGroupName)))))));
|
|
126
168
|
useEffect(() => {
|
|
127
169
|
setSelected(props.defaultSelected || []);
|
|
128
170
|
}, [props.defaultSelected]);
|
|
129
|
-
// when a group is added or removed from account we need to update dropdown
|
|
130
|
-
// options to show correct group
|
|
131
171
|
useEffect(() => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
newOptions
|
|
140
|
-
|
|
141
|
-
Object.assign(Object.assign({}, option), { bookmarkGroupName: compact(updatedGroupNames), isBookmarked: true, isBookmarkedAndHasGroup: !!updatedGroupNames.length }),
|
|
142
|
-
];
|
|
143
|
-
});
|
|
144
|
-
setOptions(newOptions);
|
|
172
|
+
if (options.length > 0) {
|
|
173
|
+
const newOptions = options.map((option) => {
|
|
174
|
+
const updatedGroupNames = compact(props.bookmarkedGroupAccounts
|
|
175
|
+
.filter((b) => b.accountNumber === option.accountNumber)
|
|
176
|
+
.map((b) => b.bookmarkGroupName));
|
|
177
|
+
return Object.assign(Object.assign({}, option), { bookmarkGroupName: compact(updatedGroupNames), isBookmarked: true, isBookmarkedAndHasGroup: !!updatedGroupNames.length });
|
|
178
|
+
});
|
|
179
|
+
setOptions(newOptions);
|
|
180
|
+
}
|
|
145
181
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
146
182
|
}, [props.bookmarkedGroupAccounts]);
|
|
147
|
-
|
|
183
|
+
// Update activeItem when focusedItemIndex changes
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
var _a;
|
|
186
|
+
if (focusedItemIndex !== null && options[focusedItemIndex]) {
|
|
187
|
+
setActiveItem(`bookmark-account-${(_a = options[focusedItemIndex]) === null || _a === void 0 ? void 0 : _a.accountNumber}`);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
setActiveItem(null);
|
|
191
|
+
}
|
|
192
|
+
}, [focusedItemIndex, options]);
|
|
193
|
+
props.clearRef.current = clearSelection;
|
|
148
194
|
return (React.createElement(React.Fragment, null,
|
|
149
|
-
React.createElement(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
React.createElement("div", null, account.bookmarkGroupName.length === 0 ? (React.createElement("span", { className: "pf-v5-u-color-400" },
|
|
158
|
-
React.createElement(Trans, null, "This account has not been bookmarked."))) : account.bookmarkGroupName.length > 2 ? (React.createElement("div", null,
|
|
159
|
-
React.createElement(Tooltip, { isContentLeftAligned: true, content: account.bookmarkGroupName.map((group) => (React.createElement("div", null, group))) },
|
|
160
|
-
React.createElement(Label, { color: "purple", icon: React.createElement(InfoCircleIcon, null), key: `${account.accountNumber}${account.bookmarkGroupName}` },
|
|
161
|
-
"Bookmarked ",
|
|
162
|
-
account.bookmarkGroupName.length,
|
|
163
|
-
" times")))) : (account.bookmarkGroupName.map((group) => !isEmpty(group) && (React.createElement(Label, { color: "purple", key: `${account.accountNumber}-${group}` }, group)))))))))),
|
|
195
|
+
React.createElement(Select, { id: "bookmark-account-select", isOpen: isOpen, selected: selected, onSelect: (_, value) => onSelect(value), toggle: toggle, onOpenChange: (nextOpen) => {
|
|
196
|
+
setIsOpen(nextOpen);
|
|
197
|
+
if (!nextOpen) {
|
|
198
|
+
setInputValue('');
|
|
199
|
+
}
|
|
200
|
+
}, isScrollable: true },
|
|
201
|
+
React.createElement(SelectList, { id: "bookmark-account-select-listbox" }, isSearching ? (React.createElement(SelectOption, { isLoading: true, value: "loader", className: "pf-v6-u-text-align-center" },
|
|
202
|
+
React.createElement(Spinner, { size: "lg" }))) : options.length > 0 ? (options.map((account, index) => renderAccountOption(account, index))) : (React.createElement(SelectOption, { value: '', key: 'no-value' }, "No results found")))),
|
|
164
203
|
props.isInValid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
165
204
|
React.createElement(Trans, null, "Select one or more accounts to bookmark"))),
|
|
166
205
|
duplicateAccounts.length !== 0 && (React.createElement("p", { className: "form-instructions" },
|
package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageGroupedBookmarkedAccountsTab.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.tsx"],"names":[],"mappings":"AAwCA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAOhD,UAAU,MAAM;IACZ,yBAAyB,EAAE,OAAO,CAAC;CACtC;AAED,wBAAgB,kCAAkC,CAAC,EAAE,yBAAyB,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ManageGroupedBookmarkedAccountsTab.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.tsx"],"names":[],"mappings":"AAwCA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAOhD,UAAU,MAAM;IACZ,yBAAyB,EAAE,OAAO,CAAC;CACtC;AAED,wBAAgB,kCAAkC,CAAC,EAAE,yBAAyB,EAAE,EAAE,MAAM,qBAoZvF"}
|
package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js
CHANGED
|
@@ -152,11 +152,9 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
|
|
|
152
152
|
catchOnCancel: true,
|
|
153
153
|
confirmText: t('Yes, I am sure'),
|
|
154
154
|
confirmButtonVariant: ButtonVariant.danger,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
React.createElement("p", null,
|
|
159
|
-
React.createElement(Trans, null, "You are choosing to remove this account from the selected bookmark.")))),
|
|
155
|
+
title: t('Are you sure?'),
|
|
156
|
+
description: (React.createElement("p", null,
|
|
157
|
+
React.createElement(Trans, null, "You are choosing to remove this account from the selected bookmark."))),
|
|
160
158
|
});
|
|
161
159
|
yield apiCalls.removeAccountApiCalls(account);
|
|
162
160
|
removeGroupedBookmarks(dispatchGlobalContext, bookmarkedGroupAccounts.data, [account.bookmarkId]);
|
|
@@ -178,13 +176,11 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
|
|
|
178
176
|
try {
|
|
179
177
|
yield confirmation({
|
|
180
178
|
catchOnCancel: true,
|
|
181
|
-
confirmButtonVariant: ButtonVariant.danger,
|
|
182
179
|
confirmText: t('Yes, I am sure'),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
React.createElement(
|
|
187
|
-
React.createElement(Trans, null, "Removing this bookmark will permanently delete it from your records.")))),
|
|
180
|
+
confirmButtonVariant: ButtonVariant.danger,
|
|
181
|
+
title: t('Are you sure?'),
|
|
182
|
+
description: (React.createElement("p", null,
|
|
183
|
+
React.createElement(Trans, null, "Removing this bookmark will permanently delete it from your records."))),
|
|
188
184
|
});
|
|
189
185
|
const rootBookmarIds = uniq(allGroups[group].map((account) => account.rootBookmarkId));
|
|
190
186
|
const promiseArry = rootBookmarIds.map((id) => __awaiter(this, void 0, void 0, function* () { return yield apiCalls.removeGroupAccount(id); }));
|
|
@@ -221,7 +217,7 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
|
|
|
221
217
|
title: t('Accounts'),
|
|
222
218
|
sortable: false,
|
|
223
219
|
cellWidth: 70,
|
|
224
|
-
cell: (group) => (React.createElement(LabelGroup, null, allGroups[group].map((account) => (React.createElement(Label, { color: "
|
|
220
|
+
cell: (group) => (React.createElement(LabelGroup, null, allGroups[group].map((account) => (React.createElement(Label, { color: "teal", onClose: removeBookmarkedAccount(account), key: account.bookmarkId + account.bookmarkGroupName },
|
|
225
221
|
account.name,
|
|
226
222
|
"(",
|
|
227
223
|
account.accountNumber,
|
|
@@ -234,11 +230,9 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
|
|
|
234
230
|
cellWidth: 10,
|
|
235
231
|
cell: (group) => (React.createElement(ActionList, { isIconList: true },
|
|
236
232
|
React.createElement(ActionListItem, null,
|
|
237
|
-
React.createElement(Button, { "aria-label": "edit", variant: "plain", onClick: () => onOpenEditGroupOpenModal(group) },
|
|
238
|
-
React.createElement(PencilAltIcon, null))),
|
|
233
|
+
React.createElement(Button, { icon: React.createElement(PencilAltIcon, null), "aria-label": "edit", variant: "plain", onClick: () => onOpenEditGroupOpenModal(group) })),
|
|
239
234
|
React.createElement(ActionListItem, null,
|
|
240
|
-
React.createElement(Button, { "aria-label": "delete", variant: "plain", onClick: () => removeGroup(group) },
|
|
241
|
-
React.createElement(TrashIcon, null))))),
|
|
235
|
+
React.createElement(Button, { icon: React.createElement(TrashIcon, null), "aria-label": "delete", variant: "plain", onClick: () => removeGroup(group) })))),
|
|
242
236
|
},
|
|
243
237
|
];
|
|
244
238
|
const isValid = () => {
|
|
@@ -258,22 +252,21 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
|
|
|
258
252
|
React.createElement("a", { href: "https://source.redhat.com/communitiesatredhat/applications/integration-community-of-practice/misplaced/lostnfound/bookmarking", target: "_blank", rel: "noopener noreferrer" },
|
|
259
253
|
' ',
|
|
260
254
|
"bookmarks in the customer support tool"))), closeBtnAriaLabel: "Close" },
|
|
261
|
-
React.createElement(Button, {
|
|
262
|
-
|
|
263
|
-
React.createElement(InfoCircleIcon, null))))))),
|
|
255
|
+
React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
|
|
256
|
+
React.createElement(InfoCircleIcon, null)), variant: "plain", className: "manage-bookmark-info-icon-button", "aria-label": "Cluster Id Info" }))))),
|
|
264
257
|
React.createElement("div", { className: "toolbar" },
|
|
265
258
|
React.createElement("form", { onSubmit: (event) => event.preventDefault(), className: "toolbar-left" },
|
|
266
259
|
React.createElement("label", { htmlFor: "bookmark-account-selector" },
|
|
267
260
|
React.createElement(Trans, null, "Search accounts")),
|
|
268
261
|
React.createElement("span", { className: "bookmark-account" },
|
|
269
262
|
React.createElement(BookmarkAccountSelector, { clearRef: clearRef, labelId: "bookmark-account-selector", isDisabled: !loggedInUserRights.data.isInternal() || !canBookmarkAccounts, bookmarkedGroupAccounts: bookmarkedGroupAccounts.data, onBookMarkAccountSelected: onBookMarkAccountSelected, addMode: true, isInValid: false })),
|
|
270
|
-
React.createElement("span", { className: "pf-
|
|
263
|
+
React.createElement("span", { className: "pf-v6-u-ml-sm" },
|
|
271
264
|
React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: onOpenAddBookmarkModal, "data-tracking-id": "bookmark-add-button", isDisabled: isValid() || apiCalls.isAddingBookmark },
|
|
272
265
|
React.createElement(Trans, null, "Add bookmark")))),
|
|
273
266
|
React.createElement("div", { className: "toolbar-right" },
|
|
274
267
|
React.createElement("label", { htmlFor: "search-bookmark-account-selector" },
|
|
275
268
|
React.createElement(Trans, null, "Filter by")),
|
|
276
|
-
React.createElement(SearchInput, { className: "pf-
|
|
269
|
+
React.createElement(SearchInput, { className: "pf-v6-u-flex-grow-1 pf-v6-c-search-input pf-v6-u-background-color-100", value: searchString, id: "search-bookmark-account-selector", placeholder: t('Search for a bookmark'), "aria-label": t('Filter by searching for a bookmark'), onChange: (_, val) => setSearchString(val), onClear: () => setSearchString('') }))),
|
|
277
270
|
React.createElement(AddEditBookmarkModal, { selectedAccounts: isInAddMode ? localSelectedAccounts : editGroupSelectedAccounts, groups: groups, isOpen: isUpdateBookmarkModalOpen, onSave: onAddEditBookmarksSave, onClose: closeAddEditBookmarkModal, onRemove: removeGroup, bookmarkedGroupAccounts: bookmarkedGroupAccounts.data, addMode: isInAddMode, title: isInAddMode ? t('Add a bookmark') : t('Edit bookmark') }),
|
|
278
271
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading bookmarked accounts list') } },
|
|
279
272
|
React.createElement(ManageTable, { ariaLabel: t('Table to manage bookmarks'), columns: columns, data: groupNames, sortInfo: { column: 'bookmark-group-name', direction: 'asc' }, errorVariant: AlertVariant.warning, isFetching: bookmarkedGroupAccounts.isFetching ||
|
|
@@ -23,9 +23,9 @@ export default function ExpiredContentCategory({ category, isCategoryExpanded =
|
|
|
23
23
|
? category.content.filter((item) => !hasDateExpired(item.expiryDate))
|
|
24
24
|
: category.content;
|
|
25
25
|
const sortedExpiredContents = orderBy(expiredContents, ['expiryDate'], ['desc']);
|
|
26
|
-
return !isEmpty(sortedExpiredContents) ? (React.createElement(AccordionItem,
|
|
27
|
-
React.createElement(AccordionToggle, { id: category.categoryName, onClick: toggleExpanded
|
|
26
|
+
return !isEmpty(sortedExpiredContents) ? (React.createElement(AccordionItem, { isExpanded: isExpanded },
|
|
27
|
+
React.createElement(AccordionToggle, { id: category.categoryName, onClick: toggleExpanded },
|
|
28
28
|
React.createElement("h3", null, category.categoryName)),
|
|
29
|
-
React.createElement(AccordionContent,
|
|
30
|
-
React.createElement("ul", { className: "list-flat
|
|
29
|
+
React.createElement(AccordionContent, null,
|
|
30
|
+
React.createElement("ul", { className: "list-flat" }, sortedExpiredContents.map((content, i) => (React.createElement(ExpiredContentSingleItem, { key: content.topContentId, content: content, category: category }))))))) : (React.createElement(React.Fragment, null));
|
|
31
31
|
}
|
|
@@ -4,6 +4,6 @@ export default function ExpiredContentHeader() {
|
|
|
4
4
|
return (React.createElement("header", null,
|
|
5
5
|
React.createElement("h2", null,
|
|
6
6
|
React.createElement(Trans, null, "Expired Content")),
|
|
7
|
-
React.createElement("p", { className: "pf-
|
|
7
|
+
React.createElement("p", { className: "pf-v6-u-mt-md pf-v6-u-mb-sm" },
|
|
8
8
|
React.createElement(Trans, null))));
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredContentManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentManager.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpiredContentManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentManager.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBAsH5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accordion, Bullseye, EmptyState, EmptyStateBody,
|
|
1
|
+
import { Accordion, Bullseye, EmptyState, EmptyStateBody, EmptyStateVariant, Spinner, Switch, } from '@patternfly/react-core';
|
|
2
2
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
3
3
|
import { TagsSelector, TopContentSearch } from '@rh-support/components';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -52,17 +52,17 @@ export default function ExipredContentManager() {
|
|
|
52
52
|
return (React.createElement(React.Fragment, null,
|
|
53
53
|
React.createElement(ExpiredContentHeader, null),
|
|
54
54
|
React.createElement("div", { className: "toolbar" },
|
|
55
|
-
React.createElement(
|
|
56
|
-
|
|
57
|
-
React.createElement("
|
|
58
|
-
|
|
59
|
-
React.createElement(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
React.createElement("div", { className: "toolbar-content" },
|
|
56
|
+
React.createElement(TopContentSearch, { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-flex-fill pf-v6-u-align-items-center", dataTrackingId: "expired-content-filter-manage", topContentData: expiredContentEditState, onSearch: onSearch, topContentResultsWrapperRef: expiredContentResultsRef, isDisabled: expiredContentResponse.isFetching, searchQuery: searchQuery, setSearchQuery: setSearchQuery }),
|
|
57
|
+
React.createElement(Switch, { id: "content-approaching-expiry", className: "pf-v6-u-mt-sm", label: t('Show approaching expiry'), isChecked: showApprochingExpiry, onChange: handleChange })),
|
|
58
|
+
React.createElement("div", { className: "toolbar-content" },
|
|
59
|
+
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center pf-v6-u-justify-content-flex-end" },
|
|
60
|
+
React.createElement("label", { htmlFor: 'tag-selector' },
|
|
61
|
+
React.createElement(Trans, null, "All tags")),
|
|
62
|
+
React.createElement(TagsSelector, { typeahead: true, tagOptions: availableTags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: expiredContentResponse.isFetching })))),
|
|
63
|
+
React.createElement("div", { className: "expired-content-manage-wrapper pf-v6-u-p-md", ref: expiredContentResultsRef }, expiredContentResponse.isFetching ? (React.createElement(Bullseye, null,
|
|
63
64
|
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
64
|
-
React.createElement(Spinner, { size: "lg" })))) : isEmpty(filteredEC) ? (React.createElement(EmptyState, { variant: EmptyStateVariant.
|
|
65
|
-
React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "No contents found"), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }) }),
|
|
65
|
+
React.createElement(Spinner, { size: "lg" })))) : isEmpty(filteredEC) ? (React.createElement(EmptyState, { icon: SearchIcon, titleText: React.createElement(Trans, null, "No contents found"), variant: EmptyStateVariant.full },
|
|
66
66
|
React.createElement(EmptyStateBody, null,
|
|
67
|
-
React.createElement(Trans, null, "There are no contents to display")))) : (React.createElement(Accordion,
|
|
67
|
+
React.createElement(Trans, null, "There are no contents to display")))) : (React.createElement(Accordion, { togglePosition: "start" }, filteredEC.map((category, i) => (React.createElement(ExpiredContentCategory, { key: category.id, category: category, isCategoryExpanded: !isEmpty(searchQuery) || !isEmpty(filteredTags) }))))))));
|
|
68
68
|
}
|
|
@@ -63,16 +63,16 @@ export default function ExpiredContentSingleItem({ content, category }) {
|
|
|
63
63
|
expired: formatDate(content.expiryDate),
|
|
64
64
|
});
|
|
65
65
|
return (React.createElement(React.Fragment, null, isPreview ? (React.createElement("li", { className: `push-bottom-narrow` },
|
|
66
|
-
React.createElement("a", { className:
|
|
66
|
+
React.createElement("a", { className: "pcm-manage-top-content pf-v6-u-mr-sm", "data-tracking-id": "pcm-manage-top-content", href: content.contentUrl, target: "_blank", rel: "noopener noreferrer" }, content.contentTitle),
|
|
67
67
|
React.createElement(Button, { variant: "link", isInline: true, icon: React.createElement(EditAltIcon, null), onClick: editToggle, title: 'Edit', "data-tracking-id": "edit-expired-top-content" }),
|
|
68
68
|
React.createElement("div", null,
|
|
69
69
|
lastModifiedBy,
|
|
70
70
|
" | ",
|
|
71
|
-
React.createElement("span", { className: "pf-
|
|
71
|
+
React.createElement("span", { className: "pf-v6-u-danger-color-200" }, expiredText),
|
|
72
72
|
" |",
|
|
73
73
|
' ',
|
|
74
74
|
content.product,
|
|
75
75
|
" ", (_a = content.majorVersion) !== null && _a !== void 0 ? _a : '',
|
|
76
76
|
content.minorVersion ? `.${content.minorVersion}` : ''),
|
|
77
|
-
React.createElement("div", null, (_b = content.tags) === null || _b === void 0 ? void 0 : _b.map((tag) => (React.createElement(Label, { isCompact: true, className: "pf-
|
|
77
|
+
React.createElement("div", null, (_b = content.tags) === null || _b === void 0 ? void 0 : _b.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)))))) : (React.createElement(ExpiredContentSingleItemView, { category: category, content: content, onCancel: editToggle, onSave: onSave, onDelete: onDelete, isDeleting: isDeleting, isSaving: isSaving }))));
|
|
78
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredContentSingleItemView.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentSingleItemView.tsx"],"names":[],"mappings":"
|
|
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,qBAgOR"}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Button, DatePicker, Flex, FlexItem, FormGroup, TextInput, ValidatedOptions } from '@patternfly/react-core';
|
|
10
|
+
import { Button, Card, CardBody, DatePicker, Flex, FlexItem, FormGroup, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
11
|
import { TagsSelector, ToastNotification } from '@rh-support/components';
|
|
12
12
|
import { getDrupalResIdIfTypeFromUrl, getText, isValidDate, isValidUrl } from '@rh-support/utils';
|
|
13
13
|
import { isEqual } from 'lodash';
|
|
@@ -24,6 +24,7 @@ export default function ExpiredContentSingleItemView({ category, content, onCanc
|
|
|
24
24
|
const tagManagementEditState = useContext(TagManagementStateContext);
|
|
25
25
|
const { tags: tagOptions } = tagManagementEditState;
|
|
26
26
|
const ref = useRef(null);
|
|
27
|
+
const datePickerMenuAppendRef = useRef(null);
|
|
27
28
|
const [isFetchingSolrSearch, setIsFetchingSolrSearch] = useState(false);
|
|
28
29
|
const [localContentUrl, setLocalContentUrl] = useState(content.contentUrl);
|
|
29
30
|
const [localContentTitle, setLocalContentTitle] = useState(content.contentTitle);
|
|
@@ -110,38 +111,39 @@ export default function ExpiredContentSingleItemView({ category, content, onCanc
|
|
|
110
111
|
localContentTitle === content.contentTitle &&
|
|
111
112
|
isEqual(localTagsIds, oldTagsIds) &&
|
|
112
113
|
isEqual(localExpiryDate.split('T')[0], ((_b = content.expiryDate) === null || _b === void 0 ? void 0 : _b.split('T')[0]) || ''));
|
|
113
|
-
return (React.createElement(
|
|
114
|
-
React.createElement(
|
|
115
|
-
React.createElement("
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
React.createElement(
|
|
133
|
-
React.createElement(
|
|
134
|
-
React.createElement(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
114
|
+
return (React.createElement(Card, { variant: "secondary", className: "pf-v6-u-mb-md" },
|
|
115
|
+
React.createElement(CardBody, null,
|
|
116
|
+
React.createElement("form", { noValidate: true, onSubmit: onSubmit, className: "push-bottom", ref: ref },
|
|
117
|
+
React.createElement("div", { className: "form-group" },
|
|
118
|
+
React.createElement("label", { htmlFor: localContentTitle },
|
|
119
|
+
"Heading",
|
|
120
|
+
' ',
|
|
121
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
122
|
+
React.createElement(TextInput, { isRequired: true, type: "text", maxLength: 254, required: true, value: localContentTitle, isDisabled: isFetchingSolrSearch, "aria-label": t('Copy and paste the heading for consistency'), placeholder: t('Copy and paste the heading for consistency'), onChange: (e, v) => {
|
|
123
|
+
onContentTitleChange(v, e);
|
|
124
|
+
}, validated: contentTitleIsValid ? ValidatedOptions.default : ValidatedOptions.error })),
|
|
125
|
+
React.createElement("div", { className: "form-group" },
|
|
126
|
+
React.createElement("label", { htmlFor: localContentUrl },
|
|
127
|
+
"Link to content",
|
|
128
|
+
' ',
|
|
129
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
130
|
+
React.createElement(TextInput, { type: "url", maxLength: 254, isRequired: true, pattern: "^(http(s)?:\\/\\/)+[\\w\\-\\._~:\\/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", value: getTopContentUrl(localContentUrl), "aria-label": t('Entering a solution or article link first will automatically generate the heading for you'), placeholder: t('Entering a solution or article link first will automatically generate the heading for you'), onChange: (evt, val) => {
|
|
131
|
+
onContentUrlChange(val, evt);
|
|
132
|
+
}, validated: contentUrlIsValid ? ValidatedOptions.default : ValidatedOptions.error })),
|
|
133
|
+
React.createElement(Flex, { className: "pf-v6-u-my-lg" },
|
|
134
|
+
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
135
|
+
React.createElement(FormGroup, { label: t('Tags') },
|
|
136
|
+
React.createElement(TagsSelector, { tagOptions: tagOptions, onChange: handleLocalTagChange, selectedTags: localSelectedTags, placeholder: t('Select tags to improve discoverability'), id: "expired-content-tag" }))),
|
|
137
|
+
React.createElement(FlexItem, null,
|
|
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: { position: 'top' } })))),
|
|
140
|
+
React.createElement("span", { className: "top-content-single-item-footer" },
|
|
141
|
+
React.createElement("span", null,
|
|
142
|
+
React.createElement(Button, { variant: "primary", onClick: onContentSave, isDisabled: isSaveButtonDisabled || isSaving, isLoading: isSaving },
|
|
143
|
+
React.createElement(Trans, null, "Save")),
|
|
144
|
+
' ',
|
|
145
|
+
React.createElement(Button, { variant: "tertiary", onClick: onCancel, "data-tracking-id": "cancel-button-top-content" },
|
|
146
|
+
React.createElement(Trans, null, "Cancel"))),
|
|
147
|
+
React.createElement("span", { className: "content-actions" },
|
|
148
|
+
React.createElement(Button, { variant: "danger", "aria-label": t('Delete content'), onClick: onDelete, isDisabled: isDeleting }, "Delete")))))));
|
|
147
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCustomerInfoModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/NonOrgCustomerInfoModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NonOrgCustomerInfoModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/NonOrgCustomerInfoModal.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,uBAAuB,yBA2BnC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, ButtonVariant, Modal, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
export const NonOrgCustomerInfoModal = () => {
|
|
@@ -7,9 +7,12 @@ export const NonOrgCustomerInfoModal = () => {
|
|
|
7
7
|
const handleModalToggle = () => {
|
|
8
8
|
setIsModalOpen(!isModalOpen);
|
|
9
9
|
};
|
|
10
|
-
return (React.createElement(Modal, { variant: ModalVariant.small,
|
|
10
|
+
return (React.createElement(Modal, { variant: ModalVariant.small, isOpen: isModalOpen, onClose: handleModalToggle },
|
|
11
|
+
React.createElement(ModalHeader, null,
|
|
12
|
+
React.createElement("h2", null, t('Confirm partnership collaboration'))),
|
|
13
|
+
React.createElement(ModalBody, null,
|
|
14
|
+
React.createElement(Trans, null, "Only org admin customers can confirm partnership collaboration.")),
|
|
15
|
+
React.createElement(ModalFooter, null,
|
|
11
16
|
React.createElement(Button, { key: "cancel", variant: ButtonVariant.primary, onClick: handleModalToggle, "data-tracking-id": "confirm-partnership-collaboration-no-org-admin" },
|
|
12
|
-
React.createElement(Trans, null, "Cancel"))
|
|
13
|
-
] },
|
|
14
|
-
React.createElement(Trans, null, "Only org admin customers can confirm partnership collaboration.")));
|
|
17
|
+
React.createElement(Trans, null, "Cancel")))));
|
|
15
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartnershipsList.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsList.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"PartnershipsList.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsList.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,wBAAgB,gBAAgB,sBAqO/B"}
|