intelicoreact 0.1.78 → 0.1.81
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.
|
@@ -106,6 +106,8 @@ function InputMask() {
|
|
|
106
106
|
hintPosition = _ref$hintPosition === void 0 ? 'right' : _ref$hintPosition,
|
|
107
107
|
_ref$hideMaskOnBlur = _ref.hideMaskOnBlur,
|
|
108
108
|
hideMaskOnBlur = _ref$hideMaskOnBlur === void 0 ? true : _ref$hideMaskOnBlur,
|
|
109
|
+
_ref$returnMaskedValu = _ref.returnMaskedValue,
|
|
110
|
+
returnMaskedValue = _ref$returnMaskedValu === void 0 ? false : _ref$returnMaskedValu,
|
|
109
111
|
name = _ref.name;
|
|
110
112
|
|
|
111
113
|
var errors = _objectSpread(_objectSpread({}, _config.DEFAULT_ERRORS), customErrors);
|
|
@@ -1175,9 +1177,11 @@ function InputMask() {
|
|
|
1175
1177
|
if (!isMaskRendered) return false;
|
|
1176
1178
|
setError(false);
|
|
1177
1179
|
clearErrorMessage();
|
|
1178
|
-
|
|
1180
|
+
var values = [getClearInnerValueAsString(), getInnerValueAsString({
|
|
1179
1181
|
replaceSpace: true
|
|
1180
|
-
})
|
|
1182
|
+
})];
|
|
1183
|
+
if (returnMaskedValue) values.reverse();
|
|
1184
|
+
onChangeProp.apply(void 0, values);
|
|
1181
1185
|
}, [innerValue, isMaskRendered]); // Blink Error
|
|
1182
1186
|
|
|
1183
1187
|
(0, _react.useEffect)(function () {
|
|
@@ -39,6 +39,7 @@ var Modal = function Modal(_ref) {
|
|
|
39
39
|
className = _ref.className,
|
|
40
40
|
title = _ref.title,
|
|
41
41
|
variant = _ref.variant,
|
|
42
|
+
onlyTitle = _ref.onlyTitle,
|
|
42
43
|
mode = _ref.mode,
|
|
43
44
|
size = _ref.size,
|
|
44
45
|
confirmBtnClassName = _ref.confirmBtnClassName,
|
|
@@ -46,6 +47,8 @@ var Modal = function Modal(_ref) {
|
|
|
46
47
|
_ref$confirmBtnVarian = _ref.confirmBtnVariant,
|
|
47
48
|
confirmBtnVariant = _ref$confirmBtnVarian === void 0 ? 'primary' : _ref$confirmBtnVarian,
|
|
48
49
|
confirmBtnDisable = _ref.confirmBtnDisable,
|
|
50
|
+
confirmBtnIcon = _ref.confirmBtnIcon,
|
|
51
|
+
isConfirmBtnIconPositionRight = _ref.isConfirmBtnIconPositionRight,
|
|
49
52
|
noConfirmBtn = _ref.noConfirmBtn,
|
|
50
53
|
noCloseBtn = _ref.noCloseBtn,
|
|
51
54
|
noFooter = _ref.noFooter,
|
|
@@ -54,13 +57,14 @@ var Modal = function Modal(_ref) {
|
|
|
54
57
|
closeBtnText = _ref.closeBtnText,
|
|
55
58
|
closeBtnVariant = _ref.closeBtnVariant,
|
|
56
59
|
closeBtnDisable = _ref.closeBtnDisable,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
btnClassNames = _ref.btnClassNames
|
|
60
|
+
closeBtnIcon = _ref.closeBtnIcon,
|
|
61
|
+
forced = _ref.forced,
|
|
62
|
+
btnClassNames = _ref.btnClassNames,
|
|
63
|
+
isCloseBtnIconPositionRight = _ref.isCloseBtnIconPositionRight;
|
|
60
64
|
if (!isOpen) return null;
|
|
61
65
|
|
|
62
66
|
var renderModalTitle = function renderModalTitle() {
|
|
63
|
-
if (mode && mode !== 'default') return "".concat(
|
|
67
|
+
if (mode && mode !== 'default' && !onlyTitle) return "".concat(mode[0].toUpperCase() + mode.slice(1), " ").concat(title);
|
|
64
68
|
return title;
|
|
65
69
|
};
|
|
66
70
|
|
|
@@ -92,7 +96,7 @@ var Modal = function Modal(_ref) {
|
|
|
92
96
|
className: (0, _classnames.default)('modal__header', (0, _defineProperty2.default)({}, "modal__header-".concat(variant), variant))
|
|
93
97
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
94
98
|
className: (0, _classnames.default)('modal__header-title', (0, _defineProperty2.default)({}, "modal__header-".concat(variant, "-title"), variant))
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, renderModalTitle())), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, renderModalTitle())), !forced && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
100
|
onClick: closeModal,
|
|
97
101
|
className: (0, _classnames.default)('modal-close-icon-box', {
|
|
98
102
|
'modal-close-icon-box-primary': variant === 'primary'
|
|
@@ -110,7 +114,9 @@ var Modal = function Modal(_ref) {
|
|
|
110
114
|
variant: closeBtnVariant || 'dark-outline',
|
|
111
115
|
onClick: closeModal,
|
|
112
116
|
label: closeBtnText || 'Cancel',
|
|
113
|
-
disabled: closeBtnDisable
|
|
117
|
+
disabled: closeBtnDisable,
|
|
118
|
+
icon: closeBtnIcon,
|
|
119
|
+
isIconRight: isCloseBtnIconPositionRight
|
|
114
120
|
}), !noConfirmBtn && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
115
121
|
onClick: function onClick() {
|
|
116
122
|
return handle.confirm();
|
|
@@ -118,7 +124,9 @@ var Modal = function Modal(_ref) {
|
|
|
118
124
|
label: confirmBtnLabel || (mode === null || mode === void 0 ? void 0 : mode[0].toUpperCase()) + (mode === null || mode === void 0 ? void 0 : mode.slice(1)) || 'Apply',
|
|
119
125
|
className: (0, _classnames.default)('ml5', confirmBtnClassName, btnClassNames),
|
|
120
126
|
variant: confirmBtnVariant,
|
|
121
|
-
disabled: confirmBtnDisable
|
|
127
|
+
disabled: confirmBtnDisable,
|
|
128
|
+
icon: confirmBtnIcon,
|
|
129
|
+
isIconRight: isConfirmBtnIconPositionRight
|
|
122
130
|
}))));
|
|
123
131
|
};
|
|
124
132
|
|
package/dist/Functions/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.changeMeta = exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.useOutsideToggle = exports.handleObjectChange = void 0;
|
|
8
|
+
exports.capitalized = exports.changeMeta = exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.useOutsideToggle = exports.handleObjectChange = void 0;
|
|
9
9
|
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
|
|
@@ -155,4 +155,10 @@ var changeMeta = function changeMeta(key) {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
-
exports.changeMeta = changeMeta;
|
|
158
|
+
exports.changeMeta = changeMeta;
|
|
159
|
+
|
|
160
|
+
var capitalized = function capitalized(str) {
|
|
161
|
+
return "".concat(str.substring(0, 1).toUpperCase()).concat(str.substring(1, str.length).toUpperCase());
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
exports.capitalized = capitalized;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intelicoreact",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.81",
|
|
4
|
+
"description": "hotfix/InputMaskOnChange | Add Possibility To Revert Clear Value and Masked Value in OnChange Callback",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist/*",
|