@rh-support/cases 2.1.27 → 2.1.29

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":"AdvanceSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/AdvanceSearch.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,0BAA0B,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eAkT1C"}
1
+ {"version":3,"file":"AdvanceSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/AdvanceSearch.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,0BAA0B,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eA4T1C"}
@@ -1,4 +1,5 @@
1
- import { Button } from '@patternfly/react-core';
1
+ import { Button, Flex, FlexItem, Icon, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
2
+ import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
2
3
  import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
4
  import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
4
5
  import isEmpty from 'lodash/isEmpty';
@@ -83,8 +84,8 @@ export function AdvanceSearch(props) {
83
84
  document.removeEventListener('mousedown', handleClickOutside);
84
85
  };
85
86
  }, [isAutoCompleteListVisible]);
86
- const onQueryStringChange = (ev) => {
87
- const query = ev.target.value;
87
+ const onQueryStringChange = (value) => {
88
+ const query = value;
88
89
  setInputString(query);
89
90
  };
90
91
  const autoCompleteSetup = (expectedArray = null, phrase = '') => {
@@ -212,11 +213,15 @@ export function AdvanceSearch(props) {
212
213
  const isQueryInValid = inputString && !isParsingSuccessful;
213
214
  return (React.createElement(React.Fragment, null,
214
215
  React.createElement("div", { className: "pf-v5-c-select pf-m-expanded", ref: dropdownWrapperRef },
215
- React.createElement("div", { className: "pf-v5-c-select__toggle pf-m-typeahead" },
216
- React.createElement("div", { className: "pf-v5-c-select__toggle-wrapper" },
217
- React.createElement("input", { value: inputString, onChange: onQueryStringChange, onFocus: onInputFocus, ref: searchInputRef, onKeyDown: onKeyDown, placeholder: t('i18nEnterSolrQuery', 'Enter SOLR query, for example: severity:"1 (Urgent)" and status:"Waiting on Customer"'), className: `pf-v5-c-form-control pf-v5-c-select__toggle-typeahead ${inputString && isParsingSuccessful ? 'pf-m-success' : ''}`, type: "text", "aria-invalid": isQueryInValid ? true : false, autoComplete: "off", id: "advance-search-typeahead", "aria-label": t('Enter search query'), "aria-describedby": "advance-query-error-helper" })),
218
- inputString && (React.createElement(Button, { onClick: onClear, className: "pf-v5-c-button pf-m-plain pf-v5-c-select__toggle-clear", variant: "plain", "data-tracking-id": "clear-search", "aria-label": t('Clear this search') },
219
- React.createElement(TimesCircleIcon, null)))),
216
+ React.createElement(TextInputGroup, null,
217
+ React.createElement(TextInputGroupMain, { value: inputString, onChange: (event, value) => onQueryStringChange(value), onFocus: onInputFocus, ref: searchInputRef, onKeyDown: onKeyDown, placeholder: t('i18nEnterSolrQuery', 'Enter SOLR query, for example: severity:"1 (Urgent)" and status:"Waiting on Customer"'), className: "pf-v5-u-pr-2xl", type: "text", "aria-invalid": isQueryInValid ? true : false, autoComplete: "off", id: "advance-search-typeahead", "aria-label": t('Enter search query'), "aria-describedby": "advance-query-error-helper" }),
218
+ inputString && (React.createElement(TextInputGroupUtilities, null,
219
+ React.createElement(Button, { onClick: onClear, variant: "plain", "data-tracking-id": "clear-search", "aria-label": t('Clear this search') }, inputString && isParsingSuccessful ? (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
220
+ React.createElement(FlexItem, null,
221
+ React.createElement(Icon, { size: "md" },
222
+ React.createElement(CheckCircleIcon, { color: "#3E8635" }))),
223
+ React.createElement(FlexItem, null,
224
+ React.createElement(TimesCircleIcon, null)))) : (React.createElement(TimesCircleIcon, null)))))),
220
225
  isAutoCompleteListVisible && (React.createElement("ul", { className: "pf-v5-c-select__menu", "aria-labelledby": "advance-search-typeahead-label", role: "listbox" }, autoCompleteList.map((item, index) => (React.createElement("li", { key: index, role: "presentation", className: `pf-v5-c-select__menu-wrapper ${selectedItemIndex === index ? 'pf-m-focus' : ''}` },
221
226
  React.createElement("button", { type: "button", onClick: (e) => onItemClick(item.value), className: "pf-v5-c-select__menu-item", "aria-selected": selectedItemIndex === index ? true : false, role: "option" }, item.display))))))),
222
227
  React.createElement(Button, { type: "button", variant: "primary", "data-tracking-id": "case-list-adv-search-button", className: "pf-v5-u-ml-sm", onClick: onSearchSubmit, isDisabled: isAdvancedSearchButtonDisabled },
@@ -8,3 +8,8 @@
8
8
  }
9
9
  z-index: 9;
10
10
  }
11
+
12
+ .pf-v5-c-menu__group-title {
13
+ margin: 0;
14
+ padding: 0;
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -46,11 +46,11 @@
46
46
  "@patternfly/pfe-collapse": "1.12.3",
47
47
  "@patternfly/react-core": "5.1.1",
48
48
  "@patternfly/react-table": "5.1.1",
49
- "@rh-support/components": "2.1.25",
50
- "@rh-support/react-context": "2.1.27",
49
+ "@rh-support/components": "2.1.26",
50
+ "@rh-support/react-context": "2.1.28",
51
51
  "@rh-support/types": "2.0.2",
52
- "@rh-support/user-permissions": "2.1.18",
53
- "@rh-support/utils": "2.1.11",
52
+ "@rh-support/user-permissions": "2.1.19",
53
+ "@rh-support/utils": "2.1.12",
54
54
  "i18next": "^19.0.1",
55
55
  "localforage": "^1.10.0",
56
56
  "lodash": "^4.17.21",
@@ -93,5 +93,5 @@
93
93
  "defaults and supports es6-module",
94
94
  "maintained node versions"
95
95
  ],
96
- "gitHead": "e67736e7b8a06c4617cc8e49a905ba7819e5ae63"
96
+ "gitHead": "672a8f5024aded7ed6ce4edb5c0991bc3f5570bb"
97
97
  }