@progress/kendo-react-inputs 2.7.0-dev.201902260733 → 2.7.1

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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("react"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["prop-types","react","@progress/kendo-react-intl"],t):"object"==typeof exports?exports.KendoReactInputs=t(require("prop-types"),require("react"),require("@progress/kendo-react-intl")):e.KendoReactInputs=t(e.PropTypes,e.React,e.KendoReactIntl)}(window,function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var i,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!0!==e&&!!e}).map(function(e){return Array.isArray(e)?r.apply(void 0,e):"object"==typeof e?Object.keys(e).map(function(t,n){return e[n]||e[t]&&t||null}).filter(function(e){return null!==e}).join(" "):e}).filter(function(e){return!!e}).join(" ")},s=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},o={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},a=function(){},l=function(){return function(){}}(),u=n(1),p=n(0),c=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focused:!1},t.handleFocus=function(e){t.setState({focused:!0})},t.handleBlur=function(e){t.setState({focused:!1})},t}return c(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.id,i=e.className,s=e.value,o=e.placeholder,a=e.valid,l=e.style,p=r({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(s||o),"k-state-invalid":!a&&void 0!==a},i);return u.createElement("span",{className:p,onFocus:this.handleFocus,onBlur:this.handleBlur,style:l},this.props.children,t?n?u.createElement("label",{htmlFor:n,className:"k-label"},t):u.createElement("span",{className:"k-label"},t):null)},t.propTypes={label:p.string,id:p.string,value:p.string,placeholder:p.string,valid:p.bool},t}(u.Component);function h(e,t,n,i){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,i))}}var f=function(){return"undefined"==typeof window};n.d(t,"classNames",function(){return r}),n.d(t,"guid",function(){return s}),n.d(t,"Keys",function(){return o}),n.d(t,"noop",function(){return a}),n.d(t,"FloatingLabel",function(){return d}),n.d(t,"FormComponent",function(){return l}),n.d(t,"dispatchEvent",function(){return h}),n.d(t,"isServerRendering",function(){return f})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),r=n(14),s=function(e){return(e||"").split("")},o=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof r.Stream?this.parse(e):this.parse(new r.Stream(s(e),s(t)))},e.prototype.map=function(t){var n=this;return new e(function(e){return n.parse(e).map(t)})},e.prototype.chain=function(t){var n=this;return new e(function(e){return n.parse(e).chain(function(e,n){return t(e).run(n)})})},e.prototype.isLiteral=function(e){return this.run(e).type===i.ResultType.Literal},e}();t.Parser=o,t.mask=function(e){var t=e.prompt,n=e.promptPlaceholder;return function(e){return new o(function(r){for(;!r.eof();){var s=r.peek(),o=s.char,a=s.control;if(o===a&&a===t)return r.eat(),new i.Result(t,r,i.ResultType.Mask);if(e.test(o))return r.eat(),new i.Result(o,r,i.ResultType.Mask);if(o===n)return r.eat(),new i.Result(t,r,i.ResultType.Mask);r.eat_input()}return r.eat(),new i.Result(t,r,i.ResultType.Mask)})}},t.literal=function(e){return new o(function(t){return t.peek().char===e?(t.eat(),new i.Result(e,t,i.ResultType.Literal)):new i.Result(e,t,i.ResultType.Literal)})},t.unmask=function(e){return function(t){return new o(function(n){for(;!n.eof();){var r=n.peek(),s=r.char,o=r.control;if(s===e&&o===e)return n.eat(),new i.Result(s,n);if(t.test(s))return n.eat(),new i.Result(s,n);n.eat_input()}return n.eat(),new i.Result("",n)})}},t.unliteral=function(e){return new o(function(t){return t.eof()?new i.Result("",t):(t.peek().char===e&&t.eat(),new i.Result(e,t))})},t.token=function(e,t){return new o(function(n){var r=n.next().char,s=e[r];return"\\"===r?(r=n.next().char,new i.Result(t.literal(r),n)):s?new i.Result(t.mask(s),n):new i.Result(t.literal(r),n)})},t.rawMask=function(e){var t=e.prompt,n=e.promptPlaceholder;return new o(function(e){var r=e.next().char;return r===t?new i.Result(n,e):new i.Result(r,e)})},t.rawLiteral=function(e){return new o(function(t){var n=t.next().char;return e?new i.Result(n,t):new i.Result("",t)})}},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(i=t.ResultType||(t.ResultType={}));var r=function(){function e(e,t,n){void 0===n&&(n=i.Undefined),this.value=e,this.rest=t,this.type=n}return e.prototype.map=function(t){return new e(t(this.value),this.rest)},e.prototype.chain=function(e){return e(this.value,this.rest)},e.prototype.fold=function(e,t){return e(this.value,this.rest)},e.prototype.concat=function(e){return this.map(function(t,n){return e.chain(function(e,n){return t.concat([e])})})},e.prototype.toString=function(){return"Result({ value: '"+this.value+"', rest: "+this.rest+" })"},e}();t.Result=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.NumericTextBox=i.default;var r=n(9);t.Input=r.default;var s=n(10);t.Switch=s.default;var o=n(11);t.MaskedTextBox=o.default},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),o=n(0),a=n(7),l=n(2),u=n(8),p="Please enter a valid value!",c=function(e){function t(t){var n=e.call(this,t)||this;n.valueDuringOnChange=void 0,n.textBeforeInput="",n._inputId=l.guid(),n.setValidity=function(){n.element&&n.element.setCustomValidity&&n.element.setCustomValidity(n.validity.valid?"":n.props.validationMessage||p)},n.elementChange=n.elementChange.bind(n),n.increase=n.increase.bind(n),n.decrease=n.decrease.bind(n),n.wheel=n.wheel.bind(n),n.keyDown=n.keyDown.bind(n);var i={value:null,looselyFormattedText:null,selectionStart:0,selectionEnd:0,decimalSelect:!1};return void 0!==n.props.value?i.value=n.props.value:void 0!==n.props.defaultValue&&(i.value=n.props.defaultValue),n.state=i,n}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this.state.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.componentWillReceiveProps=function(e){void 0!==e.value&&this.state.value!==e.value&&this.setState({value:e.value})},t.prototype.componentDidMount=function(){this.element&&(this.textBeforeInput=this.element.value),this.setValidity()},t.prototype.componentDidUpdate=function(e,t){if((!document||document.activeElement===this.element)&&this.element&&null!==this.state.looselyFormattedText)if(this.element.value!==this.state.looselyFormattedText&&this.state.value===t.value)this.element.selectionStart=this.state.selectionStart,this.element.selectionEnd=this.state.selectionEnd;else{var n=void 0,i=this.state.looselyFormattedText.indexOf(this.symbols.decimal);n=i>=0&&i<this.state.selectionStart?this.state.selectionEnd:this.state.selectionEnd-(this.state.looselyFormattedText.length-this.element.value.length);var r=this.element.value.indexOf(this.symbols.decimal);(this.state.decimalSelect||null===this.state.value&&r>=0||-1===i&&r>=0)&&(n=this.state.selectionStart<r+2&&i>=0?r+1:r),this.state.decimalSelect||this.state.value!==t.value||(n=this.state.selectionEnd-(this.state.looselyFormattedText.length-this.element.value.length)),this.state.looselyFormattedText[0]===this.symbols.decimal&&t.looselyFormattedText===this.symbols.decimal&&(n=void 0!==this.state.value?this.formatNumber(this.state.value).length:0),this.element.selectionStart=this.element.selectionEnd=n}this.element&&(this.textBeforeInput=this.element.value),this.setValidity()},Object.defineProperty(t.prototype,"valueAsLocalString",{get:function(){return this.intl=a.provideIntlService(this),this.symbols=this.intl.numberSymbols(),null!==this.state.looselyFormattedText&&!this.state.decimalSelect&&this.parseNumber(this.state.looselyFormattedText)===this.state.value&&this.formatNumber(this.state.value).length<this.state.looselyFormattedText.length&&0===this.state.looselyFormattedText.indexOf(this.formatNumber(this.state.value))?this.state.looselyFormattedText:this.formatNumber(this.state.value)},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props.id||this._inputId,n=a.provideLocalizationService(this),i=!this.validityStyles||this.validity.valid,r=s.createElement("span",{dir:this.props.dir,style:this.props.label?void 0:{width:this.props.width},className:"k-widget k-numerictextbox"},s.createElement("span",{className:l.classNames("k-numeric-wrap",{"k-state-disabled":this.props.disabled,"k-state-invalid":!i}),ref:function(t){e.elementWrapper=t}},s.createElement("input",{tabIndex:this.props.tabIndex,disabled:this.props.disabled,title:this.props.title,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max,placeholder:this.props.placeholder,type:this.props.inputType||"tel",spellCheck:!1,autoComplete:"off",autoCorrect:"off",className:"k-input k-formatted-value",id:t,value:this.valueAsLocalString,"aria-valuenow":null!==this.state.value?this.state.value:void 0,name:this.props.name,onWheel:this.wheel,onKeyDown:this.keyDown,onChange:this.elementChange,ref:function(t){return e._element=t}}),this.props.children,this.props.spinners&&s.createElement("span",{className:"k-select",onMouseDown:function(t){document&&e._element&&(t.preventDefault(),document.activeElement!==e._element&&e._element.focus())}},s.createElement("span",{className:"k-link k-link-increase","aria-label":n.toLanguageString(u.increaseValue,u.messages[u.increaseValue]),title:n.toLanguageString(u.increaseValue,u.messages[u.increaseValue]),onClick:this.increase},s.createElement("span",{className:"k-icon k-i-arrow-n"})),s.createElement("span",{className:"k-link k-link-decrease","aria-label":n.toLanguageString(u.decreaseValue,u.messages[u.decreaseValue]),title:n.toLanguageString(u.decreaseValue,u.messages[u.decreaseValue]),onClick:this.decrease},s.createElement("span",{className:"k-icon k-i-arrow-s"})))));return this.props.label?s.createElement(l.FloatingLabel,{id:t,value:this.valueAsLocalString,valid:i,placeholder:this.props.placeholder,label:this.props.label,children:r,style:{width:this.props.width}}):r},t.prototype.formatNumber=function(e){return null==e?"":this.intl.formatNumber(e,this.props.format).toString()},t.prototype.parseNumber=function(e){return this.intl.parseNumber(e,this.props.format)},t.prototype.elementChange=function(e){if(this.element){var t=this.element,n={value:this.state.value,looselyFormattedText:t.value,selectionStart:this.element.selectionStart,selectionEnd:this.element.selectionEnd,decimalSelect:!1},i=t.value,r=this.symbols.minusSign;if(i===r)return n.value=null,void this.triggerChange(n,e);if(i.split(r).length!==this.textBeforeInput.split(r).length&&i.length===this.textBeforeInput.length+r.length)return n.value=-this.parseNumber(this.textBeforeInput),void this.triggerChange(n,e);var s=this.symbols.decimal;if(i.split(RegExp("\\"+s)).length>2)return n.decimalSelect=!0,void this.triggerChange(n,e);if(i.length>1&&-1===i.indexOf(s)&&this.textBeforeInput.indexOf(s)>=0&&i.length+s.length===this.textBeforeInput.length)return n.decimalSelect=!0,void this.triggerChange(n,e);var o=this.parseNumber(i);if(o===this.state.value&&i.length>0&&i[i.length-1]===s&&(this.formatNumber(1.1)||"").toString().indexOf(s)>-1)return n.looselyFormattedText=i,void this.triggerChange(n,e);var a=(null===o||isNaN(o))&&i.length>0&&i!==this.symbols.minusSign,l=this.elementWrapper;if(i.length>this.textBeforeInput.length&&this.parseNumber(i)===this.parseNumber(i.slice(0,t.selectionStart))&&(null===this.parseNumber(i.slice(t.selectionStart-1))||isNaN(this.parseNumber(i.slice(t.selectionStart-1))))&&(a=!0),a)return l&&-1===l.className.indexOf("k-state-invalid")&&(l.className+=" k-state-invalid",setTimeout(function(){l.className=l.className.replace(" k-state-invalid","")},50)),n.looselyFormattedText=this.textBeforeInput,n.selectionStart=n.selectionEnd=t.selectionEnd+this.textBeforeInput.length-t.value.length,void this.triggerChange(n,e);n.value=o,this.triggerChange(n,e)}},t.prototype.nonInputActions=function(e,t){var n={value:e,looselyFormattedText:null,selectionStart:0,selectionEnd:0,decimalSelect:!1};this.triggerChange(n,t)},t.prototype.triggerChange=function(e,t){if(!this.props.disabled){this.valueDuringOnChange=this.ranged(this.parseNumber(this.formatNumber(this.ranged(e.value))));var n=this.valueDuringOnChange!==this.state.value;void 0!==this.props.value?e.value=this.props.value:e.value=this.valueDuringOnChange,this.setState(e),n&&l.dispatchEvent(this.props.onChange,t,this,{value:this.valueDuringOnChange}),this.valueDuringOnChange=void 0}},t.prototype.ranged=function(e){return null==e?e:e>1||e<1||1===e?void 0!==this.props.max&&void 0!==this.props.min&&this.props.max<this.props.min?null:(void 0!==this.props.max&&e>this.props.max&&(e=this.props.max),void 0!==this.props.min&&e<this.props.min&&(e=this.props.min),e):null},t.prototype.increase=function(e){this.nonInputActions((this.state.value||0)+(this.props.step||0),e)},t.prototype.decrease=function(e){this.nonInputActions((this.state.value||0)-(this.props.step||0),e)},t.prototype.wheel=function(e){document&&document.activeElement===this.element&&this.element&&(e.nativeEvent.deltaY<0&&(e.preventDefault(),this.increase(e)),e.nativeEvent.deltaY>0&&(e.preventDefault(),this.decrease(e)))},t.prototype.keyDown=function(e){switch(e.keyCode){case 38:this.increase(e);break;case 40:this.decrease(e);break;case 110:var t=this.element;if(t){var n=t.value,i=t.selectionStart,r=t.selectionEnd;t.value=n.slice(0,i)+this.symbols.decimal+n.slice(r),t.selectionStart=t.selectionEnd=i+1,this.elementChange(e)}break;default:return}e.preventDefault()},t.propTypes={value:o.number,defaultValue:o.number,step:o.number,format:o.oneOfType([o.string,o.shape({style:o.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:o.string,currencyDisplay:o.oneOf(["symbol","code","name"]),useGrouping:o.bool,minimumIntegerDigits:o.number,minimumFractionDigits:o.number,maximumFractionDigits:o.number})]),width:o.oneOfType([o.string,o.number]),tabIndex:o.number,title:o.string,placeholder:o.string,min:o.number,max:o.number,spinners:o.bool,disabled:o.bool,dir:o.string,name:o.string,label:o.string,validationMessage:o.string,required:o.bool,id:o.string,onChange:o.func},t.defaultProps={spinners:!0,disabled:!1,onChange:function(e){},step:1,required:!1,validityStyles:!0},t}(s.Component);t.default=c,a.registerForIntl(c),a.registerForLocalization(c)},function(e,t){e.exports=n},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.increaseValue="numerictextbox.increment",t.decreaseValue="numerictextbox.decrement",t.messages=((i={})[t.increaseValue]="Increase value",i[t.decreaseValue]="Decrease value",i)},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=n(0),u=n(2),p=function(e){function t(n){var i=e.call(this,n)||this;return i._inputId=u.guid(),i.isInvalid=function(e){var t=!1;for(var n in e)e.hasOwnProperty(n)&&(t=t||e[n]);return t},i.setValidity=function(){i._input&&i._input.setCustomValidity&&(i.validity.valid||!i.validityStyles?i._input.classList.remove("k-state-invalid"):i._input.classList.add("k-state-invalid"),i._input.setCustomValidity(i.validity.valid?"":i.props.validationMessage||""))},i.handleChange=function(e){i.setState({value:e.target.value}),i.valueDuringOnChange=e.target.value,i.props.onChange&&i.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:e.target.value,target:i}),i.valueDuringOnChange=void 0},i.state={value:i.props.defaultValue||t.defaultProps.defaultValue},i}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e={badInput:!!this._input&&this._input.validity.badInput,patternMismatch:!!this._input&&this._input.validity.patternMismatch,rangeOverflow:!!this._input&&this._input.validity.rangeOverflow,rangeUnderflow:!!this._input&&this._input.validity.rangeUnderflow,stepMismatch:!!this._input&&this._input.validity.stepMismatch,tooLong:!!this._input&&this._input.validity.tooLong,typeMismatch:!!this._input&&this._input.validity.typeMismatch,valueMissing:!!this._input&&this._input.validity.valueMissing};return s({},e,{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!this._input||!this.isInvalid(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.label,r=t.id,l=(t.validationMessage,t.defaultValue,t.valid,t.validityStyles,t.style),p=o(t,["className","label","id","validationMessage","defaultValue","valid","validityStyles","style"]),c=r||this._inputId,d=!this.validityStyles||this.validity.valid,h=u.classNames(n,"k-textbox"),f=a.createElement("input",s({},p,{style:i?void 0:l,value:this.value,id:c,className:h,onChange:this.handleChange,ref:function(t){e._input=t}}));return i?a.createElement(u.FloatingLabel,{label:i,children:f,value:String(this.value),placeholder:p.placeholder,id:c,valid:d,style:l}):f},t.propTypes={label:l.string,validationMessage:l.string,required:l.bool,validate:l.bool},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(a.Component);t.default=p},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(0),l=n(2),u=function(e){function t(n){var i=e.call(this,n)||this;return i._id=l.guid(),i.limit=function(e,t,n){var i=n.offsetWidth,r=t.offsetWidth;return e<0?0:e>i-r?i-r:e},i.toggle=function(e,t){i.setState({checked:e}),i.valueDuringOnChange=e,l.dispatchEvent(i.props.onChange,t,i,{value:e}),i.valueDuringOnChange=void 0},i.handleClick=function(e){i.toggle(!i.value,e)},i.handleKeyDown=function(e){if(!i.props.disabled){var t=e.keyCode;t!==l.Keys.space&&t!==l.Keys.enter||i.toggle(!i.value,e)}},i.handleWrapperFocus=function(e){if(!i.props.disabled){i.setState({focused:!0});var t=i.props.onFocus;t&&t.call(void 0,e)}},i.handleWrapperBlur=function(e){if(!i.props.disabled){i.setState({focused:!1});var t=i.props.onBlur;t&&t.call(void 0,e)}},i.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},i}return r(t,e),t.prototype.componentDidMount=function(){this.forceUpdate()},Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.state.focused,n=this.props,i=n.dir,r=n.disabled,a=n.id,u=n.offLabel,p=n.onLabel,c=n.tabIndex;this.dir=i||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var d=l.classNames({"k-widget":!0,"k-switch":!0,"k-switch-on":this.value,"k-switch-off":!this.value,"k-state-focused":t,"k-state-disabled":r},this.props.className),h={"aria-checked":this.value,"aria-disabled":r||void 0};return o.createElement("span",s({ref:function(t){e._wrapper=t},className:d,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},h),o.createElement("span",{className:"k-switch-container",id:a||this._id,ref:function(t){e._element=t},tabIndex:r?void 0:c},o.createElement("span",{className:"k-switch-label-on"},p),o.createElement("span",{className:"k-switch-label-off"},u),o.createElement("span",{className:"k-switch-handle"})))},t.propTypes={checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,dir:a.string,id:a.string,offLabel:a.string,onBlur:a.any,onChange:a.any,onFocus:a.any,onLabel:a.string,tabIndex:a.number},t.defaultProps={disabled:!1,defaultChecked:!1,offLabel:"OFF",onBlur:l.noop,onFocus:l.noop,onLabel:"ON",tabIndex:0},t}(o.Component);t.default=u},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),o=n(0),a=n(12),l=n(15),u=n(2),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={},t._inputId="k-"+u.guid(),t._service=new a.MaskingService,t._isPasted=!1,t._selection=[null,null],t._input=null,t.pasteHandler=function(e){var n=e.target,i=n.selectionStart,r=n.selectionEnd;r!==i&&(t._isPasted=!0,t._selection=[i||0,r||0])},t.onChangeHandler=function(e){var n=e.currentTarget,i=n.value,r=t._selection[0]||0,s=t._selection[1]||0;if(!t.props.mask)return t._isPasted=!1,t._selection=[null,null],void t.triggerOnChange(i,e);var o,a=t.value;if(t._isPasted){t._isPasted=!1;var l=a.length-s,u=i.length-l;o=t._service.maskInRange(i.slice(r,u),a,r,s)}else o=t._service.maskInput(i,a,n.selectionStart||0);t._selection=[o.selection,o.selection],t.triggerOnChange(o.value,e)},t.focusHandler=function(e){t.state.focused||(t.setState({focused:!0}),t.props.onFocus&&t.props.onFocus.call(void 0,{target:t,syntheticEvent:e,nativeEvent:e.nativeEvent}))},t.blurHandler=function(e){t.state.focused&&(t.setState({focused:!1}),t.props.onBlur&&t.props.onBlur.call(void 0,{target:t,syntheticEvent:e,nativeEvent:e.nativeEvent}))},t.setValidity=function(){t.element&&t.element.setCustomValidity(t.validity.valid?"":t.props.validationMessage||l.validationMessage)},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this._service.rawValue(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=this.value,t=this._service.validationValue(e);return{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!(this.required&&!t||this.props.maskValidation&&this.props.prompt&&-1!==e.indexOf(this.props.prompt)),valueMissing:!t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(this.element&&this.state.focused&&t.focused){var n=this._selection,i=n[0],r=n[1],s=e.selection,o=this.props.selection;(!s&&o||s&&o&&(s.start!==o.start||s.end!==o.end))&&(i=o.start,r=o.end),null!==i&&null!==r&&this.element.setSelectionRange(i,r)}l.maskingChanged(e,this.props)&&this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props.id||this._inputId,n=!this.validityStyles||this.validity.valid,i=s.createElement("span",{dir:this.props.dir,className:u.classNames("k-widget k-maskedtextbox",{"k-state-focused":this.state.focused,"k-state-disabled":this.props.disabled,"k-state-invalid":!n}),style:this.props.label?void 0:{width:this.props.width}},s.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-textbox",value:this.value,id:t,name:this.props.name,tabIndex:this.props.tabIndex||void 0,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:function(t){return e._input=t},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:l.returnFalse,onDrop:l.returnFalse}));return this.props.label?s.createElement(u.FloatingLabel,{id:t,value:this.value,valid:n,placeholder:this.props.placeholder,label:this.props.label,children:i,style:{width:this.props.width}}):i},t.prototype.triggerOnChange=function(e,t){this.setState({value:e}),this.props.onChange&&(this._valueDuringOnChange=e,this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this}),this._valueDuringOnChange=void 0)},t.prototype.updateService=function(e){var t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(t)},Object.defineProperty(t.prototype,"rules",{get:function(){return Object.assign({},l.defaultRules,this.props.rules)},enumerable:!0,configurable:!0}),t.propTypes={value:o.string,defaultValue:o.string,placeholder:o.string,title:o.string,dir:o.string,id:o.string,width:o.oneOfType([o.string,o.number]),tabIndex:o.number,disabled:o.bool,readonly:o.bool,prompt:o.string,promptPlaceholder:o.string,includeLiterals:o.bool,maskValidation:o.bool,mask:o.string,rules:function(e,t,n){var i=e.rules;if(void 0!==i&&!Object.entries(i).some(function(e){return"string"!=typeof e||!(i[e]instanceof RegExp)}))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed.")},selection:o.shape({start:o.number.isRequired,end:o.number.isRequired}),name:o.string,label:o.string,validationMessage:o.string,required:o.bool,valid:o.bool,validityStyles:o.bool,onChange:o.func},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:l.defaultRules,required:!1,validityStyles:!0},t}(s.Component);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=n(3),s=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,i=e.prompt,r=void 0===i?"":i,s=e.promptPlaceholder,o=void 0===s?" ":s,a=e.rules,l=void 0===a?{}:a,u=e.includeLiterals,p=void 0!==u&&u;this.mask=n,this.prompt=r,this.promptPlaceholder=o,this.rules=l,this.includeLiterals=p,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return i.sequence(this.validationTokens).run(e).fold(function(e){t=e.join("")}),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?(i.sequence(this.rawTokens).run(e).fold(function(e){t=e.join("")}),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?(i.sequence(this.maskTokens).run(e).fold(function(e){t=e.join("")}),t):t},e.prototype.maskInput=function(e,t,n){return e.length<t.length?this.maskRemoved(e,t,n):this.maskInserted(e,t,n)},e.prototype.maskInRange=function(e,t,n,r){var s="",o=r,a=t.split("").slice(0,n),l=t.split("").slice(r);return i.sequence(this.maskTokens.slice(n,r)).run(e).fold(function(e){s=a.concat(e).concat(l).join("")}),{selection:o,value:s}},e.prototype.maskRemoved=function(e,t,n){var r=this,s="",o=n,a=e.split("").slice(n),l=e.split("").slice(0,n).join(""),u=this.maskTokens.length-(e.length-n);return i.sequence(this.maskTokens.slice(0,u)).run(l,t).fold(function(e){o=r.adjustPosition(e,o),s=e.concat(a).join("")}),{selection:o,value:s}},e.prototype.adjustPosition=function(e,t){var n=e[t];return this.maskTokens[t].isLiteral(n)||n===this.prompt?t:t+1},e.prototype.maskInserted=function(e,t,n){var r=this,s="",o=n,a=e.slice(0,n);return i.sequence(this.unmaskTokens).run(a,t).chain(function(e){o=e.join("").length;var n=t.slice(o);return i.sequence(r.maskTokens).run(e.join("")+n,t)}).fold(function(e){s=e.join("")}),{selection:o,value:s}},Object.defineProperty(e.prototype,"maskTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder;return{literal:function(e){return r.literal(e)},mask:function(n){return r.mask({prompt:e,promptPlaceholder:t})(n)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unmaskTokenCreator",{get:function(){var e=this;return{literal:function(e){return r.unliteral(e)},mask:function(t){return r.unmask(e.prompt)(t)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder,n=this.includeLiterals;return{literal:function(e){return r.rawLiteral(n)},mask:function(n){return r.rawMask({prompt:e,promptPlaceholder:t})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return r.rawLiteral(!1)},mask:function(t){return r.rawMask({prompt:e,promptPlaceholder:""})}}},enumerable:!0,configurable:!0}),e.prototype.tokenize=function(){var e=this;i.greedy(r.token(this.rules,this.maskTokenCreator)).run(this.mask).fold(function(t,n){e.maskTokens=t}),i.greedy(r.token(this.rules,this.unmaskTokenCreator)).run(this.mask).fold(function(t,n){e.unmaskTokens=t}),i.greedy(r.token(this.rules,this.rawTokenCreator)).run(this.mask).fold(function(t,n){e.rawTokens=t}),i.greedy(r.token(this.rules,this.validationTokenCreator)).run(this.mask).fold(function(t,n){e.validationTokens=t})},e}();t.MaskingService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4);t.sequence=function(e){return e.reduce(function(e,t){return n=t,e.chain(function(e){return n.map(function(t){return e.concat([t])})});var n},(t=[],new i.Parser(function(e){return new r.Result(t,e)})));var t},t.greedy=function(e){return new i.Parser(function(t){for(var n=new r.Result([],t);!t.eof();)n=n.concat(e.run(t));return n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.input=e,this.control=t,this.inputCursor=0,this.controlCursor=0}return e.prototype.eof=function(){return this.inputCursor>=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}();t.Stream=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultRules={"#":/[\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]/};t.returnFalse=function(){return!1};t.validationMessage="Please enter a valid value!";t.maskingChanged=function(e,t){return e.includeLiterals!==t.includeLiterals||e.mask!==t.mask||e.prompt!==t.prompt||e.promptPlaceholder!==t.promptPlaceholder||!i(e.rules,t.rules)};var i=function(e,t){if(!!e!=!!t)return!1;if(e===t||!e||!t)return!0;var n=!0;for(var i in e)if(e[i]!==t[i]){n=!1;break}if(n)for(var i in t)if(!e.hasOwnProperty(i)){n=!1;break}return n}}])});
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-react-intl"],t):"object"==typeof exports?exports.KendoReactInputs=t(require("react"),require("prop-types"),require("@progress/kendo-react-intl")):e.KendoReactInputs=t(e.React,e.PropTypes,e.KendoReactIntl)}(window,function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var i,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!0!==e&&!!e}).map(function(e){return Array.isArray(e)?r.apply(void 0,e):"object"==typeof e?Object.keys(e).map(function(t,n){return e[n]||e[t]&&t||null}).filter(function(e){return null!==e}).join(" "):e}).filter(function(e){return!!e}).join(" ")},o=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},s={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},a=function(){},l=function(){return function(){}}(),u=n(0),p=n(1),c=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focused:!1},t.handleFocus=function(e){t.setState({focused:!0})},t.handleBlur=function(e){t.setState({focused:!1})},t}return c(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.id,i=e.className,o=e.value,s=e.placeholder,a=e.valid,l=e.style,p=r({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(o||s),"k-state-invalid":!a&&void 0!==a},i);return u.createElement("span",{className:p,onFocus:this.handleFocus,onBlur:this.handleBlur,style:l},this.props.children,t?n?u.createElement("label",{htmlFor:n,className:"k-label"},t):u.createElement("span",{className:"k-label"},t):null)},t.propTypes={label:p.string,id:p.string,value:p.string,placeholder:p.string,valid:p.bool},t}(u.Component);function h(e,t,n,i){if(e){var r={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(r,i))}}var f=function(){return"undefined"==typeof window},v=function(e,t){return function(n){return t(e(n))}},m=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},y=function(e,t,n){return e.removeEventListener&&e.removeEventListener(t,n)},g=function(){},b=function(e){return e.preventDefault()},_=/touch/;function k(e){return e.type.match(_)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var w=function(e){var t=this,n=e.press;void 0===n&&(n=g);var i=e.drag;void 0===i&&(i=g);var r=e.release;void 0===r&&(r=g);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=v(k,n),this._dragHandler=v(k,i),this._releaseHandler=v(k,r),this._ignoreMouse=!1,this._mouseOnly=o,this._touchAction,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(m(document,"mousemove",t._mousemove),m(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){y(document,"mousemove",t._mousemove),y(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(m(t._element,"pointermove",t._pointermove),m(t._element,"pointerup",t._pointerup),m(t._element,"contextmenu",b),t._touchAction=e.target.style.touchAction,e.target.style.touchAction="none",e.target.setPointerCapture(e.pointerId),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(y(t._element,"pointermove",t._pointermove),y(t._element,"pointerup",t._pointerup),y(t._element,"contextmenu",b),e.target.style.touchAction=t._touchAction,e.target.releasePointerCapture(e.pointerId),t._releaseHandler(e))}};w.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},w.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},w.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?m(e,"pointerdown",this._pointerdown):(m(e,"mousedown",this._mousedown),this._mouseOnly||(m(e,"touchstart",this._touchstart),m(e,"touchmove",this._touchmove),m(e,"touchend",this._touchend)))},w.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return y(e,"pointerdown",this._pointerdown),y(e,"pointermove",this._pointermove),void y(e,"pointerup",this._pointerup);y(e,"mousedown",this._mousedown),this._mouseOnly||(y(e,"touchstart",this._touchstart),y(e,"touchmove",this._touchmove),y(e,"touchend",this._touchend))},w.prototype._usePointers=function(){return!this._mouseOnly&&w.supportPointerEvent()},w.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},w.default=w;var O=w,P=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new O({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t}return P(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){var e=this;return u.cloneElement(u.Children.only(this.props.children),{ref:function(t){return e.element=t}})},t.propTypes={children:p.element.isRequired},t}(u.PureComponent);n.d(t,"classNames",function(){return r}),n.d(t,"guid",function(){return o}),n.d(t,"Keys",function(){return s}),n.d(t,"noop",function(){return a}),n.d(t,"FloatingLabel",function(){return d}),n.d(t,"FormComponent",function(){return l}),n.d(t,"dispatchEvent",function(){return h}),n.d(t,"isServerRendering",function(){return f}),n.d(t,"Draggable",function(){return C})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),r=n(14),o=function(e){return(e||"").split("")},s=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof r.Stream?this.parse(e):this.parse(new r.Stream(o(e),o(t)))},e.prototype.map=function(t){var n=this;return new e(function(e){return n.parse(e).map(t)})},e.prototype.chain=function(t){var n=this;return new e(function(e){return n.parse(e).chain(function(e,n){return t(e).run(n)})})},e.prototype.isLiteral=function(e){return this.run(e).type===i.ResultType.Literal},e}();t.Parser=s,t.mask=function(e){var t=e.prompt,n=e.promptPlaceholder;return function(e){return new s(function(r){for(;!r.eof();){var o=r.peek(),s=o.char,a=o.control;if(s===a&&a===t)return r.eat(),new i.Result(t,r,i.ResultType.Mask);if(e.test(s))return r.eat(),new i.Result(s,r,i.ResultType.Mask);if(s===n)return r.eat(),new i.Result(t,r,i.ResultType.Mask);r.eat_input()}return r.eat(),new i.Result(t,r,i.ResultType.Mask)})}},t.literal=function(e){return new s(function(t){return t.peek().char===e?(t.eat(),new i.Result(e,t,i.ResultType.Literal)):new i.Result(e,t,i.ResultType.Literal)})},t.unmask=function(e){return function(t){return new s(function(n){for(;!n.eof();){var r=n.peek(),o=r.char,s=r.control;if(o===e&&s===e)return n.eat(),new i.Result(o,n);if(t.test(o))return n.eat(),new i.Result(o,n);n.eat_input()}return n.eat(),new i.Result("",n)})}},t.unliteral=function(e){return new s(function(t){return t.eof()?new i.Result("",t):(t.peek().char===e&&t.eat(),new i.Result(e,t))})},t.token=function(e,t){return new s(function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new i.Result(t.literal(r),n)):o?new i.Result(t.mask(o),n):new i.Result(t.literal(r),n)})},t.rawMask=function(e){var t=e.prompt,n=e.promptPlaceholder;return new s(function(e){var r=e.next().char;return r===t?new i.Result(n,e):new i.Result(r,e)})},t.rawLiteral=function(e){return new s(function(t){var n=t.next().char;return e?new i.Result(n,t):new i.Result("",t)})}},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(i=t.ResultType||(t.ResultType={}));var r=function(){function e(e,t,n){void 0===n&&(n=i.Undefined),this.value=e,this.rest=t,this.type=n}return e.prototype.map=function(t){return new e(t(this.value),this.rest)},e.prototype.chain=function(e){return e(this.value,this.rest)},e.prototype.fold=function(e,t){return e(this.value,this.rest)},e.prototype.concat=function(e){return this.map(function(t,n){return e.chain(function(e,n){return t.concat([e])})})},e.prototype.toString=function(){return"Result({ value: '"+this.value+"', rest: "+this.rest+" })"},e}();t.Result=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.NumericTextBox=i.default;var r=n(9);t.Input=r.default;var o=n(10);t.Switch=o.default;var s=n(11);t.MaskedTextBox=s.default},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),s=n(1),a=n(7),l=n(2),u=n(8),p="Please enter a valid value!",c=function(e){function t(t){var n=e.call(this,t)||this;n.valueDuringOnChange=void 0,n.textBeforeInput="",n._inputId=l.guid(),n.setValidity=function(){n.element&&n.element.setCustomValidity&&n.element.setCustomValidity(n.validity.valid?"":n.props.validationMessage||p)},n.elementChange=n.elementChange.bind(n),n.increase=n.increase.bind(n),n.decrease=n.decrease.bind(n),n.wheel=n.wheel.bind(n),n.keyDown=n.keyDown.bind(n);var i={value:null,looselyFormattedText:null,selectionStart:0,selectionEnd:0,decimalSelect:!1};return void 0!==n.props.value?i.value=n.props.value:void 0!==n.props.defaultValue&&(i.value=n.props.defaultValue),n.state=i,n}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this.state.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.componentWillReceiveProps=function(e){void 0!==e.value&&this.state.value!==e.value&&this.setState({value:e.value})},t.prototype.componentDidMount=function(){this.element&&(this.textBeforeInput=this.element.value),this.setValidity()},t.prototype.componentDidUpdate=function(e,t){if((!document||document.activeElement===this.element)&&this.element&&null!==this.state.looselyFormattedText)if(this.element.value!==this.state.looselyFormattedText&&this.state.value===t.value)this.element.selectionStart=this.state.selectionStart,this.element.selectionEnd=this.state.selectionEnd;else{var n=void 0,i=this.state.looselyFormattedText.indexOf(this.symbols.decimal);n=i>=0&&i<this.state.selectionStart?this.state.selectionEnd:this.state.selectionEnd-(this.state.looselyFormattedText.length-this.element.value.length);var r=this.element.value.indexOf(this.symbols.decimal);(this.state.decimalSelect||null===this.state.value&&r>=0||-1===i&&r>=0)&&(n=this.state.selectionStart<r+2&&i>=0?r+1:r),this.state.decimalSelect||this.state.value!==t.value||(n=this.state.selectionEnd-(this.state.looselyFormattedText.length-this.element.value.length)),this.state.looselyFormattedText[0]===this.symbols.decimal&&t.looselyFormattedText===this.symbols.decimal&&(n=void 0!==this.state.value?this.formatNumber(this.state.value).length:0),this.element.selectionStart=this.element.selectionEnd=n}this.element&&(this.textBeforeInput=this.element.value),this.setValidity()},Object.defineProperty(t.prototype,"valueAsLocalString",{get:function(){return this.intl=a.provideIntlService(this),this.symbols=this.intl.numberSymbols(),null!==this.state.looselyFormattedText&&!this.state.decimalSelect&&this.parseNumber(this.state.looselyFormattedText)===this.state.value&&this.formatNumber(this.state.value).length<this.state.looselyFormattedText.length&&0===this.state.looselyFormattedText.indexOf(this.formatNumber(this.state.value))?this.state.looselyFormattedText:this.formatNumber(this.state.value)},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props.id||this._inputId,n=a.provideLocalizationService(this),i=!this.validityStyles||this.validity.valid,r=o.createElement("span",{dir:this.props.dir,style:this.props.label?void 0:{width:this.props.width},className:"k-widget k-numerictextbox"},o.createElement("span",{className:l.classNames("k-numeric-wrap",{"k-state-disabled":this.props.disabled,"k-state-invalid":!i}),ref:function(t){e.elementWrapper=t}},o.createElement("input",{tabIndex:this.props.tabIndex,disabled:this.props.disabled,title:this.props.title,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max,placeholder:this.props.placeholder,type:this.props.inputType||"tel",spellCheck:!1,autoComplete:"off",autoCorrect:"off",className:"k-input k-formatted-value",id:t,value:this.valueAsLocalString,"aria-valuenow":null!==this.state.value?this.state.value:void 0,name:this.props.name,onWheel:this.wheel,onKeyDown:this.keyDown,onChange:this.elementChange,ref:function(t){return e._element=t}}),this.props.children,this.props.spinners&&o.createElement("span",{className:"k-select",onMouseDown:function(t){document&&e._element&&(t.preventDefault(),document.activeElement!==e._element&&e._element.focus())}},o.createElement("span",{className:"k-link k-link-increase","aria-label":n.toLanguageString(u.increaseValue,u.messages[u.increaseValue]),title:n.toLanguageString(u.increaseValue,u.messages[u.increaseValue]),onClick:this.increase},o.createElement("span",{className:"k-icon k-i-arrow-n"})),o.createElement("span",{className:"k-link k-link-decrease","aria-label":n.toLanguageString(u.decreaseValue,u.messages[u.decreaseValue]),title:n.toLanguageString(u.decreaseValue,u.messages[u.decreaseValue]),onClick:this.decrease},o.createElement("span",{className:"k-icon k-i-arrow-s"})))));return this.props.label?o.createElement(l.FloatingLabel,{id:t,value:this.valueAsLocalString,valid:i,placeholder:this.props.placeholder,label:this.props.label,children:r,style:{width:this.props.width}}):r},t.prototype.formatNumber=function(e){return null==e?"":this.intl.formatNumber(e,this.props.format).toString()},t.prototype.parseNumber=function(e){return this.intl.parseNumber(e,this.props.format)},t.prototype.elementChange=function(e){if(this.element){var t=this.element,n={value:this.state.value,looselyFormattedText:t.value,selectionStart:this.element.selectionStart,selectionEnd:this.element.selectionEnd,decimalSelect:!1},i=t.value,r=this.symbols.minusSign;if(i===r)return n.value=null,void this.triggerChange(n,e);if(i.split(r).length!==this.textBeforeInput.split(r).length&&i.length===this.textBeforeInput.length+r.length)return n.value=-this.parseNumber(this.textBeforeInput),void this.triggerChange(n,e);var o=this.symbols.decimal;if(i.split(RegExp("\\"+o)).length>2)return n.decimalSelect=!0,void this.triggerChange(n,e);if(i.length>1&&-1===i.indexOf(o)&&this.textBeforeInput.indexOf(o)>=0&&i.length+o.length===this.textBeforeInput.length)return n.decimalSelect=!0,void this.triggerChange(n,e);var s=this.parseNumber(i);if(s===this.state.value&&i.length>0&&i[i.length-1]===o&&(this.formatNumber(1.1)||"").toString().indexOf(o)>-1)return n.looselyFormattedText=i,void this.triggerChange(n,e);var a=(null===s||isNaN(s))&&i.length>0&&i!==this.symbols.minusSign,l=this.elementWrapper;if(i.length>this.textBeforeInput.length&&this.parseNumber(i)===this.parseNumber(i.slice(0,t.selectionStart))&&(null===this.parseNumber(i.slice(t.selectionStart-1))||isNaN(this.parseNumber(i.slice(t.selectionStart-1))))&&(a=!0),a)return l&&-1===l.className.indexOf("k-state-invalid")&&(l.className+=" k-state-invalid",setTimeout(function(){l.className=l.className.replace(" k-state-invalid","")},50)),n.looselyFormattedText=this.textBeforeInput,n.selectionStart=n.selectionEnd=t.selectionEnd+this.textBeforeInput.length-t.value.length,void this.triggerChange(n,e);n.value=s,this.triggerChange(n,e)}},t.prototype.nonInputActions=function(e,t){var n={value:e,looselyFormattedText:null,selectionStart:0,selectionEnd:0,decimalSelect:!1};this.triggerChange(n,t)},t.prototype.triggerChange=function(e,t){if(!this.props.disabled){this.valueDuringOnChange=this.ranged(this.parseNumber(this.formatNumber(this.ranged(e.value))));var n=this.valueDuringOnChange!==this.state.value;void 0!==this.props.value?e.value=this.props.value:e.value=this.valueDuringOnChange,this.setState(e),n&&l.dispatchEvent(this.props.onChange,t,this,{value:this.valueDuringOnChange}),this.valueDuringOnChange=void 0}},t.prototype.ranged=function(e){return null==e?e:e>1||e<1||1===e?void 0!==this.props.max&&void 0!==this.props.min&&this.props.max<this.props.min?null:(void 0!==this.props.max&&e>this.props.max&&(e=this.props.max),void 0!==this.props.min&&e<this.props.min&&(e=this.props.min),e):null},t.prototype.increase=function(e){this.nonInputActions((this.state.value||0)+(this.props.step||0),e)},t.prototype.decrease=function(e){this.nonInputActions((this.state.value||0)-(this.props.step||0),e)},t.prototype.wheel=function(e){document&&document.activeElement===this.element&&this.element&&(e.nativeEvent.deltaY<0&&(e.preventDefault(),this.increase(e)),e.nativeEvent.deltaY>0&&(e.preventDefault(),this.decrease(e)))},t.prototype.keyDown=function(e){switch(e.keyCode){case 38:this.increase(e);break;case 40:this.decrease(e);break;case 110:var t=this.element;if(t){var n=t.value,i=t.selectionStart,r=t.selectionEnd;t.value=n.slice(0,i)+this.symbols.decimal+n.slice(r),t.selectionStart=t.selectionEnd=i+1,this.elementChange(e)}break;default:return}e.preventDefault()},t.propTypes={value:s.number,defaultValue:s.number,step:s.number,format:s.oneOfType([s.string,s.shape({style:s.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:s.string,currencyDisplay:s.oneOf(["symbol","code","name"]),useGrouping:s.bool,minimumIntegerDigits:s.number,minimumFractionDigits:s.number,maximumFractionDigits:s.number})]),width:s.oneOfType([s.string,s.number]),tabIndex:s.number,title:s.string,placeholder:s.string,min:s.number,max:s.number,spinners:s.bool,disabled:s.bool,dir:s.string,name:s.string,label:s.string,validationMessage:s.string,required:s.bool,id:s.string,onChange:s.func},t.defaultProps={spinners:!0,disabled:!1,onChange:function(e){},step:1,required:!1,validityStyles:!0},t}(o.Component);t.default=c,a.registerForIntl(c),a.registerForLocalization(c)},function(e,t){e.exports=n},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.increaseValue="numerictextbox.increment",t.decreaseValue="numerictextbox.decrement",t.messages=((i={})[t.increaseValue]="Increase value",i[t.decreaseValue]="Decrease value",i)},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),l=n(1),u=n(2),p=function(e){function t(n){var i=e.call(this,n)||this;return i._inputId=u.guid(),i.isInvalid=function(e){var t=!1;for(var n in e)e.hasOwnProperty(n)&&(t=t||e[n]);return t},i.setValidity=function(){i._input&&i._input.setCustomValidity&&(i.validity.valid||!i.validityStyles?i._input.classList.remove("k-state-invalid"):i._input.classList.add("k-state-invalid"),i._input.setCustomValidity(i.validity.valid?"":i.props.validationMessage||""))},i.handleChange=function(e){i.setState({value:e.target.value}),i.valueDuringOnChange=e.target.value,i.props.onChange&&i.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:e.target.value,target:i}),i.valueDuringOnChange=void 0},i.state={value:i.props.defaultValue||t.defaultProps.defaultValue},i}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e={badInput:!!this._input&&this._input.validity.badInput,patternMismatch:!!this._input&&this._input.validity.patternMismatch,rangeOverflow:!!this._input&&this._input.validity.rangeOverflow,rangeUnderflow:!!this._input&&this._input.validity.rangeUnderflow,stepMismatch:!!this._input&&this._input.validity.stepMismatch,tooLong:!!this._input&&this._input.validity.tooLong,typeMismatch:!!this._input&&this._input.validity.typeMismatch,valueMissing:!!this._input&&this._input.validity.valueMissing};return o({},e,{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!this._input||!this.isInvalid(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.label,r=t.id,l=(t.validationMessage,t.defaultValue,t.valid,t.validityStyles,t.style),p=s(t,["className","label","id","validationMessage","defaultValue","valid","validityStyles","style"]),c=r||this._inputId,d=!this.validityStyles||this.validity.valid,h=u.classNames(n,"k-textbox"),f=a.createElement("input",o({},p,{style:i?void 0:l,value:this.value,id:c,className:h,onChange:this.handleChange,ref:function(t){e._input=t}}));return i?a.createElement(u.FloatingLabel,{label:i,children:f,value:String(this.value),placeholder:p.placeholder,id:c,valid:d,style:l}):f},t.propTypes={label:l.string,validationMessage:l.string,required:l.bool,validate:l.bool},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(a.Component);t.default=p},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),a=n(1),l=n(2),u=function(e){function t(n){var i=e.call(this,n)||this;return i._id=l.guid(),i.limit=function(e,t,n){var i=n.offsetWidth,r=t.offsetWidth;return e<0?0:e>i-r?i-r:e},i.toggle=function(e,t){i.setState({checked:e}),i.valueDuringOnChange=e,l.dispatchEvent(i.props.onChange,t,i,{value:e}),i.valueDuringOnChange=void 0},i.handleClick=function(e){i.toggle(!i.value,e)},i.handleKeyDown=function(e){if(!i.props.disabled){var t=e.keyCode;t!==l.Keys.space&&t!==l.Keys.enter||i.toggle(!i.value,e)}},i.handleWrapperFocus=function(e){if(!i.props.disabled){i.setState({focused:!0});var t=i.props.onFocus;t&&t.call(void 0,e)}},i.handleWrapperBlur=function(e){if(!i.props.disabled){i.setState({focused:!1});var t=i.props.onBlur;t&&t.call(void 0,e)}},i.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},i}return r(t,e),t.prototype.componentDidMount=function(){this.forceUpdate()},Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.state.focused,n=this.props,i=n.dir,r=n.disabled,a=n.id,u=n.offLabel,p=n.onLabel,c=n.tabIndex;this.dir=i||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var d=l.classNames({"k-widget":!0,"k-switch":!0,"k-switch-on":this.value,"k-switch-off":!this.value,"k-state-focused":t,"k-state-disabled":r},this.props.className),h={"aria-checked":this.value,"aria-disabled":r||void 0};return s.createElement("span",o({ref:function(t){e._wrapper=t},className:d,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},h),s.createElement("span",{className:"k-switch-container",id:a||this._id,ref:function(t){e._element=t},tabIndex:r?void 0:c},s.createElement("span",{className:"k-switch-label-on"},p),s.createElement("span",{className:"k-switch-label-off"},u),s.createElement("span",{className:"k-switch-handle"})))},t.propTypes={checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,dir:a.string,id:a.string,offLabel:a.string,onBlur:a.any,onChange:a.any,onFocus:a.any,onLabel:a.string,tabIndex:a.number},t.defaultProps={disabled:!1,defaultChecked:!1,offLabel:"OFF",onBlur:l.noop,onFocus:l.noop,onLabel:"ON",tabIndex:0},t}(s.Component);t.default=u},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),s=n(1),a=n(12),l=n(15),u=n(2),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={},t._inputId="k-"+u.guid(),t._service=new a.MaskingService,t._isPasted=!1,t._selection=[null,null],t._input=null,t.pasteHandler=function(e){var n=e.target,i=n.selectionStart,r=n.selectionEnd;r!==i&&(t._isPasted=!0,t._selection=[i||0,r||0])},t.onChangeHandler=function(e){var n=e.currentTarget,i=n.value,r=t._selection[0]||0,o=t._selection[1]||0;if(!t.props.mask)return t._isPasted=!1,t._selection=[null,null],void t.triggerOnChange(i,e);var s,a=t.value;if(t._isPasted){t._isPasted=!1;var l=a.length-o,u=i.length-l;s=t._service.maskInRange(i.slice(r,u),a,r,o)}else s=t._service.maskInput(i,a,n.selectionStart||0);t._selection=[s.selection,s.selection],t.triggerOnChange(s.value,e)},t.focusHandler=function(e){t.state.focused||(t.setState({focused:!0}),t.props.onFocus&&t.props.onFocus.call(void 0,{target:t,syntheticEvent:e,nativeEvent:e.nativeEvent}))},t.blurHandler=function(e){t.state.focused&&(t.setState({focused:!1}),t.props.onBlur&&t.props.onBlur.call(void 0,{target:t,syntheticEvent:e,nativeEvent:e.nativeEvent}))},t.setValidity=function(){t.element&&t.element.setCustomValidity(t.validity.valid?"":t.props.validationMessage||l.validationMessage)},t}return r(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this._service.rawValue(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=this.value,t=this._service.validationValue(e);return{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!(this.required&&!t||this.props.maskValidation&&this.props.prompt&&-1!==e.indexOf(this.props.prompt)),valueMissing:!t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(this.element&&this.state.focused&&t.focused){var n=this._selection,i=n[0],r=n[1],o=e.selection,s=this.props.selection;(!o&&s||o&&s&&(o.start!==s.start||o.end!==s.end))&&(i=s.start,r=s.end),null!==i&&null!==r&&this.element.setSelectionRange(i,r)}l.maskingChanged(e,this.props)&&this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props.id||this._inputId,n=!this.validityStyles||this.validity.valid,i=o.createElement("span",{dir:this.props.dir,className:u.classNames("k-widget k-maskedtextbox",{"k-state-focused":this.state.focused,"k-state-disabled":this.props.disabled,"k-state-invalid":!n}),style:this.props.label?void 0:{width:this.props.width}},o.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-textbox",value:this.value,id:t,name:this.props.name,tabIndex:this.props.tabIndex||void 0,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:function(t){return e._input=t},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:l.returnFalse,onDrop:l.returnFalse}));return this.props.label?o.createElement(u.FloatingLabel,{id:t,value:this.value,valid:n,placeholder:this.props.placeholder,label:this.props.label,children:i,style:{width:this.props.width}}):i},t.prototype.triggerOnChange=function(e,t){this.setState({value:e}),this.props.onChange&&(this._valueDuringOnChange=e,this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this}),this._valueDuringOnChange=void 0)},t.prototype.updateService=function(e){var t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(t)},Object.defineProperty(t.prototype,"rules",{get:function(){return Object.assign({},l.defaultRules,this.props.rules)},enumerable:!0,configurable:!0}),t.propTypes={value:s.string,defaultValue:s.string,placeholder:s.string,title:s.string,dir:s.string,id:s.string,width:s.oneOfType([s.string,s.number]),tabIndex:s.number,disabled:s.bool,readonly:s.bool,prompt:s.string,promptPlaceholder:s.string,includeLiterals:s.bool,maskValidation:s.bool,mask:s.string,rules:function(e,t,n){var i=e.rules;if(void 0!==i&&!Object.entries(i).some(function(e){return"string"!=typeof e||!(i[e]instanceof RegExp)}))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed.")},selection:s.shape({start:s.number.isRequired,end:s.number.isRequired}),name:s.string,label:s.string,validationMessage:s.string,required:s.bool,valid:s.bool,validityStyles:s.bool,onChange:s.func},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:l.defaultRules,required:!1,validityStyles:!0},t}(o.Component);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=n(3),o=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,i=e.prompt,r=void 0===i?"":i,o=e.promptPlaceholder,s=void 0===o?" ":o,a=e.rules,l=void 0===a?{}:a,u=e.includeLiterals,p=void 0!==u&&u;this.mask=n,this.prompt=r,this.promptPlaceholder=s,this.rules=l,this.includeLiterals=p,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return i.sequence(this.validationTokens).run(e).fold(function(e){t=e.join("")}),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?(i.sequence(this.rawTokens).run(e).fold(function(e){t=e.join("")}),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?(i.sequence(this.maskTokens).run(e).fold(function(e){t=e.join("")}),t):t},e.prototype.maskInput=function(e,t,n){return e.length<t.length?this.maskRemoved(e,t,n):this.maskInserted(e,t,n)},e.prototype.maskInRange=function(e,t,n,r){var o="",s=r,a=t.split("").slice(0,n),l=t.split("").slice(r);return i.sequence(this.maskTokens.slice(n,r)).run(e).fold(function(e){o=a.concat(e).concat(l).join("")}),{selection:s,value:o}},e.prototype.maskRemoved=function(e,t,n){var r=this,o="",s=n,a=e.split("").slice(n),l=e.split("").slice(0,n).join(""),u=this.maskTokens.length-(e.length-n);return i.sequence(this.maskTokens.slice(0,u)).run(l,t).fold(function(e){s=r.adjustPosition(e,s),o=e.concat(a).join("")}),{selection:s,value:o}},e.prototype.adjustPosition=function(e,t){var n=e[t];return this.maskTokens[t].isLiteral(n)||n===this.prompt?t:t+1},e.prototype.maskInserted=function(e,t,n){var r=this,o="",s=n,a=e.slice(0,n);return i.sequence(this.unmaskTokens).run(a,t).chain(function(e){s=e.join("").length;var n=t.slice(s);return i.sequence(r.maskTokens).run(e.join("")+n,t)}).fold(function(e){o=e.join("")}),{selection:s,value:o}},Object.defineProperty(e.prototype,"maskTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder;return{literal:function(e){return r.literal(e)},mask:function(n){return r.mask({prompt:e,promptPlaceholder:t})(n)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unmaskTokenCreator",{get:function(){var e=this;return{literal:function(e){return r.unliteral(e)},mask:function(t){return r.unmask(e.prompt)(t)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder,n=this.includeLiterals;return{literal:function(e){return r.rawLiteral(n)},mask:function(n){return r.rawMask({prompt:e,promptPlaceholder:t})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return r.rawLiteral(!1)},mask:function(t){return r.rawMask({prompt:e,promptPlaceholder:""})}}},enumerable:!0,configurable:!0}),e.prototype.tokenize=function(){var e=this;i.greedy(r.token(this.rules,this.maskTokenCreator)).run(this.mask).fold(function(t,n){e.maskTokens=t}),i.greedy(r.token(this.rules,this.unmaskTokenCreator)).run(this.mask).fold(function(t,n){e.unmaskTokens=t}),i.greedy(r.token(this.rules,this.rawTokenCreator)).run(this.mask).fold(function(t,n){e.rawTokens=t}),i.greedy(r.token(this.rules,this.validationTokenCreator)).run(this.mask).fold(function(t,n){e.validationTokens=t})},e}();t.MaskingService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4);t.sequence=function(e){return e.reduce(function(e,t){return n=t,e.chain(function(e){return n.map(function(t){return e.concat([t])})});var n},(t=[],new i.Parser(function(e){return new r.Result(t,e)})));var t},t.greedy=function(e){return new i.Parser(function(t){for(var n=new r.Result([],t);!t.eof();)n=n.concat(e.run(t));return n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.input=e,this.control=t,this.inputCursor=0,this.controlCursor=0}return e.prototype.eof=function(){return this.inputCursor>=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}();t.Stream=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultRules={"#":/[\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]/};t.returnFalse=function(){return!1};t.validationMessage="Please enter a valid value!";t.maskingChanged=function(e,t){return e.includeLiterals!==t.includeLiterals||e.mask!==t.mask||e.prompt!==t.prompt||e.promptPlaceholder!==t.promptPlaceholder||!i(e.rules,t.rules)};var i=function(e,t){if(!!e!=!!t)return!1;if(e===t||!e||!t)return!0;var n=!0;for(var i in e)if(e[i]!==t[i]){n=!1;break}if(n)for(var i in t)if(!e.hasOwnProperty(i)){n=!1;break}return n}}])});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-inputs",
3
- "version": "2.7.0-dev.201902260733",
3
+ "version": "2.7.1",
4
4
  "description": "KendoReact Input package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,17 +23,17 @@
23
23
  "Inputs"
24
24
  ],
25
25
  "peerDependencies": {
26
- "@progress/kendo-react-intl": "^2.0.0",
27
- "react": "^16.0.0",
28
- "react-dom": "^16.0.0"
26
+ "@progress/kendo-react-intl": "^2.7.0",
27
+ "react": "^16.8.2",
28
+ "react-dom": "^16.8.2"
29
29
  },
30
30
  "dependencies": {
31
- "@progress/kendo-react-common": "2.7.0-dev.201902260733",
31
+ "@progress/kendo-react-common": "2.7.1",
32
32
  "@telerik/kendo-draggable": "^1.9.0",
33
33
  "prop-types": "^15.6.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@progress/kendo-react-intl": "2.7.0-dev.201902260733"
36
+ "@progress/kendo-react-intl": "2.7.1"
37
37
  },
38
38
  "@progress": {
39
39
  "friendlyName": "Inputs",