@portnet/ui 5.0.14 → 5.0.16

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.
@@ -78,6 +78,12 @@ const reclamationApi = axiosInstance => ({
78
78
  var _error$response4;
79
79
  throw (error === null || error === void 0 || (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : _error$response4.data) || new Error("Impossible de charger les réclamations");
80
80
  }
81
- }
81
+ },
82
+ cloturerReclamation: id => axiosInstance.patch("/reclamation/".concat(id, "/cloturer")).then(r => r.data),
83
+ reourrirReclamation: (id, formData) => axiosInstance.patch("/reclamation/".concat(id, "/reouvrir"), formData, {
84
+ headers: {
85
+ "Content-Type": "multipart/form-data"
86
+ }
87
+ }).then(r => r.data)
82
88
  });
83
89
  exports.reclamationApi = reclamationApi;
@@ -8,10 +8,13 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  require("core-js/modules/es.array.includes.js");
10
10
  require("core-js/modules/es.promise.js");
11
+ require("core-js/modules/es.regexp.to-string.js");
11
12
  require("core-js/modules/es.string.includes.js");
13
+ require("core-js/modules/es.string.trim.js");
12
14
  require("core-js/modules/esnext.iterator.constructor.js");
13
15
  require("core-js/modules/esnext.iterator.filter.js");
14
16
  require("core-js/modules/esnext.iterator.map.js");
17
+ require("core-js/modules/esnext.iterator.some.js");
15
18
  require("core-js/modules/web.dom-collections.iterator.js");
16
19
  var _formik = require("formik");
17
20
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -106,7 +109,8 @@ const PuiSpecificReferentielField = _ref2 => {
106
109
  getReturnedValue,
107
110
  getRenderedValue,
108
111
  onChange,
109
- onError
112
+ onError,
113
+ requireAtLeastOneCriteria
110
114
  } = _ref2;
111
115
  const {
112
116
  token,
@@ -116,6 +120,7 @@ const PuiSpecificReferentielField = _ref2 => {
116
120
  const axios = (0, _useAxios.default)(token, secret, baseURL);
117
121
  const [dataFetchingState, dataFetchingDispatch] = React.useReducer(dataFetchingReducer, dataFetchingInitalState);
118
122
  const [filtreredFilters, setFiltreredFilters] = React.useState([..._specificReferentielsBaseFilters.default[searchKey]]);
123
+ const [requireCriteriaError, setRequireCriteriaError] = React.useState(false);
119
124
  const formRef = React.useRef();
120
125
  const [isMounted, setIsMounted] = React.useState(false);
121
126
  const pageChangeHandler = pageNumber => {
@@ -125,6 +130,14 @@ const PuiSpecificReferentielField = _ref2 => {
125
130
  });
126
131
  };
127
132
  const submitHandler = async values => {
133
+ if (requireAtLeastOneCriteria) {
134
+ const hasAtLeastOne = Object.values(values).some(v => v !== null && v !== undefined && v.toString().trim() !== "");
135
+ if (!hasAtLeastOne) {
136
+ setRequireCriteriaError(true);
137
+ return;
138
+ }
139
+ }
140
+ setRequireCriteriaError(false);
128
141
  try {
129
142
  dataFetchingDispatch({
130
143
  type: "GET_DATA"
@@ -248,6 +261,16 @@ const PuiSpecificReferentielField = _ref2 => {
248
261
  }, filtreredFilter.name);
249
262
  })
250
263
  })
264
+ }), requireCriteriaError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiGrid.default, {
265
+ item: true,
266
+ xs: 12,
267
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
268
+ style: {
269
+ color: "red",
270
+ fontSize: "0.85rem"
271
+ },
272
+ children: "Veuillez saisir au moins un crit\xE8re de recherche."
273
+ })
251
274
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiGrid.default, {
252
275
  item: true,
253
276
  xs: 12,
@@ -309,7 +332,8 @@ PuiSpecificReferentielField.propTypes = {
309
332
  getRenderedValue: _propTypes.default.func.isRequired,
310
333
  getReturnedValue: _propTypes.default.func,
311
334
  onChange: _propTypes.default.func,
312
- onError: _propTypes.default.func
335
+ onError: _propTypes.default.func,
336
+ requireAtLeastOneCriteria: _propTypes.default.bool
313
337
  };
314
338
  PuiSpecificReferentielField.defaultProps = {
315
339
  disabled: false,
@@ -322,6 +346,7 @@ PuiSpecificReferentielField.defaultProps = {
322
346
  tableProps: {},
323
347
  getReturnedValue: row => row,
324
348
  onError: () => {},
325
- onChange: () => {}
349
+ onChange: () => {},
350
+ requireAtLeastOneCriteria: false
326
351
  };
327
352
  var _default = exports.default = PuiSpecificReferentielField;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/esnext.iterator.for-each.js");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -19,6 +18,7 @@ require("core-js/modules/es.typed-array.sort.js");
19
18
  require("core-js/modules/es.typed-array.to-locale-string.js");
20
19
  require("core-js/modules/esnext.iterator.constructor.js");
21
20
  require("core-js/modules/esnext.iterator.filter.js");
21
+ require("core-js/modules/esnext.iterator.for-each.js");
22
22
  require("core-js/modules/esnext.iterator.map.js");
23
23
  require("core-js/modules/web.dom-collections.iterator.js");
24
24
  require("core-js/modules/web.url.js");
@@ -1499,8 +1499,7 @@ const ReclamationFormModal = _ref4 => {
1499
1499
  })]
1500
1500
  })
1501
1501
  })),
1502
- PopperComponent: CustomPopper // 👈 forces it to stay inside modal
1503
- ,
1502
+ PopperComponent: CustomPopper,
1504
1503
  noOptionsText: "Aucun service trouv\xE9",
1505
1504
  className: "service-autocomplete"
1506
1505
  })]
@@ -1512,18 +1511,7 @@ const ReclamationFormModal = _ref4 => {
1512
1511
  timeout: 500,
1513
1512
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1514
1513
  className: "step-content details-step",
1515
- children: [error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Alert, {
1516
- ref: errorRef,
1517
- severity: "error",
1518
- onClose: () => setError(null),
1519
- style: {
1520
- marginBottom: "15px",
1521
- maxWidth: 400,
1522
- marginLeft: "auto",
1523
- marginRight: "auto"
1524
- },
1525
- children: error
1526
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
1514
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
1527
1515
  variant: "h5",
1528
1516
  className: "step-title",
1529
1517
  gutterBottom: true,
@@ -1583,6 +1571,14 @@ const ReclamationFormModal = _ref4 => {
1583
1571
  fullWidth: true,
1584
1572
  children: "Joindre des fichiers (optionnel)"
1585
1573
  })
1574
+ }), error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Alert, {
1575
+ ref: errorRef,
1576
+ severity: "error",
1577
+ onClose: () => setError(null),
1578
+ style: {
1579
+ marginTop: "12px"
1580
+ },
1581
+ children: error
1586
1582
  }), formData.files.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
