@rh-support/manage 0.2.93 → 0.2.96
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":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAcA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAgKhD"}
|
|
@@ -12,6 +12,7 @@ import { Card, CardBody, CardHeader, SelectOption, Spinner, TextArea } from '@pa
|
|
|
12
12
|
import { EditorMode, ToastNotification, useFetch } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
14
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
15
|
+
import { isEmpty } from 'lodash';
|
|
15
16
|
import debounce from 'lodash/debounce';
|
|
16
17
|
import React, { useContext, useEffect, useState } from 'react';
|
|
17
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -58,6 +59,7 @@ export function PreferencesCaseView(props) {
|
|
|
58
59
|
const debounceUpdateCommentSignature = debounce((value) => __awaiter(this, void 0, void 0, function* () {
|
|
59
60
|
try {
|
|
60
61
|
yield updateCommentSignature(value);
|
|
62
|
+
!isEmpty(value.trim()) && setTimeout(() => setCommentValidated('success'), 2000);
|
|
61
63
|
}
|
|
62
64
|
catch (error) {
|
|
63
65
|
setLocalCommentSignature('');
|
|
@@ -66,11 +68,13 @@ export function PreferencesCaseView(props) {
|
|
|
66
68
|
setCommentValidated('error');
|
|
67
69
|
setIsCommentSignatureLoading(false);
|
|
68
70
|
}
|
|
69
|
-
}),
|
|
71
|
+
}), 2000);
|
|
70
72
|
const handleCommentSignatureChange = (value) => __awaiter(this, void 0, void 0, function* () {
|
|
71
73
|
setIsCommentSignatureLoading(true);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
if (isEmpty(value.trim())) {
|
|
75
|
+
yield debounceUpdateCommentSignature('');
|
|
76
|
+
}
|
|
77
|
+
!isEmpty(value.trim()) && (yield debounceUpdateCommentSignature(value));
|
|
74
78
|
setLocalCommentSignature(value);
|
|
75
79
|
setIsCommentSignatureLoading(false);
|
|
76
80
|
});
|
|
@@ -118,7 +122,7 @@ export function PreferencesCaseView(props) {
|
|
|
118
122
|
React.createElement("div", { className: "form-group" },
|
|
119
123
|
React.createElement("label", { htmlFor: "comment-signature-textarea" },
|
|
120
124
|
React.createElement(Trans, null, "Comment signature")),
|
|
121
|
-
React.createElement(TextArea, { value: localCommentSignature, onChange: handleCommentSignatureChange, "aria-label": "comment-signature-textarea", placeholder: originalCommentSignature, id: "comment-signature-textarea",
|
|
125
|
+
React.createElement(TextArea, { value: localCommentSignature, onChange: handleCommentSignatureChange, "aria-label": "comment-signature-textarea", placeholder: originalCommentSignature || 'Add a comment signature', id: "comment-signature-textarea",
|
|
122
126
|
// @ts-ignore
|
|
123
127
|
validated: commentValidated }),
|
|
124
128
|
isCommentSignatureLoading && React.createElement(Spinner, { size: "md" })),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.96",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
57
57
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
58
58
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
59
|
-
"@patternfly/react-core": "4.
|
|
59
|
+
"@patternfly/react-core": "4.202.16",
|
|
60
60
|
"@patternfly/react-table": "4.71.16",
|
|
61
61
|
"@rh-support/api": "0.3.9",
|
|
62
62
|
"@rh-support/components": "^0.1.3",
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
95
95
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
96
96
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
97
|
-
"@patternfly/react-core": "4.
|
|
97
|
+
"@patternfly/react-core": "4.202.16",
|
|
98
98
|
"@patternfly/react-table": "4.71.16",
|
|
99
99
|
"@rh-support/api": "0.3.24",
|
|
100
|
-
"@rh-support/components": "1.1.
|
|
100
|
+
"@rh-support/components": "1.1.77",
|
|
101
101
|
"@rh-support/configs": "0.2.5",
|
|
102
|
-
"@rh-support/react-context": "0.2.
|
|
102
|
+
"@rh-support/react-context": "0.2.83",
|
|
103
103
|
"@rh-support/types": "0.2.0",
|
|
104
|
-
"@rh-support/user-permissions": "0.2.
|
|
104
|
+
"@rh-support/user-permissions": "0.2.63",
|
|
105
105
|
"@rh-support/utils": "0.2.46",
|
|
106
106
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
107
107
|
"i18next": ">=17.0.1",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"react-i18next": ">=10.11.0",
|
|
114
114
|
"react-router-dom": ">=5.1.2"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "4ccfcdf67182264763662c2f1d833d9fa059a132"
|
|
117
117
|
}
|