@rh-support/troubleshoot 2.6.20 → 2.6.21

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.
Files changed (73) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -31
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +34 -33
  6. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +1 -2
  8. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +0 -1
  10. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +22 -16
  12. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +95 -52
  14. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +19 -15
  16. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  17. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
  18. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  19. package/lib/esm/components/CaseInformation/Fts.js +2 -6
  20. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  21. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +8 -5
  22. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  23. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -7
  24. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  25. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
  26. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +0 -5
  27. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  28. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +12 -82
  29. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +1 -0
  30. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  31. package/lib/esm/components/shared/input/ContactSelectorInternal.js +6 -1
  32. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  33. package/lib/esm/components/wizardLayout/WizardLayout.js +4 -5
  34. package/lib/esm/components/wizardLayout/WizardMain.d.ts +1 -3
  35. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  36. package/lib/esm/components/wizardLayout/WizardMain.js +9 -115
  37. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +0 -2
  38. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  39. package/lib/esm/components/wizardLayout/WizardNavigation.js +3 -11
  40. package/lib/esm/components/wizardLayout/index.d.ts +0 -1
  41. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  42. package/lib/esm/components/wizardLayout/index.js +0 -1
  43. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  44. package/lib/esm/context/RootTroubleshootProvider.js +6 -8
  45. package/lib/esm/css/case.css +12 -0
  46. package/lib/esm/hooks/useWizard.d.ts +0 -4
  47. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  48. package/lib/esm/hooks/useWizard.js +1 -1
  49. package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -2
  50. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  51. package/lib/esm/reducers/CaseConstNTypes.js +0 -2
  52. package/lib/esm/scss/_main.scss +13 -0
  53. package/lib/esm/scss/_pf-overrides.scss +5 -0
  54. package/package.json +6 -7
  55. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +0 -7
  56. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +0 -1
  57. package/lib/esm/components/TroubleshootSection/AskRedHat.js +0 -73
  58. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +0 -9
  59. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +0 -1
  60. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +0 -9
  61. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +0 -9
  62. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +0 -1
  63. package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +0 -17
  64. package/lib/esm/context/AIResponseContext.d.ts +0 -10
  65. package/lib/esm/context/AIResponseContext.d.ts.map +0 -1
  66. package/lib/esm/context/AIResponseContext.js +0 -26
  67. package/lib/esm/css/AskRedHat.css +0 -283
  68. package/lib/esm/reducers/AIResponseConstNTypes.d.ts +0 -48
  69. package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +0 -1
  70. package/lib/esm/reducers/AIResponseConstNTypes.js +0 -16
  71. package/lib/esm/reducers/AIResponseReducer.d.ts +0 -9
  72. package/lib/esm/reducers/AIResponseReducer.d.ts.map +0 -1
  73. package/lib/esm/reducers/AIResponseReducer.js +0 -43
