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

Commit

Permalink
Merge pull request #1494 from navikt/chatbotFilters
Browse files Browse the repository at this point in the history
Adds filter change to the chatbot
  • Loading branch information
terjeofnorway authored Oct 2, 2023
2 parents b0c6e70 + 277413b commit ff4be44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit ff4be44

Please sign in to comment.