1587
1583
  sx: {
1588
1584
  mt: 2,
@@ -1716,6 +1712,9 @@ const ReclamationFormModal = _ref4 => {
1716
1712
  })]
1717
1713
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogContent, {
1718
1714
  className: "modal-content",
1715
+ style: {
1716
+ overflow: activeStep === 1 ? "visible" : "auto"
1717
+ },
1719
1718
  children: renderStepContent()
1720
1719
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
1721
1720
  className: "modal-footer",
@@ -1751,7 +1750,7 @@ const ReclamationFormModal = _ref4 => {
1751
1750
  });
1752
1751
  };
1753
1752
  const ReclamationsList = _ref5 => {
1754
- var _selectedReclamation$, _selectedReclamation$2;
1753
+ var _selectedReclamation$, _selectedReclamation$2, _selectedReclamation$3;
1755
1754
  let {
1756
1755
  onClose
1757
1756
  } = _ref5;
@@ -1761,6 +1760,27 @@ const ReclamationsList = _ref5 => {
1761
1760
  const [page, setPage] = (0, _react.useState)(1);
1762
1761
  const [search, setSearch] = (0, _react.useState)();
1763
1762
  const [searchKey, setSearchKey] = (0, _react.useState)("");
1763
+ const STATUT_REPONDUE = "REPONDUE";
1764
+ const STATUT_COLOR_MAP = {
1765
+ EN_ATTENTE: "#2196F3",
1766
+ EN_COURS: "#FF9800",
1767
+ REPONDUE: "#9C27B0",
1768
+ REOUVERTE: "#FF5722",
1769
+ CLOTUREE: "#4CAF50",
1770
+ TRAITE: "#4CAF50"
1771
+ };
1772
+ const STATUT_ICON_MAP = {
1773
+ EN_ATTENTE: "🕐",
1774
+ EN_COURS: "⚙️",
1775
+ REPONDUE: "💬",
1776
+ REOUVERTE: "🔄",
1777
+ CLOTUREE: "🔒"
1778
+ };
1779
+ const getStatusColorByCode = code => STATUT_COLOR_MAP[(code || "").toUpperCase()] || "#757575";
1780
+ const [reouvreDialogOpen, setReouvreDialogOpen] = (0, _react.useState)(false);
1781
+ const [reouvreDescription, setReouvreDescription] = (0, _react.useState)("");
1782
+ const [reouvreFiles, setReouvreFiles] = (0, _react.useState)([]);
1783
+ const reouvreFileInputRef = (0, _react.useRef)(null);
1764
1784
  const {
1765
1785
  data: reclamations,
1766
1786
  isFetching,
@@ -1771,14 +1791,27 @@ const ReclamationsList = _ref5 => {
1771
1791
  isLoading: isDownloading,
1772
1792
  error: errorDownloadDocument
1773
1793
  } = (0, _useReclamation.useDownloadDocument)();
1794
+ const {
1795
+ mutate: clotureReclamation,
1796
+ isLoading: isCloturing
1797
+ } = (0, _useReclamation.useClotureReclamation)();
1798
+ const {
1799
+ mutate: reouvreReclamation,
1800
+ isLoading: isReouvring
1801
+ } = (0, _useReclamation.useReouvreReclamation)();
1774
1802
  const getStatusColor = statut => {
1775
- switch (statut.toLowerCase()) {
1803
+ switch ((statut || "").toLowerCase()) {
1776
1804
  case "traité":
1805
+ case "cloturee":
1777
1806
  return "#4CAF50";
1778
1807
  case "en cours":
1779
1808
  return "#FF9800";
1780
1809
  case "en attente":
1781
1810
  return "#2196F3";
1811
+ case "repondue":
1812
+ return "#9C27B0";
1813
+ case "reouverte":
1814
+ return "#FF5722";
1782
1815
  default:
1783
1816
  return "#757575";
1784
1817
  }
@@ -1791,6 +1824,61 @@ const ReclamationsList = _ref5 => {
1791
1824
  setDetailsDialogOpen(false);
1792
1825
  setSelectedReclamation(null);
1793
1826
  };
1827
+ const handleCloturer = () => {
1828
+ if (!(selectedReclamation !== null && selectedReclamation !== void 0 && selectedReclamation.id)) return;
1829
+ clotureReclamation(selectedReclamation.id, {
1830
+ onSuccess: () => {
1831
+ queryClient.invalidateQueries("reclamations");
1832
+ handleCloseDetails();
1833
+ _reactToastify.toast.success("Réclamation clôturée avec succès.");
1834
+ },
1835
+ onError: err => {
1836
+ var _err$response$data$me2, _err$response2;
1837
+ const msg = (_err$response$data$me2 = (_err$response2 = err.response) === null || _err$response2 === void 0 || (_err$response2 = _err$response2.data) === null || _err$response2 === void 0 ? void 0 : _err$response2.message) !== null && _err$response$data$me2 !== void 0 ? _err$response$data$me2 : "Une erreur est survenue lors de la clôture.";
1838
+ _reactToastify.toast.error(msg);
1839
+ }
1840
+ });
1841
+ };
1842
+ const handleOpenReouvreDialog = () => {
1843
+ setReouvreDescription("");
1844
+ setReouvreFiles([]);
1845
+ setReouvreDialogOpen(true);
1846
+ };
1847
+ const handleCloseReouvreDialog = () => {
1848
+ setReouvreDialogOpen(false);
1849
+ setReouvreDescription("");
1850
+ setReouvreFiles([]);
1851
+ };
1852
+ const handleReouvreFileSelect = e => {
1853
+ const selected = Array.from(e.target.files);
1854
+ setReouvreFiles(prev => [...prev, ...selected]);
1855
+ e.target.value = "";
1856
+ };
1857
+ const handleRemoveReouvreFile = index => {
1858
+ setReouvreFiles(prev => prev.filter((_, i) => i !== index));
1859
+ };
1860
+ const handleSubmitReouvreture = () => {
1861
+ if (!(selectedReclamation !== null && selectedReclamation !== void 0 && selectedReclamation.id) || !reouvreDescription.trim()) return;
1862
+ const formData = new FormData();
1863
+ formData.append("description", reouvreDescription.trim());
1864
+ reouvreFiles.forEach(file => formData.append("files", file));
1865
+ reouvreReclamation({
1866
+ id: selectedReclamation.id,
1867
+ formData
1868
+ }, {
1869
+ onSuccess: () => {
1870
+ queryClient.invalidateQueries("reclamations");
1871
+ handleCloseReouvreDialog();
1872
+ handleCloseDetails();
1873
+ _reactToastify.toast.success("Réclamation réouverte avec succès.");
1874
+ },
1875
+ onError: err => {
1876
+ var _err$response$data$me3, _err$response3;
1877
+ const msg = (_err$response$data$me3 = (_err$response3 = err.response) === null || _err$response3 === void 0 || (_err$response3 = _err$response3.data) === null || _err$response3 === void 0 ? void 0 : _err$response3.message) !== null && _err$response$data$me3 !== void 0 ? _err$response$data$me3 : "Une erreur est survenue lors de la réouverture.";
1878
+ _reactToastify.toast.error(msg);
1879
+ }
1880
+ });
1881
+ };
1794
1882
  const formatDate = dateString => {
1795
1883
  const date = new Date(dateString);
1796
1884
  return date.toLocaleDateString("fr-FR", {
@@ -1839,7 +1927,8 @@ const ReclamationsList = _ref5 => {
1839
1927
  flex: 1,
1840
1928
  display: "flex",
1841
1929
  flexDirection: "column",
1842
- backgroundColor: "#f5f5f5"
1930
+ backgroundColor: "#f5f5f5",
1931
+ minHeight: 0
1843
1932
  },
1844
1933
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1845
1934
  style: {
@@ -1956,7 +2045,8 @@ const ReclamationsList = _ref5 => {
1956
2045
  style: {
1957
2046
  flex: 1,
1958
2047
  overflowY: "auto",
1959
- padding: "8px"
2048
+ padding: "8px",
2049
+ minHeight: 0
1960
2050
  },
1961
2051
  children: isFetching ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1962
2052
  style: {
@@ -2446,17 +2536,431 @@ const ReclamationsList = _ref5 => {
2446
2536
  })]
2447
2537
  }, document.id || index))
2448
2538
  })]
2539
+ }), (selectedReclamation === null || selectedReclamation === void 0 || (_selectedReclamation$3 = selectedReclamation.statusHistories) === null || _selectedReclamation$3 === void 0 ? void 0 : _selectedReclamation$3.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2540
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2541
+ style: {
2542
+ fontSize: "11px",
2543
+ color: "#999",
2544
+ fontWeight: "600",
2545
+ marginBottom: "16px",
2546
+ textTransform: "uppercase",
2547
+ letterSpacing: "0.5px",
2548
+ fontFamily: WIDGET_FONT
2549
+ },
2550
+ children: "Historique des statuts"
2551
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2552
+ style: {
2553
+ position: "relative",
2554
+ paddingLeft: "24px"
2555
+ },
2556
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2557
+ style: {
2558
+ position: "absolute",
2559
+ left: "8px",
2560
+ top: "6px",
2561
+ bottom: "6px",
2562
+ width: "2px",
2563
+ backgroundColor: "#e0e0e0"
2564
+ }
2565
+ }), selectedReclamation.statusHistories.map((entry, index) => {
2566
+ var _entry$documents;
2567
+ const color = getStatusColorByCode(entry.statutApresCode);
2568
+ const isLast = index === selectedReclamation.statusHistories.length - 1;
2569
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2570
+ style: {
2571
+ position: "relative",
2572
+ marginBottom: isLast ? 0 : "20px"
2573
+ },
2574
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2575
+ style: {
2576
+ position: "absolute",
2577
+ left: "-20px",
2578
+ top: "4px",
2579
+ width: "12px",
2580
+ height: "12px",
2581
+ borderRadius: "50%",
2582
+ backgroundColor: color,
2583
+ border: "2px solid white",
2584
+ boxShadow: "0 0 0 2px ".concat(color)
2585
+ }
2586
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2587
+ style: {
2588
+ backgroundColor: "#f8f9fa",
2589
+ borderRadius: "8px",
2590
+ border: "1px solid ".concat(color, "22"),
2591
+ padding: "12px"
2592
+ },
2593
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2594
+ style: {
2595
+ display: "flex",
2596
+ justifyContent: "space-between",
2597
+ alignItems: "flex-start",
2598
+ marginBottom: entry.commentaire ? "10px" : 0
2599
+ },
2600
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2601
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2602
+ style: {
2603
+ display: "flex",
2604
+ alignItems: "center",
2605
+ gap: "6px",
2606
+ marginBottom: "2px"
2607
+ },
2608
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2609
+ style: {
2610
+ fontSize: "11px"
2611
+ },
2612
+ children: STATUT_ICON_MAP[entry.statutApresCode] || "📋"
2613
+ }), entry.statutAvantCode && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
2614
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2615
+ style: {
2616
+ fontSize: "11px",
2617
+ color: getStatusColorByCode(entry.statutAvantCode),
2618
+ fontWeight: "600",
2619
+ fontFamily: WIDGET_FONT
2620
+ },
2621
+ children: entry.statutAvantLibelle
2622
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2623
+ style: {
2624
+ fontSize: "11px",
2625
+ color: "#999"
2626
+ },
2627
+ children: "\u2192"
2628
+ })]
2629
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2630
+ style: {
2631
+ fontSize: "11px",
2632
+ color,
2633
+ fontWeight: "700",
2634
+ fontFamily: WIDGET_FONT
2635
+ },
2636
+ children: entry.statutApresLibelle
2637
+ })]
2638
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2639
+ style: {
2640
+ fontSize: "11px",
2641
+ color: "#999",
2642
+ fontFamily: WIDGET_FONT
2643
+ },
2644
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
2645
+ children: [entry.changedByNom ? entry.changedByNom : "Service Odoo", " \xB7 "]
2646
+ }), formatDate(entry.dateChangement)]
2647
+ })]
2648
+ })
2649
+ }), entry.commentaire && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2650
+ style: {
2651
+ fontSize: "13px",
2652
+ color: "#333",
2653
+ lineHeight: "1.5",
2654
+ fontFamily: WIDGET_FONT,
2655
+ backgroundColor: "white",
2656
+ padding: "8px 10px",
2657
+ borderRadius: "6px",
2658
+ border: "1px solid #e0e0e0",
2659
+ whiteSpace: "pre-line"
2660
+ },
2661
+ children: entry.commentaire
2662
+ }), ((_entry$documents = entry.documents) === null || _entry$documents === void 0 ? void 0 : _entry$documents.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2663
+ style: {
2664
+ marginTop: "8px",
2665
+ display: "flex",
2666
+ flexDirection: "column",
2667
+ gap: "6px"
2668
+ },
2669
+ children: entry.documents.map((doc, di) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2670
+ style: {
2671
+ display: "flex",
2672
+ alignItems: "center",
2673
+ gap: "8px",
2674
+ padding: "6px 10px",
2675
+ backgroundColor: "white",
2676
+ borderRadius: "6px",
2677
+ border: "1px solid #e0e0e0",
2678
+ cursor: isDownloading ? "not-allowed" : "pointer",
2679
+ opacity: isDownloading ? 0.6 : 1
2680
+ },
2681
+ onClick: () => !isDownloading && handleDownload(doc.documentGuid, doc.documentName),
2682
+ onMouseEnter: e => {
2683
+ if (!isDownloading) e.currentTarget.style.backgroundColor = "#f0f0f0";
2684
+ },
2685
+ onMouseLeave: e => {
2686
+ if (!isDownloading) e.currentTarget.style.backgroundColor = "white";
2687
+ },
2688
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
2689
+ icon: _freeSolidSvgIcons.faPaperclip,
2690
+ style: {
2691
+ color: "var(--primary-color, #222f67)",
2692
+ fontSize: "12px"
2693
+ }
2694
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2695
+ style: {
2696
+ flex: 1,
2697
+ fontSize: "12px",
2698
+ color: "#333",
2699
+ fontFamily: WIDGET_FONT
2700
+ },
2701
+ children: doc.documentName
2702
+ }), isDownloading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
2703
+ size: 12,
2704
+ style: {
2705
+ color: "var(--primary-color, #222f67)"
2706
+ }
2707
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
2708
+ icon: _freeSolidSvgIcons.faDownload,
2709
+ style: {
2710
+ color: "var(--primary-color, #222f67)",
2711
+ fontSize: "12px"
2712
+ }
2713
+ })]
2714
+ }, doc.id || di))
2715
+ })]
2716
+ })]
2717
+ }, entry.id || index);
2718
+ })]
2719
+ })]
2449
2720
  })]
