intelicoreact 0.1.98 → 0.2.1

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.
@@ -32,9 +32,15 @@ var TieredCheckboxes = function TieredCheckboxes(_ref) {
32
32
  return item.key === key;
33
33
  });
34
34
  parent.value = value;
35
- if (value) parent.children.forEach(function (item) {
35
+ if (value) parent.children.filter(function (_ref2) {
36
+ var disabled = _ref2.disabled;
37
+ return !disabled;
38
+ }).forEach(function (item) {
36
39
  return item.value = true;
37
- });else parent.children.forEach(function (item) {
40
+ });else parent.children.filter(function (_ref3) {
41
+ var disabled = _ref3.disabled;
42
+ return !disabled;
43
+ }).forEach(function (item) {
38
44
  return item.value = false;
39
45
  });
40
46
  onChange((0, _toConsumableArray2.default)(items));
@@ -74,7 +80,11 @@ var TieredCheckboxes = function TieredCheckboxes(_ref) {
74
80
  value: parent.value,
75
81
  onChange: function onChange(value) {
76
82
  return handle.changeParent(value, parent.key);
77
- }
83
+ },
84
+ disabled: parent.children.every(function (_ref4) {
85
+ var disabled = _ref4.disabled;
86
+ return disabled === true;
87
+ })
78
88
  }), parent.children && parent.children.map(function (child) {
79
89
  return /*#__PURE__*/_react.default.createElement("div", {
80
90
  key: child.key,
@@ -82,6 +92,7 @@ var TieredCheckboxes = function TieredCheckboxes(_ref) {
82
92
  }, /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
83
93
  label: child.label,
84
94
  value: child.value,
95
+ disabled: child === null || child === void 0 ? void 0 : child.disabled,
85
96
  onChange: function onChange(value) {
86
97
  return handle.changeChild(value, child.key, parent.key);
87
98
  }
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.filterNumeric = exports.filterPhone = exports.filterToLimitLength = exports.filterFloat = exports.formatNumberValueToMask = exports.formatToCutOffDotAtTheEnd = exports.formatToRemoveComa = exports.formatToOnlyASCIICodeText = exports.formatToLetters = exports.formatToTwoDigitAfterDot = exports.formatToPriceInputAndDollarSymbol = exports.formatToAddBitDepthPoints = exports.formatDollarSign = exports.formatOnlyNumbers = void 0;
8
+ exports.filterNumeric = exports.filterPhone = exports.filterToLimitLength = exports.filterFloat = exports.formatNumberValueToMask = exports.formatToCutOffDotAtTheEnd = exports.formatToOnlyASCIICodeText = exports.formatToLetters = exports.formatToTwoDigitAfterDot = exports.formatToPriceInputAndDollarSymbol = exports.formatToAddBitDepthPoints = exports.formatToRemoveComa = exports.formatDollarSign = exports.formatOnlyNumbers = void 0;
9
9
 
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
11
 
@@ -28,6 +28,12 @@ var formatDollarSign = function formatDollarSign(inputValue) {
28
28
 
29
29
  exports.formatDollarSign = formatDollarSign;
30
30
 
31
+ var formatToRemoveComa = function formatToRemoveComa(value) {
32
+ return (value ? value.toString() : '').toString().replace(/,/g, '');
33
+ };
34
+
35
+ exports.formatToRemoveComa = formatToRemoveComa;
36
+
31
37
  var formatToAddBitDepthPoints = function formatToAddBitDepthPoints(inputValue) {
32
38
  var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
33
39
  var value = !!inputValue ? inputValue.toString() : ''; //содержит ли value точку
@@ -36,7 +42,7 @@ var formatToAddBitDepthPoints = function formatToAddBitDepthPoints(inputValue) {
36
42
 
37
43
  var valueBeforeDot = isFraction ? value.slice(0, value.indexOf('.')) : value; //расстановка запятых после каждой 3й цифры с конца
38
44
 
39
- var intPart = valueBeforeDot.split('').reverse().reduce(function (acc, item, idx) {
45
+ var intPart = formatToRemoveComa(valueBeforeDot).split('').reverse().reduce(function (acc, item, idx) {
40
46
  return idx % step === 0 && idx !== 0 ? [].concat((0, _toConsumableArray2.default)(acc), [',', item]) : [].concat((0, _toConsumableArray2.default)(acc), [item]);
41
47
  }, []).reverse().join('');
42
48
  return isFraction ? intPart + value.slice(value.indexOf('.')) : intPart;
@@ -81,12 +87,6 @@ var formatToOnlyASCIICodeText = function formatToOnlyASCIICodeText(text) {
81
87
 
82
88
  exports.formatToOnlyASCIICodeText = formatToOnlyASCIICodeText;
83
89
 
84
- var formatToRemoveComa = function formatToRemoveComa(value) {
85
- return (!!value ? value.toString() : '').toString().replace(/\,/g, '');
86
- };
87
-
88
- exports.formatToRemoveComa = formatToRemoveComa;
89
-
90
90
  var formatToCutOffDotAtTheEnd = function formatToCutOffDotAtTheEnd(inputValue) {
91
91
  var value = !!inputValue ? inputValue.toString() : '';
92
92
  return value.toString().slice(-1) === '.' ? value.slice(0, -1) : value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.98",
3
+ "version": "0.2.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [