@rh-support/components 2.5.2 → 2.5.4

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.
Files changed (60) hide show
  1. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts +12 -7
  2. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
  3. package/lib/esm/Functional/CaseContactsSelectorExternal.js +67 -60
  4. package/lib/esm/OwnerTypeaheadDropdown/OwnerTypeaheadDropdown.d.ts +3 -1
  5. package/lib/esm/OwnerTypeaheadDropdown/OwnerTypeaheadDropdown.d.ts.map +1 -1
  6. package/lib/esm/OwnerTypeaheadDropdown/OwnerTypeaheadDropdown.js +53 -6
  7. package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts +27 -0
  8. package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts.map +1 -0
  9. package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.js +26 -0
  10. package/lib/esm/SingleSelectDropdown/index.d.ts +2 -0
  11. package/lib/esm/SingleSelectDropdown/index.d.ts.map +1 -0
  12. package/lib/esm/SingleSelectDropdown/index.js +1 -0
  13. package/lib/esm/TypeaheadDropdown/TypeaheadDropdown.d.ts +13 -1
  14. package/lib/esm/TypeaheadDropdown/TypeaheadDropdown.d.ts.map +1 -1
  15. package/lib/esm/TypeaheadDropdown/TypeaheadDropdown.js +99 -24
  16. package/lib/esm/hooks/index.d.ts +1 -0
  17. package/lib/esm/hooks/index.d.ts.map +1 -1
  18. package/lib/esm/hooks/index.js +1 -0
  19. package/lib/esm/hooks/usePatternFlySingleSelectToggle.d.ts +16 -0
  20. package/lib/esm/hooks/usePatternFlySingleSelectToggle.d.ts.map +1 -0
  21. package/lib/esm/hooks/usePatternFlySingleSelectToggle.js +17 -0
  22. package/lib/esm/index.d.ts +1 -1
  23. package/lib/esm/index.d.ts.map +1 -1
  24. package/lib/esm/index.js +1 -1
  25. package/package.json +8 -10
  26. package/lib/esm/DropDownList/AsyncDropDownList.d.ts +0 -6
  27. package/lib/esm/DropDownList/AsyncDropDownList.d.ts.map +0 -1
  28. package/lib/esm/DropDownList/AsyncDropDownList.js +0 -6
  29. package/lib/esm/DropDownList/DropDownList.d.ts +0 -9
  30. package/lib/esm/DropDownList/DropDownList.d.ts.map +0 -1
  31. package/lib/esm/DropDownList/DropDownList.js +0 -116
  32. package/lib/esm/DropDownList/DropdownWrapper.d.ts +0 -16
  33. package/lib/esm/DropDownList/DropdownWrapper.d.ts.map +0 -1
  34. package/lib/esm/DropDownList/DropdownWrapper.js +0 -19
  35. package/lib/esm/DropDownList/MultiSelectDropdownList.d.ts +0 -4
  36. package/lib/esm/DropDownList/MultiSelectDropdownList.d.ts.map +0 -1
  37. package/lib/esm/DropDownList/MultiSelectDropdownList.js +0 -4
  38. package/lib/esm/DropDownList/Readme.md +0 -114
  39. package/lib/esm/DropDownList/SearchableList.d.ts +0 -14
  40. package/lib/esm/DropDownList/SearchableList.d.ts.map +0 -1
  41. package/lib/esm/DropDownList/SearchableList.js +0 -98
  42. package/lib/esm/DropDownList/SelectList.d.ts +0 -11
  43. package/lib/esm/DropDownList/SelectList.d.ts.map +0 -1
  44. package/lib/esm/DropDownList/SelectList.js +0 -35
  45. package/lib/esm/DropDownList/async.d.ts +0 -9
  46. package/lib/esm/DropDownList/async.d.ts.map +0 -1
  47. package/lib/esm/DropDownList/async.js +0 -111
  48. package/lib/esm/DropDownList/dropdownList.css +0 -59
  49. package/lib/esm/DropDownList/dropdownUtils.d.ts +0 -5
  50. package/lib/esm/DropDownList/dropdownUtils.d.ts.map +0 -1
  51. package/lib/esm/DropDownList/dropdownUtils.js +0 -23
  52. package/lib/esm/DropDownList/index.d.ts +0 -4
  53. package/lib/esm/DropDownList/index.d.ts.map +0 -1
  54. package/lib/esm/DropDownList/index.js +0 -3
  55. package/lib/esm/DropDownList/types.d.ts +0 -53
  56. package/lib/esm/DropDownList/types.d.ts.map +0 -1
  57. package/lib/esm/DropDownList/types.js +0 -1
  58. package/lib/esm/DropDownList/withMulti.d.ts +0 -5
  59. package/lib/esm/DropDownList/withMulti.d.ts.map +0 -1
  60. package/lib/esm/DropDownList/withMulti.js +0 -46
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC"}
@@ -15,4 +15,5 @@ export * from './useSelectKeyboardNavigator';
15
15
  export * from './useLocalStorage';
