@rh-support/manage 1.0.41 → 1.0.43
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/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +29 -10
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.js +18 -7
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +31 -30
- package/lib/esm/scss/_main.scss +8 -0
- package/lib/esm/scss/_pf4-overrides.scss +4 -0
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNewCategoryDropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"AddNewCategoryDropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAShG,UAAU,MAAM;IACZ,gBAAgB,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACxD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eA4EnD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2
|
+
import { ToastNotification } from '@rh-support/components';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { Trans, useTranslation } from 'react-i18next';
|
|
5
5
|
import { useTopContentContext, useTopContentDispatchContext } from '../../../../context/TopContentProvider';
|
|
6
6
|
import { fetchCategories } from '../../../../reducers/TopContentReducer';
|
|
@@ -10,11 +10,29 @@ export function AddNewCategoryDropDown(props) {
|
|
|
10
10
|
const topContentDispatch = useTopContentDispatchContext();
|
|
11
11
|
const allAddedCategories = topContentEditState.map((cat) => cat.categoryName);
|
|
12
12
|
const availableCategories = categories.data.filter((category) => !(allAddedCategories || []).includes(category.categoryName));
|
|
13
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
14
|
+
const [selected, setSelected] = useState();
|
|
15
|
+
const getCategoryOptions = (options) => {
|
|
16
|
+
return options.map((category, id) => (React.createElement(SelectOption, { key: id, value: category }, category.categoryName)));
|
|
17
|
+
};
|
|
18
|
+
const onFilter = (_, value) => {
|
|
19
|
+
if (!value)
|
|
20
|
+
return getCategoryOptions(availableCategories);
|
|
21
|
+
const input = new RegExp(value, 'i');
|
|
22
|
+
const newOptions = availableCategories.filter((c) => input.test(c.categoryName));
|
|
23
|
+
return getCategoryOptions(newOptions);
|
|
24
|
+
};
|
|
25
|
+
const onToggle = (isExpanded) => {
|
|
26
|
+
setIsOpen(isExpanded);
|
|
27
|
+
};
|
|
28
|
+
const onSelect = (event, selection, isPlaceholder) => {
|
|
29
|
+
setSelected(selection);
|
|
30
|
+
props.onCategoryChange(selection);
|
|
31
|
+
onToggle(false);
|
|
32
|
+
};
|
|
13
33
|
const onClearCategory = () => {
|
|
14
34
|
props.onCategoryChange(undefined);
|
|
15
|
-
|
|
16
|
-
const onCategoryChange = (selectedItem) => {
|
|
17
|
-
props.onCategoryChange(selectedItem.value);
|
|
35
|
+
setSelected(undefined);
|
|
18
36
|
};
|
|
19
37
|
useEffect(() => {
|
|
20
38
|
try {
|
|
@@ -25,8 +43,9 @@ export function AddNewCategoryDropDown(props) {
|
|
|
25
43
|
}
|
|
26
44
|
}, [topContentDispatch, t]);
|
|
27
45
|
return (React.createElement("div", { className: "form-group add-new-category" },
|
|
28
|
-
React.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
React.createElement("label", { htmlFor: "new-category" },
|
|
47
|
+
React.createElement(Trans, null, "Category"),
|
|
48
|
+
' ',
|
|
49
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
50
|
+
React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle: onToggle, isOpen: isOpen, onClear: onClearCategory, onSelect: onSelect, onFilter: onFilter, selections: selected === null || selected === void 0 ? void 0 : selected.categoryName, placeholderText: t('Select an option or enter a new category') }, (categories.isFetching && { loadingVariant: 'spinner' }), { id: "new-category", "data-tracking-id": "new-category" }), getCategoryOptions(availableCategories))));
|
|
32
51
|
}
|
|
@@ -18,7 +18,7 @@ export const TopContentSuggestion = () => {
|
|
|
18
18
|
}, [topContentDispatch, selectedProduct, selectedVersion]);
|
|
19
19
|
if (isEmpty(suggestion.linkedResources))
|
|
20
20
|
return React.createElement(React.Fragment, null);
|
|
21
|
-
return (React.createElement(Panel, { variant: "raised", className: "pf-u-mx-md pf-u-p-md" },
|
|
21
|
+
return (React.createElement(Panel, { variant: "raised", className: "pf-u-mx-md pf-u-p-md top-content-panel" },
|
|
22
22
|
React.createElement(PanelMain, null,
|
|
23
23
|
React.createElement(PanelMainBody, null,
|
|
24
24
|
React.createElement(ExpandableSection, { onToggle: onToggle, isExpanded: isExpanded, toggleContent: React.createElement(Title, { headingLevel: "h6", className: "accordion_title" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentSuggestionHintAccept.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContentSuggestionHintAccept.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAkBrH,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAgBhE,UAAU,MAAM;IACZ,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,mBAAmB,CAAC;CAClC;AAED,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAAC,MAAM,CAkPrD,CAAC"}
|
|
@@ -7,18 +7,21 @@ 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 {
|
|
10
|
+
import { Button, Card, CardBody, Form, FormGroup, Select, SelectOption, SelectVariant, TextInput, Tooltip, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
11
|
import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
|
|
12
12
|
import { ToastNotification } from '@rh-support/components';
|
|
13
13
|
import { getVersion, isRegularVersion, isValidUrl } from '@rh-support/utils';
|
|
14
|
-
import { isEmpty, isUndefined } from 'lodash';
|
|
14
|
+
import { isEmpty, isUndefined, trim } from 'lodash';
|
|
15
15
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
+
import { CATEGORY_LIMIT } from '../../../../constants/TopContent';
|
|
17
18
|
import { useTopContentContext, useTopContentDispatchContext } from '../../../../context/TopContentProvider';
|
|
19
|
+
import { flagContentUsage } from '../../../../reducers/TopContentHelpers';
|
|
18
20
|
import { ContentMode, deleteTopContentSuggestion, fetchCategories, saveAddedNewSectionContents, saveAddToTopContent, } from '../../../../reducers/TopContentReducer';
|
|
21
|
+
import CategoryLimit from '../../CategoryLimit/CategoryLimit';
|
|
19
22
|
export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
20
23
|
const { t } = useTranslation();
|
|
21
|
-
const { categories, topContentResponse, topContentEditState, selectedProduct, selectedVersion, isCatOnlyForMajorVersion, isAddingCategory, suggestion, } = useTopContentContext();
|
|
24
|
+
const { categories, topContentResponse, topContentEditState, selectedProduct, selectedVersion, isCatOnlyForMajorVersion, isAddingCategory, suggestion, categoryUsage, } = useTopContentContext();
|
|
22
25
|
const topContentDispatch = useTopContentDispatchContext();
|
|
23
26
|
const [isSelectOpen, setSelectOpen] = useState(false);
|
|
24
27
|
const [selected, setSelected] = useState();
|
|
@@ -27,6 +30,7 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
|
27
30
|
const [linkToContent, setLinkToContent] = useState('');
|
|
28
31
|
const [isEditClicked, setIsEditClicked] = useState(false);
|
|
29
32
|
const categoryToSave = useMemo(() => topContentEditState.find((category) => category.categoryId === (selected === null || selected === void 0 ? void 0 : selected.id)), [topContentEditState, selected]);
|
|
33
|
+
const flagContentEditState = useMemo(() => flagContentUsage(topContentEditState, categoryUsage, selectedVersion), [topContentEditState, categoryUsage, selectedVersion]);
|
|
30
34
|
const isMajorVersionOnly = isUndefined(getVersion(selectedVersion).minor);
|
|
31
35
|
const minorSelectedNoMinorContentButAvailableMajorContent = !topContentResponse.isFetching &&
|
|
32
36
|
!isEmpty(topContentResponse.data) &&
|
|
@@ -34,6 +38,8 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
|
34
38
|
isRegularVersion(selectedVersion) &&
|
|
35
39
|
isCatOnlyForMajorVersion &&
|
|
36
40
|
!isAddingCategory;
|
|
41
|
+
const isCategoryLimitReached = (minorSelectedNoMinorContentButAvailableMajorContent ? [] : flagContentEditState).length >= CATEGORY_LIMIT.MAX;
|
|
42
|
+
const isCategoryInList = flagContentEditState.some((c) => c.categoryId === (selected === null || selected === void 0 ? void 0 : selected.id));
|
|
37
43
|
const onToggle = () => {
|
|
38
44
|
setSelectOpen((previousToggleState) => !previousToggleState);
|
|
39
45
|
};
|
|
@@ -41,7 +47,11 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
|
41
47
|
setSelected(selection);
|
|
42
48
|
onToggle();
|
|
43
49
|
};
|
|
44
|
-
const isDisabled = isEmpty(linkToContent) ||
|
|
50
|
+
const isDisabled = isEmpty(linkToContent) ||
|
|
51
|
+
isEmpty(trim(resourceTitle)) ||
|
|
52
|
+
isUndefined(selected) ||
|
|
53
|
+
!isValidUrl(linkToContent) ||
|
|
54
|
+
(isCategoryLimitReached && !isCategoryInList);
|
|
45
55
|
const addContentToCategory = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
56
|
try {
|
|
47
57
|
setIsSaving(true);
|
|
@@ -105,7 +115,7 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
|
105
115
|
ToastNotification.addDangerMessage(t('There was an error loading top content categories'));
|
|
106
116
|
}
|
|
107
117
|
}, [topContentDispatch, t]);
|
|
108
|
-
return (React.createElement(Card,
|
|
118
|
+
return (React.createElement(Card, { className: "pf-u-m-sm" },
|
|
109
119
|
React.createElement(CardBody, { className: "card-hint" },
|
|
110
120
|
React.createElement(Form, null,
|
|
111
121
|
isEditClicked ? (React.createElement(React.Fragment, null,
|
|
@@ -114,7 +124,7 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
|
114
124
|
? ValidatedOptions.error
|
|
115
125
|
: ValidatedOptions.default })),
|
|
116
126
|
React.createElement(FormGroup, { label: t('Headline'), isRequired: true, fieldId: "simple-form-email-01" },
|
|
117
|
-
React.createElement(TextInput, { isRequired: true, type: "text", id: "top-content-headline-category", name: "top-content-headline-category", "data-tracking-id": "top-content-headline-category", value: resourceTitle, onChange: setResourceTitle, validated: isEmpty(resourceTitle) ? ValidatedOptions.error : ValidatedOptions.default })))) : (React.createElement("span", null,
|
|
127
|
+
React.createElement(TextInput, { isRequired: true, type: "text", id: "top-content-headline-category", name: "top-content-headline-category", "data-tracking-id": "top-content-headline-category", value: resourceTitle, onChange: setResourceTitle, validated: isEmpty(trim(resourceTitle)) ? ValidatedOptions.error : ValidatedOptions.default })))) : (React.createElement("span", null,
|
|
118
128
|
React.createElement(Button, { variant: "link", isInline: true },
|
|
119
129
|
React.createElement("u", null,
|
|
120
130
|
React.createElement("a", { className: "hint-title pf-u-font-size-md", target: "_blank", href: linkToContent, rel: "noreferrer" }, resources.resourceTitle))),
|
|
@@ -123,7 +133,8 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
|
|
|
123
133
|
React.createElement(FormGroup, { label: t('Category'), isRequired: true, fieldId: "simple-form-email-01" },
|
|
124
134
|
React.createElement(Select, Object.assign({ variant: SelectVariant.single, id: "category-selection", name: "category-selection", "data-testid": "category-selection", placeholderText: "Select a category", onToggle: onToggle, isOpen: isSelectOpen, onSelect: onSelect, selections: selected === null || selected === void 0 ? void 0 : selected.categoryName, isDisabled: categories.isError, loadingVariant: 'spinner' }, (categories.isFetching && { loadingVariant: 'spinner' })), categories.data.map((category, id) => (React.createElement(SelectOption, { key: id, value: category },
|
|
125
135
|
React.createElement("div", null, category.categoryName)))))),
|
|
126
|
-
React.createElement(
|
|
136
|
+
React.createElement("div", { className: "pf-u-mt-sm" },
|
|
137
|
+
isCategoryLimitReached && !isCategoryInList && !isUndefined(selected) && React.createElement(CategoryLimit, null),
|
|
127
138
|
React.createElement(Button, { variant: "primary", onClick: onSaveContent, isDisabled: isSaving || isDisabled, isLoading: isSaving, "data-tracking-id": "suggested-content-save-button" },
|
|
128
139
|
React.createElement(Trans, null, "Save")),
|
|
129
140
|
React.createElement(Button, { variant: "link", onClick: () => onCancel(false) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentProductVersionSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContentProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentProductVersionSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAS5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,eAAe,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC3D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;CACrB;AAQD,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,2BAG1E;AAqBD,iBAAS,gCAAgC,CAAC,KAAK,EAAE,MAAM,eAsItD;kBAtIQ,gCAAgC;;;AAyIzC,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { products as productsApi } from '@cee-eng/hydrajs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
3
|
+
import { useFetch } from '@rh-support/components';
|
|
4
|
+
import { getUniqueSortedVersions, getVersion } from '@rh-support/utils';
|
|
4
5
|
import isEmpty from 'lodash/isEmpty';
|
|
5
6
|
import React, { useEffect, useState } from 'react';
|
|
6
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -40,10 +41,9 @@ function TopContentProductVersionSelector(props) {
|
|
|
40
41
|
initialData: [],
|
|
41
42
|
});
|
|
42
43
|
const { request: getProductVersions, isFetching: isLoadingVersions, data: versions, } = useFetch(productsApi.getProductVersions, { initialData: [], postProcessor: postVersionsProcessor });
|
|
43
|
-
const [
|
|
44
|
-
const [
|
|
45
|
-
const
|
|
46
|
-
const [isVersionBlured, setIsVersionBlured] = useState(false);
|
|
44
|
+
const [isProductOpen, setIsProductOpen] = useState(false);
|
|
45
|
+
const [isVersionOpen, setIsVersionOpen] = useState(false);
|
|
46
|
+
const { selectedProduct, selectedVersion } = props;
|
|
47
47
|
const topContentDispatch = useTopContentDispatchContext();
|
|
48
48
|
/**
|
|
49
49
|
* Fetch products on load
|
|
@@ -64,48 +64,49 @@ function TopContentProductVersionSelector(props) {
|
|
|
64
64
|
}, [versions]);
|
|
65
65
|
const onProductChange = (option) => {
|
|
66
66
|
setIsAddingCategory(topContentDispatch, false);
|
|
67
|
-
props.onProductChange(option
|
|
68
|
-
|
|
69
|
-
isProductValid(option) && getProductVersions(option.value.name);
|
|
67
|
+
props.onProductChange(option);
|
|
68
|
+
getProductVersions(option.name);
|
|
70
69
|
};
|
|
71
70
|
const onVersionChange = (option) => {
|
|
72
71
|
setIsAddingCategory(topContentDispatch, false);
|
|
73
|
-
props.onVersionChange(option
|
|
74
|
-
validateVersion(option);
|
|
72
|
+
props.onVersionChange(option);
|
|
75
73
|
};
|
|
76
74
|
const onProductClear = () => {
|
|
77
|
-
onProductChange(
|
|
75
|
+
onProductChange({ name: '', id: '' });
|
|
78
76
|
};
|
|
79
|
-
const
|
|
80
|
-
|
|
77
|
+
const getProductOptions = (options) => {
|
|
78
|
+
return options.map((product, id) => (React.createElement(SelectOption, { key: id, value: product }, product.name)));
|
|
81
79
|
};
|
|
82
|
-
const
|
|
83
|
-
|
|
80
|
+
const onProductFilter = (_, value) => {
|
|
81
|
+
if (!value)
|
|
82
|
+
return getProductOptions(products);
|
|
83
|
+
const input = new RegExp(value, 'i');
|
|
84
|
+
const newOptions = products === null || products === void 0 ? void 0 : products.filter((p) => input.test(p.name));
|
|
85
|
+
return getProductOptions(newOptions);
|
|
84
86
|
};
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
+
const onProductToggle = (isExpanded) => {
|
|
88
|
+
setIsProductOpen(isExpanded);
|
|
87
89
|
};
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
+
const onProductSelect = (event, selection, isPlaceholder) => {
|
|
91
|
+
onProductChange(selection);
|
|
92
|
+
onProductToggle(false);
|
|
90
93
|
};
|
|
91
|
-
const
|
|
92
|
-
|
|
94
|
+
const onVersionToggle = (isExpanded) => {
|
|
95
|
+
setIsVersionOpen(isExpanded);
|
|
96
|
+
};
|
|
97
|
+
const onVersionSelect = (e, selection, isPlaceholder) => {
|
|
98
|
+
onVersionChange(selection);
|
|
99
|
+
onVersionToggle(false);
|
|
93
100
|
};
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
setIsProductInValid(false);
|
|
96
|
-
setIsVersionInValid(false);
|
|
97
|
-
isProductBlured && setIsProductInValid(isEmpty(props.selectedProduct.name));
|
|
98
|
-
isVersionBlured && setIsVersionInValid(isEmpty(props.selectedVersion));
|
|
99
|
-
}, [isProductBlured, isVersionBlured, props.selectedProduct.name, props.selectedVersion]);
|
|
100
101
|
return (React.createElement("div", { className: "toolbar" },
|
|
101
102
|
React.createElement("div", { className: "toolbar-left" },
|
|
102
103
|
React.createElement("label", { htmlFor: 'tc-product-dropdown-downshift-search' },
|
|
103
104
|
React.createElement(Trans, null, "Product")),
|
|
104
|
-
React.createElement(
|
|
105
|
+
React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle: onProductToggle, selections: selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.name, isOpen: isProductOpen, onSelect: onProductSelect, onClear: onProductClear, placeholderText: t('Select a product') }, (isLoadingProducts && { loadingVariant: 'spinner' }), { id: "tc-product-dropdown-selector", "data-tracking-id": "tc-product-dropdown-selector", onFilter: onProductFilter, isDisabled: isLoadingProducts }), getProductOptions(products))),
|
|
105
106
|
React.createElement("div", { className: "toolbar-right" },
|
|
106
107
|
React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
|
|
107
108
|
React.createElement(Trans, null, "Version")),
|
|
108
|
-
React.createElement(
|
|
109
|
+
React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: onVersionToggle, onSelect: onVersionSelect, selections: selectedVersion, isOpen: isVersionOpen, placeholderText: t('Select a version'), isDisabled: isEmpty(versions === null || versions === void 0 ? void 0 : versions.items) }, (isLoadingVersions && { loadingVariant: 'spinner' }), { id: "version-dropdown-selector", "data-tracking-id": "version-dropdown-selector" }), ((versions === null || versions === void 0 ? void 0 : versions.items) || []).map((version, id) => (React.createElement(SelectOption, { key: id, value: version }, version)))))));
|
|
109
110
|
}
|
|
110
111
|
TopContentProductVersionSelector.defaultProps = defaultProps;
|
|
111
112
|
export { TopContentProductVersionSelector };
|
package/lib/esm/scss/_main.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"not op_mini all"
|
|
52
52
|
],
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@cee-eng/hydrajs": "4.
|
|
54
|
+
"@cee-eng/hydrajs": "4.15.64",
|
|
55
55
|
"@patternfly/patternfly": "4.196.7",
|
|
56
56
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
57
57
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
@@ -87,19 +87,19 @@
|
|
|
87
87
|
"typescript": "4.3.5"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@cee-eng/hydrajs": "4.
|
|
90
|
+
"@cee-eng/hydrajs": "4.15.64",
|
|
91
91
|
"@patternfly/patternfly": "4.196.7",
|
|
92
92
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
93
93
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
94
94
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
95
95
|
"@patternfly/react-core": "4.264.0",
|
|
96
96
|
"@patternfly/react-table": "4.111.33",
|
|
97
|
-
"@rh-support/components": "1.2.
|
|
97
|
+
"@rh-support/components": "1.2.25",
|
|
98
98
|
"@rh-support/configs": "1.0.3",
|
|
99
|
-
"@rh-support/react-context": "1.0.
|
|
99
|
+
"@rh-support/react-context": "1.0.33",
|
|
100
100
|
"@rh-support/types": "0.2.0",
|
|
101
|
-
"@rh-support/user-permissions": "1.0.
|
|
102
|
-
"@rh-support/utils": "1.0.
|
|
101
|
+
"@rh-support/user-permissions": "1.0.14",
|
|
102
|
+
"@rh-support/utils": "1.0.12",
|
|
103
103
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
104
104
|
"i18next": ">=17.0.1",
|
|
105
105
|
"lodash": ">=4.17.15",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"react-i18next": ">=10.11.0",
|
|
110
110
|
"react-router-dom": ">=5.1.2"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "503c03f099f29076c7cbd553e53c6fe74bf2d749"
|
|
113
113
|
}
|