@rh-support/components 1.1.78 → 1.1.79

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":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":";AAuBA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAqN1C;kBArNQ,oBAAoB;;;AAwN7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":";AAuBA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAuN1C;kBAvNQ,oBAAoB;;;AA0N7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -172,6 +172,8 @@ function SupportFeedbackModal(props) {
172
172
  }); };
173
173
  // Function for Toggling the Modal when Provide feedback button is clicked
174
174
  var handleModalToggle = function () {
175
+ if (isFetching)
176
+ return;
175
177
  props.onClose();
176
178
  setIsSubmitDisabled(false);
177
179
  setValues({ levelOfSatisfied: null, moreInfo: '' });
@@ -233,7 +235,7 @@ function SupportFeedbackModal(props) {
233
235
  return [
234
236
  react_1.default.createElement(react_core_1.Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
235
237
  react_1.default.createElement(react_i18next_1.Trans, null, isFetching ? 'Sending feedback' : 'Send feedback')),
236
- react_1.default.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel" },
238
+ react_1.default.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel", disabled: isFetching },
237
239
  react_1.default.createElement(react_i18next_1.Trans, null, "Cancel")),
238
240
  ];
239
241
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":";AAuBA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAqN1C;kBArNQ,oBAAoB;;;AAwN7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":";AAuBA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAuN1C;kBAvNQ,oBAAoB;;;AA0N7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -77,6 +77,8 @@ function SupportFeedbackModal(props) {
77
77
  });
78
78
  // Function for Toggling the Modal when Provide feedback button is clicked
79
79
  const handleModalToggle = () => {
80
+ if (isFetching)
81
+ return;
80
82
  props.onClose();
81
83
  setIsSubmitDisabled(false);
82
84
  setValues({ levelOfSatisfied: null, moreInfo: '' });
@@ -138,7 +140,7 @@ function SupportFeedbackModal(props) {
138
140
  return [
139
141
  React.createElement(Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
140
142
  React.createElement(Trans, null, isFetching ? 'Sending feedback' : 'Send feedback')),
141
- React.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel" },
143
+ React.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel", disabled: isFetching },
142
144
  React.createElement(Trans, null, "Cancel")),
143
145
  ];
144
146
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/components",
3
- "version": "1.1.78",
3
+ "version": "1.1.79",
4
4
  "description": "Contains all reusabel components for support app",
5
5
  "author": "Vikas Rathee <vrathee@redhat.com>",
6
6
  "license": "ISC",
@@ -128,5 +128,5 @@
128
128
  "not ie <= 11",
129
129
  "not op_mini all"
130
130
  ],
131
- "gitHead": "abf4c47f33be247ab5bf3e0596a0dd8765c8a5b8"
131
+ "gitHead": "acb137236b62e31aba70cda91755b3b94f0cb7da"
132
132
  }