@rh-support/troubleshoot 2.6.27 → 2.6.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.
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -31
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +34 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -3
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +15 -11
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +22 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +102 -53
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +20 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +5 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +9 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -6
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +13 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +8 -5
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -7
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +3 -2
- package/lib/esm/components/Cve/CveSidebar.js +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +9 -6
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +10 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +2 -2
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -4
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +3 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +9 -2
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
- package/lib/esm/components/Recommendations/Recommendations.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +7 -4
- package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -3
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +17 -12
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +13 -13
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +0 -7
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -96
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.js +6 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +7 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -2
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +4 -6
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +1 -5
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +18 -147
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -4
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +16 -13
- package/lib/esm/components/wizardLayout/index.d.ts +0 -1
- package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/index.js +0 -1
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +6 -8
- package/lib/esm/css/app.css +5 -4
- package/lib/esm/css/case.css +12 -0
- package/lib/esm/css/results.css +2 -2
- package/lib/esm/hooks/useWizard.d.ts +0 -6
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -2
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +0 -2
- package/lib/esm/scss/_main.scss +54 -8
- package/lib/esm/scss/_pf-overrides.scss +18 -6
- package/package.json +6 -7
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +0 -7
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +0 -73
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +0 -9
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +0 -9
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +0 -9
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +0 -17
- package/lib/esm/context/AIResponseContext.d.ts +0 -10
- package/lib/esm/context/AIResponseContext.d.ts.map +0 -1
- package/lib/esm/context/AIResponseContext.js +0 -26
- package/lib/esm/css/AskRedHat.css +0 -338
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts +0 -48
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +0 -1
- package/lib/esm/reducers/AIResponseConstNTypes.js +0 -16
- package/lib/esm/reducers/AIResponseReducer.d.ts +0 -9
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +0 -1
- package/lib/esm/reducers/AIResponseReducer.js +0 -43
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -81,6 +81,17 @@ div.support-grid-case-details.support-case {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
.grid-aside-content-inner-div {
|
|
85
|
+
margin: 0px !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.card-heading {
|
|
89
|
+
margin-bottom: 0px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
#case-details-top-recommendations-pagination-bottom-pagination {
|
|
93
|
+
justify-content: flex-start;
|
|
94
|
+
}
|
|
84
95
|
}
|
|
85
96
|
}
|
|
86
97
|
|
|
@@ -258,6 +269,7 @@ div.support-grid-case-details.support-case {
|
|
|
258
269
|
justify-content: space-between;
|
|
259
270
|
-ms-flex-wrap: wrap;
|
|
260
271
|
flex-wrap: wrap;
|
|
272
|
+
border-radius: 8px;
|
|
261
273
|
|
|
262
274
|
& > * {
|
|
263
275
|
margin: 9px;
|
|
@@ -303,6 +315,7 @@ div.support-grid-case-details.support-case {
|
|
|
303
315
|
}
|
|
304
316
|
|
|
305
317
|
.case-overview-secondary {
|
|
318
|
+
border-radius: 8px;
|
|
306
319
|
.form-group {
|
|
307
320
|
margin-bottom: 0;
|
|
308
321
|
}
|
|
@@ -653,18 +666,20 @@ mark {
|
|
|
653
666
|
font-weight: 600;
|
|
654
667
|
|
|
655
668
|
.pinned-resource {
|
|
656
|
-
color: var(--pf-
|
|
669
|
+
color: var(--pf-t--global--text--color--link--default);
|
|
657
670
|
}
|
|
658
671
|
|
|
659
|
-
button:hover[title='Link'] {
|
|
672
|
+
button:hover[title='Link'] svg {
|
|
660
673
|
color: #6ca100;
|
|
661
674
|
}
|
|
662
675
|
|
|
663
676
|
button[title='Unlink'] {
|
|
664
|
-
|
|
677
|
+
svg {
|
|
678
|
+
color: #6ca100;
|
|
679
|
+
}
|
|
665
680
|
|
|
666
|
-
&:hover {
|
|
667
|
-
color: var(
|
|
681
|
+
&:hover svg {
|
|
682
|
+
color: var(pf-t--global--icon--color--status--danger--default);
|
|
668
683
|
}
|
|
669
684
|
}
|
|
670
685
|
}
|
|
@@ -765,10 +780,10 @@ p.pref-case-popover-text {
|
|
|
765
780
|
}
|
|
766
781
|
|
|
767
782
|
.support-types-card {
|
|
768
|
-
border:
|
|
783
|
+
border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--default);
|
|
769
784
|
|
|
770
785
|
&.pf-m-selected {
|
|
771
|
-
border:
|
|
786
|
+
border: var(--pf-t--global--border--width--box--clicked) solid var(--pf-t--global--border--color--clicked);
|
|
772
787
|
}
|
|
773
788
|
}
|
|
774
789
|
|
|
@@ -994,6 +1009,19 @@ svg.pf-v6-u-ml-xs.icon-size {
|
|
|
994
1009
|
background: #fff;
|
|
995
1010
|
}
|
|
996
1011
|
|
|
1012
|
+
.card-body-wrapper {
|
|
1013
|
+
display: flex;
|
|
1014
|
+
padding: 16px;
|
|
1015
|
+
flex-direction: column;
|
|
1016
|
+
align-items: flex-start;
|
|
1017
|
+
gap: 16px;
|
|
1018
|
+
border-radius: 0px 0px var(--global-border-radius-medium, 16px) var(--global-border-radius-medium, 16px);
|
|
1019
|
+
border-right: 1px solid var(--global-border-color-default, #c7c7c7);
|
|
1020
|
+
border-bottom: 1px solid var(--global-border-color-default, #c7c7c7);
|
|
1021
|
+
border-left: 1px solid var(--global-border-color-default, #c7c7c7);
|
|
1022
|
+
background: #fff;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
997
1025
|
.form-group {
|
|
998
1026
|
span.form-instructions-bold {
|
|
999
1027
|
font-weight: 600;
|
|
@@ -1097,6 +1125,7 @@ svg.pf-v6-u-ml-xs.icon-size {
|
|
|
1097
1125
|
|
|
1098
1126
|
.review-form {
|
|
1099
1127
|
background-color: #e0e0e0 !important;
|
|
1128
|
+
border-radius: 8px;
|
|
1100
1129
|
}
|
|
1101
1130
|
|
|
1102
1131
|
.ai-label-text {
|
|
@@ -1138,6 +1167,7 @@ svg.pf-v6-u-ml-xs.icon-size {
|
|
|
1138
1167
|
padding: 1px;
|
|
1139
1168
|
border-radius: 20px;
|
|
1140
1169
|
height: 32px;
|
|
1170
|
+
margin-bottom: 18px;
|
|
1141
1171
|
}
|
|
1142
1172
|
|
|
1143
1173
|
.single-select-toggle-text {
|
|
@@ -1179,7 +1209,6 @@ svg.pf-v6-u-ml-xs.icon-size {
|
|
|
1179
1209
|
position: relative;
|
|
1180
1210
|
display: inline-block;
|
|
1181
1211
|
z-index: 1;
|
|
1182
|
-
margin: 1px;
|
|
1183
1212
|
line-height: normal;
|
|
1184
1213
|
font-size: 14px;
|
|
1185
1214
|
}
|
|
@@ -1254,3 +1283,20 @@ svg.pf-v6-u-ml-xs.icon-size {
|
|
|
1254
1283
|
.cursor-pointer {
|
|
1255
1284
|
cursor: pointer;
|
|
1256
1285
|
}
|
|
1286
|
+
|
|
1287
|
+
#file-uploader-title {
|
|
1288
|
+
margin-bottom: 0;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
.file-upload-body {
|
|
1292
|
+
padding-top: 0;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
.article-recommendations-card h3 {
|
|
1296
|
+
margin-bottom: 0;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
.postcomment-submit:disabled,
|
|
1300
|
+
.remote-session-button:disabled {
|
|
1301
|
+
color: var(--pf-v6-c-button--disabled--Color);
|
|
1302
|
+
}
|
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
|
|
194
194
|
.pf-v6-c-accordion {
|
|
195
195
|
padding: 0;
|
|
196
|
+
margin: 0;
|
|
196
197
|
.pf-m-expanded ul {
|
|
197
198
|
list-style-type: none; //Because, FF
|
|
198
199
|
}
|
|
@@ -329,6 +330,10 @@
|
|
|
329
330
|
color: #06c;
|
|
330
331
|
}
|
|
331
332
|
|
|
333
|
+
.pf-v6-c-button.pf-m-primary {
|
|
334
|
+
color: var(--pf-v6-c-button--Color);
|
|
335
|
+
}
|
|
336
|
+
|
|
332
337
|
// Override disable color on darker backgrounds
|
|
333
338
|
.case-overview-secondary,
|
|
334
339
|
#review {
|
|
@@ -399,6 +404,10 @@ div#cep-details-modal.pf-v6-c-modal-box__body {
|
|
|
399
404
|
div#request-mgmt-escalation-modal.request-escalation-modal {
|
|
400
405
|
div.pf-v6-c-modal-box__body {
|
|
401
406
|
form.pf-v6-c-form.request-escalation-form {
|
|
407
|
+
.pf-m-textarea textarea {
|
|
408
|
+
resize: none !important;
|
|
409
|
+
}
|
|
410
|
+
|
|
402
411
|
div.pf-v6-l-grid.pf-m-all-12-col-on-md.pf-m-gutter {
|
|
403
412
|
div.pf-v6-l-grid__item.pf-m-6-col {
|
|
404
413
|
div.pf-v6-c-form__group {
|
|
@@ -739,6 +748,7 @@ a.case-resource-recommendation-link {
|
|
|
739
748
|
}
|
|
740
749
|
|
|
741
750
|
.description-textarea {
|
|
751
|
+
resize: none !important;
|
|
742
752
|
&.pf-v6-c-form-control {
|
|
743
753
|
&:disabled,
|
|
744
754
|
&.kt1-disabled {
|
|
@@ -795,12 +805,14 @@ div.case-details-tabs pre {
|
|
|
795
805
|
margin-bottom: 1rem;
|
|
796
806
|
}
|
|
797
807
|
|
|
798
|
-
#external-ssousername-filter:has(.pf-v6-c-truncate) {
|
|
799
|
-
@media (min-width: 1300px) {
|
|
800
|
-
min-width: calc(100% + 269px) !important;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
|
|
804
808
|
.case-creation-severity-select {
|
|
805
809
|
max-width: min-content !important;
|
|
806
810
|
}
|
|
811
|
+
|
|
812
|
+
.pf-v6-c-wizard__main-body {
|
|
813
|
+
padding: 32px;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.pf-v6-c-alert__description {
|
|
817
|
+
color: #000000;
|
|
818
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.29",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@cee-eng/hydrajs": "4.18.57",
|
|
53
53
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
54
|
-
"@ifd-ui/ask-redhat-core": "^0.0.30",
|
|
55
54
|
"@patternfly/patternfly": "6.2.1",
|
|
56
55
|
"@patternfly/react-core": "6.2.1",
|
|
57
56
|
"@patternfly/react-table": "6.2.1",
|
|
@@ -59,11 +58,11 @@
|
|
|
59
58
|
"@progress/kendo-licensing": "1.3.5",
|
|
60
59
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
61
60
|
"@redux-devtools/extension": "^3.3.0",
|
|
62
|
-
"@rh-support/components": "2.5.
|
|
63
|
-
"@rh-support/react-context": "2.5.
|
|
61
|
+
"@rh-support/components": "2.5.33",
|
|
62
|
+
"@rh-support/react-context": "2.5.35",
|
|
64
63
|
"@rh-support/types": "2.0.5",
|
|
65
|
-
"@rh-support/user-permissions": "2.5.
|
|
66
|
-
"@rh-support/utils": "2.5.
|
|
64
|
+
"@rh-support/user-permissions": "2.5.20",
|
|
65
|
+
"@rh-support/utils": "2.5.19",
|
|
67
66
|
"@types/react-redux": "^7.1.33",
|
|
68
67
|
"@types/redux": "^3.6.0",
|
|
69
68
|
"date-fns": "3.6.0",
|
|
@@ -135,5 +134,5 @@
|
|
|
135
134
|
"defaults and supports es6-module",
|
|
136
135
|
"maintained node versions"
|
|
137
136
|
],
|
|
138
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "c533afec1e04aa8a6da485d8855d80ce1a75fd88"
|
|
139
138
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAOhD,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAqJtC,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Button, Card, CardBody, CardHeader, Spinner } from '@patternfly/react-core';
|
|
2
|
-
import React, { useRef, useState } from 'react';
|
|
3
|
-
import { useAIResponseState } from '../../context/AIResponseContext';
|
|
4
|
-
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
5
|
-
import { CollapseIcon } from './icons/CollapseIcon';
|
|
6
|
-
import { StarIcon } from './icons/StarIcon';
|
|
7
|
-
export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
8
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
9
|
-
const aiResponseState = useAIResponseState();
|
|
10
|
-
const contentRef = useRef(null);
|
|
11
|
-
const onToggle = () => {
|
|
12
|
-
if (isExpanded && contentRef.current) {
|
|
13
|
-
contentRef.current.scrollTop = 0;
|
|
14
|
-
}
|
|
15
|
-
setIsExpanded((prev) => !prev);
|
|
16
|
-
};
|
|
17
|
-
const handleChatWithAIClick = () => onChatWithAIClick === null || onChatWithAIClick === void 0 ? void 0 : onChatWithAIClick();
|
|
18
|
-
const aiResponse = aiResponseState.aiResponse;
|
|
19
|
-
const answer = (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.answer) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.content) || 'No AI response available yet.';
|
|
20
|
-
const sources = (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.sources) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.references) || [];
|
|
21
|
-
const sourcesCount = sources.length || 0;
|
|
22
|
-
const isLoading = aiResponseState.isLoading || !aiResponse;
|
|
23
|
-
const { parseMarkdown } = useParseRuleMarkdown();
|
|
24
|
-
if (isLoading) {
|
|
25
|
-
return (React.createElement("div", { className: "ask-redhat" },
|
|
26
|
-
React.createElement("p", { className: "ask-redhat-title" },
|
|
27
|
-
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
28
|
-
"Resolve your issue now with AI insights"),
|
|
29
|
-
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
30
|
-
React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
|
|
31
|
-
React.createElement(Spinner, { size: "lg" }),
|
|
32
|
-
React.createElement("p", { style: { marginTop: '1rem' } }, "Getting AI insights..."))),
|
|
33
|
-
!aiResponseState.isLoading && (React.createElement("div", { className: "ask-redhat-toggle-button" },
|
|
34
|
-
React.createElement(Button, { variant: "link", onClick: handleChatWithAIClick, className: "ask-redhat-chat-button" }, "Chat with AI to get started")))));
|
|
35
|
-
}
|
|
36
|
-
if (aiResponseState.error) {
|
|
37
|
-
return (React.createElement("div", { className: "ask-redhat" },
|
|
38
|
-
React.createElement("p", { className: "ask-redhat-title" },
|
|
39
|
-
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
40
|
-
"Resolve your issue now with AI insights"),
|
|
41
|
-
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
42
|
-
React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
|
|
43
|
-
React.createElement("p", { style: { color: '#d73502', marginBottom: '1rem' } }, "Unable to get AI insights. Please try again later."),
|
|
44
|
-
React.createElement(Button, { variant: "link", onClick: handleChatWithAIClick, className: "ask-redhat-chat-button", icon: React.createElement(StarIcon, null) }, "Try again with AI Chat")))));
|
|
45
|
-
}
|
|
46
|
-
return (React.createElement("div", { className: "ask-redhat" },
|
|
47
|
-
React.createElement("p", { className: "ask-redhat-title" },
|
|
48
|
-
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
49
|
-
"Resolve your issue now with AI insights"),
|
|
50
|
-
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
51
|
-
React.createElement("div", { ref: contentRef, className: `ask-redhat-content ${isExpanded ? 'ask-redhat-content--expanded' : ''}` },
|
|
52
|
-
React.createElement("div", { className: `ask-redhat-content-scrollable ${isExpanded ? 'ask-redhat-content--expanded-scrollable' : ''}` },
|
|
53
|
-
React.createElement("div", null,
|
|
54
|
-
React.createElement("div", { dangerouslySetInnerHTML: { __html: parseMarkdown(answer) } }),
|
|
55
|
-
sourcesCount > 0 && (React.createElement(React.Fragment, null,
|
|
56
|
-
React.createElement("p", null, "2 sources"),
|
|
57
|
-
React.createElement("div", { className: "ask-redhat-cards" }, sources.map((source, index) => (React.createElement(Card, { className: "ask-redhat-card", key: index },
|
|
58
|
-
React.createElement(CardHeader, null,
|
|
59
|
-
React.createElement("h3", { className: "ask-redhat-card-title" },
|
|
60
|
-
React.createElement("a", { href: source.link, target: "_blank", rel: "noopener noreferrer" }, source.title))),
|
|
61
|
-
React.createElement(CardBody, null,
|
|
62
|
-
React.createElement("p", null, source.snippet)))))))))),
|
|
63
|
-
React.createElement("div", { className: "ask-redhat-footer-wrapper" },
|
|
64
|
-
React.createElement("div", { className: "ask-redhat-footer" },
|
|
65
|
-
React.createElement("p", { className: "ask-redhat-footer-text" }, "Want to continue the conversation? Dive deeper with our AI assistant"),
|
|
66
|
-
React.createElement(Button, { onClick: handleChatWithAIClick, className: 'ask-redhat-chat-button', icon: React.createElement(StarIcon, null) }, "Chat with AI"))),
|
|
67
|
-
!isExpanded && React.createElement("div", { className: "ask-redhat-fade-overlay" }))),
|
|
68
|
-
React.createElement("div", { className: "ask-redhat-toggle-button-wrapper" },
|
|
69
|
-
React.createElement("div", { className: "ask-redhat-border-line" }),
|
|
70
|
-
React.createElement(Button, { onClick: onToggle, className: isExpanded ? 'ask-redhat-toggle-button-collapsed' : 'ask-redhat-toggle-button' },
|
|
71
|
-
isExpanded ? React.createElement(CollapseIcon, null) : React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
72
|
-
isExpanded ? '' : 'Read more'))));
|
|
73
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapseIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/TroubleshootSection/icons/CollapseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,sBAiB5C,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export const CollapseIcon = (props) => {
|
|
3
|
-
const { width = 18.118, height = 12 } = props;
|
|
4
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 19 11", fill: "none", style: {
|
|
5
|
-
flexShrink: 0,
|
|
6
|
-
} },
|
|
7
|
-
React.createElement("path", { d: "M9.05895 0L16.9042 7.07143H1.21367L9.05895 0Z", fill: "#9F549C" }),
|
|
8
|
-
React.createElement("path", { d: "M9.05895 1.57129L16.9042 8.64272H1.21367L9.05895 1.57129Z", fill: "white" })));
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StarIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/TroubleshootSection/icons/StarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,UAAW,SAAS,sBAgDxC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export const StarIcon = (props) => {
|
|
3
|
-
const { width = 16, height = 15.273 } = props;
|
|
4
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 16 15.273", fill: "none", style: {
|
|
5
|
-
flexShrink: 0,
|
|
6
|
-
aspectRatio: '16.00/15.27',
|
|
7
|
-
} },
|
|
8
|
-
React.createElement("path", { d: "M16.197 9.21581L11.3573 8.18825L10.3297 3.34854C10.2937 3.16868 10.1345 3.04541 9.95463 3.04541C9.77478 3.04541 9.61558 3.17385 9.57958 3.34854L8.55202 8.18825L3.71231 9.21581C3.53245 9.25181 3.40918 9.41101 3.40918 9.59087C3.40918 9.77072 3.53762 9.92992 3.71231 9.96592L8.55202 10.9935L9.57958 15.8332C9.61558 16.013 9.77478 16.1363 9.95463 16.1363C10.1345 16.1363 10.2937 16.0079 10.3297 15.8332L11.3573 10.9935L16.197 9.96592C16.3768 9.92992 16.5001 9.77072 16.5001 9.59087C16.5001 9.41101 16.3717 9.25181 16.197 9.21581Z", fill: "url(#paint0_linear_5146_16767)" }),
|
|
9
|
-
React.createElement("path", { d: "M3.40909 6.68195C3.58647 6.68195 3.74356 6.55526 3.77905 6.38297L4.16931 4.53308L6.0192 4.14282C6.19658 4.10733 6.31818 3.95024 6.31818 3.77286C6.31818 3.59548 6.19149 3.43839 6.0192 3.4029L4.16931 3.01264L3.77905 1.16275C3.74356 0.98537 3.58647 0.86377 3.40909 0.86377C3.23171 0.86377 3.07462 0.990461 3.03913 1.16275L2.64887 3.01264L0.798982 3.4029C0.6216 3.43839 0.5 3.59548 0.5 3.77286C0.5 3.95024 0.626691 4.10733 0.798982 4.14282L2.64887 4.53308L3.03913 6.38297C3.07462 6.56035 3.23171 6.68195 3.40909 6.68195Z", fill: "url(#paint1_linear_5146_16767)" }),
|
|
10
|
-
React.createElement("defs", null,
|
|
11
|
-
React.createElement("linearGradient", { id: "paint0_linear_5146_16767", x1: "9.95463", y1: "3.04541", x2: "9.95463", y2: "16.1363", gradientUnits: "userSpaceOnUse" },
|
|
12
|
-
React.createElement("stop", { stopColor: "#F56E6E" }),
|
|
13
|
-
React.createElement("stop", { offset: "1", stopColor: "#5E40BE" })),
|
|
14
|
-
React.createElement("linearGradient", { id: "paint1_linear_5146_16767", x1: "3.40909", y1: "0.86377", x2: "3.40909", y2: "6.68195", gradientUnits: "userSpaceOnUse" },
|
|
15
|
-
React.createElement("stop", { stopColor: "#F56E6E" }),
|
|
16
|
-
React.createElement("stop", { offset: "1", stopColor: "#5E40BE" })))));
|
|
17
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IAIResponseActionType, IAIResponseState } from '../reducers/AIResponseConstNTypes';
|
|
3
|
-
export declare const AIResponseStateContext: React.Context<IAIResponseState>;
|
|
4
|
-
export declare const AIResponseDispatchContext: React.Context<React.Dispatch<IAIResponseActionType>>;
|
|
5
|
-
export declare function AIResponseContextProvider({ children }: {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}): React.JSX.Element;
|
|
8
|
-
export declare const useAIResponseState: () => IAIResponseState;
|
|
9
|
-
export declare const useAIResponseDispatch: () => React.Dispatch<IAIResponseActionType>;
|
|
10
|
-
//# sourceMappingURL=AIResponseContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AIResponseContext.d.ts","sourceRoot":"","sources":["../../../src/context/AIResponseContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAA0B,MAAM,mCAAmC,CAAC;AAKpH,eAAO,MAAM,sBAAsB,iCAAgE,CAAC;AACpG,eAAO,MAAM,yBAAyB,sDACgD,CAAC;AAEvF,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAUpF;AAGD,eAAO,MAAM,kBAAkB,wBAM9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,6CAMjC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { useReducer } from 'react';
|
|
2
|
-
import { initialAIResponseState } from '../reducers/AIResponseConstNTypes';
|
|
3
|
-
import { aiResponseReducer } from '../reducers/AIResponseReducer';
|
|
4
|
-
const initialDispatchContext = () => { };
|
|
5
|
-
export const AIResponseStateContext = React.createContext(initialAIResponseState);
|
|
6
|
-
export const AIResponseDispatchContext = React.createContext(initialDispatchContext);
|
|
7
|
-
export function AIResponseContextProvider({ children }) {
|
|
8
|
-
const [aiResponseState, aiResponseDispatch] = useReducer(aiResponseReducer, initialAIResponseState);
|
|
9
|
-
return (React.createElement(AIResponseStateContext.Provider, { value: aiResponseState },
|
|
10
|
-
React.createElement(AIResponseDispatchContext.Provider, { value: aiResponseDispatch }, children)));
|
|
11
|
-
}
|
|
12
|
-
// Custom hooks for easy access
|
|
13
|
-
export const useAIResponseState = () => {
|
|
14
|
-
const context = React.useContext(AIResponseStateContext);
|
|
15
|
-
if (context === undefined) {
|
|
16
|
-
throw new Error('useAIResponseState must be used within a AIResponseContextProvider');
|
|
17
|
-
}
|
|
18
|
-
return context;
|
|
19
|
-
};
|
|
20
|
-
export const useAIResponseDispatch = () => {
|
|
21
|
-
const context = React.useContext(AIResponseDispatchContext);
|
|
22
|
-
if (context === undefined) {
|
|
23
|
-
throw new Error('useAIResponseDispatch must be used within a AIResponseContextProvider');
|
|
24
|
-
}
|
|
25
|
-
return context;
|
|
26
|
-
};
|