@portnet/ui 1.2.0 → 1.2.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/dist/components/buttons/PuiButton.js +12 -13
- package/dist/components/buttons/PuiIconButton.js +8 -9
- package/dist/components/common/PuiAlertContext.js +2 -1
- package/dist/components/common/StyledMuiButton.js +8 -9
- package/dist/components/common/StyledMuiTextField.js +9 -10
- package/dist/components/inputs/PuiAutocomplete.js +9 -11
- package/dist/components/inputs/PuiCheckbox.js +12 -15
- package/dist/components/inputs/PuiCheckboxGroup.js +6 -8
- package/dist/components/inputs/PuiCheckboxItem.js +8 -9
- package/dist/components/inputs/PuiDateField.js +63 -128
- package/dist/components/inputs/PuiDateTimeField.js +431 -38
- package/dist/components/inputs/PuiFileField.js +10 -11
- package/dist/components/inputs/PuiRadioGroup.js +8 -9
- package/dist/components/inputs/PuiRadioItem.js +7 -8
- package/dist/components/inputs/PuiSelect.js +10 -12
- package/dist/components/inputs/PuiTextField.js +8 -9
- package/dist/components/others/PuiBadge.js +4 -6
- package/dist/components/others/PuiChip.js +15 -16
- package/dist/components/others/PuiDialog.js +8 -9
- package/dist/components/others/PuiFormikForm.js +2 -1
- package/dist/components/others/PuiGrid.js +3 -5
- package/dist/components/others/PuiIcon.js +8 -9
- package/dist/components/others/PuiLoadingBackdrop.js +1 -1
- package/dist/components/others/PuiMainContainer.js +7 -8
- package/dist/components/others/PuiNavigation.js +6 -7
- package/dist/components/others/PuiSection.js +7 -8
- package/dist/components/others/PuiTooltip.js +9 -10
- package/dist/components/providers/PuiAlertProvider.js +8 -10
- package/dist/components/providers/PuiLocalizationProvider.js +5 -7
- package/dist/components/referentiel/common/ReferetielContext.js +2 -1
- package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +92 -92
- package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +1 -1
- package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +2 -1
- package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +6 -7
- package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +6 -7
- package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +6 -8
- package/dist/components/referentiel/components/PuiSimpleReferentielField.js +9 -11
- package/dist/components/referentiel/components/PuiSpecificReferentielField.js +8 -10
- package/dist/components/referentiel/providers/PuiReferentielProvider.js +6 -7
- package/dist/components/tab/PuiTab.js +1 -1
- package/dist/components/tab/PuiTabs.js +10 -13
- package/dist/components/table/PuiTable.js +18 -21
- package/dist/components/table/PuiTableAction.js +4 -6
- package/dist/components/typography/PuiDefinition.js +1 -1
- package/dist/components/typography/PuiIndication.js +6 -7
- package/dist/components/typography/PuiMainTitle.js +6 -8
- package/dist/components/ui/dialogs/PuiSearchDialog.js +8 -9
- package/dist/components/ui/pages/errors/PuiErrorBasePage.js +1 -1
- package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +1 -1
- package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +1 -1
- package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +1 -1
- package/dist/components/ui/pages/errors/PuiServerErrorPage.js +1 -1
- package/dist/components/ui/pages/general/PuiDefaultPage.js +1 -1
- package/dist/components/ui/pages/general/PuiSearchPage.js +39 -63
- package/dist/config/mapping.js +1 -1
- package/dist/hooks/useAlert.js +3 -2
- package/dist/hooks/useAxios.js +1 -1
- package/dist/hooks/useQuery.js +2 -4
- package/dist/index.js +1 -1
- package/package.json +98 -105
- package/dist/components/others/DateTimePickerField.js +0 -210
- package/dist/components/table/ActionPopover.js +0 -56
|
@@ -1,115 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
5
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
6
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
7
|
exports.default = void 0;
|
|
11
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
9
|
+
require("core-js/modules/es.symbol.description.js");
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
13
11
|
var _DesktopDatePicker = require("@mui/x-date-pickers/DesktopDatePicker");
|
|
14
|
-
var _LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
15
12
|
var _formik = require("formik");
|
|
16
13
|
var _moment = _interopRequireDefault(require("moment"));
|
|
17
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
15
|
var React = _interopRequireWildcard(require("react"));
|
|
16
|
+
var _apperance = require("../../config/apperance");
|
|
17
|
+
var _StyledMuiTextField = _interopRequireDefault(require("../common/StyledMuiTextField"));
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
19
|
const _excluded = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
21
20
|
_excluded2 = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
22
21
|
_excluded3 = ["formik", "id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"];
|
|
23
|
-
function
|
|
24
|
-
function
|
|
22
|
+
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); }
|
|
23
|
+
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 && Object.prototype.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; }
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
26
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
27
|
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; }
|
|
26
28
|
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; }
|
|
27
|
-
function _defineProperty(
|
|
28
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i
|
|
29
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
29
31
|
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); }
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
success: "#48AC24",
|
|
39
|
-
info: "#2278CF",
|
|
40
|
-
white: "#FFF",
|
|
41
|
-
dark: "#000",
|
|
42
|
-
gray: {
|
|
43
|
-
darker: "#505050",
|
|
44
|
-
dark: "#b6b6b6",
|
|
45
|
-
light: "#F1F1F1"
|
|
46
|
-
},
|
|
47
|
-
background: {
|
|
48
|
-
required: "#FFFBE3",
|
|
49
|
-
error: "#FFE5E5"
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const textFieldStyles = {
|
|
53
|
-
"&.MuiFormControl-root": {
|
|
54
|
-
"&.required .MuiInputBase-root": {
|
|
55
|
-
backgroundColor: required => required ? palette.background.required : "white"
|
|
56
|
-
},
|
|
57
|
-
"& .MuiFormLabel-root": {
|
|
58
|
-
zIndex: 0,
|
|
59
|
-
lineSpacing: "-0.03em",
|
|
60
|
-
position: "initial",
|
|
61
|
-
transform: "none",
|
|
62
|
-
fontSize: "0.8rem",
|
|
63
|
-
fontWeight: "600",
|
|
64
|
-
marginBottom: "4px",
|
|
65
|
-
color: palette.gray.darker,
|
|
66
|
-
"&.Mui-focused ": {
|
|
67
|
-
color: palette.primary
|
|
68
|
-
},
|
|
69
|
-
"&.Mui-disabled": {
|
|
70
|
-
color: palette.gray.darker
|
|
71
|
-
},
|
|
72
|
-
"&.Mui-error": {
|
|
73
|
-
color: palette.error
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
"& .MuiInputBase-root": {
|
|
77
|
-
backgroundColor: required => required ? palette.background.required : "white",
|
|
78
|
-
border: "2px solid ".concat(palette.gray.dark),
|
|
79
|
-
borderRadius: "5px",
|
|
80
|
-
"&.MuiInputBase-multiline": {
|
|
81
|
-
padding: "8px 0"
|
|
82
|
-
},
|
|
83
|
-
"&.Mui-focused ": {
|
|
84
|
-
border: "2px solid ".concat(palette.primary)
|
|
32
|
+
const StyledDateMuiTextField = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledMuiTextField.default, _objectSpread({
|
|
33
|
+
ref: ref
|
|
34
|
+
}, props))))(() => {
|
|
35
|
+
return {
|
|
36
|
+
"&.MuiFormControl-root": {
|
|
37
|
+
display: "block",
|
|
38
|
+
"& .MuiFormLabel-root": {
|
|
39
|
+
marginBottom: "0.65px"
|
|
85
40
|
},
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
"&.Mui-disabled ": {
|
|
91
|
-
"& input": {
|
|
92
|
-
color: "".concat(palette.gray.darker),
|
|
93
|
-
WebkitTextFillColor: "".concat(palette.gray.darker)
|
|
41
|
+
"& .MuiInputAdornment-root .MuiButtonBase-root": {
|
|
42
|
+
"&:hover": {
|
|
43
|
+
backgroundColor: "transparent"
|
|
94
44
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
45
|
+
padding: "0 6px",
|
|
46
|
+
marginRight: "-8px",
|
|
47
|
+
"& .MuiSvgIcon-root": {
|
|
48
|
+
width: "16px",
|
|
49
|
+
height: "16px"
|
|
50
|
+
}
|
|
101
51
|
}
|
|
102
|
-
},
|
|
103
|
-
"& .MuiFormHelperText-root": {
|
|
104
|
-
fontWeight: "bold",
|
|
105
|
-
fontSize: ".7rem",
|
|
106
|
-
color: "red"
|
|
107
|
-
},
|
|
108
|
-
"& fieldset": {
|
|
109
|
-
display: "none"
|
|
110
52
|
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
53
|
+
};
|
|
54
|
+
});
|
|
113
55
|
const PuiStandardDateField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
114
56
|
let {
|
|
115
57
|
id,
|
|
@@ -142,48 +84,41 @@ const PuiStandardDateField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
142
84
|
onChange(null);
|
|
143
85
|
}
|
|
144
86
|
};
|
|
145
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
name,
|
|
163
|
-
sx: textFieldStyles,
|
|
164
|
-
fullWidth,
|
|
165
|
-
required,
|
|
166
|
-
error,
|
|
167
|
-
helperText
|
|
168
|
-
},
|
|
169
|
-
popper: {
|
|
170
|
-
sx: {
|
|
171
|
-
"& .MuiPaper-root": {
|
|
172
|
-
boxShadow: "none !important",
|
|
173
|
-
border: "1px solid #e0e0e0",
|
|
174
|
-
backgroundColor: "white"
|
|
175
|
-
},
|
|
176
|
-
"& .MuiPickersDay-root.Mui-selected": {
|
|
177
|
-
backgroundColor: "".concat(palette.primary, " !important")
|
|
178
|
-
},
|
|
179
|
-
"& .Mui-selected": {
|
|
180
|
-
backgroundColor: "".concat(palette.primary, " !important")
|
|
181
|
-
}
|
|
182
|
-
}
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DesktopDatePicker.DesktopDatePicker, _objectSpread({
|
|
88
|
+
ref: ref,
|
|
89
|
+
sx: sx,
|
|
90
|
+
label: label,
|
|
91
|
+
inputFormat: inputFormat,
|
|
92
|
+
value: value,
|
|
93
|
+
onChange: handleChange,
|
|
94
|
+
disablePast: disablePast,
|
|
95
|
+
disableFuture: disableFuture,
|
|
96
|
+
disabled: disabled,
|
|
97
|
+
maxDate: maxDate,
|
|
98
|
+
minDate: minDate,
|
|
99
|
+
readOnly: readOnly,
|
|
100
|
+
PopperProps: {
|
|
101
|
+
sx: {
|
|
102
|
+
"& .MuiButtonBase-root.Mui-selected, & .MuiButtonBase-root.Mui-selected:focus, & .MuiButtonBase-root.Mui-selected:hover": {
|
|
103
|
+
backgroundColor: _apperance.palette.primary
|
|
183
104
|
}
|
|
184
105
|
}
|
|
185
|
-
},
|
|
186
|
-
|
|
106
|
+
},
|
|
107
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDateMuiTextField, _objectSpread(_objectSpread({
|
|
108
|
+
id: id,
|
|
109
|
+
className: className,
|
|
110
|
+
name: name,
|
|
111
|
+
required: required,
|
|
112
|
+
fullWidth: fullWidth,
|
|
113
|
+
onBlur: onBlur,
|
|
114
|
+
helperText: helperText
|
|
115
|
+
}, params), {}, {
|
|
116
|
+
error: params.error || error,
|
|
117
|
+
inputProps: _objectSpread({
|
|
118
|
+
name
|
|
119
|
+
}, params.inputProps)
|
|
120
|
+
}))
|
|
121
|
+
}, rest));
|
|
187
122
|
});
|
|
188
123
|
const PuiFormikDateField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
189
124
|
let {
|