@dartech/arsenal-ui 1.4.30 → 1.4.32

Sign up to get free protection for your applications and to get access to all the features.
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';
@@ -163,6 +163,7 @@ const AlertDialog = ({
163
163
  onClose,
164
164
  confirmButtonTitle: _confirmButtonTitle = 'Confirm',
165
165
  confirmButtonDisabled: _confirmButtonDisabled = false,
166
+ disableBackdropClick: _disableBackdropClick = false,
166
167
  onConfirm,
167
168
  children,
168
169
  dialogProps,
@@ -173,16 +174,44 @@ const AlertDialog = ({
173
174
  return jsx("div", {
174
175
  children: jsxs(Dialog, Object.assign({
175
176
  open: open,
176
- onClose: onClose,
177
+ onClose: _disableBackdropClick ? (event, reason) => {
178
+ if (reason === 'backdropClick') return null;
179
+ onClose();
180
+ } : onClose,
181
+ disableEscapeKeyDown: _disableBackdropClick,
177
182
  "aria-labelledby": "alert-dialog-title",
178
183
  "aria-describedby": "alert-dialog-description",
179
184
  fullWidth: true,
180
185
  maxWidth: _maxWidth
181
186
  }, dialogProps, {
182
- children: [loading && jsx(Loader, {}), jsx(DialogTitle, Object.assign({
183
- 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
+ }
184
193
  }, {
185
- children: title
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
+ }))]
186
215
  })), jsxs(DialogContent, {
187
216
  children: [description && jsx(DialogContentText, Object.assign({
188
217
  id: "alert-dialog-description"
@@ -289,6 +318,9 @@ const ControlInput = _a => {
289
318
  },
290
319
  error: !!error,
291
320
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
321
+ FormHelperTextProps: {
322
+ variant: 'standard'
323
+ },
292
324
  disabled: disabled,
293
325
  multiline: textarea,
294
326
  minRows: textarea ? 3 : 1,
@@ -404,6 +436,9 @@ const ControlDebouncedInput = _a => {
404
436
  },
405
437
  error: !!error,
406
438
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
439
+ FormHelperTextProps: {
440
+ variant: 'standard'
441
+ },
407
442
  disabled: disabled,
408
443
  multiline: textarea,
409
444
  minRows: textarea ? 3 : 1,
@@ -504,6 +539,9 @@ const ControlSelect = _a => {
504
539
  },
505
540
  error: !!error,
506
541
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
542
+ FormHelperTextProps: {
543
+ variant: 'standard'
544
+ },
507
545
  disabled: disabled,
508
546
  value: value !== null && value !== void 0 ? value : '',
509
547
  onChange: customOnChange ? customOnChange : onChange
@@ -608,9 +646,11 @@ const ControlCheckbox = _a => {
608
646
  defaultChecked: checked
609
647
  }, checkboxProps)),
610
648
  label: label
611
- }), !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
+ }, {
612
652
  children: error.message
613
- })]
653
+ }))]
614
654
  }));
615
655
  };
616
656
 
@@ -681,9 +721,11 @@ const ControlRadio = ({
681
721
  control: jsx(Radio, Object.assign({}, radioProps)),
682
722
  label: getLabel(item)
683
723
  }, i))
684
- })), !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
+ }, {
685
727
  children: error.message
686
- })]
728
+ }))]
687
729
  }));
688
730
  };
689
731
 
@@ -829,7 +871,10 @@ const ControlAutocomplete = _a => {
829
871
  },
830
872
  error: !!error,
831
873
  inputRef: ref,
832
- 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
+ }
833
878
  }, textFieldProps));
834
879
  }
835
880
  }, autocompleteProps));
