@mmb-digital/ds-lilly 0.10.21 → 0.10.23
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/ds-lilly.js
CHANGED
|
@@ -106444,6 +106444,11 @@ var DatePicker = function (_a) {
|
|
|
106444
106444
|
// CONCATENATED MODULE: ./src/components/Form/DatePicker/index.ts
|
|
106445
106445
|
|
|
106446
106446
|
|
|
106447
|
+
// CONCATENATED MODULE: ./src/utils/isAsciiCompatible.ts
|
|
106448
|
+
var isAsciiCompatible = function (value) {
|
|
106449
|
+
return /^[\x0A\x0D\x1A\x20-\x7E\xFC\xE9\xE4\u016F\xC4\xC9\u0139\u013A\xF4\xF6\u013D\u013E\xD6\xDC\u0164\u0165\u010D\xE1\xED\xF3\xFA\u017D\u017E\u010C\xA7\xC1\u011A\u010E\u010F\u0147\xCD\u011B\u016E\xD3\xD4\u0148\u0160\u0161\u0154\xDA\u0155\xFD\xDD\u0158\u0159]*$/.test(value);
|
|
106450
|
+
};
|
|
106451
|
+
|
|
106447
106452
|
// CONCATENATED MODULE: ./src/components/Form/Input2/_elements_/ShowPasswordIcon.tsx
|
|
106448
106453
|
|
|
106449
106454
|
|
|
@@ -106478,6 +106483,7 @@ var Input2_assign = (undefined && undefined.__assign) || function () {
|
|
|
106478
106483
|
|
|
106479
106484
|
|
|
106480
106485
|
|
|
106486
|
+
|
|
106481
106487
|
var DISABLED_TOOLTIP_OFFSET = -6;
|
|
106482
106488
|
var Input2 = function (_a) {
|
|
106483
106489
|
var _b = _a.allowEventPropagation, allowEventPropagation = _b === void 0 ? false : _b, _c = _a.allowLeadingZeros, allowLeadingZeros = _c === void 0 ? true : _c, _d = _a.allowNegative, allowNegative = _d === void 0 ? false : _d, autocomplete = _a.autocomplete, autofocus = _a.autofocus, _e = _a.decimalLimit, decimalLimit = _e === void 0 ? 0 : _e, _f = _a.decimalSeparator, decimalSeparator = _f === void 0 ? ',' : _f, disabledTooltip = _a.disabledTooltip, error = _a.error, hasError = _a.hasError, hasWarning = _a.hasWarning, help = _a.help, inputMode = _a.inputMode, _g = _a.integerPlaces, integerPlaces = _g === void 0 ? 0 : _g, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, maxCharCounter = _a.maxCharCounter, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClick = _a.onClick, onFocus = _a.onFocus, onPaste = _a.onPaste, placeholder = _a.placeholder, prefix = _a.prefix, prefixIconName = _a.prefixIconName, _h = _a.showPassword, showPassword = _h === void 0 ? true : _h, showPasswordTooltip = _a.showPasswordTooltip, suffixIconName = _a.suffixIconName, testId = _a.testId, theme = _a.theme, _j = _a.thousandSeparator, thousandSeparator = _j === void 0 ? '' : _j, _k = _a.type, type = _k === void 0 ? 'text' : _k, unit = _a.unit, outerValue = _a.value, warning = _a.warning;
|
|
@@ -106570,7 +106576,7 @@ var Input2 = function (_a) {
|
|
|
106570
106576
|
});
|
|
106571
106577
|
}, [allowLeadingZeros, allowNegative, decimalLimit, decimalSeparator, integerPlaces, thousandSeparator]);
|
|
106572
106578
|
var handleValueSet = function (value) {
|
|
106573
|
-
if (Number.isNaN(value)) {
|
|
106579
|
+
if (Number.isNaN(value) || (value && !isAsciiCompatible(value))) {
|
|
106574
106580
|
return;
|
|
106575
106581
|
}
|
|
106576
106582
|
if (es_isNilOrEmptyString(value)) {
|
|
@@ -109704,6 +109710,7 @@ var Textarea2_assign = (undefined && undefined.__assign) || function () {
|
|
|
109704
109710
|
|
|
109705
109711
|
|
|
109706
109712
|
|
|
109713
|
+
|
|
109707
109714
|
var Textarea2 = function (_a) {
|
|
109708
109715
|
var _b = _a.allowEventPropagation, allowEventPropagation = _b === void 0 ? false : _b, autofocus = _a.autofocus, children = _a.children, disabledTooltip = _a.disabledTooltip, error = _a.error, hasError = _a.hasError, hasWarning = _a.hasWarning, height = _a.height, help = _a.help, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, maxCharCounter = _a.maxCharCounter, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClick = _a.onClick, onFocus = _a.onFocus, onPaste = _a.onPaste, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, outerValue = _a.value, warning = _a.warning;
|
|
109709
109716
|
var _c = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(outerValue), value = _c[0], setValue = _c[1];
|
|
@@ -109722,14 +109729,20 @@ var Textarea2 = function (_a) {
|
|
|
109722
109729
|
warning: warning
|
|
109723
109730
|
};
|
|
109724
109731
|
Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () { return setValue(outerValue); }, [outerValue]);
|
|
109732
|
+
var checkValue = function (prevValue, value) {
|
|
109733
|
+
if (value) {
|
|
109734
|
+
return isAsciiCompatible(value) ? value : prevValue;
|
|
109735
|
+
}
|
|
109736
|
+
return '';
|
|
109737
|
+
};
|
|
109725
109738
|
var handleOnChange = function (_a) {
|
|
109726
109739
|
var value = _a.target.value;
|
|
109727
|
-
setValue(value);
|
|
109740
|
+
setValue(function (prevValue) { return checkValue(prevValue, value); });
|
|
109728
109741
|
onChange && onChange(value);
|
|
109729
109742
|
};
|
|
109730
109743
|
var handleOnBlur = function (_a) {
|
|
109731
109744
|
var value = _a.target.value;
|
|
109732
|
-
setValue(value);
|
|
109745
|
+
setValue(function (prevValue) { return checkValue(prevValue, value); });
|
|
109733
109746
|
onBlur && onBlur(value);
|
|
109734
109747
|
};
|
|
109735
109748
|
var handleOnClick = function (event) {
|