@portnet/ui 0.1.43 → 0.1.45
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.array.includes.js");
|
|
4
4
|
require("core-js/modules/es.string.includes.js");
|
|
5
|
+
require("core-js/modules/es.weak-map.js");
|
|
5
6
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
6
7
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
7
8
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
@@ -10,23 +11,129 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
11
|
});
|
|
11
12
|
exports.default = void 0;
|
|
12
13
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
|
+
var _material = require("@mui/material");
|
|
15
|
+
var _styles = require("@mui/material/styles");
|
|
16
|
+
var _DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
13
17
|
var _formik = require("formik");
|
|
18
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
14
19
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
20
|
+
var React = _interopRequireWildcard(require("react"));
|
|
21
|
+
var _apperance = require("../../config/apperance");
|
|
22
|
+
var _PuiButton = _interopRequireDefault(require("../buttons/PuiButton"));
|
|
23
|
+
var _StyledMuiTextField = _interopRequireDefault(require("../common/StyledMuiTextField"));
|
|
24
|
+
var _PuiDialog = _interopRequireDefault(require("../others/PuiDialog"));
|
|
25
|
+
var _PuiTextField = _interopRequireDefault(require("./PuiTextField"));
|
|
17
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["id", "className", "sx", "label", "name", "required", "value", "format", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
19
|
-
_excluded2 = ["id", "className", "sx", "label", "name", "required", "value", "format", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
27
|
+
const _excluded = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
28
|
+
_excluded2 = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
20
29
|
_excluded3 = ["formik", "id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"];
|
|
30
|
+
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); }
|
|
31
|
+
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; }
|
|
21
32
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
33
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
34
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
22
35
|
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; }
|
|
23
36
|
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; }
|
|
24
37
|
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; }
|
|
25
38
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
26
39
|
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); }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
const StyledDateMuiTextField = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledMuiTextField.default, _objectSpread({
|
|
41
|
+
ref: ref
|
|
42
|
+
}, props))))(() => ({
|
|
43
|
+
"&.MuiFormControl-root": {
|
|
44
|
+
display: "block",
|
|
45
|
+
"& .MuiInputAdornment-root .MuiButtonBase-root": {
|
|
46
|
+
padding: "6px",
|
|
47
|
+
marginRight: "-8px",
|
|
48
|
+
"& .MuiSvgIcon-root": {
|
|
49
|
+
width: "16px",
|
|
50
|
+
height: "16px"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
const TimePickerDialog = _ref => {
|
|
56
|
+
var _ref2, _ref3;
|
|
57
|
+
let {
|
|
58
|
+
open,
|
|
59
|
+
selectedDate,
|
|
60
|
+
onTimeSelected,
|
|
61
|
+
onClose,
|
|
62
|
+
position
|
|
63
|
+
} = _ref;
|
|
64
|
+
const defaultTime = (0, _moment.default)(selectedDate).isValid() ? (0, _moment.default)(selectedDate).format("HH:mm") : (0, _moment.default)().format("HH:mm");
|
|
65
|
+
const [selectedTime, setSelectedTime] = React.useState(defaultTime);
|
|
66
|
+
const handleTimeChange = event => {
|
|
67
|
+
setSelectedTime(event.target.value);
|
|
68
|
+
};
|
|
69
|
+
const handleOk = () => {
|
|
70
|
+
onTimeSelected(selectedTime);
|
|
71
|
+
onClose();
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiDialog.default, {
|
|
74
|
+
open: open,
|
|
75
|
+
onClose: onClose,
|
|
76
|
+
slotProps: {
|
|
77
|
+
backdrop: {
|
|
78
|
+
style: {
|
|
79
|
+
backgroundColor: "transparent",
|
|
80
|
+
boxShadow: "none"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
hideBackdrop: true,
|
|
85
|
+
PaperProps: {
|
|
86
|
+
elevation: 5,
|
|
87
|
+
sx: {
|
|
88
|
+
position: "fixed",
|
|
89
|
+
alignContent: "center",
|
|
90
|
+
justifyContent: "center",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
backgroundColor: "white",
|
|
93
|
+
height: 58,
|
|
94
|
+
width: 340,
|
|
95
|
+
maxWidth: "720px!important",
|
|
96
|
+
left: (_ref2 = (position === null || position === void 0 ? void 0 : position.left) - 420 / 2) !== null && _ref2 !== void 0 ? _ref2 : 0,
|
|
97
|
+
top: (_ref3 = (position === null || position === void 0 ? void 0 : position.top) + 36) !== null && _ref3 !== void 0 ? _ref3 : 36
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
101
|
+
sx: {
|
|
102
|
+
display: "flex",
|
|
103
|
+
gap: 1
|
|
104
|
+
},
|
|
105
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTextField.default, {
|
|
106
|
+
id: "time",
|
|
107
|
+
type: "time",
|
|
108
|
+
value: selectedTime,
|
|
109
|
+
onChange: handleTimeChange,
|
|
110
|
+
InputLabelProps: {
|
|
111
|
+
shrink: true
|
|
112
|
+
},
|
|
113
|
+
inputProps: {
|
|
114
|
+
step: 60
|
|
115
|
+
},
|
|
116
|
+
formik: false,
|
|
117
|
+
sx: {
|
|
118
|
+
width: 150
|
|
119
|
+
}
|
|
120
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
121
|
+
onClick: onClose,
|
|
122
|
+
sx: {
|
|
123
|
+
color: _apperance.palette.primary
|
|
124
|
+
},
|
|
125
|
+
children: "Cancel"
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
127
|
+
onClick: handleOk,
|
|
128
|
+
sx: {
|
|
129
|
+
color: _apperance.palette.primary
|
|
130
|
+
},
|
|
131
|
+
children: "OK"
|
|
132
|
+
})]
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
30
137
|
let {
|
|
31
138
|
id,
|
|
32
139
|
className,
|
|
@@ -35,7 +142,12 @@ const PuiStandardDateTimeField = /*#__PURE__*/_react.default.forwardRef((_ref, r
|
|
|
35
142
|
name,
|
|
36
143
|
required,
|
|
37
144
|
value,
|
|
38
|
-
|
|
145
|
+
minDate,
|
|
146
|
+
maxDate,
|
|
147
|
+
inputFormat = "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
148
|
+
format = "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
149
|
+
disablePast,
|
|
150
|
+
disableFuture,
|
|
39
151
|
error,
|
|
40
152
|
readOnly,
|
|
41
153
|
fullWidth,
|
|
@@ -43,35 +155,94 @@ const PuiStandardDateTimeField = /*#__PURE__*/_react.default.forwardRef((_ref, r
|
|
|
43
155
|
helperText,
|
|
44
156
|
onChange,
|
|
45
157
|
onBlur
|
|
46
|
-
} =
|
|
47
|
-
rest = _objectWithoutProperties(
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
158
|
+
} = _ref4,
|
|
159
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
160
|
+
const textFieldRef = React.useRef(null);
|
|
161
|
+
const [dateTime, setDateTime] = React.useState(value || null);
|
|
162
|
+
const minDateObj = minDate ? (0, _moment.default)(minDate, format).toDate() : undefined;
|
|
163
|
+
const maxDateObj = maxDate ? (0, _moment.default)(maxDate, format).toDate() : undefined;
|
|
164
|
+
const [displayedDateTime, setDisplayedDateTime] = React.useState(value || null);
|
|
165
|
+
const [openTimePicker, setOpenTimePicker] = React.useState(false);
|
|
166
|
+
const [dialogPosition, setDialogPosition] = React.useState();
|
|
167
|
+
const handleDateChange = date => {
|
|
168
|
+
if (date) {
|
|
169
|
+
setDateTime((0, _moment.default)(date).format(format));
|
|
170
|
+
setOpenTimePicker(true);
|
|
53
171
|
}
|
|
54
172
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
173
|
+
const handleTimeSelected = time => {
|
|
174
|
+
const newDateTime = (0, _moment.default)(dateTime).format("YYYY-MM-DD") + "T" + time;
|
|
175
|
+
const updatedDateTime = (0, _moment.default)(newDateTime, "YYYY-MM-DDTHH:mm").format(format);
|
|
176
|
+
setDateTime(updatedDateTime);
|
|
177
|
+
setDisplayedDateTime(updatedDateTime);
|
|
178
|
+
onChange(updatedDateTime);
|
|
179
|
+
};
|
|
180
|
+
React.useEffect(() => {
|
|
181
|
+
const updatePosition = () => {
|
|
182
|
+
if (textFieldRef !== null && textFieldRef !== void 0 && textFieldRef.current) {
|
|
183
|
+
const rect = textFieldRef.current.getBoundingClientRect();
|
|
184
|
+
console.log("rect : ", rect);
|
|
185
|
+
setDialogPosition({
|
|
186
|
+
left: rect.left + rect.width / 2 + window.scrollX,
|
|
187
|
+
top: rect.top > 310 ? rect.top - 80 : rect.top + 80
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
updatePosition();
|
|
192
|
+
window.addEventListener("resize", updatePosition);
|
|
193
|
+
window.addEventListener("scroll", updatePosition);
|
|
194
|
+
return () => {
|
|
195
|
+
window.removeEventListener("resize", updatePosition);
|
|
196
|
+
window.removeEventListener("scroll", updatePosition);
|
|
197
|
+
};
|
|
198
|
+
}, []);
|
|
199
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
200
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DatePicker.DatePicker, _objectSpread({
|
|
201
|
+
ref: textFieldRef,
|
|
202
|
+
sx: sx,
|
|
203
|
+
ampm: false,
|
|
204
|
+
label: label,
|
|
205
|
+
inputFormat: "DD/MM/yyyy HH:mm",
|
|
206
|
+
value: displayedDateTime,
|
|
207
|
+
onChange: handleDateChange,
|
|
208
|
+
disablePast: disablePast,
|
|
209
|
+
disableFuture: disableFuture,
|
|
210
|
+
disabled: disabled,
|
|
211
|
+
maxDate: maxDateObj,
|
|
212
|
+
minDate: minDateObj,
|
|
213
|
+
readOnly: readOnly,
|
|
214
|
+
PopperProps: {
|
|
215
|
+
sx: {
|
|
216
|
+
"& .MuiButtonBase-root.Mui-selected, & .MuiButtonBase-root.Mui-selected:focus, & .MuiButtonBase-root.Mui-selected:hover": {
|
|
217
|
+
backgroundColor: _apperance.palette.primary
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDateMuiTextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
222
|
+
ref: textFieldRef,
|
|
223
|
+
id: id,
|
|
224
|
+
className: className,
|
|
225
|
+
label: label,
|
|
226
|
+
name: name,
|
|
227
|
+
required: required,
|
|
228
|
+
fullWidth: fullWidth,
|
|
229
|
+
onBlur: onBlur,
|
|
230
|
+
helperText: helperText,
|
|
231
|
+
error: error,
|
|
232
|
+
inputProps: _objectSpread(_objectSpread({}, params.inputProps), {}, {
|
|
233
|
+
readOnly: readOnly
|
|
234
|
+
})
|
|
235
|
+
}))
|
|
236
|
+
}, rest)), /*#__PURE__*/(0, _jsxRuntime.jsx)(TimePickerDialog, {
|
|
237
|
+
open: openTimePicker,
|
|
238
|
+
selectedDate: dateTime,
|
|
239
|
+
onTimeSelected: handleTimeSelected,
|
|
240
|
+
onClose: () => setOpenTimePicker(false),
|
|
241
|
+
position: dialogPosition
|
|
242
|
+
})]
|
|
243
|
+
});
|
|
73
244
|
});
|
|
74
|
-
const PuiFormikDateTimeField = /*#__PURE__*/
|
|
245
|
+
const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
75
246
|
let {
|
|
76
247
|
id,
|
|
77
248
|
className,
|
|
@@ -80,49 +251,68 @@ const PuiFormikDateTimeField = /*#__PURE__*/_react.default.forwardRef((_ref2, re
|
|
|
80
251
|
name,
|
|
81
252
|
required,
|
|
82
253
|
value,
|
|
254
|
+
minDate,
|
|
255
|
+
maxDate,
|
|
256
|
+
inputFormat,
|
|
83
257
|
format,
|
|
258
|
+
disablePast,
|
|
259
|
+
disableFuture,
|
|
84
260
|
error,
|
|
85
261
|
readOnly,
|
|
86
262
|
fullWidth,
|
|
87
263
|
disabled,
|
|
88
264
|
helperText,
|
|
89
265
|
onChange,
|
|
90
|
-
onBlur
|
|
91
|
-
} =
|
|
92
|
-
rest = _objectWithoutProperties(
|
|
266
|
+
onBlur
|
|
267
|
+
} = _ref5,
|
|
268
|
+
rest = _objectWithoutProperties(_ref5, _excluded2);
|
|
93
269
|
const [field, meta] = (0, _formik.useField)(name);
|
|
94
270
|
const formikContext = (0, _formik.useFormikContext)();
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
271
|
+
const [hasError, setHasError] = React.useState(false);
|
|
272
|
+
const minDateObj = minDate ? (0, _moment.default)(minDate, format).toDate() : undefined;
|
|
273
|
+
const maxDateObj = maxDate ? (0, _moment.default)(maxDate, format).toDate() : undefined;
|
|
274
|
+
const handleChange = value => {
|
|
275
|
+
formikContext.setFieldValue(name, value);
|
|
276
|
+
onChange(value);
|
|
277
|
+
};
|
|
278
|
+
const handleBlur = event => {
|
|
279
|
+
onBlur(event);
|
|
280
|
+
field.onBlur(event);
|
|
100
281
|
};
|
|
282
|
+
React.useEffect(() => {
|
|
283
|
+
setHasError(Boolean(meta) && Boolean(meta.touched) && Boolean(meta.error));
|
|
284
|
+
}, [meta]);
|
|
285
|
+
React.useEffect(() => {
|
|
286
|
+
if (Boolean(value)) {
|
|
287
|
+
formikContext.setFieldValue(name, value);
|
|
288
|
+
}
|
|
289
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
290
|
+
}, [value]);
|
|
101
291
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PuiStandardDateTimeField, _objectSpread({
|
|
102
|
-
ref: ref,
|
|
103
292
|
id: id,
|
|
293
|
+
ref: ref,
|
|
104
294
|
className: className,
|
|
105
295
|
sx: sx,
|
|
106
296
|
label: label,
|
|
107
297
|
name: name,
|
|
108
298
|
required: required,
|
|
109
|
-
value: field.value
|
|
299
|
+
value: Boolean(field.value) ? format ? _moment.default.utc(field.value, format) : _moment.default.utc(field.value) : null,
|
|
110
300
|
format: format,
|
|
111
|
-
|
|
301
|
+
minDate: minDateObj,
|
|
302
|
+
maxDate: maxDateObj,
|
|
303
|
+
inputFormat: inputFormat,
|
|
304
|
+
disableFuture: disableFuture,
|
|
305
|
+
disablePast: disablePast,
|
|
306
|
+
error: error || hasError,
|
|
112
307
|
readOnly: readOnly,
|
|
113
308
|
fullWidth: fullWidth,
|
|
114
309
|
disabled: disabled,
|
|
115
|
-
helperText:
|
|
310
|
+
helperText: hasError && Boolean(meta.error) ? meta.error : helperText !== null && helperText !== void 0 ? helperText : "",
|
|
116
311
|
onChange: handleChange,
|
|
117
|
-
onBlur:
|
|
118
|
-
field.onBlur(e);
|
|
119
|
-
if (_onBlur) {
|
|
120
|
-
_onBlur(e);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
312
|
+
onBlur: handleBlur
|
|
123
313
|
}, rest));
|
|
124
314
|
});
|
|
125
|
-
const PuiDateTimeField = /*#__PURE__*/
|
|
315
|
+
const PuiDateTimeField = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
126
316
|
let {
|
|
127
317
|
formik,
|
|
128
318
|
id,
|
|
@@ -145,9 +335,9 @@ const PuiDateTimeField = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) =>
|
|
|
145
335
|
helperText,
|
|
146
336
|
onChange,
|
|
147
337
|
onBlur
|
|
148
|
-
} =
|
|
149
|
-
rest = _objectWithoutProperties(
|
|
150
|
-
return /*#__PURE__*/
|
|
338
|
+
} = _ref6,
|
|
339
|
+
rest = _objectWithoutProperties(_ref6, _excluded3);
|
|
340
|
+
return /*#__PURE__*/React.createElement(formik ? PuiFormikDateTimeField : PuiStandardDateTimeField, _objectSpread({
|
|
151
341
|
ref,
|
|
152
342
|
id,
|
|
153
343
|
className,
|
|
@@ -156,7 +346,12 @@ const PuiDateTimeField = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) =>
|
|
|
156
346
|
name,
|
|
157
347
|
required,
|
|
158
348
|
value,
|
|
349
|
+
minDate,
|
|
350
|
+
maxDate,
|
|
351
|
+
inputFormat,
|
|
159
352
|
format,
|
|
353
|
+
disablePast,
|
|
354
|
+
disableFuture,
|
|
160
355
|
error,
|
|
161
356
|
readOnly,
|
|
162
357
|
fullWidth,
|
|
@@ -173,24 +368,31 @@ PuiDateTimeField.propTypes = {
|
|
|
173
368
|
label: _propTypes.default.string,
|
|
174
369
|
name: _propTypes.default.string,
|
|
175
370
|
helperText: _propTypes.default.string,
|
|
371
|
+
inputFormat: _propTypes.default.string,
|
|
176
372
|
format: _propTypes.default.string,
|
|
373
|
+
minDate: _propTypes.default.string,
|
|
374
|
+
maxDate: _propTypes.default.string,
|
|
177
375
|
formik: _propTypes.default.bool,
|
|
178
376
|
disabled: _propTypes.default.bool,
|
|
179
377
|
required: _propTypes.default.bool,
|
|
180
378
|
error: _propTypes.default.bool,
|
|
379
|
+
disablePast: _propTypes.default.bool,
|
|
380
|
+
disableFuture: _propTypes.default.bool,
|
|
181
381
|
readOnly: _propTypes.default.bool,
|
|
182
382
|
fullWidth: _propTypes.default.bool,
|
|
183
383
|
onChange: _propTypes.default.func,
|
|
184
384
|
onBlur: _propTypes.default.func
|
|
185
385
|
};
|
|
186
386
|
PuiDateTimeField.defaultProps = {
|
|
187
|
-
|
|
387
|
+
inputFormat: "DD/MM/YYYY HH:mm",
|
|
188
388
|
formik: true,
|
|
189
389
|
disabled: false,
|
|
190
390
|
required: false,
|
|
191
391
|
error: false,
|
|
192
392
|
fullWidth: true,
|
|
193
393
|
readOnly: false,
|
|
394
|
+
disablePast: false,
|
|
395
|
+
disableFuture: false,
|
|
194
396
|
onChange: () => {},
|
|
195
397
|
onBlur: () => {}
|
|
196
398
|
};
|
|
@@ -4,15 +4,15 @@ require("core-js/modules/es.weak-map.js");
|
|
|
4
4
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
5
5
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
6
6
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
7
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
7
|
Object.defineProperty(exports, "__esModule", {
|
|
9
8
|
value: true
|
|
10
9
|
});
|
|
11
10
|
exports.default = void 0;
|
|
12
11
|
require("core-js/modules/esnext.iterator.map.js");
|
|
13
|
-
|
|
12
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var
|
|
15
|
+
var _formik = require("formik");
|
|
16
16
|
var _PuiButton = _interopRequireDefault(require("../../../buttons/PuiButton"));
|
|
17
17
|
var _PuiFormikForm = _interopRequireDefault(require("../../../others/PuiFormikForm"));
|
|
18
18
|
var _PuiGrid = _interopRequireDefault(require("../../../others/PuiGrid"));
|
|
@@ -20,15 +20,17 @@ var _PuiIcon = _interopRequireDefault(require("../../../others/PuiIcon"));
|
|
|
20
20
|
var _PuiSection = _interopRequireDefault(require("../../../others/PuiSection"));
|
|
21
21
|
var _PuiTable = _interopRequireDefault(require("../../../table/PuiTable"));
|
|
22
22
|
var _PuiDefaultPage = _interopRequireDefault(require("./PuiDefaultPage"));
|
|
23
|
+
var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
|
|
24
|
+
var _ExpandLess = _interopRequireDefault(require("@mui/icons-material/ExpandLess"));
|
|
23
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
27
|
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); }
|
|
25
28
|
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; }
|
|
26
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
29
|
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; }
|
|
28
30
|
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; }
|
|
29
31
|
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; }
|
|
30
32
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
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); }
|
|
33
|
+
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); } // Container for search form and actions
|
|
32
34
|
const PuiStandardSearchPageContainer = _ref => {
|
|
33
35
|
let {
|
|
34
36
|
actions,
|
|
@@ -64,8 +66,13 @@ const PuiSearchPage = _ref2 => {
|
|
|
64
66
|
onReset,
|
|
65
67
|
onSubmit,
|
|
66
68
|
children: _children,
|
|
67
|
-
additionalActions
|
|
69
|
+
additionalActions,
|
|
70
|
+
collapsibleSearchSection = true // Collapsible by default
|
|
68
71
|
} = _ref2;
|
|
72
|
+
const [isSearchSectionExpanded, setSearchSectionExpanded] = (0, _react.useState)(false);
|
|
73
|
+
const toggleSearchSection = () => {
|
|
74
|
+
setSearchSectionExpanded(prev => !prev);
|
|
75
|
+
};
|
|
69
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_PuiDefaultPage.default, {
|
|
70
77
|
title: title,
|
|
71
78
|
titleIcon: titleIcon,
|
|
@@ -77,11 +84,24 @@ const PuiSearchPage = _ref2 => {
|
|
|
77
84
|
retour: retour,
|
|
78
85
|
onRetour: onRetour,
|
|
79
86
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiSection.default, {
|
|
80
|
-
title:
|
|
87
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
88
|
+
onClick: toggleSearchSection,
|
|
89
|
+
style: {
|
|
90
|
+
display: "flex",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
cursor: collapsibleSearchSection ? "pointer" : "default"
|
|
93
|
+
},
|
|
94
|
+
children: [collapsibleSearchSection && (isSearchSectionExpanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandLess.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {})), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
95
|
+
style: {
|
|
96
|
+
marginLeft: collapsibleSearchSection ? "8px" : "0px"
|
|
97
|
+
},
|
|
98
|
+
children: "Param\xE8tres de recherche"
|
|
99
|
+
})]
|
|
100
|
+
}),
|
|
81
101
|
sx: {
|
|
82
102
|
marginBottom: 2
|
|
83
103
|
},
|
|
84
|
-
children: formik ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_formik.Formik, _objectSpread(_objectSpread({
|
|
104
|
+
children: isSearchSectionExpanded && (formik ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_formik.Formik, _objectSpread(_objectSpread({
|
|
85
105
|
initialValues: {}
|
|
86
106
|
}, formikProps), {}, {
|
|
87
107
|
children: _ref3 => {
|
|
@@ -116,16 +136,14 @@ const PuiSearchPage = _ref2 => {
|
|
|
116
136
|
loadingPosition: "start",
|
|
117
137
|
children: "Rechercher"
|
|
118
138
|
})
|
|
119
|
-
}), additionalActions && additionalActions.map((actionItem, index) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, index);
|
|
128
|
-
})]
|
|
139
|
+
}), additionalActions && additionalActions.map((actionItem, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiGrid.default, {
|
|
140
|
+
item: true,
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
142
|
+
startIcon: actionItem.icon,
|
|
143
|
+
onClick: actionItem.action,
|
|
144
|
+
children: actionItem.name
|
|
145
|
+
})
|
|
146
|
+
}, index))]
|
|
129
147
|
}),
|
|
130
148
|
children: _children
|
|
131
149
|
})
|
|
@@ -157,22 +175,22 @@ const PuiSearchPage = _ref2 => {
|
|
|
157
175
|
loadingPosition: "start",
|
|
158
176
|
children: "Rechercher"
|
|
159
177
|
})
|
|
160
|
-
}), additionalActions && additionalActions.map((actionItem, index) => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, index);
|
|
169
|
-
})]
|
|
178
|
+
}), additionalActions && additionalActions.map((actionItem, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiGrid.default, {
|
|
179
|
+
item: true,
|
|
180
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
181
|
+
startIcon: actionItem.icon,
|
|
182
|
+
onClick: actionItem.action,
|
|
183
|
+
children: actionItem.name
|
|
184
|
+
})
|
|
185
|
+
}, index))]
|
|
170
186
|
}),
|
|
171
187
|
children: _children
|
|
172
|
-
})
|
|
173
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTable.default, _objectSpread({
|
|
188
|
+
}))
|
|
189
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTable.default, _objectSpread(_objectSpread({
|
|
174
190
|
paginationMode: "server"
|
|
175
|
-
}, tableProps)
|
|
191
|
+
}, tableProps), {}, {
|
|
192
|
+
pinnedColumns: tableProps.pinnedColumns // Added pinnedColumns
|
|
193
|
+
}))]
|
|
176
194
|
});
|
|
177
195
|
};
|
|
178
196
|
PuiSearchPage.propTypes = {
|
|
@@ -185,7 +203,9 @@ PuiSearchPage.propTypes = {
|
|
|
185
203
|
topNav: _propTypes.default.bool,
|
|
186
204
|
bottomNav: _propTypes.default.bool,
|
|
187
205
|
loading: _propTypes.default.bool,
|
|
188
|
-
tableProps: _propTypes.default.
|
|
206
|
+
tableProps: _propTypes.default.shape({
|
|
207
|
+
pinnedColumns: _propTypes.default.object // Added pinnedColumns prop type
|
|
208
|
+
}),
|
|
189
209
|
retour: _propTypes.default.bool,
|
|
190
210
|
onRetour: _propTypes.default.func,
|
|
191
211
|
onReset: _propTypes.default.func,
|
|
@@ -194,11 +214,13 @@ PuiSearchPage.propTypes = {
|
|
|
194
214
|
name: _propTypes.default.string.isRequired,
|
|
195
215
|
action: _propTypes.default.func.isRequired,
|
|
196
216
|
icon: _propTypes.default.element
|
|
197
|
-
}))
|
|
217
|
+
})),
|
|
218
|
+
collapsibleSearchSection: _propTypes.default.bool
|
|
198
219
|
};
|
|
199
220
|
PuiSearchPage.defaultProps = {
|
|
200
221
|
formik: true,
|
|
201
222
|
loading: false,
|
|
202
|
-
additionalActions: []
|
|
223
|
+
additionalActions: [],
|
|
224
|
+
collapsibleSearchSection: true
|
|
203
225
|
};
|
|
204
226
|
var _default = exports.default = PuiSearchPage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portnet/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"description": "Portnet UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -25,9 +25,6 @@
|
|
|
25
25
|
"@testing-library/jest-dom": "^5.16.5",
|
|
26
26
|
"@testing-library/react": "^13.4.0",
|
|
27
27
|
"@testing-library/user-event": "^13.5.0",
|
|
28
|
-
"@trendmicro/react-datepicker": "^1.0.0-alpha.7",
|
|
29
|
-
"ajv": "^8.17.1",
|
|
30
|
-
"ajv-keywords": "^5.1.0",
|
|
31
28
|
"axios": "^0.27.2",
|
|
32
29
|
"formik": "^2.2.9",
|
|
33
30
|
"lodash": "^4.17.21",
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
require("core-js/modules/es.parse-int.js");
|
|
9
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
10
|
-
require("core-js/modules/es.regexp.test.js");
|
|
11
|
-
require("core-js/modules/es.regexp.to-string.js");
|
|
12
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
13
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
|
-
var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
|
|
15
|
-
var _CalendarMonth = _interopRequireDefault(require("@mui/icons-material/CalendarMonth"));
|
|
16
|
-
var _material = require("@mui/material");
|
|
17
|
-
var _InputAdornment = _interopRequireDefault(require("@mui/material/InputAdornment"));
|
|
18
|
-
var _reactDatepicker = _interopRequireWildcard(require("@trendmicro/react-datepicker"));
|
|
19
|
-
var _formik = require("formik");
|
|
20
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
21
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
22
|
-
var _PuiButton = _interopRequireDefault(require("../buttons/PuiButton"));
|
|
23
|
-
var _PuiTextField = _interopRequireDefault(require("../inputs/PuiTextField"));
|
|
24
|
-
require("./custom-datepicker.css");
|
|
25
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
|
-
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); }
|
|
27
|
-
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; }
|
|
28
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
|
-
const DateTimePickerField = _ref => {
|
|
30
|
-
let {
|
|
31
|
-
label,
|
|
32
|
-
name,
|
|
33
|
-
format = "DD/MM/YYYY HH:mm",
|
|
34
|
-
onChange,
|
|
35
|
-
minDate,
|
|
36
|
-
maxDate,
|
|
37
|
-
value,
|
|
38
|
-
required = false,
|
|
39
|
-
error = false,
|
|
40
|
-
helperText = null
|
|
41
|
-
} = _ref;
|
|
42
|
-
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
43
|
-
const [timeAnchorEl, setTimeAnchorEl] = (0, _react.useState)(null);
|
|
44
|
-
const [renderedValue, setRenderedValue] = (0, _react.useState)(null);
|
|
45
|
-
const [field] = (0, _formik.useField)(name);
|
|
46
|
-
const [selectedDate, setSelectedDate] = (0, _react.useState)(value ? (0, _moment.default)(value, format === "DD/MM/YYYY HH:mm" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD HH:mm:ss", true).isValid() ? (0, _moment.default)(value).format("YYYY-MM-DD") : (0, _moment.default)().format("YYYY-MM-DD") : (0, _moment.default)().format("YYYY-MM-DD"));
|
|
47
|
-
const [selectedTime, setSelectedTime] = (0, _react.useState)(() => {
|
|
48
|
-
if (value) {
|
|
49
|
-
const parsedTime = (0, _moment.default)(value, format === "DD/MM/YYYY HH:mm:ss" ? "HH:mm:ss" : "HH:mm", true);
|
|
50
|
-
if (parsedTime.isValid()) {
|
|
51
|
-
return parsedTime.format(format === "DD/MM/YYYY HH:mm:ss" ? "HH:mm:ss" : "HH:mm");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return format === "DD/MM/YYYY HH:mm:ss" ? "00:00:00" : "00:00";
|
|
55
|
-
});
|
|
56
|
-
const [selectedHour, setSelectedHour] = (0, _react.useState)((0, _moment.default)(selectedTime, format === "DD/MM/YYYY HH:mm" ? "HH:mm" : "HH:mm:ss").format("HH"));
|
|
57
|
-
const [selectedMinute, setSelectedMinute] = (0, _react.useState)((0, _moment.default)(selectedTime, format === "DD/MM/YYYY HH:mm" ? "HH:mm" : "HH:mm:ss").format("mm"));
|
|
58
|
-
const [selectedSecond, setSelectedSecond] = (0, _react.useState)((0, _moment.default)(selectedTime, format === "DD/MM/YYYY HH:mm" ? "HH:mm" : "HH:mm:ss").format("ss"));
|
|
59
|
-
const openDatePopover = Boolean(anchorEl);
|
|
60
|
-
const openTimePopover = Boolean(timeAnchorEl);
|
|
61
|
-
(0, _react.useEffect)(() => {
|
|
62
|
-
if (value) {
|
|
63
|
-
// Check if the value is a valid ISO string or formatted value
|
|
64
|
-
const isIsoString = (0, _moment.default)(value, _moment.default.ISO_8601, true).isValid();
|
|
65
|
-
const parsedDate = isIsoString ? (0, _moment.default)(value) : (0, _moment.default)(value, format, true);
|
|
66
|
-
if (parsedDate.isValid()) {
|
|
67
|
-
const datePart = parsedDate.format(format.split(" ")[0]);
|
|
68
|
-
const timePart = parsedDate.format(format === "DD/MM/YYYY HH:mm:ss" ? "HH:mm:ss" : "HH:mm");
|
|
69
|
-
setRenderedValue("".concat(datePart, " ").concat(timePart));
|
|
70
|
-
} else {
|
|
71
|
-
// Fallback to an empty string or default value
|
|
72
|
-
setRenderedValue("");
|
|
73
|
-
}
|
|
74
|
-
} else {
|
|
75
|
-
setRenderedValue("");
|
|
76
|
-
}
|
|
77
|
-
}, [value, format]);
|
|
78
|
-
const updateCombinedDateTime = (newDate, newTime) => {
|
|
79
|
-
const combinedDateTime = (0, _moment.default)("".concat(newDate, " ").concat(newTime || (format === "DD/MM/YYYY HH:mm:ss" ? "00:00:00" : "00:00")), format === "DD/MM/YYYY HH:mm:ss" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm", true).toISOString();
|
|
80
|
-
if ((0, _moment.default)(combinedDateTime).isValid()) {
|
|
81
|
-
const formattedDate = (0, _moment.default)(combinedDateTime).format(format);
|
|
82
|
-
setRenderedValue(formattedDate);
|
|
83
|
-
onChange(combinedDateTime); // Ensure parent component receives the ISO string
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const handleDateTimeClick = event => setAnchorEl(event.currentTarget);
|
|
87
|
-
const handleTimeClick = event => {
|
|
88
|
-
setTimeAnchorEl(event.currentTarget);
|
|
89
|
-
};
|
|
90
|
-
const handleDateClose = () => setAnchorEl(null);
|
|
91
|
-
const handleTimeClose = () => setTimeAnchorEl(null);
|
|
92
|
-
const handleDateChange = date => {
|
|
93
|
-
setSelectedDate(date);
|
|
94
|
-
updateCombinedDateTime(date, selectedTime);
|
|
95
|
-
};
|
|
96
|
-
const handleHourChange = event => {
|
|
97
|
-
const newHour = event.target.value;
|
|
98
|
-
setSelectedHour(newHour);
|
|
99
|
-
let newTime = "".concat(newHour, ":").concat(selectedMinute);
|
|
100
|
-
if (format === "DD/MM/YYYY HH:mm:ss") {
|
|
101
|
-
newTime = "".concat(newHour, ":").concat(selectedMinute, ":").concat(selectedSecond);
|
|
102
|
-
}
|
|
103
|
-
setSelectedTime(newTime);
|
|
104
|
-
updateCombinedDateTime(selectedDate, newTime);
|
|
105
|
-
};
|
|
106
|
-
const handleMinuteChange = event => {
|
|
107
|
-
const newMinute = event.target.value;
|
|
108
|
-
setSelectedMinute(newMinute);
|
|
109
|
-
let newTime = "".concat(selectedHour, ":").concat(newMinute);
|
|
110
|
-
if (format === "DD/MM/YYYY HH:mm:ss") {
|
|
111
|
-
newTime = "".concat(selectedHour, ":").concat(newMinute, ":").concat(selectedSecond);
|
|
112
|
-
}
|
|
113
|
-
setSelectedTime(newTime);
|
|
114
|
-
updateCombinedDateTime(selectedDate, newTime);
|
|
115
|
-
};
|
|
116
|
-
const handleSecondChange = event => {
|
|
117
|
-
const newSecond = event.target.value;
|
|
118
|
-
setSelectedSecond(newSecond);
|
|
119
|
-
let newTime = "".concat(selectedHour, ":").concat(selectedMinute, ":").concat(newSecond);
|
|
120
|
-
setSelectedTime(newTime);
|
|
121
|
-
updateCombinedDateTime(selectedDate, newTime);
|
|
122
|
-
};
|
|
123
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
124
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTextField.default, {
|
|
125
|
-
name: name,
|
|
126
|
-
label: label,
|
|
127
|
-
value: renderedValue || "",
|
|
128
|
-
onClick: handleDateTimeClick,
|
|
129
|
-
readOnly: true,
|
|
130
|
-
error: error,
|
|
131
|
-
helperText: helperText,
|
|
132
|
-
required: required,
|
|
133
|
-
InputProps: {
|
|
134
|
-
endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputAdornment.default, {
|
|
135
|
-
position: "end",
|
|
136
|
-
style: {
|
|
137
|
-
marginLeft: -10,
|
|
138
|
-
marginTop: "-0.1px"
|
|
139
|
-
},
|
|
140
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarMonth.default, {
|
|
141
|
-
fontSize: "small"
|
|
142
|
-
})
|
|
143
|
-
})
|
|
144
|
-
}
|
|
145
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Popover, {
|
|
146
|
-
open: openDatePopover,
|
|
147
|
-
anchorEl: anchorEl,
|
|
148
|
-
onClose: handleDateClose,
|
|
149
|
-
anchorOrigin: {
|
|
150
|
-
vertical: "bottom",
|
|
151
|
-
horizontal: "left"
|
|
152
|
-
},
|
|
153
|
-
style: {
|
|
154
|
-
width: "310px"
|
|
155
|
-
},
|
|
156
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
157
|
-
style: {
|
|
158
|
-
padding: 16
|
|
159
|
-
},
|
|
160
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
161
|
-
sx: {
|
|
162
|
-
display: "flex",
|
|
163
|
-
alignItems: "center",
|
|
164
|
-
justifyContent: "space-around"
|
|
165
|
-
},
|
|
166
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.DateInput, {
|
|
167
|
-
value: selectedDate,
|
|
168
|
-
onChange: date => handleDateChange(date)
|
|
169
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
170
|
-
value: selectedTime || (format === "DD/MM/YYYY HH:mm:ss" ? "00:00:00" : "00:00"),
|
|
171
|
-
onChange: event => {
|
|
172
|
-
const inputValue = event.target.value;
|
|
173
|
-
const allowedChars = format === "DD/MM/YYYY HH:mm" ? /^[0-9:]{0,5}$/ : /^[0-9:]{0,8}$/;
|
|
174
|
-
if (allowedChars.test(inputValue)) {
|
|
175
|
-
setSelectedTime(inputValue);
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
onBlur: () => {
|
|
179
|
-
const timeParts = selectedTime.split(":");
|
|
180
|
-
const isFullFormat = format === "DD/MM/YYYY HH:mm:ss";
|
|
181
|
-
let [validatedHour, validatedMinute, validatedSecond] = ["00", "00", isFullFormat ? "00" : undefined];
|
|
182
|
-
if (timeParts.length > 0) {
|
|
183
|
-
validatedHour = Math.min(23, parseInt(timeParts[0] || "0", 10)).toString().padStart(2, "0");
|
|
184
|
-
}
|
|
185
|
-
if (timeParts.length > 1) {
|
|
186
|
-
validatedMinute = Math.min(59, parseInt(timeParts[1] || "0", 10)).toString().padStart(2, "0");
|
|
187
|
-
}
|
|
188
|
-
if (isFullFormat && timeParts.length > 2) {
|
|
189
|
-
validatedSecond = Math.min(59, parseInt(timeParts[2] || "0", 10)).toString().padStart(2, "0");
|
|
190
|
-
}
|
|
191
|
-
const updatedTime = isFullFormat ? "".concat(validatedHour, ":").concat(validatedMinute, ":").concat(validatedSecond) : "".concat(validatedHour, ":").concat(validatedMinute);
|
|
192
|
-
setSelectedTime(updatedTime);
|
|
193
|
-
updateCombinedDateTime(selectedDate, updatedTime);
|
|
194
|
-
},
|
|
195
|
-
sx: {
|
|
196
|
-
"& .MuiInputBase-root": {
|
|
197
|
-
width: "100%",
|
|
198
|
-
fontSize: 12.5
|
|
199
|
-
},
|
|
200
|
-
"& .MuiOutlinedInput-input": {
|
|
201
|
-
padding: "4px",
|
|
202
|
-
height: "23.5px"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
InputProps: {
|
|
206
|
-
startAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputAdornment.default, {
|
|
207
|
-
onClick: handleTimeClick,
|
|
208
|
-
position: "start",
|
|
209
|
-
style: {
|
|
210
|
-
marginLeft: -10,
|
|
211
|
-
cursor: "pointer"
|
|
212
|
-
},
|
|
213
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
|
|
214
|
-
fontSize: "small"
|
|
215
|
-
})
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
})]
|
|
219
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.default, {
|
|
220
|
-
date: selectedDate,
|
|
221
|
-
onSelect: date => handleDateChange(date),
|
|
222
|
-
minDate: minDate,
|
|
223
|
-
maxDate: maxDate
|
|
224
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
225
|
-
sx: {
|
|
226
|
-
textAlign: "right",
|
|
227
|
-
padding: 1
|
|
228
|
-
},
|
|
229
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
230
|
-
onClick: handleDateClose,
|
|
231
|
-
children: "Choisir"
|
|
232
|
-
})
|
|
233
|
-
})]
|
|
234
|
-
})
|
|
235
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Popover, {
|
|
236
|
-
open: openTimePopover,
|
|
237
|
-
anchorEl: timeAnchorEl,
|
|
238
|
-
onClose: handleTimeClose,
|
|
239
|
-
anchorOrigin: {
|
|
240
|
-
vertical: "bottom",
|
|
241
|
-
horizontal: "left"
|
|
242
|
-
},
|
|
243
|
-
style: {
|
|
244
|
-
marginTop: 16,
|
|
245
|
-
marginLeft: -4
|
|
246
|
-
},
|
|
247
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
248
|
-
style: {
|
|
249
|
-
padding: 4,
|
|
250
|
-
display: "flex",
|
|
251
|
-
justifyContent: "center",
|
|
252
|
-
width: "120px",
|
|
253
|
-
height: "25px"
|
|
254
|
-
},
|
|
255
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
256
|
-
value: selectedHour,
|
|
257
|
-
onChange: handleHourChange,
|
|
258
|
-
sx: {
|
|
259
|
-
padding: 0,
|
|
260
|
-
width: 40,
|
|
261
|
-
"& .MuiSelect-select": {
|
|
262
|
-
padding: "4px",
|
|
263
|
-
fontSize: 12.5
|
|
264
|
-
},
|
|
265
|
-
"& .MuiSvgIcon-root": {
|
|
266
|
-
width: "14px"
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
MenuProps: {
|
|
270
|
-
PaperProps: {
|
|
271
|
-
sx: {
|
|
272
|
-
maxHeight: "200px",
|
|
273
|
-
width: "20px",
|
|
274
|
-
"& ul": {
|
|
275
|
-
overflowY: "auto",
|
|
276
|
-
scrollbarWidth: "thin",
|
|
277
|
-
"&::-webkit-scrollbar": {
|
|
278
|
-
width: "6px",
|
|
279
|
-
backgroundColor: "#f0f0f0"
|
|
280
|
-
},
|
|
281
|
-
"&::-webkit-scrollbar-thumb": {
|
|
282
|
-
backgroundColor: "#888",
|
|
283
|
-
borderRadius: "4px"
|
|
284
|
-
},
|
|
285
|
-
"&::-webkit-scrollbar-thumb:hover": {
|
|
286
|
-
backgroundColor: "#555"
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
children: [...Array(24).keys()].map(hour => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
293
|
-
value: hour.toString().padStart(2, "0"),
|
|
294
|
-
style: {
|
|
295
|
-
fontSize: 12.5,
|
|
296
|
-
right: 12
|
|
297
|
-
},
|
|
298
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
299
|
-
children: hour.toString().padStart(2, "0")
|
|
300
|
-
})
|
|
301
|
-
}, hour))
|
|
302
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
303
|
-
value: selectedMinute,
|
|
304
|
-
onChange: handleMinuteChange,
|
|
305
|
-
sx: {
|
|
306
|
-
padding: 0,
|
|
307
|
-
width: 40,
|
|
308
|
-
"& .MuiSelect-select": {
|
|
309
|
-
padding: "4px",
|
|
310
|
-
fontSize: 12.5
|
|
311
|
-
},
|
|
312
|
-
"& .MuiSvgIcon-root": {
|
|
313
|
-
width: "14px"
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
MenuProps: {
|
|
317
|
-
PaperProps: {
|
|
318
|
-
sx: {
|
|
319
|
-
maxHeight: "200px",
|
|
320
|
-
width: "20px",
|
|
321
|
-
"& ul": {
|
|
322
|
-
overflowY: "auto",
|
|
323
|
-
scrollbarWidth: "thin",
|
|
324
|
-
"&::-webkit-scrollbar": {
|
|
325
|
-
width: "6px",
|
|
326
|
-
backgroundColor: "#f0f0f0"
|
|
327
|
-
},
|
|
328
|
-
"&::-webkit-scrollbar-thumb": {
|
|
329
|
-
backgroundColor: "#888",
|
|
330
|
-
borderRadius: "4px"
|
|
331
|
-
},
|
|
332
|
-
"&::-webkit-scrollbar-thumb:hover": {
|
|
333
|
-
backgroundColor: "#555"
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
children: [...Array(60).keys()].map(minute => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
340
|
-
value: minute.toString().padStart(2, "0"),
|
|
341
|
-
style: {
|
|
342
|
-
fontSize: 12.5,
|
|
343
|
-
right: 12
|
|
344
|
-
},
|
|
345
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
346
|
-
children: minute.toString().padStart(2, "0")
|
|
347
|
-
})
|
|
348
|
-
}, minute))
|
|
349
|
-
}), format === "DD/MM/YYYY HH:mm:ss" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
350
|
-
value: selectedSecond,
|
|
351
|
-
onChange: handleSecondChange,
|
|
352
|
-
sx: {
|
|
353
|
-
padding: 0,
|
|
354
|
-
width: 40,
|
|
355
|
-
"& .MuiSelect-select": {
|
|
356
|
-
padding: "4px",
|
|
357
|
-
fontSize: 12.5
|
|
358
|
-
},
|
|
359
|
-
"& .MuiSvgIcon-root": {
|
|
360
|
-
width: "14px"
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
MenuProps: {
|
|
364
|
-
PaperProps: {
|
|
365
|
-
sx: {
|
|
366
|
-
maxHeight: "200px",
|
|
367
|
-
width: "20px",
|
|
368
|
-
"& ul": {
|
|
369
|
-
overflowY: "auto",
|
|
370
|
-
scrollbarWidth: "thin",
|
|
371
|
-
"&::-webkit-scrollbar": {
|
|
372
|
-
width: "6px",
|
|
373
|
-
backgroundColor: "#f0f0f0"
|
|
374
|
-
},
|
|
375
|
-
"&::-webkit-scrollbar-thumb": {
|
|
376
|
-
backgroundColor: "#888",
|
|
377
|
-
borderRadius: "4px"
|
|
378
|
-
},
|
|
379
|
-
"&::-webkit-scrollbar-thumb:hover": {
|
|
380
|
-
backgroundColor: "#555"
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
children: [...Array(60).keys()].map(minute => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
387
|
-
value: minute.toString().padStart(2, "0"),
|
|
388
|
-
style: {
|
|
389
|
-
fontSize: 12.5,
|
|
390
|
-
right: 12
|
|
391
|
-
},
|
|
392
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
393
|
-
children: minute.toString().padStart(2, "0")
|
|
394
|
-
})
|
|
395
|
-
}, minute))
|
|
396
|
-
})]
|
|
397
|
-
})
|
|
398
|
-
})]
|
|
399
|
-
});
|
|
400
|
-
};
|
|
401
|
-
var _default = exports.default = DateTimePickerField;
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
.datepicker---date-picker-container---1kNBY {
|
|
2
|
-
-webkit-box-sizing: border-box;
|
|
3
|
-
-moz-box-sizing: border-box;
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
line-height: 20px;
|
|
6
|
-
border: none;
|
|
7
|
-
border-radius: 0;
|
|
8
|
-
-webkit-box-shadow: none;
|
|
9
|
-
box-shadow: none;
|
|
10
|
-
padding: 0 5px;
|
|
11
|
-
position: relative;
|
|
12
|
-
display: inline-block;
|
|
13
|
-
}
|
|
14
|
-
.datepicker---date-picker-container---1kNBY *,
|
|
15
|
-
.datepicker---date-picker-container---1kNBY *:before,
|
|
16
|
-
.datepicker---date-picker-container---1kNBY *:after {
|
|
17
|
-
-webkit-box-sizing: inherit;
|
|
18
|
-
-moz-box-sizing: inherit;
|
|
19
|
-
box-sizing: inherit;
|
|
20
|
-
}
|
|
21
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__header {
|
|
22
|
-
text-align: center;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
border: none;
|
|
25
|
-
position: relative;
|
|
26
|
-
padding: 0;
|
|
27
|
-
}
|
|
28
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__month {
|
|
29
|
-
margin: 0;
|
|
30
|
-
text-align: center;
|
|
31
|
-
}
|
|
32
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__current-month {
|
|
33
|
-
color: #222;
|
|
34
|
-
font-family: "Roboto", sans-serif !important;
|
|
35
|
-
font-weight: bold;
|
|
36
|
-
font-size: 13px;
|
|
37
|
-
height: 20px;
|
|
38
|
-
margin: 8px 0;
|
|
39
|
-
}
|
|
40
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__navigation {
|
|
41
|
-
background: none;
|
|
42
|
-
line-height: 20px;
|
|
43
|
-
text-align: center;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: 3px;
|
|
47
|
-
padding: 5px;
|
|
48
|
-
border: none;
|
|
49
|
-
z-index: 1;
|
|
50
|
-
outline: 0;
|
|
51
|
-
width: 30px;
|
|
52
|
-
height: 30px;
|
|
53
|
-
background-color: transparent;
|
|
54
|
-
background-position: center center;
|
|
55
|
-
background-repeat: no-repeat;
|
|
56
|
-
}
|
|
57
|
-
.datepicker---date-picker-container---1kNBY
|
|
58
|
-
.react-datepicker__navigation:hover {
|
|
59
|
-
border-radius: 3px;
|
|
60
|
-
background-color: #eee;
|
|
61
|
-
}
|
|
62
|
-
.datepicker---date-picker-container---1kNBY
|
|
63
|
-
.react-datepicker__navigation--previous {
|
|
64
|
-
left: 8px;
|
|
65
|
-
background-image: url(data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgVHJlbmQgTWljcm8gU3R5bGUgUG9ydGFsIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPg0KICA8dGl0bGU+YW5nbGUtbGVmdDwvdGl0bGU+DQogIDxwYXRoIGZpbGw9InJnYigzNCwzNCwzNCkiIGQ9Ik05LjUwMSAxMi41MDZsLTQuNDk5LTQuNTA2IDQuNDg4LTQuNDk0IDEgMS0zLjQ5IDMuNDk0IDMuNTAxIDMuNTA2eiI+PC9wYXRoPg0KPC9zdmc+);
|
|
66
|
-
}
|
|
67
|
-
.datepicker---date-picker-container---1kNBY
|
|
68
|
-
.react-datepicker__navigation--next {
|
|
69
|
-
right: 8px;
|
|
70
|
-
background-image: url(data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgVHJlbmQgTWljcm8gU3R5bGUgUG9ydGFsIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPg0KICA8dGl0bGU+YW5nbGUtcmlnaHQ8L3RpdGxlPg0KICA8cGF0aCBmaWxsPSJyZ2IoMzQsMzQsMzQpIiBkPSJNNi41MDEgMTIuNWwtMS0xIDMuNTAxLTMuNTA2LTMuNDktMy40OTQgMS0xIDQuNDg4IDQuNDk0eiI+PC9wYXRoPg0KPC9zdmc+);
|
|
71
|
-
}
|
|
72
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day,
|
|
73
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day-name {
|
|
74
|
-
color: #222;
|
|
75
|
-
display: inline-block;
|
|
76
|
-
text-align: center;
|
|
77
|
-
width: 30px;
|
|
78
|
-
line-height: 20px;
|
|
79
|
-
border: 0;
|
|
80
|
-
padding: 5px;
|
|
81
|
-
margin: 2px;
|
|
82
|
-
}
|
|
83
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day {
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
font-size: 13px;
|
|
86
|
-
font-family: "Roboto", sans-serif !important;
|
|
87
|
-
}
|
|
88
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day:hover {
|
|
89
|
-
background: #eee;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
border-radius: 50%;
|
|
92
|
-
}
|
|
93
|
-
.datepicker---date-picker-container---1kNBY
|
|
94
|
-
.react-datepicker__day.react-datepicker__day--disabled,
|
|
95
|
-
.datepicker---date-picker-container---1kNBY
|
|
96
|
-
.react-datepicker__day:hover.react-datepicker__day--disabled {
|
|
97
|
-
background: inherit;
|
|
98
|
-
cursor: default;
|
|
99
|
-
color: #bbb;
|
|
100
|
-
}
|
|
101
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day-name {
|
|
102
|
-
padding-top: 9px;
|
|
103
|
-
font-size: 12px;
|
|
104
|
-
font-weight: bold;
|
|
105
|
-
font-family: "Roboto", sans-serif !important;
|
|
106
|
-
}
|
|
107
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day-names {
|
|
108
|
-
white-space: nowrap;
|
|
109
|
-
}
|
|
110
|
-
.datepicker---date-picker-container---1kNBY
|
|
111
|
-
.react-datepicker__day--outside-month {
|
|
112
|
-
color: #bbb;
|
|
113
|
-
}
|
|
114
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day--today {
|
|
115
|
-
color: #888 !important;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.datepicker---date-picker-container---1kNBY
|
|
119
|
-
.react-datepicker__day--today.react-datepicker__day--selected {
|
|
120
|
-
color: #fff !important;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.datepicker---date-picker-container---1kNBY .react-datepicker__day--selected {
|
|
124
|
-
color: #fff;
|
|
125
|
-
font-weight: bold;
|
|
126
|
-
font-family: "Roboto", sans-serif !important;
|
|
127
|
-
background-color: #232f66 !important;
|
|
128
|
-
border-radius: 50%;
|
|
129
|
-
}
|
|
130
|
-
.datepicker---date-picker-container---1kNBY
|
|
131
|
-
.react-datepicker__day--selected:hover {
|
|
132
|
-
background-color: #232f66 !important;
|
|
133
|
-
}
|
|
134
|
-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
135
|
-
.datepicker---date-input---1vOyn > input {
|
|
136
|
-
height: 32px;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
.datepicker---date-input-container---2zD9B {
|
|
140
|
-
-webkit-box-sizing: border-box;
|
|
141
|
-
-moz-box-sizing: border-box;
|
|
142
|
-
box-sizing: border-box;
|
|
143
|
-
line-height: 20px;
|
|
144
|
-
position: relative;
|
|
145
|
-
}
|
|
146
|
-
.datepicker---date-input-container---2zD9B *,
|
|
147
|
-
.datepicker---date-input-container---2zD9B *:before,
|
|
148
|
-
.datepicker---date-input-container---2zD9B *:after {
|
|
149
|
-
-webkit-box-sizing: inherit;
|
|
150
|
-
-moz-box-sizing: inherit;
|
|
151
|
-
box-sizing: inherit;
|
|
152
|
-
}
|
|
153
|
-
.datepicker---date-input---1vOyn {
|
|
154
|
-
width: 120px;
|
|
155
|
-
}
|
|
156
|
-
.datepicker---date-input---1vOyn > input {
|
|
157
|
-
display: block;
|
|
158
|
-
width: 100%;
|
|
159
|
-
height: auto;
|
|
160
|
-
line-height: inherit;
|
|
161
|
-
padding: 5px 12px;
|
|
162
|
-
padding-left: 30px;
|
|
163
|
-
font-size: 13px;
|
|
164
|
-
font-family: "Roboto", sans-serif !important;
|
|
165
|
-
color: #222;
|
|
166
|
-
border: 1px solid #ccc;
|
|
167
|
-
border-radius: 3px;
|
|
168
|
-
outline: none;
|
|
169
|
-
}
|
|
170
|
-
.datepicker---date-input---1vOyn > input:focus {
|
|
171
|
-
border-color: #232f66 !important;
|
|
172
|
-
}
|
|
173
|
-
.datepicker---date-input-icon---1UeQu {
|
|
174
|
-
position: absolute;
|
|
175
|
-
left: 9px;
|
|
176
|
-
top: 8px;
|
|
177
|
-
color: #666;
|
|
178
|
-
width: 14px;
|
|
179
|
-
height: 14px;
|
|
180
|
-
}
|
|
181
|
-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
182
|
-
.datepicker---time-input---2ICRB > input {
|
|
183
|
-
height: 32px;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
.datepicker---time-input-container---s4Ikh {
|
|
187
|
-
-webkit-box-sizing: border-box;
|
|
188
|
-
-moz-box-sizing: border-box;
|
|
189
|
-
box-sizing: border-box;
|
|
190
|
-
line-height: 20px;
|
|
191
|
-
position: relative;
|
|
192
|
-
}
|
|
193
|
-
.datepicker---time-input-container---s4Ikh *,
|
|
194
|
-
.datepicker---time-input-container---s4Ikh *:before,
|
|
195
|
-
.datepicker---time-input-container---s4Ikh *:after {
|
|
196
|
-
-webkit-box-sizing: inherit;
|
|
197
|
-
-moz-box-sizing: inherit;
|
|
198
|
-
box-sizing: inherit;
|
|
199
|
-
}
|
|
200
|
-
.datepicker---time-input---2ICRB {
|
|
201
|
-
width: 120px;
|
|
202
|
-
}
|
|
203
|
-
.datepicker---time-input---2ICRB > input {
|
|
204
|
-
display: block;
|
|
205
|
-
width: 100%;
|
|
206
|
-
height: auto;
|
|
207
|
-
line-height: inherit;
|
|
208
|
-
padding: 5px 12px;
|
|
209
|
-
padding-left: 30px;
|
|
210
|
-
font-size: 13px;
|
|
211
|
-
font-family: "Roboto", sans-serif !important;
|
|
212
|
-
color: #222;
|
|
213
|
-
border: 1px solid #ccc;
|
|
214
|
-
border-radius: 3px;
|
|
215
|
-
outline: none;
|
|
216
|
-
}
|
|
217
|
-
.datepicker---time-input---2ICRB > input:focus {
|
|
218
|
-
border-color: #232f66 !important;
|
|
219
|
-
}
|
|
220
|
-
.datepicker---time-input-icon---3TeZ8 {
|
|
221
|
-
position: absolute;
|
|
222
|
-
left: 9px;
|
|
223
|
-
top: 8px;
|
|
224
|
-
color: #666;
|
|
225
|
-
width: 14px;
|
|
226
|
-
height: 14px;
|
|
227
|
-
}
|