2450
2721
  })
2451
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogActions, {
2722
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, {
2452
2723
  sx: {
2453
2724
  padding: "16px 24px",
2454
2725
  borderTop: "1px solid #e0e0e0",
2455
- backgroundColor: "#f8f9fa"
2726
+ backgroundColor: "#f8f9fa",
2727
+ gap: "8px"
2456
2728
  },
2457
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2729
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2458
2730
  onClick: handleCloseDetails,
2731
+ variant: "outlined",
2732
+ sx: {
2733
+ color: "var(--primary-color, #222f67)",
2734
+ borderColor: "var(--primary-color, #222f67)",
2735
+ padding: "5.5px 23px",
2736
+ borderRadius: "6px",
2737
+ fontWeight: "500",
2738
+ fontSize: "14px",
2739
+ textTransform: "none",
2740
+ boxShadow: "none",
2741
+ "&:hover": {
2742
+ borderColor: "var(--primary-color, #222f67)",
2743
+ backgroundColor: "rgba(34, 47, 103, 0.05)",
2744
+ boxShadow: "none"
2745
+ }
2746
+ },
2747
+ children: "Fermer"
2748
+ }), (selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.statutCode) === STATUT_REPONDUE && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
2749
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2750
+ variant: "contained",
2751
+ onClick: handleCloturer,
2752
+ disabled: isCloturing,
2753
+ sx: {
2754
+ backgroundColor: "#e53935",
2755
+ color: "white",
2756
+ padding: "5.5px 23px",
2757
+ borderRadius: "6px",
2758
+ fontWeight: "500",
2759
+ fontSize: "14px",
2760
+ textTransform: "none",
2761
+ boxShadow: "none",
2762
+ "&:hover": {
2763
+ backgroundColor: "#c62828",
2764
+ boxShadow: "none"
2765
+ },
2766
+ "&:disabled": {
2767
+ backgroundColor: "#ef9a9a",
2768
+ boxShadow: "none"
2769
+ }
2770
+ },
2771
+ children: isCloturing ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
2772
+ size: 16,
2773
+ sx: {
2774
+ color: "white"
2775
+ }
2776
+ }) : "Clôturer"
2777
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2778
+ variant: "contained",
2779
+ onClick: handleOpenReouvreDialog,
2780
+ sx: {
2781
+ backgroundColor: "var(--primary-color, #222f67)",
2782
+ color: "white",
2783
+ padding: "5.5px 23px",
2784
+ borderRadius: "6px",
2785
+ fontWeight: "500",
2786
+ fontSize: "14px",
2787
+ textTransform: "none",
2788
+ boxShadow: "none",
2789
+ "&:hover": {
2790
+ backgroundColor: "var(--secondary-color, #2d3d7f)",
2791
+ boxShadow: "none"
2792
+ }
2793
+ },
2794
+ children: "R\xE9ouverture"
2795
+ })]
2796
+ })]
2797
+ })]
2798
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Dialog, {
2799
+ open: reouvreDialogOpen,
2800
+ onClose: handleCloseReouvreDialog,
2801
+ maxWidth: "sm",
2802
+ fullWidth: true,
2803
+ PaperProps: {
2804
+ sx: {
2805
+ borderRadius: 3,
2806
+ boxShadow: "0 8px 32px rgba(0,0,0,0.12)"
2807
+ }
2808
+ },
2809
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogTitle, {
2810
+ sx: {
2811
+ backgroundColor: "#f8f9fa",
2812
+ borderBottom: "1px solid #e0e0e0",
2813
+ display: "flex",
2814
+ justifyContent: "space-between",
2815
+ alignItems: "center",
2816
+ padding: "20px 24px"
2817
+ },
2818
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2819
+ style: {
2820
+ display: "flex",
2821
+ alignItems: "center",
2822
+ gap: "12px"
2823
+ },
2824
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
2825
+ icon: _freeSolidSvgIcons.faReply,
2826
+ style: {
2827
+ color: "var(--primary-color, #222f67)",
2828
+ fontSize: "18px"
2829
+ }
2830
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2831
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
2832
+ component: "div",
2833
+ sx: {
2834
+ fontWeight: "700",
2835
+ fontSize: "16px",
2836
+ margin: 0
2837
+ },
2838
+ children: "R\xE9ouverture de la r\xE9clamation"
2839
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
2840
+ component: "div",
2841
+ sx: {
2842
+ color: "#666",
2843
+ fontSize: "12px",
2844
+ marginTop: "3px"
2845
+ },
2846
+ children: selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.reference
2847
+ })]
2848
+ })]
2849
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
2850
+ onClick: handleCloseReouvreDialog,
2851
+ size: "small",
2852
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.Close, {
2853
+ fontSize: "small"
2854
+ })
2855
+ })]
2856
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogContent, {
2857
+ sx: {
2858
+ padding: "24px",
2859
+ display: "flex",
2860
+ flexDirection: "column",
2861
+ gap: "20px"
2862
+ },
2863
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
2864
+ label: "Description",
2865
+ placeholder: "D\xE9crivez la raison de la r\xE9ouverture...",
2866
+ value: reouvreDescription,
2867
+ onChange: e => setReouvreDescription(e.target.value),
2868
+ multiline: true,
2869
+ rows: 5,
2870
+ fullWidth: true,
2871
+ required: true,
2872
+ variant: "outlined",
2873
+ inputProps: {
2874
+ maxLength: 500
2875
+ },
2876
+ sx: {
2877
+ mt: 1,
2878
+ "& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": {
2879
+ borderColor: "var(--primary-color, #222f67)"
2880
+ },
2881
+ "& .MuiInputLabel-root.Mui-focused": {
2882
+ color: "var(--primary-color, #222f67)"
2883
+ }
2884
+ }
2885
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2886
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
2887
+ type: "file",
2888
+ ref: reouvreFileInputRef,
2889
+ style: {
2890
+ display: "none"
2891
+ },
2892
+ onChange: handleReouvreFileSelect,
2893
+ accept: ".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif",
2894
+ multiple: true
2895
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2896
+ variant: "outlined",
2897
+ startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.AttachFile, {}),
2898
+ onClick: () => {
2899
+ var _reouvreFileInputRef$;
2900
+ return (_reouvreFileInputRef$ = reouvreFileInputRef.current) === null || _reouvreFileInputRef$ === void 0 ? void 0 : _reouvreFileInputRef$.click();
2901
+ },
2902
+ sx: {
2903
+ borderRadius: "8px",
2904
+ border: "2px dashed var(--primary-color, #222f67)",
2905
+ color: "var(--primary-color, #222f67)",
2906
+ fontWeight: "600",
2907
+ textTransform: "none",
2908
+ width: "100%",
2909
+ "&:hover": {
2910
+ backgroundColor: "rgba(34, 47, 103, 0.05)",
2911
+ borderStyle: "solid"
2912
+ }
2913
+ },
2914
+ children: "Pi\xE8ces jointes (optionnel)"
2915
+ }), reouvreFiles.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
2916
+ sx: {
2917
+ mt: 1,
2918
+ display: "flex",
2919
+ flexWrap: "wrap",
2920
+ gap: 1
2921
+ },
2922
+ children: reouvreFiles.map((file, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Chip, {
2923
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.AttachFile, {}),
2924
+ label: file.name,
2925
+ onDelete: () => handleRemoveReouvreFile(index),
2926
+ sx: {
2927
+ borderRadius: "8px"
2928
+ },
2929
+ color: "primary",
2930
+ variant: "outlined"
2931
+ }, index))
2932
+ })]
2933
+ })]
2934
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, {
2935
+ sx: {
2936
+ padding: "16px 24px",
2937
+ borderTop: "1px solid #e0e0e0",
2938
+ backgroundColor: "#f8f9fa",
2939
+ gap: "8px"
2940
+ },
2941
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2942
+ onClick: handleCloseReouvreDialog,
2943
+ variant: "outlined",
2944
+ sx: {
2945
+ color: "var(--primary-color, #222f67)",
2946
+ borderColor: "var(--primary-color, #222f67)",
2947
+ padding: "5.5px 23px",
2948
+ borderRadius: "6px",
2949
+ fontWeight: "500",
2950
+ fontSize: "14px",
2951
+ textTransform: "none",
2952
+ boxShadow: "none",
2953
+ "&:hover": {
2954
+ borderColor: "var(--primary-color, #222f67)",
2955
+ backgroundColor: "rgba(34, 47, 103, 0.05)",
2956
+ boxShadow: "none"
2957
+ }
2958
+ },
2959
+ children: "Annuler"
2960
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
2459
2961
  variant: "contained",
2962
+ onClick: handleSubmitReouvreture,
2963
+ disabled: !reouvreDescription.trim() || isReouvring,
2460
2964
  sx: {
2461
2965
  backgroundColor: "var(--primary-color, #222f67)",
2462
2966
  color: "white",
@@ -2464,16 +2968,24 @@ const ReclamationsList = _ref5 => {
2464
2968
  borderRadius: "6px",
2465
2969
  fontWeight: "500",
2466
2970
  fontSize: "14px",
2467
- fontFamily: WIDGET_FONT,
2468
2971
  textTransform: "none",
2469
2972
  boxShadow: "none",
2470
2973
  "&:hover": {
2471
2974
  backgroundColor: "var(--secondary-color, #2d3d7f)",
2472
2975
  boxShadow: "none"
2976
+ },
2977
+ "&:disabled": {
2978
+ backgroundColor: "rgba(34, 47, 103, 0.4)",
2979
+ boxShadow: "none"
2473
2980
  }
2474
2981
  },
2475
- children: "Fermer"
2476
- })
2982
+ children: isReouvring ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
2983
+ size: 16,
2984
+ sx: {
2985
+ color: "white"
2986
+ }
2987
+ }) : "Confirmer la réouverture"
2988
+ })]
2477
2989
  })]