@@ -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
- };
@@ -1,283 +0,0 @@
1
- .ask-redhat {
2
- padding: 1rem 1rem 2rem;
3
- }
4
-
5
- .ask-redhat-title {
6
- display: flex;
7
- flex-direction: row;
8
- width: 387.666px;
9
- height: 24px;
10
- flex-shrink: 0;
11
- color: #000;
12
- font-family: 'Red Hat Display';
13
- font-size: 16px;
14
- font-style: normal;
15
- font-weight: 600;
16
- line-height: normal;
17
- align-items: center;
18
- gap: 0.5rem;
19
- }
20
-
21
- .ask-redhat-content-wrapper {
22
- position: relative;
23
- }
24
-
25
- .ask-redhat-content {
26
- max-height: 120px;
27
- color: #000;
28
- font-family: 'Red Hat Text';
29
- font-size: 16px;
30
- font-style: normal;
31
- font-weight: 400;
32
- line-height: 24px;
33
- overflow: hidden;
34
- position: relative;
35
- transition: max-height 0.8s ease;
36
- }
37
-
38
- .ask-redhat-content--expanded {
39
- max-height: calc(100vh - 390px);
40
- transition: max-height 0.8s ease !important;
41
- }
42
-
43
- .ask-redhat-content--expanded-scrollable {
44
- max-height: calc(100vh - 500px);
45
- overflow-y: auto;
46
- }
47
-
48
- .ask-redhat-list {
49
- margin-left: 1.5rem;
50
- }
51
-
52
- .ask-redhat-cards {
53
- display: flex;
54
- gap: 1rem;
55
- margin-top: 1rem;
56
- }
57
-
58
- .ask-redhat-card {
59
- flex: 1;
60
- }
61
-
62
- .ask-redhat-card-title {
63
- margin: 0;
64
- }
65
-
66
- .ask-redhat-footer-wrapper {
67
- position: relative;
68
- margin-top: 1rem;
69
- padding-bottom: 3rem;
70
- }
71
-
72
- .ask-redhat-footer {
73
- display: flex;
74
- justify-content: space-between;
75
- align-items: center;
76
- margin: 1.5rem 0 2rem;
77
- }
78
-
79
- .ask-redhat-footer-text {
80
- margin: 0;
81
- }
82
-
83
- :root {
84
- --color-red: var(--Core-color-palette-Red-red-40, #f56e6e);
85
- --color-purple: var(--Secondary-color-palette-Purple-purple-50, #5e40be);
86
- --gradient-red-purple: linear-gradient(90deg, var(--color-red), var(--color-purple));
87
- --gorgey: #f56e6e;
88
- }
89
-
90
- .ask-redhat-chat-button {
91
- width: 129px;
92
- height: 30px;
93
- justify-content: center;
94
- align-items: center !important;
95
- gap: 8px;
96
- flex-shrink: 0;
97
- border-radius: 40px;
98
- background: var(--gradient-red-purple);
99
- color: #000;
100
- text-decoration: none;
101
- transition: all 0.2s ease;
102
- cursor: pointer;
103
- position: relative;
104
- display: flex;
105
- padding: 1px;
106
- }
107
-
108
- .ask-redhat-chat-button svg {
109
- display: flex;
110
- align-items: center;
111
- justify-content: center;
112
- margin: 0;
113
- padding: 0;
114
- vertical-align: middle;
115
- }
116
-
117
- .ask-redhat-chat-button .pf-v6-c-button__text {
118
- display: flex;
119
- align-items: center;
120
- justify-content: center;
121
- line-height: 1;
122
- color: #000;
123
- margin: 0;
124
- padding: 0;
125
- height: 100%;
126
- }
127
-
128
- .ask-redhat-chat-button .pf-v6-c-button__icon {
129
- display: flex;
130
- align-items: center;
131
- justify-content: center;
132
- margin: 0;
133
- padding: 0;
134
- height: 100%;
135
- }
136
-
137
- .ask-redhat-chat-button::before {
138
- content: '';
139
- position: absolute;
140
- top: 1px;
141
- left: 1px;
142
- right: 1px;
143
- bottom: 1px;
144
- background: #fff;
145
- border-radius: 39px;
146
- z-index: 1;
147
- }
148
-
149
- .ask-redhat-chat-button > * {
150
- position: relative;
151
- z-index: 2;
152
- }
153
-
154
- .ask-redhat-chat-button:focus {
155
- outline: none;
156
- box-shadow: 0 0 0 2px rgba(94, 64, 190, 0.2);
157
- }
158
-
159
- .ask-redhat-fade-overlay {
160
- position: absolute;
161
- bottom: 0;
162
- left: 0;
163
- width: 1002px;
164
- height: 147px;
165
- flex-shrink: 0;
166
- background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 80%, #fff 100%);
167
- pointer-events: none;
168
- z-index: 1;
169
- }
170
-
171
- .ask-redhat-toggle-button {
172
- display: flex;
173
- justify-content: center;
174
- align-items: center;
175
- gap: 8px;
176
- flex-shrink: 0;
177
- left: 50%;
178
- width: 211.839px;
179
- height: 40px;
180
- transform: translateX(-50%);
181
- background-color: #fff;
182
- z-index: 3;
183
- background: var(--gradient-red-purple);
184
- padding: 2px;
185
- color: #000;
186
- border-radius: 40px;
187
- }
188
-
189
- .ask-redhat-toggle-button .pf-v6-c-button__text {
190
- display: flex;
191
- align-items: center;
192
- justify-content: center;
193
- line-height: 1;
194
- margin: 0;
195
- padding: 0;
196
- gap: 8px;
197
- color: #000;
198
- }
199
-
200
- .ask-redhat-toggle-button svg {
201
- display: flex;
202
- align-items: center;
203
- justify-content: center;
204
- margin: 0;
205
- padding: 0;
206
- vertical-align: middle;
207
- }
208
-
209
- .ask-redhat-toggle-button::before {
210
- content: '';
211
- position: absolute;
212
- top: 2px;
213
- left: 2px;
214
- right: 2px;
215
- bottom: 2px;
216
- background: #fff;
217
- border-radius: 38px;
218
- z-index: 1;
219
- }
220
-
221
- .ask-redhat-toggle-button > * {
222
- position: relative;
223
- z-index: 2;
224
- }
225
-
226
- .ask-redhat-toggle-button-collapsed {
227
- display: flex;
228
- width: 50px;
229
- height: 24px;
230
- padding: 6px 16px;
231
- justify-content: center;
232
- align-items: center;
233
- gap: 8px;
234
- flex-shrink: 0;
235
- border-radius: 40px;
236
- background: var(--gradient-red-purple);
237
- color: #000;
238
- position: absolute;
239
- left: 50%;
240
- transform: translateX(-50%);
241
- z-index: 3;
242
- }
243
-
244
- .ask-redhat-toggle-button-collapsed::before {
245
- content: '';
246
- position: absolute;
247
- top: 1px;
248
- left: 1px;
249
- right: 1px;
250
- bottom: 1px;
251
- background: #fff;
252
- border-radius: 39px;
253
- z-index: 1;
254
- }
255
-
256
- .ask-redhat-toggle-button-collapsed > * {
257
- position: relative;
258
- z-index: 2;
259
- }
260
-
261
- .ask-redhat-toggle-button-collapsed svg {
262
- display: flex;
263
- align-items: center;
264
- justify-content: center;
265
- margin: 0;
266
- padding: 0;
267
- vertical-align: middle;
268
- line-height: 1;
269
- }
270
-
271
- .ask-redhat-toggle-button-wrapper {
272
- position: relative;
273
- }
274
-
275
- .ask-redhat-border-line {
276
- position: absolute;
277
- top: 50%;
278
- left: 0;
279
- right: 0;
280
- height: 1px;
281
- background: #d2d2d2;
282
- z-index: 1;
283
- }
@@ -1,48 +0,0 @@
1
- import { IARHDirectAPIResponse } from '@ifd-ui/ask-redhat-core';
2
- export interface IActionType {
3
- type: string;
4
- payload?: any;
5
- }
6
- export interface IAIResponseState {
7
- aiResponse: IARHDirectAPIResponse | null;
8
- isLoading: boolean;
9
- error: string | null;
10
- lastUpdated: Date | null;
11
- }
12
- export declare const initialAIResponseState: IAIResponseState;
13
- export declare enum AIResponseConstants {
14
- requestAIResponse = "requestAIResponse",
15
- receivedAIResponse = "receivedAIResponse",
16
- receivedAIResponseError = "receivedAIResponseError",
17
- clearAIResponse = "clearAIResponse",
18
- setAIResponseLoading = "setAIResponseLoading"
19
- }
20
- export interface IRequestAIResponseAction extends IActionType {
21
- type: AIResponseConstants.requestAIResponse;
22
- payload: {
23
- question: string;
24
- };
25
- }
26
- export interface IReceivedAIResponseAction extends IActionType {
27
- type: AIResponseConstants.receivedAIResponse;
28
- payload: {
29
- aiResponse: IARHDirectAPIResponse;
30
- };
31
- }
32
- export interface IReceivedAIResponseErrorAction extends IActionType {
33
- type: AIResponseConstants.receivedAIResponseError;
34
- payload: {
35
- error: string;
36
- };
37
- }
38
- export interface IClearAIResponseAction extends IActionType {
39
- type: AIResponseConstants.clearAIResponse;
40
- }
41
- export interface ISetAIResponseLoadingAction extends IActionType {
42
- type: AIResponseConstants.setAIResponseLoading;
43
- payload: {
44
- isLoading: boolean;
45
- };
46
- }
47
- export type IAIResponseActionType = IRequestAIResponseAction | IReceivedAIResponseAction | IReceivedAIResponseErrorAction | IClearAIResponseAction | ISetAIResponseLoadingAction;
48
- //# sourceMappingURL=AIResponseConstNTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AIResponseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;CAC5B;AAGD,eAAO,MAAM,sBAAsB,EAAE,gBAKpC,CAAC;AAGF,oBAAY,mBAAmB;IAC3B,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,uBAAuB,4BAA4B;IACnD,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;CAChD;AAGD,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IACzD,IAAI,EAAE,mBAAmB,CAAC,iBAAiB,CAAC;IAC5C,OAAO,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL;AAED,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC1D,IAAI,EAAE,mBAAmB,CAAC,kBAAkB,CAAC;IAC7C,OAAO,EAAE;QACL,UAAU,EAAE,qBAAqB,CAAC;KACrC,CAAC;CACL;AAED,MAAM,WAAW,8BAA+B,SAAQ,WAAW;IAC/D,IAAI,EAAE,mBAAmB,CAAC,uBAAuB,CAAC;IAClD,OAAO,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACvD,IAAI,EAAE,mBAAmB,CAAC,eAAe,CAAC;CAC7C;AAED,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC5D,IAAI,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;IAC/C,OAAO,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;KACtB,CAAC;CACL;AAED,MAAM,MAAM,qBAAqB,GAC3B,wBAAwB,GACxB,yBAAyB,GACzB,8BAA8B,GAC9B,sBAAsB,GACtB,2BAA2B,CAAC"}
@@ -1,16 +0,0 @@
1
- // Initial State
2
- export const initialAIResponseState = {
3
- aiResponse: null,
4
- isLoading: false,
5
- error: null,
6
- lastUpdated: null,
7
- };
8
- // Action Constants
9
- export var AIResponseConstants;
10
- (function (AIResponseConstants) {
11
- AIResponseConstants["requestAIResponse"] = "requestAIResponse";
12
- AIResponseConstants["receivedAIResponse"] = "receivedAIResponse";
13
- AIResponseConstants["receivedAIResponseError"] = "receivedAIResponseError";
14
- AIResponseConstants["clearAIResponse"] = "clearAIResponse";
15
- AIResponseConstants["setAIResponseLoading"] = "setAIResponseLoading";
16
- })(AIResponseConstants || (AIResponseConstants = {}));
@@ -1,9 +0,0 @@
1
- import { IARHDirectAPIResponse } from '@ifd-ui/ask-redhat-core';
2
- import { IAIResponseActionType, IAIResponseState } from './AIResponseConstNTypes';
3
- export declare const aiResponseReducer: (state: IAIResponseState, action: IAIResponseActionType) => IAIResponseState;
4
- export declare const requestAIResponse: (question: string) => IAIResponseActionType;
5
- export declare const receivedAIResponse: (aiResponse: IARHDirectAPIResponse) => IAIResponseActionType;
6
- export declare const receivedAIResponseError: (error: string) => IAIResponseActionType;
7
- export declare const clearAIResponse: () => IAIResponseActionType;
8
- export declare const setAIResponseLoading: (isLoading: boolean) => IAIResponseActionType;
9
- //# sourceMappingURL=AIResponseReducer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AIResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,iBAAiB,UACnB,gBAAgB,UACf,qBAAqB,KAC9B,gBA0CF,CAAC;AAGF,eAAO,MAAM,iBAAiB,aAAc,MAAM,KAAG,qBAItB,CAAC;AAEhC,eAAO,MAAM,kBAAkB,eAAgB,qBAAqB,KAAG,qBAIxC,CAAC;AAEhC,eAAO,MAAM,uBAAuB,UAAW,MAAM,KAAG,qBAIzB,CAAC;AAEhC,eAAO,MAAM,eAAe,QAAO,qBAGJ,CAAC;AAEhC,eAAO,MAAM,oBAAoB,cAAe,OAAO,KAAG,qBAI3B,CAAC"}
@@ -1,43 +0,0 @@
1
- import { AIResponseConstants, initialAIResponseState, } from './AIResponseConstNTypes';
2
- export const aiResponseReducer = (state = initialAIResponseState, action) => {
3
- switch (action.type) {
4
- case AIResponseConstants.requestAIResponse: {
5
- return Object.assign(Object.assign({}, state), { isLoading: true, error: null });
6
- }
7
- case AIResponseConstants.receivedAIResponse: {
8
- return Object.assign(Object.assign({}, state), { aiResponse: action.payload.aiResponse, isLoading: false, error: null, lastUpdated: new Date() });
9
- }
10
- case AIResponseConstants.receivedAIResponseError: {
11
- return Object.assign(Object.assign({}, state), { aiResponse: null, isLoading: false, error: action.payload.error, lastUpdated: new Date() });
12
- }
13
- case AIResponseConstants.clearAIResponse: {
14
- return Object.assign({}, initialAIResponseState);
15
- }
16
- case AIResponseConstants.setAIResponseLoading: {
17
- return Object.assign(Object.assign({}, state), { isLoading: action.payload.isLoading });
18
- }
19
- default: {
20
- return state;
21
- }
22
- }
23
- };
24
- // Action Creators
25
- export const requestAIResponse = (question) => ({
26
- type: AIResponseConstants.requestAIResponse,
27
- payload: { question },
28
- });
29
- export const receivedAIResponse = (aiResponse) => ({
30
- type: AIResponseConstants.receivedAIResponse,
31
- payload: { aiResponse },
32
- });
33
- export const receivedAIResponseError = (error) => ({
34
- type: AIResponseConstants.receivedAIResponseError,
35
- payload: { error },
36
- });
37
- export const clearAIResponse = () => ({
38
- type: AIResponseConstants.clearAIResponse,
39
- });
40
- export const setAIResponseLoading = (isLoading) => ({
41
- type: AIResponseConstants.setAIResponseLoading,
42
- payload: { isLoading },
43
- });