intelicoreact 1.0.65 → 1.0.66

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.
@@ -60,6 +60,7 @@
60
60
  &__input {
61
61
  width: 100%;
62
62
  height: 16px;
63
+ padding: 0 16px 0 8px;
63
64
 
64
65
  text-overflow: ellipsis;
65
66
 
@@ -21,12 +21,12 @@ var _react = _interopRequireWildcard(require("react"));
21
21
 
22
22
  var _classnames = _interopRequireDefault(require("classnames"));
23
23
 
24
- var _reactInputMask = _interopRequireDefault(require("react-input-mask"));
25
-
26
24
  var _index = require("../../../Constants/index.constants");
27
25
 
28
26
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
29
27
 
28
+ var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
29
+
30
30
  require("./Input.scss");
31
31
 
32
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -85,7 +85,9 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
85
85
  _ref$isUseAutoSelect = _ref.isUseAutoSelect,
86
86
  isUseAutoSelect = _ref$isUseAutoSelect === void 0 ? true : _ref$isUseAutoSelect,
87
87
  _ref$isReadOnly = _ref.isReadOnly,
88
- isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly;
88
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
89
+ _ref$isLoading = _ref.isLoading,
90
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
89
91
  var DEFAULT_BLINK_TIME = 100; // STATES
90
92
 
91
93
  var _useState = (0, _react.useState)(false),
@@ -303,7 +305,7 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
303
305
  } : {});
304
306
 
305
307
  return /*#__PURE__*/_react.default.createElement("div", {
306
- className: (0, _classnames.default)("input__wrap", (0, _defineProperty2.default)({}, "input__wrap_focus", isFocused), (0, _defineProperty2.default)({}, "input__wrap_error", error || isToHighlightError), (0, _defineProperty2.default)({}, "input__wrap--disabled", disabled)),
308
+ className: (0, _classnames.default)("input__wrap", (0, _defineProperty2.default)({}, "input__wrap_focus", isFocused), (0, _defineProperty2.default)({}, "input__wrap_error", error || isToHighlightError), (0, _defineProperty2.default)({}, "input__wrap--disabled", disabled || isLoading)),
307
309
  onMouseEnter: function onMouseEnter() {
308
310
  return setOnInputHover(true);
309
311
  },
@@ -327,6 +329,8 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
327
329
  hidden: !(0, _fieldValueFormatters.getSafelyValue)(value)
328
330
  }),
329
331
  onClick: handle.toggleEdit
332
+ }), isLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
333
+ size: "small"
330
334
  }));
331
335
  });
332
336
 
@@ -15,6 +15,7 @@
15
15
  }
16
16
 
17
17
  &__wrap {
18
+ position: relative;
18
19
  display: flex;
19
20
  align-items: center;
20
21
 
@@ -41,6 +42,10 @@
41
42
  &_error {
42
43
  border-color: #F06D8D !important;
43
44
  }
45
+
46
+ .lds-ring.lds-ring_small {
47
+ top: calc(50% - 18px);
48
+ }
44
49
  }
45
50
 
46
51
  &_disabled {
@@ -25,6 +25,8 @@ var _config = require("./config");
25
25
 
26
26
  var _functions = require("./functions");
27
27
 
28
+ var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
29
+
28
30
  require("./InputMask2.scss");
29
31
 
30
32
  var _Hint = _interopRequireDefault(require("../../UI/Hint/Hint"));
@@ -56,6 +58,8 @@ function InputMask2() {
56
58
  adaptTextCase = _ref.adaptTextCase,
57
59
  _ref$isUseAutoSelect = _ref.isUseAutoSelect,
58
60
  isUseAutoSelect = _ref$isUseAutoSelect === void 0 ? true : _ref$isUseAutoSelect,
61
+ _ref$isLoading = _ref.isLoading,
62
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
59
63
  icon = _ref.icon,
60
64
  showIcon = _ref.showIcon,
61
65
  isIconLeft = _ref.isIconLeft,
@@ -646,7 +650,7 @@ function InputMask2() {
646
650
  }, {
647
651
  'input-mask_blink-error': blinkError
648
652
  }, {
649
- disabled: disabled
653
+ disabled: disabled || isLoading
650
654
  })
651
655
  }, /*#__PURE__*/_react.default.createElement("div", {
652
656
  className: "\n input-mask\n ".concat(isError ? 'input-mask_error' : '', "\n ").concat(isFocused ? 'input-mask_focus' : '', "\n ").concat(blinkError ? 'input-mask_blink-error' : '', "\n ")
@@ -672,7 +676,9 @@ function InputMask2() {
672
676
  side: hintPosition
673
677
  }))), showErrors && errorMessage && /*#__PURE__*/_react.default.createElement("div", {
674
678
  className: "input-mask_error-text"
675
- }, errorMessage));
679
+ }, errorMessage), isLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
680
+ size: "small"
681
+ }));
676
682
  };
677
683
 
678
684
  return render();
@@ -5,6 +5,7 @@
5
5
  }
6
6
 
7
7
  .input-mask2_wrapper {
8
+ position: relative;
8
9
  display: block;
9
10
  // width: fit-content;
10
11
  width: 100%;
@@ -174,4 +175,8 @@
174
175
 
175
176
  font-size: 12px;
176
177
  }
178
+
179
+ .lds-ring.lds-ring_small {
180
+ top: calc(50% - 18px);
181
+ }
177
182
  }
