@progress/kendo-react-inputs
Version:
React Inputs offer a customizable interface for users to enter and pick different information. KendoReact Input package
43 lines (42 loc) • 1.11 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
const r = {
"#": /[\d\s\+\-]/,
"&": /[\S]/,
0: /[\d]/,
9: /[\d\s]/,
"?": /[a-zA-Z\s]/,
A: /[a-zA-Z0-9]/,
C: /./,
L: /[a-zA-Z]/,
a: /[a-zA-Z0-9\s]/
}, n = () => !1, f = (a, t) => a.includeLiterals !== t.includeLiterals || a.mask !== t.mask || a.prompt !== t.prompt || a.promptPlaceholder !== t.promptPlaceholder || !o(a.rules, t.rules), o = (a, t) => {
if (!!a != !!t)
return !1;
if (a === t || !a || !t)
return !0;
let e = !0;
for (const s in a)
if (a[s] !== t[s]) {
e = !1;
break;
}
if (e) {
for (const s in t)
if (!a.hasOwnProperty(s)) {
e = !1;
break;
}
}
return e;
};
export {
r as defaultRules,
f as maskingChanged,
n as returnFalse
};