@portnet/ui 0.1.20 → 0.1.22
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.
|
@@ -7,14 +7,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
require("core-js/modules/es.symbol.description.js");
|
|
10
|
+
var _material = require("@mui/material");
|
|
10
11
|
var _styles = require("@mui/material/styles");
|
|
11
|
-
var
|
|
12
|
+
var _DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
12
13
|
var _formik = require("formik");
|
|
13
14
|
var _moment = _interopRequireDefault(require("moment"));
|
|
14
15
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
16
|
var React = _interopRequireWildcard(require("react"));
|
|
16
17
|
var _apperance = require("../../config/apperance");
|
|
18
|
+
var _PuiButton = _interopRequireDefault(require("../buttons/PuiButton"));
|
|
17
19
|
var _StyledMuiTextField = _interopRequireDefault(require("../common/StyledMuiTextField"));
|
|
20
|
+
var _PuiDialog = _interopRequireDefault(require("../others/PuiDialog"));
|
|
21
|
+
var _PuiTextField = _interopRequireDefault(require("./PuiTextField"));
|
|
18
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
23
|
const _excluded = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
20
24
|
_excluded2 = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
@@ -31,22 +35,110 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
31
35
|
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); }
|
|
32
36
|
const StyledDateMuiTextField = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledMuiTextField.default, _objectSpread({
|
|
33
37
|
ref: ref
|
|
34
|
-
}, props))))(() => {
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
height: "16px"
|
|
44
|
-
}
|
|
38
|
+
}, props))))(() => ({
|
|
39
|
+
"&.MuiFormControl-root": {
|
|
40
|
+
display: "block",
|
|
41
|
+
"& .MuiInputAdornment-root .MuiButtonBase-root": {
|
|
42
|
+
padding: "6px",
|
|
43
|
+
marginRight: "-8px",
|
|
44
|
+
"& .MuiSvgIcon-root": {
|
|
45
|
+
width: "16px",
|
|
46
|
+
height: "16px"
|
|
45
47
|
}
|
|
46
48
|
}
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
const TimePickerDialog = _ref => {
|
|
52
|
+
var _ref2, _position$top, _ref3, _ref4;
|
|
53
|
+
let {
|
|
54
|
+
open,
|
|
55
|
+
selectedDate,
|
|
56
|
+
onTimeSelected,
|
|
57
|
+
onClose,
|
|
58
|
+
position
|
|
59
|
+
} = _ref;
|
|
60
|
+
const defaultTime = (0, _moment.default)(selectedDate).isValid() ? (0, _moment.default)(selectedDate).format("HH:mm") : (0, _moment.default)().format("HH:mm");
|
|
61
|
+
const [selectedTime, setSelectedTime] = React.useState(defaultTime);
|
|
62
|
+
const handleTimeChange = event => {
|
|
63
|
+
setSelectedTime(event.target.value);
|
|
47
64
|
};
|
|
48
|
-
|
|
49
|
-
|
|
65
|
+
const handleOk = () => {
|
|
66
|
+
onTimeSelected(selectedTime);
|
|
67
|
+
onClose();
|
|
68
|
+
};
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiDialog.default, {
|
|
70
|
+
open: open,
|
|
71
|
+
onClose: onClose,
|
|
72
|
+
slotProps: {
|
|
73
|
+
backdrop: {
|
|
74
|
+
style: {
|
|
75
|
+
backgroundColor: "transparent",
|
|
76
|
+
boxShadow: "none"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
hideBackdrop: true,
|
|
81
|
+
PaperProps: {
|
|
82
|
+
elevation: 5,
|
|
83
|
+
sx: {
|
|
84
|
+
backgroundColor: "white",
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
display: "flex",
|
|
87
|
+
width: 340,
|
|
88
|
+
maxWidth: "720px!important",
|
|
89
|
+
position: "fixed",
|
|
90
|
+
height: 48,
|
|
91
|
+
left: (_ref2 = (position === null || position === void 0 ? void 0 : position.left) - 420 / 2) !== null && _ref2 !== void 0 ? _ref2 : 0,
|
|
92
|
+
top: (_position$top = position === null || position === void 0 ? void 0 : position.top) !== null && _position$top !== void 0 ? _position$top : 0,
|
|
93
|
+
paddingLeft: 0
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
97
|
+
sx: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
alignContent: "center",
|
|
101
|
+
marginTop: 1,
|
|
102
|
+
gap: 2,
|
|
103
|
+
width: 340,
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
left: (_ref3 = (position === null || position === void 0 ? void 0 : position.left) - 380 / 2) !== null && _ref3 !== void 0 ? _ref3 : 0,
|
|
106
|
+
top: (_ref4 = (position === null || position === void 0 ? void 0 : position.top) + 36) !== null && _ref4 !== void 0 ? _ref4 : 36,
|
|
107
|
+
paddingLeft: 1.5,
|
|
108
|
+
position: "fixed"
|
|
109
|
+
},
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTextField.default, {
|
|
111
|
+
id: "time",
|
|
112
|
+
type: "time",
|
|
113
|
+
value: selectedTime,
|
|
114
|
+
onChange: handleTimeChange,
|
|
115
|
+
InputLabelProps: {
|
|
116
|
+
shrink: true
|
|
117
|
+
},
|
|
118
|
+
inputProps: {
|
|
119
|
+
step: 60
|
|
120
|
+
},
|
|
121
|
+
formik: false,
|
|
122
|
+
sx: {
|
|
123
|
+
width: 150
|
|
124
|
+
}
|
|
125
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
126
|
+
onClick: onClose,
|
|
127
|
+
sx: {
|
|
128
|
+
color: _apperance.palette.primary
|
|
129
|
+
},
|
|
130
|
+
children: "Cancel"
|
|
131
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
132
|
+
onClick: handleOk,
|
|
133
|
+
sx: {
|
|
134
|
+
color: _apperance.palette.primary
|
|
135
|
+
},
|
|
136
|
+
children: "OK"
|
|
137
|
+
})]
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
50
142
|
let {
|
|
51
143
|
id,
|
|
52
144
|
className,
|
|
@@ -57,8 +149,8 @@ const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
57
149
|
value,
|
|
58
150
|
minDate,
|
|
59
151
|
maxDate,
|
|
60
|
-
inputFormat,
|
|
61
|
-
format,
|
|
152
|
+
inputFormat = "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
153
|
+
format = "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
62
154
|
disablePast,
|
|
63
155
|
disableFuture,
|
|
64
156
|
error,
|
|
@@ -68,55 +160,93 @@ const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
68
160
|
helperText,
|
|
69
161
|
onChange,
|
|
70
162
|
onBlur
|
|
71
|
-
} =
|
|
72
|
-
rest = _objectWithoutProperties(
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
163
|
+
} = _ref5,
|
|
164
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
165
|
+
const textFieldRef = React.useRef(null);
|
|
166
|
+
const [dateTime, setDateTime] = React.useState(value || null);
|
|
167
|
+
const minDateObj = minDate ? (0, _moment.default)(minDate, format).toDate() : undefined;
|
|
168
|
+
const maxDateObj = maxDate ? (0, _moment.default)(maxDate, format).toDate() : undefined;
|
|
169
|
+
const [displayedDateTime, setDisplayedDateTime] = React.useState(value || null);
|
|
170
|
+
const [openTimePicker, setOpenTimePicker] = React.useState(false);
|
|
171
|
+
const [dialogPosition, setDialogPosition] = React.useState();
|
|
172
|
+
const handleDateChange = date => {
|
|
173
|
+
if (date) {
|
|
174
|
+
setDateTime((0, _moment.default)(date).format(format));
|
|
175
|
+
setOpenTimePicker(true);
|
|
176
|
+
}
|
|
76
177
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
hours: null,
|
|
93
|
-
minutes: null,
|
|
94
|
-
seconds: null
|
|
95
|
-
},
|
|
96
|
-
PopperProps: {
|
|
97
|
-
sx: {
|
|
98
|
-
"& .MuiButtonBase-root.Mui-selected, & .MuiButtonBase-root.Mui-selected:focus, & .MuiButtonBase-root.Mui-selected:hover": {
|
|
99
|
-
backgroundColor: _apperance.palette.primary
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDateMuiTextField, _objectSpread(_objectSpread({
|
|
104
|
-
id: id,
|
|
105
|
-
className: className,
|
|
106
|
-
name: name,
|
|
107
|
-
required: required,
|
|
108
|
-
fullWidth: fullWidth,
|
|
109
|
-
onBlur: onBlur,
|
|
110
|
-
helperText: helperText
|
|
111
|
-
}, params), {}, {
|
|
112
|
-
error: params.error || error,
|
|
113
|
-
inputProps: {
|
|
114
|
-
name
|
|
178
|
+
const handleTimeSelected = time => {
|
|
179
|
+
const newDateTime = (0, _moment.default)(dateTime).format("YYYY-MM-DD") + "T" + time;
|
|
180
|
+
const updatedDateTime = (0, _moment.default)(newDateTime, "YYYY-MM-DDTHH:mm").format(format);
|
|
181
|
+
setDateTime(updatedDateTime);
|
|
182
|
+
setDisplayedDateTime(updatedDateTime);
|
|
183
|
+
onChange(updatedDateTime);
|
|
184
|
+
};
|
|
185
|
+
React.useEffect(() => {
|
|
186
|
+
const updatePosition = () => {
|
|
187
|
+
if (textFieldRef.current) {
|
|
188
|
+
const rect = textFieldRef.current.getBoundingClientRect();
|
|
189
|
+
setDialogPosition({
|
|
190
|
+
left: rect.left + rect.width / 2 + window.scrollX,
|
|
191
|
+
top: rect.top > 310 ? rect.top - 80 : rect.top + 80
|
|
192
|
+
});
|
|
115
193
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
194
|
+
};
|
|
195
|
+
updatePosition();
|
|
196
|
+
window.addEventListener("resize", updatePosition);
|
|
197
|
+
window.addEventListener("scroll", updatePosition);
|
|
198
|
+
return () => {
|
|
199
|
+
window.removeEventListener("resize", updatePosition);
|
|
200
|
+
window.removeEventListener("scroll", updatePosition);
|
|
201
|
+
};
|
|
202
|
+
}, []);
|
|
203
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
204
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DatePicker.DatePicker, _objectSpread({
|
|
205
|
+
ref: ref,
|
|
206
|
+
sx: sx,
|
|
207
|
+
ampm: false,
|
|
208
|
+
label: label,
|
|
209
|
+
inputFormat: "DD/MM/yyyy HH:mm",
|
|
210
|
+
value: displayedDateTime,
|
|
211
|
+
onChange: handleDateChange,
|
|
212
|
+
disablePast: disablePast,
|
|
213
|
+
disableFuture: disableFuture,
|
|
214
|
+
disabled: disabled,
|
|
215
|
+
maxDate: maxDateObj,
|
|
216
|
+
minDate: minDateObj,
|
|
217
|
+
readOnly: readOnly,
|
|
218
|
+
PopperProps: {
|
|
219
|
+
sx: {
|
|
220
|
+
"& .MuiButtonBase-root.Mui-selected, & .MuiButtonBase-root.Mui-selected:focus, & .MuiButtonBase-root.Mui-selected:hover": {
|
|
221
|
+
backgroundColor: _apperance.palette.primary
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDateMuiTextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
226
|
+
ref: textFieldRef,
|
|
227
|
+
id: id,
|
|
228
|
+
className: className,
|
|
229
|
+
label: label,
|
|
230
|
+
name: name,
|
|
231
|
+
required: required,
|
|
232
|
+
fullWidth: fullWidth,
|
|
233
|
+
onBlur: onBlur,
|
|
234
|
+
helperText: helperText,
|
|
235
|
+
error: error,
|
|
236
|
+
inputProps: _objectSpread(_objectSpread({}, params.inputProps), {}, {
|
|
237
|
+
readOnly: readOnly
|
|
238
|
+
})
|
|
239
|
+
}))
|
|
240
|
+
}, rest)), /*#__PURE__*/(0, _jsxRuntime.jsx)(TimePickerDialog, {
|
|
241
|
+
open: openTimePicker,
|
|
242
|
+
selectedDate: dateTime,
|
|
243
|
+
onTimeSelected: handleTimeSelected,
|
|
244
|
+
onClose: () => setOpenTimePicker(false),
|
|
245
|
+
position: dialogPosition
|
|
246
|
+
})]
|
|
247
|
+
});
|
|
118
248
|
});
|
|
119
|
-
const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((
|
|
249
|
+
const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
120
250
|
let {
|
|
121
251
|
id,
|
|
122
252
|
className,
|
|
@@ -138,17 +268,16 @@ const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
138
268
|
helperText,
|
|
139
269
|
onChange,
|
|
140
270
|
onBlur
|
|
141
|
-
} =
|
|
142
|
-
rest = _objectWithoutProperties(
|
|
271
|
+
} = _ref6,
|
|
272
|
+
rest = _objectWithoutProperties(_ref6, _excluded2);
|
|
143
273
|
const [field, meta] = (0, _formik.useField)(name);
|
|
144
274
|
const formikContext = (0, _formik.useFormikContext)();
|
|
145
275
|
const [hasError, setHasError] = React.useState(false);
|
|
276
|
+
const minDateObj = minDate ? (0, _moment.default)(minDate, format).toDate() : undefined;
|
|
277
|
+
const maxDateObj = maxDate ? (0, _moment.default)(maxDate, format).toDate() : undefined;
|
|
146
278
|
const handleChange = value => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (onChange) {
|
|
150
|
-
onChange(formattedValue);
|
|
151
|
-
}
|
|
279
|
+
formikContext.setFieldValue(name, value);
|
|
280
|
+
onChange(value);
|
|
152
281
|
};
|
|
153
282
|
const handleBlur = event => {
|
|
154
283
|
onBlur(event);
|
|
@@ -173,7 +302,8 @@ const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
173
302
|
required: required,
|
|
174
303
|
value: Boolean(field.value) ? format ? _moment.default.utc(field.value, format) : _moment.default.utc(field.value) : null,
|
|
175
304
|
format: format,
|
|
176
|
-
minDate:
|
|
305
|
+
minDate: minDateObj,
|
|
306
|
+
maxDate: maxDateObj,
|
|
177
307
|
inputFormat: inputFormat,
|
|
178
308
|
disableFuture: disableFuture,
|
|
179
309
|
disablePast: disablePast,
|
|
@@ -186,7 +316,7 @@ const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
186
316
|
onBlur: handleBlur
|
|
187
317
|
}, rest));
|
|
188
318
|
});
|
|
189
|
-
const PuiDateTimeField = /*#__PURE__*/React.forwardRef((
|
|
319
|
+
const PuiDateTimeField = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
190
320
|
let {
|
|
191
321
|
formik,
|
|
192
322
|
id,
|
|
@@ -209,8 +339,8 @@ const PuiDateTimeField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
209
339
|
helperText,
|
|
210
340
|
onChange,
|
|
211
341
|
onBlur
|
|
212
|
-
} =
|
|
213
|
-
rest = _objectWithoutProperties(
|
|
342
|
+
} = _ref7,
|
|
343
|
+
rest = _objectWithoutProperties(_ref7, _excluded3);
|
|
214
344
|
return /*#__PURE__*/React.createElement(formik ? PuiFormikDateTimeField : PuiStandardDateTimeField, _objectSpread({
|
|
215
345
|
ref,
|
|
216
346
|
id,
|
|
@@ -21,7 +21,7 @@ var _PuiTableAction = _interopRequireDefault(require("./PuiTableAction"));
|
|
|
21
21
|
var _ActionPopover = _interopRequireDefault(require("./ActionPopover"));
|
|
22
22
|
var _system = require("@mui/system");
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
const _excluded = ["id", "className", "sx", "elevate", "rows", "rowCount", "columns", "paginationMode", "page", "pageSize", "checkboxSelection", "loading", "stripped", "actions", "oneActionOnly", "onSelect", "onPageChange", "onPageSizeChange"];
|
|
24
|
+
const _excluded = ["id", "className", "sx", "elevate", "rows", "rowCount", "columns", "paginationMode", "page", "pageSize", "checkboxSelection", "loading", "stripped", "actions", "oneActionOnly", "onSelect", "onPageChange", "onPageSizeChange", "rowDetailPanel"];
|
|
25
25
|
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); }
|
|
26
26
|
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; }
|
|
27
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -294,7 +294,8 @@ const PuiTable = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
294
294
|
oneActionOnly,
|
|
295
295
|
onSelect,
|
|
296
296
|
onPageChange,
|
|
297
|
-
onPageSizeChange
|
|
297
|
+
onPageSizeChange,
|
|
298
|
+
rowDetailPanel
|
|
298
299
|
} = _ref3,
|
|
299
300
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
300
301
|
const [appColumns, setAppColumns] = React.useState(columns);
|
|
@@ -357,6 +358,15 @@ const PuiTable = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
357
358
|
}));
|
|
358
359
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
359
360
|
}, [actions, columns]);
|
|
361
|
+
const renderRowDetailPanel = params => {
|
|
362
|
+
const {
|
|
363
|
+
data
|
|
364
|
+
} = params;
|
|
365
|
+
// Render the passed rowDetailPanel component with the row data
|
|
366
|
+
return /*#__PURE__*/React.cloneElement(rowDetailPanel, {
|
|
367
|
+
rowData: data
|
|
368
|
+
});
|
|
369
|
+
};
|
|
360
370
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
361
371
|
style: {
|
|
362
372
|
width: '100%'
|
|
@@ -398,7 +408,8 @@ const PuiTable = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
398
408
|
onPageChange: onPageChange,
|
|
399
409
|
onPageSizeChange: onPageSizeChange,
|
|
400
410
|
onSelectionModelChange: onSelect,
|
|
401
|
-
autosizeOptions: autosizeOptions
|
|
411
|
+
autosizeOptions: autosizeOptions,
|
|
412
|
+
rowDetailPanel: renderRowDetailPanel
|
|
402
413
|
}, rest))
|
|
403
414
|
});
|
|
404
415
|
});
|
|
@@ -421,7 +432,8 @@ PuiTable.propTypes = {
|
|
|
421
432
|
onSelect: _propTypes.default.func,
|
|
422
433
|
onPageChange: _propTypes.default.func,
|
|
423
434
|
onPageSizeChange: _propTypes.default.func,
|
|
424
|
-
onSelectionModelChange: _propTypes.default.func
|
|
435
|
+
onSelectionModelChange: _propTypes.default.func,
|
|
436
|
+
rowDetailPanel: _propTypes.default.element
|
|
425
437
|
};
|
|
426
438
|
PuiTable.defaultProps = {
|
|
427
439
|
oneActionOnly: false,
|
package/package.json
CHANGED
|
@@ -1,97 +1,99 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@portnet/ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Portnet UI",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"components",
|
|
8
|
-
"ui"
|
|
9
|
-
],
|
|
10
|
-
"main": "dist/index.js",
|
|
11
|
-
"private": false,
|
|
12
|
-
"files": [
|
|
13
|
-
"dist",
|
|
14
|
-
"README.md"
|
|
15
|
-
],
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@emotion/react": "^11.10.5",
|
|
18
|
-
"@emotion/styled": "^11.10.5",
|
|
19
|
-
"@mui/icons-material": "^5.10.16",
|
|
20
|
-
"@mui/lab": "^5.0.0-alpha.60",
|
|
21
|
-
"@mui/material": "^5.10.16",
|
|
22
|
-
"@mui/x-data-grid": "^5.17.26",
|
|
23
|
-
"@mui/x-
|
|
24
|
-
"@
|
|
25
|
-
"@testing-library/
|
|
26
|
-
"@testing-library/
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"react
|
|
34
|
-
"react-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"last 1
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"@babel/
|
|
80
|
-
"@babel/
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
83
|
-
"@storybook/addon-
|
|
84
|
-
"@storybook/addon-
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@storybook/
|
|
87
|
-
"@storybook/
|
|
88
|
-
"@storybook/react-
|
|
89
|
-
"@storybook/
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@portnet/ui",
|
|
3
|
+
"version": "0.1.22",
|
|
4
|
+
"description": "Portnet UI",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"components",
|
|
8
|
+
"ui"
|
|
9
|
+
],
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"private": false,
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@emotion/react": "^11.10.5",
|
|
18
|
+
"@emotion/styled": "^11.10.5",
|
|
19
|
+
"@mui/icons-material": "^5.10.16",
|
|
20
|
+
"@mui/lab": "^5.0.0-alpha.60",
|
|
21
|
+
"@mui/material": "^5.10.16",
|
|
22
|
+
"@mui/x-data-grid": "^5.17.26",
|
|
23
|
+
"@mui/x-data-grid-pro": "^5.17.26",
|
|
24
|
+
"@mui/x-date-pickers": "^5.0.4",
|
|
25
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
26
|
+
"@testing-library/react": "^13.4.0",
|
|
27
|
+
"@testing-library/user-event": "^13.5.0",
|
|
28
|
+
"axios": "^0.27.2",
|
|
29
|
+
"formik": "^2.2.9",
|
|
30
|
+
"lodash": "^4.17.21",
|
|
31
|
+
"moment": "^2.29.4",
|
|
32
|
+
"moment-timezone": "^0.5.45",
|
|
33
|
+
"react": "^18.2.0",
|
|
34
|
+
"react-dom": "^18.2.0",
|
|
35
|
+
"react-scripts": "^5.0.1",
|
|
36
|
+
"react-transition-group": "^4.4.5",
|
|
37
|
+
"styled-components": "^6.1.3",
|
|
38
|
+
"uuid": "^9.0.0",
|
|
39
|
+
"web-vitals": "^2.1.4",
|
|
40
|
+
"yup": "^0.32.11"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"start": "react-scripts start",
|
|
44
|
+
"build": "rimraf dist && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files",
|
|
45
|
+
"test": "react-scripts test",
|
|
46
|
+
"eject": "react-scripts eject",
|
|
47
|
+
"storybook": "storybook dev -p 6006 -s public",
|
|
48
|
+
"build-storybook": "storybook build -s public"
|
|
49
|
+
},
|
|
50
|
+
"eslintConfig": {
|
|
51
|
+
"extends": [
|
|
52
|
+
"react-app",
|
|
53
|
+
"react-app/jest"
|
|
54
|
+
],
|
|
55
|
+
"overrides": [
|
|
56
|
+
{
|
|
57
|
+
"files": [
|
|
58
|
+
"**/*.stories.*"
|
|
59
|
+
],
|
|
60
|
+
"rules": {
|
|
61
|
+
"import/no-anonymous-default-export": "off"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"browserslist": {
|
|
67
|
+
"production": [
|
|
68
|
+
">0.2%",
|
|
69
|
+
"not dead",
|
|
70
|
+
"not op_mini all"
|
|
71
|
+
],
|
|
72
|
+
"development": [
|
|
73
|
+
"last 1 chrome version",
|
|
74
|
+
"last 1 firefox version",
|
|
75
|
+
"last 1 safari version"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@babel/cli": "^7.19.3",
|
|
80
|
+
"@babel/core": "^7.20.5",
|
|
81
|
+
"@babel/preset-env": "^7.20.2",
|
|
82
|
+
"@babel/preset-react": "^7.18.6",
|
|
83
|
+
"@storybook/addon-actions": "^7.6.4",
|
|
84
|
+
"@storybook/addon-essentials": "^7.6.4",
|
|
85
|
+
"@storybook/addon-interactions": "^7.6.4",
|
|
86
|
+
"@storybook/addon-links": "^7.6.4",
|
|
87
|
+
"@storybook/node-logger": "^7.6.4",
|
|
88
|
+
"@storybook/preset-create-react-app": "^7.6.4",
|
|
89
|
+
"@storybook/react": "^7.6.4",
|
|
90
|
+
"@storybook/react-webpack5": "^7.6.4",
|
|
91
|
+
"@storybook/testing-library": "^0.2.2",
|
|
92
|
+
"cross-env": "^7.0.3",
|
|
93
|
+
"husky": "^4.3.8",
|
|
94
|
+
"prop-types": "^15.8.1",
|
|
95
|
+
"rimraf": "^5.0.5",
|
|
96
|
+
"storybook": "^7.6.4",
|
|
97
|
+
"webpack": "^5.75.0"
|
|
98
|
+
}
|
|
99
|
+
}
|