@@ -1002,6 +1047,9 @@ function ControlQueryAutocomplete(_a) {
1002
1047
  error: !!error,
1003
1048
  inputRef: ref,
1004
1049
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
1050
+ FormHelperTextProps: {
1051
+ variant: 'standard'
1052
+ },
1005
1053
  InputProps: Object.assign(Object.assign({}, params.InputProps), {
1006
1054
  endAdornment: jsxs(React.Fragment, {
1007
1055
  children: [isFetching ? jsx(CircularProgress, {
@@ -1205,6 +1253,7 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
1205
1253
  onChange: handleChange,
1206
1254
  extensions: extensions[mode]
1207
1255
  }, otherProps)), error && !hideErrorMessage && jsx(FormHelperText, Object.assign({
1256
+ variant: "standard",
1208
1257
  error: true
1209
1258
  }, {
1210
1259
  children: error.message
@@ -1566,6 +1615,9 @@ const isExpression = (value, useRecursion) => {
1566
1615
  const isDateType = propertyType => {
1567
1616
  return propertyType === PropertyType.DATE || propertyType === PropertyType.DATE_TIME || propertyType === PropertyType.TIME;
1568
1617
  };
1618
+ const numberFormat = new Intl.NumberFormat('ru-RU', {
1619
+ style: 'decimal'
1620
+ });
1569
1621
 
1570
1622
  const isPropertyValueEmpty = value => {
1571
1623
  if (value || value === 0 || value === false) {
@@ -1966,7 +2018,7 @@ const getSinglePropertyFillOptions = ({
1966
2018
  };
1967
2019
 
1968
2020
  const ControlNumberInput = _a => {
1969
- var _b;
2021
+ var _b, _c;
1970
2022
  var {
1971
2023
  control,
1972
2024
  validate,
@@ -1979,10 +2031,11 @@ const ControlNumberInput = _a => {
1979
2031
  onChange: customOnChange,
1980
2032
  decimal = false,
1981
2033
  valueAsNumber = true,
1982
- requiredErrorText = ''
2034
+ requiredErrorText = '',
2035
+ useFormattedInputValue = false
1983
2036
  } = _a,
1984
- textFieldProps = __rest(_a, ["control", "validate", "name", "label", "required", "defaultValue", "disabled", "hideErrorMessage", "onChange", "decimal", "valueAsNumber", "requiredErrorText"]);
1985
- const _c = useController({
2037
+ textFieldProps = __rest(_a, ["control", "validate", "name", "label", "required", "defaultValue", "disabled", "hideErrorMessage", "onChange", "decimal", "valueAsNumber", "requiredErrorText", "useFormattedInputValue"]);
2038
+ const _d = useController({
1986
2039
  name,
1987
2040
  control,
1988
2041
  defaultValue,
@@ -1999,22 +2052,23 @@ const ControlNumberInput = _a => {
1999
2052
  }
2000
2053
  }
2001
2054
  }),
2002
- _d = _c.field,
2055
+ _e = _d.field,
2003
2056
  {
2004
2057
  ref,
2005
2058
  onChange,
2006
2059
  value
2007
- } = _d,
2008
- fieldProps = __rest(_d, ["ref", "onChange", "value"]),
2060
+ } = _e,
2061
+ fieldProps = __rest(_e, ["ref", "onChange", "value"]),
2009
2062
  {
2010
2063
  fieldState: {
2011
2064
  error
2012
2065
  }
2013
- } = _c;
2066
+ } = _d;
2014
2067
  const handleChange = event => {
2015
2068
  var _a;
2016
- const lastData = event.nativeEvent['data'] || event.target.value;
2017
- if (!isNaN(lastData) || decimal && lastData === '.' || lastData === '-' || lastData === '+') {
2069
+ const inputValue = event.target.value.replace(/\s/g, '');
2070
+ const lastData = event.nativeEvent['data'];
2071
+ if (!isNaN(lastData) || decimal && lastData === '.' || lastData === '-' || lastData === '+' || inputValue) {
2018
2072
  if (customOnChange) {
2019
2073
  customOnChange(event);
2020
2074
  } else {
@@ -2025,9 +2079,9 @@ const ControlNumberInput = _a => {
2025
2079
  onChange(0);
2026
2080
  } else if (decimal) {
2027
2081
  const dec = event.target.value.split('.')[1];
2028
- onChange(!floatsOnly.test(event.target.value) || /^0+$/.test(dec) || /^-*0+$/.test(event.target.value) ? event.target.value : +parseFloat(event.target.value).toFixed((_a = dec === null || dec === void 0 ? void 0 : dec.length) !== null && _a !== void 0 ? _a : 0));
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));
2029
2083
  } else {
2030
- onChange(Number.isNaN(+event.target.value) ? event.target.value : +event.target.value);
2084
+ onChange(Number.isNaN(+inputValue) ? event.target.value : +inputValue);
2031
2085
  }
2032
2086
  }
2033
2087
  }
@@ -2055,11 +2109,14 @@ const ControlNumberInput = _a => {
2055
2109
  error: !!error,
2056
2110
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
2057
2111
  disabled: disabled,
2058
- value: value !== null && value !== void 0 ? 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 : '',
2059
2115
  onChange: handleChange,
2060
- inputProps: Object.assign(Object.assign({}, (_b = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputProps) !== null && _b !== void 0 ? _b : {}), {
2061
- value: value !== null && value !== void 0 ? value : ''
2062
- })
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 : {})
2063
2120
  }, textFieldProps));
2064
2121
  };
2065
2122
 
@@ -2196,7 +2253,10 @@ const ControlDate = _a => {
2196
2253
  variant: "outlined",
2197
2254
  name: name,
2198
2255
  error: !!error,
2199
- 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
+ }
2200
2260
  }, textFieldProps))
2201
2261
  }));
2202
2262
  };
@@ -2277,7 +2337,10 @@ const ControlDateTime = _a => {
2277
2337
  variant: "outlined",
2278
2338
  name: name,
2279
2339
  error: !!error,
2280
- 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
+ }
2281
2344
  }, textFieldProps))
