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
|
@@ -22,7 +22,6 @@ const ActionAlert = _ref => {
|
|
|
22
22
|
testId = "alert",
|
|
23
23
|
buttons
|
|
24
24
|
} = _ref;
|
|
25
|
-
// const transformedTime = moment(date).format('MM.DD.YYYY HH:mm');
|
|
26
25
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
26
|
"data-testid": testId,
|
|
28
27
|
className: (0, _classnames.default)("action-alert action-alert--".concat(variant), className)
|
|
@@ -23,7 +23,7 @@ function _default(props) {
|
|
|
23
23
|
params,
|
|
24
24
|
className,
|
|
25
25
|
isListTop,
|
|
26
|
-
testId
|
|
26
|
+
testId = "calendar"
|
|
27
27
|
} = props;
|
|
28
28
|
// const { minDate = '01/01/1900', maxDate = moment().format('MM/DD/YYYY') } = params;
|
|
29
29
|
const {
|
|
@@ -118,7 +118,7 @@ function _default(props) {
|
|
|
118
118
|
}
|
|
119
119
|
}, [isChangeYear]);
|
|
120
120
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
-
"data-testid":
|
|
121
|
+
"data-testid": testId,
|
|
122
122
|
className: (0, _classnames.default)("calendar", className, {
|
|
123
123
|
"calendar_list-top": isListTop
|
|
124
124
|
})
|
|
@@ -126,7 +126,7 @@ function _default(props) {
|
|
|
126
126
|
className: "calendar-header"
|
|
127
127
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
128
128
|
className: "calendar-header__prev",
|
|
129
|
-
"data-testid": "
|
|
129
|
+
"data-testid": "".concat(testId, "-prev-arrow")
|
|
130
130
|
}, isShovPrevArrow && /*#__PURE__*/_react.default.createElement("div", {
|
|
131
131
|
onClick: handlePrev
|
|
132
132
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronLeft, null))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -150,7 +150,7 @@ function _default(props) {
|
|
|
150
150
|
},
|
|
151
151
|
onChange: e => setInputYearValue(e.target.value)
|
|
152
152
|
}) : "".concat(showYear))), /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
-
"data-testid": "
|
|
153
|
+
"data-testid": "".concat(testId, "-next-arrow"),
|
|
154
154
|
className: "calendar-header__next"
|
|
155
155
|
}, isShovNextArrow && /*#__PURE__*/_react.default.createElement("div", {
|
|
156
156
|
onClick: handleNext
|
|
@@ -20,13 +20,11 @@ const CheckboxInput = _ref => {
|
|
|
20
20
|
disabled,
|
|
21
21
|
className,
|
|
22
22
|
isStark,
|
|
23
|
-
testId = "",
|
|
23
|
+
testId = "checkbox-input",
|
|
24
24
|
attributesOfNativeInput = {}
|
|
25
25
|
} = _ref;
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
27
|
-
"data-testid":
|
|
28
|
-
testId: testId || id || fieldKey
|
|
29
|
-
})),
|
|
27
|
+
"data-testid": testId,
|
|
30
28
|
className: (0, _classnames.default)("checkbox-input", className, {
|
|
31
29
|
["checkbox-input_disabled"]: disabled
|
|
32
30
|
}),
|
|
@@ -48,9 +46,7 @@ const CheckboxInput = _ref => {
|
|
|
48
46
|
ref: elem => {
|
|
49
47
|
if (elem) elem.indeterminate = isStark;
|
|
50
48
|
},
|
|
51
|
-
"data-testid": "
|
|
52
|
-
testId: testId || id || fieldKey
|
|
53
|
-
}))
|
|
49
|
+
"data-testid": "".concat(testId, "-input")
|
|
54
50
|
}, attributesOfNativeInput)), /*#__PURE__*/_react.default.createElement("span", {
|
|
55
51
|
className: "checkbox-input__mark"
|
|
56
52
|
})), label && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -37,7 +37,7 @@ const Dropdown = _ref => {
|
|
|
37
37
|
scrollReactionObj,
|
|
38
38
|
isListTop,
|
|
39
39
|
isNotValidateASCII = false,
|
|
40
|
-
testId,
|
|
40
|
+
testId = "dropdown",
|
|
41
41
|
sortAlphabetical = true,
|
|
42
42
|
fieldKey,
|
|
43
43
|
id,
|
|
@@ -196,10 +196,10 @@ const Dropdown = _ref => {
|
|
|
196
196
|
};
|
|
197
197
|
const depend = getDepends(modalBtnTrigger);
|
|
198
198
|
const getMarkupForElement = (item, index, optTestId) => {
|
|
199
|
-
var _item$value, _item$
|
|
199
|
+
var _item$value, _item$customMobileIco;
|
|
200
200
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
201
|
-
"data-testid": "
|
|
202
|
-
key: (_item$
|
|
201
|
+
"data-testid": "".concat(testId, "-").concat(optTestId, "-option"),
|
|
202
|
+
key: (_item$value = item.value) === null || _item$value === void 0 || (_item$value = _item$value.toString()) === null || _item$value === void 0 ? void 0 : _item$value.replace(/ /g, "_"),
|
|
203
203
|
onMouseDown: () => depend.onChange(item),
|
|
204
204
|
className: (0, _classnames.default)("".concat(RC, "__list-item"), {
|
|
205
205
|
["".concat(RC, "__list-item_active")]: item.value === value,
|
|
@@ -226,7 +226,7 @@ const Dropdown = _ref => {
|
|
|
226
226
|
className: (0, _classnames.default)("".concat(RC, "-group"), filteredOption.className)
|
|
227
227
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
228
228
|
className: "".concat(RC, "-group__name")
|
|
229
|
-
}, filteredOption.label), filteredOption.items.map((el, index) => getMarkupForElement(el, index, el === null || el === void 0 ? void 0 : el.testId))) : null;
|
|
229
|
+
}, filteredOption.label), filteredOption.items.map((el, index) => getMarkupForElement(el, index, (el === null || el === void 0 ? void 0 : el.testId) || index))) : null;
|
|
230
230
|
};
|
|
231
231
|
const selectedLabel = ((_options$find = options.find(el => el.value === value)) === null || _options$find === void 0 ? void 0 : _options$find.label) || options.reduce((acc, item) => {
|
|
232
232
|
var _item$items5;
|
|
@@ -541,7 +541,7 @@ const Dropdown = _ref => {
|
|
|
541
541
|
onKeyDown: onKeyDown,
|
|
542
542
|
onKeyUp: onKeyUp
|
|
543
543
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
544
|
-
"data-testid":
|
|
544
|
+
"data-testid": testId,
|
|
545
545
|
className: (0, _classnames.default)("".concat(RC, "__trigger"), "input__wrap", {
|
|
546
546
|
["".concat(RC, "__trigger--with-actions")]: withActions,
|
|
547
547
|
placeholder: !value,
|
|
@@ -30,18 +30,18 @@ const DropdownLiveSearch = _ref => {
|
|
|
30
30
|
placeholder,
|
|
31
31
|
className,
|
|
32
32
|
isSearchable,
|
|
33
|
-
testId,
|
|
34
33
|
doRequest,
|
|
35
34
|
isLoading,
|
|
36
35
|
options = [],
|
|
37
36
|
fieldKey,
|
|
38
37
|
id,
|
|
39
38
|
isListTop,
|
|
40
|
-
isNotValidateASCII = false,
|
|
41
|
-
noOptionsText = "No options available",
|
|
42
39
|
attributesOfNativeInput = {},
|
|
43
40
|
withMobileLogic,
|
|
44
|
-
tabIndex
|
|
41
|
+
tabIndex,
|
|
42
|
+
isNotValidateASCII = false,
|
|
43
|
+
noOptionsText = "No options available",
|
|
44
|
+
testId = "dropdown-live-search"
|
|
45
45
|
} = _ref;
|
|
46
46
|
const [dropdownId] = (0, _react.useState)(id || fieldKey || Math.random().toString(16).slice(2));
|
|
47
47
|
const [isOpen, setIsOpenState] = (0, _react.useState)(false);
|
|
@@ -160,12 +160,12 @@ const DropdownLiveSearch = _ref => {
|
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
const getMarkupForElement = (item, index, optTestId) => {
|
|
163
|
-
var _item$value, _item$
|
|
163
|
+
var _item$value, _item$customMobileIco;
|
|
164
164
|
const lowerLabel = item.label.toLowerCase();
|
|
165
165
|
const lowerSearchValue = searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase();
|
|
166
166
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
167
|
-
"data-testid": "
|
|
168
|
-
key: (_item$
|
|
167
|
+
"data-testid": "".concat(testId, "-").concat(optTestId || index, "-option"),
|
|
168
|
+
key: (_item$value = item.value) === null || _item$value === void 0 || (_item$value = _item$value.toString()) === null || _item$value === void 0 ? void 0 : _item$value.replace(/ /g, "_"),
|
|
169
169
|
onClick: () => {
|
|
170
170
|
onChange(item.value);
|
|
171
171
|
setIsOpen(false);
|
|
@@ -383,7 +383,7 @@ const DropdownLiveSearch = _ref => {
|
|
|
383
383
|
}),
|
|
384
384
|
ref: dropdownLiveSearchRef
|
|
385
385
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
386
|
-
"data-testid":
|
|
386
|
+
"data-testid": testId,
|
|
387
387
|
className: "".concat(RC, "__trigger input__wrap ").concat(isOpen ? "input__wrap--focus" : "", " ").concat(!value ? "placeholder" : "", " ").concat(error ? "error" : ""),
|
|
388
388
|
onClick: () => !isSearchable ? setIsOpen(!isOpen) : null,
|
|
389
389
|
onMouseDown: () => setIsFocusedByClick(true),
|
|
@@ -37,8 +37,9 @@ const getStructure = data => ({
|
|
|
37
37
|
...data
|
|
38
38
|
});
|
|
39
39
|
const accordionData = (accordionTitle, accordionListContent) => {
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
41
|
-
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
"data-testid": "accordion"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
42
43
|
className: "".concat(RC, "__accordion-title")
|
|
43
44
|
}, accordionTitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
45
|
className: "".concat(RC, "__list")
|
|
@@ -68,7 +69,7 @@ const checkOverflow = (files, maxFilesCount, additional) => {
|
|
|
68
69
|
error = "",
|
|
69
70
|
outerError = ""
|
|
70
71
|
} = additional || {};
|
|
71
|
-
return typeof maxFilesCount ===
|
|
72
|
+
return typeof maxFilesCount === "number" && files.length < maxFilesCount ? [...files, {
|
|
72
73
|
...(0, _utils.clone)(uploadTriggerStucture),
|
|
73
74
|
error,
|
|
74
75
|
outerError
|
|
@@ -78,7 +79,7 @@ const FileLoaderDescription = _ref => {
|
|
|
78
79
|
let {
|
|
79
80
|
//? Для корректности работы стоит пробрасывать какой-то из id
|
|
80
81
|
id,
|
|
81
|
-
testId,
|
|
82
|
+
testId = "file-loader-description",
|
|
82
83
|
fieldKey,
|
|
83
84
|
files: initFiles,
|
|
84
85
|
onChange,
|
|
@@ -93,10 +94,10 @@ const FileLoaderDescription = _ref => {
|
|
|
93
94
|
...props
|
|
94
95
|
} = _ref;
|
|
95
96
|
const uniqueFileLoaderDescriptionId = "".concat(id || testId || fieldKey || "component-".concat(_utils.uuid === null || _utils.uuid === void 0 ? void 0 : (0, _utils.uuid)()));
|
|
96
|
-
const
|
|
97
|
+
const safelyInitFiles = (0, _react.useMemo)(() => getSafelyInitFiles(initFiles, maxFilesCount), [initFiles, maxFilesCount]);
|
|
97
98
|
const [files, setFiles] = (0, _react.useState)((() => {
|
|
98
|
-
if (!
|
|
99
|
-
return checkOverflow(
|
|
99
|
+
if (!safelyInitFiles.length) return [(0, _utils.clone)(uploadTriggerStucture)];
|
|
100
|
+
return checkOverflow(safelyInitFiles, maxFilesCount);
|
|
100
101
|
})());
|
|
101
102
|
const generateUniqueFileName = (files, name) => {
|
|
102
103
|
let fileName = name;
|
|
@@ -164,19 +165,18 @@ const FileLoaderDescription = _ref => {
|
|
|
164
165
|
}, [outerError]);
|
|
165
166
|
|
|
166
167
|
//? Обеспечивает чтобы верхний стейт был доминирующим
|
|
167
|
-
//? Осознанно и намерянно в зависимости стоит initFiles, но расчеты идут от
|
|
168
|
+
//? Осознанно и намерянно в зависимости стоит initFiles, но расчеты идут от safelyInitFiles
|
|
168
169
|
(0, _react.useEffect)(() => {
|
|
169
170
|
//? Если изменились верхние филды и они отличаются от локальных (без триггера) - перезаписать
|
|
170
|
-
if (!(0, _utils.compare)(
|
|
171
|
-
setFiles(checkOverflow(
|
|
171
|
+
if (!(0, _utils.compare)(safelyInitFiles, (0, _utils.clone)(files).filter(item => item.id !== UPLOAD_TRIGGER_KEY))) {
|
|
172
|
+
setFiles(checkOverflow(safelyInitFiles, maxFilesCount, {
|
|
172
173
|
outerError
|
|
173
174
|
}));
|
|
174
175
|
}
|
|
175
176
|
}, [initFiles, maxFilesCount]);
|
|
176
177
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
177
178
|
id: uniqueFileLoaderDescriptionId,
|
|
178
|
-
|
|
179
|
-
"data-testid": "".concat(RC, "-").concat(uniqueFileLoaderDescriptionId),
|
|
179
|
+
"data-testid": RC,
|
|
180
180
|
className: (0, _classnames.default)(RC, className),
|
|
181
181
|
role: "combobox"
|
|
182
182
|
}, !!documentName && /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -28,7 +28,7 @@ const FileLoaderLocal = _ref => {
|
|
|
28
28
|
value,
|
|
29
29
|
isNoTrashIcon = false,
|
|
30
30
|
maxItemSizeBytes,
|
|
31
|
-
testId,
|
|
31
|
+
testId = "file-loader-local",
|
|
32
32
|
attributesOfNativeInput = {}
|
|
33
33
|
} = _ref;
|
|
34
34
|
const getFileName = value => {
|
|
@@ -103,7 +103,7 @@ const FileLoaderLocal = _ref => {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
-
"data-testid":
|
|
106
|
+
"data-testid": testId,
|
|
107
107
|
className: (0, _classnames.default)("file-loader-local", className, {
|
|
108
108
|
["file-loader-local_outer-error"]: Boolean(outerError)
|
|
109
109
|
})
|
|
@@ -14,8 +14,6 @@ var _FileLoaderLocal = _interopRequireDefault(require("../FileLoaderLocal/FileLo
|
|
|
14
14
|
require("./FileLoaderLocalGroup.scss");
|
|
15
15
|
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); }
|
|
16
16
|
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; }
|
|
17
|
-
/* eslint-disable no-console */
|
|
18
|
-
|
|
19
17
|
const DEFAULT_LABEL_PREFIX = "Please attach";
|
|
20
18
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
21
19
|
const FileLoaderLocalGroup = _ref => {
|
|
@@ -25,7 +23,7 @@ const FileLoaderLocalGroup = _ref => {
|
|
|
25
23
|
isSingleGroup,
|
|
26
24
|
onChange,
|
|
27
25
|
labelPrefix = DEFAULT_LABEL_PREFIX,
|
|
28
|
-
testId,
|
|
26
|
+
testId = "file-loader-local-group",
|
|
29
27
|
alertText
|
|
30
28
|
} = _ref;
|
|
31
29
|
const [groups, setGroups] = (0, _react.useState)((0, _utils.clone)(groupsArray));
|
|
@@ -134,6 +132,7 @@ const FileLoaderLocalGroup = _ref => {
|
|
|
134
132
|
return groups === null || groups === void 0 ? void 0 : groups.map(group => {
|
|
135
133
|
var _group$files5;
|
|
136
134
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
"data-testid": testId,
|
|
137
136
|
key: group.groupId,
|
|
138
137
|
className: (0, _classnames.default)("file-loader-local-groups", className)
|
|
139
138
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -148,7 +147,6 @@ const FileLoaderLocalGroup = _ref => {
|
|
|
148
147
|
icon: /*#__PURE__*/_react.default.createElement(_reactFeather.Info, null),
|
|
149
148
|
message: group === null || group === void 0 ? void 0 : group.alertText
|
|
150
149
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
-
"data-testid": "input--group-file-loader--key-".concat(testId || (group === null || group === void 0 ? void 0 : group.groupId)),
|
|
152
150
|
className: "file-loader-local-groups__item"
|
|
153
151
|
}, group === null || group === void 0 || (_group$files5 = group.files) === null || _group$files5 === void 0 ? void 0 : _group$files5.map((file, index) => {
|
|
154
152
|
var _group$files6, _group$files7;
|
|
@@ -157,7 +155,6 @@ const FileLoaderLocalGroup = _ref => {
|
|
|
157
155
|
fieldKey: file !== null && file !== void 0 && file.fieldKey ? "".concat(file.fieldKey, ":").concat(group === null || group === void 0 ? void 0 : group.groupId, ":").concat(Math.random().toString().slice(-4)) : file === null || file === void 0 ? void 0 : file.id,
|
|
158
156
|
key: (file === null || file === void 0 ? void 0 : file.id) || index,
|
|
159
157
|
id: (file === null || file === void 0 ? void 0 : file.id) || index,
|
|
160
|
-
testId: "".concat(group === null || group === void 0 ? void 0 : group.groupId, "-").concat(file === null || file === void 0 ? void 0 : file.id),
|
|
161
158
|
error: file === null || file === void 0 ? void 0 : file.error,
|
|
162
159
|
label: "Upload document",
|
|
163
160
|
accept: file === null || file === void 0 ? void 0 : file.accept,
|
|
@@ -19,7 +19,7 @@ const FormattedRawSSN = _ref => {
|
|
|
19
19
|
let {
|
|
20
20
|
value = "",
|
|
21
21
|
onChange: onChangeProp = () => {},
|
|
22
|
-
testId,
|
|
22
|
+
testId = "formatted-raw-ssn",
|
|
23
23
|
// ! ВСЕ "пляшет" от fullSnnMask и significantChars
|
|
24
24
|
// Маска для полного snn (технически ограничений нет, НО нужно передавать то, что понимает InputMask3)
|
|
25
25
|
fullSnnMask = DEFAULT_SSN_MASK,
|
|
@@ -86,6 +86,7 @@ const FormattedRawSSN = _ref => {
|
|
|
86
86
|
return countOfFirstDigitsToHide + infoAboutMaskOfHidden.countOfNotSignificantChars - 1;
|
|
87
87
|
})();
|
|
88
88
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
+
"data-testid": testId,
|
|
89
90
|
className: "formatted-raw-ssn",
|
|
90
91
|
ref: wrapperRef
|
|
91
92
|
}, /*#__PURE__*/_react.default.createElement(_InputMask.default, (0, _extends2.default)({}, args, {
|
|
@@ -111,8 +112,7 @@ const FormattedRawSSN = _ref => {
|
|
|
111
112
|
}
|
|
112
113
|
}, postfix), /*#__PURE__*/_react.default.createElement("span", {
|
|
113
114
|
className: "formatted-raw-ssn-eye-holder",
|
|
114
|
-
onClick: () => setIsHidden(!isHidden)
|
|
115
|
-
"data-testid": "formattedRawSNN--eye--key-".concat(testId, "--container")
|
|
115
|
+
onClick: () => setIsHidden(!isHidden)
|
|
116
116
|
}, " ", isHidden ? /*#__PURE__*/_react.default.createElement(_reactFeather.Eye, {
|
|
117
117
|
strokeWidth: 1,
|
|
118
118
|
className: "password-icon"
|
|
@@ -20,7 +20,7 @@ const FormattedRawSSN = _ref => {
|
|
|
20
20
|
postfix = "",
|
|
21
21
|
onChange: onChangeProp = () => {},
|
|
22
22
|
maskChar = "*",
|
|
23
|
-
testId,
|
|
23
|
+
testId = "formatted-raw-ssn",
|
|
24
24
|
isHiddenDefault = true,
|
|
25
25
|
maxLen = 9,
|
|
26
26
|
...args
|
|
@@ -82,12 +82,12 @@ const FormattedRawSSN = _ref => {
|
|
|
82
82
|
if (SSN) onChangeProp === null || onChangeProp === void 0 || onChangeProp(SSN.concat(SSN.length === maxLen ? postfix : "").replace(/-/g, ""));
|
|
83
83
|
}, [SSN]);
|
|
84
84
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
"data-testid": testId,
|
|
85
86
|
className: "formatted-raw-ssn",
|
|
86
87
|
ref: wrapperRef
|
|
87
88
|
}, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, args, {
|
|
88
89
|
value: getMaskedValue(getFormatedValue(SSN)),
|
|
89
|
-
onChange: onChange
|
|
90
|
-
testId: "formattedRawSNN--input--key-".concat(testId)
|
|
90
|
+
onChange: onChange
|
|
91
91
|
})), postfix && /*#__PURE__*/_react.default.createElement("span", {
|
|
92
92
|
className: "formatted-raw-ssn-postfix",
|
|
93
93
|
onClick: () => {
|
|
@@ -96,8 +96,7 @@ const FormattedRawSSN = _ref => {
|
|
|
96
96
|
}
|
|
97
97
|
}, postfix), /*#__PURE__*/_react.default.createElement("span", {
|
|
98
98
|
className: "formatted-raw-ssn-eye-holder",
|
|
99
|
-
onClick: switchView
|
|
100
|
-
"data-testid": "formattedRawSNN--eye--key-".concat(testId, "--container")
|
|
99
|
+
onClick: switchView
|
|
101
100
|
}, " ", isHidden ? /*#__PURE__*/_react.default.createElement(_reactFeather.Eye, {
|
|
102
101
|
strokeWidth: 1,
|
|
103
102
|
className: "password-icon"
|
|
@@ -330,6 +330,7 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
330
330
|
} : {})
|
|
331
331
|
};
|
|
332
332
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
333
|
+
"data-testid": testId,
|
|
333
334
|
className: (0, _classnames.default)("input__wrap", {
|
|
334
335
|
["input__wrap_focus"]: isFocused
|
|
335
336
|
}, {
|
|
@@ -340,8 +341,7 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
340
341
|
onMouseEnter: () => setOnInputHover(true),
|
|
341
342
|
onMouseLeave: () => setOnInputHover(false)
|
|
342
343
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
343
|
-
readOnly: isReadOnly
|
|
344
|
-
"data-testid": "input--key-".concat(testId, "--type-").concat(type)
|
|
344
|
+
readOnly: isReadOnly
|
|
345
345
|
}, uniProps, {
|
|
346
346
|
ref: inputRef,
|
|
347
347
|
type: getInputType(),
|
|
@@ -365,7 +365,6 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
365
365
|
if (uniProps.onBlur) uniProps.onBlur(...params);
|
|
366
366
|
}
|
|
367
367
|
})), DynamicIconComponent !== null && DynamicIconComponent !== void 0 ? DynamicIconComponent : icon, action, withDelete && onInputHover && /*#__PURE__*/_react.default.createElement("span", {
|
|
368
|
-
"data-testid": "icon-close",
|
|
369
368
|
className: (0, _classnames.default)("input__close", {
|
|
370
369
|
hidden: !(0, _fieldValueFormatters.getSafelyValue)(value)
|
|
371
370
|
}),
|
|
@@ -28,7 +28,7 @@ const InputCalendar = _ref => {
|
|
|
28
28
|
isListTop,
|
|
29
29
|
disabled,
|
|
30
30
|
disabledFormattedMaxDate = false,
|
|
31
|
-
testId,
|
|
31
|
+
testId = "input-calendar",
|
|
32
32
|
onKeyDown: onKeyDownProp = e => {},
|
|
33
33
|
onKeyUp: onKeyUpProp = e => {},
|
|
34
34
|
onBlur: onBlurProp = e => {}
|
|
@@ -87,7 +87,7 @@ const InputCalendar = _ref => {
|
|
|
87
87
|
onKeyUpProp(e);
|
|
88
88
|
};
|
|
89
89
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
-
"data-testid":
|
|
90
|
+
"data-testid": testId,
|
|
91
91
|
className: (0, _classnames.default)("input__wrap calendar-container", className, {
|
|
92
92
|
"calendar-container_disabled": disabled
|
|
93
93
|
}),
|
|
@@ -104,7 +104,6 @@ const InputCalendar = _ref => {
|
|
|
104
104
|
onBlur: onBlurProp,
|
|
105
105
|
ref: inputRef
|
|
106
106
|
}), isOpened ? /*#__PURE__*/_react.default.createElement(_Calendar.default, {
|
|
107
|
-
testId: testId,
|
|
108
107
|
date: getCalendarValue(value),
|
|
109
108
|
setDate: newDate => changeCalendarDay(newDate),
|
|
110
109
|
params: {
|
|
@@ -37,7 +37,7 @@ const InputDateRange = props => {
|
|
|
37
37
|
hideArrows = false,
|
|
38
38
|
isOptionsRight,
|
|
39
39
|
isUseAbs,
|
|
40
|
-
testId,
|
|
40
|
+
testId = "input-date-range",
|
|
41
41
|
minDate = null,
|
|
42
42
|
maxDate = null,
|
|
43
43
|
minMaxDateParseFormat = "MM/DD/YYYY",
|
|
@@ -168,6 +168,7 @@ const InputDateRange = props => {
|
|
|
168
168
|
};
|
|
169
169
|
}, []);
|
|
170
170
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
171
|
+
"data-testid": testId,
|
|
171
172
|
ref: internalContainerRef,
|
|
172
173
|
className: (0, _classnames.default)("date-range-input", className, {
|
|
173
174
|
"date-range-input_compact": isCompact,
|
|
@@ -191,7 +192,6 @@ const InputDateRange = props => {
|
|
|
191
192
|
className: (0, _classnames.default)("date-range-input__static-part")
|
|
192
193
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
193
194
|
id: id,
|
|
194
|
-
"data-testid": "inputDateRange--button-".concat(testId, "--toggleContainer"),
|
|
195
195
|
className: (0, _classnames.default)("date-range-input__toggle-button"),
|
|
196
196
|
disabled: disabled,
|
|
197
197
|
onClick: !disabled && !isHoverable ? toggle : undefined
|
|
@@ -16,7 +16,7 @@ const SelectItem = _ref => {
|
|
|
16
16
|
onItemClick,
|
|
17
17
|
onMouseEnter,
|
|
18
18
|
disabled,
|
|
19
|
-
testId
|
|
19
|
+
testId = "select-item"
|
|
20
20
|
} = _ref;
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
22
|
className: (0, _classnames.default)("opened-part__intervals-item", {
|
|
@@ -26,7 +26,7 @@ const SelectItem = _ref => {
|
|
|
26
26
|
onClick: onItemClick,
|
|
27
27
|
onMouseEnter: onMouseEnter,
|
|
28
28
|
"data-item": item,
|
|
29
|
-
"data-testid":
|
|
29
|
+
"data-testid": testId
|
|
30
30
|
}, isActive && /*#__PURE__*/_react.default.createElement(_CustomIcons.Check2, {
|
|
31
31
|
className: (0, _classnames.default)("opened-part__intervals-item-icon-active")
|
|
32
32
|
}), label);
|
|
@@ -75,7 +75,7 @@ function InputMask() {
|
|
|
75
75
|
hideMaskOnBlur = true,
|
|
76
76
|
returnMaskedValue = false,
|
|
77
77
|
name,
|
|
78
|
-
testId
|
|
78
|
+
testId = "input-mask"
|
|
79
79
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
80
80
|
const errors = {
|
|
81
81
|
..._config.DEFAULT_ERRORS,
|
|
@@ -1027,6 +1027,7 @@ function InputMask() {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
const render = () => {
|
|
1029
1029
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1030
|
+
"data-testid": testId,
|
|
1030
1031
|
className: (0, _classnames.default)("input-mask_wrapper", className, {
|
|
1031
1032
|
disabled
|
|
1032
1033
|
}, {
|
|
@@ -1040,7 +1041,6 @@ function InputMask() {
|
|
|
1040
1041
|
onBlur: onBlur
|
|
1041
1042
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1042
1043
|
className: "\n input-mask\n ".concat(isError ? "input-mask_error" : "", "\n ").concat(isFocused ? "input-mask_focus" : "", "\n ").concat(blinkError ? "input-mask_blink-error" : "", "\n "),
|
|
1043
|
-
"data-testid": testId,
|
|
1044
1044
|
onMouseDown: e => cancelDefaultAction(e, () => setIsMouseDown(true)),
|
|
1045
1045
|
onMouseMove: e => cancelDefaultAction(e, onMouseDownMove)
|
|
1046
1046
|
// onMouseUp={cancelDefaultAction}
|
|
@@ -65,7 +65,7 @@ function InputMask2() {
|
|
|
65
65
|
fieldKey,
|
|
66
66
|
id,
|
|
67
67
|
disabled,
|
|
68
|
-
testId,
|
|
68
|
+
testId = "input-mask",
|
|
69
69
|
attributesOfNativeInput = {}
|
|
70
70
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
71
71
|
const errors = {
|
|
@@ -554,7 +554,6 @@ function InputMask2() {
|
|
|
554
554
|
const renderInput = () => {
|
|
555
555
|
return /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
556
556
|
name: name || fieldKey || id || testId || "",
|
|
557
|
-
"data-testid": testId,
|
|
558
557
|
className: "input-mask_input ".concat(className),
|
|
559
558
|
ref: inputRef,
|
|
560
559
|
value: inputValue,
|
|
@@ -581,6 +580,7 @@ function InputMask2() {
|
|
|
581
580
|
};
|
|
582
581
|
const render = () => {
|
|
583
582
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
583
|
+
"data-testid": testId,
|
|
584
584
|
className: (0, _classnames.default)("input-mask2_wrapper", className, {
|
|
585
585
|
"input-mask_error": isError
|
|
586
586
|
}, {
|
|
@@ -80,7 +80,7 @@ function InputMask3() {
|
|
|
80
80
|
fieldKey,
|
|
81
81
|
id,
|
|
82
82
|
disabled,
|
|
83
|
-
testId,
|
|
83
|
+
testId = "input-mask",
|
|
84
84
|
attributesOfNativeInput = {}
|
|
85
85
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
86
86
|
const errors = {
|
|
@@ -626,7 +626,6 @@ function InputMask3() {
|
|
|
626
626
|
tabIndex: disabled || isLoading ? -1 : 0,
|
|
627
627
|
readOnly: disabled || isLoading,
|
|
628
628
|
name: name || fieldKey || id || testId || "",
|
|
629
|
-
"data-testid": testId,
|
|
630
629
|
className: "input-mask_input ".concat(className),
|
|
631
630
|
ref: inputRef,
|
|
632
631
|
value: inputValue,
|
|
@@ -654,8 +653,7 @@ function InputMask3() {
|
|
|
654
653
|
const renderHideToggler = () => {
|
|
655
654
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
656
655
|
className: "formatted-raw-ssn-eye-holder",
|
|
657
|
-
onClick: onHiddenToggle
|
|
658
|
-
"data-testid": "formattedRawSNN--eye--key-".concat(testId, "--container")
|
|
656
|
+
onClick: onHiddenToggle
|
|
659
657
|
}, " ", isValueHidden ? /*#__PURE__*/_react.default.createElement(_reactFeather.Eye, {
|
|
660
658
|
strokeWidth: 1,
|
|
661
659
|
className: "password-icon"
|
|
@@ -688,6 +686,7 @@ function InputMask3() {
|
|
|
688
686
|
};
|
|
689
687
|
const render = () => {
|
|
690
688
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
689
|
+
"data-testid": testId,
|
|
691
690
|
className: (0, _classnames.default)("input-mask3_wrapper", className, {
|
|
692
691
|
"input-mask_error": isError
|
|
693
692
|
}, {
|
|
@@ -26,7 +26,7 @@ const NumericInput = _ref => {
|
|
|
26
26
|
value,
|
|
27
27
|
placeholder,
|
|
28
28
|
className,
|
|
29
|
-
testId,
|
|
29
|
+
testId = "numeric-input",
|
|
30
30
|
name,
|
|
31
31
|
fieldKey,
|
|
32
32
|
id,
|
|
@@ -224,9 +224,7 @@ const NumericInput = _ref => {
|
|
|
224
224
|
} : {})
|
|
225
225
|
};
|
|
226
226
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({}, uniProps, {
|
|
227
|
-
"data-testid": "
|
|
228
|
-
testId: testId || name || fieldKey || id
|
|
229
|
-
})),
|
|
227
|
+
"data-testid": "".concat(testId, "-input"),
|
|
230
228
|
value: (value === null || value === void 0 ? void 0 : value.length) > 0 ? (0, _fieldValueFormatters.formatToAddBitDepthPoints)((0, _fieldValueFormatters.formatToRemoveComa)(value)) : value,
|
|
231
229
|
ref: inputRef,
|
|
232
230
|
type: "text",
|
|
@@ -237,7 +235,7 @@ const NumericInput = _ref => {
|
|
|
237
235
|
}, attributesOfNativeInput)), !isNotRenderButtons ? /*#__PURE__*/_react.default.createElement("div", {
|
|
238
236
|
className: "input__nums"
|
|
239
237
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
240
|
-
"data-testid": "
|
|
238
|
+
"data-testid": "".concat(testId, "-minus-btn"),
|
|
241
239
|
ref: decRef,
|
|
242
240
|
className: (0, _classnames.default)("input__num-btn", {
|
|
243
241
|
"events-none": Number(value) <= min
|
|
@@ -248,7 +246,7 @@ const NumericInput = _ref => {
|
|
|
248
246
|
disabled: Number(value) <= min
|
|
249
247
|
})
|
|
250
248
|
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
251
|
-
"data-testid": "
|
|
249
|
+
"data-testid": "-".concat(testId, "-plus-btn"),
|
|
252
250
|
ref: incRef,
|
|
253
251
|
className: (0, _classnames.default)("input__num-btn", {
|
|
254
252
|
"events-none": Number(value) >= max
|
|
@@ -261,6 +259,7 @@ const NumericInput = _ref => {
|
|
|
261
259
|
}))) : null);
|
|
262
260
|
}
|
|
263
261
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
262
|
+
"data-testid": testId,
|
|
264
263
|
ref: wrapRef,
|
|
265
264
|
className: (0, _classnames.default)("input__wrap", {
|
|
266
265
|
["input__wrap_focus"]: isFocused
|
|
@@ -19,11 +19,12 @@ const RadioInput = _ref => {
|
|
|
19
19
|
disabled,
|
|
20
20
|
className,
|
|
21
21
|
value,
|
|
22
|
-
testId = "",
|
|
22
|
+
testId = "radio-input",
|
|
23
23
|
onChange = () => {},
|
|
24
24
|
attributesOfNativeInput = {}
|
|
25
25
|
} = _ref;
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
27
|
+
"data-testid": testId,
|
|
27
28
|
className: (0, _classnames.default)(RC, className, {
|
|
28
29
|
["".concat(RC, "_disabled")]: disabled
|
|
29
30
|
}),
|
|
@@ -34,7 +35,7 @@ const RadioInput = _ref => {
|
|
|
34
35
|
})
|
|
35
36
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
36
37
|
id: id,
|
|
37
|
-
"data-testid": "
|
|
38
|
+
"data-testid": "".concat(testId, "-input"),
|
|
38
39
|
type: "radio",
|
|
39
40
|
checked: checked === value,
|
|
40
41
|
className: "".concat(RC, "__radio"),
|
|
@@ -32,7 +32,7 @@ const RangeCalendar = props => {
|
|
|
32
32
|
momentMinDate,
|
|
33
33
|
momentMaxDate,
|
|
34
34
|
isDontLimitFuture,
|
|
35
|
-
testId
|
|
35
|
+
testId = "range-calendar"
|
|
36
36
|
} = props;
|
|
37
37
|
const [days, setDays] = (0, _react.useState)({});
|
|
38
38
|
const title = (0, _react.useMemo)(() => "".concat((0, _momentTimezone.default)(date).format("MMM"), " ").concat((0, _momentTimezone.default)(date).format("YYYY")), [date]);
|
|
@@ -97,11 +97,10 @@ const RangeCalendar = props => {
|
|
|
97
97
|
const getFormatedWeekName = input => isShortWeekNames ? input.charAt(0) : input;
|
|
98
98
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
99
99
|
className: (0, _classnames.default)("range-calendar", className),
|
|
100
|
-
"data-testid":
|
|
100
|
+
"data-testid": testId
|
|
101
101
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
102
102
|
className: "range-calendar-header"
|
|
103
103
|
}, /*#__PURE__*/_react.default.createElement(_Arrow.default, {
|
|
104
|
-
testId: testId,
|
|
105
104
|
type: "left",
|
|
106
105
|
disabled: !allowPrev || minDate && (0, _momentTimezone.default)(date).startOf("month").isSameOrBefore(momentMinDate, "months"),
|
|
107
106
|
onClick: handlePrev,
|
|
@@ -109,7 +108,6 @@ const RangeCalendar = props => {
|
|
|
109
108
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
110
109
|
className: "range-calendar-header__title"
|
|
111
110
|
}, title), /*#__PURE__*/_react.default.createElement(_Arrow.default, {
|
|
112
|
-
testId: testId,
|
|
113
111
|
type: "right",
|
|
114
112
|
disabled: !allowNext || !isDontLimitFuture && (0, _momentTimezone.default)(date).startOf("month").isSameOrAfter(maxDate ? momentMaxDate : (0, _momentTimezone.default)().add(1, "day").startOf("day"), "months"),
|
|
115
113
|
onClick: handleNext,
|