16
16
  export * from './useSessionStorage';
17
17
  export * from './useSearchDocument';
18
+ export * from './usePatternFlySingleSelectToggle';
18
19
  export * from './useProgressiveLoading';
@@ -0,0 +1,16 @@
1
+ import { MenuToggleElement } from '@patternfly/react-core';
2
+ import React, { Ref } from 'react';
3
+ interface IProps {
4
+ selected: string;
5
+ isDisabled: boolean;
6
+ isLoading?: boolean;
7
+ placeholder?: string;
8
+ isInvalid?: boolean;
9
+ }
10
+ export declare function usePatternFlySingleSelectToggle(props: IProps): {
11
+ isOpen: boolean;
12
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
13
+ toggle: (toggleRef: Ref<MenuToggleElement>) => React.JSX.Element;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=usePatternFlySingleSelectToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePatternFlySingleSelectToggle.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePatternFlySingleSelectToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,iBAAiB,EAAW,MAAM,wBAAwB,CAAC;AAChG,OAAO,KAAK,EAAE,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AAE7C,UAAU,MAAM;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAGD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM;;;wBAO9B,GAAG,CAAC,iBAAiB,CAAC;EAsBpD"}
@@ -0,0 +1,17 @@
1
+ import { Flex, FlexItem, MenuToggle, Spinner } from '@patternfly/react-core';
2
+ import React, { useState } from 'react';
3
+ // The hook to manage the PatternFly Single Select component
4
+ export function usePatternFlySingleSelectToggle(props) {
5
+ const [isOpen, setIsOpen] = useState(false);
6
+ const onToggleClick = () => {
7
+ setIsOpen(!isOpen);
8
+ };
9
+ const toggle = (toggleRef) => (React.createElement(MenuToggle, { className: "single-select-toggle-text", ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isDisabled: props.isDisabled, isFullWidth: true, status: props.isInvalid ? 'danger' : undefined },
10
+ React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
11
+ React.createElement(FlexItem, null,
12
+ " ",
13
+ props.selected || props.placeholder),
14
+ props.isLoading && (React.createElement(FlexItem, null,
15
+ React.createElement(Spinner, { size: "md" }))))));
16
+ return { isOpen, setIsOpen, toggle };
17
+ }
@@ -1,7 +1,6 @@
1
1
  export * from './LoadingIndicator';
2
2
  export * from './AlertMessage';
3
3
  export * from './ProgressBar';
4
- export * from './DropDownList';
5
4
  export * from './ErrorBoundary';
6
5
  export * from './ErrorPages';
7
6
  export * from './LoginModal';
@@ -32,5 +31,6 @@ export * from './TextAreaResizable';
32
31
  export * from './CustomTextInput';
33
32
  export * from './PhoneInput';
34
33
  export * from './TagsSelector';
34
+ export * from './SingleSelectDropdown';
35
35
  export * from './OwnerTypeaheadDropdown';
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
package/lib/esm/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './LoadingIndicator';
2
2
  export * from './AlertMessage';
3
3
  export * from './ProgressBar';
4
- export * from './DropDownList';
5
4
  export * from './ErrorBoundary';
6
5
  export * from './ErrorPages';
7
6
  export * from './LoginModal';
@@ -32,4 +31,5 @@ export * from './TextAreaResizable';
32
31
  export * from './CustomTextInput';
33
32
  export * from './PhoneInput';
34
33
  export * from './TagsSelector';
34
+ export * from './SingleSelectDropdown';
35
35
  export * from './OwnerTypeaheadDropdown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/components",
3
- "version": "2.5.2",
3
+ "version": "2.5.4",
4
4
  "description": "Contains all reusabel components for support app",
5
5
  "author": "Vikas Rathee <vrathee@redhat.com>",
6
6
  "license": "ISC",
