@dartech/arsenal-ui 1.4.29 → 1.4.31
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +138 -44
- package/package.json +1 -1
- package/src/lib/Alert/Alert.d.ts +5 -3
- package/src/lib/Forms/ControlNumberInput.d.ts +4 -1
- package/src/lib/Forms/ControlPeriodInput.d.ts +1 -1
- package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +1 -0
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +1 -0
- package/src/utils/validators.d.ts +1 -0
package/index.js
CHANGED
@@ -7,14 +7,15 @@ import DialogContent from '@mui/material/DialogContent';
|
|
7
7
|
import DialogContentText from '@mui/material/DialogContentText';
|
8
8
|
import DialogTitle from '@mui/material/DialogTitle';
|
9
9
|
import Box from '@mui/material/Box';
|
10
|
+
import Typography from '@mui/material/Typography';
|
11
|
+
import IconButton from '@mui/material/IconButton';
|
12
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
10
13
|
import CircularProgress from '@mui/material/CircularProgress';
|
11
14
|
import { __rest, __awaiter } from 'tslib';
|
12
15
|
import { useController, useWatch, useFormContext, Controller, useFieldArray, useForm } from 'react-hook-form';
|
13
16
|
import TextField from '@mui/material/TextField';
|
14
17
|
import React, { useRef, useEffect, useState, useCallback, useMemo, createElement, forwardRef, createContext, useContext, memo, useImperativeHandle, Suspense } from 'react';
|
15
18
|
import MenuItem from '@mui/material/MenuItem';
|
16
|
-
import SvgIcon from '@mui/material/SvgIcon';
|
17
|
-
import IconButton from '@mui/material/IconButton';
|
18
19
|
import InputAdornment from '@mui/material/InputAdornment';
|
19
20
|
import FormControl from '@mui/material/FormControl';
|
20
21
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
@@ -32,7 +33,6 @@ import { useNavigate, useLocation, Link, useSearchParams, Outlet } from 'react-r
|
|
32
33
|
import CodeMirror from '@uiw/react-codemirror';
|
33
34
|
import { langs } from '@uiw/codemirror-extensions-langs';
|
34
35
|
import { abcdef } from '@uiw/codemirror-theme-abcdef';
|
35
|
-
import Typography from '@mui/material/Typography';
|
36
36
|
import Switch from '@mui/material/Switch';
|
37
37
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
38
38
|
import { format, parse, isMatch, isValid } from 'date-fns';
|
@@ -159,29 +159,59 @@ const AlertDialog = ({
|
|
159
159
|
open,
|
160
160
|
title,
|
161
161
|
description,
|
162
|
-
closeButtonTitle: _closeButtonTitle =
|
162
|
+
closeButtonTitle: _closeButtonTitle = 'Close',
|
163
163
|
onClose,
|
164
|
-
confirmButtonTitle: _confirmButtonTitle =
|
164
|
+
confirmButtonTitle: _confirmButtonTitle = 'Confirm',
|
165
165
|
confirmButtonDisabled: _confirmButtonDisabled = false,
|
166
|
+
disableBackdropClick: _disableBackdropClick = false,
|
166
167
|
onConfirm,
|
167
168
|
children,
|
168
169
|
dialogProps,
|
169
170
|
loading,
|
170
|
-
maxWidth: _maxWidth =
|
171
|
+
maxWidth: _maxWidth = 'xs',
|
172
|
+
hideCloseButton: _hideCloseButton = false
|
171
173
|
}) => {
|
172
174
|
return jsx("div", {
|
173
175
|
children: jsxs(Dialog, Object.assign({
|
174
176
|
open: open,
|
175
|
-
onClose:
|
177
|
+
onClose: _disableBackdropClick ? (event, reason) => {
|
178
|
+
if (reason === 'backdropClick') return null;
|
179
|
+
onClose();
|
180
|
+
} : onClose,
|
181
|
+
disableEscapeKeyDown: _disableBackdropClick,
|
176
182
|
"aria-labelledby": "alert-dialog-title",
|
177
183
|
"aria-describedby": "alert-dialog-description",
|
178
184
|
fullWidth: true,
|
179
185
|
maxWidth: _maxWidth
|
180
186
|
}, dialogProps, {
|
181
|
-
children: [loading && jsx(Loader, {}),
|
182
|
-
id: "alert-dialog-title"
|
187
|
+
children: [loading && jsx(Loader, {}), jsxs(DialogTitle, Object.assign({
|
188
|
+
id: "alert-dialog-title",
|
189
|
+
sx: {
|
190
|
+
display: 'flex',
|
191
|
+
justifyContent: 'space-between'
|
192
|
+
}
|
183
193
|
}, {
|
184
|
-
children:
|
194
|
+
children: [jsx(Typography, Object.assign({
|
195
|
+
variant: "inherit"
|
196
|
+
}, {
|
197
|
+
children: title
|
198
|
+
})), !_hideCloseButton && jsx(IconButton, Object.assign({
|
199
|
+
sx: {
|
200
|
+
padding: 0
|
201
|
+
},
|
202
|
+
onClick: onClose
|
203
|
+
}, {
|
204
|
+
children: jsx(SvgIcon, {
|
205
|
+
children: jsx("g", Object.assign({
|
206
|
+
opacity: "0.6"
|
207
|
+
}, {
|
208
|
+
children: jsx("path", {
|
209
|
+
d: "M4.39704 4.554L4.47004 4.47C4.59702 4.34299 4.76538 4.26576 4.94449 4.25236C5.1236 4.23897 5.30157 4.29029 5.44604 4.397L5.53004 4.47L12 10.939L18.47 4.469C18.5393 4.3974 18.622 4.34031 18.7136 4.30104C18.8051 4.26178 18.9035 4.24114 19.0031 4.24032C19.1027 4.2395 19.2014 4.25853 19.2936 4.29628C19.3857 4.33403 19.4694 4.38976 19.5398 4.46022C19.6102 4.53067 19.6659 4.61443 19.7035 4.70662C19.7412 4.79881 19.7601 4.89758 19.7592 4.99716C19.7583 5.09675 19.7376 5.19515 19.6982 5.28664C19.6589 5.37812 19.6017 5.46085 19.53 5.53L13.061 12L19.531 18.47C19.6579 18.5971 19.7349 18.7655 19.7482 18.9446C19.7614 19.1237 19.7099 19.3016 19.603 19.446L19.53 19.53C19.403 19.657 19.2347 19.7343 19.0556 19.7476C18.8765 19.761 18.6985 19.7097 18.554 19.603L18.47 19.53L12 13.061L5.53004 19.531C5.38852 19.6676 5.19903 19.7431 5.00238 19.7413C4.80574 19.7395 4.61766 19.6605 4.47867 19.5214C4.33968 19.3823 4.26089 19.1941 4.25928 18.9975C4.25766 18.8008 4.33335 18.6114 4.47004 18.47L10.939 12L4.46904 5.53C4.34217 5.40289 4.26512 5.23447 4.25191 5.05537C4.2387 4.87626 4.29019 4.69836 4.39704 4.554L4.47004 4.47L4.39704 4.554Z",
|
210
|
+
fill: "black"
|
211
|
+
})
|
212
|
+
}))
|
213
|
+
})
|
214
|
+
}))]
|
185
215
|
})), jsxs(DialogContent, {
|
186
216
|
children: [description && jsx(DialogContentText, Object.assign({
|
187
217
|
id: "alert-dialog-description"
|
@@ -194,7 +224,7 @@ const AlertDialog = ({
|
|
194
224
|
children: children
|
195
225
|
}))]
|
196
226
|
}), jsxs(DialogActions, {
|
197
|
-
children: [jsx(Button, Object.assign({
|
227
|
+
children: [!_hideCloseButton && jsx(Button, Object.assign({
|
198
228
|
onClick: onClose,
|
199
229
|
variant: "outlined"
|
200
230
|
}, {
|
@@ -288,6 +318,9 @@ const ControlInput = _a => {
|
|
288
318
|
},
|
289
319
|
error: !!error,
|
290
320
|
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
321
|
+
FormHelperTextProps: {
|
322
|
+
variant: 'standard'
|
323
|
+
},
|
291
324
|
disabled: disabled,
|
292
325
|
multiline: textarea,
|
293
326
|
minRows: textarea ? 3 : 1,
|
@@ -403,6 +436,9 @@ const ControlDebouncedInput = _a => {
|
|
403
436
|
},
|
404
437
|
error: !!error,
|
405
438
|
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
439
|
+
FormHelperTextProps: {
|
440
|
+
variant: 'standard'
|
441
|
+
},
|
406
442
|
disabled: disabled,
|
407
443
|
multiline: textarea,
|
408
444
|
minRows: textarea ? 3 : 1,
|
@@ -503,6 +539,9 @@ const ControlSelect = _a => {
|
|
503
539
|
},
|
504
540
|
error: !!error,
|
505
541
|
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
542
|
+
FormHelperTextProps: {
|
543
|
+
variant: 'standard'
|
544
|
+
},
|
506
545
|
disabled: disabled,
|
507
546
|
value: value !== null && value !== void 0 ? value : '',
|
508
547
|
onChange: customOnChange ? customOnChange : onChange
|
@@ -607,9 +646,11 @@ const ControlCheckbox = _a => {
|
|
607
646
|
defaultChecked: checked
|
608
647
|
}, checkboxProps)),
|
609
648
|
label: label
|
610
|
-
}), !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message) && jsx(FormHelperText, {
|
649
|
+
}), !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message) && jsx(FormHelperText, Object.assign({
|
650
|
+
variant: "standard"
|
651
|
+
}, {
|
611
652
|
children: error.message
|
612
|
-
})]
|
653
|
+
}))]
|
613
654
|
}));
|
614
655
|
};
|
615
656
|
|
@@ -680,9 +721,11 @@ const ControlRadio = ({
|
|
680
721
|
control: jsx(Radio, Object.assign({}, radioProps)),
|
681
722
|
label: getLabel(item)
|
682
723
|
}, i))
|
683
|
-
})), !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message) && jsx(FormHelperText, {
|
724
|
+
})), !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message) && jsx(FormHelperText, Object.assign({
|
725
|
+
variant: "standard"
|
726
|
+
}, {
|
684
727
|
children: error.message
|
685
|
-
})]
|
728
|
+
}))]
|
686
729
|
}));
|
687
730
|
};
|
688
731
|
|
@@ -828,7 +871,10 @@ const ControlAutocomplete = _a => {
|
|
828
871
|
},
|
829
872
|
error: !!error,
|
830
873
|
inputRef: ref,
|
831
|
-
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message)
|
874
|
+
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
875
|
+
FormHelperTextProps: {
|
876
|
+
variant: 'standard'
|
877
|
+
}
|
832
878
|
}, textFieldProps));
|
833
879
|
}
|
834
880
|
}, autocompleteProps));
|
@@ -1001,6 +1047,9 @@ function ControlQueryAutocomplete(_a) {
|
|
1001
1047
|
error: !!error,
|
1002
1048
|
inputRef: ref,
|
1003
1049
|
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
1050
|
+
FormHelperTextProps: {
|
1051
|
+
variant: 'standard'
|
1052
|
+
},
|
1004
1053
|
InputProps: Object.assign(Object.assign({}, params.InputProps), {
|
1005
1054
|
endAdornment: jsxs(React.Fragment, {
|
1006
1055
|
children: [isFetching ? jsx(CircularProgress, {
|
@@ -1204,6 +1253,7 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
1204
1253
|
onChange: handleChange,
|
1205
1254
|
extensions: extensions[mode]
|
1206
1255
|
}, otherProps)), error && !hideErrorMessage && jsx(FormHelperText, Object.assign({
|
1256
|
+
variant: "standard",
|
1207
1257
|
error: true
|
1208
1258
|
}, {
|
1209
1259
|
children: error.message
|
@@ -1565,6 +1615,9 @@ const isExpression = (value, useRecursion) => {
|
|
1565
1615
|
const isDateType = propertyType => {
|
1566
1616
|
return propertyType === PropertyType.DATE || propertyType === PropertyType.DATE_TIME || propertyType === PropertyType.TIME;
|
1567
1617
|
};
|
1618
|
+
const numberFormat = new Intl.NumberFormat('ru-RU', {
|
1619
|
+
style: 'decimal'
|
1620
|
+
});
|
1568
1621
|
|
1569
1622
|
const isPropertyValueEmpty = value => {
|
1570
1623
|
if (value || value === 0 || value === false) {
|
@@ -1965,7 +2018,7 @@ const getSinglePropertyFillOptions = ({
|
|
1965
2018
|
};
|
1966
2019
|
|
1967
2020
|
const ControlNumberInput = _a => {
|
1968
|
-
var _b;
|
2021
|
+
var _b, _c;
|
1969
2022
|
var {
|
1970
2023
|
control,
|
1971
2024
|
validate,
|
@@ -1978,10 +2031,11 @@ const ControlNumberInput = _a => {
|
|
1978
2031
|
onChange: customOnChange,
|
1979
2032
|
decimal = false,
|
1980
2033
|
valueAsNumber = true,
|
1981
|
-
requiredErrorText = ''
|
2034
|
+
requiredErrorText = '',
|
2035
|
+
useFormattedInputValue = false
|
1982
2036
|
} = _a,
|
1983
|
-
textFieldProps = __rest(_a, ["control", "validate", "name", "label", "required", "defaultValue", "disabled", "hideErrorMessage", "onChange", "decimal", "valueAsNumber", "requiredErrorText"]);
|
1984
|
-
const
|
2037
|
+
textFieldProps = __rest(_a, ["control", "validate", "name", "label", "required", "defaultValue", "disabled", "hideErrorMessage", "onChange", "decimal", "valueAsNumber", "requiredErrorText", "useFormattedInputValue"]);
|
2038
|
+
const _d = useController({
|
1985
2039
|
name,
|
1986
2040
|
control,
|
1987
2041
|
defaultValue,
|
@@ -1998,22 +2052,23 @@ const ControlNumberInput = _a => {
|
|
1998
2052
|
}
|
1999
2053
|
}
|
2000
2054
|
}),
|
2001
|
-
|
2055
|
+
_e = _d.field,
|
2002
2056
|
{
|
2003
2057
|
ref,
|
2004
2058
|
onChange,
|
2005
2059
|
value
|
2006
|
-
} =
|
2007
|
-
fieldProps = __rest(
|
2060
|
+
} = _e,
|
2061
|
+
fieldProps = __rest(_e, ["ref", "onChange", "value"]),
|
2008
2062
|
{
|
2009
2063
|
fieldState: {
|
2010
2064
|
error
|
2011
2065
|
}
|
2012
|
-
} =
|
2066
|
+
} = _d;
|
2013
2067
|
const handleChange = event => {
|
2014
2068
|
var _a;
|
2015
|
-
const
|
2016
|
-
|
2069
|
+
const inputValue = event.target.value.replace(/\s/g, '');
|
2070
|
+
const lastData = event.nativeEvent['data'];
|
2071
|
+
if (!isNaN(lastData) || decimal && lastData === '.' || lastData === '-' || lastData === '+' || inputValue) {
|
2017
2072
|
if (customOnChange) {
|
2018
2073
|
customOnChange(event);
|
2019
2074
|
} else {
|
@@ -2024,9 +2079,9 @@ const ControlNumberInput = _a => {
|
|
2024
2079
|
onChange(0);
|
2025
2080
|
} else if (decimal) {
|
2026
2081
|
const dec = event.target.value.split('.')[1];
|
2027
|
-
onChange(!floatsOnly.test(
|
2082
|
+
onChange(!floatsOnly.test(inputValue) || /^0+$/.test(dec) || /^-*0+$/.test(inputValue) ? event.target.value : +parseFloat(inputValue).toFixed((_a = dec === null || dec === void 0 ? void 0 : dec.length) !== null && _a !== void 0 ? _a : 0));
|
2028
2083
|
} else {
|
2029
|
-
onChange(Number.isNaN(+
|
2084
|
+
onChange(Number.isNaN(+inputValue) ? event.target.value : +inputValue);
|
2030
2085
|
}
|
2031
2086
|
}
|
2032
2087
|
}
|
@@ -2054,11 +2109,14 @@ const ControlNumberInput = _a => {
|
|
2054
2109
|
error: !!error,
|
2055
2110
|
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
2056
2111
|
disabled: disabled,
|
2057
|
-
value: value
|
2112
|
+
value: useFormattedInputValue ? (_b = value === null || value === void 0 ? void 0 : value.toLocaleString('ru-Ru', {
|
2113
|
+
maximumFractionDigits: 10
|
2114
|
+
}).replace(',', '.')) !== null && _b !== void 0 ? _b : '' : value !== null && value !== void 0 ? value : '',
|
2058
2115
|
onChange: handleChange,
|
2059
|
-
|
2060
|
-
|
2061
|
-
}
|
2116
|
+
FormHelperTextProps: {
|
2117
|
+
variant: 'standard'
|
2118
|
+
},
|
2119
|
+
inputProps: Object.assign({}, (_c = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputProps) !== null && _c !== void 0 ? _c : {})
|
2062
2120
|
}, textFieldProps));
|
2063
2121
|
};
|
2064
2122
|
|
@@ -2195,7 +2253,10 @@ const ControlDate = _a => {
|
|
2195
2253
|
variant: "outlined",
|
2196
2254
|
name: name,
|
2197
2255
|
error: !!error,
|
2198
|
-
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message)
|
2256
|
+
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
2257
|
+
FormHelperTextProps: {
|
2258
|
+
variant: 'standard'
|
2259
|
+
}
|
2199
2260
|
}, textFieldProps))
|
2200
2261
|
}));
|
2201
2262
|
};
|
@@ -2276,7 +2337,10 @@ const ControlDateTime = _a => {
|
|
2276
2337
|
variant: "outlined",
|
2277
2338
|
name: name,
|
2278
2339
|
error: !!error,
|
2279
|
-
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message)
|
2340
|
+
helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
2341
|
+
FormHelperTextProps: {
|
2342
|
+
variant: 'standard'
|
2343
|
+
}
|
2280
2344
|
}, textFieldProps))
|
2281
2345
|
}));
|
2282
2346
|
};
|
@@ -2352,7 +2416,10 @@ const ControlTime = ({
|
|
2352
2416
|
variant: "outlined",
|
2353
2417
|
name: name,
|
2354
2418
|
error: !!error,
|
2355
|
-
helperText: !_hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message)
|
2419
|
+
helperText: !_hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
|
2420
|
+
FormHelperTextProps: {
|
2421
|
+
variant: 'standard'
|
2422
|
+
}
|
2356
2423
|
}))
|
2357
2424
|
}));
|
2358
2425
|
};
|
@@ -2453,6 +2520,9 @@ const ControlArrayInput = ({
|
|
2453
2520
|
onChange: handleInputChange,
|
2454
2521
|
error: !!((_a = errors[name]) === null || _a === void 0 ? void 0 : _a.message),
|
2455
2522
|
helperText: (_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message,
|
2523
|
+
FormHelperTextProps: {
|
2524
|
+
variant: 'standard'
|
2525
|
+
},
|
2456
2526
|
name: name,
|
2457
2527
|
onKeyDown: handleKeyDown,
|
2458
2528
|
InputProps: {
|
@@ -2527,7 +2597,7 @@ const ControlPeriodInput = ({
|
|
2527
2597
|
variant: "subtitle1"
|
2528
2598
|
}, {
|
2529
2599
|
children: required ? jsxs(Fragment, {
|
2530
|
-
children: [_label,
|
2600
|
+
children: [_label, ' ', jsx(Box, Object.assign({
|
2531
2601
|
component: "span",
|
2532
2602
|
color: "#D6331F"
|
2533
2603
|
}, {
|
@@ -2556,7 +2626,10 @@ const ControlPeriodInput = ({
|
|
2556
2626
|
label: "Years",
|
2557
2627
|
type: "number",
|
2558
2628
|
onChange: handleChange,
|
2559
|
-
fullWidth: true
|
2629
|
+
fullWidth: true,
|
2630
|
+
FormHelperTextProps: {
|
2631
|
+
variant: 'standard'
|
2632
|
+
}
|
2560
2633
|
})
|
2561
2634
|
})), jsx(Grid, Object.assign({
|
2562
2635
|
sm: 1
|
@@ -2570,7 +2643,10 @@ const ControlPeriodInput = ({
|
|
2570
2643
|
label: "Months",
|
2571
2644
|
type: "number",
|
2572
2645
|
onChange: handleChange,
|
2573
|
-
fullWidth: true
|
2646
|
+
fullWidth: true,
|
2647
|
+
FormHelperTextProps: {
|
2648
|
+
variant: 'standard'
|
2649
|
+
}
|
2574
2650
|
})
|
2575
2651
|
})), jsx(Grid, Object.assign({
|
2576
2652
|
sm: 1
|
@@ -2584,7 +2660,10 @@ const ControlPeriodInput = ({
|
|
2584
2660
|
label: "Weeks",
|
2585
2661
|
type: "number",
|
2586
2662
|
onChange: handleChange,
|
2587
|
-
fullWidth: true
|
2663
|
+
fullWidth: true,
|
2664
|
+
FormHelperTextProps: {
|
2665
|
+
variant: 'standard'
|
2666
|
+
}
|
2588
2667
|
})
|
2589
2668
|
})), jsx(Grid, Object.assign({
|
2590
2669
|
sm: 1
|
@@ -2598,7 +2677,10 @@ const ControlPeriodInput = ({
|
|
2598
2677
|
label: "Days",
|
2599
2678
|
type: "number",
|
2600
2679
|
onChange: handleChange,
|
2601
|
-
fullWidth: true
|
2680
|
+
fullWidth: true,
|
2681
|
+
FormHelperTextProps: {
|
2682
|
+
variant: 'standard'
|
2683
|
+
}
|
2602
2684
|
})
|
2603
2685
|
})), jsx(Grid, Object.assign({
|
2604
2686
|
sm: 1
|
@@ -2612,7 +2694,10 @@ const ControlPeriodInput = ({
|
|
2612
2694
|
label: "Hours",
|
2613
2695
|
type: "number",
|
2614
2696
|
onChange: handleChange,
|
2615
|
-
fullWidth: true
|
2697
|
+
fullWidth: true,
|
2698
|
+
FormHelperTextProps: {
|
2699
|
+
variant: 'standard'
|
2700
|
+
}
|
2616
2701
|
})
|
2617
2702
|
})), jsx(Grid, Object.assign({
|
2618
2703
|
sm: 1
|
@@ -2626,7 +2711,10 @@ const ControlPeriodInput = ({
|
|
2626
2711
|
label: "Minutes",
|
2627
2712
|
type: "number",
|
2628
2713
|
onChange: handleChange,
|
2629
|
-
fullWidth: true
|
2714
|
+
fullWidth: true,
|
2715
|
+
FormHelperTextProps: {
|
2716
|
+
variant: 'standard'
|
2717
|
+
}
|
2630
2718
|
})
|
2631
2719
|
})), _isSecondsVisible && jsx(Grid, Object.assign({
|
2632
2720
|
sm: 1
|
@@ -2640,7 +2728,10 @@ const ControlPeriodInput = ({
|
|
2640
2728
|
label: "Seconds",
|
2641
2729
|
type: "number",
|
2642
2730
|
onChange: handleChange,
|
2643
|
-
fullWidth: true
|
2731
|
+
fullWidth: true,
|
2732
|
+
FormHelperTextProps: {
|
2733
|
+
variant: 'standard'
|
2734
|
+
}
|
2644
2735
|
})
|
2645
2736
|
}))]
|
2646
2737
|
}))]
|
@@ -2710,6 +2801,9 @@ const ControlPhoneInput = _a => {
|
|
2710
2801
|
}
|
2711
2802
|
}, textFieldProps, {
|
2712
2803
|
error: !!error,
|
2804
|
+
FormHelperTextProps: {
|
2805
|
+
variant: 'standard'
|
2806
|
+
},
|
2713
2807
|
helperText: error === null || error === void 0 ? void 0 : error.message
|
2714
2808
|
}))
|
2715
2809
|
}))
|
@@ -7866,4 +7960,4 @@ const Breadcrumbs = ({
|
|
7866
7960
|
}));
|
7867
7961
|
};
|
7868
7962
|
|
7869
|
-
export { AlertDialog, BackButton, Breadcrumbs, ContentLayout, ControlAceEditor, ControlArrayInput, ControlAutocomplete, ControlCheckbox, ControlDate, ControlDateTime, ControlDebouncedInput, ControlInput, ControlNumberInput, ControlPeriodInput, ControlPhoneInput, ControlQueryAutocomplete, ControlRadio, ControlSelect, ControlSwitch, ControlTime, CopyButton, CreateDefinition, CreatePropertiesList, CreatePropertiesListContext, CreatePropertyFormFields, DATE_DEFAULT_FORMAT, DATE_TIME_DEFAULT_FORMAT, DEFAULT_REQUIRED_ERROR_TEXT, DefinitionFiller, DefinitionValueView, InfoItem, JsonModalView, JsonPathPicker, JsonView, Loader, MenuIcon, MultiplePropertyFiller, PropertyFiller, PropertyType, PropertyValueField, RoundingMode, RouteTabs, Sidebar, SimpleTable, Status, StepperView, TIME_DEFAULT_FORMAT, TabPanel, Table, TableAction, TableActionCell, ViewPropertiesList, ViewProperty, capitalize, deepParseJson, defaultDefinitionArrayValue, defaultDefinitionObjectValue, digitsOnly, floatsOnly, formatDefinitionData, formatTableRowValue, getDemPropertyDateFormat, getEntityStarterValue, getJsonStringValue, getMultiplePropertyFillOptions, getSinglePropertyFillOptions, isDateType, isExpression, isPropertyValueEmpty, propertiesArrayToObject, propertiesObjectToArray, removeArrayItem, safeParseJson, sortArrayOfObjects, theme, useDebounce, useToggle, validateJson };
|
7963
|
+
export { AlertDialog, BackButton, Breadcrumbs, ContentLayout, ControlAceEditor, ControlArrayInput, ControlAutocomplete, ControlCheckbox, ControlDate, ControlDateTime, ControlDebouncedInput, ControlInput, ControlNumberInput, ControlPeriodInput, ControlPhoneInput, ControlQueryAutocomplete, ControlRadio, ControlSelect, ControlSwitch, ControlTime, CopyButton, CreateDefinition, CreatePropertiesList, CreatePropertiesListContext, CreatePropertyFormFields, DATE_DEFAULT_FORMAT, DATE_TIME_DEFAULT_FORMAT, DEFAULT_REQUIRED_ERROR_TEXT, DefinitionFiller, DefinitionValueView, InfoItem, JsonModalView, JsonPathPicker, JsonView, Loader, MenuIcon, MultiplePropertyFiller, PropertyFiller, PropertyType, PropertyValueField, RoundingMode, RouteTabs, Sidebar, SimpleTable, Status, StepperView, TIME_DEFAULT_FORMAT, TabPanel, Table, TableAction, TableActionCell, ViewPropertiesList, ViewProperty, capitalize, deepParseJson, defaultDefinitionArrayValue, defaultDefinitionObjectValue, digitsOnly, floatsOnly, formatDefinitionData, formatTableRowValue, getDemPropertyDateFormat, getEntityStarterValue, getJsonStringValue, getMultiplePropertyFillOptions, getSinglePropertyFillOptions, isDateType, isExpression, isPropertyValueEmpty, numberFormat, propertiesArrayToObject, propertiesObjectToArray, removeArrayItem, safeParseJson, sortArrayOfObjects, theme, useDebounce, useToggle, validateJson };
|
package/package.json
CHANGED
package/src/lib/Alert/Alert.d.ts
CHANGED
@@ -28,7 +28,7 @@ export interface AlertDialogProps {
|
|
28
28
|
/**
|
29
29
|
* onClose event handle function
|
30
30
|
*/
|
31
|
-
onClose
|
31
|
+
onClose?: () => void;
|
32
32
|
/**
|
33
33
|
* onConfirm event handle function
|
34
34
|
*/
|
@@ -43,11 +43,13 @@ export interface AlertDialogProps {
|
|
43
43
|
dialogProps?: Partial<DialogProps>;
|
44
44
|
loading?: boolean;
|
45
45
|
confirmButtonDisabled?: boolean;
|
46
|
-
maxWidth?: false |
|
46
|
+
maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
47
|
+
hideCloseButton?: boolean;
|
48
|
+
disableBackdropClick?: boolean;
|
47
49
|
}
|
48
50
|
/**
|
49
51
|
* Alert dialog component. Used for popup information
|
50
52
|
* @category Common UI components
|
51
53
|
*/
|
52
|
-
export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, onConfirm, children, dialogProps, loading, maxWidth }: AlertDialogProps) => JSX.Element;
|
54
|
+
export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, disableBackdropClick, onConfirm, children, dialogProps, loading, maxWidth, hideCloseButton, }: AlertDialogProps) => JSX.Element;
|
53
55
|
export default AlertDialog;
|
@@ -50,10 +50,13 @@ type Props = TextFieldProps & {
|
|
50
50
|
* Set value as number
|
51
51
|
*/
|
52
52
|
valueAsNumber?: boolean;
|
53
|
+
/**
|
54
|
+
*/
|
55
|
+
useFormattedInputValue?: boolean;
|
53
56
|
/**
|
54
57
|
* Set required error text
|
55
58
|
*/
|
56
59
|
requiredErrorText?: string;
|
57
60
|
};
|
58
|
-
export declare const ControlNumberInput: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, decimal, valueAsNumber, requiredErrorText, ...textFieldProps }: Props) => JSX.Element;
|
61
|
+
export declare const ControlNumberInput: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, decimal, valueAsNumber, requiredErrorText, useFormattedInputValue, ...textFieldProps }: Props) => JSX.Element;
|
59
62
|
export default ControlNumberInput;
|
@@ -7,5 +7,5 @@ type Props = {
|
|
7
7
|
required?: boolean;
|
8
8
|
isSecondsVisible?: boolean;
|
9
9
|
};
|
10
|
-
export declare const ControlPeriodInput: ({ name, control, label, required, isSecondsVisible }: Props) => JSX.Element;
|
10
|
+
export declare const ControlPeriodInput: ({ name, control, label, required, isSecondsVisible, }: Props) => JSX.Element;
|
11
11
|
export {};
|
@@ -3,3 +3,4 @@ export declare const digitsOnly: RegExp;
|
|
3
3
|
export declare const floatsOnly: RegExp;
|
4
4
|
export declare const isExpression: (value: unknown, useRecursion?: boolean) => boolean;
|
5
5
|
export declare const isDateType: (propertyType: PropertyType) => boolean;
|
6
|
+
export declare const numberFormat: Intl.NumberFormat;
|