@rh-support/components 2.1.63 → 2.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CountryData.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/CountryData.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,eAAe,UA2C3B,CAAC;AAEF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"CountryData.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/CountryData.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,eAAe,UA2C3B,CAAC;AAEF,eAAO,MAAM,YAAY,kCAugBxB,CAAC"}
|
|
@@ -172,6 +172,7 @@ export const COUNTRY_DATA = [
|
|
|
172
172
|
['Germany', ['europe', 'eu-union', 'baltic'], 'de', '49', '.... ........'],
|
|
173
173
|
['Ghana', ['africa'], 'gh', '233'],
|
|
174
174
|
['Greece', ['europe', 'eu-union'], 'gr', '30'],
|
|
175
|
+
['Greenland', ['america', 'north-america'], 'gl', '299'],
|
|
175
176
|
['Grenada', ['america', 'carribean'], 'gd', '1473'],
|
|
176
177
|
['Guadeloupe', ['america', 'carribean'], 'gp', '590', '', 0],
|
|
177
178
|
['Guam', ['oceania'], 'gu', '1671'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsSelector.d.ts","sourceRoot":"","sources":["../../../src/TagsSelector/TagsSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"TagsSelector.d.ts","sourceRoot":"","sources":["../../../src/TagsSelector/TagsSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAmB3B,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,UAAU,MAAM;IACZ,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,YAAiB,EAAE,EAAE,MAAM,qBAsJ3G"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './tagSelector.css';
|
|
2
|
-
import { Button, Chip, ChipGroup, Flex, MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
2
|
+
import { Button, Chip, ChipGroup, Flex, FlexItem, MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
3
3
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
4
4
|
import { isEmpty } from 'lodash';
|
|
5
5
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
@@ -47,7 +47,8 @@ export function TagsSelector({ tagOptions, onChange, placeholder, id, typeahead,
|
|
|
47
47
|
var _a;
|
|
48
48
|
setSelected([]);
|
|
49
49
|
setQuery('');
|
|
50
|
-
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
50
|
+
typeahead && ((_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
51
|
+
setIsOpen(false);
|
|
51
52
|
};
|
|
52
53
|
useEffect(() => {
|
|
53
54
|
onChange && onChange(selected);
|
|
@@ -57,13 +58,16 @@ export function TagsSelector({ tagOptions, onChange, placeholder, id, typeahead,
|
|
|
57
58
|
e.stopPropagation();
|
|
58
59
|
onSelect(label);
|
|
59
60
|
} }, label.tagName)))));
|
|
60
|
-
const toggle = (toggleRef) => (React.createElement(MenuToggle, Object.assign({ ref: toggleRef, onClick: onToggleClick, className: "pf-v5-u-flex-grow-1", isExpanded: isOpen, onKeyDown: onInputKeyDown, disabled: isEmpty(tagOptions) }, (typeahead && { variant: 'typeahead' })), typeahead ? (React.createElement(TextInputGroup, { isPlain: true },
|
|
61
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, Object.assign({ ref: toggleRef, onClick: onToggleClick, className: "pf-v5-u-flex-grow-1 tags-selector-menu-toggle", isExpanded: isOpen, onKeyDown: onInputKeyDown, disabled: isEmpty(tagOptions) }, (typeahead && { variant: 'typeahead' })), typeahead ? (React.createElement(TextInputGroup, { isPlain: true },
|
|
61
62
|
React.createElement(TextInputGroupMain, { id: "tags-selector-search-input", value: query, onClick: onToggleClick, onChange: (e, v) => setQuery(v), onKeyDown: onInputKeyDown, innerRef: textInputRef, isExpanded: isOpen, placeholder: placeholder || t('Search for a tag') }, selectedChipGroup),
|
|
62
63
|
React.createElement(TextInputGroupUtilities, null, selected.length > 0 && (React.createElement(Button, { variant: "plain", onClick: handleClear, "aria-label": "clear-all-tags" },
|
|
63
|
-
React.createElement(TimesIcon, { "aria-hidden": true })))))) : (React.createElement(Flex,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
React.createElement(Trans, null, "Select a tag")))
|
|
64
|
+
React.createElement(TimesIcon, { "aria-hidden": true })))))) : (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' }, alignItems: { default: 'alignItemsCenter' } },
|
|
65
|
+
React.createElement(FlexItem, null,
|
|
66
|
+
selectedChipGroup,
|
|
67
|
+
React.createElement("span", { className: `${!isEmpty(selected) && 'pf-v5-u-ml-md'}` }, placeholder || React.createElement(Trans, null, "Select a tag"))),
|
|
68
|
+
!isEmpty(selected) && (React.createElement(FlexItem, null,
|
|
69
|
+
React.createElement(Button, { variant: "plain", onClick: handleClear, "aria-label": "clear-all-tags" },
|
|
70
|
+
React.createElement(TimesIcon, { "aria-hidden": true }))))))));
|
|
67
71
|
return (React.createElement(Select, { isOpen: isOpen, selected: selected, toggle: toggle, onSelect: (_, selection) => onSelect(selection), isScrollable: true, onOpenChange: () => setIsOpen(false), popperProps: { direction: 'down', enableFlip: false }, id: id || 'tag-selector' },
|
|
68
72
|
React.createElement(SelectList, { isAriaMultiselectable: true }, selectOptions.map((tag, index) => (React.createElement(SelectOption, { key: tag.id, value: tag, isFocused: index === focusedItemIndex, isSelected: selected.some((t) => t.id === tag.id) }, tag.tagName))))));
|
|
69
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.65",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"defaults and supports es6-module",
|
|
110
110
|
"maintained node versions"
|
|
111
111
|
],
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "099d42e24ad273e72ecd1066dc081abe1b2e09f1"
|
|
113
113
|
}
|