2282
2345
  }));
2283
2346
  };
@@ -2353,7 +2416,10 @@ const ControlTime = ({
2353
2416
  variant: "outlined",
2354
2417
  name: name,
2355
2418
  error: !!error,
2356
- 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
+ }
2357
2423
  }))
2358
2424
  }));
2359
2425
  };
@@ -2454,6 +2520,9 @@ const ControlArrayInput = ({
2454
2520
  onChange: handleInputChange,
2455
2521
  error: !!((_a = errors[name]) === null || _a === void 0 ? void 0 : _a.message),
2456
2522
  helperText: (_b = errors[name]) === null || _b === void 0 ? void 0 : _b.message,
2523
+ FormHelperTextProps: {
2524
+ variant: 'standard'
2525
+ },
2457
2526
  name: name,
2458
2527
  onKeyDown: handleKeyDown,
2459
2528
  InputProps: {
@@ -2528,7 +2597,7 @@ const ControlPeriodInput = ({
2528
2597
  variant: "subtitle1"
2529
2598
  }, {
2530
2599
  children: required ? jsxs(Fragment, {
2531
- children: [_label, " ", jsx(Box, Object.assign({
2600
+ children: [_label, ' ', jsx(Box, Object.assign({
2532
2601
  component: "span",
2533
2602
  color: "#D6331F"
2534
2603
  }, {
@@ -2557,7 +2626,10 @@ const ControlPeriodInput = ({
2557
2626
  label: "Years",
2558
2627
  type: "number",
2559
2628
  onChange: handleChange,
2560
- fullWidth: true
2629
+ fullWidth: true,
2630
+ FormHelperTextProps: {
2631
+ variant: 'standard'
2632
+ }
2561
2633
  })
2562
2634
  })), jsx(Grid, Object.assign({
2563
2635
  sm: 1
@@ -2571,7 +2643,10 @@ const ControlPeriodInput = ({
2571
2643
  label: "Months",
2572
2644
  type: "number",
2573
2645
  onChange: handleChange,
2574
- fullWidth: true
2646
+ fullWidth: true,
2647
+ FormHelperTextProps: {
2648
+ variant: 'standard'
2649
+ }
2575
2650
  })
2576
2651
  })), jsx(Grid, Object.assign({
2577
2652
  sm: 1
@@ -2585,7 +2660,10 @@ const ControlPeriodInput = ({
2585
2660
  label: "Weeks",
2586
2661
  type: "number",
2587
2662
  onChange: handleChange,
2588
- fullWidth: true
2663
+ fullWidth: true,
2664
+ FormHelperTextProps: {
2665
+ variant: 'standard'
2666
+ }
2589
2667
  })
2590
2668
  })), jsx(Grid, Object.assign({
2591
2669
  sm: 1
@@ -2599,7 +2677,10 @@ const ControlPeriodInput = ({
2599
2677
  label: "Days",
2600
2678
  type: "number",
2601
2679
  onChange: handleChange,
2602
- fullWidth: true
2680
+ fullWidth: true,
2681
+ FormHelperTextProps: {
2682
+ variant: 'standard'
2683
+ }
2603
2684
  })
2604
2685
  })), jsx(Grid, Object.assign({
2605
2686
  sm: 1
@@ -2613,7 +2694,10 @@ const ControlPeriodInput = ({
2613
2694
  label: "Hours",
2614
2695
  type: "number",
2615
2696
  onChange: handleChange,
2616
- fullWidth: true
2697
+ fullWidth: true,
2698
+ FormHelperTextProps: {
2699
+ variant: 'standard'
2700
+ }
2617
2701
  })
2618
2702
  })), jsx(Grid, Object.assign({
2619
2703
  sm: 1
@@ -2627,7 +2711,10 @@ const ControlPeriodInput = ({
2627
2711
  label: "Minutes",
2628
2712
  type: "number",
2629
2713
  onChange: handleChange,
2630
- fullWidth: true
2714
+ fullWidth: true,
2715
+ FormHelperTextProps: {
2716
+ variant: 'standard'
2717
+ }
2631
2718
  })
2632
2719
  })), _isSecondsVisible && jsx(Grid, Object.assign({
2633
2720
  sm: 1
@@ -2641,7 +2728,10 @@ const ControlPeriodInput = ({
2641
2728
  label: "Seconds",
2642
2729
  type: "number",
2643
2730
  onChange: handleChange,
2644
- fullWidth: true
2731
+ fullWidth: true,
2732
+ FormHelperTextProps: {
2733
+ variant: 'standard'
2734
+ }
2645
2735
  })
2646
2736
  }))]
2647
2737
  }))]
@@ -2711,6 +2801,9 @@ const ControlPhoneInput = _a => {
2711
2801
  }
2712
2802
  }, textFieldProps, {
2713
2803
  error: !!error,
2804
+ FormHelperTextProps: {
2805
+ variant: 'standard'
2806
+ },
2714
2807
  helperText: error === null || error === void 0 ? void 0 : error.message
2715
2808
  }))
2716
2809
  }))
@@ -7253,7 +7346,8 @@ const Header = styled(Toolbar)(({
7253
7346
  '& > span': {
7254
7347
  fontSize: 24,
7255
7348
  fontWeight: 600,
7256
- transition: '.3s ease .1s'
7349
+ transition: '.3s ease .1s',
7350
+ whiteSpace: 'nowrap'
7257
7351
  },
7258
7352
  '&:after': {
7259
7353
  transition: 'opacity .3s',
@@ -7270,7 +7364,9 @@ const Header = styled(Toolbar)(({
7270
7364
  opacity: 0,
7271
7365
  visibility: 'hidden',
7272
7366
  transitionDelay: '0s'
7367
+ // height: 0
7273
7368
  },
7369
+
7274
7370
  '&:after': {
7275
7371
  opacity: 1,
7276
7372
  visibility: 'visible',
@@ -7536,36 +7632,43 @@ const SidebarRootItem = ({
7536
7632
  isSubmenu
7537
7633
  }) => {
7538
7634
  return jsx(ListSubheader, {
7539
- children: jsx(ListItem, Object.assign({
7540
- disablePadding: true,
7541
- onClick: handleClick
7635
+ children: jsx(List, Object.assign({
7636
+ sx: {
7637
+ padding: 0,
7638
+ margin: 0
7639
+ }
7542
7640
  }, {
7543
- children: jsxs(ListItemButton, Object.assign({
7544
- className: classnames({
7545
- active: isActive,
7546
- main: route.main
7547
- }),
7548
- sx: {
7549
- justifyContent: 'space-between'
7550
- }
7641
+ children: jsx(ListItem, Object.assign({
7642
+ disablePadding: true,
7643
+ onClick: handleClick
7551
7644
  }, {
7552
- children: [jsx(ListItemText, {
7553
- primary: route.name,
7645
+ children: jsxs(ListItemButton, Object.assign({
7554
7646
  className: classnames({
7647
+ active: isActive,
7555
7648
  main: route.main
7556
7649
  }),
7557
- sx: !isSubmenu ? {
7558
- display: 'none'
7559
- } : {}
7560
- }), route.name, jsx(Box, {
7561
- component: "img",
7562
- src: ArrowIcon$1,
7563
- mr: 3,
7564
7650
  sx: {
7565
- transition: 'transform .3s',
7566
- transform: `rotate(${isListOpen ? 0 : '-90deg'})`
7651
+ justifyContent: 'space-between'
7567
7652
  }
7568
- })]
7653
+ }, {
7654
+ children: [jsx(ListItemText, {
7655
+ primary: route.name,
7656
+ className: classnames({
7657
+ main: route.main
7658
+ }),
7659
+ sx: !isSubmenu ? {
7660
+ display: 'none'
7661
+ } : {}
7662
+ }), route.name, jsx(Box, {
7663
+ component: "img",
7664
+ src: ArrowIcon$1,
7665
+ mr: 3,
7666
+ sx: {
7667
+ transition: 'transform .3s',
7668
+ transform: `rotate(${isListOpen ? 0 : '-90deg'})`
7669
+ }
7670
+ })]
7671
+ }))
7569
7672
  }))
7570
7673
  }))
7571
7674
  });
@@ -7867,4 +7970,4 @@ const Breadcrumbs = ({
7867
7970
  }));
7868
7971
  };
7869
7972
 
7870
- 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 };
7973
+ 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.30",
3
+ "version": "1.4.32",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,10 +45,11 @@ export interface AlertDialogProps {
45
45
  confirmButtonDisabled?: boolean;
46
46
  maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
47
47
  hideCloseButton?: boolean;
48
+ disableBackdropClick?: boolean;
48
49
  }
49
50
  /**
50
51
  * Alert dialog component. Used for popup information
51
52
  * @category Common UI components
52
53
  */
53
- export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, onConfirm, children, dialogProps, loading, maxWidth, hideCloseButton, }: 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;
54
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 {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Control } from 'react-hook-form';
2
3
  type Props = {
3
4
  control: Control<any>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  format: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PropertyUnion } from '../../../interfaces';
2
3
  type PropertyItemProps = {
3
4
  property: PropertyUnion;
@@ -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;