2478
2990
  })]
2479
2991
  });
@@ -2512,7 +3024,7 @@ const TijariaChatbot = selectedConversation => {
2512
3024
  return () => iframe.removeEventListener("load", handleLoad);
2513
3025
  }, []);
2514
3026
  (0, _react.useEffect)(() => {
2515
- console.log("selectedConversation", selectedConversation);
3027
+ // console.log("selectedConversation", selectedConversation);
2516
3028
  const iframe = iframeRef.current;
2517
3029
  const handleSelect = () => {
2518
3030
  iframe.contentWindow.postMessage({
@@ -3200,8 +3712,16 @@ const PuiHelpWidget = _ref7 => {
3200
3712
  },
3201
3713
  },*/
3202
3714
  {
3715
+ icon: _freeSolidSvgIcons.faCommentDots,
3716
+ title: "TijarIA",
3717
+ id: "tijaria",
3718
+ action: () => {
3719
+ setViewingTijariaHistory(false);
3720
+ setViewingReclamations(false);
3721
+ }
3722
+ }, {
3203
3723
  icon: _freeSolidSvgIcons.faComments,
3204
- title: "Mes Conversations",
3724
+ title: "Historique TijarIA",
3205
3725
  id: "mes-conversations",
3206
3726
  action: () => {
3207
3727
  setViewingTijariaHistory(true);
@@ -3532,52 +4052,11 @@ const PuiHelpWidget = _ref7 => {
3532
4052
  "aria-hidden": "true"
3533
4053
  })
3534
4054
  })]
3535
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
4055
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
3536
4056
  style: {
3537
4057
  padding: "8px"
3538
4058
  },
3539
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
3540
- onClick: handleContactClick,
3541
- onKeyDown: e => {
3542
- if (e.key === "Enter" || e.key === " ") {
3543
- e.preventDefault();
3544
- handleContactClick();
3545
- }
3546
- },
3547
- tabIndex: 0,
3548
- sx: {
3549
- borderRadius: 1,
3550
- mb: 0.5,
3551
- py: 1.5,
3552
- "&:hover": {
3553
- backgroundColor: "var(--primary-alpha-8, rgba(34, 47, 103, 0.08))"
3554
- },
3555
- "&:focus": {
3556
- backgroundColor: "var(--primary-alpha-8, rgba(34, 47, 103, 0.08))",
3557
- outline: "2px solid var(--primary-color, #222f67)",
3558
- outlineOffset: "2px"
3559
- }
3560
- },
3561
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ListItemIcon, {
3562
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.Email, {
3563
- fontSize: "small",
3564
- sx: {
3565
- color: "var(--primary-color, #222f67)"
3566
- },
3567
- "aria-hidden": "true"
3568
- })
3569
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ListItemText, {
3570
- primary: "Contacter le support",
3571
- secondary: "Envoyez-nous un email",
3572
- primaryTypographyProps: {
3573
- fontSize: "14px",
3574
- fontWeight: "500"
3575
- },
3576
- secondaryTypographyProps: {
3577
- fontSize: "12px"
3578
- }
3579
- })]
3580
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
4059
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
3581
4060
  onClick: () => {
3582
4061
  window.open("tel:+212520473100", "_self");
3583
4062
  handleContactUsMenuClose();
@@ -3622,7 +4101,7 @@ const PuiHelpWidget = _ref7 => {
3622
4101
  fontSize: "12px"
3623
4102
  }
3624
4103
  })]
