intelicoreact 1.0.31 → 1.0.33
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/FileLoader/FileLoader.js +14 -11
- package/dist/Atomic/FormElements/FileLoader/FileLoader.scss +45 -24
- package/dist/Atomic/FormElements/FileLoader/partial/AnyOuterClass.scss +1 -1
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +3 -1
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +48 -7
- package/dist/Atomic/FormElements/InputColor/InputColor.js +11 -7
- package/dist/Atomic/FormElements/InputColor/InputColor.scss +7 -4
- package/dist/Atomic/FormElements/InputLink/InputLink.js +6 -18
- package/dist/Atomic/FormElements/InputLink/InputLink.scss +18 -13
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +2 -1
- package/dist/Atomic/Layout/Spinner/Spinner.scss +1 -0
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +4 -0
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -1
- package/dist/Functions/fieldValueFormatters.js +5 -3
- package/dist/Functions/operations.js +2 -1
- package/dist/Functions/usePasswordChecker.js +1 -1
- package/dist/Functions/utils.js +86 -2
- package/package.json +1 -1
|
@@ -34,24 +34,26 @@ var FileLoader = function FileLoader(props) {
|
|
|
34
34
|
|
|
35
35
|
var fieldKey = props.fieldKey,
|
|
36
36
|
value = props.value,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
disabled = props.disabled,
|
|
38
|
+
error = props.error,
|
|
39
39
|
className = props.className,
|
|
40
40
|
placeholder = props.placeholder,
|
|
41
|
+
onChange = props.onChange,
|
|
42
|
+
doLoad = props.doLoad,
|
|
43
|
+
filterFiles = props.filterFiles,
|
|
44
|
+
processErrors = props.processErrors,
|
|
45
|
+
isBlockNullValues = props.isBlockNullValues,
|
|
46
|
+
_props$isDisableError = props.isDisableErrorsClass,
|
|
47
|
+
isDisableErrorsClass = _props$isDisableError === void 0 ? true : _props$isDisableError,
|
|
41
48
|
uploadIcon = props.uploadIcon,
|
|
42
49
|
downloadIcon = props.downloadIcon,
|
|
43
50
|
deleteIcon = props.deleteIcon,
|
|
44
51
|
spiner = props.spiner,
|
|
45
52
|
isIconAfter = props.isIconAfter,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
processErrors = props.processErrors,
|
|
53
|
+
_props$isLinkTypeDown = props.isLinkTypeDownload,
|
|
54
|
+
isLinkTypeDownload = _props$isLinkTypeDown === void 0 ? false : _props$isLinkTypeDown,
|
|
49
55
|
_props$isUseLinkTitle = props.isUseLinkTitle,
|
|
50
|
-
isUseLinkTitle = _props$isUseLinkTitle === void 0 ? false : _props$isUseLinkTitle
|
|
51
|
-
disabled = props.disabled,
|
|
52
|
-
error = props.error,
|
|
53
|
-
_props$isDisableError = props.isDisableErrorsClass,
|
|
54
|
-
isDisableErrorsClass = _props$isDisableError === void 0 ? true : _props$isDisableError;
|
|
56
|
+
isUseLinkTitle = _props$isUseLinkTitle === void 0 ? false : _props$isUseLinkTitle;
|
|
55
57
|
|
|
56
58
|
var _useState = (0, _react.useState)(false),
|
|
57
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -74,7 +76,8 @@ var FileLoader = function FileLoader(props) {
|
|
|
74
76
|
icon: downloadIcon,
|
|
75
77
|
isIconAfter: isIconAfter,
|
|
76
78
|
deleteIcon: deleteIcon,
|
|
77
|
-
isUseLinkTitle: isUseLinkTitle
|
|
79
|
+
isUseLinkTitle: isUseLinkTitle,
|
|
80
|
+
isLinkTypeDownload: isLinkTypeDownload
|
|
78
81
|
}) : /*#__PURE__*/_react.default.createElement(_LoadZone.default, {
|
|
79
82
|
RC: RC,
|
|
80
83
|
fieldKey: fieldKey,
|
|
@@ -2,21 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
.file-loader {
|
|
4
4
|
position: relative;
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
flex-flow: row nowrap;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
|
|
5
11
|
box-sizing: border-box;
|
|
6
12
|
width: 100%;
|
|
7
13
|
height: 28px;
|
|
8
14
|
padding: 4px 6px 4px 5px;
|
|
15
|
+
|
|
9
16
|
border: 1px solid #E2E5EC;
|
|
10
17
|
border-radius: 3px;
|
|
11
18
|
background-color: #FFF;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-flow: row nowrap;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
align-items: center;
|
|
16
19
|
|
|
17
20
|
&_hover {
|
|
18
|
-
filter: drop-shadow(0 0 4px rgb(93 120 255 / 50%));
|
|
19
21
|
border-color: #6B81DD;
|
|
22
|
+
filter: drop-shadow(0 0 4px rgb(93 120 255 / 50%));
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
&_load-zone {
|
|
@@ -28,24 +31,29 @@
|
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
&__value-link {
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
width: fit-content;
|
|
33
|
-
height: 100%;
|
|
34
34
|
display: flex;
|
|
35
|
+
align-items: center;
|
|
35
36
|
flex-flow: row nowrap;
|
|
36
37
|
justify-content: space-between;
|
|
37
|
-
|
|
38
|
+
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
width: fit-content;
|
|
41
|
+
height: 100%;
|
|
42
|
+
|
|
38
43
|
text-decoration: none;
|
|
44
|
+
|
|
45
|
+
color: #166EAD;
|
|
39
46
|
outline: none;
|
|
40
|
-
|
|
41
|
-
font-weight: 400;
|
|
47
|
+
|
|
42
48
|
font-size: 13px;
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
font-style: normal;
|
|
43
51
|
line-height: 20px;
|
|
44
|
-
color: #166EAD;
|
|
45
52
|
|
|
46
53
|
svg {
|
|
47
54
|
width: 16px;
|
|
48
55
|
height: 16px;
|
|
56
|
+
|
|
49
57
|
color: #9AA0B9;
|
|
50
58
|
}
|
|
51
59
|
}
|
|
@@ -53,38 +61,43 @@
|
|
|
53
61
|
&__value-name {
|
|
54
62
|
margin-left: 4px;
|
|
55
63
|
}
|
|
56
|
-
|
|
64
|
+
|
|
57
65
|
&__value-link_icon-after {
|
|
58
66
|
.file-loader__value-name {
|
|
59
|
-
margin-left: 0;
|
|
60
67
|
margin-right: 4px;
|
|
68
|
+
margin-left: 0;
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
&__delete-value-button {
|
|
65
73
|
width: 16px;
|
|
66
74
|
height: 16px;
|
|
75
|
+
|
|
67
76
|
cursor: pointer;
|
|
68
77
|
|
|
69
78
|
svg {
|
|
70
|
-
height: 100%;
|
|
71
79
|
width: auto;
|
|
80
|
+
height: 100%;
|
|
81
|
+
|
|
72
82
|
color: #F06D8D;
|
|
73
83
|
}
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
&__icon-block {
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
width: 16px;
|
|
79
|
-
height: 16px;
|
|
80
87
|
position: absolute;
|
|
81
88
|
top: calc(50% - 8px);
|
|
82
89
|
left: 5px;
|
|
90
|
+
|
|
91
|
+
width: 16px;
|
|
92
|
+
height: 16px;
|
|
93
|
+
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
|
|
83
96
|
color: #9AA0B9;
|
|
84
97
|
|
|
85
98
|
svg {
|
|
86
|
-
height: 100%;
|
|
87
99
|
width: auto;
|
|
100
|
+
height: 100%;
|
|
88
101
|
}
|
|
89
102
|
}
|
|
90
103
|
|
|
@@ -93,13 +106,20 @@
|
|
|
93
106
|
width: 100%;
|
|
94
107
|
height: 100%;
|
|
95
108
|
padding: 4px 6px 4px 25px;
|
|
109
|
+
|
|
96
110
|
cursor: pointer;
|
|
97
111
|
|
|
98
|
-
|
|
99
|
-
|
|
112
|
+
color: #1E1E2D;
|
|
113
|
+
|
|
100
114
|
font-size: 13px;
|
|
115
|
+
font-weight: 300;
|
|
116
|
+
|
|
117
|
+
font-style: normal;
|
|
101
118
|
line-height: 20px;
|
|
102
|
-
|
|
119
|
+
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
text-overflow: ellipsis;
|
|
103
123
|
|
|
104
124
|
&_no-icon {
|
|
105
125
|
padding-left: 5px;
|
|
@@ -116,7 +136,7 @@
|
|
|
116
136
|
.lds-ring.lds-ring_little {
|
|
117
137
|
width: 20px;
|
|
118
138
|
height: 20px;
|
|
119
|
-
|
|
139
|
+
|
|
120
140
|
div {
|
|
121
141
|
border-width: 2px !important;
|
|
122
142
|
}
|
|
@@ -126,9 +146,10 @@
|
|
|
126
146
|
&_error {
|
|
127
147
|
border-color: #F06D8D;
|
|
128
148
|
}
|
|
129
|
-
|
|
149
|
+
|
|
130
150
|
&_disabled {
|
|
131
151
|
pointer-events: none;
|
|
152
|
+
|
|
132
153
|
opacity: 0.5;
|
|
133
154
|
}
|
|
134
155
|
}
|
|
@@ -9,14 +9,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
+
|
|
12
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
15
|
|
|
14
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
17
|
|
|
18
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
19
|
+
|
|
16
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
21
|
|
|
18
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
23
|
|
|
24
|
+
var _utils = require("../../../../Functions/utils");
|
|
25
|
+
|
|
20
26
|
require("../FileLoader.scss");
|
|
21
27
|
|
|
22
28
|
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); }
|
|
@@ -34,17 +40,52 @@ var LoadedContent = function LoadedContent(props) {
|
|
|
34
40
|
icon = props.icon,
|
|
35
41
|
isIconAfter = props.isIconAfter,
|
|
36
42
|
deleteIcon = props.deleteIcon,
|
|
37
|
-
isUseLinkTitle = props.isUseLinkTitle
|
|
43
|
+
isUseLinkTitle = props.isUseLinkTitle,
|
|
44
|
+
isLinkTypeDownload = props.isLinkTypeDownload;
|
|
45
|
+
var handle = {
|
|
46
|
+
download: function () {
|
|
47
|
+
var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
|
|
48
|
+
var target;
|
|
49
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
50
|
+
while (1) {
|
|
51
|
+
switch (_context.prev = _context.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
e.stopPropagation();
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
target = e.target.tagName === 'SPAN' || e.target.tagName === 'svg' ? e.target.parentNode : e.target;
|
|
56
|
+
(0, _utils.downloadFile)({
|
|
57
|
+
url: target.href,
|
|
58
|
+
name: value.name
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
case 4:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context.stop();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, _callee);
|
|
67
|
+
}));
|
|
68
|
+
|
|
69
|
+
function download(_x) {
|
|
70
|
+
return _download.apply(this, arguments);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return download;
|
|
74
|
+
}()
|
|
75
|
+
};
|
|
38
76
|
var additionalProps = (0, _react.useMemo)(function () {
|
|
39
|
-
return _objectSpread(_objectSpread({}, isUseLinkTitle ? {
|
|
40
|
-
title: value.path
|
|
41
|
-
} : {}),
|
|
42
|
-
|
|
77
|
+
return _objectSpread(_objectSpread(_objectSpread({}, isUseLinkTitle ? {
|
|
78
|
+
title: isLinkTypeDownload ? "Download ".concat(value.name) : value.path
|
|
79
|
+
} : {}), isLinkTypeDownload ? {
|
|
80
|
+
onClick: handle.download
|
|
81
|
+
} : {
|
|
82
|
+
target: '_blank'
|
|
83
|
+
}), {}, {
|
|
84
|
+
key: "LoadedContent-isNotUseLinkTitle-".concat(isUseLinkTitle, "-isLinkTypeDownload-").concat(isLinkTypeDownload)
|
|
43
85
|
});
|
|
44
|
-
}, [isUseLinkTitle]);
|
|
86
|
+
}, [isUseLinkTitle, isLinkTypeDownload]);
|
|
45
87
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({}, additionalProps, {
|
|
46
88
|
href: value.path,
|
|
47
|
-
target: "_blank",
|
|
48
89
|
rel: "noreferrer",
|
|
49
90
|
className: (0, _classnames.default)("".concat(RC, "__value-link"), (0, _defineProperty2.default)({}, "".concat(RC, "__value-link_icon-after"), isIconAfter))
|
|
50
91
|
}), !isIconAfter && icon, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -21,22 +21,25 @@ var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
|
21
21
|
|
|
22
22
|
require("./InputColor.scss");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["value", "className", "symbolsLimit", "onChange", "withHexFormat", "initialHexOfColorBlock", "testId"];
|
|
24
|
+
var _excluded = ["value", "className", "symbolsLimit", "onChange", "withHexFormat", "initialHexOfColorBlock", "testId", "withDelete"];
|
|
25
25
|
|
|
26
26
|
var InputColor = function InputColor(_ref) {
|
|
27
27
|
var value = _ref.value,
|
|
28
28
|
className = _ref.className,
|
|
29
|
-
symbolsLimit = _ref.symbolsLimit,
|
|
29
|
+
_ref$symbolsLimit = _ref.symbolsLimit,
|
|
30
|
+
symbolsLimit = _ref$symbolsLimit === void 0 ? 7 : _ref$symbolsLimit,
|
|
30
31
|
onChange = _ref.onChange,
|
|
31
32
|
_ref$withHexFormat = _ref.withHexFormat,
|
|
32
33
|
withHexFormat = _ref$withHexFormat === void 0 ? {
|
|
33
|
-
withSharp:
|
|
34
|
+
withSharp: false,
|
|
34
35
|
isTurnOn: true
|
|
35
36
|
} : _ref$withHexFormat,
|
|
36
37
|
_ref$initialHexOfColo = _ref.initialHexOfColorBlock,
|
|
37
|
-
initialHexOfColorBlock = _ref$initialHexOfColo === void 0 ? '
|
|
38
|
+
initialHexOfColorBlock = _ref$initialHexOfColo === void 0 ? '#9AA0B9' : _ref$initialHexOfColo,
|
|
38
39
|
_ref$testId = _ref.testId,
|
|
39
|
-
testId = _ref$testId === void 0 ? '
|
|
40
|
+
testId = _ref$testId === void 0 ? '' : _ref$testId,
|
|
41
|
+
_ref$withDelete = _ref.withDelete,
|
|
42
|
+
withDelete = _ref$withDelete === void 0 ? true : _ref$withDelete,
|
|
40
43
|
args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
44
|
// HANDLES
|
|
42
45
|
var handle = {
|
|
@@ -60,11 +63,12 @@ var InputColor = function InputColor(_ref) {
|
|
|
60
63
|
}
|
|
61
64
|
}), /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, args, {
|
|
62
65
|
value: value,
|
|
66
|
+
withDelete: withDelete,
|
|
63
67
|
onChange: handle.change,
|
|
64
68
|
symbolsLimit: symbolsLimit || 7,
|
|
69
|
+
testId: "inputColor--key-".concat(testId),
|
|
65
70
|
className: (0, _classnames.default)('input inputColor__input'),
|
|
66
|
-
type: "text"
|
|
67
|
-
testId: testId
|
|
71
|
+
type: "text"
|
|
68
72
|
})));
|
|
69
73
|
};
|
|
70
74
|
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
.inputColor {
|
|
2
2
|
position: relative;
|
|
3
|
+
|
|
3
4
|
&__color-block {
|
|
4
5
|
position: absolute;
|
|
5
|
-
|
|
6
|
+
z-index: 1;
|
|
6
7
|
top: 50%;
|
|
7
|
-
|
|
8
|
+
left: 5px;
|
|
9
|
+
|
|
8
10
|
min-width: 16px;
|
|
9
11
|
max-width: 16px;
|
|
10
12
|
min-height: 16px;
|
|
11
13
|
max-height: 16px;
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
transform: translateY(-50%);
|
|
13
16
|
}
|
|
17
|
+
|
|
14
18
|
.input {
|
|
15
19
|
padding-left: 25px;
|
|
16
20
|
}
|
|
17
|
-
|
|
18
21
|
}
|
|
@@ -36,13 +36,12 @@ var InputColor = function InputColor(_ref) {
|
|
|
36
36
|
value = _ref.value,
|
|
37
37
|
_ref$withHttpsPrefix = _ref.withHttpsPrefix,
|
|
38
38
|
withHttpsPrefix = _ref$withHttpsPrefix === void 0 ? {
|
|
39
|
-
isTurnOn:
|
|
40
|
-
isSecure:
|
|
41
|
-
isBorderErrorWithEmptyHost: false
|
|
39
|
+
isTurnOn: true,
|
|
40
|
+
isSecure: true
|
|
42
41
|
} : _ref$withHttpsPrefix,
|
|
43
42
|
onRedirect = _ref.onRedirect,
|
|
44
43
|
_ref$testId = _ref.testId,
|
|
45
|
-
testId = _ref$testId === void 0 ? '
|
|
44
|
+
testId = _ref$testId === void 0 ? '' : _ref$testId,
|
|
46
45
|
onChange = _ref.onChange,
|
|
47
46
|
withDelete = _ref.withDelete,
|
|
48
47
|
args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -54,17 +53,6 @@ var InputColor = function InputColor(_ref) {
|
|
|
54
53
|
var inputRef = (0, _react.useRef)(null);
|
|
55
54
|
var handle = {
|
|
56
55
|
redirect: function redirect() {
|
|
57
|
-
var _ref3 = withHttpsPrefix || {},
|
|
58
|
-
isBorderErrorWithEmptyHost = _ref3.isBorderErrorWithEmptyHost,
|
|
59
|
-
isSecure = _ref3.isSecure,
|
|
60
|
-
isPrefix = _ref3.isTurnOn;
|
|
61
|
-
|
|
62
|
-
if (isPrefix && isBorderErrorWithEmptyHost) {
|
|
63
|
-
if (isSecure && (value === null || value === void 0 ? void 0 : value.length) <= 8 || !isSecure && (value === null || value === void 0 ? void 0 : value.length) <= 7) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
56
|
window.open("http".concat(isSecure ? 's' : '', "://").concat(value.replace(/https?:\/\/?/g, '')), '_blank');
|
|
69
57
|
onRedirect === null || onRedirect === void 0 ? void 0 : onRedirect();
|
|
70
58
|
},
|
|
@@ -93,7 +81,7 @@ var InputColor = function InputColor(_ref) {
|
|
|
93
81
|
})
|
|
94
82
|
}, isPrefix && /*#__PURE__*/_react.default.createElement("div", {
|
|
95
83
|
className: (0, _classnames.default)('inputColor__prefix')
|
|
96
|
-
}, isSecure ? 'https://' : 'http://'), /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, args, {
|
|
84
|
+
}, isSecure && (value === null || value === void 0 ? void 0 : value.length) > 0 && 'https://', !isSecure && (value === null || value === void 0 ? void 0 : value.length) > 0 && 'http://'), /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, args, {
|
|
97
85
|
withDelete: withDelete,
|
|
98
86
|
value: value,
|
|
99
87
|
onChange: handle.change,
|
|
@@ -102,8 +90,8 @@ var InputColor = function InputColor(_ref) {
|
|
|
102
90
|
autoComplete: "url",
|
|
103
91
|
ref: inputRef,
|
|
104
92
|
className: (0, _classnames.default)({
|
|
105
|
-
'prefix-gutter--secured': isPrefix && isSecure,
|
|
106
|
-
'prefix-gutter--no-secured': isPrefix && !isSecure
|
|
93
|
+
'prefix-gutter--secured': isPrefix && isSecure && (value === null || value === void 0 ? void 0 : value.length) > 0,
|
|
94
|
+
'prefix-gutter--no-secured': isPrefix && !isSecure && (value === null || value === void 0 ? void 0 : value.length) > 0
|
|
107
95
|
})
|
|
108
96
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
109
97
|
onClick: function onClick() {
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
.inputLink {
|
|
2
2
|
position: relative;
|
|
3
|
+
|
|
3
4
|
&__icon {
|
|
4
|
-
width: fit-content;
|
|
5
|
-
height: fit-content;
|
|
6
5
|
position: absolute;
|
|
7
|
-
|
|
6
|
+
z-index: 1;
|
|
8
7
|
top: 50%;
|
|
8
|
+
right: 5px;
|
|
9
|
+
|
|
10
|
+
width: fit-content;
|
|
11
|
+
height: fit-content;
|
|
12
|
+
|
|
9
13
|
transform: translateY(-50%);
|
|
10
|
-
|
|
14
|
+
|
|
11
15
|
svg {
|
|
12
16
|
display: flex;
|
|
13
17
|
align-items: center;
|
|
14
18
|
justify-content: center;
|
|
19
|
+
|
|
15
20
|
min-width: 16px;
|
|
16
21
|
max-width: 16px;
|
|
17
22
|
min-height: 16px;
|
|
18
23
|
max-height: 16px;
|
|
19
24
|
|
|
20
|
-
stroke: #
|
|
25
|
+
stroke: #6B81DD;
|
|
21
26
|
}
|
|
22
27
|
}
|
|
28
|
+
|
|
23
29
|
.input {
|
|
24
30
|
padding-right: 25px;
|
|
25
31
|
}
|
|
@@ -28,7 +34,6 @@
|
|
|
28
34
|
right: 20px;
|
|
29
35
|
}
|
|
30
36
|
|
|
31
|
-
|
|
32
37
|
.prefix-gutter--secured {
|
|
33
38
|
padding-left: 52px;
|
|
34
39
|
}
|
|
@@ -36,18 +41,18 @@
|
|
|
36
41
|
.prefix-gutter--no-secured {
|
|
37
42
|
padding-left: 45px;
|
|
38
43
|
}
|
|
39
|
-
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
.inputColor__prefix {
|
|
43
|
-
font-size: 13px;
|
|
44
|
-
font-weight: 400;
|
|
45
47
|
position: absolute;
|
|
48
|
+
z-index: 1;
|
|
46
49
|
top: 50%;
|
|
47
|
-
transform: translateY(-50%);
|
|
48
50
|
left: 11px;
|
|
49
|
-
|
|
51
|
+
|
|
50
52
|
cursor: default;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
pointer-events: none;
|
|
53
55
|
|
|
56
|
+
font-size: 13px;
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
}
|
|
@@ -133,7 +133,8 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
133
133
|
change: function change(e) {
|
|
134
134
|
var inputValue = e.target ? (0, _fieldValueFormatters.filterNumeric)(e.target.value, {
|
|
135
135
|
type: 'int'
|
|
136
|
-
}) : e; // ToDo - не совсем понятно что проверяется, т.к. при нажатии инкремента/декримента
|
|
136
|
+
}) : e; // ToDo - не совсем понятно что проверяется, т.к. при нажатии инкремента/декримента
|
|
137
|
+
//ToDo все равно в change приходит число, а не эвент
|
|
137
138
|
// ToDo - боюсь сломать, временно оставляю, выпилить через какое-то время
|
|
138
139
|
// if (inputValue && (decRef.current?.contains?.(e.target) || incRef.current?.contains?.(e.target))) {
|
|
139
140
|
// if (symbolsLimit) inputValue = inputValue.toString().substring(0, +symbolsLimit);
|
|
@@ -45,6 +45,10 @@ var AdvancedTags = function AdvancedTags(_ref) {
|
|
|
45
45
|
var onShowMoreClick = function onShowMoreClick() {
|
|
46
46
|
setShowedItems(showMore ? items : [items[0], items[1]]);
|
|
47
47
|
setShowMore(!showMore);
|
|
48
|
+
return function () {
|
|
49
|
+
setShowedItems([items[0], items[1]]);
|
|
50
|
+
setShowMore(true);
|
|
51
|
+
};
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -37,7 +37,7 @@ var ButtonsBar = function ButtonsBar(_ref) {
|
|
|
37
37
|
_ref$testIdSecondBtn = _ref.testIdSecondBtn,
|
|
38
38
|
testIdSecondBtn = _ref$testIdSecondBtn === void 0 ? 'test-btn-bar-second' : _ref$testIdSecondBtn;
|
|
39
39
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
-
className: (0, _classnames.default)(
|
|
40
|
+
className: (0, _classnames.default)('button-bar', className)
|
|
41
41
|
}, rejectLink ? /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
42
42
|
className: "text-decoration-none",
|
|
43
43
|
to: rejectLink
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.formatToReplaceAllWhiteSpace = formatToReplaceAllWhiteSpace;
|
|
7
7
|
exports.filterNumeric = exports.filterFloat = exports.formatToHex = exports.formatToLimitLength = exports.formatNumberValueToMask = exports.formatToCutOffDotAtTheEnd = exports.formatToOnlyASCIICodeText = exports.formatToLetters = exports.formatToPriceWithUSD = exports.formatToTwoDigitAfterDot = exports.formatToDollarSign = exports.formatToAddBitDepthPoints = exports.formatToRemoveComa = exports.formatOnlyNumbers = exports.intlNumbersFormatter = exports.getSafelyValue = void 0;
|
|
8
8
|
|
|
9
|
-
// The first word "format" in the function name means a
|
|
10
|
-
//
|
|
9
|
+
// The first word "format" in the function name means a
|
|
10
|
+
//logic in which the function transforms the incoming value in any case.
|
|
11
|
+
// The first word "filter" in the function name means a
|
|
12
|
+
// logic in which the function works as a changer for sequential input
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* If the value is not undefined or null, return the value's toString() method, otherwise return an
|
|
@@ -87,8 +89,8 @@ var intlNumbersFormatter = function intlNumbersFormatter(inputValue) {
|
|
|
87
89
|
//валюта
|
|
88
90
|
currencyDisplay: currencyDisplay,
|
|
89
91
|
//валюта в виде символа
|
|
90
|
-
minimumFractionDigits: isRenderAlways ? quantity : 0,
|
|
91
92
|
//минимально не надо отображать центы, если их нет, иначе всегда будет .00
|
|
93
|
+
minimumFractionDigits: isRenderAlways ? quantity : 0,
|
|
92
94
|
maximumFractionDigits: quantity //максимально отображать 2 цифры после запятой, если центы всё же есть
|
|
93
95
|
|
|
94
96
|
};
|
|
@@ -10,7 +10,8 @@ exports.addRangeDefault = void 0;
|
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
|
|
12
12
|
// Взято из https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Math/round
|
|
13
|
-
// При импорте любой ф-и из этого файла отработает самовызывающаяся ф-я и расширит
|
|
13
|
+
// При импорте любой ф-и из этого файла отработает самовызывающаяся ф-я и расширит
|
|
14
|
+
// объект Math 3-мя ф-ми: round10, floor10, ceil10
|
|
14
15
|
(function () {
|
|
15
16
|
/**
|
|
16
17
|
* Корректировка округления десятичных дробей.
|
|
@@ -135,7 +135,7 @@ function usePasswordChecker() {
|
|
|
135
135
|
})
|
|
136
136
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
137
137
|
className: "password-checker__body-item__icon"
|
|
138
|
-
}, " ", icon, " "),
|
|
138
|
+
}, " ", icon, " "), ' ', /*#__PURE__*/_react.default.createElement("div", {
|
|
139
139
|
className: "password-checker__body-item__text"
|
|
140
140
|
}, " ", text, " "), ' ');
|
|
141
141
|
}), ' '), ' ');
|
package/dist/Functions/utils.js
CHANGED
|
@@ -7,7 +7,12 @@ var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.downloadEmulation = downloadEmulation;
|
|
11
|
+
exports.downloadFile = exports.checkedRef = exports.firstLetterCapital = exports.changeMeta = exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.omitKeys = exports.clone = exports.useOutsideToggle = exports.handleObjectChange = void 0;
|
|
12
|
+
|
|
13
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
14
|
+
|
|
15
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
16
|
|
|
12
17
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
18
|
|
|
@@ -205,4 +210,83 @@ var checkedRef = function checkedRef(ref) {
|
|
|
205
210
|
} : ref : null;
|
|
206
211
|
};
|
|
207
212
|
|
|
208
|
-
exports.checkedRef = checkedRef;
|
|
213
|
+
exports.checkedRef = checkedRef;
|
|
214
|
+
|
|
215
|
+
function downloadEmulation(data, filename) {
|
|
216
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'image/*';
|
|
217
|
+
var file = new Blob([data], {
|
|
218
|
+
type: type
|
|
219
|
+
});
|
|
220
|
+
if (window.navigator.msSaveOrOpenBlob) // IE10+
|
|
221
|
+
window.navigator.msSaveOrOpenBlob(file, filename);else {
|
|
222
|
+
// Others
|
|
223
|
+
var a = document.createElement('a'),
|
|
224
|
+
url = URL.createObjectURL(file);
|
|
225
|
+
a.href = url;
|
|
226
|
+
a.download = filename;
|
|
227
|
+
document.body.appendChild(a);
|
|
228
|
+
a.click();
|
|
229
|
+
setTimeout(function () {
|
|
230
|
+
document.body.removeChild(a);
|
|
231
|
+
window.URL.revokeObjectURL(url);
|
|
232
|
+
}, 0);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
var downloadFile = /*#__PURE__*/function () {
|
|
237
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref) {
|
|
238
|
+
var url, name, type, response;
|
|
239
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
240
|
+
while (1) {
|
|
241
|
+
switch (_context2.prev = _context2.next) {
|
|
242
|
+
case 0:
|
|
243
|
+
url = _ref.url, name = _ref.name, type = _ref.type;
|
|
244
|
+
_context2.next = 3;
|
|
245
|
+
return fetch(url).then( /*#__PURE__*/function () {
|
|
246
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(res) {
|
|
247
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
248
|
+
while (1) {
|
|
249
|
+
switch (_context.prev = _context.next) {
|
|
250
|
+
case 0:
|
|
251
|
+
_context.next = 2;
|
|
252
|
+
return res.blob();
|
|
253
|
+
|
|
254
|
+
case 2:
|
|
255
|
+
_context.t0 = _context.sent;
|
|
256
|
+
_context.t1 = type !== null && type !== void 0 ? type : res.headers.get('content-type');
|
|
257
|
+
return _context.abrupt("return", {
|
|
258
|
+
data: _context.t0,
|
|
259
|
+
type: _context.t1
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
case 5:
|
|
263
|
+
case "end":
|
|
264
|
+
return _context.stop();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}, _callee);
|
|
268
|
+
}));
|
|
269
|
+
|
|
270
|
+
return function (_x2) {
|
|
271
|
+
return _ref3.apply(this, arguments);
|
|
272
|
+
};
|
|
273
|
+
}());
|
|
274
|
+
|
|
275
|
+
case 3:
|
|
276
|
+
response = _context2.sent;
|
|
277
|
+
downloadEmulation(response.data, name, response.type);
|
|
278
|
+
|
|
279
|
+
case 5:
|
|
280
|
+
case "end":
|
|
281
|
+
return _context2.stop();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}, _callee2);
|
|
285
|
+
}));
|
|
286
|
+
|
|
287
|
+
return function downloadFile(_x) {
|
|
288
|
+
return _ref2.apply(this, arguments);
|
|
289
|
+
};
|
|
290
|
+
}();
|
|
291
|
+
|
|
292
|
+
exports.downloadFile = downloadFile;
|