@portnet/ui 2.0.9 → 3.0.2
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.
- package/package.json +1 -4
- package/dist/components/buttons/PuiButton.js +0 -146
- package/dist/components/buttons/PuiIconButton.js +0 -99
- package/dist/components/buttons/PuiNewUserButton.js +0 -121
- package/dist/components/common/PuiAlertContext.js +0 -13
- package/dist/components/common/StyledMuiButton.js +0 -49
- package/dist/components/common/StyledMuiTextField.js +0 -157
- package/dist/components/inputs/PuiAutocomplete.js +0 -353
- package/dist/components/inputs/PuiCheckbox.js +0 -310
- package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
- package/dist/components/inputs/PuiCheckboxItem.js +0 -163
- package/dist/components/inputs/PuiDateField.js +0 -281
- package/dist/components/inputs/PuiDateTimeField.js +0 -397
- package/dist/components/inputs/PuiFileField.js +0 -338
- package/dist/components/inputs/PuiRadioGroup.js +0 -198
- package/dist/components/inputs/PuiRadioItem.js +0 -101
- package/dist/components/inputs/PuiSelect.js +0 -425
- package/dist/components/inputs/PuiTextField.js +0 -264
- package/dist/components/others/PuiBadge.js +0 -58
- package/dist/components/others/PuiChip.js +0 -291
- package/dist/components/others/PuiDialog.js +0 -112
- package/dist/components/others/PuiFormikForm.js +0 -71
- package/dist/components/others/PuiGrid.js +0 -23
- package/dist/components/others/PuiIcon.js +0 -93
- package/dist/components/others/PuiLoadingBackdrop.js +0 -32
- package/dist/components/others/PuiMainContainer.js +0 -42
- package/dist/components/others/PuiNavigation.js +0 -69
- package/dist/components/others/PuiSection.js +0 -134
- package/dist/components/others/PuiTooltip.js +0 -87
- package/dist/components/providers/PuiAlertProvider.js +0 -135
- package/dist/components/providers/PuiLocalizationProvider.js +0 -34
- package/dist/components/referentiel/common/ReferetielContext.js +0 -13
- package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
- package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
- package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
- package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
- package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -86
- package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -357
- package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -182
- package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -326
- package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -204
- package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -328
- package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -67
- package/dist/components/tab/PuiTab.js +0 -25
- package/dist/components/tab/PuiTabs.js +0 -149
- package/dist/components/table/ActionPopover.js +0 -56
- package/dist/components/table/PuiTable.js +0 -688
- package/dist/components/table/PuiTableAction.js +0 -65
- package/dist/components/typography/PuiDefinition.js +0 -42
- package/dist/components/typography/PuiIndication.js +0 -81
- package/dist/components/typography/PuiMainTitle.js +0 -88
- package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -255
- package/dist/components/ui/layout/Header.js +0 -253
- package/dist/components/ui/layout/Layout.js +0 -104
- package/dist/components/ui/layout/Sidebar.js +0 -193
- package/dist/components/ui/layout/index.js +0 -29
- package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
- package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
- package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
- package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
- package/dist/components/ui/pages/general/PuiSearchPage.js +0 -436
- package/dist/config/ThemeProvider.js +0 -32
- package/dist/config/apperance.js +0 -26
- package/dist/config/mapping.js +0 -26
- package/dist/config/referentiel.js +0 -10
- package/dist/config/styleUtils.js +0 -135
- package/dist/config/theme.js +0 -183
- package/dist/general/yupValidationErrors.js +0 -8
- package/dist/hooks/useAlert.js +0 -20
- package/dist/hooks/useAxios.js +0 -25
- package/dist/hooks/useQuery.js +0 -21
- package/dist/index.js +0 -434
package/dist/config/apperance.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.palette = void 0;
|
|
7
|
-
const palette = exports.palette = {
|
|
8
|
-
inherit: "inherit",
|
|
9
|
-
primary: "#232f66",
|
|
10
|
-
secondary: "#e7e7e7",
|
|
11
|
-
error: "#d32f2f",
|
|
12
|
-
warning: "#FD9727",
|
|
13
|
-
success: "#48AC24",
|
|
14
|
-
info: "#2278CF",
|
|
15
|
-
white: "#FFF",
|
|
16
|
-
dark: "#000",
|
|
17
|
-
gray: {
|
|
18
|
-
darker: "#505050",
|
|
19
|
-
dark: "#b6b6b6",
|
|
20
|
-
light: "#F1F1F1"
|
|
21
|
-
},
|
|
22
|
-
background: {
|
|
23
|
-
required: "#FFFBE3",
|
|
24
|
-
error: "#FFE5E5"
|
|
25
|
-
}
|
|
26
|
-
};
|
package/dist/config/mapping.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.iconsMapping = exports.iconTypes = void 0;
|
|
7
|
-
var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
|
|
8
|
-
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
9
|
-
var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
|
|
10
|
-
var _Edit = _interopRequireDefault(require("@mui/icons-material/Edit"));
|
|
11
|
-
var _MoreVert = _interopRequireDefault(require("@mui/icons-material/MoreVert"));
|
|
12
|
-
var _Report = _interopRequireDefault(require("@mui/icons-material/Report"));
|
|
13
|
-
var _Search = _interopRequireDefault(require("@mui/icons-material/Search"));
|
|
14
|
-
var _Visibility = _interopRequireDefault(require("@mui/icons-material/Visibility"));
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
const iconsMapping = exports.iconsMapping = {
|
|
17
|
-
recherche: _Search.default,
|
|
18
|
-
supprimer: _Delete.default,
|
|
19
|
-
detail: _Visibility.default,
|
|
20
|
-
modifier: _Edit.default,
|
|
21
|
-
choisir: _Check.default,
|
|
22
|
-
historique: _AccessTime.default,
|
|
23
|
-
danger: _Report.default,
|
|
24
|
-
"voir-plus": _MoreVert.default
|
|
25
|
-
};
|
|
26
|
-
const iconTypes = exports.iconTypes = ["recherche", "supprimer", "detail", "modifier", "choisir", "historique", "danger", "voir-plus"];
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
4
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
5
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.getStripedRowStyles = exports.getLoadingStyles = exports.getHeaderStyles = exports.getFormElementStyles = exports.getContainerStyles = exports.getActionStyles = exports.applyImprovedStyles = void 0;
|
|
10
|
-
var _theme = require("./theme");
|
|
11
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // styleUtils.js - Utilitaires pour appliquer les styles communs à différents composants
|
|
16
|
-
/**
|
|
17
|
-
* Génère des styles pour les éléments de type conteneur (Card, Paper, Section, etc.)
|
|
18
|
-
*/
|
|
19
|
-
const getContainerStyles = exports.getContainerStyles = function getContainerStyles() {
|
|
20
|
-
let additionalStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
|
-
return _objectSpread({
|
|
22
|
-
borderRadius: _theme.commonStyles.sizes.borderRadius,
|
|
23
|
-
border: "1px solid ".concat(_theme.commonStyles.colors.borderMedium),
|
|
24
|
-
boxShadow: _theme.commonStyles.shadows.elevation,
|
|
25
|
-
overflow: 'hidden'
|
|
26
|
-
}, additionalStyles);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Génère des styles pour les en-têtes de composants
|
|
31
|
-
*/
|
|
32
|
-
const getHeaderStyles = exports.getHeaderStyles = function getHeaderStyles() {
|
|
33
|
-
let additionalStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
34
|
-
return _objectSpread({
|
|
35
|
-
backgroundColor: _theme.commonStyles.colors.headerBackground,
|
|
36
|
-
padding: '12px 16px',
|
|
37
|
-
fontWeight: 600,
|
|
38
|
-
fontSize: _theme.commonStyles.typography.fontSizeMedium,
|
|
39
|
-
textTransform: 'uppercase',
|
|
40
|
-
letterSpacing: _theme.commonStyles.typography.letterSpacing,
|
|
41
|
-
borderBottom: "1px solid ".concat(_theme.commonStyles.colors.borderLight),
|
|
42
|
-
minHeight: _theme.commonStyles.sizes.headerHeight,
|
|
43
|
-
display: 'flex',
|
|
44
|
-
alignItems: 'center'
|
|
45
|
-
}, additionalStyles);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Génère des styles pour les boutons et éléments d'action
|
|
50
|
-
*/
|
|
51
|
-
const getActionStyles = exports.getActionStyles = function getActionStyles() {
|
|
52
|
-
let additionalStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
53
|
-
return _objectSpread({
|
|
54
|
-
borderRadius: '4px',
|
|
55
|
-
transition: _theme.commonStyles.transitions.hover,
|
|
56
|
-
fontSize: _theme.commonStyles.typography.fontSizeDefault,
|
|
57
|
-
padding: '6px 12px',
|
|
58
|
-
textTransform: 'none'
|
|
59
|
-
}, additionalStyles);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Génère des styles pour les lignes alternées (données tabulaires, listes, etc.)
|
|
64
|
-
*/
|
|
65
|
-
const getStripedRowStyles = exports.getStripedRowStyles = function getStripedRowStyles() {
|
|
66
|
-
let additionalStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
67
|
-
return _objectSpread({
|
|
68
|
-
transition: _theme.commonStyles.transitions.hover,
|
|
69
|
-
'&:nth-of-type(odd)': {
|
|
70
|
-
backgroundColor: _theme.commonStyles.colors.rowBackgroundOdd
|
|
71
|
-
},
|
|
72
|
-
'&:nth-of-type(even)': {
|
|
73
|
-
backgroundColor: _theme.commonStyles.colors.rowBackgroundEven
|
|
74
|
-
},
|
|
75
|
-
'&:hover': {
|
|
76
|
-
backgroundColor: _theme.commonStyles.colors.hoverBackground,
|
|
77
|
-
boxShadow: "inset 0 0 0 1px ".concat(_theme.commonStyles.colors.borderFocus)
|
|
78
|
-
}
|
|
79
|
-
}, additionalStyles);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Génère des styles pour les éléments de formulaire
|
|
84
|
-
*/
|
|
85
|
-
const getFormElementStyles = exports.getFormElementStyles = function getFormElementStyles() {
|
|
86
|
-
let additionalStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
87
|
-
return _objectSpread({
|
|
88
|
-
fontSize: _theme.commonStyles.typography.fontSizeDefault,
|
|
89
|
-
borderRadius: _theme.commonStyles.sizes.borderRadius,
|
|
90
|
-
'&:focus': {
|
|
91
|
-
boxShadow: "0 0 0 2px ".concat(_theme.commonStyles.colors.borderFocus)
|
|
92
|
-
}
|
|
93
|
-
}, additionalStyles);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Génère des styles pour les états de chargement
|
|
98
|
-
*/
|
|
99
|
-
const getLoadingStyles = exports.getLoadingStyles = function getLoadingStyles() {
|
|
100
|
-
let additionalStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
101
|
-
return _objectSpread({
|
|
102
|
-
animation: 'fadeIn 0.3s ease-in-out',
|
|
103
|
-
'@keyframes fadeIn': {
|
|
104
|
-
'0%': {
|
|
105
|
-
opacity: 0.7
|
|
106
|
-
},
|
|
107
|
-
'100%': {
|
|
108
|
-
opacity: 1
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}, additionalStyles);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Utilitaire pour appliquer les styles améliorés à un composant styled existant
|
|
116
|
-
*/
|
|
117
|
-
const applyImprovedStyles = (originalStyles, componentType) => {
|
|
118
|
-
switch (componentType) {
|
|
119
|
-
case 'container':
|
|
120
|
-
return _objectSpread(_objectSpread({}, originalStyles), getContainerStyles());
|
|
121
|
-
case 'header':
|
|
122
|
-
return _objectSpread(_objectSpread({}, originalStyles), getHeaderStyles());
|
|
123
|
-
case 'action':
|
|
124
|
-
return _objectSpread(_objectSpread({}, originalStyles), getActionStyles());
|
|
125
|
-
case 'row':
|
|
126
|
-
return _objectSpread(_objectSpread({}, originalStyles), getStripedRowStyles());
|
|
127
|
-
case 'form':
|
|
128
|
-
return _objectSpread(_objectSpread({}, originalStyles), getFormElementStyles());
|
|
129
|
-
case 'loading':
|
|
130
|
-
return _objectSpread(_objectSpread({}, originalStyles), getLoadingStyles());
|
|
131
|
-
default:
|
|
132
|
-
return originalStyles;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
exports.applyImprovedStyles = applyImprovedStyles;
|
package/dist/config/theme.js
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.theme = exports.commonStyles = void 0;
|
|
7
|
-
require("core-js/modules/es.parse-int.js");
|
|
8
|
-
var _styles = require("@mui/material/styles");
|
|
9
|
-
var _apperance = require("./apperance");
|
|
10
|
-
// Theme.js - Fichier de configuration de thème partagé pour tous les composants
|
|
11
|
-
|
|
12
|
-
// Variables de style communes
|
|
13
|
-
const commonStyles = exports.commonStyles = {
|
|
14
|
-
// Couleurs
|
|
15
|
-
colors: {
|
|
16
|
-
headerBackground: '#f5f8fa',
|
|
17
|
-
rowBackgroundOdd: '#ffffff',
|
|
18
|
-
rowBackgroundEven: '#F6F9FF',
|
|
19
|
-
hoverBackground: 'rgba(149, 199, 252, 0.15)',
|
|
20
|
-
selectedBackground: 'rgba(149, 199, 252, 0.25)',
|
|
21
|
-
selectedHoverBackground: 'rgba(149, 199, 252, 0.35)',
|
|
22
|
-
borderLight: 'rgba(224, 224, 224, 0.3)',
|
|
23
|
-
borderMedium: 'rgba(224, 224, 224, 0.5)',
|
|
24
|
-
borderFocus: 'rgba(149, 199, 252, 0.3)',
|
|
25
|
-
shadowLight: 'rgba(0, 0, 0, 0.05)',
|
|
26
|
-
shadowMedium: 'rgba(0, 0, 0, 0.08)'
|
|
27
|
-
},
|
|
28
|
-
// Typographie
|
|
29
|
-
typography: {
|
|
30
|
-
fontSizeSmall: '0.8em',
|
|
31
|
-
fontSizeDefault: '0.85em',
|
|
32
|
-
fontSizeMedium: '0.9em',
|
|
33
|
-
letterSpacing: '0.5px',
|
|
34
|
-
lineHeight: '1.3em'
|
|
35
|
-
},
|
|
36
|
-
// Espacement
|
|
37
|
-
spacing: {
|
|
38
|
-
cellPaddingY: '6px',
|
|
39
|
-
cellPaddingX: '12px',
|
|
40
|
-
headerPadding: '8px 0'
|
|
41
|
-
},
|
|
42
|
-
// Dimensions
|
|
43
|
-
sizes: {
|
|
44
|
-
borderRadius: '8px',
|
|
45
|
-
buttonHeight: '30px',
|
|
46
|
-
headerHeight: '48px',
|
|
47
|
-
footerHeight: '40px',
|
|
48
|
-
rowHeight: '40px'
|
|
49
|
-
},
|
|
50
|
-
// Transitions
|
|
51
|
-
transitions: {
|
|
52
|
-
hover: 'background-color 0.2s ease',
|
|
53
|
-
fade: 'opacity 0.3s ease-in-out'
|
|
54
|
-
},
|
|
55
|
-
// Ombres
|
|
56
|
-
shadows: {
|
|
57
|
-
elevation: '0 6px 16px rgba(0, 0, 0, 0.08)',
|
|
58
|
-
subtle: '2px 0 5px rgba(0, 0, 0, 0.05)'
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Créer un thème Material-UI basé sur notre configuration
|
|
63
|
-
const theme = exports.theme = (0, _styles.createTheme)({
|
|
64
|
-
palette: {
|
|
65
|
-
primary: {
|
|
66
|
-
main: _apperance.palette.primary
|
|
67
|
-
},
|
|
68
|
-
secondary: {
|
|
69
|
-
main: _apperance.palette.secondary
|
|
70
|
-
},
|
|
71
|
-
info: {
|
|
72
|
-
main: _apperance.palette.info
|
|
73
|
-
},
|
|
74
|
-
background: {
|
|
75
|
-
default: _apperance.palette.white,
|
|
76
|
-
paper: _apperance.palette.white
|
|
77
|
-
},
|
|
78
|
-
text: {
|
|
79
|
-
primary: _apperance.palette.black,
|
|
80
|
-
secondary: _apperance.palette.gray.dark
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
typography: {
|
|
84
|
-
fontSize: 14,
|
|
85
|
-
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif'
|
|
86
|
-
},
|
|
87
|
-
shape: {
|
|
88
|
-
borderRadius: parseInt(commonStyles.sizes.borderRadius)
|
|
89
|
-
},
|
|
90
|
-
components: {
|
|
91
|
-
MuiButton: {
|
|
92
|
-
styleOverrides: {
|
|
93
|
-
root: {
|
|
94
|
-
textTransform: 'none',
|
|
95
|
-
borderRadius: commonStyles.sizes.borderRadius,
|
|
96
|
-
transition: commonStyles.transitions.hover
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
MuiPaper: {
|
|
101
|
-
styleOverrides: {
|
|
102
|
-
root: {
|
|
103
|
-
borderRadius: commonStyles.sizes.borderRadius,
|
|
104
|
-
boxShadow: commonStyles.shadows.elevation
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
MuiTableCell: {
|
|
109
|
-
styleOverrides: {
|
|
110
|
-
root: {
|
|
111
|
-
padding: "".concat(commonStyles.spacing.cellPaddingY, " ").concat(commonStyles.spacing.cellPaddingX),
|
|
112
|
-
fontSize: commonStyles.typography.fontSizeDefault
|
|
113
|
-
},
|
|
114
|
-
head: {
|
|
115
|
-
backgroundColor: commonStyles.colors.headerBackground,
|
|
116
|
-
fontWeight: 600,
|
|
117
|
-
textTransform: 'uppercase',
|
|
118
|
-
letterSpacing: commonStyles.typography.letterSpacing
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
MuiTableRow: {
|
|
123
|
-
styleOverrides: {
|
|
124
|
-
root: {
|
|
125
|
-
transition: commonStyles.transitions.hover,
|
|
126
|
-
'&:nth-of-type(odd)': {
|
|
127
|
-
backgroundColor: commonStyles.colors.rowBackgroundOdd
|
|
128
|
-
},
|
|
129
|
-
'&:nth-of-type(even)': {
|
|
130
|
-
backgroundColor: commonStyles.colors.rowBackgroundEven
|
|
131
|
-
},
|
|
132
|
-
'&:hover': {
|
|
133
|
-
backgroundColor: commonStyles.colors.hoverBackground
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
MuiCheckbox: {
|
|
139
|
-
styleOverrides: {
|
|
140
|
-
root: {
|
|
141
|
-
padding: '4px'
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
MuiTextField: {
|
|
146
|
-
styleOverrides: {
|
|
147
|
-
root: {
|
|
148
|
-
'& .MuiOutlinedInput-root': {
|
|
149
|
-
borderRadius: commonStyles.sizes.borderRadius
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
MuiSelect: {
|
|
155
|
-
styleOverrides: {
|
|
156
|
-
root: {
|
|
157
|
-
borderRadius: commonStyles.sizes.borderRadius
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
MuiPagination: {
|
|
162
|
-
styleOverrides: {
|
|
163
|
-
root: {
|
|
164
|
-
'& .MuiPaginationItem-root': {
|
|
165
|
-
margin: '0 2px',
|
|
166
|
-
minWidth: '30px',
|
|
167
|
-
height: '30px',
|
|
168
|
-
borderRadius: '4px',
|
|
169
|
-
fontSize: commonStyles.typography.fontSizeSmall,
|
|
170
|
-
'&.Mui-selected': {
|
|
171
|
-
backgroundColor: _apperance.palette.primary,
|
|
172
|
-
color: _apperance.palette.white,
|
|
173
|
-
fontWeight: 'bold'
|
|
174
|
-
},
|
|
175
|
-
'&:hover': {
|
|
176
|
-
backgroundColor: commonStyles.colors.hoverBackground
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TYPE_STRING = exports.TYPE_NUMBER = void 0;
|
|
7
|
-
const TYPE_STRING = exports.TYPE_STRING = 'Ce champ doit être de type "String"';
|
|
8
|
-
const TYPE_NUMBER = exports.TYPE_NUMBER = "Ce champ doit être un nombre valide";
|
package/dist/hooks/useAlert.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _PuiAlertContext = _interopRequireDefault(require("../components/common/PuiAlertContext"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
const useAlert = () => {
|
|
15
|
-
const {
|
|
16
|
-
dispatchAlert
|
|
17
|
-
} = React.useContext(_PuiAlertContext.default);
|
|
18
|
-
return dispatchAlert;
|
|
19
|
-
};
|
|
20
|
-
var _default = exports.default = useAlert;
|
package/dist/hooks/useAxios.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const useAxios = function useAxios(token) {
|
|
10
|
-
let secret = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
11
|
-
let baseURL = arguments.length > 2 ? arguments[2] : undefined;
|
|
12
|
-
// Vérifier si axios est un objet ou une fonction avec une propriété default
|
|
13
|
-
const axiosToUse = _axios.default.default ? _axios.default.default : _axios.default;
|
|
14
|
-
const axiosInstance = axiosToUse.create({
|
|
15
|
-
baseURL: baseURL,
|
|
16
|
-
headers: {
|
|
17
|
-
Authorization: secret ? token : "Bearer ".concat(token)
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
axiosInstance.interceptors.response.use(response => response, error => {
|
|
21
|
-
throw error;
|
|
22
|
-
});
|
|
23
|
-
return axiosInstance;
|
|
24
|
-
};
|
|
25
|
-
var _default = exports.default = useAxios;
|
package/dist/hooks/useQuery.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
8
|
-
require("core-js/modules/es.string.search.js");
|
|
9
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
10
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
11
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
require("core-js/modules/web.url-search-params.js");
|
|
13
|
-
const useQuery = () => {
|
|
14
|
-
const queryParams = new URLSearchParams(window.location.search);
|
|
15
|
-
const queryObject = {};
|
|
16
|
-
queryParams.forEach((paramValue, paramKey) => {
|
|
17
|
-
queryObject[paramKey] = paramValue;
|
|
18
|
-
});
|
|
19
|
-
return queryObject;
|
|
20
|
-
};
|
|
21
|
-
var _default = exports.default = useQuery;
|