3625
- })]
4104
+ })
3626
4105
  })]
3627
4106
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ReclamationFormModal, {
3628
4107
  open: reclamationModalOpen,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useListServiceReclamation = exports.useListReclamation = exports.useDownloadDocument = exports.useCreateReclamation = void 0;
6
+ exports.useReouvreReclamation = exports.useListServiceReclamation = exports.useListReclamation = exports.useDownloadDocument = exports.useCreateReclamation = exports.useClotureReclamation = void 0;
7
7
  var _reactQuery = require("react-query");
8
8
  var _PuiHelpWidgetContext = require("../components/common/PuiHelpWidgetContext");
9
9
  const useListReclamation = (page, search) => {
@@ -65,4 +65,24 @@ const useListServiceReclamation = () => {
65
65
  refetchOnReconnect: false
66
66
  });
67
67
  };
68
- exports.useListServiceReclamation = useListServiceReclamation;
68
+ exports.useListServiceReclamation = useListServiceReclamation;
69
+ const useClotureReclamation = () => {
70
+ const {
71
+ reclamationApi
72
+ } = (0, _PuiHelpWidgetContext.useHelpWidget)();
73
+ return (0, _reactQuery.useMutation)(id => reclamationApi.cloturerReclamation(id));
74
+ };
75
+ exports.useClotureReclamation = useClotureReclamation;
76
+ const useReouvreReclamation = () => {
77
+ const {
78
+ reclamationApi
79
+ } = (0, _PuiHelpWidgetContext.useHelpWidget)();
80
+ return (0, _reactQuery.useMutation)(_ref => {
81
+ let {
82
+ id,
83
+ formData
84
+ } = _ref;
85
+ return reclamationApi.reourrirReclamation(id, formData);
86
+ });
87
+ };
88
+ exports.useReouvreReclamation = useReouvreReclamation;
@@ -14,6 +14,7 @@
14
14
 