@@ -46,11 +46,10 @@
46
46
  "peerDependencies": {
47
47
  "@cee-eng/hydrajs": "4.18.0",
48
48
  "@cee-eng/ui-toolkit": "1.1.8",
49
- "@patternfly/patternfly": "5.4.0",
50
- "@patternfly/react-core": "5.4.0",
51
- "@patternfly/react-table": "5.4.0",
49
+ "@patternfly/patternfly": "5.4.2",
50
+ "@patternfly/react-core": "5.4.2",
51
+ "@patternfly/react-table": "5.4.2",
52
52
  "dompurify": "^2.2.6",
53
- "downshift": "^6.0.5",
54
53
  "js-worker-search": "^1.4.1",
55
54
  "lazysizes": "^5.3.2",
56
55
  "lodash": "^4.17.21",
@@ -64,16 +63,15 @@
64
63
  "dependencies": {
65
64
  "@cee-eng/hydrajs": "4.18.0",
66
65
  "@cee-eng/ui-toolkit": "1.1.8",
67
- "@patternfly/patternfly": "5.4.0",
68
- "@patternfly/react-core": "5.4.0",
66
+ "@patternfly/patternfly": "5.4.2",
67
+ "@patternfly/react-core": "5.4.2",
69
68
  "@patternfly/react-icons": "5.1.1",
70
- "@patternfly/react-table": "5.1.1",
69
+ "@patternfly/react-table": "5.4.2",
71
70
  "@patternfly/react-tokens": "^5.4.0",
72
71
  "@rh-support/types": "2.0.5",
73
72
  "@rh-support/user-permissions": "2.5.1",
74
73
  "@rh-support/utils": "2.5.1",
75
74
  "dompurify": "^2.2.6",
76
- "downshift": "^6.0.5",
77
75
  "js-worker-search": "^1.4.1",
78
76
  "lazysizes": "^5.3.2",
79
77
  "lodash": "^4.17.21",
@@ -111,5 +109,5 @@
111
109
  "defaults and supports es6-module",
112
110
  "maintained node versions"
113
111
  ],
114
- "gitHead": "c4edba0ff68de868d7de31a8afcca922b218476a"
112
+ "gitHead": "b7de3083da67036047ec7b0384d9d015bdf24286"
115
113
  }
