intelicoreact 1.5.19 → 1.5.21
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.
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +0 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +4 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +3 -7
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +6 -6
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +8 -8
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +12 -12
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +2 -2
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +2 -5
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +3 -3
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +4 -5
- package/dist/Atomic/FormElements/Input/Input.js +2 -3
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +2 -3
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +2 -2
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +2 -2
- package/dist/Atomic/FormElements/InputMask/InputMask.js +2 -2
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +2 -2
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +3 -4
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +5 -6
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +3 -2
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +2 -4
- package/dist/Atomic/FormElements/RangeList/RangeList.js +3 -5
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +6 -5
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +3 -4
- package/dist/Atomic/FormElements/Switcher/Switcher.js +3 -2
- package/dist/Atomic/FormElements/Text/Text.js +1 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +3 -2
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +2 -2
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +4 -2
- package/dist/Atomic/Layout/Spinner/Spinner.js +2 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +1 -1
- package/dist/Atomic/UI/Accordion/AccordionItem.js +2 -2
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +3 -2
- package/dist/Atomic/UI/Alert/Alert.js +4 -4
- package/dist/Atomic/UI/Arrow/Arrow.js +4 -2
- package/dist/Atomic/UI/Button/Button.js +2 -2
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +2 -2
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +3 -3
- package/dist/Atomic/UI/DateTime/DateTime.js +5 -3
- package/dist/Atomic/UI/DoubleString/DoubleString.js +3 -4
- package/dist/Atomic/UI/Hint/Hint.js +49 -22
- package/dist/Atomic/UI/Modal/Modal.js +2 -2
- package/dist/Atomic/UI/Modal/ModalHOC.js +0 -2
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +3 -2
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +2 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +3 -5
- package/dist/Atomic/UI/Price/Price.js +3 -4
- package/dist/Atomic/UI/PriceRange/PriceRange.js +3 -2
- package/dist/Atomic/UI/Status/Status.js +2 -1
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +4 -3
- package/dist/Atomic/UI/Table/Table.js +1 -1
- package/dist/Atomic/UI/Tag/Tag.js +1 -3
- package/dist/Atomic/UI/UserBox/UserBox.js +7 -4
- package/dist/Molecular/InputPassword/InputPassword.js +3 -3
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ const RangeList = props => {
|
|
|
35
35
|
defaultErrorText,
|
|
36
36
|
nullValueText,
|
|
37
37
|
isOnlyOneRow = false,
|
|
38
|
-
testId
|
|
38
|
+
testId = "range-list"
|
|
39
39
|
} = props;
|
|
40
40
|
const NULL_VALUE_TEXT = nullValueText !== null && nullValueText !== void 0 ? nullValueText : "No data";
|
|
41
41
|
const [state, setState] = (0, _react.useState)(DEFAULT_STATE);
|
|
@@ -93,7 +93,6 @@ const RangeList = props => {
|
|
|
93
93
|
}, /*#__PURE__*/_react.default.createElement(_RangeListRow.RangeListCell, {
|
|
94
94
|
className: "".concat(RC, "__cell-input")
|
|
95
95
|
}, /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
96
|
-
testId: "range-list".concat(testId && "--".concat(testId), "-from"),
|
|
97
96
|
ref: inputFromRef,
|
|
98
97
|
onlyNumbers: isFloatValues ? {
|
|
99
98
|
type: "float",
|
|
@@ -108,7 +107,6 @@ const RangeList = props => {
|
|
|
108
107
|
})), /*#__PURE__*/_react.default.createElement(_RangeListRow.RangeListCell, {
|
|
109
108
|
className: "".concat(RC, "__cell-input")
|
|
110
109
|
}, /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
111
|
-
testId: "range-list".concat(testId && "--".concat(testId), "-to"),
|
|
112
110
|
ref: inputToRef,
|
|
113
111
|
onlyNumbers: isFloatValues ? {
|
|
114
112
|
type: "float",
|
|
@@ -123,10 +121,10 @@ const RangeList = props => {
|
|
|
123
121
|
})), /*#__PURE__*/_react.default.createElement(_RangeListRow.RangeListCell, {
|
|
124
122
|
className: "".concat(RC, "__cell-button")
|
|
125
123
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
126
|
-
testId: "range-list".concat(testId && "--".concat(testId), "-button"),
|
|
127
124
|
onClick: handle.addRange
|
|
128
125
|
}, "Add")));
|
|
129
126
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
"data-testid": testId,
|
|
130
128
|
className: (0, _classnames.default)(RC, className, {
|
|
131
129
|
["".concat(RC, "_disabled")]: disabled
|
|
132
130
|
})
|
|
@@ -141,7 +139,7 @@ const RangeList = props => {
|
|
|
141
139
|
}, innerError || error || outerError), !(value !== null && value !== void 0 && value.length) && /*#__PURE__*/_react.default.createElement("div", {
|
|
142
140
|
className: (0, _classnames.default)("".concat(RC, "__row"), "".concat(RC, "__values"), "".concat(RC, "__null-value"))
|
|
143
141
|
}, NULL_VALUE_TEXT), value.map((row, idx) => /*#__PURE__*/_react.default.createElement(_RangeListRow.default, (0, _extends2.default)({
|
|
144
|
-
"data-testid": "
|
|
142
|
+
"data-testid": "".concat(testId, "-row-").concat(idx),
|
|
145
143
|
key: "idx-".concat(idx, "-from-").concat(row.from, "-to").concat(row.to)
|
|
146
144
|
}, row, {
|
|
147
145
|
idx: idx,
|
|
@@ -42,7 +42,7 @@ function RangeSlider(_ref) {
|
|
|
42
42
|
decimalPlaces = 2,
|
|
43
43
|
minRange = 0,
|
|
44
44
|
precision = 0,
|
|
45
|
-
testId,
|
|
45
|
+
testId = "range-slider",
|
|
46
46
|
value = {
|
|
47
47
|
from: min,
|
|
48
48
|
to: max
|
|
@@ -303,7 +303,7 @@ function RangeSlider(_ref) {
|
|
|
303
303
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
304
304
|
className: "range-slider__inputs--from"
|
|
305
305
|
}, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({
|
|
306
|
-
"data-testid": "
|
|
306
|
+
"data-testid": "".concat(testId, "-input-from"),
|
|
307
307
|
value: from.toString(),
|
|
308
308
|
onFocus: e => onRangeInputFocus(e, "from"),
|
|
309
309
|
onBlur: e => onRangeInputBlur(e, "from"),
|
|
@@ -318,7 +318,7 @@ function RangeSlider(_ref) {
|
|
|
318
318
|
}, _mobileKeyboardTypesPresets.NUMERIC_KEYBOARD))), /*#__PURE__*/_react.default.createElement("div", {
|
|
319
319
|
className: "range-slider__inputs__input"
|
|
320
320
|
}, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({
|
|
321
|
-
"data-testid": "
|
|
321
|
+
"data-testid": "".concat(testId, "-input-to"),
|
|
322
322
|
value: to.toString(),
|
|
323
323
|
onFocus: e => onRangeInputFocus(e, "to"),
|
|
324
324
|
onBlur: e => onRangeInputBlur(e, "to"),
|
|
@@ -362,7 +362,7 @@ function RangeSlider(_ref) {
|
|
|
362
362
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
363
363
|
className: "range-slider__track__range-triggers"
|
|
364
364
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
365
|
-
"data-testid": "
|
|
365
|
+
"data-testid": "".concat(testId, "-track-from"),
|
|
366
366
|
ref: fromTriggerRef,
|
|
367
367
|
style: fromStyle,
|
|
368
368
|
className: "range-slider__track__range-triggers--trigger range-slider__track__range-triggers--trigger-left",
|
|
@@ -372,7 +372,7 @@ function RangeSlider(_ref) {
|
|
|
372
372
|
onTouchEnd: onTriggerMoveEnd,
|
|
373
373
|
onClick: () => {} // DONT REMOVE! MOBILE WILL NOT WORK WITHOUT IT
|
|
374
374
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
375
|
-
"data-testid": "
|
|
375
|
+
"data-testid": "".concat(testId, "-track-to"),
|
|
376
376
|
ref: toTriggerRef,
|
|
377
377
|
style: toStyle,
|
|
378
378
|
className: "range-slider__track__range-triggers--trigger range-slider__track__range-triggers--trigger-right",
|
|
@@ -394,6 +394,7 @@ function RangeSlider(_ref) {
|
|
|
394
394
|
}), renderTrackRange(), renderTrackTriggers());
|
|
395
395
|
};
|
|
396
396
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
397
|
+
"data-testid": testId,
|
|
397
398
|
className: "range-slider"
|
|
398
399
|
}, renderHeader(), renderInputs(), renderTrack());
|
|
399
400
|
}
|
|
@@ -19,12 +19,11 @@ const SwitchableRow = props => {
|
|
|
19
19
|
setIsActive,
|
|
20
20
|
switcherLabel,
|
|
21
21
|
isSwitcherLabelBold,
|
|
22
|
-
testId
|
|
23
|
-
id
|
|
22
|
+
testId = RC_default
|
|
24
23
|
} = props || {};
|
|
25
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
25
|
className: (0, _classnames.default)(RC, className),
|
|
27
|
-
"data-testid":
|
|
26
|
+
"data-testid": testId
|
|
28
27
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
28
|
className: (0, _classnames.default)("".concat(RC, "__cell"))
|
|
30
29
|
}, /*#__PURE__*/_react.default.createElement(_Switcher.default, {
|
|
@@ -32,7 +31,7 @@ const SwitchableRow = props => {
|
|
|
32
31
|
onChange: setIsActive,
|
|
33
32
|
isLabelBold: isSwitcherLabelBold,
|
|
34
33
|
label: switcherLabel,
|
|
35
|
-
"data-testid": "
|
|
34
|
+
"data-testid": "".concat(testId, "-switcher")
|
|
36
35
|
})), children);
|
|
37
36
|
};
|
|
38
37
|
var _default = exports.default = SwitchableRow;
|
|
@@ -20,14 +20,15 @@ const Switcher = _ref => {
|
|
|
20
20
|
isLabelBold,
|
|
21
21
|
hint,
|
|
22
22
|
hintSide,
|
|
23
|
-
testId
|
|
23
|
+
testId = "switcher"
|
|
24
24
|
} = _ref;
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
"data-testid": testId,
|
|
26
27
|
className: (0, _classnames.default)(RC, className, {
|
|
27
28
|
["".concat(RC, "_disabled")]: disabled
|
|
28
29
|
})
|
|
29
30
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
30
|
-
"data-testid": "
|
|
31
|
+
"data-testid": "".concat(testId, "-button"),
|
|
31
32
|
className: (0, _classnames.default)("".concat(RC, "__button")),
|
|
32
33
|
onClick: e => onChange(!isActive, e)
|
|
33
34
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -97,7 +97,7 @@ const Text = _ref => {
|
|
|
97
97
|
className: "".concat(RC, "__icon-container")
|
|
98
98
|
}, icon), value);
|
|
99
99
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
-
"data-testid":
|
|
100
|
+
"data-testid": testId,
|
|
101
101
|
className: (0, _classnames.default)(RC, className, {
|
|
102
102
|
["".concat(RC, "-left")]: align === "left",
|
|
103
103
|
["".concat(RC, "-center")]: align === "center",
|
|
@@ -23,7 +23,7 @@ const Textarea = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
23
23
|
disabled,
|
|
24
24
|
className,
|
|
25
25
|
isNotValidateASCII = false,
|
|
26
|
-
testId =
|
|
26
|
+
testId = RC,
|
|
27
27
|
withAutoGrow,
|
|
28
28
|
onKeyDown = () => {}
|
|
29
29
|
} = _ref;
|
|
@@ -52,10 +52,11 @@ const Textarea = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
52
52
|
}
|
|
53
53
|
}, [value, withAutoGrow]);
|
|
54
54
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
"data-testid": testId,
|
|
55
56
|
className: (0, _classnames.default)("".concat(RC), className)
|
|
56
57
|
}, /*#__PURE__*/_react.default.createElement("textarea", {
|
|
57
58
|
id: id !== null && id !== void 0 ? id : Math.random().toString(16).slice(2),
|
|
58
|
-
"data-testid": "
|
|
59
|
+
"data-testid": "".concat(testId, "-textarea"),
|
|
59
60
|
className: "".concat(RC, "__textarea"),
|
|
60
61
|
value: value,
|
|
61
62
|
onChange: e => handle.change(e.target.value),
|
|
@@ -26,7 +26,7 @@ const VariantsListRadio = _ref => {
|
|
|
26
26
|
isDisabled,
|
|
27
27
|
id,
|
|
28
28
|
className,
|
|
29
|
-
testId,
|
|
29
|
+
testId = "variants-list-radio",
|
|
30
30
|
attributesOfNativeInput,
|
|
31
31
|
isMixWithPersonalAttributes
|
|
32
32
|
} = _ref;
|
|
@@ -47,7 +47,7 @@ const VariantsListRadio = _ref => {
|
|
|
47
47
|
}, [outerValue]);
|
|
48
48
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
49
49
|
id: componentnId,
|
|
50
|
-
"data-testid": testId
|
|
50
|
+
"data-testid": testId,
|
|
51
51
|
className: (0, _classnames.default)(RC, "".concat(RC, "_items-content-").concat(mode), className, {
|
|
52
52
|
["".concat(RC, "_with-borders")]: isWithBorders && !isUseAsOptionsList,
|
|
53
53
|
["".concat(RC, "_radio-position-reverse")]: isRadioPositionReverse
|
|
@@ -18,7 +18,8 @@ const VariantsListRadioItem = _ref => {
|
|
|
18
18
|
onChange = () => {},
|
|
19
19
|
attributesOfNativeInput = {},
|
|
20
20
|
isMixWithPersonalAttributes,
|
|
21
|
-
isUseAsOptionsList
|
|
21
|
+
isUseAsOptionsList,
|
|
22
|
+
testId = "variants-list-radio-item"
|
|
22
23
|
} = _ref;
|
|
23
24
|
// ? Для корректной работы нужны parentId и item(объект)
|
|
24
25
|
if (!parentId || !(0, _utils.getIsOnlyAnObject)(item)) return null;
|
|
@@ -37,6 +38,7 @@ const VariantsListRadioItem = _ref => {
|
|
|
37
38
|
...personalAttributesOfNativeInput
|
|
38
39
|
} : personalAttributesOfNativeInput || attributesOfNativeInput || {};
|
|
39
40
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
41
|
+
"data-testid": testId,
|
|
40
42
|
className: (0, _classnames.default)("".concat(RC, "__item"), {
|
|
41
43
|
["".concat(RC, "__item_disabled")]: isDisabled,
|
|
42
44
|
["".concat(RC, "__item_active")]: isActive,
|
|
@@ -49,7 +51,7 @@ const VariantsListRadioItem = _ref => {
|
|
|
49
51
|
className: (0, _classnames.default)("".concat(RC, "__item-radio"))
|
|
50
52
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
51
53
|
id: id,
|
|
52
|
-
"data-testid": "
|
|
54
|
+
"data-testid": "".concat(testId, "-input"),
|
|
53
55
|
type: "radio",
|
|
54
56
|
checked: isActive,
|
|
55
57
|
className: "".concat(RC, "__item-radio-input"),
|
|
@@ -10,13 +10,14 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
require("./Spinner.scss");
|
|
11
11
|
const Spinner = function (_ref) {
|
|
12
12
|
let {
|
|
13
|
+
className,
|
|
13
14
|
size = null
|
|
14
15
|
} = _ref;
|
|
15
16
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
16
17
|
className: (0, _classnames.default)("loader-box", {
|
|
17
18
|
j5: size !== "small",
|
|
18
19
|
j8: size === "small"
|
|
19
|
-
})
|
|
20
|
+
}, className)
|
|
20
21
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
21
22
|
className: (0, _classnames.default)("lds-ring", {
|
|
22
23
|
["lds-ring_".concat(size)]: size
|
|
@@ -22,7 +22,7 @@ const Accordion = _ref => {
|
|
|
22
22
|
itemClassName,
|
|
23
23
|
isMenuHovered,
|
|
24
24
|
isOpen,
|
|
25
|
-
testId = "accordion
|
|
25
|
+
testId = "accordion"
|
|
26
26
|
} = _ref;
|
|
27
27
|
const [data, setData] = (0, _react.useState)(items);
|
|
28
28
|
const onChange = (0, _utils.handleObjectChange)(setData, () => setData([...data]));
|
|
@@ -22,7 +22,7 @@ const AccordionItem = _ref => {
|
|
|
22
22
|
className,
|
|
23
23
|
children,
|
|
24
24
|
noChevron,
|
|
25
|
-
testId
|
|
25
|
+
testId = "accordion-item"
|
|
26
26
|
} = _ref;
|
|
27
27
|
const Icon = Icons[item.icon];
|
|
28
28
|
const [maxHeight, setMaxHeight] = (0, _react.useState)(0);
|
|
@@ -64,9 +64,9 @@ const AccordionItem = _ref => {
|
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
"data-testid": testId,
|
|
67
68
|
className: (0, _classnames.default)("accordion--item", className)
|
|
68
69
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
-
"data-testid": testId,
|
|
70
70
|
className: (0, _classnames.default)("accordion--title-box", {
|
|
71
71
|
"accordion--title-open": isOpen
|
|
72
72
|
}),
|
|
@@ -15,7 +15,7 @@ const AdvTag = _ref => {
|
|
|
15
15
|
let {
|
|
16
16
|
item,
|
|
17
17
|
className,
|
|
18
|
-
testId,
|
|
18
|
+
testId = "adv-tag",
|
|
19
19
|
toTop = true
|
|
20
20
|
} = _ref;
|
|
21
21
|
if (!item) return null;
|
|
@@ -28,7 +28,6 @@ const AdvTag = _ref => {
|
|
|
28
28
|
warnLeft,
|
|
29
29
|
warnLeftMsg,
|
|
30
30
|
warnRightMsg,
|
|
31
|
-
noPingTree,
|
|
32
31
|
isEntityAndCounter = false,
|
|
33
32
|
entityAndCounter = {
|
|
34
33
|
nullCounterMessage: "",
|
|
@@ -68,6 +67,7 @@ const AdvTag = _ref => {
|
|
|
68
67
|
});
|
|
69
68
|
const renderClassicTag = () => {
|
|
70
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
"data-testid": testId,
|
|
71
71
|
className: advancedTagClass,
|
|
72
72
|
ref: hintRef
|
|
73
73
|
}, warnLeft && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -116,6 +116,7 @@ const AdvTag = _ref => {
|
|
|
116
116
|
var _entityAndCounter$cou;
|
|
117
117
|
const isNullcounter = (entityAndCounter === null || entityAndCounter === void 0 || (_entityAndCounter$cou = entityAndCounter.counter) === null || _entityAndCounter$cou === void 0 ? void 0 : _entityAndCounter$cou.toString()) === "0";
|
|
118
118
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
+
"data-testid": testId,
|
|
119
120
|
className: advancedTagClass,
|
|
120
121
|
ref: hintRef
|
|
121
122
|
}, isNullcounter && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -24,7 +24,7 @@ const Alert = _ref => {
|
|
|
24
24
|
className,
|
|
25
25
|
children,
|
|
26
26
|
noDismiss,
|
|
27
|
-
testId,
|
|
27
|
+
testId = "alert",
|
|
28
28
|
isHidden = false,
|
|
29
29
|
variant = "warning",
|
|
30
30
|
isLoading,
|
|
@@ -40,19 +40,19 @@ const Alert = _ref => {
|
|
|
40
40
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, buttonParams), !noDismiss && /*#__PURE__*/_react.default.createElement("div", {
|
|
41
41
|
className: "alert__close-btn"
|
|
42
42
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.X, {
|
|
43
|
-
"data-testid": "
|
|
43
|
+
"data-testid": "".concat(testId, "-close"),
|
|
44
44
|
onClick: () => setOnClose(!onClose)
|
|
45
45
|
})));
|
|
46
46
|
if (!noDismiss) return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
47
|
className: "alert__close-btn"
|
|
48
48
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.X, {
|
|
49
|
-
"data-testid": "
|
|
49
|
+
"data-testid": "".concat(testId, "-close"),
|
|
50
50
|
onClick: () => setOnClose(!onClose)
|
|
51
51
|
}));
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
"data-testid":
|
|
55
|
+
"data-testid": testId,
|
|
56
56
|
className: (0, _classnames.default)(className, {
|
|
57
57
|
hidden: onClose
|
|
58
58
|
}, "alert alert--".concat(variant), {
|
|
@@ -31,6 +31,7 @@ const Arrow = _ref => {
|
|
|
31
31
|
function renderSVG() {
|
|
32
32
|
if (type === "left") {
|
|
33
33
|
if (isAlt) return /*#__PURE__*/_react.default.createElement("svg", {
|
|
34
|
+
"data-testid": testId,
|
|
34
35
|
version: "1.1",
|
|
35
36
|
id: "Layer_1",
|
|
36
37
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -53,7 +54,7 @@ const Arrow = _ref => {
|
|
|
53
54
|
strokeLinejoin: "round"
|
|
54
55
|
}));
|
|
55
56
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
56
|
-
"data-testid":
|
|
57
|
+
"data-testid": testId,
|
|
57
58
|
width: "24",
|
|
58
59
|
height: "24",
|
|
59
60
|
viewBox: "0 0 24 24",
|
|
@@ -68,6 +69,7 @@ const Arrow = _ref => {
|
|
|
68
69
|
}));
|
|
69
70
|
}
|
|
70
71
|
if (isAlt) return /*#__PURE__*/_react.default.createElement("svg", {
|
|
72
|
+
"data-testid": testId,
|
|
71
73
|
id: "Layer_1",
|
|
72
74
|
xmlns: "http://www.w3.org/2000/svg",
|
|
73
75
|
width: "16",
|
|
@@ -89,7 +91,7 @@ const Arrow = _ref => {
|
|
|
89
91
|
strokeLinejoin: "round"
|
|
90
92
|
}));
|
|
91
93
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
92
|
-
"data-testid":
|
|
94
|
+
"data-testid": testId,
|
|
93
95
|
width: "24",
|
|
94
96
|
height: "24",
|
|
95
97
|
viewBox: "0 0 24 24",
|
|
@@ -21,14 +21,14 @@ const Button = _ref => {
|
|
|
21
21
|
style,
|
|
22
22
|
noIcon,
|
|
23
23
|
isIconRight,
|
|
24
|
-
testId = "",
|
|
24
|
+
testId = "button",
|
|
25
25
|
tabIndex = 0,
|
|
26
26
|
variant = "primary",
|
|
27
27
|
isTextEllipsis = false
|
|
28
28
|
} = _ref;
|
|
29
29
|
const noRenderIcon = noIcon || variant === "ellipse-apply" || variant === "ellipse-cancel";
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
31
|
-
"data-testid":
|
|
31
|
+
"data-testid": testId,
|
|
32
32
|
tabIndex: tabIndex === null || tabIndex === void 0 || (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex),
|
|
33
33
|
style: style,
|
|
34
34
|
className: (0, _classnames.default)(RC, {
|
|
@@ -28,8 +28,8 @@ const ButtonsBar = _ref => {
|
|
|
28
28
|
confirmBtnClass,
|
|
29
29
|
isConfirmBtnDisabled,
|
|
30
30
|
onConfirm,
|
|
31
|
-
testIdFirstBtn = "
|
|
32
|
-
testIdSecondBtn = "
|
|
31
|
+
testIdFirstBtn = "button-bar-first-item",
|
|
32
|
+
testIdSecondBtn = "button-bar-second-item"
|
|
33
33
|
} = _ref;
|
|
34
34
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
35
35
|
className: (0, _classnames.default)("button-bar", className)
|
|
@@ -21,7 +21,8 @@ const CircleProgressBar = _ref => {
|
|
|
21
21
|
isInnerLine,
|
|
22
22
|
radius = 59,
|
|
23
23
|
strokeWidth = 2,
|
|
24
|
-
innerLineStrokeWidth = 2
|
|
24
|
+
innerLineStrokeWidth = 2,
|
|
25
|
+
testId = "circle-progress-bar"
|
|
25
26
|
} = _ref;
|
|
26
27
|
const circumference = Math.round(2 * Math.PI * radius);
|
|
27
28
|
const amountProgress = amount < totalAmount ? Math.round(amount / totalAmount * 100) : 100; //%
|
|
@@ -35,7 +36,7 @@ const CircleProgressBar = _ref => {
|
|
|
35
36
|
setStrokeDashoffset(circumference - circumference * amountProgress / 100);
|
|
36
37
|
}, [amountProgress]);
|
|
37
38
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
"data-testid":
|
|
39
|
+
"data-testid": testId,
|
|
39
40
|
className: (0, _classnames.default)("limit-progress-bar", {
|
|
40
41
|
"limit-progress-bar--reverse": isReverseType
|
|
41
42
|
}, className)
|
|
@@ -87,7 +88,6 @@ const CircleProgressBar = _ref => {
|
|
|
87
88
|
strokeDashoffset
|
|
88
89
|
}
|
|
89
90
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
-
"data-testid": "test-circleProgress-children",
|
|
91
91
|
className: "limit-progress-bar__content"
|
|
92
92
|
}, children));
|
|
93
93
|
};
|
|
@@ -22,19 +22,21 @@ const DateTime = _ref => {
|
|
|
22
22
|
dateFormat: inputDateFormat,
|
|
23
23
|
timeFormat: inputTimeFormat,
|
|
24
24
|
isNoDate,
|
|
25
|
-
isNoTime
|
|
25
|
+
isNoTime,
|
|
26
|
+
testId = "date-time"
|
|
26
27
|
} = _ref;
|
|
27
28
|
const dateFormat = inputDateFormat ? inputDateFormat : DEFAULT_DATE_FORMAT;
|
|
28
29
|
const timeFormat = inputTimeFormat ? inputTimeFormat : DEFAULT_TIME_FORMAT;
|
|
29
30
|
const date = (0, _react.useMemo)(() => (valueFormat ? (0, _momentTimezone.default)(value, valueFormat) : (0, _momentTimezone.default)(value)).format(dateFormat), [value, valueFormat, dateFormat]);
|
|
30
31
|
const time = (0, _react.useMemo)(() => (valueFormat ? (0, _momentTimezone.default)(value, valueFormat) : (0, _momentTimezone.default)(value)).format(timeFormat), [value, valueFormat, timeFormat]);
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
"data-testid": testId,
|
|
32
34
|
className: (0, _classnames.default)(RC, className)
|
|
33
35
|
}, !isNoDate && /*#__PURE__*/_react.default.createElement("span", {
|
|
34
|
-
"data-testid": "
|
|
36
|
+
"data-testid": "".concat(testId, "-date"),
|
|
35
37
|
className: (0, _classnames.default)("".concat(RC, "__date"))
|
|
36
38
|
}, date), !isNoTime && /*#__PURE__*/_react.default.createElement("span", {
|
|
37
|
-
"data-testid": "
|
|
39
|
+
"data-testid": "".concat(testId, "-time"),
|
|
38
40
|
className: (0, _classnames.default)("".concat(RC, "__time"), {
|
|
39
41
|
["".concat(RC, "_color--pause")]: !isNoDate
|
|
40
42
|
})
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _reactFeather = require("react-feather");
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
+
var _reactFeather = require("react-feather");
|
|
12
12
|
require("./DoubleString.scss");
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -19,7 +19,7 @@ const DoubleString = _ref => {
|
|
|
19
19
|
description,
|
|
20
20
|
valuePostfix,
|
|
21
21
|
className,
|
|
22
|
-
testId = "",
|
|
22
|
+
testId = "double-string",
|
|
23
23
|
isFormatValueToDate,
|
|
24
24
|
isUseOnClick,
|
|
25
25
|
dateFormatSettings: {
|
|
@@ -55,11 +55,11 @@ const DoubleString = _ref => {
|
|
|
55
55
|
});
|
|
56
56
|
}, [descriptionRef, valueRef]);
|
|
57
57
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
"data-testid": testId,
|
|
58
59
|
className: (0, _classnames.default)(RC, className)
|
|
59
60
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
60
61
|
onClick: () => handle.click(),
|
|
61
62
|
ref: valueRef,
|
|
62
|
-
"data-testid": "doubleString--".concat(testId, "--value"),
|
|
63
63
|
className: (0, _classnames.default)("".concat(RC, "__value"), {
|
|
64
64
|
"double-string--value-opened": isOnClickON && isUseOnClick
|
|
65
65
|
}, {
|
|
@@ -76,7 +76,6 @@ const DoubleString = _ref => {
|
|
|
76
76
|
className: (0, _classnames.default)("".concat(RC, "__value-postfix"))
|
|
77
77
|
}, valuePostfix)) : description), /*#__PURE__*/_react.default.createElement("p", {
|
|
78
78
|
ref: descriptionRef,
|
|
79
|
-
"data-testid": "doubleString--".concat(description, "--value"),
|
|
80
79
|
className: (0, _classnames.default)("".concat(RC, "__description")),
|
|
81
80
|
title: !noTitle && elemsWidth.descriptionWidth > 99 ? computedValue : ""
|
|
82
81
|
}, !revert ? description : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, computedValue, valuePostfix && /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -12,9 +12,11 @@ var _reactFeather = require("react-feather");
|
|
|
12
12
|
var _utils = require("../../../Functions/utils");
|
|
13
13
|
var _CustomIcons = require("./../../../Molecular/CustomIcons");
|
|
14
14
|
var _utils2 = require("./partials/_utils");
|
|
15
|
+
var _Spinner = _interopRequireDefault(require("./../../Layout/Spinner/Spinner"));
|
|
15
16
|
require("./Hint.scss");
|
|
16
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
let isContentHoveredOuter = false;
|
|
18
20
|
const Hint = _ref => {
|
|
19
21
|
var _ref2, _label$replace;
|
|
20
22
|
let {
|
|
@@ -31,13 +33,15 @@ const Hint = _ref => {
|
|
|
31
33
|
children,
|
|
32
34
|
icon,
|
|
33
35
|
isAccessability = false,
|
|
34
|
-
testId = "
|
|
35
|
-
isHoverableContent = false
|
|
36
|
+
testId = "hint",
|
|
37
|
+
isHoverableContent = false,
|
|
38
|
+
isLoading
|
|
36
39
|
} = _ref;
|
|
37
40
|
const hintRef = (0, _react.useRef)(null);
|
|
38
41
|
const timeoutRef = (0, _react.useRef)(null);
|
|
39
42
|
const [hintId] = (0, _react.useState)((_ref2 = key !== null && key !== void 0 ? key : id) !== null && _ref2 !== void 0 ? _ref2 : Math.random().toString(16).slice(2));
|
|
40
43
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
44
|
+
const [isContentHovered, setIsContentHovered] = (0, _react.useState)(false);
|
|
41
45
|
|
|
42
46
|
//? Определяем handleScroll-стейт, чтобы никогда не менять ссылку тем самым гарантировать корректную работу removeEventListener.
|
|
43
47
|
//? Инициализируем стейт вызовом конструктора HandleScrollObj, передаем setIsOpen для записи в объект.
|
|
@@ -45,12 +49,52 @@ const Hint = _ref => {
|
|
|
45
49
|
//? По аналогии определяем handleClickOutside
|
|
46
50
|
const [handleClickOutside] = (0, _react.useState)(new _utils2.HandleClickOutsideObj(hintId, setIsOpen));
|
|
47
51
|
const isCallbackExist = typeof onClickCallback === "function";
|
|
52
|
+
const handle = {
|
|
53
|
+
onMouseEnter: () => {
|
|
54
|
+
if (handleOpenType === "hover") {
|
|
55
|
+
timeoutRef.current = setTimeout(() => {
|
|
56
|
+
setIsOpen(true);
|
|
57
|
+
!isOpen && onClickCallback();
|
|
58
|
+
}, 350);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
onMouseLeave: () => {
|
|
62
|
+
if (!isHoverableContent && handleOpenType === "hover") {
|
|
63
|
+
clearTimeout(timeoutRef.current);
|
|
64
|
+
timeoutRef.current = setTimeout(() => {
|
|
65
|
+
setIsOpen(false);
|
|
66
|
+
}, 1000);
|
|
67
|
+
} else if (isHoverableContent && handleOpenType === "hover") {
|
|
68
|
+
clearTimeout(timeoutRef.current);
|
|
69
|
+
timeoutRef.current = setTimeout(() => {
|
|
70
|
+
if (!isContentHoveredOuter) {
|
|
71
|
+
setIsOpen(false);
|
|
72
|
+
}
|
|
73
|
+
}, 100);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
onMouseLeaveHoverableContent: () => {
|
|
77
|
+
if (isHoverableContent && handleOpenType === "hover") {
|
|
78
|
+
clearTimeout(timeoutRef.current);
|
|
79
|
+
timeoutRef.current = setTimeout(() => {
|
|
80
|
+
setIsOpen(false);
|
|
81
|
+
setIsContentHovered(false);
|
|
82
|
+
isContentHoveredOuter = false;
|
|
83
|
+
}, 100);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
48
87
|
const getHintMarkUp = className => {
|
|
49
88
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
50
89
|
"data-testid": "test-hint-text",
|
|
51
90
|
className: (0, _classnames.default)("hint__text", "hint__text_".concat(side), "hint--".concat(className, "__text")),
|
|
52
|
-
|
|
53
|
-
|
|
91
|
+
onMouseEnter: () => {
|
|
92
|
+
isContentHoveredOuter = true;
|
|
93
|
+
},
|
|
94
|
+
onMouseLeave: handle.onMouseLeaveHoverableContent
|
|
95
|
+
}, isLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
|
|
96
|
+
size: "small"
|
|
97
|
+
}), hint, children);
|
|
54
98
|
};
|
|
55
99
|
const setHintContainerStyles = () => {
|
|
56
100
|
var _ref3, _ref4, _ref5;
|
|
@@ -116,24 +160,6 @@ const Hint = _ref => {
|
|
|
116
160
|
if (!hc) return null;
|
|
117
161
|
return /*#__PURE__*/(0, _reactDom.createPortal)(getHintMarkUp(className), hc);
|
|
118
162
|
};
|
|
119
|
-
const handle = {
|
|
120
|
-
onMouseEnter: () => {
|
|
121
|
-
if (handleOpenType === "hover") {
|
|
122
|
-
timeoutRef.current = setTimeout(() => {
|
|
123
|
-
setIsOpen(true);
|
|
124
|
-
!isOpen && onClickCallback();
|
|
125
|
-
}, 350);
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
onMouseLeave: () => {
|
|
129
|
-
if (!isHoverableContent && handleOpenType === "hover") {
|
|
130
|
-
clearTimeout(timeoutRef.current);
|
|
131
|
-
timeoutRef.current = setTimeout(() => {
|
|
132
|
-
setIsOpen(false);
|
|
133
|
-
}, 1000);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
163
|
(0, _react.useEffect)(() => {
|
|
138
164
|
(0, _utils2.initHintContainer)(hintId, hintContainer);
|
|
139
165
|
return () => {
|
|
@@ -154,6 +180,7 @@ const Hint = _ref => {
|
|
|
154
180
|
};
|
|
155
181
|
}, [isOpen]);
|
|
156
182
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
183
|
+
"data-testid": testId,
|
|
157
184
|
className: (0, _classnames.default)("hint", className),
|
|
158
185
|
ref: hintRef
|
|
159
186
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -69,7 +69,7 @@ const Modal = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
69
69
|
isScrollLock = true,
|
|
70
70
|
leftContentOfFooter,
|
|
71
71
|
customFooter,
|
|
72
|
-
testId,
|
|
72
|
+
testId = "modal",
|
|
73
73
|
noHeaderCloseBtn,
|
|
74
74
|
withMobileLogic,
|
|
75
75
|
withFixedFooter
|
|
@@ -113,7 +113,7 @@ const Modal = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
113
113
|
"data-testid": testId,
|
|
114
114
|
className: "modal-box j5"
|
|
115
115
|
}, renderModal( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
-
"data-testid": "
|
|
116
|
+
"data-testid": "".concat(testId, "-overlay"),
|
|
117
117
|
className: isOpen ? "modal-overlay" : "hidden",
|
|
118
118
|
onClick: closeModal
|
|
119
119
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -18,7 +18,6 @@ const Modal = _ref => {
|
|
|
18
18
|
className,
|
|
19
19
|
size,
|
|
20
20
|
testId,
|
|
21
|
-
isScrollLock = true,
|
|
22
21
|
closeOnEsc = true
|
|
23
22
|
} = _ref;
|
|
24
23
|
if (!isOpen) return null;
|
|
@@ -32,7 +31,6 @@ const Modal = _ref => {
|
|
|
32
31
|
"data-testid": testId,
|
|
33
32
|
className: "modal-box j5"
|
|
34
33
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
-
"data-testid": "modal-closeOverlay",
|
|
36
34
|
className: "modal-overlay",
|
|
37
35
|
onClick: closeModal
|
|
38
36
|
}), /*#__PURE__*/_react.default.createElement("div", {
|