@@ -27,6 +27,8 @@ var _index = require("../../../Constants/index.constants");
27
27
 
28
28
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
29
29
 
30
+ var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
31
+
30
32
  require("./NumericInput.scss");
31
33
 
32
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -76,7 +78,9 @@ var NumericInput = function NumericInput(_ref) {
76
78
  _ref$isNotRenderButto = _ref.isNotRenderButtons,
77
79
  isNotRenderButtons = _ref$isNotRenderButto === void 0 ? false : _ref$isNotRenderButto,
78
80
  _ref$isUseAutoSelect = _ref.isUseAutoSelect,
79
- isUseAutoSelect = _ref$isUseAutoSelect === void 0 ? true : _ref$isUseAutoSelect;
81
+ isUseAutoSelect = _ref$isUseAutoSelect === void 0 ? true : _ref$isUseAutoSelect,
82
+ _ref$isLoading = _ref.isLoading,
83
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
80
84
  var DEFAULT_BLINK_TIME = 200; //REFS
81
85
 
82
86
  var inputRef = (0, _react.useRef)(null);
@@ -318,7 +322,7 @@ var NumericInput = function NumericInput(_ref) {
318
322
 
319
323
  return /*#__PURE__*/_react.default.createElement("div", {
320
324
  ref: wrapRef,
321
- className: (0, _classnames.default)("input__wrap", (0, _defineProperty2.default)({}, "input__wrap_focus", isFocused), (0, _defineProperty2.default)({}, "input__wrap_error", error || isToHighlightError), (0, _defineProperty2.default)({}, "input__wrap--disabled", disabled))
325
+ className: (0, _classnames.default)("input__wrap", (0, _defineProperty2.default)({}, "input__wrap_focus", isFocused), (0, _defineProperty2.default)({}, "input__wrap_error", error || isToHighlightError), (0, _defineProperty2.default)({}, "input__wrap--disabled", disabled || isLoading))
322
326
  }, renderInput(), icon, withDelete && /*#__PURE__*/_react.default.createElement("span", {
323
327
  className: (0, _classnames.default)("input__close", {
324
328
  hidden: !inputValue
@@ -326,6 +330,8 @@ var NumericInput = function NumericInput(_ref) {
326
330
  onClick: function onClick() {
327
331
  return handle.clear();
328
332
  }
333
+ }), isLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
334
+ size: "small"
329
335
  }));
330
336
  };
331
337
 
@@ -15,6 +15,7 @@
15
15
  }
16
16
 
17
17
  &__wrap {
18
+ position: relative;
18
19
  display: flex;
19
20
  align-items: center;
20
21
 
@@ -41,6 +42,10 @@
41
42
  &_error {
42
43
  border-color: #F06D8D;
43
44
  }
45
+
46
+ .lds-ring.lds-ring_small {
47
+ top: calc(50% - 18px);
48
+ }
44
49
  }
45
50
 
46
51
  &_disabled {
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _moment = _interopRequireDefault(require("moment"));
15
+
14
16
  require("./DoubleString.scss");
15
17
 
16
18
  var RC = 'double-string';
@@ -20,13 +22,20 @@ var DoubleString = function DoubleString(_ref) {
20
22
  description = _ref.description,
21
23
  className = _ref.className,
22
24
  _ref$testId = _ref.testId,
23
- testId = _ref$testId === void 0 ? '' : _ref$testId;
25
+ testId = _ref$testId === void 0 ? '' : _ref$testId,
26
+ isFormatValueToDate = _ref.isFormatValueToDate,
27
+ _ref$dateFormatSettin = _ref.dateFormatSettings,
28
+ _ref$dateFormatSettin2 = _ref$dateFormatSettin.parseFormat,
29
+ parseFormat = _ref$dateFormatSettin2 === void 0 ? 'MM.DD.YYYY' : _ref$dateFormatSettin2,
30
+ _ref$dateFormatSettin3 = _ref$dateFormatSettin.displayFormat,
31
+ displayFormat = _ref$dateFormatSettin3 === void 0 ? 'MM.DD.YYYY' : _ref$dateFormatSettin3;
32
+ var computedValue = isFormatValueToDate ? (0, _moment.default)(value, parseFormat).format(displayFormat) : value;
24
33
  return /*#__PURE__*/_react.default.createElement("div", {
25
34
  className: (0, _classnames.default)(RC, className)
26
35
  }, /*#__PURE__*/_react.default.createElement("span", {
27
36
  "data-testid": "doubleString--".concat(testId, "--value"),
28
37
  className: (0, _classnames.default)("".concat(RC, "__value"))
29
- }, value), /*#__PURE__*/_react.default.createElement("span", {
38
+ }, computedValue), /*#__PURE__*/_react.default.createElement("span", {
30
39
  "data-testid": "doubleString--".concat(description, "--value"),
31
40
  className: (0, _classnames.default)("".concat(RC, "__description"))
32
41
  }, description));
@@ -18,7 +18,6 @@
18
18
 
19
19
  .modal {
20
20
  --modal-min-height: 300px;
21
- //--modal-height: calc(100% - 30px);
22
21
  --max-height: calc(100% - 30px);
23
22
 
24
23
  position: relative;
@@ -29,7 +28,6 @@
29
28
 
30
29
  width: 600px;
31
30
  min-height: var(--modal-min-height);
32
- height: var(--modal-height);
33
31
  max-height: var(--max-height);
34
32
  margin: 0 10px;
35
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [