intelicoreact 1.1.1 → 1.1.2
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 +5 -3
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +5 -3
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +8 -4
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +4 -2
- package/dist/Functions/utils.js +13 -2
- package/package.json +1 -1
|
@@ -11,12 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var _utils = require("../../../../../JS/Functions/utils");
|
|
15
|
-
|
|
16
14
|
var _Button = _interopRequireDefault(require("../../UI/Button/Button"));
|
|
17
15
|
|
|
18
16
|
require("./ActionAlert.scss");
|
|
19
17
|
|
|
18
|
+
var _utils = require("../../../Functions/utils");
|
|
19
|
+
|
|
20
20
|
var ActionAlert = function ActionAlert(_ref) {
|
|
21
21
|
var onClick = _ref.onClick,
|
|
22
22
|
message = _ref.message,
|
|
@@ -31,7 +31,9 @@ var ActionAlert = function ActionAlert(_ref) {
|
|
|
31
31
|
testId = _ref.testId;
|
|
32
32
|
// const transformedTime = moment(date).format('MM.DD.YYYY HH:mm');
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
"data-testid": "actionAlert".concat((0, _utils.getCorrectTestId)(
|
|
34
|
+
"data-testid": "actionAlert".concat((0, _utils.getCorrectTestId)({
|
|
35
|
+
testId: testId
|
|
36
|
+
})),
|
|
35
37
|
className: (0, _classnames.default)("action-alert action-alert--".concat(variant), className)
|
|
36
38
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
39
|
className: "action-alert__message-box"
|
|
@@ -15,10 +15,10 @@ var _TextSwitcher = _interopRequireDefault(require("../TextSwitcher/TextSwitcher
|
|
|
15
15
|
|
|
16
16
|
var _Status = _interopRequireDefault(require("../../UI/Status/Status"));
|
|
17
17
|
|
|
18
|
-
var _utils = require("../../../../../JS/Functions/utils");
|
|
19
|
-
|
|
20
18
|
require("./AdvancedStatus.scss");
|
|
21
19
|
|
|
20
|
+
var _utils = require("../../../Functions/utils");
|
|
21
|
+
|
|
22
22
|
var AdvancedStatus = function AdvancedStatus(_ref) {
|
|
23
23
|
var onChange = _ref.onChange,
|
|
24
24
|
inactiveText = _ref.inactiveText,
|
|
@@ -31,7 +31,9 @@ var AdvancedStatus = function AdvancedStatus(_ref) {
|
|
|
31
31
|
testId = _ref.testId;
|
|
32
32
|
var isUndefined = value === undefined || value === null;
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
"data-testid": "advanced-status".concat((0, _utils.getCorrectTestId)(
|
|
34
|
+
"data-testid": "advanced-status".concat((0, _utils.getCorrectTestId)({
|
|
35
|
+
testId: testId
|
|
36
|
+
})),
|
|
35
37
|
className: (0, _classnames.default)('advanced-status', {
|
|
36
38
|
'advanced-status_undefined': isUndefined,
|
|
37
39
|
'advanced-status_disabled': disabled
|
|
@@ -15,10 +15,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
|
|
18
|
-
var _utils = require("../../../../../JS/Functions/utils");
|
|
19
|
-
|
|
20
18
|
require("./CheckboxInput.scss");
|
|
21
19
|
|
|
20
|
+
var _utils = require("../../../Functions/utils");
|
|
21
|
+
|
|
22
22
|
var CheckboxInput = function CheckboxInput(_ref) {
|
|
23
23
|
var _cn2;
|
|
24
24
|
|
|
@@ -33,7 +33,9 @@ var CheckboxInput = function CheckboxInput(_ref) {
|
|
|
33
33
|
_ref$testId = _ref.testId,
|
|
34
34
|
testId = _ref$testId === void 0 ? '' : _ref$testId;
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
36
|
-
"data-testid": "checkbox--label-".concat((0, _utils.getCorrectTestId)(
|
|
36
|
+
"data-testid": "checkbox--label-".concat((0, _utils.getCorrectTestId)({
|
|
37
|
+
testId: testId || id || fieldKey
|
|
38
|
+
})),
|
|
37
39
|
className: (0, _classnames.default)('checkbox-input', className, (0, _defineProperty2.default)({}, "checkbox-input_disabled", disabled)),
|
|
38
40
|
htmlFor: id
|
|
39
41
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -51,7 +53,9 @@ var CheckboxInput = function CheckboxInput(_ref) {
|
|
|
51
53
|
ref: function ref(elem) {
|
|
52
54
|
if (elem) elem.indeterminate = isStark;
|
|
53
55
|
},
|
|
54
|
-
"data-testid": "checkbox--input--".concat(
|
|
56
|
+
"data-testid": "checkbox--input--".concat((0, _utils.getCorrectTestId)({
|
|
57
|
+
testId: testId || id || fieldKey
|
|
58
|
+
}))
|
|
55
59
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
56
60
|
className: "checkbox-input__mark"
|
|
57
61
|
})), label && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -31,7 +31,7 @@ var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
|
|
|
31
31
|
|
|
32
32
|
require("./NumericInput.scss");
|
|
33
33
|
|
|
34
|
-
var _utils = require("
|
|
34
|
+
var _utils = require("../../../Functions/utils");
|
|
35
35
|
|
|
36
36
|
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); }
|
|
37
37
|
|
|
@@ -314,7 +314,9 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
314
314
|
} : {});
|
|
315
315
|
|
|
316
316
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({}, uniProps, {
|
|
317
|
-
"data-testid": "input-".concat((0, _utils.getCorrectTestId)(
|
|
317
|
+
"data-testid": "input-".concat((0, _utils.getCorrectTestId)({
|
|
318
|
+
testId: testId || name || fieldKey || id
|
|
319
|
+
})),
|
|
318
320
|
value: (value === null || value === void 0 ? void 0 : value.length) > 0 ? (0, _fieldValueFormatters.formatToAddBitDepthPoints)((0, _fieldValueFormatters.formatToRemoveComa)(value)) : value,
|
|
319
321
|
ref: inputRef,
|
|
320
322
|
type: "text",
|
package/dist/Functions/utils.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
10
|
exports.transformUTCTimeToLocal = transformUTCTimeToLocal;
|
|
11
11
|
exports.transformUTCHoursToLocal = transformUTCHoursToLocal;
|
|
12
12
|
exports.downloadEmulation = downloadEmulation;
|
|
13
|
-
exports.disableDefaultBehavior = exports.getOS = exports.renderFileSize = exports.getBase64 = exports.compareAlphabetical = exports.setCarretToEnd = exports.compare = exports.downloadFile = exports.checkedRef = exports.capitalized = 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;
|
|
13
|
+
exports.getCorrectTestId = exports.disableDefaultBehavior = exports.getOS = exports.renderFileSize = exports.getBase64 = exports.compareAlphabetical = exports.setCarretToEnd = exports.compare = exports.downloadFile = exports.checkedRef = exports.capitalized = 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;
|
|
14
14
|
|
|
15
15
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
16
16
|
|
|
@@ -516,4 +516,15 @@ String.prototype.lastIndexEqualsTo = function (index) {
|
|
|
516
516
|
// return compareItem(item);
|
|
517
517
|
// }, true);
|
|
518
518
|
// return isDependenciesSatisfied ? dependendFunction : () => {};
|
|
519
|
-
// };
|
|
519
|
+
// };
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
var getCorrectTestId = function getCorrectTestId(_ref4) {
|
|
523
|
+
var _ref4$testId = _ref4.testId,
|
|
524
|
+
testId = _ref4$testId === void 0 ? '' : _ref4$testId,
|
|
525
|
+
_ref4$withTier = _ref4.withTier,
|
|
526
|
+
withTier = _ref4$withTier === void 0 ? true : _ref4$withTier;
|
|
527
|
+
return testId && testId !== undefined ? "".concat(withTier ? '-' : '').concat(testId) : '';
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
exports.getCorrectTestId = getCorrectTestId;
|