intelicoreact 1.2.86 → 1.2.88
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/Dropdown/Dropdown.js +20 -16
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +8 -3
- package/dist/Atomic/FormElements/InputMask/InputMask.js +0 -1
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +102 -74
- package/dist/Atomic/UI/Button/Button.js +2 -2
- package/dist/Functions/presets/inputMaskPreset.js +176 -0
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ var RC = 'dropdown';
|
|
|
53
53
|
var MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
|
|
54
54
|
|
|
55
55
|
var Dropdown = function Dropdown(_ref) {
|
|
56
|
-
var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find;
|
|
56
|
+
var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find, _tabIndex$toString;
|
|
57
57
|
|
|
58
58
|
var label = _ref.label,
|
|
59
59
|
_ref$options = _ref.options,
|
|
@@ -83,7 +83,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
83
83
|
withMobileLogic = _ref.withMobileLogic,
|
|
84
84
|
_ref$minItemsForShowM = _ref.minItemsForShowMobileSearch,
|
|
85
85
|
minItemsForShowMobileSearch = _ref$minItemsForShowM === void 0 ? MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH : _ref$minItemsForShowM,
|
|
86
|
-
customTrigger = _ref.customTrigger
|
|
86
|
+
customTrigger = _ref.customTrigger,
|
|
87
|
+
tabIndex = _ref.tabIndex;
|
|
87
88
|
|
|
88
89
|
var _useIsMobile = (0, _useIsMobile2.default)(),
|
|
89
90
|
isMobileProp = _useIsMobile.isMobile;
|
|
@@ -144,10 +145,10 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
144
145
|
if (!options) return null;
|
|
145
146
|
var getTotalOptions = (0, _react.useCallback)(function () {
|
|
146
147
|
return options === null || options === void 0 ? void 0 : options.reduce(function (result, item) {
|
|
147
|
-
if (item !== null && item !== void 0 && item.list) {
|
|
148
|
-
var _item$list;
|
|
148
|
+
if (item !== null && item !== void 0 && item.list || item !== null && item !== void 0 && item.items) {
|
|
149
|
+
var _item$list, _item$items;
|
|
149
150
|
|
|
150
|
-
result += (item === null || item === void 0 ? void 0 : (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || 0;
|
|
151
|
+
result += (item === null || item === void 0 ? void 0 : (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || (item === null || item === void 0 ? void 0 : (_item$items = item.items) === null || _item$items === void 0 ? void 0 : _item$items.length) || 0;
|
|
151
152
|
} else {
|
|
152
153
|
++result;
|
|
153
154
|
}
|
|
@@ -177,24 +178,24 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
177
178
|
} else return option;
|
|
178
179
|
});
|
|
179
180
|
var filteredGroups = optionsWithOtherAtTheEnd.map(function (item) {
|
|
180
|
-
var _item$
|
|
181
|
+
var _item$items2;
|
|
181
182
|
|
|
182
183
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
183
|
-
items: !isSearchable || !isSearchChanged ? item === null || item === void 0 ? void 0 : item.items : (_item$
|
|
184
|
+
items: !isSearchable || !isSearchChanged ? item === null || item === void 0 ? void 0 : item.items : (_item$items2 = item.items) === null || _item$items2 === void 0 ? void 0 : _item$items2.slice().filter(function (el) {
|
|
184
185
|
var _el$label;
|
|
185
186
|
|
|
186
187
|
return (el === null || el === void 0 ? void 0 : (_el$label = el.label) === null || _el$label === void 0 ? void 0 : _el$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '')) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === '';
|
|
187
188
|
})
|
|
188
189
|
});
|
|
189
190
|
}).filter(function (item) {
|
|
190
|
-
var _item$
|
|
191
|
+
var _item$items3;
|
|
191
192
|
|
|
192
|
-
return ((_item$
|
|
193
|
+
return ((_item$items3 = item.items) === null || _item$items3 === void 0 ? void 0 : _item$items3.length) > 0;
|
|
193
194
|
});
|
|
194
195
|
var filteredItems = optionsWithOtherAtTheEnd.filter(function (item) {
|
|
195
|
-
var _item$
|
|
196
|
+
var _item$items4;
|
|
196
197
|
|
|
197
|
-
return !((_item$
|
|
198
|
+
return !((_item$items4 = item.items) !== null && _item$items4 !== void 0 && _item$items4.length);
|
|
198
199
|
}).filter(function (item) {
|
|
199
200
|
var _item$label;
|
|
200
201
|
|
|
@@ -322,11 +323,11 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
322
323
|
var selectedLabel = ((_options$find = options.find(function (el) {
|
|
323
324
|
return el.value === value;
|
|
324
325
|
})) === null || _options$find === void 0 ? void 0 : _options$find.label) || options.reduce(function (acc, item) {
|
|
325
|
-
var _item$
|
|
326
|
+
var _item$items5, _item$items5$find;
|
|
326
327
|
|
|
327
|
-
return acc || ((_item$
|
|
328
|
+
return acc || ((_item$items5 = item.items) === null || _item$items5 === void 0 ? void 0 : (_item$items5$find = _item$items5.find(function (el) {
|
|
328
329
|
return el.value === value;
|
|
329
|
-
})) === null || _item$
|
|
330
|
+
})) === null || _item$items5$find === void 0 ? void 0 : _item$items5$find.label);
|
|
330
331
|
}, null);
|
|
331
332
|
var doScrollCallback = (0, _react.useCallback)(function (e) {
|
|
332
333
|
var _ref2 = scrollReactionObj || {},
|
|
@@ -660,7 +661,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
660
661
|
className: "".concat(RC, "__trigger input__wrap ").concat(isOpen ? 'input__wrap--focus' : '', " ").concat(!value ? 'placeholder' : '', " ").concat(error ? 'error' : ''),
|
|
661
662
|
onClick: toggleList,
|
|
662
663
|
onKeyDown: onKeyDown,
|
|
663
|
-
onKeyUp: onKeyUp
|
|
664
|
+
onKeyUp: onKeyUp,
|
|
665
|
+
tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex)
|
|
664
666
|
}, customTrigger || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isSearchable && !isMobile ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
665
667
|
ref: searchInputRef,
|
|
666
668
|
className: "".concat(RC, "__input"),
|
|
@@ -681,7 +683,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
681
683
|
setIsOpen(true);
|
|
682
684
|
}
|
|
683
685
|
}
|
|
684
|
-
}, attributesOfNativeInput
|
|
686
|
+
}, attributesOfNativeInput, {
|
|
687
|
+
tabIndex: -1
|
|
688
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
685
689
|
className: "text"
|
|
686
690
|
}, selectedLabel || placeholder), postfixText && /*#__PURE__*/_react.default.createElement("span", {
|
|
687
691
|
className: "dropdown__list-item-postfix"
|
|
@@ -36,6 +36,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
36
36
|
var RC = 'dropdown-live-search';
|
|
37
37
|
|
|
38
38
|
var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
39
|
+
var _tabIndex$toString;
|
|
40
|
+
|
|
39
41
|
var value = _ref.value,
|
|
40
42
|
error = _ref.error,
|
|
41
43
|
disabled = _ref.disabled,
|
|
@@ -56,7 +58,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
56
58
|
_ref$noOptionsText = _ref.noOptionsText,
|
|
57
59
|
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
|
|
58
60
|
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
59
|
-
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati
|
|
61
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati,
|
|
62
|
+
tabIndex = _ref.tabIndex;
|
|
60
63
|
var dropdownId = fieldKey || id;
|
|
61
64
|
|
|
62
65
|
var _useState = (0, _react.useState)(false),
|
|
@@ -280,7 +283,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
280
283
|
},
|
|
281
284
|
onFocus: function onFocus() {
|
|
282
285
|
return !isFocusedByClick ? setIsOpen(true) : null;
|
|
283
|
-
}
|
|
286
|
+
},
|
|
287
|
+
tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex)
|
|
284
288
|
}, isSearchable ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
285
289
|
ref: searchInputRef,
|
|
286
290
|
className: "".concat(RC, "__input"),
|
|
@@ -288,7 +292,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
288
292
|
onChange: handle.onInputChange,
|
|
289
293
|
placeholder: placeholder,
|
|
290
294
|
onFocus: searchableInputFocus,
|
|
291
|
-
onClick: handle.onInputClick
|
|
295
|
+
onClick: handle.onInputClick,
|
|
296
|
+
tabIndex: -1
|
|
292
297
|
}, attributesOfNativeInput)) : /*#__PURE__*/_react.default.createElement("span", {
|
|
293
298
|
className: "text"
|
|
294
299
|
}, labelByValue || placeholder), /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -395,7 +395,6 @@ function InputMask() {
|
|
|
395
395
|
|
|
396
396
|
var charCenterX = charX + charWidth / 2; // If Char X-Coord Out Of Range
|
|
397
397
|
|
|
398
|
-
// If Char X-Coord Out Of Range
|
|
399
398
|
if (!charX || minX > charCenterX || maxX < charCenterX) return resObj;
|
|
400
399
|
if (resObj.index === null || minX <= charCenterX && charCenterX >= maxX && charCenterX < resObj.charX) return {
|
|
401
400
|
index: index,
|
|
@@ -1,91 +1,119 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require(
|
|
3
|
+
var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault');
|
|
4
4
|
|
|
5
|
-
Object.defineProperty(exports,
|
|
6
|
-
value: true
|
|
5
|
+
Object.defineProperty(exports, '__esModule', {
|
|
6
|
+
value: true,
|
|
7
7
|
});
|
|
8
8
|
exports.DefaultPhoneIcon = exports.DefaultEmalIcon = void 0;
|
|
9
9
|
|
|
10
|
-
var _react = _interopRequireDefault(require(
|
|
10
|
+
var _react = _interopRequireDefault(require('react'));
|
|
11
11
|
|
|
12
12
|
/* eslint-disable react/no-unknown-property */
|
|
13
13
|
var DefaultEmalIcon = function DefaultEmalIcon() {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
style: {
|
|
23
|
-
maskType: 'alpha'
|
|
14
|
+
return /*#__PURE__*/ _react.default.createElement(
|
|
15
|
+
'svg',
|
|
16
|
+
{
|
|
17
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
18
|
+
width: '16',
|
|
19
|
+
height: '16',
|
|
20
|
+
viewBox: '0 0 16 16',
|
|
21
|
+
fill: 'none',
|
|
24
22
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
23
|
+
/*#__PURE__*/ _react.default.createElement(
|
|
24
|
+
'mask',
|
|
25
|
+
{
|
|
26
|
+
id: 'mask0_18590_7794',
|
|
27
|
+
style: {
|
|
28
|
+
maskType: 'alpha',
|
|
29
|
+
},
|
|
30
|
+
maskUnits: 'userSpaceOnUse',
|
|
31
|
+
x: '0',
|
|
32
|
+
y: '0',
|
|
33
|
+
width: '16',
|
|
34
|
+
height: '16',
|
|
35
|
+
},
|
|
36
|
+
/*#__PURE__*/ _react.default.createElement('path', {
|
|
37
|
+
d: 'M2.66659 2.66675H13.3333C14.0666 2.66675 14.6666 3.26675 14.6666 4.00008V12.0001C14.6666 12.7334 14.0666 13.3334 13.3333 13.3334H2.66659C1.93325 13.3334 1.33325 12.7334 1.33325 12.0001V4.00008C1.33325 3.26675 1.93325 2.66675 2.66659 2.66675Z',
|
|
38
|
+
stroke: 'black',
|
|
39
|
+
strokeWidth: '1.07',
|
|
40
|
+
strokeLinecap: 'round',
|
|
41
|
+
strokeLinejoin: 'round',
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _react.default.createElement('path', {
|
|
44
|
+
d: 'M14.6666 4L7.99992 8.66667L1.33325 4',
|
|
45
|
+
stroke: 'black',
|
|
46
|
+
width: '1.07',
|
|
47
|
+
linecap: 'round',
|
|
48
|
+
linejoin: 'round',
|
|
49
|
+
}),
|
|
50
|
+
),
|
|
51
|
+
/*#__PURE__*/ _react.default.createElement(
|
|
52
|
+
'g',
|
|
53
|
+
{
|
|
54
|
+
mask: 'url(#mask0_18590_7794)',
|
|
55
|
+
},
|
|
56
|
+
/*#__PURE__*/ _react.default.createElement('rect', {
|
|
57
|
+
width: '16',
|
|
58
|
+
height: '16',
|
|
59
|
+
fill: '#1F7499',
|
|
60
|
+
}),
|
|
61
|
+
),
|
|
62
|
+
);
|
|
49
63
|
};
|
|
50
64
|
|
|
51
65
|
exports.DefaultEmalIcon = DefaultEmalIcon;
|
|
52
66
|
|
|
53
67
|
var DefaultPhoneIcon = function DefaultPhoneIcon() {
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
style: {
|
|
63
|
-
maskType: 'alpha'
|
|
68
|
+
return /*#__PURE__*/ _react.default.createElement(
|
|
69
|
+
'svg',
|
|
70
|
+
{
|
|
71
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
72
|
+
width: '16',
|
|
73
|
+
height: '16',
|
|
74
|
+
viewBox: '0 0 16 16',
|
|
75
|
+
fill: 'none',
|
|
64
76
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
/*#__PURE__*/ _react.default.createElement(
|
|
78
|
+
'mask',
|
|
79
|
+
{
|
|
80
|
+
id: 'mask0_18590_7803',
|
|
81
|
+
style: {
|
|
82
|
+
maskType: 'alpha',
|
|
83
|
+
},
|
|
84
|
+
maskUnits: 'userSpaceOnUse',
|
|
85
|
+
x: '0',
|
|
86
|
+
y: '0',
|
|
87
|
+
width: '16',
|
|
88
|
+
height: '16',
|
|
89
|
+
},
|
|
90
|
+
/*#__PURE__*/ _react.default.createElement('path', {
|
|
91
|
+
d: 'M11.3333 1.33325H4.66659C3.93021 1.33325 3.33325 1.93021 3.33325 2.66659V13.3333C3.33325 14.0696 3.93021 14.6666 4.66659 14.6666H11.3333C12.0696 14.6666 12.6666 14.0696 12.6666 13.3333V2.66659C12.6666 1.93021 12.0696 1.33325 11.3333 1.33325Z',
|
|
92
|
+
stroke: 'black',
|
|
93
|
+
strokeWidth: '1.07',
|
|
94
|
+
strokeLinecap: 'round',
|
|
95
|
+
strokeLinejoin: 'round',
|
|
96
|
+
}),
|
|
97
|
+
/*#__PURE__*/ _react.default.createElement('path', {
|
|
98
|
+
d: 'M8 12H8.0075',
|
|
99
|
+
stroke: 'black',
|
|
100
|
+
width: '1.07',
|
|
101
|
+
linecap: 'round',
|
|
102
|
+
linejoin: 'round',
|
|
103
|
+
}),
|
|
104
|
+
),
|
|
105
|
+
/*#__PURE__*/ _react.default.createElement(
|
|
106
|
+
'g',
|
|
107
|
+
{
|
|
108
|
+
mask: 'url(#mask0_18590_7803)',
|
|
109
|
+
},
|
|
110
|
+
/*#__PURE__*/ _react.default.createElement('rect', {
|
|
111
|
+
width: '16',
|
|
112
|
+
height: '16',
|
|
113
|
+
fill: '#1F7499',
|
|
114
|
+
}),
|
|
115
|
+
),
|
|
116
|
+
);
|
|
89
117
|
};
|
|
90
118
|
|
|
91
|
-
exports.DefaultPhoneIcon = DefaultPhoneIcon;
|
|
119
|
+
exports.DefaultPhoneIcon = DefaultPhoneIcon;
|
|
@@ -18,7 +18,7 @@ require("./Button.scss");
|
|
|
18
18
|
var RC = 'button';
|
|
19
19
|
|
|
20
20
|
var Button = function Button(_ref) {
|
|
21
|
-
var _cn;
|
|
21
|
+
var _tabIndex$toString, _cn;
|
|
22
22
|
|
|
23
23
|
var label = _ref.label,
|
|
24
24
|
onClick = _ref.onClick,
|
|
@@ -38,7 +38,7 @@ var Button = function Button(_ref) {
|
|
|
38
38
|
var noRenderIcon = noIcon || variant === 'ellipse-apply' || variant === 'ellipse-cancel';
|
|
39
39
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
40
40
|
"data-testid": "button".concat(testId && "--".concat(testId), "--").concat((label === null || label === void 0 ? void 0 : label.replace(/\s/g, '-')) || variant),
|
|
41
|
-
tabIndex: tabIndex,
|
|
41
|
+
tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex),
|
|
42
42
|
style: style,
|
|
43
43
|
className: (0, _classnames.default)(RC, (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "_").concat(variant), variant), (0, _defineProperty2.default)(_cn, 'button_icon-left', icon && !isIconRight), (0, _defineProperty2.default)(_cn, 'button_icon-right', icon && isIconRight), _cn), className),
|
|
44
44
|
onClick: onClick,
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.MASK_PRESET = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param type: 'inputMask',
|
|
10
|
+
* @param maskPattern: 'DD.DD.DDDD',
|
|
11
|
+
* @param maskPatternPlaceholder: 'MM.DD.YYYY',
|
|
12
|
+
* @param usePatternPlaceholder: true,
|
|
13
|
+
* @param isNumericMobileKeyboard: true,
|
|
14
|
+
* @param blinkErrors: true,
|
|
15
|
+
* @param showErrors: false,
|
|
16
|
+
* @param autocomplete: 'bday',
|
|
17
|
+
* @param focusSelector: 'input',
|
|
18
|
+
*/
|
|
19
|
+
var DATE_PRESET = {
|
|
20
|
+
type: 'inputMask',
|
|
21
|
+
maskPattern: 'DD.DD.DDDD',
|
|
22
|
+
maskPatternPlaceholder: 'MM.DD.YYYY',
|
|
23
|
+
usePatternPlaceholder: true,
|
|
24
|
+
isNumericMobileKeyboard: true,
|
|
25
|
+
blinkErrors: true,
|
|
26
|
+
showErrors: false,
|
|
27
|
+
autocomplete: 'bday',
|
|
28
|
+
focusSelector: 'input',
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @param type: 'inputMask',
|
|
32
|
+
* @param maskPattern: 'DDDDD',
|
|
33
|
+
* @param maskPlaceholder: 'X',
|
|
34
|
+
* @param isNumericMobileKeyboard: true,
|
|
35
|
+
* @param blinkErrors: true,
|
|
36
|
+
* @param showErrors: false,
|
|
37
|
+
* @param focusSelector: 'input',
|
|
38
|
+
* @param autocomplete: 'postal-code',
|
|
39
|
+
* @param rules: 'fieldZip'
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
var ZIP_PRESET = {
|
|
43
|
+
type: 'inputMask',
|
|
44
|
+
focusSelector: 'input',
|
|
45
|
+
maskPattern: 'DDDDD',
|
|
46
|
+
maskPlaceholder: 'X',
|
|
47
|
+
isNumericMobileKeyboard: true,
|
|
48
|
+
blinkErrors: true,
|
|
49
|
+
showErrors: false,
|
|
50
|
+
autocomplete: 'postal-code',
|
|
51
|
+
rules: 'fieldZip',
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* @param type: 'inputMask',
|
|
55
|
+
* @param maskPattern: 'DDDDDDDDD',
|
|
56
|
+
* @param maskPlaceholder: 'X',
|
|
57
|
+
* @param isNumericMobileKeyboard: true,
|
|
58
|
+
* @param blinkErrors: true,
|
|
59
|
+
* @param showErrors: false,
|
|
60
|
+
* @param focusSelector: 'input',
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
var SSN_PRESET = {
|
|
64
|
+
type: 'inputMask',
|
|
65
|
+
maskPattern: 'DDDDDDDDD',
|
|
66
|
+
maskPlaceholder: 'X',
|
|
67
|
+
focusSelector: 'input',
|
|
68
|
+
isNumericMobileKeyboard: true,
|
|
69
|
+
blinkErrors: true,
|
|
70
|
+
showErrors: false,
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @param type: 'inputMask',
|
|
74
|
+
* @param maskPattern: 'DDD-DDD-DDDD',
|
|
75
|
+
* @param maskPlaceholder: 'X',
|
|
76
|
+
* @param isNumericMobileKeyboard: true,
|
|
77
|
+
* @param blinkErrors: true,
|
|
78
|
+
* @param showErrors: false,
|
|
79
|
+
* @param focusSelector: 'input',
|
|
80
|
+
* @param autocomplete: 'tel-national',
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
var MOBILE_PHONE_PRESET = {
|
|
84
|
+
type: 'inputMask',
|
|
85
|
+
maskPattern: 'DDD-DDD-DDDD',
|
|
86
|
+
maskPlaceholder: 'X',
|
|
87
|
+
focusSelector: 'input',
|
|
88
|
+
isNumericMobileKeyboard: true,
|
|
89
|
+
blinkErrors: true,
|
|
90
|
+
showErrors: false,
|
|
91
|
+
autocomplete: 'tel-national',
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* @param type: 'inputMask3',
|
|
95
|
+
* @param maskPattern: 'DDDD',
|
|
96
|
+
* @param maskPlaceholder: 'X',
|
|
97
|
+
* @param isNumericMobileKeyboard: true,
|
|
98
|
+
* @param blinkErrors: true,
|
|
99
|
+
* @param showErrors: false,
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
var SHORT_SSN_PRESET = {
|
|
103
|
+
type: 'inputMask3',
|
|
104
|
+
maskPattern: 'DDDD',
|
|
105
|
+
maskPlaceholder: 'X',
|
|
106
|
+
focusSelector: 'input',
|
|
107
|
+
isNumericMobileKeyboard: true,
|
|
108
|
+
blinkErrors: true,
|
|
109
|
+
showErrors: false,
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* @param type: 'inputMask',
|
|
113
|
+
* @param maskPattern: 'DDDDDDDDD',
|
|
114
|
+
* @param maskPlaceholder: 'X',
|
|
115
|
+
* @param isNumericMobileKeyboard: true,
|
|
116
|
+
* @param blinkErrors: true,
|
|
117
|
+
* @param showErrors: false,
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
var ABA_PRESET = {
|
|
121
|
+
type: 'inputMask',
|
|
122
|
+
maskPattern: 'DDDDDDDDD',
|
|
123
|
+
maskPlaceholder: 'X',
|
|
124
|
+
isNumericMobileKeyboard: true,
|
|
125
|
+
blinkErrors: true,
|
|
126
|
+
showErrors: false,
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* @param type: 'inputMask',
|
|
130
|
+
* @param maskPattern: 'MM/YY',
|
|
131
|
+
* @param maskPatternPlaceholder: 'MM/YY',
|
|
132
|
+
* @param usePatternPlaceholder: true,
|
|
133
|
+
* @param isNumericMobileKeyboard: true,
|
|
134
|
+
* @param blinkErrors: true,
|
|
135
|
+
* @param showErrors: false,
|
|
136
|
+
* @param focusSelector: 'input',
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
var CC_EXPIRATION_DATE = {
|
|
140
|
+
type: 'inputMask',
|
|
141
|
+
maskPattern: 'MM/YY',
|
|
142
|
+
maskPatternPlaceholder: 'MM/YY',
|
|
143
|
+
usePatternPlaceholder: true,
|
|
144
|
+
isNumericMobileKeyboard: true,
|
|
145
|
+
blinkErrors: true,
|
|
146
|
+
showErrors: false,
|
|
147
|
+
focusSelector: 'input',
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* @param type: 'inputMask',
|
|
151
|
+
* @param maskPattern: 'DDDDDDDDDD',
|
|
152
|
+
* @param maskPlaceholder: 'X',
|
|
153
|
+
* @param isNumericMobileKeyboard: true,
|
|
154
|
+
* @param blinkErrors: true,
|
|
155
|
+
* @param showErrors: false,
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
var BANK_ACCOUNT = {
|
|
159
|
+
type: 'inputMask',
|
|
160
|
+
maskPattern: 'DDDDDDDDDD',
|
|
161
|
+
maskPlaceholder: 'X',
|
|
162
|
+
isNumericMobileKeyboard: true,
|
|
163
|
+
blinkErrors: true,
|
|
164
|
+
showErrors: false,
|
|
165
|
+
};
|
|
166
|
+
var MASK_PRESET = {
|
|
167
|
+
BANK_ACCOUNT: BANK_ACCOUNT,
|
|
168
|
+
CC_EXPIRATION_DATE: CC_EXPIRATION_DATE,
|
|
169
|
+
DATE_PRESET: DATE_PRESET,
|
|
170
|
+
ZIP_PRESET: ZIP_PRESET,
|
|
171
|
+
SSN_PRESET: SSN_PRESET,
|
|
172
|
+
MOBILE_PHONE_PRESET: MOBILE_PHONE_PRESET,
|
|
173
|
+
SHORT_SSN_PRESET: SHORT_SSN_PRESET,
|
|
174
|
+
ABA_PRESET: ABA_PRESET,
|
|
175
|
+
};
|
|
176
|
+
exports.MASK_PRESET = MASK_PRESET;
|