@portnet/ui 5.0.27 → 5.0.29-0
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.
|
@@ -34,6 +34,7 @@ var _reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
|
34
34
|
var _reactToastify = require("react-toastify");
|
|
35
35
|
var _reactstrap = require("reactstrap");
|
|
36
36
|
var _freeRegularSvgIcons = require("@fortawesome/free-regular-svg-icons");
|
|
37
|
+
var _dompurify = _interopRequireDefault(require("dompurify"));
|
|
37
38
|
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
|
|
38
39
|
var _iconsMaterial = require("@mui/icons-material");
|
|
39
40
|
var _material = require("@mui/material");
|
|
@@ -1828,6 +1829,7 @@ const ReclamationsList = _ref5 => {
|
|
|
1828
1829
|
return "#757575";
|
|
1829
1830
|
}
|
|
1830
1831
|
};
|
|
1832
|
+
const isHtml = str => /<\/?[a-z][\s\S]*>/i.test(str);
|
|
1831
1833
|
const renderTextWithLinks = text => {
|
|
1832
1834
|
if (!text) return null;
|
|
1833
1835
|
const parts = text.split(/(https?:\/\/[^\s)]+)/g);
|
|
@@ -2675,7 +2677,19 @@ const ReclamationsList = _ref5 => {
|
|
|
2675
2677
|
marginBottom: "4px"
|
|
2676
2678
|
},
|
|
2677
2679
|
children: "\uD83D\uDCAC R\xE9ponse"
|
|
2678
|
-
}),
|
|
2680
|
+
}), isHtml(entry.reponse) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2681
|
+
style: {
|
|
2682
|
+
whiteSpace: "normal"
|
|
2683
|
+
},
|
|
2684
|
+
dangerouslySetInnerHTML: {
|
|
2685
|
+
__html: _dompurify.default.sanitize(entry.reponse)
|
|
2686
|
+
}
|
|
2687
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2688
|
+
style: {
|
|
2689
|
+
whiteSpace: "pre-line"
|
|
2690
|
+
},
|
|
2691
|
+
children: entry.reponse
|
|
2692
|
+
})]
|
|
2679
2693
|
}), ((_entry$documents = entry.documents) === null || _entry$documents === void 0 ? void 0 : _entry$documents.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2680
2694
|
style: {
|
|
2681
2695
|
marginTop: "8px",
|
|
@@ -3509,6 +3523,15 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3509
3523
|
const [guideData, setGuideData] = (0, _react.useState)(null);
|
|
3510
3524
|
const [faqData, setFaqData] = (0, _react.useState)(null);
|
|
3511
3525
|
const [loadingGuide, setLoadingGuide] = (0, _react.useState)(false);
|
|
3526
|
+
(0, _react.useEffect)(() => {
|
|
3527
|
+
const openNouvelleReclamation = () => {
|
|
3528
|
+
setReclamationModalOpen(true);
|
|
3529
|
+
};
|
|
3530
|
+
window.addEventListener("open-nouvelle-reclamation", openNouvelleReclamation);
|
|
3531
|
+
return () => {
|
|
3532
|
+
window.removeEventListener("open-nouvelle-reclamation", openNouvelleReclamation);
|
|
3533
|
+
};
|
|
3534
|
+
}, []);
|
|
3512
3535
|
(0, _react.useEffect)(() => {
|
|
3513
3536
|
async function fetchGuideData() {
|
|
3514
3537
|
if (!showGuides || !currentProjectCode || !guidesPanelOpen) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portnet/ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.29-0",
|
|
4
4
|
"description": "Portnet UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@testing-library/jest-dom": "^5.16.5",
|
|
31
31
|
"@testing-library/react": "^13.4.0",
|
|
32
32
|
"@testing-library/user-event": "^13.5.0",
|
|
33
|
-
"axios": "^1.13.2",
|
|
34
33
|
"bootstrap": "^5.3.2",
|
|
34
|
+
"dompurify": "^3.4.12",
|
|
35
35
|
"formik": "^2.2.9",
|
|
36
36
|
"lodash": "^4.17.21",
|
|
37
37
|
"moment": "^2.30.1",
|
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
"web-vitals": "^2.1.4",
|
|
49
49
|
"yup": "^0.32.11"
|
|
50
50
|
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"axios": "0.27.2"
|
|
53
|
+
},
|
|
51
54
|
"scripts": {
|
|
52
55
|
"start": "react-scripts start",
|
|
53
56
|
"build": "rimraf dist && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files",
|
|
@@ -100,6 +103,7 @@
|
|
|
100
103
|
"@storybook/testing-library": "^0.2.2",
|
|
101
104
|
"ajv": "^8.17.1",
|
|
102
105
|
"ajv-keywords": "^5.1.0",
|
|
106
|
+
"axios": "^0.27.2",
|
|
103
107
|
"cross-env": "^7.0.3",
|
|
104
108
|
"husky": "^4.3.8",
|
|
105
109
|
"prop-types": "^15.8.1",
|
|
@@ -107,4 +111,4 @@
|
|
|
107
111
|
"storybook": "^7.6.4",
|
|
108
112
|
"webpack": "^5.75.0"
|
|
109
113
|
}
|
|
110
|
-
}
|
|
114
|
+
}
|