@progress/kendo-dateinputs-common
Advanced tools
Comparing version 0.1.0 to 0.2.0-dev.202301061341
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KendoTypescriptPackageBase=t():e.KendoTypescriptPackageBase=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.MyClass=r.MyClass},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.add=function(e,t){return e+t},e}();t.MyClass=r}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-date-math"),require("tslib")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.KendoDateinputsCommon=e(require("@progress/kendo-date-math"),require("tslib")):t.KendoDateinputsCommon=e(t.KendoDateMath,t.self)}(window,(function(t,e){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},r=function(t){return t instanceof HTMLElement};e.isPresent=function(t){return null!=t},e.isDocumentAvailable=function(){return!!document},e.isNumber=function(t){return e.isPresent(t)&&"number"==typeof t&&!Number.isNaN(t)},e.parseToInt=function(t){return parseInt(t,10)},e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},e.deepExtend=function(t){for(var n,i,s=[],o=1;o<arguments.length;o++)s[o-1]=arguments[o];if(!s.length)return t;var l=s.shift();if(a(t)&&a(l))for(var h in l)r(l[h])?t[h]=l[h]:a(l[h])?(t[h]||e.extend(t,((n={})[h]={},n)),e.deepExtend(t[h],l[h])):e.extend(t,((i={})[h]=l[h],i));return e.deepExtend.apply(void 0,[t].concat(s))},e.noop=function(){},e.isFunction=function(t){return"function"==typeof t},e.cropTwoDigitYear=function(t){return!e.isPresent(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},e.setYears=(i="setFullYear",function(t,e){var n=s.cloneDate(t);return n[i](e),n}),e.millisecondDigitsInFormat=function(t){var e=t&&t.match(/S+(\1)/);return e?e[0].length:0},e.millisecondStepFor=function(t){return Math.pow(10,3-t)},e.areDatePartsEqualTo=function(t,e,n,i,s,a,r,o){return!(!t||t.getFullYear()!==e||t.getMonth()!==n||t.getDate()!==i||t.getHours()!==s||t.getMinutes()!==a||t.getSeconds()!==r||t.getMilliseconds()!==o)},e.isDate=function(t){return e.isPresent(t)&&t.getTime&&e.isNumber(t.getTime())}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(4);e.padZero=function(t){return new Array(Math.max(t,0)).fill("0").join("")},e.unpadZero=function(t){return t.replace(/^0*/,"")},e.approximateStringMatching=function(t){var e=t.oldText,n=t.newText,a=t.formatPattern,r=t.selectionStart,o=t.isInCaretMode,l=t.keyEvent,h=e[r+e.length-n.length],u=e.substring(0,r+e.length-n.length),c=n.substring(0,r),d=[];if(u===c&&r>0)return d.push([a[r-1],c[r-1]]),d;if(0===u.indexOf(c)&&o&&(l.key===s.Key.DELETE||l.key===s.Key.BACKSPACE)||0===u.indexOf(c)&&!o&&(0===c.length||a[c.length-1]!==a[c.length])){var p="";o||1!==c.length||d.push([a[0],c[0]]);for(var m=c.length;m<u.length;m++)a[m]!==p&&a[m]!==i.Constants.formatSeparator&&(p=a[m],d.push([p,""]));return d}if(o&&0===c.indexOf(u)&&a[r-1]||!o&&(0===c.indexOf(u)||a[r-1]===i.Constants.formatSeparator)){if(o)return[[f=a[r-1],c[r-1]]];var f=a[0];for(m=Math.max(0,u.length-1);m<a.length;m++)if(a[m]!==i.Constants.formatSeparator){f=a[m];break}return[[f,c[r-1]]]}return" "===c[c.length-1]||c[c.length-1]===h?[[a[r-1],i.Constants.formatSeparator]]:[[a[r-1],c[r-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,n){return null===t||!(e&&e>t||n&&n<t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Key={DELETE:"Delete",BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",SPACE:" ",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.DateInput=i.DateInput},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(7),a=n(8),r=n(3),o=n(10),l=n(4),h=n(2),u=n(11),c=n(12),d=n(0),p=n(1),m={format:"d",allowNulls:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:(i={},i.valueChange=null,i.input=null,i.inputEnd=null,i.focus=null,i.focusEnd=null,i.blur=null,i.blurEnd=null,i.keydown=null,i.mousewheel=null,i.change=null,i),selectNearestSegmentOnFocus:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:p.Constants.twoDigitYearMax,autoCorrectParts:!0},f=function(t){function e(e,n){var i=t.call(this,n)||this;return i.dateObject=null,i.currentText="",i.currentFormat="",i.interactionMode=c.DateInputInteractionMode.None,i.localeId=p.Constants.defaultLocaleId,i.init(e,n),i}return s.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),e.prototype.init=function(t,e){var n=h.isDate(this.options.value)?d.cloneDate(this.options.value):new Date(e.formattedValue);h.isDate(n)||(n=null),this.element=t,this.options=h.extend({},m,e),this.intl=this.options.intlService,this.formatPlaceholder=this.options.formatPlaceholder?this.options.formatPlaceholder:"formatPattern",this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.forceUpdate()},e.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener("dragStart",this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener("drop",this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener("click",this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener("mousedown",this.onElementMouseDown),this.element.addEventListener("touchstart",this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener("mouseup",this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener("input",this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener("keydown",this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener("focus",this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener("blur",this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener("change",this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener("paste",this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.addEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.unbindEvents=function(){this.element.removeEventListener("dragStart",this.onElementDragStart),this.element.removeEventListener("drop",this.onElementDrop),this.element.removeEventListener("touchstart",this.onElementMouseDown),this.element.removeEventListener("mousedown",this.onElementMouseDown),this.element.removeEventListener("mouseup",this.onElementMouseUp),this.element.removeEventListener("click",this.onElementClick),this.element.removeEventListener("input",this.onElementInput),this.element.removeEventListener("keydown",this.onElementKeyDown),this.element.removeEventListener("focus",this.onElementFocus),this.element.removeEventListener("blur",this.onElementBlur),this.element.removeEventListener("change",this.onElementChange),this.element.removeEventListener("paste",this.onElementPaste),this.element.removeEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.removeEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=h.extend(this.options,t),e&&(this.destroy(),this.init(this.element,t))},e.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},e.prototype.isInCaretMode=function(){return this.interactionMode===c.DateInputInteractionMode.Caret},e.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},e.prototype.onElementDragStart=function(t){t.preventDefault()},e.prototype.onElementDrop=function(t){t.preventDefault()},e.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},e.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},e.prototype.onElementClick=function(t){this.mouseDownStarted=!1;var e=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),3===t.detail);else if(this.isActive&&this.options.selectNearestSegmentOnFocus){var n=this.element.selectionStart!==this.element.selectionEnd,i=h.isPresent(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,s=!n&&i?0:this.caret()[0];this.selectNearestSegment(s)}else this.setSelection(this.selectionByIndex(e.start))},e.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.keyDownEvent||{},n=e.keyCode===o.KeyCode.BACKSPACE||e.key===l.Key.BACKSPACE,i=e.keyCode===o.KeyCode.DELETE||e.key===l.Key.DELETE;if(this.element&&this.dateObject){if(this.isPasteInProgress)return this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),void(this.isPasteInProgress=!1);var s=this.interactionMode;!this.options.allowCaretMode||s===c.DateInputInteractionMode.Caret||i||n||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=c.DateInputInteractionMode.Caret:this.interactionMode=c.DateInputInteractionMode.Selection;var a=this.isInCaretMode();if(a&&this.keyDownEvent.key===l.Key.SPACE)this.setPreviousInputEventState(this.keyDownEvent);else{var h=this.dateObject&&this.dateObject.getValue(),u=this.dateObject.getTextAndFormat(),m=u.text,f=u.format;this.currentFormat=f;var v=a&&(n||i)?this.previousElementValue:m,g=r.approximateStringMatching({oldText:v,newText:this.element.value,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:a,keyEvent:this.keyDownEvent});if(!a||g&&0!==g.length){if(a&&1===g.length){if(!g[0]||!g[0][0])return void this.setPreviousInputEventState(this.keyDownEvent);if(a&&g[0]&&(g[0][0]===p.Constants.formatSeparator||g[0][1]===p.Constants.formatSeparator))return void this.setPreviousInputEventState(this.keyDownEvent)}var y=1===g.length&&g[0][1]===p.Constants.formatSeparator,D=[],E=!1;if(!y)for(var b=0;b<g.length;b++){var S=this.dateObject.parsePart({symbol:g[b][0],currentChar:g[b][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:n||i});D.push(S),E=S.switchToNext}this.options.autoSwitchParts||(E=!1),this.resetSegmentValue=!1;var M,P=D[D.length-1],I=P&&!P.value,C=a&&(n||i)&&I,x=!!P&&P.resetPart,w=!d.isEqual(h,this.dateObject.value),O=this.selection;(!a||C||x)&&(x&&(M=this.currentFormat[O.start]),this.forceUpdate()),g.length&&g[0][0]!==p.Constants.formatSeparator&&(!a||C||x)&&(M?this.setSelection(this.selectionBySymbol(M)):(this.options.autoSwitchParts||g[0][1]!==p.Constants.formatSeparator)&&this.setSelection(this.selectionBySymbol(g[0][0]))),E||!a||n||i||x||!I?this.options.autoSwitchParts&&(E||y)&&(a||this.switchDateSegment(1)):w&&(this.currentFormat.length===this.elementValue.length||a&&s!==c.DateInputInteractionMode.Caret&&w||(a&&s!==c.DateInputInteractionMode.Caret?(M=this.currentFormat[O.start],this.forceUpdate(),this.setSelection(this.selectionBySymbol(M))):this.setPreviousInputEventState(this.keyDownEvent))),this.tryTriggerValueChange({oldValue:h,event:t}),this.triggerInputEnd({event:t})}else this.setPreviousInputEventState(this.keyDownEvent)}}},e.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},e.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},e.prototype.onElementChange=function(t){this.triggerChange({event:t})},e.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){this.keyDownEvent=t,this.previousElementValue=this.element.value;var e=(this.options.autoSwitchKeys||[]).map((function(t){return t.toString().toLowerCase().trim()}));if(e.indexOf(t.keyCode.toString())>=0||e.indexOf(t.keyCode)>=0||e.indexOf(t.key.toLowerCase().trim())>=0){var n=e.indexOf(l.Key.TAB.toLowerCase().trim())>=0||e.indexOf(o.KeyCode.TAB)>=0||e.indexOf(o.KeyCode.TAB.toString())>=0;if(!n)return t.preventDefault(),void this.switchDateSegment(1);var i=this.selection,s=i.start,a=i.end;if(t.shiftKey&&n?this.switchDateSegment(-1):this.switchDateSegment(1),s!==this.selection.start||a!==this.selection.end)return void t.preventDefault()}var r=this.currentFormat[this.selection.start],h=this.getStepFromSymbol(r),u=!1;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===o.KeyCode.TAB)){switch(t.keyCode){case o.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),u=!0;break;case o.KeyCode.ARROW_UP:this.modifyDateSegmentValue(h,r,event),u=!0;break;case o.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),u=!0;break;case o.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-h,r,event),u=!0;break;case o.KeyCode.ENTER:break;case o.KeyCode.DELETE:case o.KeyCode.BACKSPACE:if(this.options.allowNulls){var c=this.dateObject.value;this.dateObject.setValue(null),this.forceUpdate(),this.tryTriggerValueChange({oldValue:c,event:t})}return u=!0,void(t.keyCode===o.KeyCode.BACKSPACE&&((this.options.autoSwitchKeys||[]).indexOf(o.KeyCode.BACKSPACE)>=0||(this.options.autoSwitchKeys||[]).indexOf(l.Key.BACKSPACE)>=0)&&this.switchDateSegment(-1));case l.Key.HOME:this.selectNearestSegment(0);break;case l.Key.END:this.selectNearestSegment(this.elementValue.length);break;default:return}u&&t.preventDefault()}}},e.prototype.onElementPaste=function(){this.isPasteInProgress=!0},e.prototype.onElementMouseWheel=function(t){if(this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive){var e=t;e.shiftKey?this.switchDateSegment((e.wheelDelta||-e.detail)>0?-1:1):this.modifyDateSegmentValue((e.wheelDelta||-e.detail)>0?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},e.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;h.isPresent(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e));var n=this.dateObject&&this.dateObject.getValue();this.writeValue(e),this.tryTriggerValueChange({oldValue:n,event:t})},Object.defineProperty(e.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:p.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:p.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t={start:0,end:0};return null!==this.element&&void 0!==this.element.selectionStart&&(t={start:this.element.selectionStart,end:this.element.selectionEnd}),t},enumerable:!0,configurable:!0}),e.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&this.element.setSelectionRange(t.start,t.end)},e.prototype.selectionBySymbol=function(t){for(var e=-1,n=0,i=0;i<this.currentFormat.length;i++)this.currentFormat[i]===t&&(n=i+1,-1===e&&(e=i));return e<0&&(e=0),{start:e,end:n}},e.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},n=t,i=t-1;n<this.currentFormat.length||i>=0;n++,i--){if(n<this.currentFormat.length&&this.currentFormat[n]!==p.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}if(i>=0&&this.currentFormat[i]!==p.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[i]);break}}return e},e.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){for(var n=e.start,i=(this.currentFormat[n],n);i>=0;i--)if(this.currentFormat[i]!==p.Constants.formatSeparator){n=i;break}var s=void 0;for(i=n;i<this.currentFormat.length&&(s=this.currentFormat[i])===p.Constants.formatSeparator;i++);s&&(this.forceUpdate(),this.setSelection(this.selectionBySymbol(s)))}var a=this.selection,r=a.start,o=a.end;if(r<o&&this.currentFormat[r]!==this.currentFormat[o-1])return this.setSelection(this.selectionByIndex(t>0?r:o-1)),void(this.resetSegmentValue=!0);for(var l=this.currentFormat[r],h=r+t;h>0&&h<this.currentFormat.length&&(this.currentFormat[h]===l||this.currentFormat[h]===p.Constants.formatSeparator);)h+=t;if(this.currentFormat[h]!==p.Constants.formatSeparator){for(var u=h;u>=0&&u<this.currentFormat.length&&this.currentFormat[u]===this.currentFormat[h];)u+=t;h>u&&(u+1!==r||h+1!==o)?(this.setSelection({start:u+1,end:h+1}),this.resetSegmentValue=!0):h<u&&(h!==r||u!==o)&&(this.setSelection({start:h,end:u}),this.resetSegmentValue=!0)}},e.prototype.modifyDateSegmentValue=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n={}),this.dateObject){var i=this.value,s=1*t,a=this.caret();if("S"===(e=e||this.currentFormat[a[0]])&&!this.options.steps.millisecond){var r=h.millisecondDigitsInFormat(this.inputFormat);s=h.millisecondStepFor(r)}this.dateObject.modifyPart(e,s),this.tryTriggerValueChange({oldValue:i,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e))}},e.prototype.tryTriggerValueChange=function(t){if(void 0===t&&(t={oldValue:null,event:{}}),!d.isEqual(this.value,t.oldValue))return this.triggerValueChange(t)},e.prototype.triggerValueChange=function(t){return void 0===t&&(t={oldValue:null,event:{}}),this.trigger("valueChange",h.extend(t,{value:this.value}))},e.prototype.triggerInput=function(t){return void 0===t&&(t={event:{}}),this.trigger("input",h.extend(t,{value:this.value}))},e.prototype.triggerInputEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("inputEnd",h.extend(t,{value:this.value}))},e.prototype.triggerFocus=function(t){return void 0===t&&(t={event:{}}),this.trigger("focus",h.extend({},t))},e.prototype.triggerFocusEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("focusEnd",h.extend({},t))},e.prototype.triggerBlur=function(t){return void 0===t&&(t={event:{}}),this.trigger("blur",h.extend({},t))},e.prototype.triggerBlurEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("blurEnd",h.extend({},t))},e.prototype.triggerChange=function(t){return void 0===t&&(t={event:{}}),this.trigger("change",h.extend(t,{value:this.value}))},e.prototype.triggerKeyDown=function(t){return void 0===t&&(t={event:{}}),this.trigger("keydown",h.extend({},t))},e.prototype.triggerMouseWheel=function(t){return void 0===t&&(t={event:{}}),this.trigger("mousewheel",h.extend({},t))},e.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},e.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text,n=t.format;this.currentFormat=n,this.currentText=e},e.prototype.setElementValue=function(t){this.previousElementValue=this.element.value,this.element.value=t},e.prototype.getStepFromSymbol=function(t){switch(t){case"S":return Number(this.options.steps.millisecond);case"s":return Number(this.options.steps.second);case"m":return Number(this.options.steps.minute);case"h":case"H":return Number(this.options.steps.hour);case"M":return Number(this.options.steps.month);case"d":case"E":return Number(this.options.steps.day);case"y":return Number(this.options.steps.year);default:return 1}},e.prototype.setPreviousInputEventState=function(t){var e=this.selection,n=e.start,i=e.end,s=-1;s=t.keyCode===o.KeyCode.BACKSPACE?1:t.keyCode===o.KeyCode.DELETE?0:(t.keyCode,o.KeyCode.SPACE,-1),this.setElementValue(this.previousElementValue||""),this.setSelection({start:n+s,end:i+s})},e.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},e.prototype.verifyValue=function(t){if(t&&!h.isDate(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},e.prototype.refreshElementValue=function(){var t=this.caret()[0],e=this.element,n=this.isActive?this.inputFormat:this.displayFormat,i=this.dateObject.getTextAndFormat(n),s=i.text,a=i.format;this.currentFormat=a,this.currentText=s;var r=!this.isActive&&h.isPresent(this.options.placeholder)&&!this.dateObject.hasValue();h.isPresent(this.options.placeholder)&&(e.placeholder=this.options.placeholder);var o=r?"":s;this.setElementValue(o),this.isActive&&!this.options.allowCaretMode&&this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(t)},e.prototype.caret=function(t,e){void 0===e&&(e=t);var n=void 0!==t,i=[t,t],s=this.element;if(!n||!this.options.disabled&&!this.options.readonly){try{void 0!==s.selectionStart&&(n&&(h.isDocumentAvailable()&&document.activeElement!==s&&s.focus(),s.setSelectionRange(t,e)),i=[s.selectionStart,s.selectionEnd])}catch(t){i=[]}return i}},e.prototype.selectNearestSegment=function(t){for(var e=t,n=t-1;e<this.currentFormat.length||n>=0;e++,n--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(n>=0&&"_"!==this.currentFormat[n])return void this.selectDateSegment(this.currentFormat[n])}},e.prototype.selectDateSegment=function(t){for(var e=-1,n=0,i=0;i<this.currentFormat.length;i++)this.currentFormat[i]===t&&(n=i+1,-1===e&&(e=i));e<0&&(e=0),this.caret(0,0),this.caret(e,n)},e.prototype.getDateObject=function(t){var e=(this.dateObject||{}||null).leadingZero,n=this.createDateObject({value:t});return n.setLeadingZero(this.isActive?e:null),n},e.prototype.createDateObject=function(t){return void 0===t&&(t={}),new a.DateObject(h.extend({intlService:this.intl,formatPlaceholder:this.formatPlaceholder,format:this.inputFormat,localeId:this.localeId,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts},t))},e}(u.Observable);e.DateInput=f},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),s=n(9),a=n(3),r=n(2),o=n(1),l=/d|M|H|h|m|s/,h=function(){function t(t){var e=t.intlService,n=t.formatPlaceholder,s=t.format,a=t.cycleTime,r=void 0!==a&&a,l=t.twoDigitYearMax,h=void 0===l?o.Constants.twoDigitYearMax:l,u=t.value,c=void 0===u?null:u,d=t.autoCorrectParts,p=void 0===d||d;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEyS",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y",S:"S"},this._value=i.getDate(new Date),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.intl=e,this.formatPlaceholder=n||"wide",this.format=s,this.cycleTime=r,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=h,this.autoCorrectParts=p,c)this._value=i.cloneDate(c);else{this._value=i.getDate(new Date);for(var m=this.dateFormatString(this.value,this.format).symbols,f=0;f<m.length;f++)this.setExisting(m[f],!1)}}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){(!t||t instanceof Date)&&(this._value=t,this.resetInvalidDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localeId",{get:function(){for(var t=o.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),n=0;n<e.length;n++){var i=e[n],s=this.intl.cldr[i];if(s.name&&s.calendar&&s.numbers&&s.name!==o.Constants.defaultLocaleId){t=s.name;break}}return t},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){t?i.isEqual(t,this._value)||(this._value=i.cloneDate(t),this.modifyExisting(!0)):(this._value=i.getDate(new Date),this.modifyExisting(!1)),this.resetInvalidDate()},t.prototype.hasValue=function(){var t=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce((function(e,n){return e||"literal"!==n.type&&"dayperiod"!==n.type&&t.getExisting(n.pattern[0])}),!1)},t.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return i.cloneDate(this.value)},t.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},t.prototype.getTextAndFormat=function(t){void 0===t&&(t="");var e=t||this.format,n=this.intl.formatDate(this.value,e,this.localeId),i=this.dateFormatString(this.value,e);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var s="",o=this.intl.formatDate(this.value,e,this.localeId),l=this.getFormattedInvalidDates(e),h=0;h<o.length;h++){var u=i.symbols[h];if("literal"===i.partMap[h].type)s+=n[h];else if(this.getInvalidDatePartValue(u))if("M"===u)if(i.partMap[h].pattern.length>2)s+=l[u][h];else if(this.getInvalidDatePartValue(u)){var c=r.parseToInt(this.getInvalidDatePartValue(u)+1).toString(),d=a.padZero(Math.abs(i.partMap[h].pattern.length-c.length))+c;s+=d,h+=Math.max(0,d.length-1)}else s+=l[u][h];else this.getInvalidDatePartValue(u)?(s+=this.getInvalidDatePartValue(u),h+=Math.max(0,this.getInvalidDatePartValue(u).toString().length-1)):s+=l[u][h];else s+=n[h]}n=s}return this.merge(n,i)},t.prototype.getFormattedInvalidDates=function(t){var e=this;void 0===t&&(t="");var n=t||this.format,i={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){var s=e.getInvalidDatePart(t).date;if(s){var a=e.intl.formatDate(s,n,e.localeId);i[t]=a}})),i},t.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,n=0;n<e.length;n++)this.setExisting(e[n],t)},t.prototype.getExisting=function(t){switch(t){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},t.prototype.setExisting=function(t,e){switch(t){case"y":this.year=e,!1===e&&this._value.setFullYear(2e3);break;case"M":this.month=e,!1===e&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},t.prototype.modifyPart=function(t,e){var n,s=i.cloneDate(this.value),a=i.cloneDate(this.value),o=!1,l=0;if(this.autoCorrectParts)switch(t){case"y":s.setFullYear(s.getFullYear()+e);break;case"M":s=i.addMonths(this.value,e);break;case"d":case"E":s.setDate(s.getDate()+e);break;case"h":case"H":s.setHours(s.getHours()+e),o=!0;break;case"m":s.setMinutes(s.getMinutes()+e),o=!0;break;case"s":s.setSeconds(s.getSeconds()+e),o=!0;break;case"S":s.setMilliseconds(s.getMilliseconds()+e);break;case"a":s.setHours(s.getHours()+12*e),o=!0}else{var h="M"===t,u="d"===t||"E"===t,c=this._partiallyInvalidDate.invalidDateParts||{},d=c[t],p=c.y.value||s.getFullYear(),m=c.M.value||s.getMonth(),f=c.d.value||c.E.value||s.getDate(),v=c.h.value||c.H.value||s.getHours(),g=c.m.value||s.getMinutes(),y=c.s.value||s.getSeconds(),D=c.S.value||s.getMilliseconds();switch(t){case"y":p+=e;break;case"M":m+=e;break;case"d":case"E":f+=e;break;case"h":case"H":v+=e;break;case"m":g+=e;break;case"s":y+=e;break;case"S":D+=e}if("M"===t){if((m<0||m>11)&&this.getExisting(t))return void this.setExisting(t,!1);m=(12+m)%12}var E=i.createDate(p,m,f,v,g,y,D),b=h||u?this.modifyDateSymbolWithValue(s,t,h?m:f):null,S=r.areDatePartsEqualTo(E,p,m,f,v,g,y,D);if(this.getValue()&&r.areDatePartsEqualTo(E,p,m,f,v,g,y,D))s=i.cloneDate(E),this.markDatePartsAsExisting();else if(h&&b)b.getMonth()===m?this.getExisting("d")?S?(s=i.cloneDate(E),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:m,date:i.cloneDate(b),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):S?(this.resetInvalidDateSymbol(t),s=i.cloneDate(E),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),s=i.cloneDate(b)):(n=!0,this.setInvalidDatePart(t,{value:m,date:i.cloneDate(b),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1));else if(u&&b)b.getDate()===f?this.getExisting("M")?S?(s=i.cloneDate(E),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:f,date:i.cloneDate(b),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):S?(s=i.cloneDate(E),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),s=i.cloneDate(b)):(n=!0,this.setInvalidDatePart(t,{value:f,date:i.cloneDate(this.value),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1));else{switch(t){case"y":s.setFullYear(s.getFullYear()+e);break;case"M":s=i.addMonths(this.value,e);break;case"d":case"E":s.setDate(s.getDate()+e);break;case"h":case"H":s.setHours(s.getHours()+e),o=!0;break;case"m":s.setMinutes(s.getMinutes()+e),o=!0;break;case"s":s.setSeconds(s.getSeconds()+e),o=!0;break;case"S":s.setMilliseconds(s.getMilliseconds()+e);break;case"a":s.setHours(s.getHours()+12*e),o=!0}if(n=!0,d&&d.value)l=r.parseToInt(d.value);else if(!r.isPresent(d.value))switch(s=i.cloneDate(a),t){case"y":l=a.getFullYear();break;case"M":l=a.getMonth();break;case"d":case"E":l=a.getDate();break;case"h":case"H":l=a.getHours();break;case"m":l=a.getMinutes();break;case"s":l=a.getSeconds();break;case"S":l=a.getMilliseconds()}var M=Math.max(0,l+e);"y"!==t&&(M=r.clamp(l+e,0,99)),this.setInvalidDatePart(t,{value:M,date:i.cloneDate(s),startDateOffset:(this.getInvalidDatePart(t).startDateOffset||0)+e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)}}this.shouldNormalizeCentury()&&(s=this.normalizeCentury(s)),o&&!this.cycleTime&&(s.getDate(),this._value.getDate()),n||(this.setExisting(t,!0),this._value=s,this.getValue()&&this.resetInvalidDate())},t.prototype.parsePart=function(t){var e,n=t.symbol,s=t.currentChar,o=t.resetSegmentValue,l=t.cycleSegmentValue,h=t.rawTextValue,u=t.isDeleting,c=!l,d=this.dateFormatString(this.value,this.format),p=d.partMap.filter((function(t){return"literal"===t.type})).map((function(t,e){return{datePartIndex:e,literal:t.pattern}})),m={value:null,switchPart:!1,resetPart:c&&"M"===n&&d.partMap.filter((function(t){return"month"===t.type})).some((function(t){return t.pattern.length>2}))};if(!s){if(!c)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),{value:null,switchToNext:!1};for(var f=0;f<p.length;f++){var v=p[f].literal,g=h.startsWith(v),y=h.endsWith(v),D=h.indexOf(v+v)>=0;if(g||y||D)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),r.extend(m,{value:null,switchToNext:!1})}}var E=this.intl.formatDate(this.value,this.format,this.localeId),b=d.symbols,S=!1,M="",P="",I="",C="";if(c){var x=0,w=!1;for(f=0;f<E.length;f++){var O=p[x];if(O&&O===E[f]&&x++,b[f]===n){P+=this.getExisting(n)?E[f]:"0";var F=h[f];if(F!==E[f]&&F===p[x].literal)w=!0;else if(!w){if(void 0===F)I+=h[f-Math.abs(this.format.length-b.length)]||"";else I+=F||""}S=!0}else S?C+=E[f]:M+=E[f]}}else for(f=0;f<E.length;f++){if(b[f]===n)P+=this.getExisting(n)?E[f]:"0",S=!0;else S?C+=E[f]:M+=E[f]}var k=null,_=this.matchMonth(s),V=this.matchDayPeriod(s,n),A="0"===s,T=this.leadingZero||{};A&&!c?0!==parseInt(o?s:P+s,10)||this.isAbbrMonth(d.partMap,n)||this.incrementLeadingZero(n):this.resetLeadingZero();var N=this.partPattern(d.partMap,n),j=N?N.pattern:null;c&&u&&(P=a.padZero(Math.abs(P.length-I.length))+I);if(c&&u&&!I)return this.setExisting(n,!1),r.extend(m,{value:null,switchToNext:!1});var L=P.length-3,K=!0;for(f=Math.max(0,L);f<=P.length&&K;f++){this.autoCorrectParts||(K=!1);var H=o?s:P.substring(f)+s;!K&&c&&(H=a.unpadZero(H));var B=parseInt(H,10),W=M+H+C;k=this.intl.parseDate(W,this.format,this.localeId);var R=!isNaN(parseInt(s,10))||c&&u&&""===s;if(!k&&!isNaN(B)&&R){if("M"===n&&!_){var Y=B-1;Y>-1&&Y<12&&((k=i.cloneDate(this.value)).setMonth(Y),k.getMonth()!==Y&&(k=i.lastDayOfMonth(i.addMonths(k,-1))))}"y"===n&&(k=i.createDate(parseInt(H,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),this.date&&k.getDate()!==this.value.getDate()&&(k=i.lastDayOfMonth(i.addMonths(k,-1))))}if(k){var Z=this.intl.parseDate(""+M+this.peek(H,j)+C,this.format,this.localeId),U=this.patternLength(j)||j.length,q=T+(a.unpadZero(H)||s).length>=U,z=null===Z||q;return this.shouldNormalizeCentury()&&(k=this.normalizeCentury(k)),this._value=k,this.setExisting(n,!0),r.extend(m,{value:this.value,switchToNext:z})}}if(_&&(k=this.intl.parseDate(M+_+C,this.format,this.localeId)))return this._value=k,this.setExisting(n,!0),r.extend(m,{value:this.value,switchToNext:!1});if(V&&(k=this.intl.parseDate(M+V+C,this.format)))return this._value=k,r.extend(m,{value:this.value,switchToNext:!0});if(A&&(this.leadingZero=this.isAbbrMonth(d.partMap,n)?null:((e={})[n]=!0,e),this.setExisting(n,!1)),!this.autoCorrectParts){this.setExisting(n,!1);var G=void 0,J=c?I:P,Q=r.parseToInt(J);if(r.isNumber(Q)&&(G="M"===n?r.clamp(Q-1,0,11):Q),r.isNumber(G)){var X=this.modifyDateSymbolWithValue(this.value,n,G);this.setInvalidDatePart(n,{value:G,date:i.cloneDate(X),startDate:this._partiallyInvalidDate.startDate||i.cloneDate(this.value)})}}return r.extend(m,{value:null,switchToNext:!1})},t.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(a.dateSymbolMap,{})[t]},t.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},t.prototype.setLeadingZero=function(t){this.leadingZero=t},t.prototype.normalizeCentury=function(t){if(!r.isPresent(t))return t;var e=r.cropTwoDigitYear(t),n=this.getNormalizedCenturyBase(e);return r.setYears(t,n+e)},t.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},t.prototype.isAbbrMonth=function(t,e){var n=this.partPattern(t,e);return"month"===n.type&&n.names},t.prototype.partPattern=function(t,e){return t.filter((function(t){return-1!==t.pattern.indexOf(e)}))[0]},t.prototype.peek=function(t,e){var n=t.replace(/^0*/,"")+"0";return a.padZero(e.length-n.length)+n},t.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var n=parseInt(this.typedMonthPart,10);if(n>=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},t.prototype.matchDayPeriod=function(t,e){var n=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return""},t.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),n=0;n<e.length;n++)if("month"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return[]},t.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),n=0;n<e.length;n++)if("dayperiod"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return null},t.prototype.patternLength=function(t){return"y"===t[0]?4:l.test(t)?2:0},t.prototype.dateFormatString=function(t,e){for(var n=this.intl.splitDateFormat(e,this.localeId),i=[],a=[],r=0;r<n.length;r++)for(var l=this.intl.formatDate(t,{pattern:n[r].pattern},this.localeId).length;l>0;)i.push(this.symbols[n[r].pattern[0]]||o.Constants.formatSeparator),a.push(n[r]),l--;var h=new s.Mask;return h.symbols=i.join(""),h.partMap=a,h},t.prototype.merge=function(t,e){for(var n="",i="",s=e.symbols,a=s.length-1;a>=0;a--)if(-1===this.knownParts.indexOf(s[a])||this.getExisting(s[a]))n=t[a]+n,i=s[a]+i;else{for(var r=s[a];a>=0&&r===s[a];)a--;if(a++,this.leadingZero&&this.leadingZero[r])n="0"+n;else if(!this.autoCorrectParts&&this.getInvalidDatePartValue(r))n=t.substr(a,e.partMap[a].pattern.length)+n;else n=this.dateFieldName(e.partMap[a])+n;for(;i.length<n.length;)i=s[a]+i}return{text:n,format:i}},t.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]?e[t.type]:"formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e}))},t.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},t.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some((function(t){return"yy"===t.pattern}))},t.prototype.resetInvalidDate=function(){var t=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){t.resetInvalidDatePart(e)}))},t.prototype.resetInvalidDateSymbol=function(t){var e=this;this.resetInvalidDatePart(t);var n=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){e._partiallyInvalidDate.invalidDateParts[t]&&r.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(n=!1)})),n&&this.resetInvalidDate()},t.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},t.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},t.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},t.prototype.setInvalidDatePart=function(t,e){var n=e.value,i=void 0===n?null:n,s=e.date,a=void 0===s?null:s,r=e.startDateOffset,o=void 0===r?0:r,l=e.startDate,h=void 0===l?null:l;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=i,this._partiallyInvalidDate.invalidDateParts[t].date=a,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=o,this._partiallyInvalidDate.startDate=h)},t.prototype.modifyDateSymbolWithOffset=function(t,e,n){var s=i.cloneDate(t),a=!1;switch(e){case"y":s.setFullYear(s.getFullYear()+n);break;case"M":s=i.addMonths(this.value,n);break;case"d":case"E":s.setDate(s.getDate()+n);break;case"h":case"H":s.setHours(s.getHours()+n),a=!0;break;case"m":s.setMinutes(s.getMinutes()+n),a=!0;break;case"s":s.setSeconds(s.getSeconds()+n),a=!0;break;case"S":s.setMilliseconds(s.getMilliseconds()+n);break;case"a":s.setHours(s.getHours()+12*n),a=!0}return{date:s,timeModified:a}},t.prototype.modifyDateSymbolWithValue=function(t,e,n){var s=i.cloneDate(t);switch(e){case"y":s.setFullYear(n);break;case"M":s=i.addMonths(t,n-t.getMonth());break;case"d":case"E":s.setDate(n);break;case"h":case"H":s.setHours(n);break;case"m":s.setMinutes(n);break;case"s":s.setSeconds(n);break;case"S":s.setMilliseconds(n);break;case"a":s.setHours(n)}return s},t.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},t}();e.DateObject=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){this.symbols="",this.partMap=[]};e.Mask=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),s={events:{}},a=function(){function t(t){this.options=i.extend({},s,t)}return t.prototype.destroy=function(){},t.prototype.trigger=function(t,e){void 0===e&&(e={});var n={defaultPrevented:!1,preventDefault:function(){n.defaultPrevented=!0}};return!!i.isFunction(this.options.events[t])&&(this.options.events[t](i.extend(n,e,{sender:this})),n.defaultPrevented)},t}();e.Observable=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.None="none",t.Caret="caret",t.Selection="selection"}(e.DateInputInteractionMode||(e.DateInputInteractionMode={}))}])})); |
@@ -1,1 +0,1 @@ | ||
export { MyClass } from './my-class'; | ||
export { DateInput } from './dateinput/dateinput'; |
@@ -1,1 +0,1 @@ | ||
export { MyClass } from './my-class'; | ||
export { DateInput } from './dateinput/dateinput'; |
@@ -1,1 +0,1 @@ | ||
export { MyClass } from './my-class'; | ||
export { DateInput } from './dateinput/dateinput'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var my_class_1 = require("./my-class"); | ||
exports.MyClass = my_class_1.MyClass; | ||
var dateinput_1 = require("./dateinput/dateinput"); | ||
exports.DateInput = dateinput_1.DateInput; |
{ | ||
"name": "@progress/kendo-dateinputs-common", | ||
"description": "Kendo UI common date input utilities", | ||
"version": "0.1.0", | ||
"version": "0.2.0-dev.202301061341", | ||
"keywords": [ | ||
@@ -18,4 +18,7 @@ "Kendo UI" | ||
"scripts": { | ||
"test": "jest", | ||
"test:ci": "jest", | ||
"test": "jest --config jest.config.json", | ||
"test:ci": "jest --config jest.config.json", | ||
"watch-test": "jest --watch --config jest.config.json", | ||
"e2e": "gulp e2e", | ||
"e2e:ci": "CHROME_BIN=`which chromium-browser` NO_SANDBOX=true ENV_BROWSER=Chrome_headless npm run e2e", | ||
"start": "gulp start", | ||
@@ -28,5 +31,7 @@ "lint": "gulp lint", | ||
"dependencies": { | ||
"tslib": "^1.7.0" | ||
"@progress/kendo-date-math": "^1.5.9", | ||
"tslib": "^2.4.1" | ||
}, | ||
"devDependencies": { | ||
"@progress/kendo-intl": "^3.1.1", | ||
"@progress/kendo-typescript-tasks": "^10.0.0", | ||
@@ -69,5 +74,2 @@ "@progress/semantic-prerelease": "^3.0.0", | ||
}, | ||
"jest": { | ||
"preset": "jest-preset-typescript" | ||
}, | ||
"repository": { | ||
@@ -74,0 +76,0 @@ "type": "git", |
@@ -1,9 +0,40 @@ | ||
# Kendo UI for Angular | ||
## Professional Grade UI Components | ||
This package is part of the [Kendo UI for Angular](http://www.telerik.com/kendo-angular-ui/) suite. | ||
This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/), [KendoReact](https://www.telerik.com/kendo-react-ui/components/#react-components) and [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/) suites. | ||
## License | ||
This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI Complete**](http://www.telerik.com/purchase/license-agreement/kendo-ui-complete). If you do not own a commercial license, this file shall be governed by the trial license terms. | ||
This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI** (for Kendo UI for Angular and Kendo UI for Vue)](http://www.telerik.com/purchase/license-agreement/kendo-ui) or to the [**End User License Agreement for Progress KendoReact** (for KendoReact)](https://www.telerik.com/purchase/license-agreement/progress-kendoreact). If you do not own a commercial license, this file shall be governed by the trial license terms. | ||
All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui. | ||
## Kendo UI for Angular Resources and Feedback | ||
- [Get Started](https://www.telerik.com/kendo-angular-ui/getting-started) | ||
- [Component References](https://www.telerik.com/kendo-angular-ui/components) | ||
- [Blogs](http://www.telerik.com/blogs/kendo-ui) | ||
- [FAQ](https://www.telerik.com/kendo-angular-ui/components/faq/) | ||
- [GitHub Issues](https://github.com/telerik/kendo-angular/issues) | ||
- [Feedback Portal](http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-2-feedback) | ||
- [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2) | ||
## KendoReact Resources and Feedback | ||
- [Get Started](https://www.telerik.com/kendo-react-ui/getting-started) | ||
- [Component References](https://www.telerik.com/kendo-react-ui/components/#react-components) | ||
- [Blogs](http://www.telerik.com/blogs/kendo-ui) | ||
- [GitHub Issues](https://github.com/telerik/kendo-react/issues) | ||
- [Feedback Portal](http://kendoui-feedback.telerik.com/forums/908425-kendo-ui-for-react-feedback) | ||
- [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-react-ui) | ||
## Kendo UI for Vue Resources and Feedback | ||
- [Get Started](https://www.telerik.com/kendo-vue-ui/getting-started) | ||
- [Component References](https://www.telerik.com/kendo-vue-ui/components/) | ||
- [Blogs](http://www.telerik.com/blogs/kendo-ui) | ||
- [GitHub Issues](https://github.com/telerik/kendo-vue/issues) | ||
- [Feedback Portal](https://feedback.telerik.com/kendo-vue-ui) | ||
*Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.* | ||
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.* |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
485453
51
7895
41
2
14
3
1
+ Added@progress/kendo-date-math@1.5.14(transitive)
+ Addedtslib@2.8.1(transitive)
Updatedtslib@^2.4.1