Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Adds filter change to the chatbot #1494

Merged
merged 6 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/csp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const vimeoCdn = '*.vimeocdn.com'; // used for video preview images
const hotjarCom = '*.hotjar.com';
const hotjarIo = '*.hotjar.io';
const taskAnalytics = '*.taskanalytics.com';
const googleStorage = 'storage.googleapis.com';

const styleSrc = [
navNo,
Expand Down Expand Up @@ -51,7 +52,7 @@ const directives: Partial<CSPDirectives> = {
cdnNavNo,
DATA, // ds-css
],
'img-src': [navNo, vergicScreenSharing, vimeoCdn, hotjarCom, vergicDotCom],
'img-src': [navNo, vergicScreenSharing, vimeoCdn, hotjarCom, vergicDotCom, googleStorage],
'frame-src': [hotjarCom, vimeoPlayer, qbrick],
'connect-src': [navNo, boostChatbot, vergicScreenSharing, hotjarCom, hotjarIo, taskAnalytics],
};
Expand Down
3 changes: 3 additions & 0 deletions src/komponenter/footer/chatbot/ChatbotWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ export const ChatbotWrapper = () => {
domain: isProduction ? '.nav.no' : '.dev.nav.no',
});
});
boost.chatPanel.addEventListener('setFilterValue', function (ev: any) {
boost.chatPanel.setFilterValues(ev.detail.filterValue);
});

if (bufferLoad) {
setBufferLoad(false);
Expand Down