@dartech/arsenal-ui 1.4.47 → 1.4.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +15 -16
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1960,11 +1960,11 @@ const formatTableRowValue = ({
1960
1960
  })
1961
1961
  }));
1962
1962
  case 'date':
1963
- return value ? dateFormat ? jsx(Box, {
1963
+ return value ? dateFormat ? jsx(OverflowTip, {
1964
1964
  children: dateFormat.map((formatString, index) => jsx(Box, {
1965
1965
  children: format(new Date(value), formatString)
1966
1966
  }, index))
1967
- }) : jsxs(Box, {
1967
+ }) : jsxs(OverflowTip, {
1968
1968
  children: [jsx(Box, {
1969
1969
  children: format(new Date(value), 'dd.MM.yyyy')
1970
1970
  }), jsx(Box, {
@@ -1972,9 +1972,11 @@ const formatTableRowValue = ({
1972
1972
  })]
1973
1973
  }) : '';
1974
1974
  case 'status':
1975
- return jsx(Status, {
1976
- text: value,
1977
- status: statusVariant ? statusVariant : 'default'
1975
+ return jsx(OverflowTip, {
1976
+ children: jsx(Status, {
1977
+ text: value,
1978
+ status: statusVariant ? statusVariant : 'default'
1979
+ })
1978
1980
  });
1979
1981
  case 'json_text':
1980
1982
  return jsx(JsonTypeCell$1, {
@@ -2015,7 +2017,7 @@ const formatTableRowValue = ({
2015
2017
  display: "flex",
2016
2018
  justifyContent: "flex-end"
2017
2019
  }, {
2018
- children: jsx(Box, {
2020
+ children: jsx(OverflowTip, {
2019
2021
  children: value.toLocaleString('ru-Ru', {
2020
2022
  minimumFractionDigits: 2
2021
2023
  })
@@ -2029,21 +2031,15 @@ const formatTableRowValue = ({
2029
2031
  width: "100%"
2030
2032
  }, {
2031
2033
  children: [shortId ? jsx(OverflowTip, {
2032
- children: jsx(Box, Object.assign({
2033
- mr: "auto"
2034
- }, {
2035
- children: value ? `${value.slice(0, 6)}...${value.slice(-6)}` : '...'
2036
- }))
2034
+ children: value ? `${value.slice(0, 6)}...${value.slice(-6)}` : '...'
2037
2035
  }) : _fullText ? jsx(Box, Object.assign({
2038
2036
  sx: {
2039
2037
  whiteSpace: 'normal'
2040
2038
  }
2041
2039
  }, {
2042
2040
  children: typeof value === 'string' ? value : JSON.stringify(value)
2043
- })) : jsx(Box, {
2044
- children: jsx(OverflowTip, {
2045
- children: typeof value === 'string' ? value : JSON.stringify(value)
2046
- })
2041
+ })) : jsx(OverflowTip, {
2042
+ children: typeof value === 'string' ? value : JSON.stringify(value)
2047
2043
  }), canCopy && jsx(CopyButton, {
2048
2044
  copyText: copyValue ? typeof copyValue === 'string' ? copyValue : JSON.stringify(copyValue) : value
2049
2045
  })]
@@ -3232,6 +3228,9 @@ const ControlPhoneInput = _a => {
3232
3228
  rules: {
3233
3229
  required: required ? requiredErrorText || DEFAULT_REQUIRED_ERROR_TEXT : false,
3234
3230
  validate: val => {
3231
+ if (!required && !val) {
3232
+ return true;
3233
+ }
3235
3234
  if (!/(\+7\s\(\d{3}\)\s)(\d{3}\s\d{2})(\s\d{2})/.test(val)) {
3236
3235
  return 'Incorrect phone number format';
3237
3236
  }
@@ -6829,7 +6828,7 @@ const PropertyFiller = ({
6829
6828
  parseValue: true,
6830
6829
  hideErrorMessage: true,
6831
6830
  useCleanValue: true,
6832
- mode: propertyType === PropertyType.ANY || propertyType === PropertyType.JSON ? 'text' : 'json'
6831
+ mode: propertyType === PropertyType.ANY ? 'text' : 'json'
6833
6832
  }) : jsx(ControlInput, {
6834
6833
  control: control,
6835
6834
  name: name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.47",
3
+ "version": "1.4.48",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"