@@ -1,6 +0,0 @@
1
- import { MultiSelectDropdownProps } from './MultiSelectDropdownList';
2
- import { AsyncDropdownProps, IAsyncOnlyProps, IDropdownListProps } from './types';
3
- declare const AsyncDropDownList: <T extends {}>(props: IAsyncOnlyProps<T> & IDropdownListProps<T>) => JSX.Element;
4
- declare const AsyncMultiDropDownList: <T extends {}>(props: IAsyncOnlyProps<T> & MultiSelectDropdownProps<T>) => JSX.Element;
5
- export { AsyncDropDownList, AsyncMultiDropDownList, AsyncDropdownProps };
6
- //# sourceMappingURL=AsyncDropDownList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AsyncDropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/AsyncDropDownList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElF,QAAA,MAAM,iBAAiB,EAA0B,CAAC,CAAY,SAAF,EAAE,EAC1D,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,KAChD,GAAG,CAAC,OAAO,CAAC;AAEjB,QAAA,MAAM,sBAAsB,EAAyC,CAAC,CAAY,SAAF,EAAE,EAC9E,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,KACtD,GAAG,CAAC,OAAO,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,6 +0,0 @@
1
- import { withAsync } from './async';
2
- import { Dropdown } from './DropDownList';
3
- import { MultiSelectDropDownList } from './MultiSelectDropdownList';
4
- const AsyncDropDownList = withAsync(Dropdown);
5
- const AsyncMultiDropDownList = withAsync(MultiSelectDropDownList);
6
- export { AsyncDropDownList, AsyncMultiDropDownList };
@@ -1,9 +0,0 @@
1
- import './dropdownList.css';
2
- import React from 'react';
3
- import { IDropdownListProps } from './types';
4
- declare function Dropdown<T>(props: IDropdownListProps<T>): React.JSX.Element;
5
- declare namespace Dropdown {
6
- var defaultProps: Partial<IDropdownListProps<any>>;
7
- }
8
- export { Dropdown };
9
- //# sourceMappingURL=DropDownList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropDownList.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAO5B,OAAO,KAAuC,MAAM,OAAO,CAAC;AAM5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAuB7C,iBAAS,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,qBAoJhD;kBApJQ,QAAQ;;;AAsJjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,116 +0,0 @@
1
- import './dropdownList.css';
2
- import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
3
- import isEmpty from 'lodash/isEmpty';
4
- import map from 'lodash/map';
5
- import React, { useEffect, useMemo, useState } from 'react';
6
- import { Trans } from 'react-i18next';
7
- import { itemToString, noop } from './dropdownUtils';
8
- import SearchableList from './SearchableList';
9
- import SelectList from './SelectList';
10
- const defaultProps = {
11
- className: '',
12
- id: '',
13
- searchable: false,
14
- isInValid: false,
15
- isLoadingList: false,
16
- disabled: false,
17
- required: false,
18
- placeholder: '',
19
- name: '',
20
- 'data-tracking-id': '',
21
- filterListOnMenuOpen: false,
22
- maxResults: 100,
23
- paginate: false,
24
- paginationBtnText: 'Display additional results',
25
- isAsyncSearch: false,
26
- multiSelect: false,
27
- hasTwoColumns: false,
28
- hideToggleButton: false,
29
- };
30
- function Dropdown(props) {
31
- var _a, _b, _c;
32
- const [resultsShown, setResultsShown] = useState(props.maxResults);
33
- const [itemsList, setItemsList] = useState(props.list);
34
- const onChangeLocal = ({ selectedItem, }) => {
35
- selectedItem && props.onChange && props.onChange(selectedItem);
36
- };
37
- useEffect(() => {
38
- setItemsList(props.list);
39
- }, [props.list]);
40
- const onPaginatonButtonClick = (e, downshift) => {
41
- e.stopPropagation();
42
- const finalCount = resultsShown + props.maxResults;
43
- setResultsShown(finalCount);
44
- props.onPaginate && props.onPaginate(finalCount, downshift.inputValue, e);
45
- };
46
- const isSelectedItemLocal = (item) => {
47
- return !item.isNotSelectable && itemToString(props.selectedItem) === itemToString(item);
48
- };
49
- const isSelectedItem = props.isSelectedItem || isSelectedItemLocal;
50
- const getListItemClassNames = (downshift, item, itemIndex) => {
51
- let toReturn = 'downshift-item pf-v5-c-select__menu-item';
52
- toReturn += item.additionalInfo ? ' pf-m-description' : '';
53
- toReturn += isSelectedItem(item) ? ' pf-m-selected' : '';
54
- toReturn += item.disabled ? ' pf-m-disabled' : '';
55
- toReturn += itemIndex === downshift.highlightedIndex ? ' highlighted' : '';
56
- toReturn += item.className ? item.className : '';
57
- return toReturn;
58
- };
59
- const onInputChangeLocal = (items, inputValue) => {
60
- setResultsShown(props.maxResults);
61
- setItemsList(items);
62
- props.onInputChange && props.onInputChange(inputValue);
63
- };
64
- const renderListItems = (downshift) => {
65
- const listToRender = [];
66
- if (!downshift.isOpen)
67
- return [];
68
- let optionsToRender = itemsList;
69
- const shouldPaginate = props.paginate && resultsShown < optionsToRender.length;
70
- optionsToRender = props.paginate ? optionsToRender.slice(0, resultsShown) : optionsToRender;
71
- optionsToRender.filter((item) => !item.isNotSearchable).length === 0 &&
72
- props.emptyListLabel &&
73
- listToRender.push(React.createElement("li", { key: "empty-label", className: "pf-v5-u-p-sm" },
74
- React.createElement(Trans, null, props.emptyListLabel)));
75
- listToRender.push(...map(optionsToRender, (item, index) => {
76
- const itemProps = item.isNonActionable
77
- ? {}
78
- : downshift.getItemProps({
79
- item,
80
- index,
81
- disabled: item.disabled,
82
- className: getListItemClassNames(downshift, item, index),
83
- });
84
- return (React.createElement("li", { className: item.actionItem ? 'pf-v5-c-select__menu-wrapper' : '', role: "presentation", key: `${index}-${props.id}-${itemToString(item)}` },
85
- item.isNonActionable ? (isEmpty(item.children) ? itemToString(item) : item.children) : null,
86
- props.multiSelect && !item.isNotSelectable && !item.isNonActionable && (React.createElement("div", Object.assign({}, itemProps),
87
- React.createElement("div", { className: item.additionalInfo ? 'pf-v5-c-select__menu-item-main' : '' },
88
- React.createElement("input", { disabled: item.disabled === true, className: "pf-v5-c-check__input pf-v5-u-mr-sm", checked: isSelectedItem(item), onChange: noop, type: "checkbox" }),
89
- isEmpty(item.children) ? itemToString(item) : item.children),
90
- item.additionalInfo && (React.createElement("div", { className: "pf-v5-c-select__menu-item-description" }, item.additionalInfo)))),
91
- !props.multiSelect && !item.isNonActionable && (React.createElement("button", Object.assign({}, itemProps, { type: "button", title: itemToString(item) }),
92
- React.createElement("div", { className: item.additionalInfo ? 'pf-v5-c-select__menu-item-main' : '' },
93
- isEmpty(item.children) ? itemToString(item) : item.children,
94
- isSelectedItem(item) && (React.createElement("span", { className: "pf-v5-c-select__menu-item-icon" },
95
- React.createElement(CheckIcon, { "aria-hidden": true })))),
96
- item.additionalInfo && (React.createElement("div", { className: "pf-v5-c-select__menu-item-description" }, item.additionalInfo)))),
97
- item.actionItem ? React.cloneElement(item.actionItem, { disabled: item.disabled }) : null));
98
- }));
99
- shouldPaginate &&
100
- listToRender.push(...[
101
- React.createElement("li", { key: "separator", className: "dropdown-divider", role: "separator" }),
102
- React.createElement("li", { key: "pagination-item", className: "downshift-pagination-item" },
103
- React.createElement("button", { type: "button", onClick: (e) => onPaginatonButtonClick(e, downshift), className: "pf-v5-c-button pf-m-link pf-m-block", disabled: props.isLoadingList },
104
- React.createElement(Trans, null, props.paginationBtnText))),
105
- ]);
106
- return listToRender;
107
- };
108
- // eslint-disable-next-line react-hooks/exhaustive-deps
109
- const selectedItem = useMemo(() => props.selectedItem, [(_c = (_b = (_a = props.selectedItem) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : props.selectedItem) !== null && _c !== void 0 ? _c : '']);
110
- const newProps = Object.assign(Object.assign({}, props), { selectedItem, onChange: onChangeLocal, itemToString,
111
- renderListItems,
112
- itemsList });
113
- return props.searchable ? (React.createElement(SearchableList, Object.assign({}, newProps, { onInputChange: onInputChangeLocal }))) : (React.createElement(SelectList, Object.assign({}, newProps)));
114
- }
115
- Dropdown.defaultProps = defaultProps;
116
- export { Dropdown };
@@ -1,16 +0,0 @@
1
- import { IDClassNameProps } from '@rh-support/types/shared';
2
- import { GetPropsCommonOptions, UseComboboxGetLabelPropsOptions, UseComboboxGetMenuPropsOptions, UseSelectGetLabelPropsOptions, UseSelectGetMenuPropsOptions } from 'downshift';
3
- import React from 'react';
4
- interface IProps extends IDClassNameProps {
5
- isOpen: boolean;
6
- getMenuProps: (options?: UseComboboxGetMenuPropsOptions | UseSelectGetMenuPropsOptions, otherOptions?: GetPropsCommonOptions) => any;
7
- getLabelProps: (options?: UseComboboxGetLabelPropsOptions | UseSelectGetLabelPropsOptions) => any;
8
- toggleMenuComponent: React.ReactNode;
9
- label: string | React.ReactNode;
10
- children: JSX.Element | JSX.Element[] | React.ReactNode;
11
- 'data-tracking-id': string;
12
- hasTwoColumns: boolean;
13
- }
14
- export default function DropdownWrapper(props: IProps): React.JSX.Element;
15
- export {};
16
- //# sourceMappingURL=DropdownWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownWrapper.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EACH,qBAAqB,EACrB,+BAA+B,EAC/B,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,MAAO,SAAQ,gBAAgB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CACV,OAAO,CAAC,EAAE,8BAA8B,GAAG,4BAA4B,EACvE,YAAY,CAAC,EAAE,qBAAqB,KACnC,GAAG,CAAC;IACT,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,+BAA+B,GAAG,6BAA6B,KAAK,GAAG,CAAC;IAClG,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;IACxD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBA6BpD"}
@@ -1,19 +0,0 @@
1
- import { isiOS } from '@rh-support/utils';
2
- import React from 'react';
3
- export default function DropdownWrapper(props) {
4
- const onBlur = (event) => {
5
- // on ios devices the onBlur event is called before the onClick event, so selecting an item in droponw
6
- // closes the dropdown without selecting the item
7
- // this is just a hack to prevent the downshift onBlur method from being called which closes the dropdown
8
- if (isiOS()) {
9
- event.nativeEvent.preventDownshiftDefault = true;
10
- }
11
- };
12
- return (React.createElement("div", { id: `${props.id}`, className: `downshift ${props.className} pf-v5-c-select ${props.isOpen ? 'pf-m-expanded' : ''} `, "data-tracking-id": props['data-tracking-id'] ? props['data-tracking-id'] : null },
13
- props.label && React.createElement("label", Object.assign({}, props.getLabelProps()), props.label),
14
- props.toggleMenuComponent,
15
- React.createElement("ul", Object.assign({}, props.getMenuProps({
16
- onBlur: onBlur,
17
- className: `downshift-menu pf-v5-c-select__menu ${props.hasTwoColumns ? 'column-selector-menu' : ''} ${props.isOpen ? 'open' : ''}`,
18
- })), props.children)));
19
- }
@@ -1,4 +0,0 @@
1
- import { MultiSelectDropdownProps } from './types';
2
- declare const MultiSelectDropDownList: <T extends {}>(props: MultiSelectDropdownProps<T>) => JSX.Element;
3
- export { MultiSelectDropDownList, MultiSelectDropdownProps };
4
- //# sourceMappingURL=MultiSelectDropdownList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MultiSelectDropdownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/MultiSelectDropdownList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD,QAAA,MAAM,uBAAuB,EAA0B,CAAC,CAAY,SAAF,EAAE,EAChE,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,KACjC,GAAG,CAAC,OAAO,CAAC;AAEjB,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Dropdown } from './DropDownList';
2
- import { withMulti } from './withMulti';
3
- const MultiSelectDropDownList = withMulti(Dropdown);
4
- export { MultiSelectDropDownList };
@@ -1,114 +0,0 @@
1
- # Dropdown list
2
-
3
- ## Async Dropdown
4
-
5
- It is an HOC wrapper around the original dropdown component.If you use async dropdown then the dropdown list will be searchable by default. You don't need to pass the searchable prop explicitly.
6
-
7
- ### How to use async dropdownlist
8
-
9
- Below is the an example of how you can use async dropdown list. Please also go through the comments as they explain a lot about the inner functionalities of the dropdown
10
-
11
- ```js
12
- import React, { useState, useMemo } from 'react'
13
- import { AsyncDropDownList } from '@rh-support/components';
14
- import { toOptions, toOption } from '@rh-support/utils';
15
-
16
-
17
- // it's better to keep the server pagination in sync with the dropdown pagination
18
- // so that you always know that if user will click on pagination button
19
- // we need to fetch data from the server just by increasing the page size.
20
- // otherwise we will need some complex logic in handle pagination function
21
- const PER_PAGE = 50;
22
- const SEARCH_URI = 'https://api.github.com/search/users';
23
-
24
-
25
- function makeAndHandleRequest(query, page = 1) {
26
- return fetch(`${SEARCH_URI}?q=${query}+in:login&page=${page}&per_page=${PER_PAGE}`)
27
- .then(resp => resp.json())
28
- .then(({ items, total_count }) => {
29
- /* eslint-disable-line camelcase */
30
- const options = items.map(i => ({
31
- avatar_url: i.avatar_url,
32
- id: i.id,
33
- login: i.login,
34
- }));
35
- return { options, total_count };
36
- });
37
- }
38
-
39
- export function Test() {
40
- const [items, setItems] = useState<any>([]);
41
- const [isFetching, setIsFetching] = useState(false);
42
- const [selectedItem, setSelectedItem] = useState({ login: 'karan' });
43
- const fetchUsers = async (inputVal) => {
44
- try {
45
- setIsFetching(true);
46
- const userResponse = await makeAndHandleRequest(inputVal);
47
- setItems(userResponse)
48
- } catch (e) {
49
- // silently fails
50
- }
51
- finally {
52
- setIsFetching(false);
53
- }
54
- };
55
-
56
- const onDropdownChange = (item) => {
57
- setSelectedItem(item.label);
58
- }
59
-
60
- const onPaginate = (shownResults, inputVal, e) => {
61
- console.log(inputVal);
62
- // fetch more results here
63
- };
64
-
65
- const onOuterClick = () => {
66
- // optional if you don't want to show the last results if user focuses out of dropdown
67
- setItems({ options: [] });
68
- }
69
-
70
- const onDropdownClear = () => {
71
- setSelectedItem({ login: '' });
72
- }
73
-
74
- // this is the most important part to memoize the selected item. If you don't then every time
75
- // new results are fetched the dropdown will render and toOption always create a new object
76
- // forcing dropdown to render and overriding the input value
77
- const memoizedSelectedItem = useMemo(() => toOption(selectedItem, { labelKey: 'login' }), [selectedItem]);
78
-
79
- return (
80
- <AsyncDropDownList<any>
81
- placeholder={'Select a Cluster'}
82
- id="case-details-cluster-nickname-selector"
83
- selectedItem={memoizedSelectedItem}
84
- list={items ? toOptions(items.options, {
85
- labelKey: 'login',
86
- childrenKey: 'children'
87
- }) : []}
88
- title={`Select a Cluster`}
89
- onOuterClick={onOuterClick}
90
- onChange={onDropdownChange}
91
- onSearch={fetchUsers}
92
- delay={300}
93
- useCache={true}
94
- isLoadingList={isFetching}
95
- paginate={true}
96
- onPaginate={onPaginate}
97
- maxResults={PER_PAGE - 1}
98
- emptyListLabel={'No results found'}
99
- onClearSelection={onDropdownClear}
100
- />
101
- )
102
- }
103
-
104
- ```
105
-
106
- **Props specific to async dropdown**
107
-
108
- | Name | Type | Default | Description |
109
- | ---------- | -------------------- | ------------------- | ----------------------------------------------------------------------- |
110
- | delay | <code>number</code> | 200 | Delay, in milliseconds, before performing search. |
111
- | minlength | <code>number</code> | 2 | Number of input characters that must be entered before showing results. |
112
- | promptText | <code>string</code> | 'Type to search...' | Message displayed in the menu when there is no user input. |
113
- | searchText | <code>string</code> | 'Searching...' | Message displayed in the menu while the request is pending. |
114
- | useCache | <code>boolean</code> | false | Whether or not the component should cache query results. |
@@ -1,14 +0,0 @@
1
- import { IOption } from '@rh-support/types/shared';
2
- import { UseComboboxReturnValue, UseComboboxStateChange } from 'downshift';
3
- import React from 'react';
4
- import { IDropdownListProps } from './types';
5
- interface IProps<T> extends Omit<IDropdownListProps<T>, 'onChange' | 'onInputChange'> {
6
- renderListItems: (downshift: UseComboboxReturnValue<IOption<T>>) => React.ReactNode[];
7
- onChange: (changes: UseComboboxStateChange<IOption<T>>) => void;
8
- itemsList: IOption<T>[];
9
- onInputChange?: (items: IOption<T>[], inputValue: string) => void;
10
- isPDFExporting?: boolean;
11
- }
12
- export default function SearchableList<T>(props: IProps<T>): React.JSX.Element;
13
- export {};
14
- //# sourceMappingURL=SearchableList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchableList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/SearchableList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEH,sBAAsB,EAEtB,sBAAsB,EAEzB,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,UAAU,MAAM,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,CAAC;IACjF,eAAe,EAAE,CAAC,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;IACtF,QAAQ,EAAE,CAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAChE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,qBAgJzD"}
@@ -1,98 +0,0 @@
1
- import CaretDownIcon from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
2
- import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
3
- import { useCombobox, } from 'downshift';
4
- import includes from 'lodash/includes';
5
- import isEmpty from 'lodash/isEmpty';
6
- import React from 'react';
7
- import { LoadingIndicator } from '../LoadingIndicator/LoadingIndicator';
8
- import { itemToString, multiSelectDropdownStateReducer, noop } from './dropdownUtils';
9
- import DropdownWrapper from './DropdownWrapper';
10
- export default function SearchableList(props) {
11
- const doesMatchInput = (inputVal) => (item) => {
12
- // Should always keep non-searchable, or item with no labels
13
- if (item.isNotSearchable || item.label === null || item.label === undefined)
14
- return true;
15
- const inputValueLC = inputVal ? inputVal.trim().toLowerCase() : '';
16
- const labelLC = itemToString(item).trim().toLowerCase();
17
- return includes(labelLC, inputValueLC);
18
- };
19
- const onIsOpenChange = (changes) => {
20
- if (!changes.isOpen && changes.type !== useCombobox.stateChangeTypes.ItemClick) {
21
- props.onOuterClick && props.onOuterClick(props.selectedItem);
22
- }
23
- };
24
- const comboboxStateReducer = (state, actionAndChanges) => {
25
- const { changes, type } = actionAndChanges;
26
- switch (type) {
27
- case useCombobox.stateChangeTypes.InputBlur:
28
- return Object.assign(Object.assign({}, changes), { inputValue: itemToString(props.selectedItem) && downshift.inputValue !== itemToString(props.selectedItem)
29
- ? itemToString(props.selectedItem)
30
- : state.inputValue });
31
- case useCombobox.stateChangeTypes.InputKeyDownEnter:
32
- return Object.assign(Object.assign({}, changes), { inputValue: state.inputValue });
33
- default:
34
- return changes;
35
- }
36
- };
37
- const downshift = useCombobox({
38
- selectedItem: props.selectedItem,
39
- items: props.itemsList,
40
- onSelectedItemChange: props.onChange,
41
- labelId: `${props.id}-label`,
42
- itemToString,
43
- onIsOpenChange,
44
- onInputValueChange: ({ inputValue, isOpen }) => {
45
- const newList = props.searchable && (props.filterListOnMenuOpen || isOpen) && !props.isAsyncSearch
46
- ? props.list.filter(doesMatchInput(inputValue))
47
- : props.list;
48
- // for async search we want to make sure that we don't call input change unless the user changes
49
- // the input manually as it will trigger an api call.
50
- (!props.isAsyncSearch || (props.isAsyncSearch && isOpen)) && props.onInputChange(newList, inputValue);
51
- },
52
- stateReducer: props.multiSelect ? multiSelectDropdownStateReducer : comboboxStateReducer,
53
- });
54
- const { getInputProps, getToggleButtonProps, getMenuProps, getLabelProps, openMenu, isOpen } = downshift;
55
- const clearSelection = () => (event) => {
56
- props.onClearSelection && props.onClearSelection();
57
- // in case of multi select we force input to get cleared on clear button click
58
- downshift.selectItem(null);
59
- !isOpen && openMenu();
60
- };
61
- const onInputClick = () => (e) => {
62
- if (!isOpen) {
63
- openMenu();
64
- props.onMenuToggle && props.onMenuToggle();
65
- }
66
- };
67
- const onInputBlur = () => (e) => {
68
- props.onInputBlur && props.onInputBlur(e);
69
- };
70
- const renderSearchableToggleButton = () => {
71
- return (React.createElement("div", Object.assign({}, downshift.getComboboxProps({ className: 'pf-v5-c-select__toggle pf-m-typeahead' })),
72
- React.createElement("div", { className: "pf-v5-c-select__toggle-wrapper" },
73
- props.chipGroupComponent,
74
- React.createElement("input", Object.assign({}, getInputProps({
75
- placeholder: props.placeholder,
76
- className: `pf-v5-c-form-control pf-v5-c-select__toggle-typeahead`,
77
- id: `${props.id}-downshift-search`,
78
- 'aria-invalid': props.isInValid,
79
- 'aria-required': props.required,
80
- required: props.required,
81
- disabled: props.disabled,
82
- onClick: onInputClick(),
83
- onBlur: onInputBlur(),
84
- })))),
85
- React.createElement(LoadingIndicator, { isInline: true, show: props.isLoadingList }),
86
- !isEmpty(downshift.inputValue) &&
87
- !props.isLoadingList &&
88
- (!props.isExportingPDF ? (React.createElement("button", { className: "pf-v5-c-button pf-m-plain pf-v5-c-select__toggle-clear", onClick: clearSelection(), "aria-label": "clear selection", type: "button", title: "Clear selection", disabled: props.disabled, "data-tracking-id": `${props['data-tracking-id']}-clear` },
89
- React.createElement(TimesCircleIcon, null))) : null),
90
- !props.hideToggleButton && (React.createElement("button", Object.assign({ type: "button", "aria-label": "Menu toggle" }, getToggleButtonProps({
91
- disabled: props.disabled || props.isLoadingList,
92
- className: 'pf-v5-c-button pf-v5-c-select__toggle-button pf-m-plain',
93
- onClick: props.onMenuToggle ? () => props.onMenuToggle() : noop,
94
- })),
95
- React.createElement(CaretDownIcon, null)))));
96
- };
97
- return (React.createElement(DropdownWrapper, { id: props.id, className: props.className, isOpen: isOpen, getMenuProps: getMenuProps, getLabelProps: getLabelProps, label: props.label, toggleMenuComponent: renderSearchableToggleButton(), "data-tracking-id": props['data-tracking-id'], hasTwoColumns: props.hasTwoColumns }, isOpen && props.renderListItems(downshift)));
98
- }
@@ -1,11 +0,0 @@
1
- import { IOption } from '@rh-support/types/shared';
2
- import { UseSelectReturnValue, UseSelectStateChange } from 'downshift';
3
- import React from 'react';
4
- import { IDropdownListProps } from './types';
5
- interface IProps<T> extends Omit<IDropdownListProps<T>, 'onChange'> {
6
- renderListItems: (downshift: UseSelectReturnValue<IOption<T>>) => React.ReactNode[];
7
- onChange: (changes: UseSelectStateChange<IOption<T>>) => void;
8
- }
9
- export default function SelectList<T>(props: IProps<T>): React.JSX.Element;
10
- export {};
11
- //# sourceMappingURL=SelectList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/SelectList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAa,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,UAAU,MAAM,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;IAC/D,eAAe,EAAE,CAAC,SAAS,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;IACpF,QAAQ,EAAE,CAAC,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,qBAkErD"}