@buerokratt-ria/common-gui-components 0.0.38 → 0.0.40
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Template [MajorVersion.MediterraneanVersion.MinorVersion] - DD-MM-YYYY
|
|
6
6
|
|
|
7
|
+
## [0.0.40] - 30.01.2026
|
|
8
|
+
|
|
9
|
+
- Show Message with event and content as an event message with content text
|
|
10
|
+
|
|
11
|
+
## [0.0.39] - 26.01.2026
|
|
12
|
+
|
|
13
|
+
- Changed initial end date to be the same as the start date
|
|
14
|
+
- Changed empty advisor name to default to 'Bürokratt' instead of '-'
|
|
15
|
+
- Fixed CSA messages display
|
|
16
|
+
|
|
7
17
|
## [0.0.38] - 20.01.2026
|
|
8
18
|
|
|
9
19
|
- Added isFiveRatingScale Handle
|
package/package.json
CHANGED
|
@@ -131,18 +131,14 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({
|
|
|
131
131
|
return new Date(dateString.split("+")[0]);
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
const {control, setValue, watch} = useForm<{
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
const { control, setValue, watch } = useForm<{
|
|
135
|
+
startDate: Date | string;
|
|
136
|
+
endDate: Date | string;
|
|
137
137
|
}>({
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
endDate: passedEndDate
|
|
143
|
-
? parseDateParam(passedEndDate)
|
|
144
|
-
: new Date(new Date().setUTCHours(23, 59, 59, 999)),
|
|
145
|
-
},
|
|
138
|
+
defaultValues: {
|
|
139
|
+
startDate: passedStartDate ? parseDateParam(passedStartDate) : startOfDay(new Date()),
|
|
140
|
+
endDate: passedEndDate ? parseDateParam(passedEndDate) : endOfDay(new Date()),
|
|
141
|
+
},
|
|
146
142
|
});
|
|
147
143
|
|
|
148
144
|
const startDate = watch('startDate');
|
|
@@ -670,7 +666,7 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({
|
|
|
670
666
|
|
|
671
667
|
return filteredNames.join(", ");
|
|
672
668
|
} else {
|
|
673
|
-
return
|
|
669
|
+
return "Bürokratt";
|
|
674
670
|
}
|
|
675
671
|
},
|
|
676
672
|
{
|
|
@@ -14,6 +14,7 @@ const ChatEvent: FC<ChatEventProps> = ({ message }) => {
|
|
|
14
14
|
const { t } = useTranslation();
|
|
15
15
|
const {
|
|
16
16
|
event,
|
|
17
|
+
content,
|
|
17
18
|
authorTimestamp,
|
|
18
19
|
forwardedByUser,
|
|
19
20
|
forwardedFromCsa,
|
|
@@ -208,7 +209,7 @@ const ChatEvent: FC<ChatEventProps> = ({ message }) => {
|
|
|
208
209
|
|
|
209
210
|
return (
|
|
210
211
|
<div className="active-chat__event-message">
|
|
211
|
-
|
|
212
|
+
<p>{content || EVENT_PARAMS}</p>
|
|
212
213
|
</div>
|
|
213
214
|
);
|
|
214
215
|
};
|
|
@@ -146,17 +146,19 @@
|
|
|
146
146
|
#{$self} {
|
|
147
147
|
&__group-header {
|
|
148
148
|
display: flex;
|
|
149
|
-
justify-content: flex-
|
|
149
|
+
justify-content: flex-start;
|
|
150
150
|
align-items: center;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
&__group-initials
|
|
153
|
+
&__group-initials,
|
|
154
|
+
&__group-event-initials {
|
|
154
155
|
background-color: get-color(black-coral-10);
|
|
155
156
|
color: get-color(white);
|
|
156
157
|
position: relative;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
&__group-name
|
|
160
|
+
&__group-name,
|
|
161
|
+
&__group-event-name {
|
|
160
162
|
text-align: left;
|
|
161
163
|
margin-left: 0;
|
|
162
164
|
font-size: $veera-font-size-100;
|
|
@@ -167,7 +169,7 @@
|
|
|
167
169
|
display: flex;
|
|
168
170
|
flex-direction: column;
|
|
169
171
|
gap: 4px;
|
|
170
|
-
align-items: flex-
|
|
172
|
+
align-items: flex-start;
|
|
171
173
|
padding-left: 50px;
|
|
172
174
|
}
|
|
173
175
|
|
|
@@ -189,57 +189,12 @@ const HistoricalChat: FC<ChatProps> = ({
|
|
|
189
189
|
}, [messageGroups]);
|
|
190
190
|
|
|
191
191
|
const isEvent = (group: GroupedMessage) => {
|
|
192
|
-
return (group.type === "event" || group.name.trim() === "" || group.messages.some((message) => message.event &&
|
|
192
|
+
return (group.type === "event" || group.name.trim() === "" || group.messages.some((message) => message.event && message.event !== CHAT_EVENTS.GREETING));
|
|
193
193
|
};
|
|
194
194
|
|
|
195
195
|
const eventGroup = (group: GroupedMessage) => {
|
|
196
196
|
return group.messages.map((message) => {
|
|
197
|
-
|
|
198
|
-
return <ChatEvent key={message.id} message={message} />;
|
|
199
|
-
} else {
|
|
200
|
-
return (
|
|
201
|
-
<div key={message.id}>
|
|
202
|
-
{group.name.trim() && (
|
|
203
|
-
<div className="historical-chat__group-header">
|
|
204
|
-
<div className="historical-chat__group-event-initials">
|
|
205
|
-
{group.type === "buerokratt" || group.type === "chatbot" ? (
|
|
206
|
-
<BykLogoWhite height={24} />
|
|
207
|
-
) : (
|
|
208
|
-
(() => {
|
|
209
|
-
if (group.name) {
|
|
210
|
-
const initials = group.name
|
|
211
|
-
.split(" ")
|
|
212
|
-
.map((n) => n[0])
|
|
213
|
-
.join("")
|
|
214
|
-
.toUpperCase();
|
|
215
|
-
return <>{initials}</>;
|
|
216
|
-
} else {
|
|
217
|
-
return <></>;
|
|
218
|
-
}
|
|
219
|
-
})()
|
|
220
|
-
)}
|
|
221
|
-
</div>
|
|
222
|
-
{group.name && (
|
|
223
|
-
<div className="historical-chat__group-event-name">
|
|
224
|
-
{group.name}
|
|
225
|
-
{group.title.length > 0 && <div className="title">{group.title}</div>}
|
|
226
|
-
</div>
|
|
227
|
-
)}
|
|
228
|
-
</div>
|
|
229
|
-
)}
|
|
230
|
-
<div className="historical-chat__messages">
|
|
231
|
-
<ChatMessage
|
|
232
|
-
message={message}
|
|
233
|
-
key={`${message.id ?? ""}`}
|
|
234
|
-
toastContext={toastContext}
|
|
235
|
-
onMessageClick={(message) => {
|
|
236
|
-
onMessageClick?.(message);
|
|
237
|
-
}}
|
|
238
|
-
/>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
);
|
|
242
|
-
}
|
|
197
|
+
return <ChatEvent key={message.id} message={message} />;
|
|
243
198
|
});
|
|
244
199
|
};
|
|
245
200
|
|