diff --git a/.gitignore b/.gitignore
index 486bc20..1d9a61a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/node_modules/
/public/static/js/
/public/static/css/
+.vscode/settings.json
diff --git a/package-lock.json b/package-lock.json
index c0d855f..a3c54ee 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,16 +11,17 @@
"@emotion/css": "11.11.2",
"@fluentui/react": "^8.109.3",
"@fluentui/react-icons": "^2.0.212",
- "botframework-webchat": "4.15.9",
- "botframework-webchat-core": "4.15.9",
+ "botframework-webchat": "^4.16.0",
+ "botframework-webchat-core": "^4.16.0",
"classnames": "^2.3.2",
- "markdown-it": "13.0.1",
+ "dompurify": "3.0.6",
+ "markdown-it": "^13.0.1",
"markdown-it-attrs": "4.1.6",
"markdown-it-attrs-es5": "2.0.2",
- "markdown-it-for-inline": "0.1.1",
+ "markdown-it-for-inline": "^0.1.1",
"math-random": "^2.0.1",
"mdast": "3.0.0",
- "mdast-util-from-markdown": "2.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
"p-defer": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@@ -29,8 +30,10 @@
"use-ref-from": "^0.0.2"
},
"devDependencies": {
+ "@types/dompurify": "^3.0.5",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
+ "@types/sanitize-html": "^2.9.4",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"concurrently": "^8.2.0",
@@ -63,35 +66,35 @@
}
},
"node_modules/@angular/common": {
- "version": "16.2.2",
- "resolved": "https://registry.npmjs.org/@angular/common/-/common-16.2.2.tgz",
- "integrity": "sha512-2ww8/heDHkfJEBwjakbQeleq610ljcvytNs6ZN1xiXib060xMP+xx17Oa9I3onhi369JsKCHkMR5Qs2U5af1uA==",
+ "version": "17.0.4",
+ "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.0.4.tgz",
+ "integrity": "sha512-/y38PbuiaWOuOmP5ZELTlJSjZGijc6Nq2XQloT5pKsaH935prxPjyWazwlY6cUnJMQgSRU644/ULosDJec7Zxw==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
"engines": {
- "node": "^16.14.0 || >=18.10.0"
+ "node": "^18.13.0 || >=20.9.0"
},
"peerDependencies": {
- "@angular/core": "16.2.2",
+ "@angular/core": "17.0.4",
"rxjs": "^6.5.3 || ^7.4.0"
}
},
"node_modules/@angular/core": {
- "version": "16.2.2",
- "resolved": "https://registry.npmjs.org/@angular/core/-/core-16.2.2.tgz",
- "integrity": "sha512-l6nJlppguroov7eByBIpbxn/mEPcQrL//Ru1TSPzTtXOLR1p41VqPMaeJXj7xYVx7im57YLTDPAjhtLzkUT/Ow==",
+ "version": "17.0.4",
+ "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.0.4.tgz",
+ "integrity": "sha512-zk+z5sYPZd87pLxECx27quB5FvSmoi9PjJlcSlaBwwqaGnh/tPJI14u3q1dRY/CoZgP9egEiwc428+DzvOzJew==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
"engines": {
- "node": "^16.14.0 || >=18.10.0"
+ "node": "^18.13.0 || >=20.9.0"
},
"peerDependencies": {
"rxjs": "^6.5.3 || ^7.4.0",
- "zone.js": "~0.13.0"
+ "zone.js": "~0.14.0"
}
},
"node_modules/@babel/cli": {
@@ -131,11 +134,11 @@
}
},
"node_modules/@babel/code-frame": {
- "version": "7.22.10",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz",
- "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==",
+ "version": "7.22.13",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
+ "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
"dependencies": {
- "@babel/highlight": "^7.22.10",
+ "@babel/highlight": "^7.22.13",
"chalk": "^2.4.2"
},
"engines": {
@@ -252,11 +255,11 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.22.10",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz",
- "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==",
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz",
+ "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==",
"dependencies": {
- "@babel/types": "^7.22.10",
+ "@babel/types": "^7.23.3",
"@jridgewell/gen-mapping": "^0.3.2",
"@jridgewell/trace-mapping": "^0.3.17",
"jsesc": "^2.5.1"
@@ -409,20 +412,20 @@
}
},
"node_modules/@babel/helper-environment-visitor": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz",
- "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+ "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-function-name": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz",
- "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
+ "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
"dependencies": {
- "@babel/template": "^7.22.5",
- "@babel/types": "^7.22.5"
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.23.0"
},
"engines": {
"node": ">=6.9.0"
@@ -572,9 +575,9 @@
}
},
"node_modules/@babel/helper-validator-identifier": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",
- "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"engines": {
"node": ">=6.9.0"
}
@@ -614,11 +617,11 @@
}
},
"node_modules/@babel/highlight": {
- "version": "7.22.10",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz",
- "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==",
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
+ "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"dependencies": {
- "@babel/helper-validator-identifier": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
@@ -691,9 +694,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.22.10",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
- "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz",
+ "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -1861,31 +1864,31 @@
}
},
"node_modules/@babel/template": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz",
- "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==",
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
+ "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"dependencies": {
- "@babel/code-frame": "^7.22.5",
- "@babel/parser": "^7.22.5",
- "@babel/types": "^7.22.5"
+ "@babel/code-frame": "^7.22.13",
+ "@babel/parser": "^7.22.15",
+ "@babel/types": "^7.22.15"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
- "version": "7.22.10",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz",
- "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==",
- "dependencies": {
- "@babel/code-frame": "^7.22.10",
- "@babel/generator": "^7.22.10",
- "@babel/helper-environment-visitor": "^7.22.5",
- "@babel/helper-function-name": "^7.22.5",
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz",
+ "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==",
+ "dependencies": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/generator": "^7.23.3",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
"@babel/helper-hoist-variables": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
- "@babel/parser": "^7.22.10",
- "@babel/types": "^7.22.10",
+ "@babel/parser": "^7.23.3",
+ "@babel/types": "^7.23.3",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -1902,12 +1905,12 @@
}
},
"node_modules/@babel/types": {
- "version": "7.22.10",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
- "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz",
+ "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==",
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
- "@babel/helper-validator-identifier": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -2867,10 +2870,19 @@
"@types/ms": "*"
}
},
+ "node_modules/@types/dompurify": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz",
+ "integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==",
+ "dev": true,
+ "dependencies": {
+ "@types/trusted-types": "*"
+ }
+ },
"node_modules/@types/hoist-non-react-statics": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
- "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz",
+ "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==",
"dependencies": {
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0"
@@ -2934,9 +2946,9 @@
}
},
"node_modules/@types/react-redux": {
- "version": "7.1.26",
- "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.26.tgz",
- "integrity": "sha512-UKPo7Cm7rswYU6PH6CmTNCRv5NYF3HrgKuHEYTK8g/3czYLrUux50gQ2pkxc9c7ZpQZi+PNhgmI8oNIRoiVIxg==",
+ "version": "7.1.30",
+ "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.30.tgz",
+ "integrity": "sha512-i2kqM6YaUwFKduamV6QM/uHbb0eCP8f8ZQ/0yWf+BsAVVsZPRYJ9eeGWZ3uxLfWwwA0SrPRMTPTqsPFkY3HZdA==",
"dependencies": {
"@types/hoist-non-react-statics": "^3.3.0",
"@types/react": "*",
@@ -2944,6 +2956,15 @@
"redux": "^4.0.0"
}
},
+ "node_modules/@types/sanitize-html": {
+ "version": "2.9.4",
+ "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.9.4.tgz",
+ "integrity": "sha512-Ym4hjmAFxF/eux7nW2yDPAj2o9RYh0vP/9V5ECoHtgJ/O9nPGslUd20CMn6WatRMlFVfjMTg3lMcWq8YyO6QnA==",
+ "dev": true,
+ "dependencies": {
+ "htmlparser2": "^8.0.0"
+ }
+ },
"node_modules/@types/scheduler": {
"version": "0.16.3",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz",
@@ -2955,6 +2976,12 @@
"integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==",
"dev": true
},
+ "node_modules/@types/trusted-types": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.6.tgz",
+ "integrity": "sha512-HYtNooPvUY9WAVRBr4u+4Qa9fYD1ze2IUlAD3HoA6oehn1taGwBx3Oa52U4mTslTS+GAExKpaFu39Y5xUEwfjg==",
+ "dev": true
+ },
"node_modules/@types/unist": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz",
@@ -3672,9 +3699,9 @@
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
"node_modules/botframework-directlinejs": {
- "version": "0.15.4",
- "resolved": "https://registry.npmjs.org/botframework-directlinejs/-/botframework-directlinejs-0.15.4.tgz",
- "integrity": "sha512-3pONN5UTz7AzImIwY7LQvnVnUgmFon5OGMwg92l4saz3FuoFNpHO01+xQCDpZfSKPpLEnJA+o6WAzgZP/s6FJQ==",
+ "version": "0.15.5",
+ "resolved": "https://registry.npmjs.org/botframework-directlinejs/-/botframework-directlinejs-0.15.5.tgz",
+ "integrity": "sha512-rzjTORbDsgwyJrj4ZJp+WHBLJeRm1trqHdHrL0M6Xg2rJZi/FVD+/db5VmbHcTOTqHq4dsajMCVGur57Jgf1/w==",
"dependencies": {
"@babel/runtime": "7.14.8",
"botframework-streaming": "4.20.0",
@@ -3724,16 +3751,21 @@
"npm": ">=2.0.0"
}
},
+ "node_modules/botframework-directlinejs/node_modules/url-search-params-polyfill": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/url-search-params-polyfill/-/url-search-params-polyfill-8.1.1.tgz",
+ "integrity": "sha512-KmkCs6SjE6t4ihrfW9JelAPQIIIFbJweaaSLTh/4AO+c58JlDcb+GbdPt8yr5lRcFg4rPswRFRRhBGpWwh0K/Q=="
+ },
"node_modules/botframework-directlinespeech-sdk": {
- "version": "4.15.9",
- "resolved": "https://registry.npmjs.org/botframework-directlinespeech-sdk/-/botframework-directlinespeech-sdk-4.15.9.tgz",
- "integrity": "sha512-ankIP8pNM3FkNw7pTtMuhQ2JiZilPB+WnprydKhashxHuwGL1OOxqF4XTA0vA6fLJG/MbMVo7MDd5AjHRkZueQ==",
+ "version": "4.16.0",
+ "resolved": "https://registry.npmjs.org/botframework-directlinespeech-sdk/-/botframework-directlinespeech-sdk-4.16.0.tgz",
+ "integrity": "sha512-HEf6cED38CdL5/97aGKqJjKC8j+Nr6waF6sRs6gesH4BQICLsRzaC29P/eFZrmbxAs87gpyWMLOTBUOO3g8FoA==",
"dependencies": {
"@babel/runtime": "7.19.0",
"abort-controller": "3.0.0",
"abort-controller-es5": "2.0.1",
"base64-arraybuffer": "1.0.2",
- "core-js": "3.28.0",
+ "core-js": "3.32.1",
"event-as-promise": "1.0.5",
"event-target-shim": "6.0.2",
"math-random": "2.0.1",
@@ -3774,32 +3806,34 @@
}
},
"node_modules/botframework-webchat": {
- "version": "4.15.9",
- "resolved": "https://registry.npmjs.org/botframework-webchat/-/botframework-webchat-4.15.9.tgz",
- "integrity": "sha512-1cUuNaLkDOVbjIia4bCl160EaksbyNZvZ9okqF6UbHFql+dEcFwvYzlKHg39mbcZ0vv75lXUkIrf0IOTrGPzuQ==",
+ "version": "4.16.0",
+ "resolved": "https://registry.npmjs.org/botframework-webchat/-/botframework-webchat-4.16.0.tgz",
+ "integrity": "sha512-EbHmPar003T068m0A6vJag+bJ+3fAyiBaDqi1e2OEt/L+GtAdptgztEZxLECEHPZWm+10FLKvxnPaWAkP/C+yQ==",
"dependencies": {
"@babel/runtime": "7.19.0",
"adaptivecards": "2.11.1",
- "botframework-directlinejs": "0.15.4",
- "botframework-directlinespeech-sdk": "4.15.9",
- "botframework-webchat-api": "4.15.9",
- "botframework-webchat-component": "4.15.9",
- "botframework-webchat-core": "4.15.9",
+ "botframework-directlinejs": "0.15.5",
+ "botframework-directlinespeech-sdk": "4.16.0",
+ "botframework-webchat-api": "4.16.0",
+ "botframework-webchat-component": "4.16.0",
+ "botframework-webchat-core": "4.16.0",
"classnames": "2.3.2",
- "core-js": "3.28.0",
+ "core-js": "3.32.1",
"markdown-it": "13.0.1",
"markdown-it-attrs": "4.1.6",
"markdown-it-attrs-es5": "2.0.2",
"markdown-it-for-inline": "0.1.1",
"math-random": "2.0.1",
+ "mdast": "3.0.0",
+ "mdast-util-from-markdown": "2.0.0",
"memoize-one": "6.0.0",
"microsoft-cognitiveservices-speech-sdk": "1.17.0",
"prop-types": "15.8.1",
- "sanitize-html": "2.10.0",
- "url-search-params-polyfill": "8.1.1",
+ "sanitize-html": "2.11.0",
+ "url-search-params-polyfill": "8.2.4",
"uuid": "8.3.2",
"web-speech-cognitive-services": "7.1.3",
- "whatwg-fetch": "3.6.2"
+ "whatwg-fetch": "3.6.18"
},
"peerDependencies": {
"react": ">= 16.8.6",
@@ -3807,11 +3841,11 @@
}
},
"node_modules/botframework-webchat-api": {
- "version": "4.15.9",
- "resolved": "https://registry.npmjs.org/botframework-webchat-api/-/botframework-webchat-api-4.15.9.tgz",
- "integrity": "sha512-J55o3QTpwCU5dJ7I1S59ZUqSQsOM3qt8o6KT/YZ6Nbg9rmLRKwTPSpLPlcTtfIQLS/8YcnptndjtV2G7vwGwTw==",
+ "version": "4.16.0",
+ "resolved": "https://registry.npmjs.org/botframework-webchat-api/-/botframework-webchat-api-4.16.0.tgz",
+ "integrity": "sha512-KYsKKzQ+wvpc9c/y2QeiykdYvE0DB9eZ7ffHt3ShJ3FMAtPp8rUsAvBFT7WhXcMM16wklJBEuFlgkmyT9OEX/w==",
"dependencies": {
- "botframework-webchat-core": "4.15.9",
+ "botframework-webchat-core": "4.16.0",
"globalize": "1.7.0",
"math-random": "2.0.1",
"prop-types": "15.8.1",
@@ -3825,20 +3859,23 @@
}
},
"node_modules/botframework-webchat-component": {
- "version": "4.15.9",
- "resolved": "https://registry.npmjs.org/botframework-webchat-component/-/botframework-webchat-component-4.15.9.tgz",
- "integrity": "sha512-3GBT6mxhC5mCuYsFREmNDWvuyaf6bJ/t3EBufQjEywsWNoiG/ZHbcEL1v0x9Fl6dzkphTyoIml5jRtBK85LvUg==",
+ "version": "4.16.0",
+ "resolved": "https://registry.npmjs.org/botframework-webchat-component/-/botframework-webchat-component-4.16.0.tgz",
+ "integrity": "sha512-pOzwmst5+3J5cTKFdIRnwGonRoM56vgNJW4diz1qPHFc1enTdBQd5tdBs68B6U8TRbVI4XPk2frAy9OzqZropQ==",
"dependencies": {
- "@emotion/css": "11.10.6",
+ "@emotion/css": "11.11.2",
"base64-js": "1.5.1",
- "botframework-webchat-api": "4.15.9",
- "botframework-webchat-core": "4.15.9",
+ "botframework-webchat-api": "4.16.0",
+ "botframework-webchat-core": "4.16.0",
"classnames": "2.3.2",
"compute-scroll-into-view": "1.0.20",
"event-target-shim": "6.0.2",
"markdown-it": "13.0.1",
"math-random": "2.0.1",
+ "mdast": "3.0.0",
+ "mdast-util-from-markdown": "2.0.0",
"memoize-one": "6.0.0",
+ "merge-refs": "1.2.1",
"prop-types": "15.8.1",
"react-dictate-button": "2.0.1",
"react-film": "3.1.1-main.df870ea",
@@ -3847,40 +3884,17 @@
"react-scroll-to-bottom": "4.2.0",
"redux": "4.2.1",
"simple-update-in": "2.2.0",
- "use-ref-from": "0.0.1"
+ "use-ref-from": "0.0.2"
},
"peerDependencies": {
"react": ">= 16.8.6",
"react-dom": ">= 16.8.6"
}
},
- "node_modules/botframework-webchat-component/node_modules/@emotion/css": {
- "version": "11.10.6",
- "resolved": "https://registry.npmjs.org/@emotion/css/-/css-11.10.6.tgz",
- "integrity": "sha512-88Sr+3heKAKpj9PCqq5A1hAmAkoSIvwEq1O2TwDij7fUtsJpdkV4jMTISSTouFeRvsGvXIpuSuDQ4C1YdfNGXw==",
- "dependencies": {
- "@emotion/babel-plugin": "^11.10.6",
- "@emotion/cache": "^11.10.5",
- "@emotion/serialize": "^1.1.1",
- "@emotion/sheet": "^1.2.1",
- "@emotion/utils": "^1.2.0"
- }
- },
- "node_modules/botframework-webchat-component/node_modules/use-ref-from": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/use-ref-from/-/use-ref-from-0.0.1.tgz",
- "integrity": "sha512-RcY9O6iQGZ7B7Gvr4DBbLJBeZO81J/q+JV+Q6CIflM+ANqevrLA1Hcqy9ApPWHfjt6kHdjQ/081XJmC3hrRkmg==",
- "dependencies": {
- "@babel/runtime-corejs3": "^7.20.7"
- },
- "peerDependencies": {
- "react": ">=16.9.0"
- }
- },
"node_modules/botframework-webchat-core": {
- "version": "4.15.9",
- "resolved": "https://registry.npmjs.org/botframework-webchat-core/-/botframework-webchat-core-4.15.9.tgz",
- "integrity": "sha512-3PiNivy+B9wR0KUbSRi4S9dNzMQaaK7x2YmbM9q0wzatFohcXUSqxep4c+2G7k+EHVYxRq1dV0TcsQUwJPZEQQ==",
+ "version": "4.16.0",
+ "resolved": "https://registry.npmjs.org/botframework-webchat-core/-/botframework-webchat-core-4.16.0.tgz",
+ "integrity": "sha512-9PNoSjeTyza7/YAhwrfQEEP8Q/+GfKn7vk41ropRsXpfagsF1F2YmhkA5xe3lRj1wMOJ4MTw6KlFxsBSMzR95w==",
"dependencies": {
"@babel/runtime": "7.19.0",
"jwt-decode": "3.1.2",
@@ -3890,7 +3904,7 @@
"p-defer-es5": "2.0.1",
"redux": "4.2.1",
"redux-devtools-extension": "2.13.9",
- "redux-saga": "1.2.2",
+ "redux-saga": "1.2.3",
"simple-update-in": "2.2.0"
},
"engines": {
@@ -3929,6 +3943,19 @@
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
},
+ "node_modules/botframework-webchat/node_modules/sanitize-html": {
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.11.0.tgz",
+ "integrity": "sha512-BG68EDHRaGKqlsNjJ2xUB7gpInPA8gVx/mvjO743hZaeMCZ2DwzW7xvsqZ+KNU4QKwj86HJ3uu2liISf2qBBUA==",
+ "dependencies": {
+ "deepmerge": "^4.2.2",
+ "escape-string-regexp": "^4.0.0",
+ "htmlparser2": "^8.0.0",
+ "is-plain-object": "^5.0.0",
+ "parse-srcset": "^1.0.2",
+ "postcss": "^8.3.11"
+ }
+ },
"node_modules/bplist-parser": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
@@ -4245,9 +4272,9 @@
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="
},
"node_modules/core-js": {
- "version": "3.28.0",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.28.0.tgz",
- "integrity": "sha512-GiZn9D4Z/rSYvTeg1ljAIsEqFm0LaN9gVtwDCrKL80zHtS31p9BAjmTxVqTQDMpwlMolJZOFntUG2uwyj7DAqw==",
+ "version": "3.32.1",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.1.tgz",
+ "integrity": "sha512-lqufgNn9NLnESg5mQeYsxQP5w7wrViSj0jr/kv6ECQiByzQkrn1MKvV0L3acttpDqfQrHLwr2KCMgX5b8X+lyQ==",
"hasInstallScript": true,
"funding": {
"type": "opencollective",
@@ -4531,6 +4558,11 @@
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
+ "node_modules/dompurify": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.6.tgz",
+ "integrity": "sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w=="
+ },
"node_modules/domutils": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
@@ -6749,6 +6781,17 @@
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
},
+ "node_modules/merge-refs": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.2.1.tgz",
+ "integrity": "sha512-pRPz39HQz2xzHdXAGvtJ9S8aEpNgpUjzb5yPC3ytozodmsHg+9nqgRs7/YOmn9fM/TLzntAC8AdGTidKxOq9TQ==",
+ "dependencies": {
+ "@types/react": "*"
+ },
+ "funding": {
+ "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1"
+ }
+ },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -7311,9 +7354,9 @@
"dev": true
},
"node_modules/node-fetch": {
- "version": "2.6.12",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
- "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
@@ -7763,9 +7806,9 @@
}
},
"node_modules/postcss": {
- "version": "8.4.28",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz",
- "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==",
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"funding": [
{
"type": "opencollective",
@@ -7966,6 +8009,16 @@
"@emotion/utils": "^1.2.0"
}
},
+ "node_modules/react-film/node_modules/core-js": {
+ "version": "3.28.0",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.28.0.tgz",
+ "integrity": "sha512-GiZn9D4Z/rSYvTeg1ljAIsEqFm0LaN9gVtwDCrKL80zHtS31p9BAjmTxVqTQDMpwlMolJZOFntUG2uwyj7DAqw==",
+ "hasInstallScript": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
"node_modules/react-film/node_modules/regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
@@ -8269,11 +8322,11 @@
}
},
"node_modules/redux-saga": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.2.2.tgz",
- "integrity": "sha512-6xAHWgOqRP75MFuLq88waKK9/+6dCdMQjii2TohDMARVHeQ6HZrZoJ9HZ3dLqMWCZ9kj4iuS6CDsujgnovn11A==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.2.3.tgz",
+ "integrity": "sha512-HDe0wTR5nhd8Xr5xjGzoyTbdAw6rjy1GDplFt3JKtKN8/MnkQSRqK/n6aQQhpw5NI4ekDVOaW+w4sdxPBaCoTQ==",
"dependencies": {
- "@redux-saga/core": "^1.2.2"
+ "@redux-saga/core": "^1.2.3"
}
},
"node_modules/reflect.getprototypeof": {
@@ -9310,9 +9363,9 @@
}
},
"node_modules/url-search-params-polyfill": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/url-search-params-polyfill/-/url-search-params-polyfill-8.1.1.tgz",
- "integrity": "sha512-KmkCs6SjE6t4ihrfW9JelAPQIIIFbJweaaSLTh/4AO+c58JlDcb+GbdPt8yr5lRcFg4rPswRFRRhBGpWwh0K/Q=="
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/url-search-params-polyfill/-/url-search-params-polyfill-8.2.4.tgz",
+ "integrity": "sha512-6jWpuCn5DD+bUuqQK7yIzhE2lxkrDhxCVAj+STTl0DuBGIr3F1ptaIo14KHlngU1w5XmvhwsmH4wzSyyrZK7Tg=="
},
"node_modules/use-ref-from": {
"version": "0.0.2",
@@ -9405,9 +9458,9 @@
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/whatwg-fetch": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",
- "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA=="
+ "version": "3.6.18",
+ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.18.tgz",
+ "integrity": "sha512-ltN7j66EneWn5TFDO4L9inYC1D+Czsxlrw2SalgjMmEMkLfA5SIZxEFdE6QtHFiiM6Q7WL32c7AkI3w6yxM84Q=="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
@@ -9630,9 +9683,9 @@
}
},
"node_modules/zone.js": {
- "version": "0.13.1",
- "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.13.1.tgz",
- "integrity": "sha512-+bIeDAFEBYuXRuU3qGQvzdPap+N1zjM4KkBAiiQuVVCrHrhjDuY6VkUhNa5+U27+9w0q3fbKiMCbpJ0XzMmSWA==",
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.2.tgz",
+ "integrity": "sha512-X4U7J1isDhoOmHmFWiLhloWc2lzMkdnumtfQ1LXzf/IOZp5NQYuMUTaviVzG/q1ugMBIXzin2AqeVJUoSEkNyQ==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
diff --git a/package.json b/package.json
index 570ed4b..7725908 100644
--- a/package.json
+++ b/package.json
@@ -22,16 +22,17 @@
"@emotion/css": "11.11.2",
"@fluentui/react": "^8.109.3",
"@fluentui/react-icons": "^2.0.212",
- "botframework-webchat": "4.15.9",
- "botframework-webchat-core": "4.15.9",
+ "botframework-webchat": "^4.16.0",
+ "botframework-webchat-core": "^4.16.0",
"classnames": "^2.3.2",
- "markdown-it": "13.0.1",
+ "dompurify": "3.0.6",
+ "markdown-it": "^13.0.1",
"markdown-it-attrs": "4.1.6",
"markdown-it-attrs-es5": "2.0.2",
- "markdown-it-for-inline": "0.1.1",
+ "markdown-it-for-inline": "^0.1.1",
"math-random": "^2.0.1",
"mdast": "3.0.0",
- "mdast-util-from-markdown": "2.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
"p-defer": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@@ -40,8 +41,10 @@
"use-ref-from": "^0.0.2"
},
"devDependencies": {
+ "@types/dompurify": "^3.0.5",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
+ "@types/sanitize-html": "^2.9.4",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"concurrently": "^8.2.0",
diff --git a/src/app/data/sampleActivity.ts b/src/app/data/sampleActivity.ts
index f1bc87a..bd312b9 100644
--- a/src/app/data/sampleActivity.ts
+++ b/src/app/data/sampleActivity.ts
@@ -5,9 +5,9 @@ export default {
text: `Sure, you should override the default proxy settings[1]\u200B[2], when your proxy server requires authentication[3]. Here's a fourth citation[4].
[1]: https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1 "Use a proxy server in Windows"
-[2]: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings "Configure proxy server settings - Windows Server"
-[3]: cite:1 "Introduction Configuring proxy settings is a fundamental aspect..."
-[4]: cite:2 "This citation has no name"
+[2]: cite:1 "Introduction Configuring proxy settings is a fundamental aspect..."
+[3]: cite:2 "This citation has no name"
+[4]: cite:foo "Sample HTML"
`,
entities: [
{
@@ -17,11 +17,10 @@ export default {
name: 'Sample Citation From File',
type: 'https://schema.org/Claim',
- text: `Aute Lorem id laboris Lorem do dolor mollit. Officia dolore dolor do culpa nostrud velit officia magna ut aute pariatur excepteur ut cupidatat. Minim minim sunt enim pariatur incididunt eiusmod esse adipisicing do do nulla consequat minim. Exercitation enim adipisicing esse non pariatur duis deserunt eu magna enim amet irure veniam. Minim labore aliquip velit exercitation Lorem exercitation minim excepteur.
-
+ text: `
## Introduction
-*Configuring* **proxy** _settings_ __is__ a fundamental aspect of \`network\` and [system administration](http://example.com). Proxies serve as intermediaries between a user's device and the internet, providing various benefits such as improved security, anonymity, and network performance. In this guide, we will delve into the intricacies of configuring Proxy Auto-Discovery (PAD) proxy settings. We'll explore what PAD is, why it's essential, and how to configure it effectively. []
+*Configuring* **proxy** _settings_ __is__ a fundamental aspect of \`network\` and [system administration](http://example.com). Proxies serve as intermediaries between a user's device and the internet, providing various benefits such as improved security, anonymity, and network performance. In this guide, we will delve into the intricacies of configuring Proxy Auto-Discovery (PAD) proxy settings. We'll explore what PAD is, why it's essential, and how to configure it effectively.
> This is a block quote!
1. first
@@ -31,49 +30,37 @@ export default {
- unordered A
- unordered B
- unordered C
+`
+ },
+ {
+ '@context': 'https://schema.org',
+ '@id': 'cite:foo',
+ '@type': 'Claim',
+ name: 'Sample Citation From HTML',
+ type: 'https://schema.org/Claim',
-***
-
-## Understanding Proxy Auto-Discovery (PAD)
-
-Proxy Auto-Discovery, often abbreviated as PAD, is a mechanism that simplifies the process of configuring proxy settings for network-connected devices. Its primary purpose is to automate the discovery of proxy servers and settings without manual intervention. PAD relies on a specific protocol called Web Proxy Auto-Discovery (WPAD).
-
-## The Importance of Configuring PAD Proxy Settings
-
-Configuring PAD proxy settings is crucial for several reasons:
-
-- Efficiency: PAD eliminates the need for users or administrators to manually configure proxy settings on individual devices. This automation saves time and reduces the risk of configuration errors.
-- Scalability: In large organizations with numerous devices, configuring proxies manually can be a daunting task. PAD simplifies this process, making it manageable even in complex network environments.
-- Consistency: Automated configuration ensures that all devices in the network use consistent proxy settings, reducing potential discrepancies and ensuring uniform security measures.
-- Security: Properly configured proxy settings can enhance network security by filtering and monitoring traffic, blocking malicious websites, and protecting against threats like malware and phishing.
-- Anonymity: For users who require anonymity when browsing, PAD can route traffic through anonymous proxies, safeguarding their identity online.
-
-## Configuring PAD Proxy Settings
-
-Now, let's delve into the steps to configure PAD proxy settings effectively:
-
-- Identify Your Proxy Server: Before configuring PAD, you need to identify the proxy server(s) you want to use. This could be an in-house proxy server or a third-party service.
-- Ensure WPAD Support: Verify that your network environment supports the Web Proxy Auto-Discovery (WPAD) protocol. This typically involves setting up a WPAD server or ensuring that your existing DHCP and DNS servers can provide WPAD information.
-- Create a PAC File: A PAC (Proxy Auto-Configuration) file contains instructions for the device to determine when and how to use the proxy server. You can create a PAC file using a text editor, and it should be hosted on a web server accessible to all devices in your network.
-- Configure DHCP: If your network uses DHCP (Dynamic Host Configuration Protocol), you can configure it to provide the URL of the PAC file to client devices. This simplifies the configuration process as devices will automatically fetch the PAC file.
-- Configure DNS: Similarly, DNS (Domain Name System) can be configured to resolve the WPAD host (e.g., wpad.yourdomain.com) to the location of the PAC file. This allows devices to locate the PAC file without manual intervention.
-- Test Configuration: After configuring DHCP and DNS, it's essential to test the configuration to ensure that devices can access the PAC file correctly. You can do this by attempting to access the PAC file URL from a client device's web browser.
-- Configure Devices: For devices that do not support DHCP or WPAD, you may need to configure proxy settings manually. This typically involves entering the PAC file URL or specifying the proxy server address and port in the device's settings.
-- Monitor and Maintain: Regularly monitor your proxy configuration to ensure that it continues to function correctly. Update the PAC file as needed to reflect changes in your network or proxy server settings.
-
-## Common Challenges and Troubleshooting
-
-While configuring PAD proxy settings, you may encounter some common challenges:
-
-- Firewall Issues: Ensure that your network's firewall rules permit traffic to and from the PAC file server and proxy server(s).
-- DNS Resolution Problems: Verify that DNS is correctly configured to resolve the WPAD host to the PAC file's location.
-- PAC File Errors: Carefully review the PAC file for syntax errors or incorrect instructions that could disrupt the proxy configuration.
-- Device Compatibility: Some devices may not fully support WPAD, requiring manual configuration. Be prepared to address these exceptions.
-- Security Concerns: Maintain robust security measures to prevent unauthorized access to your PAC file or proxy servers.
-
-## Conclusion
-
-Configuring Proxy Auto-Discovery (PAD) proxy settings is a vital task for network administrators seeking to streamline the proxy configuration process and enhance network security. By automating the discovery and configuration of proxy servers, PAD ensures efficiency, consistency, and scalability in network environments. However, it is essential to follow the recommended steps carefully and be prepared to troubleshoot common challenges to maintain a smooth proxy configuration process. Ultimately, a well-configured PAD proxy setup contributes to a more secure, efficient, and user-friendly network environment.
+ text: `
+
Header
+This is some text with a link in it. Also some text with formatting.
+
+- Unordered
+- list
+- items
+
+
+- Ordered
+- list
+- items
+
+
+- Below are some unsafe things that should get sanitized:
+
-
+
+
`
},
{
diff --git a/src/app/ui/ActivityStatus/createActivityStatusMiddleware.tsx b/src/app/ui/ActivityStatus/createActivityStatusMiddleware.tsx
deleted file mode 100644
index 159344d..0000000
--- a/src/app/ui/ActivityStatus/createActivityStatusMiddleware.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import ReactWebChat from 'botframework-webchat';
-
-import ActivityStatus from './private/ActivityStatus';
-
-import { type PropsOf } from '../../types/PropsOf';
-
-type WebChatProps = PropsOf;
-type ActivityStatusMiddleware = Exclude;
-
-const createActivityStatusMiddleware: () => ActivityStatusMiddleware =
- () =>
- () =>
- next =>
- (...args) => {
- const [{ activity }] = args;
- const original = next(...args);
-
- return {original};
- };
-
-export default createActivityStatusMiddleware;
diff --git a/src/app/ui/ActivityStatus/private/ActivityStatus.tsx b/src/app/ui/ActivityStatus/private/ActivityStatus.tsx
deleted file mode 100644
index 43542b5..0000000
--- a/src/app/ui/ActivityStatus/private/ActivityStatus.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import { memo, type PropsWithChildren, type ReactNode, useMemo } from 'react';
-
-import { type WebChatActivity } from 'botframework-webchat-core';
-
-import { isReplyAction, type ReplyAction } from '../../../types/SchemaOrg/ReplyAction';
-import { isThing, type Thing } from '../../../types/SchemaOrg/Thing';
-
-import Feedback from './Feedback/Feedback';
-import Originator from './Originator/Originator';
-import SlottedActivityStatus from './SlottedActivityStatus';
-
-import { type ItemTypeOfArray } from '../../../types/ItemTypeOfArray';
-import { isVoteAction, type VoteAction } from '../../../types/SchemaOrg/VoteAction';
-
-type WebChatEntity = ItemTypeOfArray>;
-
-type DownvoteAction = VoteAction & { actionOption: 'downvote' };
-type UpvoteAction = VoteAction & { actionOption: 'upvote' };
-
-function isDownvoteAction(voteAction: VoteAction): voteAction is DownvoteAction {
- return voteAction.actionOption === 'downvote';
-}
-
-function isUpvoteAction(voteAction: VoteAction): voteAction is UpvoteAction {
- return voteAction.actionOption === 'upvote';
-}
-
-type Props = PropsWithChildren<{ activity: WebChatActivity }>;
-
-const ActivityStatus = memo(({ activity, children }: Props) => {
- const entities = (activity.entities || []) as Array;
-
- const replyAction = entities.find(
- (entity): entity is ReplyAction => isThing(entity) && isReplyAction(entity)
- );
-
- const votes = useMemo(
- () =>
- Object.freeze(
- new Set(
- entities
- .filter(
- (entity): entity is DownvoteAction | UpvoteAction =>
- isThing(entity) && isVoteAction(entity) && (isDownvoteAction(entity) || isUpvoteAction(entity))
- )
- .map(({ actionOption }) => actionOption)
- )
- ),
- [entities]
- );
-
- // TODO: add localized labels for tooltips
-
- return (
-
- {children}
- {useMemo(
- () =>
- [
- replyAction && ,
- votes.size &&
- ].filter(Boolean),
- [replyAction, votes]
- )}
-
- );
-});
-
-ActivityStatus.displayName = 'ActivityStatus';
-
-export default ActivityStatus;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/Feedback.VoteButton.tsx b/src/app/ui/ActivityStatus/private/Feedback/Feedback.VoteButton.tsx
deleted file mode 100644
index aaefeae..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/Feedback.VoteButton.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { memo, useCallback } from 'react';
-import { useRefFrom } from 'use-ref-from';
-
-import ThumbsButton from './private/ThumbButton';
-
-import { type Vote } from './types/Vote';
-
-type Props = {
- onClick?: (vote: Vote) => void;
- pressed: boolean;
- title?: string;
- vote: Vote;
-};
-
-const FeedbackVoteButton = memo(({ onClick, pressed, title, vote }: Props) => {
- const onClickRef = useRefFrom(onClick);
- const voteRef = useRefFrom(vote);
-
- const handleClick = useCallback(() => onClickRef.current?.(voteRef.current), [onClickRef, voteRef]);
-
- return (
-
- );
-});
-
-FeedbackVoteButton.displayName = 'FeedbackVoteButton';
-
-export default FeedbackVoteButton;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/Feedback.css b/src/app/ui/ActivityStatus/private/Feedback/Feedback.css
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/ui/ActivityStatus/private/Feedback/Feedback.tsx b/src/app/ui/ActivityStatus/private/Feedback/Feedback.tsx
deleted file mode 100644
index 0afe212..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/Feedback.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { memo, type PropsWithChildren, useCallback, useState, useEffect, useRef } from 'react';
-
-import FeedbackVoteButton from './Feedback.VoteButton';
-
-import { type Vote } from './types/Vote';
-
-type Props = PropsWithChildren<{
- downvoteTooltip: string;
- upvoteTooltip: string;
- votes: ReadonlySet;
-}>;
-
-const DEBOUNCE_TIMEOUT = 500;
-
-const Feedback = memo(({ downvoteTooltip, upvoteTooltip, votes }: Props) => {
- const [value, setValue] = useState('initial');
-
- const handleChange = useCallback<(vote: Vote) => void>(
- nextVote => setValue(vote => (nextVote === vote ? 'initial' : nextVote)),
- [setValue]
- );
-
- const feedbackPayloadRef = useRef({});
- const postFeedback = console.log.bind(console);
-
- useEffect(() => {
- // In the future, we should handle when the user "uncheck" the vote (`vote === 'unset'`).
- if (value === 'downvote' || value === 'upvote') {
- const timeout = setTimeout(
- () =>
- postFeedback({
- ...feedbackPayloadRef.current,
- category: 'gptanswers',
- userResponse: value === 'downvote' ? 0 : 1
- }),
- DEBOUNCE_TIMEOUT
- );
-
- return () => clearTimeout(timeout);
- }
- }, [feedbackPayloadRef, postFeedback, value]);
-
- return Array.from(votes).map(vote => (
-
- ));
-});
-
-Feedback.displayName = 'ActivityStatusFeedback';
-
-export default Feedback;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.Image.tsx b/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.Image.tsx
deleted file mode 100644
index d02b288..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.Image.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-/*!
- * Copyright (C) Microsoft Corporation. All rights reserved.
- */
-
-import { memo } from 'react';
-
-import ThumbDislike16Filled from './icons/ThumbDislike16Filled';
-import ThumbDislike16Regular from './icons/ThumbDislike16Regular';
-import ThumbLike16Filled from './icons/ThumbLike16Filled';
-import ThumbLike16Regular from './icons/ThumbLike16Regular';
-
-type Props = {
- className?: string;
- direction: 'down' | 'up';
- filled?: boolean;
-};
-
-const ThumbButtonImage = memo(({ className, direction, filled = false }: Props) =>
- direction === 'down' ? (
- filled ? (
-
- ) : (
-
- )
- ) : filled ? (
-
- ) : (
-
- )
-);
-
-ThumbButtonImage.displayName = 'ThumbButtonImage';
-
-export default ThumbButtonImage;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.css b/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.css
deleted file mode 100644
index 7c2b403..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.css
+++ /dev/null
@@ -1,60 +0,0 @@
-.webchat__thumb-button {
- appearance: none;
- background: Transparent;
- border: 0;
- border-radius: 2px;
- height: 16px;
- /* The Fluent icon is larger than the button. We need to clip it.
- Without clipping, hover effect will appear on the edge of the button but not possible to click. */
- overflow: hidden;
- padding: 0;
- width: 16px;
-}
-
-.webchat__thumb-button:active {
- background: var(--pva__palette__neutral-light);
-}
-
-.webchat__thumb-button:focus {
- /* TODO: Verify with designer. This was #767676 (Gray ~120), this is now #8A8886 (Gray 110). */
-
- border: solid 1px var(--pva__palette__neutral-secondary-alt);
-}
-
-.webchat__thumb-button__image {
- /* TODO: Remove "color" if we want a different hover color. */
- color: var(--pva__semantic-colors__link);
- width: 14px;
-}
-
-.webchat__thumb-button:hover
- .webchat__thumb-button__image:not(.webchat__thumb-button__image--is-filled) {
- display: none;
-}
-
-.webchat__thumb-button--is-pressed
- .webchat__thumb-button__image:not(.webchat__thumb-button__image--is-filled) {
- display: none;
-}
-
-.webchat__thumb-button:not(:hover):not(.webchat__thumb-button--is-pressed)
- .webchat__thumb-button__image--is-filled {
- display: none;
-}
-
-/* TODO: We are commenting it out until designer confirm about the new palette. */
-
-/*
-.webchat__thumb-button--is-pressed .webchat__thumb-button__image--is-filled {
- color: var(--pva__palette__theme-primary);
-}
-
-.webchat__thumb-button__image:not(.webchat__thumb-button__image--is-filled) {
- color: #6e6e6e;
-}
-
-.webchat__thumb-button__image--is-filled {
- /* TODO: Verify with designer. This was #C8C8C8, this is now #C8C6C4 (Gray 60). *-/
- color: var(--pva__palette__neutral-tertiary-alt);
-}
-*/
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.tsx b/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.tsx
deleted file mode 100644
index 670bebb..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/ThumbButton.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
- * Copyright (C) Microsoft Corporation. All rights reserved.
- */
-
-import './ThumbButton.css';
-
-import { memo } from 'react';
-import classNames from 'classnames';
-
-import ThumbButtonImage from './ThumbButton.Image';
-
-type Props = {
- direction: 'down' | 'up';
- onClick?: () => void;
- pressed?: boolean;
- title?: string;
-};
-
-const ThumbButton = memo(({ direction, onClick, pressed, title }: Props) => (
-
-));
-
-ThumbButton.displayName = 'ThumbButton';
-
-export default ThumbButton;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.tsx b/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.tsx
deleted file mode 100644
index 1f2ba3d..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { memo } from 'react';
-
-type Props = { className?: string };
-
-const ThumbDislike16Filled = memo(({ className }: Props) => (
-
-));
-
-ThumbDislike16Filled.displayName = 'ThumbDislike16Filled';
-
-export default ThumbDislike16Filled;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.tsx b/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.tsx
deleted file mode 100644
index a41d51d..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { memo } from 'react';
-
-type Props = { className?: string };
-
-const ThumbDislike16Regular = memo(({ className }: Props) => (
-
-));
-
-ThumbDislike16Regular.displayName = 'ThumbDislike16Regular';
-
-export default ThumbDislike16Regular;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.tsx b/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.tsx
deleted file mode 100644
index 5e06bd4..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { memo } from 'react';
-
-type Props = { className?: string };
-
-const ThumbLike16Filled = memo(({ className }: Props) => (
-
-));
-
-ThumbLike16Filled.displayName = 'ThumbLike16Filled';
-
-export default ThumbLike16Filled;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.tsx b/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.tsx
deleted file mode 100644
index 62e9078..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { memo } from 'react';
-
-type Props = { className?: string };
-
-const ThumbLike16Regular = memo(({ className }: Props) => (
-
-));
-
-ThumbLike16Regular.displayName = 'ThumbLike16Regular';
-
-export default ThumbLike16Regular;
diff --git a/src/app/ui/ActivityStatus/private/Feedback/types/Vote.ts b/src/app/ui/ActivityStatus/private/Feedback/types/Vote.ts
deleted file mode 100644
index 5d8d546..0000000
--- a/src/app/ui/ActivityStatus/private/Feedback/types/Vote.ts
+++ /dev/null
@@ -1 +0,0 @@
-export type Vote = 'downvote' | 'error' | 'initial' | 'upvote';
diff --git a/src/app/ui/ActivityStatus/private/Originator/Originator.css b/src/app/ui/ActivityStatus/private/Originator/Originator.css
deleted file mode 100644
index b336fc9..0000000
--- a/src/app/ui/ActivityStatus/private/Originator/Originator.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/* .pva-web-chat__provenance {
- color: var(--pva__accent-color);
- font-family: Calibri, 'Helvetica Neue', Arial, 'sans-serif';
- font-size: 80%;
- padding-top: 5px;
-} */
-
-.webchat__originator-activity-status {
- align-items: center;
- /* These are the fonts used in Web Chat default style options. */
- font-family: Calibri, 'Helvetica Neue', Arial, sans-serif;
- font-size: 80%;
- padding: 1px 1px 2px 1px;
-}
-
-.webchat__originator-activity-status--link {
- color: var(--pva__accent-color);
- /* color: var(--pva__semantic-colors__link); */
-}
-
-.webchat__originator-activity-status--link:hover {
- color: var(--pva__semantic-colors--link-hovered);
-}
-
-.webchat__originator-activity-status--link-hint {
- color: transparent;
- height: 1px;
- overflow: hidden;
- position: absolute;
- top: 0;
- white-space: nowrap;
- width: 1px;
-}
diff --git a/src/app/ui/ActivityStatus/private/Originator/Originator.tsx b/src/app/ui/ActivityStatus/private/Originator/Originator.tsx
deleted file mode 100644
index c96e648..0000000
--- a/src/app/ui/ActivityStatus/private/Originator/Originator.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import './Originator.css';
-
-import { memo } from 'react';
-
-import { type ReplyAction } from '../../../../types/SchemaOrg/ReplyAction';
-
-type Props = { replyAction: ReplyAction };
-
-const Originator = memo(({ replyAction }: Props) => {
- const text = replyAction.description || replyAction.provider?.name;
-
- return replyAction.provider?.url ? (
-
- {text}
-
- ) : (
- {text}
- );
-});
-
-Originator.displayName = 'Originator';
-
-export default Originator;
diff --git a/src/app/ui/ActivityStatus/private/SlottedActivityStatus.css b/src/app/ui/ActivityStatus/private/SlottedActivityStatus.css
deleted file mode 100644
index 412cb2f..0000000
--- a/src/app/ui/ActivityStatus/private/SlottedActivityStatus.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.webchat__slotted-activity-status {
- align-items: center;
- display: flex;
- gap: 4px;
-}
diff --git a/src/app/ui/ActivityStatus/private/SlottedActivityStatus.tsx b/src/app/ui/ActivityStatus/private/SlottedActivityStatus.tsx
deleted file mode 100644
index cfa2a1e..0000000
--- a/src/app/ui/ActivityStatus/private/SlottedActivityStatus.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import './SlottedActivityStatus.css';
-
-import { Children, Fragment, memo, type PropsWithChildren } from 'react';
-import classNames from 'classnames';
-
-type Props = PropsWithChildren<{
- className?: string;
-}>;
-
-const SlottedActivityStatus = memo(({ children, className }: Props) => (
-
- {Children.map(children, (child, index) =>
- index ? (
-
- {'|'}
- {child}
-
- ) : (
- child
- )
- )}
-
-));
-
-SlottedActivityStatus.displayName = 'SlottedActivityStatus';
-
-export default SlottedActivityStatus;
diff --git a/src/app/ui/Chat.tsx b/src/app/ui/Chat.tsx
index eb60040..a3071c1 100644
--- a/src/app/ui/Chat.tsx
+++ b/src/app/ui/Chat.tsx
@@ -4,14 +4,14 @@ import { css } from '@emotion/css';
import { Components, createStore, hooks } from 'botframework-webchat';
import { memo, useEffect, useMemo, useState } from 'react';
-// import ActivityWithReferences from './ActivityWithReferences';
-import CitationWindowProvider from './CitationWindowProvider/CitationWindowProvider';
-import createActivityStatusMiddleware from './ActivityStatus/createActivityStatusMiddleware';
-// @ts-expect-error 7016
+// @ts-expect-error "createDirectLineEmulator" is not typed.
import createDirectLineEmulator from '../createDirectLineEmulator';
-import MarkdownTextActivity from './MarkdownTextActivity/MarkdownTextActivity';
+import TextAttachment from './external/component/Attachment/Text/TextAttachment';
import { type PropsOf } from '../types/PropsOf';
+import { WebChatAttachment } from './external/component/Attachment/private/types/WebChatAttachment';
+import ModalDialogComposer from './external/component/providers/ModalDialog/ModalDialogComposer';
+import renderMarkdownAsHTML from './external/bundle/renderMarkdown/renderMarkdownAsHTML';
const { BasicWebChat, Composer } = Components;
const { useStyleOptions } = hooks;
@@ -38,6 +38,12 @@ const _Chat = memo(function () {
return ;
});
+function isTextAttachment(
+ attachment: WebChatAttachment
+): attachment is WebChatAttachment & { contentType: `text/${string}` } {
+ return attachment.contentType.startsWith('text/');
+}
+
export default memo(function Chat({ activity }: Props) {
const [ready, setReady] = useState(false);
const store = useMemo(
@@ -59,68 +65,55 @@ export default memo(function Chat({ activity }: Props) {
activity && ready && directLine.emulateIncomingActivity(activity);
}, [activity, directLine, ready]);
- // Commented out for now... if we need to use activity middleware, instead of attachment middleware, here is the code.
- // Note the activity middleware will render the timestamp, thus, the reference links will be shown *below* the timestamp, which may not be desirable.
- // const activityMiddleware = useMemo(() => {
- // return () =>
- // next =>
- // (...args) => {
- // const [{ activity }] = args;
-
- // const original = next(...args);
-
- // if (activity.type === 'message') {
- // return (renderAttachment, props) => (
- //
- // {original && original(renderAttachment, props)}
- //
- // );
- // }
-
- // return original;
- // };
- // }, []);
-
const attachmentMiddleware = useMemo(() => {
return () =>
next =>
(...args) => {
- const original = next(...args);
-
- const activity = args[0]?.activity;
-
- // When should we use the middleware with a new/tweaked Markdown engine?
- // - Must be a message from bot
- // - Must be a Markdown message
- // - Must be a generative answer (i.e. check bot entity)
- if (
- activity &&
- activity.from.role === 'bot' &&
- activity.type === 'message' &&
- (!activity.textFormat || activity.textFormat === 'markdown') &&
- activity.entities?.find(entity => '@context' in entity)
- ) {
- return {original};
+ if (!args?.[0]) {
+ return next(...args);
}
- return original;
+ const [
+ {
+ activity,
+ activity: { from: { role = undefined } = {} } = {},
+ attachment,
+ attachment: { contentType = undefined, contentUrl = undefined, thumbnailUrl = undefined } = {}
+ }
+ ] = args;
+
+ const isText = isTextAttachment(attachment);
+
+ return (isText ? !attachment.content : role === 'user' && !thumbnailUrl) ? (
+ next(...args)
+ ) : /^audio\//u.test(contentType || '') ? (
+ next(...args)
+ ) : /^image\//u.test(contentType || '') ? (
+ next(...args)
+ ) : /^video\//u.test(contentType || '') ? (
+ next(...args)
+ ) : contentUrl || contentType === 'application/octet-stream' ? (
+ next(...args)
+ ) : isText ? (
+
+ ) : (
+ next(...args)
+ );
};
}, []);
- const activityStatusMiddleware = useMemo(createActivityStatusMiddleware, []);
-
return (
-
+
<_Chat />
-
+
);
diff --git a/src/app/ui/CitationWindowProvider/CitationWindowProvider.tsx b/src/app/ui/CitationWindowProvider/CitationWindowProvider.tsx
deleted file mode 100644
index 036011e..0000000
--- a/src/app/ui/CitationWindowProvider/CitationWindowProvider.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { memo, type ReactNode, useCallback, useMemo, useState } from 'react';
-
-import CitationWindow from './private/CitationWindow';
-import CitationWindowContext from './private/CitationWindowContext';
-
-import { type ClaimWithText } from './private/types/ClaimWithText';
-import { type ContextOf } from '../../types/ContextOf';
-
-type Context = ContextOf;
-
-type Props = {
- children?: ReactNode | undefined;
-};
-
-export default memo(function CitationWindowProvider({ children }: Props) {
- const [showingClaim, setShowingClaim] = useState();
-
- const handleClose = useCallback(() => {
- setShowingClaim(undefined);
- }, [setShowingClaim]);
-
- const show = useCallback(claim => setShowingClaim(claim), [setShowingClaim]);
-
- const context = useMemo(() => ({ show }), [show]);
-
- return (
-
- {children}
- {showingClaim && }
-
- );
-});
diff --git a/src/app/ui/CitationWindowProvider/private/CitationWindow.css b/src/app/ui/CitationWindowProvider/private/CitationWindow.css
deleted file mode 100644
index 921f445..0000000
--- a/src/app/ui/CitationWindowProvider/private/CitationWindow.css
+++ /dev/null
@@ -1,86 +0,0 @@
-xdiv .mainWindow {
- position: absolute;
- top: 32px;
- left: 32px;
- bottom: 32px;
- right: 32px;
- background-color: #ffffff;
- border: 0.5px solid black;
- border-radius: 4px;
- box-shadow: 8px 8px 8px rgba(0.5, 0.5, 0.5, 0.5);
- font-family: Calibri, 'Helvetica Neue', Arial, 'sans-serif';
- padding: 8px;
- display: flex;
- flex-direction: column;
- word-wrap: normal;
- overflow-y: scroll;
-}
-
-div > button.closeBox {
- align-self: end;
- border-width: 0px;
- background-color: transparent;
- font-size: 1.5em;
- max-height: 1.25em;
- min-width: 1em;
-}
-
-div > button.closeBox:focus {
- border: 2px solid black;
- border-radius: 8px;
-}
-
-span.contents a {
- text-decoration: underline;
-}
-span.contents a::before {
- content: '';
-}
-span.contents a::after {
- content: '';
-}
-
-.webchat__popover {
- height: 100%;
- left: 0;
- position: absolute;
- top: 0;
- width: 100%;
-}
-
-.webchat__popover__box {
- background-color: White;
- border-radius: 4px;
- box-shadow:
- 0 6.4px 14.4px 0 #00000021,
- 0 1.2px 3.6px 0 #0000001a;
- box-sizing: border-box;
- font-family: Calibri, 'Helvetica Neue', Arial, 'sans-serif';
- height: calc(100% - 20px);
- margin: 10px;
- overflow-y: auto;
- padding: 16px;
- top: 0;
- width: calc(100% - 20px);
-}
-
-.webchat__popover__close-button {
- appearance: none;
- background: transparent;
- border: 0;
- float: right;
- padding: 0;
- right: 0;
- max-height: 1.5em;
-}
-
-.webchat__popover__header {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- justify-content: space-between;
-}
-
-.webchat__popover__title {
- max-width: calc(100% - 32px);
-}
\ No newline at end of file
diff --git a/src/app/ui/CitationWindowProvider/private/CitationWindow.tsx b/src/app/ui/CitationWindowProvider/private/CitationWindow.tsx
deleted file mode 100644
index 19a541c..0000000
--- a/src/app/ui/CitationWindowProvider/private/CitationWindow.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { css } from '@emotion/css';
-import { FocusTrapZone } from '@fluentui/react/lib/FocusTrapZone';
-import { hooks } from 'botframework-webchat';
-import { useMemo } from 'react';
-
-import Dismiss16Regular from './Dismiss16Regular';
-
-import './CitationWindow.css';
-
-type Props = {
- text: string;
- title?: string;
- onClose: () => void;
-};
-
-const { useLocalizer, useRenderMarkdownAsHTML, useStyleOptions } = hooks;
-
-const CitationWindow = ({ text, title, onClose: handleClose }: Props) => {
- const [styleOptions] = useStyleOptions();
- const renderMarkdownAsHTML = useRenderMarkdownAsHTML();
-
- const citationWindowOverrides = useMemo(
- () =>
- css({
- '--pva__accent-color': styleOptions.accent,
- '--pva__external-link-icon': styleOptions.markdownExternalLinkIconImage
- }),
- [styleOptions.accent]
- );
-
- const localize = useLocalizer();
-
- const externalLinkAlt = localize('MARKDOWN_EXTERNAL_LINK_ALT');
-
- return (
-
-
-
-
- {title && {title}
}
-
-
-
-
-
- );
-};
-
-export default CitationWindow;
diff --git a/src/app/ui/CitationWindowProvider/private/CitationWindowContext.ts b/src/app/ui/CitationWindowProvider/private/CitationWindowContext.ts
deleted file mode 100644
index 5ec35b1..0000000
--- a/src/app/ui/CitationWindowProvider/private/CitationWindowContext.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { createContext } from 'react';
-
-import { type ClaimWithText } from './types/ClaimWithText';
-
-type ContextType = {
- show(claim: ClaimWithText): void;
-};
-
-const CitationWindowContext = createContext({
- get show(): () => void {
- throw new Error('This property cannot be accessed outside of .');
- }
-});
-
-export default CitationWindowContext;
diff --git a/src/app/ui/CitationWindowProvider/private/Dismiss16Regular.tsx b/src/app/ui/CitationWindowProvider/private/Dismiss16Regular.tsx
deleted file mode 100644
index 1ebfa7a..0000000
--- a/src/app/ui/CitationWindowProvider/private/Dismiss16Regular.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { memo } from 'react';
-
-type Props = { className?: string };
-
-const Dismiss16Regular = memo(({ className }: Props) => (
-
-));
-
-Dismiss16Regular.displayName = 'Dismiss16Regular';
-
-export default Dismiss16Regular;
diff --git a/src/app/ui/CitationWindowProvider/private/types/ClaimWithText.ts b/src/app/ui/CitationWindowProvider/private/types/ClaimWithText.ts
deleted file mode 100644
index 3ca4dfa..0000000
--- a/src/app/ui/CitationWindowProvider/private/types/ClaimWithText.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { Claim } from '../../../../types/SchemaOrg/Claim';
-
-export type ClaimWithText = Claim & { text: string };
diff --git a/src/app/ui/CitationWindowProvider/private/useCitationWindowContext.ts b/src/app/ui/CitationWindowProvider/private/useCitationWindowContext.ts
deleted file mode 100644
index 8d646ac..0000000
--- a/src/app/ui/CitationWindowProvider/private/useCitationWindowContext.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { useContext } from 'react';
-
-import CitationWindowContext from './CitationWindowContext';
-
-import type { ContextOf } from '../../../types/ContextOf';
-
-export default function useCitationWindowContext(): ContextOf {
- return useContext(CitationWindowContext);
-}
diff --git a/src/app/ui/CitationWindowProvider/useShowCitationWindow.ts b/src/app/ui/CitationWindowProvider/useShowCitationWindow.ts
deleted file mode 100644
index e4d3ea4..0000000
--- a/src/app/ui/CitationWindowProvider/useShowCitationWindow.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { useContext } from 'react';
-
-import CitationWindowContext from './private/CitationWindowContext';
-
-import { type ContextOf } from '../../types/ContextOf';
-
-type Context = ContextOf;
-
-export default function useShowCitationWindow(): Context['show'] {
- const context = useContext(CitationWindowContext);
-
- return context.show;
-}
diff --git a/src/app/ui/MarkdownTextActivity/MarkdownTextActivity.css b/src/app/ui/MarkdownTextActivity/MarkdownTextActivity.css
deleted file mode 100644
index fdec03f..0000000
--- a/src/app/ui/MarkdownTextActivity/MarkdownTextActivity.css
+++ /dev/null
@@ -1,33 +0,0 @@
-.webchat__bot-text-activity__link::after {
- content: ']';
-}
-
-.webchat__bot-text-activity__link::before {
- content: '[';
-}
-
-.webchat__bot-text-activity__link--citation {
- appearance: none;
- border: 0;
- background-color: transparent;
- color: var(--pva__accent-color);
- cursor: pointer;
- font-family: inherit;
- font-size: inherit;
- padding: 0;
- white-space: nowrap;
-}
-
-.webchat__bot-text-activity__link--url {
- color: var(--pva__accent-color);
- text-decoration: none;
-}
-
-.pva__generative-answer-markdown__external-icon {
- -webkit-mask-image: var(--pva__external-link-icon);
- mask-image: var(--pva__external-link-icon);
- background-color: LinkText;
- height: 0.75em;
- margin: 0 0.1em;
- width: 0.75em !important; /* Web Chat maximize
, we should fix it there */
-}
diff --git a/src/app/ui/MarkdownTextActivity/MarkdownTextActivity.tsx b/src/app/ui/MarkdownTextActivity/MarkdownTextActivity.tsx
deleted file mode 100644
index 39942fd..0000000
--- a/src/app/ui/MarkdownTextActivity/MarkdownTextActivity.tsx
+++ /dev/null
@@ -1,118 +0,0 @@
-import './MarkdownTextActivity.css';
-
-import { Fragment, memo, type MouseEventHandler, type PropsWithChildren, useCallback, useMemo } from 'react';
-import { hooks } from 'botframework-webchat';
-import classNames from 'classnames';
-
-import { type Claim, isClaim, hasText } from '../../types/SchemaOrg/Claim';
-import { type Thing, isThing } from '../../types/SchemaOrg/Thing';
-import getClaimsFromMarkdown from './private/getClaimsFromMarkdown';
-import getURLProtocol from './private/getURLProtocol';
-import isHTMLButtonElement from './private/LinkDefinitions/private/isHTMLButtonElement';
-import LinkDefinitions from '../MarkdownTextActivity/private/LinkDefinitions/LinkDefinitions';
-import renderMarkdownAsHTML from './private/renderMarkdownAsHTML';
-import useShowCitationWindow from '../CitationWindowProvider/useShowCitationWindow';
-
-import { type ItemTypeOfArray } from '../../types/ItemTypeOfArray';
-import { type PropsOf } from '../../types/PropsOf';
-import { type WebChatActivity } from 'botframework-webchat-core';
-
-const { useLocalizer, useStyleOptions, useStyleSet } = hooks;
-
-type WebChatEntity = ItemTypeOfArray>;
-
-type Props = PropsWithChildren<{
- activity: WebChatActivity &
- // tl;dr must be a Markdown message
- (| {
- type: 'message';
- }
- | {
- textFormat: 'markdown' | undefined;
- type: 'message';
- }
- );
-}>;
-
-type OnCitationClick = PropsOf['onCitationClick'];
-
-const MarkdownTextActivity = memo(({ activity }: Props) => {
- const { text } = activity;
- const entities = (activity.entities || []) as Array;
- const showCitationWindow = useShowCitationWindow();
-
- // Citations are claim with text.
- // We are building a map for quick lookup.
- const citationMap = useMemo