15
15
  .reclamation-modal .MuiPaper-root {
16
16
  margin: 0;
17
+ overflow: visible !important;
17
18
  }
18
19
 
19
20
 
@@ -100,7 +101,7 @@
100
101
  min-height: 300px;
101
102
  background-color: white;
102
103
  flex: 1 1 auto;
103
- overflow-y: auto;
104
+ overflow: hidden;
104
105
  overflow-x: hidden;
105
106
  display: flex;
106
107
  justify-content: center;
@@ -109,6 +110,8 @@
109
110
  .reclamation-modal .step-content {
110
111
  max-width: 600px;
111
112
  margin: 0 auto;
113
+ overflow: visible;
114
+ max-height: 100%;
112
115
  }
113
116
 
114
117
  .reclamation-modal .step-title {
@@ -163,7 +166,6 @@
163
166
  .reclamation-modal .service-autocomplete {
164
167
  width: 384px !important;
165
168
  max-width: 100%;
166
- height: 230px;
167
169
  }
168
170
 
169
171
  .reclamation-modal .service-autocomplete .MuiOutlinedInput-root {
@@ -192,7 +194,6 @@
192
194
  border-width: 2px;
193
195
  }
194
196
 
195
- /* --- Listbox (Dropdown) Styling --- */
196
197
  .reclamation-modal .service-listbox {
197
198
  max-height: 300px;
198
199
  border-radius: 12px;
@@ -206,6 +207,11 @@
206
207
  right: 0 !important;
207
208
  }
208
209
 
210
+ .reclamation-modal .service-autocomplete .MuiAutocomplete-listbox {
211
+ max-height: 160px;
212
+ overflow-y: auto;
213
+ }
214
+
209
215
  /* --- Option Items --- */
210
216
  .reclamation-modal .service-option {
211
217
  padding: 14px 16px;
@@ -218,10 +224,8 @@
218
224
 
219
225
  .reclamation-modal .service-option .MuiTypography-root {
220
226
  display: -webkit-box;
221
- -webkit-line-clamp: 2;
222
227
  -webkit-box-orient: vertical;
223
228
  overflow: hidden;
224
- text-overflow: ellipsis;
225
229
  word-break: break-word;
226
230
  }
227
231
 
@@ -462,7 +466,7 @@
462
466
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
463
467
  margin: 24px 0;
464
468
  border: 2px solid #cccc;
465
- box-shadow:none;
469
+ box-shadow: none;
466
470
  }
467
471
 
468
472
  .success-modal .reference-number {
@@ -545,6 +549,11 @@
545
549
  align-items: center !important;
546
550
  gap: 8px !important;
547
551
  transition: background-color 0.2s !important;
552
+ min-height: 48px !important;
553
+ margin-bottom: 4px !important;
554
+ line-height: 1.8 !important;
555
+ border-bottom: 1px solid #f0f0f0 !important;
556
+
548
557
  }
549
558
 
550
559
  .MuiAutocomplete-popper .MuiAutocomplete-option:hover {
@@ -566,4 +575,55 @@
566
575
  border-radius: 50%;
567
576
  background-color: var(--primary-color, #222f67);
568
577
  flex-shrink: 0;
578
+ }
579
+
580
+ /* Responsive mobile - fix centrage uniquement */
581
+ @media (max-width: 576px) {
582
+
583
+ .reclamation-modal .modal-header {
584
+ padding: 16px !important;
585
+ }
586
+
587
+ .reclamation-modal .header-title {
588
+ font-size: 16px !important;
589
+ }
590
+
591
+ .reclamation-modal .progress-section {
592
+ padding: 12px 16px !important;
593
+ }
594
+
595
+ .reclamation-modal .stepper .MuiStepLabel-label {
596
+ font-size: 10px !important;
597
+ }
598
+
599
+ .reclamation-modal .modal-content {
600
+ padding: 16px !important;
601
+ }
602
+
603
+ .reclamation-modal .step-title {
604
+ font-size: 18px !important;
605
+ }
606
+
607
+ /* Fix centrage autocomplete */
608
+ .reclamation-modal .service-autocomplete {
609
+ width: 100% !important;
610
+ height: auto !important;
611
+ }
612
+
613
+ .reclamation-modal .step-content {
614
+ width: 100% !important;
615
+ max-width: 100% !important;
616
+ }
617
+
618
+ .reclamation-modal .modal-footer {
619
+ padding: 12px 16px !important;
620
+ }
621
+
622
+ .reclamation-modal .next-button,
623
+ .reclamation-modal .submit-button {
624
+ padding: 10px 20px !important;
625
+ }
626
+ }
627
+ .MuiAutocomplete-popper .MuiAutocomplete-option:last-child {
628
+ border-bottom: none !important;
569
629
  }
@@ -98,7 +98,7 @@
98
98
  .help-widget-sidebar {
99
99
  width: 100vw;
100
100
  right: -100vw;
101
- overflow-y: auto;
101
+ overflow: hidden;
102
102
  }
103
103
  .help-widget-sidebar.open {
104
104
  right: 0;
@@ -449,7 +449,7 @@
449
449
  width: 100vw;
450
450
  right: -100vw;
451
451
  border-radius: 0;
452
- overflow-y: auto;
452
+ overflow: hidden;
453
453
  }
454
454
 
455
455
  .help-widget-sidebar.open {
package/package.json CHANGED
@@ -1,114 +1,110 @@
1
- {
2
- "name": "@portnet/ui",
3
- "version": "5.0.14",
4
- "description": "Portnet UI",
5
- "keywords": [
6
- "react",
7
- "components",
8
- "ui"
9
- ],
10
- "main": "dist/index.js",
11
- "private": false,
12
- "files": [
13
- "dist",
14
- "README.md"
15
- ],
16
- "dependencies": {
17
- "@emotion/react": "^11.10.5",
18
- "@emotion/styled": "^11.10.5",
19
- "@fortawesome/fontawesome-svg-core": "^6.4.2",
20
- "@fortawesome/free-regular-svg-icons": "^7.1.0",
21
- "@fortawesome/free-solid-svg-icons": "^6.4.2",
22
- "@fortawesome/react-fontawesome": "^0.2.0",
23
- "@mui/icons-material": "^5.10.16",
24
- "@mui/lab": "^5.0.0-alpha.60",
25
- "@mui/material": "^5.10.16",
26
- "@mui/x-data-grid": "^5.17.26",
27
- "@mui/x-data-grid-pro": "^5.17.26",
28
- "@mui/x-date-pickers": "^5.0.4",
29
- "@reduxjs/toolkit": "^2.11.2",
30
- "@testing-library/jest-dom": "^5.16.5",
31
- "@testing-library/react": "^13.4.0",
32
- "@testing-library/user-event": "^13.5.0",
33
- "axios": "^1.13.2",
34
- "bootstrap": "^5.3.2",
35
- "formik": "^2.2.9",
36
- "lodash": "^4.17.21",
37
- "moment": "^2.30.1",
38
- "react": "^18.2.0",
39
- "react-dom": "^18.2.0",
40
- "react-query": "^3.39.3",
41
- "react-redux": "^8.0.5",
42
- "react-scripts": "^5.0.1",
43
- "react-toastify": "^9.1.3",
44
- "react-transition-group": "^4.4.5",
45
- "reactstrap": "^9.2.0",
46
- "styled-components": "^6.1.3",
47
- "uuid": "^9.0.0",
48
- "web-vitals": "^2.1.4",
49
- "yup": "^0.32.11"
50
- },
51
- "scripts": {
52
- "start": "react-scripts start",
53
- "build": "rimraf dist && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files",
54
- "test": "react-scripts test",
55
- "eject": "react-scripts eject",
56
- "storybook": "storybook dev -p 6006 -s public",
57
- "build-storybook": "storybook build -s public"
58
- },
59
- "eslintConfig": {
60
- "extends": [
61
- "react-app",
62
- "react-app/jest"
63
- ],
64
- "overrides": [
65
- {
66
- "files": [
67
- "**/*.stories.*"
68
- ],
69
- "rules": {
70
- "import/no-anonymous-default-export": "off"
71
- }
72
- }
73
- ]
74
- },
75
- "browserslist": {
76
- "production": [
77
- ">0.2%",
78
- "not dead",
79
- "not op_mini all"
80
- ],
81
- "development": [
82
- "last 1 chrome version",
83
- "last 1 firefox version",
84
- "last 1 safari version"
85
- ]
86
- },
87
- "devDependencies": {
88
- "@babel/cli": "^7.19.3",
89
- "@babel/core": "^7.20.5",
90
- "@babel/preset-env": "^7.20.2",
91
- "@babel/preset-react": "^7.18.6",
92
- "@storybook/addon-actions": "^7.6.4",
93
- "@storybook/addon-essentials": "^7.6.4",
94
- "@storybook/addon-interactions": "^7.6.4",
95
- "@storybook/addon-links": "^7.6.4",
96
- "@storybook/node-logger": "^7.6.4",
97
- "@storybook/preset-create-react-app": "^7.6.4",
98
- "@storybook/react": "^7.6.4",
99
- "@storybook/react-webpack5": "^7.6.4",
100
- "@storybook/testing-library": "^0.2.2",
101
- "ajv": "^8.17.1",
102
- "ajv-keywords": "^5.1.0",
103
- "cross-env": "^7.0.3",
104
- "husky": "^4.3.8",
105
- "prop-types": "^15.8.1",
106
- "rimraf": "^5.0.5",
107
- "storybook": "^7.6.4",
108
- "webpack": "^5.75.0"
109
- },
110
- "publishConfig": {
111
- "access": "public",
112
- "registry": "https://registry.npmjs.org/"
113
- }
114
- }
1
+ {
2
+ "name": "@portnet/ui",
3
+ "version": "5.0.16",
4
+ "description": "Portnet UI",
5
+ "keywords": [
6
+ "react",
7
+ "components",
8
+ "ui"
9
+ ],
10
+ "main": "dist/index.js",
11
+ "private": false,
12
+ "files": [
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "dependencies": {
17
+ "@emotion/react": "^11.10.5",
18
+ "@emotion/styled": "^11.10.5",
19
+ "@fortawesome/fontawesome-svg-core": "^6.4.2",
20
+ "@fortawesome/free-regular-svg-icons": "^7.1.0",
21
+ "@fortawesome/free-solid-svg-icons": "^6.4.2",
22
+ "@fortawesome/react-fontawesome": "^0.2.0",
23
+ "@mui/icons-material": "^5.10.16",
24
+ "@mui/lab": "^5.0.0-alpha.60",
25
+ "@mui/material": "^5.10.16",
26
+ "@mui/x-data-grid": "^5.17.26",
27
+ "@mui/x-data-grid-pro": "^5.17.26",
28
+ "@mui/x-date-pickers": "^5.0.4",
29
+ "@reduxjs/toolkit": "^2.11.2",
30
+ "@testing-library/jest-dom": "^5.16.5",
31
+ "@testing-library/react": "^13.4.0",
32
+ "@testing-library/user-event": "^13.5.0",
33
+ "axios": "^1.13.2",
34
+ "bootstrap": "^5.3.2",
35
+ "formik": "^2.2.9",
36
+ "lodash": "^4.17.21",
37
+ "moment": "^2.30.1",
38
+ "react": "^18.2.0",
39
+ "react-dom": "^18.2.0",
40
+ "react-query": "^3.39.3",
41
+ "react-redux": "^8.0.5",
42
+ "react-scripts": "^5.0.1",
43
+ "react-toastify": "^9.1.3",
44
+ "react-transition-group": "^4.4.5",
45
+ "reactstrap": "^9.2.0",
46
+ "styled-components": "^6.1.3",
47
+ "uuid": "^9.0.0",
48
+ "web-vitals": "^2.1.4",
49
+ "yup": "^0.32.11"
50
+ },
51
+ "scripts": {
52
+ "start": "react-scripts start",
53
+ "build": "rimraf dist && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files",
54
+ "test": "react-scripts test",
55
+ "eject": "react-scripts eject",
56
+ "storybook": "storybook dev -p 6006 -s public",
57
+ "build-storybook": "storybook build -s public"
58
+ },
59
+ "eslintConfig": {
60
+ "extends": [
61
+ "react-app",
62
+ "react-app/jest"
63
+ ],
64
+ "overrides": [
65
+ {
66
+ "files": [
67
+ "**/*.stories.*"
68
+ ],
69
+ "rules": {
70
+ "import/no-anonymous-default-export": "off"
71
+ }
72
+ }
73
+ ]
74
+ },
75
+ "browserslist": {
76
+ "production": [
77
+ ">0.2%",
78
+ "not dead",
79
+ "not op_mini all"
80
+ ],
81
+ "development": [
82
+ "last 1 chrome version",
83
+ "last 1 firefox version",
84
+ "last 1 safari version"
85
+ ]
86
+ },
87
+ "devDependencies": {
88
+ "@babel/cli": "^7.19.3",
89
+ "@babel/core": "^7.20.5",
90
+ "@babel/preset-env": "^7.20.2",
91
+ "@babel/preset-react": "^7.18.6",
92
+ "@storybook/addon-actions": "^7.6.4",
93
+ "@storybook/addon-essentials": "^7.6.4",
94
+ "@storybook/addon-interactions": "^7.6.4",
95
+ "@storybook/addon-links": "^7.6.4",
96
+ "@storybook/node-logger": "^7.6.4",
97
+ "@storybook/preset-create-react-app": "^7.6.4",
98
+ "@storybook/react": "^7.6.4",
99
+ "@storybook/react-webpack5": "^7.6.4",
100
+ "@storybook/testing-library": "^0.2.2",
101
+ "ajv": "^8.17.1",
102
+ "ajv-keywords": "^5.1.0",
103
+ "cross-env": "^7.0.3",
104
+ "husky": "^4.3.8",
105
+ "prop-types": "^15.8.1",
106
+ "rimraf": "^5.0.5",
107
+ "storybook": "^7.6.4",
108
+ "webpack": "^5.75.0"
109
+ }
110
+ }