@rh-support/components 2.5.22 → 2.5.24
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/SingleSelectDropdown/SingleSelectDropdown.d.ts +6 -3
- package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts.map +1 -1
- package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.js +4 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +2 -2
- package/package.json +4 -4
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface ISingleSelectDropdownOption {
|
|
3
3
|
value: any;
|
|
4
4
|
label: string;
|
|
5
|
+
element?: ReactNode;
|
|
5
6
|
description?: string;
|
|
6
7
|
disabled?: boolean;
|
|
8
|
+
title?: string;
|
|
7
9
|
}
|
|
8
10
|
export interface SingleSelectDropdownProps {
|
|
9
11
|
selected: ISingleSelectDropdownOption;
|
|
@@ -12,13 +14,14 @@ export interface SingleSelectDropdownProps {
|
|
|
12
14
|
isLoading?: boolean;
|
|
13
15
|
id?: string;
|
|
14
16
|
ariaLabel?: string;
|
|
15
|
-
placeholder?: string;
|
|
17
|
+
placeholder?: string | JSX.Element;
|
|
16
18
|
isInvalid?: boolean;
|
|
17
19
|
className?: string;
|
|
18
20
|
toggleClassName?: string;
|
|
19
21
|
dataTrackingId?: string;
|
|
20
22
|
toggleDataTrackingId?: string;
|
|
21
|
-
|
|
23
|
+
customToggleContent?: React.JSX.Element;
|
|
24
|
+
onSelect?: (option: ISingleSelectDropdownOption) => void;
|
|
22
25
|
onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
23
26
|
isScrollable?: boolean;
|
|
24
27
|
zIndex?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectDropdown.d.ts","sourceRoot":"","sources":["../../../src/SingleSelectDropdown/SingleSelectDropdown.tsx"],"names":[],"mappings":"AAWA,OAAO,
|
|
1
|
+
{"version":3,"file":"SingleSelectDropdown.d.ts","sourceRoot":"","sources":["../../../src/SingleSelectDropdown/SingleSelectDropdown.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AAEnE,MAAM,WAAW,2BAA2B;IACxC,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,2BAA2B,CAAC;IACtC,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,IAAI,CAAC;IACzD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAkGpE"}
|
|
@@ -28,5 +28,8 @@ export function SingleSelectDropdown(props) {
|
|
|
28
28
|
!!onBlur && onBlur(value);
|
|
29
29
|
};
|
|
30
30
|
return (React.createElement(Select, { id: id || '', className: className || '', "data-tracking-id": dataTrackingId, isOpen: isOpen, selected: selected, onSelect: onLocalSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, shouldFocusToggleOnSelect: true, popperProps: { direction: 'down', enableFlip: false }, isScrollable: isScrollable, shouldFocusFirstItemOnOpen: false, onBlur: () => onLocalBlur, "aria-label": ariaLabel, zIndex: zIndex },
|
|
31
|
-
React.createElement(SelectList, null, options.map((option) =>
|
|
31
|
+
React.createElement(SelectList, null, options.map((option) => {
|
|
32
|
+
var _a;
|
|
33
|
+
return (React.createElement(SelectOption, { key: option.value, value: option, description: option.description || '', isSelected: isEqual(selected.label, option.label), isDisabled: option.disabled, title: (option === null || option === void 0 ? void 0 : option.title) || option.label }, (_a = option === null || option === void 0 ? void 0 : option.element) !== null && _a !== void 0 ? _a : option.label));
|
|
34
|
+
}))));
|
|
32
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBA0Q1C;kBA1QQ,oBAAoB;;;AA6Q7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -15,7 +15,6 @@ import OutlinedGrinIcon from '@patternfly/react-icons/dist/js/icons/outlined-gri
|
|
|
15
15
|
import OutlinedMehIcon from '@patternfly/react-icons/dist/js/icons/outlined-meh-icon';
|
|
16
16
|
import OutlinedSmileIcon from '@patternfly/react-icons/dist/js/icons/outlined-smile-icon';
|
|
17
17
|
import { getUrlParsedParams } from '@rh-support/utils';
|
|
18
|
-
import emojiRegex from 'emoji-regex';
|
|
19
18
|
import isEmpty from 'lodash/isEmpty';
|
|
20
19
|
import React, { useEffect, useState } from 'react';
|
|
21
20
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -84,7 +83,8 @@ function SupportFeedbackModal(props) {
|
|
|
84
83
|
delete updatedValues.caseSummaryId;
|
|
85
84
|
}
|
|
86
85
|
try {
|
|
87
|
-
|
|
86
|
+
const emojiRegex = /(\p{Emoji_Presentation}|\p{Emoji}\uFE0F|\p{Extended_Pictographic})+/gu;
|
|
87
|
+
updatedValues.moreInfo = (_a = updatedValues.moreInfo) === null || _a === void 0 ? void 0 : _a.replace(emojiRegex, (match) => encodeURIComponent(match));
|
|
88
88
|
// Call the request with the updated values
|
|
89
89
|
yield request(updatedValues, window.sessionjs, window.location.href, seSessionId);
|
|
90
90
|
setValues(formInitState); // Reset form state after successful submission
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.24",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@patternfly/react-table": "5.4.2",
|
|
69
69
|
"@patternfly/react-tokens": "^5.4.0",
|
|
70
70
|
"@rh-support/types": "2.0.5",
|
|
71
|
-
"@rh-support/user-permissions": "2.5.
|
|
72
|
-
"@rh-support/utils": "2.5.
|
|
71
|
+
"@rh-support/user-permissions": "2.5.16",
|
|
72
|
+
"@rh-support/utils": "2.5.15",
|
|
73
73
|
"dompurify": "^2.2.6",
|
|
74
74
|
"js-worker-search": "^1.4.1",
|
|
75
75
|
"lazysizes": "^5.3.2",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"defaults and supports es6-module",
|
|
107
107
|
"maintained node versions"
|
|
108
108
|
],
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "28515f0f6b710a4f1dc2bd46d7609a65feb15035"
|
|
110
110
|
}
|